@eigenpal/cli 0.11.1 → 0.11.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.
Files changed (2) hide show
  1. package/dist/cli.js +2897 -567
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -17254,8 +17254,150 @@ var init_provider_logo_data_generated = __esm(() => {
17254
17254
  };
17255
17255
  });
17256
17256
 
17257
+ // ../../node_modules/nanoid/url-alphabet/index.js
17258
+ var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
17259
+
17260
+ // ../../node_modules/nanoid/index.js
17261
+ import { webcrypto as crypto } from "node:crypto";
17262
+ function fillPool(bytes) {
17263
+ if (!pool || pool.length < bytes) {
17264
+ pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
17265
+ crypto.getRandomValues(pool);
17266
+ poolOffset = 0;
17267
+ } else if (poolOffset + bytes > pool.length) {
17268
+ crypto.getRandomValues(pool);
17269
+ poolOffset = 0;
17270
+ }
17271
+ poolOffset += bytes;
17272
+ }
17273
+ function nanoid3(size = 21) {
17274
+ fillPool(size |= 0);
17275
+ let id = "";
17276
+ for (let i = poolOffset - size;i < poolOffset; i++) {
17277
+ id += urlAlphabet[pool[i] & 63];
17278
+ }
17279
+ return id;
17280
+ }
17281
+ var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
17282
+ var init_nanoid = () => {};
17283
+
17284
+ // ../types/src/core/common.ts
17285
+ function generateId(prefix) {
17286
+ const id = nanoid3();
17287
+ return prefix ? `${prefix}_${id}` : id;
17288
+ }
17289
+ function toJsonSchema(schema) {
17290
+ return exports_external.toJSONSchema(schema, { target: "draft-7" });
17291
+ }
17292
+ var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
17293
+ var init_common = __esm(() => {
17294
+ init_nanoid();
17295
+ init_zod();
17296
+ ID_PREFIXES = {
17297
+ WORKFLOW: "wf",
17298
+ WORKFLOW_VERSION: "wfv",
17299
+ WORKFLOW_HISTORY: "wfh",
17300
+ JOB: "job",
17301
+ EXECUTION: "exec",
17302
+ STEP_EXECUTION: "step",
17303
+ FILE: "file",
17304
+ TEMPLATE: "tmpl",
17305
+ USER: "user",
17306
+ TENANT: "org",
17307
+ TENANT_INVITE: "inv",
17308
+ API_KEY: "eig",
17309
+ PROCESSOR: "proc",
17310
+ AI_PROVIDER: "aip",
17311
+ ACCOUNT: "acct",
17312
+ SESSION: "sess",
17313
+ VERIFICATION: "vrf",
17314
+ DATASET: "ds",
17315
+ DATASET_EXAMPLE: "dex",
17316
+ EXPERIMENT: "exp",
17317
+ EXPERIMENT_RUN: "exr",
17318
+ EXPERIMENT_EVALUATION: "evl",
17319
+ EVAL_EXAMPLE: "evx",
17320
+ EVAL_RESULT: "evr",
17321
+ EVAL_BATCH: "evb",
17322
+ RUN_REVIEW: "rev",
17323
+ RUN_REVIEW_CORRECTION: "rvc",
17324
+ TABLE_ROW: "row",
17325
+ FOLDER: "fldr",
17326
+ AGENT_WORKFLOW: "awf",
17327
+ AGENT_EXECUTION: "aex",
17328
+ AGENT_EXAMPLE: "aeg",
17329
+ AGENT_VERSION: "avr",
17330
+ AGENT_TRAINING_SESSION: "ats",
17331
+ AGENT_EXPERIMENT: "aexp",
17332
+ AGENT_EMAIL_ALIAS: "aea",
17333
+ AGENT_EMAIL_INVOCATION: "aei",
17334
+ AUTOMATION_TRIGGER: "atr",
17335
+ FILE_SOURCE_CONFIG: "fsc",
17336
+ FILE_UPLOAD: "fup",
17337
+ WEBHOOK_ENDPOINT: "whep",
17338
+ WEBHOOK_EVENT: "whev",
17339
+ WEBHOOK_DELIVERY: "whdl",
17340
+ WEBHOOK_ATTEMPT: "what",
17341
+ PAID_ALLOWANCE_GRANT: "pag",
17342
+ PAID_ALLOWANCE_ADJUSTMENT: "paa",
17343
+ OCR_EXTRACTION_PIPELINE: "oppl",
17344
+ OCR_JOB: "opj",
17345
+ SANDBOX_WS_TOKEN: "sws"
17346
+ };
17347
+ TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
17348
+ return typeof val === "string" ? new Date(val) : val;
17349
+ });
17350
+ JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
17351
+ BaseEntitySchema = exports_external.object({
17352
+ id: exports_external.string(),
17353
+ createdAt: TimestampSchema.optional(),
17354
+ updatedAt: TimestampSchema.optional()
17355
+ });
17356
+ });
17357
+
17358
+ // ../types/src/core/ids.ts
17359
+ var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
17360
+ var init_ids = __esm(() => {
17361
+ PROCESSOR_IDS = {
17362
+ MERGE: "builtin/merge",
17363
+ DOCUMENT_PARSER: "builtin/parser",
17364
+ EXTRACT: "builtin/extract",
17365
+ SPLIT: "builtin/split",
17366
+ SEGMENT: "builtin/segment",
17367
+ CLASSIFY: "builtin/classify",
17368
+ CLASSIFY_PAGES: "builtin/classify-pages",
17369
+ VISION: "builtin/vision",
17370
+ TEMPLATE: "builtin/template",
17371
+ PDF_EMBEDDER: "builtin/pdf-embedder",
17372
+ XLSX_TO_JSON: "builtin/xlsx-to-json"
17373
+ };
17374
+ PARSER_IDS = {
17375
+ KREUZBERG: "builtin/kreuzberg",
17376
+ OCR: "builtin/ocr",
17377
+ LLM_VISION: "builtin/llm-vision"
17378
+ };
17379
+ INPUT_KINDS = {
17380
+ DOCUMENT: "document",
17381
+ PAYLOAD: "payload"
17382
+ };
17383
+ });
17384
+
17385
+ // ../types/src/core/pagination.ts
17386
+ var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
17387
+ var init_pagination = __esm(() => {
17388
+ init_zod();
17389
+ PaginationParamsSchema = exports_external.object({
17390
+ limit: exports_external.coerce.number().int().min(1).max(100).default(50),
17391
+ offset: exports_external.coerce.number().int().min(0).default(0)
17392
+ });
17393
+ });
17394
+
17257
17395
  // ../types/src/core/index.ts
17258
- var init_core3 = () => {};
17396
+ var init_core3 = __esm(() => {
17397
+ init_common();
17398
+ init_ids();
17399
+ init_pagination();
17400
+ });
17259
17401
 
17260
17402
  // ../types/src/files/legacy-boundary.ts
17261
17403
  var LEGACY_FILE_REF_COMPATIBILITY;
@@ -17280,6 +17422,9 @@ var init_legacy_boundary = __esm(() => {
17280
17422
  function isRuntimeFileRef(input) {
17281
17423
  return RuntimeFileRefSchema.safeParse(input).success;
17282
17424
  }
17425
+ function isFilePathDescriptor(input) {
17426
+ return FilePathDescriptorSchema.safeParse(input).success;
17427
+ }
17283
17428
  function isResolvedProcessorFile(input) {
17284
17429
  return ResolvedProcessorFileSchema.safeParse(input).success;
17285
17430
  }
@@ -17541,11 +17686,2513 @@ var init_upload_session = __esm(() => {
17541
17686
  FileUploadTransportSchema = exports_external.enum(FILE_UPLOAD_TRANSPORTS);
17542
17687
  });
17543
17688
 
17689
+ // ../../node_modules/@opentelemetry/api/build/src/version.js
17690
+ var require_version = __commonJS((exports) => {
17691
+ Object.defineProperty(exports, "__esModule", { value: true });
17692
+ exports.VERSION = undefined;
17693
+ exports.VERSION = "1.9.1";
17694
+ });
17695
+
17696
+ // ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
17697
+ var require_semver = __commonJS((exports) => {
17698
+ Object.defineProperty(exports, "__esModule", { value: true });
17699
+ exports.isCompatible = exports._makeCompatibilityCheck = undefined;
17700
+ var version_1 = require_version();
17701
+ var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
17702
+ function _makeCompatibilityCheck(ownVersion) {
17703
+ const acceptedVersions = new Set([ownVersion]);
17704
+ const rejectedVersions = new Set;
17705
+ const myVersionMatch = ownVersion.match(re);
17706
+ if (!myVersionMatch) {
17707
+ return () => false;
17708
+ }
17709
+ const ownVersionParsed = {
17710
+ major: +myVersionMatch[1],
17711
+ minor: +myVersionMatch[2],
17712
+ patch: +myVersionMatch[3],
17713
+ prerelease: myVersionMatch[4]
17714
+ };
17715
+ if (ownVersionParsed.prerelease != null) {
17716
+ return function isExactmatch(globalVersion) {
17717
+ return globalVersion === ownVersion;
17718
+ };
17719
+ }
17720
+ function _reject(v) {
17721
+ rejectedVersions.add(v);
17722
+ return false;
17723
+ }
17724
+ function _accept(v) {
17725
+ acceptedVersions.add(v);
17726
+ return true;
17727
+ }
17728
+ return function isCompatible(globalVersion) {
17729
+ if (acceptedVersions.has(globalVersion)) {
17730
+ return true;
17731
+ }
17732
+ if (rejectedVersions.has(globalVersion)) {
17733
+ return false;
17734
+ }
17735
+ const globalVersionMatch = globalVersion.match(re);
17736
+ if (!globalVersionMatch) {
17737
+ return _reject(globalVersion);
17738
+ }
17739
+ const globalVersionParsed = {
17740
+ major: +globalVersionMatch[1],
17741
+ minor: +globalVersionMatch[2],
17742
+ patch: +globalVersionMatch[3],
17743
+ prerelease: globalVersionMatch[4]
17744
+ };
17745
+ if (globalVersionParsed.prerelease != null) {
17746
+ return _reject(globalVersion);
17747
+ }
17748
+ if (ownVersionParsed.major !== globalVersionParsed.major) {
17749
+ return _reject(globalVersion);
17750
+ }
17751
+ if (ownVersionParsed.major === 0) {
17752
+ if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
17753
+ return _accept(globalVersion);
17754
+ }
17755
+ return _reject(globalVersion);
17756
+ }
17757
+ if (ownVersionParsed.minor <= globalVersionParsed.minor) {
17758
+ return _accept(globalVersion);
17759
+ }
17760
+ return _reject(globalVersion);
17761
+ };
17762
+ }
17763
+ exports._makeCompatibilityCheck = _makeCompatibilityCheck;
17764
+ exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
17765
+ });
17766
+
17767
+ // ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
17768
+ var require_global_utils = __commonJS((exports) => {
17769
+ Object.defineProperty(exports, "__esModule", { value: true });
17770
+ exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
17771
+ var version_1 = require_version();
17772
+ var semver_1 = require_semver();
17773
+ var major = version_1.VERSION.split(".")[0];
17774
+ var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
17775
+ var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
17776
+ function registerGlobal(type, instance, diag, allowOverride = false) {
17777
+ var _a3;
17778
+ const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
17779
+ version: version_1.VERSION
17780
+ };
17781
+ if (!allowOverride && api2[type]) {
17782
+ const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
17783
+ diag.error(err.stack || err.message);
17784
+ return false;
17785
+ }
17786
+ if (api2.version !== version_1.VERSION) {
17787
+ const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
17788
+ diag.error(err.stack || err.message);
17789
+ return false;
17790
+ }
17791
+ api2[type] = instance;
17792
+ diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
17793
+ return true;
17794
+ }
17795
+ exports.registerGlobal = registerGlobal;
17796
+ function getGlobal(type) {
17797
+ var _a3, _b;
17798
+ const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
17799
+ if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
17800
+ return;
17801
+ }
17802
+ return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
17803
+ }
17804
+ exports.getGlobal = getGlobal;
17805
+ function unregisterGlobal(type, diag) {
17806
+ diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
17807
+ const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
17808
+ if (api2) {
17809
+ delete api2[type];
17810
+ }
17811
+ }
17812
+ exports.unregisterGlobal = unregisterGlobal;
17813
+ });
17814
+
17815
+ // ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
17816
+ var require_ComponentLogger = __commonJS((exports) => {
17817
+ Object.defineProperty(exports, "__esModule", { value: true });
17818
+ exports.DiagComponentLogger = undefined;
17819
+ var global_utils_1 = require_global_utils();
17820
+
17821
+ class DiagComponentLogger {
17822
+ constructor(props) {
17823
+ this._namespace = props.namespace || "DiagComponentLogger";
17824
+ }
17825
+ debug(...args) {
17826
+ return logProxy("debug", this._namespace, args);
17827
+ }
17828
+ error(...args) {
17829
+ return logProxy("error", this._namespace, args);
17830
+ }
17831
+ info(...args) {
17832
+ return logProxy("info", this._namespace, args);
17833
+ }
17834
+ warn(...args) {
17835
+ return logProxy("warn", this._namespace, args);
17836
+ }
17837
+ verbose(...args) {
17838
+ return logProxy("verbose", this._namespace, args);
17839
+ }
17840
+ }
17841
+ exports.DiagComponentLogger = DiagComponentLogger;
17842
+ function logProxy(funcName, namespace, args) {
17843
+ const logger = (0, global_utils_1.getGlobal)("diag");
17844
+ if (!logger) {
17845
+ return;
17846
+ }
17847
+ return logger[funcName](namespace, ...args);
17848
+ }
17849
+ });
17850
+
17851
+ // ../../node_modules/@opentelemetry/api/build/src/diag/types.js
17852
+ var require_types = __commonJS((exports) => {
17853
+ Object.defineProperty(exports, "__esModule", { value: true });
17854
+ exports.DiagLogLevel = undefined;
17855
+ var DiagLogLevel;
17856
+ (function(DiagLogLevel2) {
17857
+ DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
17858
+ DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
17859
+ DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
17860
+ DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
17861
+ DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
17862
+ DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
17863
+ DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
17864
+ })(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
17865
+ });
17866
+
17867
+ // ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
17868
+ var require_logLevelLogger = __commonJS((exports) => {
17869
+ Object.defineProperty(exports, "__esModule", { value: true });
17870
+ exports.createLogLevelDiagLogger = undefined;
17871
+ var types_1 = require_types();
17872
+ function createLogLevelDiagLogger(maxLevel, logger) {
17873
+ if (maxLevel < types_1.DiagLogLevel.NONE) {
17874
+ maxLevel = types_1.DiagLogLevel.NONE;
17875
+ } else if (maxLevel > types_1.DiagLogLevel.ALL) {
17876
+ maxLevel = types_1.DiagLogLevel.ALL;
17877
+ }
17878
+ logger = logger || {};
17879
+ function _filterFunc(funcName, theLevel) {
17880
+ const theFunc = logger[funcName];
17881
+ if (typeof theFunc === "function" && maxLevel >= theLevel) {
17882
+ return theFunc.bind(logger);
17883
+ }
17884
+ return function() {};
17885
+ }
17886
+ return {
17887
+ error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
17888
+ warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
17889
+ info: _filterFunc("info", types_1.DiagLogLevel.INFO),
17890
+ debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
17891
+ verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
17892
+ };
17893
+ }
17894
+ exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
17895
+ });
17896
+
17897
+ // ../../node_modules/@opentelemetry/api/build/src/api/diag.js
17898
+ var require_diag = __commonJS((exports) => {
17899
+ Object.defineProperty(exports, "__esModule", { value: true });
17900
+ exports.DiagAPI = undefined;
17901
+ var ComponentLogger_1 = require_ComponentLogger();
17902
+ var logLevelLogger_1 = require_logLevelLogger();
17903
+ var types_1 = require_types();
17904
+ var global_utils_1 = require_global_utils();
17905
+ var API_NAME = "diag";
17906
+
17907
+ class DiagAPI {
17908
+ static instance() {
17909
+ if (!this._instance) {
17910
+ this._instance = new DiagAPI;
17911
+ }
17912
+ return this._instance;
17913
+ }
17914
+ constructor() {
17915
+ function _logProxy(funcName) {
17916
+ return function(...args) {
17917
+ const logger = (0, global_utils_1.getGlobal)("diag");
17918
+ if (!logger)
17919
+ return;
17920
+ return logger[funcName](...args);
17921
+ };
17922
+ }
17923
+ const self2 = this;
17924
+ const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
17925
+ var _a3, _b, _c;
17926
+ if (logger === self2) {
17927
+ const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
17928
+ self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
17929
+ return false;
17930
+ }
17931
+ if (typeof optionsOrLogLevel === "number") {
17932
+ optionsOrLogLevel = {
17933
+ logLevel: optionsOrLogLevel
17934
+ };
17935
+ }
17936
+ const oldLogger = (0, global_utils_1.getGlobal)("diag");
17937
+ const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
17938
+ if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
17939
+ const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
17940
+ oldLogger.warn(`Current logger will be overwritten from ${stack}`);
17941
+ newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
17942
+ }
17943
+ return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
17944
+ };
17945
+ self2.setLogger = setLogger;
17946
+ self2.disable = () => {
17947
+ (0, global_utils_1.unregisterGlobal)(API_NAME, self2);
17948
+ };
17949
+ self2.createComponentLogger = (options) => {
17950
+ return new ComponentLogger_1.DiagComponentLogger(options);
17951
+ };
17952
+ self2.verbose = _logProxy("verbose");
17953
+ self2.debug = _logProxy("debug");
17954
+ self2.info = _logProxy("info");
17955
+ self2.warn = _logProxy("warn");
17956
+ self2.error = _logProxy("error");
17957
+ }
17958
+ }
17959
+ exports.DiagAPI = DiagAPI;
17960
+ });
17961
+
17962
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
17963
+ var require_baggage_impl = __commonJS((exports) => {
17964
+ Object.defineProperty(exports, "__esModule", { value: true });
17965
+ exports.BaggageImpl = undefined;
17966
+
17967
+ class BaggageImpl {
17968
+ constructor(entries) {
17969
+ this._entries = entries ? new Map(entries) : new Map;
17970
+ }
17971
+ getEntry(key) {
17972
+ const entry = this._entries.get(key);
17973
+ if (!entry) {
17974
+ return;
17975
+ }
17976
+ return Object.assign({}, entry);
17977
+ }
17978
+ getAllEntries() {
17979
+ return Array.from(this._entries.entries());
17980
+ }
17981
+ setEntry(key, entry) {
17982
+ const newBaggage = new BaggageImpl(this._entries);
17983
+ newBaggage._entries.set(key, entry);
17984
+ return newBaggage;
17985
+ }
17986
+ removeEntry(key) {
17987
+ const newBaggage = new BaggageImpl(this._entries);
17988
+ newBaggage._entries.delete(key);
17989
+ return newBaggage;
17990
+ }
17991
+ removeEntries(...keys) {
17992
+ const newBaggage = new BaggageImpl(this._entries);
17993
+ for (const key of keys) {
17994
+ newBaggage._entries.delete(key);
17995
+ }
17996
+ return newBaggage;
17997
+ }
17998
+ clear() {
17999
+ return new BaggageImpl;
18000
+ }
18001
+ }
18002
+ exports.BaggageImpl = BaggageImpl;
18003
+ });
18004
+
18005
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
18006
+ var require_symbol = __commonJS((exports) => {
18007
+ Object.defineProperty(exports, "__esModule", { value: true });
18008
+ exports.baggageEntryMetadataSymbol = undefined;
18009
+ exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
18010
+ });
18011
+
18012
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
18013
+ var require_utils = __commonJS((exports) => {
18014
+ Object.defineProperty(exports, "__esModule", { value: true });
18015
+ exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
18016
+ var diag_1 = require_diag();
18017
+ var baggage_impl_1 = require_baggage_impl();
18018
+ var symbol_1 = require_symbol();
18019
+ var diag = diag_1.DiagAPI.instance();
18020
+ function createBaggage(entries = {}) {
18021
+ return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
18022
+ }
18023
+ exports.createBaggage = createBaggage;
18024
+ function baggageEntryMetadataFromString(str) {
18025
+ if (typeof str !== "string") {
18026
+ diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
18027
+ str = "";
18028
+ }
18029
+ return {
18030
+ __TYPE__: symbol_1.baggageEntryMetadataSymbol,
18031
+ toString() {
18032
+ return str;
18033
+ }
18034
+ };
18035
+ }
18036
+ exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
18037
+ });
18038
+
18039
+ // ../../node_modules/@opentelemetry/api/build/src/context/context.js
18040
+ var require_context = __commonJS((exports) => {
18041
+ Object.defineProperty(exports, "__esModule", { value: true });
18042
+ exports.ROOT_CONTEXT = exports.createContextKey = undefined;
18043
+ function createContextKey(description) {
18044
+ return Symbol.for(description);
18045
+ }
18046
+ exports.createContextKey = createContextKey;
18047
+
18048
+ class BaseContext {
18049
+ constructor(parentContext) {
18050
+ const self2 = this;
18051
+ self2._currentContext = parentContext ? new Map(parentContext) : new Map;
18052
+ self2.getValue = (key) => self2._currentContext.get(key);
18053
+ self2.setValue = (key, value) => {
18054
+ const context = new BaseContext(self2._currentContext);
18055
+ context._currentContext.set(key, value);
18056
+ return context;
18057
+ };
18058
+ self2.deleteValue = (key) => {
18059
+ const context = new BaseContext(self2._currentContext);
18060
+ context._currentContext.delete(key);
18061
+ return context;
18062
+ };
18063
+ }
18064
+ }
18065
+ exports.ROOT_CONTEXT = new BaseContext;
18066
+ });
18067
+
18068
+ // ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
18069
+ var require_consoleLogger = __commonJS((exports) => {
18070
+ Object.defineProperty(exports, "__esModule", { value: true });
18071
+ exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
18072
+ var consoleMap = [
18073
+ { n: "error", c: "error" },
18074
+ { n: "warn", c: "warn" },
18075
+ { n: "info", c: "info" },
18076
+ { n: "debug", c: "debug" },
18077
+ { n: "verbose", c: "trace" }
18078
+ ];
18079
+ exports._originalConsoleMethods = {};
18080
+ if (typeof console !== "undefined") {
18081
+ const keys = [
18082
+ "error",
18083
+ "warn",
18084
+ "info",
18085
+ "debug",
18086
+ "trace",
18087
+ "log"
18088
+ ];
18089
+ for (const key of keys) {
18090
+ if (typeof console[key] === "function") {
18091
+ exports._originalConsoleMethods[key] = console[key];
18092
+ }
18093
+ }
18094
+ }
18095
+
18096
+ class DiagConsoleLogger {
18097
+ constructor() {
18098
+ function _consoleFunc(funcName) {
18099
+ return function(...args) {
18100
+ let theFunc = exports._originalConsoleMethods[funcName];
18101
+ if (typeof theFunc !== "function") {
18102
+ theFunc = exports._originalConsoleMethods["log"];
18103
+ }
18104
+ if (typeof theFunc !== "function" && console) {
18105
+ theFunc = console[funcName];
18106
+ if (typeof theFunc !== "function") {
18107
+ theFunc = console.log;
18108
+ }
18109
+ }
18110
+ if (typeof theFunc === "function") {
18111
+ return theFunc.apply(console, args);
18112
+ }
18113
+ };
18114
+ }
18115
+ for (let i = 0;i < consoleMap.length; i++) {
18116
+ this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
18117
+ }
18118
+ }
18119
+ }
18120
+ exports.DiagConsoleLogger = DiagConsoleLogger;
18121
+ });
18122
+
18123
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
18124
+ var require_NoopMeter = __commonJS((exports) => {
18125
+ Object.defineProperty(exports, "__esModule", { value: true });
18126
+ 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;
18127
+
18128
+ class NoopMeter {
18129
+ constructor() {}
18130
+ createGauge(_name, _options) {
18131
+ return exports.NOOP_GAUGE_METRIC;
18132
+ }
18133
+ createHistogram(_name, _options) {
18134
+ return exports.NOOP_HISTOGRAM_METRIC;
18135
+ }
18136
+ createCounter(_name, _options) {
18137
+ return exports.NOOP_COUNTER_METRIC;
18138
+ }
18139
+ createUpDownCounter(_name, _options) {
18140
+ return exports.NOOP_UP_DOWN_COUNTER_METRIC;
18141
+ }
18142
+ createObservableGauge(_name, _options) {
18143
+ return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
18144
+ }
18145
+ createObservableCounter(_name, _options) {
18146
+ return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
18147
+ }
18148
+ createObservableUpDownCounter(_name, _options) {
18149
+ return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
18150
+ }
18151
+ addBatchObservableCallback(_callback, _observables) {}
18152
+ removeBatchObservableCallback(_callback) {}
18153
+ }
18154
+ exports.NoopMeter = NoopMeter;
18155
+
18156
+ class NoopMetric {
18157
+ }
18158
+ exports.NoopMetric = NoopMetric;
18159
+
18160
+ class NoopCounterMetric extends NoopMetric {
18161
+ add(_value, _attributes) {}
18162
+ }
18163
+ exports.NoopCounterMetric = NoopCounterMetric;
18164
+
18165
+ class NoopUpDownCounterMetric extends NoopMetric {
18166
+ add(_value, _attributes) {}
18167
+ }
18168
+ exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
18169
+
18170
+ class NoopGaugeMetric extends NoopMetric {
18171
+ record(_value, _attributes) {}
18172
+ }
18173
+ exports.NoopGaugeMetric = NoopGaugeMetric;
18174
+
18175
+ class NoopHistogramMetric extends NoopMetric {
18176
+ record(_value, _attributes) {}
18177
+ }
18178
+ exports.NoopHistogramMetric = NoopHistogramMetric;
18179
+
18180
+ class NoopObservableMetric {
18181
+ addCallback(_callback) {}
18182
+ removeCallback(_callback) {}
18183
+ }
18184
+ exports.NoopObservableMetric = NoopObservableMetric;
18185
+
18186
+ class NoopObservableCounterMetric extends NoopObservableMetric {
18187
+ }
18188
+ exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
18189
+
18190
+ class NoopObservableGaugeMetric extends NoopObservableMetric {
18191
+ }
18192
+ exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
18193
+
18194
+ class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
18195
+ }
18196
+ exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
18197
+ exports.NOOP_METER = new NoopMeter;
18198
+ exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
18199
+ exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
18200
+ exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
18201
+ exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
18202
+ exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
18203
+ exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
18204
+ exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
18205
+ function createNoopMeter() {
18206
+ return exports.NOOP_METER;
18207
+ }
18208
+ exports.createNoopMeter = createNoopMeter;
18209
+ });
18210
+
18211
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
18212
+ var require_Metric = __commonJS((exports) => {
18213
+ Object.defineProperty(exports, "__esModule", { value: true });
18214
+ exports.ValueType = undefined;
18215
+ var ValueType;
18216
+ (function(ValueType2) {
18217
+ ValueType2[ValueType2["INT"] = 0] = "INT";
18218
+ ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
18219
+ })(ValueType = exports.ValueType || (exports.ValueType = {}));
18220
+ });
18221
+
18222
+ // ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
18223
+ var require_TextMapPropagator = __commonJS((exports) => {
18224
+ Object.defineProperty(exports, "__esModule", { value: true });
18225
+ exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
18226
+ exports.defaultTextMapGetter = {
18227
+ get(carrier, key) {
18228
+ if (carrier == null) {
18229
+ return;
18230
+ }
18231
+ return carrier[key];
18232
+ },
18233
+ keys(carrier) {
18234
+ if (carrier == null) {
18235
+ return [];
18236
+ }
18237
+ return Object.keys(carrier);
18238
+ }
18239
+ };
18240
+ exports.defaultTextMapSetter = {
18241
+ set(carrier, key, value) {
18242
+ if (carrier == null) {
18243
+ return;
18244
+ }
18245
+ carrier[key] = value;
18246
+ }
18247
+ };
18248
+ });
18249
+
18250
+ // ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
18251
+ var require_NoopContextManager = __commonJS((exports) => {
18252
+ Object.defineProperty(exports, "__esModule", { value: true });
18253
+ exports.NoopContextManager = undefined;
18254
+ var context_1 = require_context();
18255
+
18256
+ class NoopContextManager {
18257
+ active() {
18258
+ return context_1.ROOT_CONTEXT;
18259
+ }
18260
+ with(_context, fn, thisArg, ...args) {
18261
+ return fn.call(thisArg, ...args);
18262
+ }
18263
+ bind(_context, target) {
18264
+ return target;
18265
+ }
18266
+ enable() {
18267
+ return this;
18268
+ }
18269
+ disable() {
18270
+ return this;
18271
+ }
18272
+ }
18273
+ exports.NoopContextManager = NoopContextManager;
18274
+ });
18275
+
18276
+ // ../../node_modules/@opentelemetry/api/build/src/api/context.js
18277
+ var require_context2 = __commonJS((exports) => {
18278
+ Object.defineProperty(exports, "__esModule", { value: true });
18279
+ exports.ContextAPI = undefined;
18280
+ var NoopContextManager_1 = require_NoopContextManager();
18281
+ var global_utils_1 = require_global_utils();
18282
+ var diag_1 = require_diag();
18283
+ var API_NAME = "context";
18284
+ var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
18285
+
18286
+ class ContextAPI {
18287
+ constructor() {}
18288
+ static getInstance() {
18289
+ if (!this._instance) {
18290
+ this._instance = new ContextAPI;
18291
+ }
18292
+ return this._instance;
18293
+ }
18294
+ setGlobalContextManager(contextManager) {
18295
+ return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
18296
+ }
18297
+ active() {
18298
+ return this._getContextManager().active();
18299
+ }
18300
+ with(context, fn, thisArg, ...args) {
18301
+ return this._getContextManager().with(context, fn, thisArg, ...args);
18302
+ }
18303
+ bind(context, target) {
18304
+ return this._getContextManager().bind(context, target);
18305
+ }
18306
+ _getContextManager() {
18307
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
18308
+ }
18309
+ disable() {
18310
+ this._getContextManager().disable();
18311
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18312
+ }
18313
+ }
18314
+ exports.ContextAPI = ContextAPI;
18315
+ });
18316
+
18317
+ // ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
18318
+ var require_trace_flags = __commonJS((exports) => {
18319
+ Object.defineProperty(exports, "__esModule", { value: true });
18320
+ exports.TraceFlags = undefined;
18321
+ var TraceFlags;
18322
+ (function(TraceFlags2) {
18323
+ TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
18324
+ TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
18325
+ })(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
18326
+ });
18327
+
18328
+ // ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
18329
+ var require_invalid_span_constants = __commonJS((exports) => {
18330
+ Object.defineProperty(exports, "__esModule", { value: true });
18331
+ exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
18332
+ var trace_flags_1 = require_trace_flags();
18333
+ exports.INVALID_SPANID = "0000000000000000";
18334
+ exports.INVALID_TRACEID = "00000000000000000000000000000000";
18335
+ exports.INVALID_SPAN_CONTEXT = {
18336
+ traceId: exports.INVALID_TRACEID,
18337
+ spanId: exports.INVALID_SPANID,
18338
+ traceFlags: trace_flags_1.TraceFlags.NONE
18339
+ };
18340
+ });
18341
+
18342
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
18343
+ var require_NonRecordingSpan = __commonJS((exports) => {
18344
+ Object.defineProperty(exports, "__esModule", { value: true });
18345
+ exports.NonRecordingSpan = undefined;
18346
+ var invalid_span_constants_1 = require_invalid_span_constants();
18347
+
18348
+ class NonRecordingSpan {
18349
+ constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
18350
+ this._spanContext = spanContext;
18351
+ }
18352
+ spanContext() {
18353
+ return this._spanContext;
18354
+ }
18355
+ setAttribute(_key, _value) {
18356
+ return this;
18357
+ }
18358
+ setAttributes(_attributes) {
18359
+ return this;
18360
+ }
18361
+ addEvent(_name, _attributes) {
18362
+ return this;
18363
+ }
18364
+ addLink(_link) {
18365
+ return this;
18366
+ }
18367
+ addLinks(_links) {
18368
+ return this;
18369
+ }
18370
+ setStatus(_status) {
18371
+ return this;
18372
+ }
18373
+ updateName(_name) {
18374
+ return this;
18375
+ }
18376
+ end(_endTime) {}
18377
+ isRecording() {
18378
+ return false;
18379
+ }
18380
+ recordException(_exception, _time) {}
18381
+ }
18382
+ exports.NonRecordingSpan = NonRecordingSpan;
18383
+ });
18384
+
18385
+ // ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
18386
+ var require_context_utils = __commonJS((exports) => {
18387
+ Object.defineProperty(exports, "__esModule", { value: true });
18388
+ exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
18389
+ var context_1 = require_context();
18390
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18391
+ var context_2 = require_context2();
18392
+ var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
18393
+ function getSpan(context) {
18394
+ return context.getValue(SPAN_KEY) || undefined;
18395
+ }
18396
+ exports.getSpan = getSpan;
18397
+ function getActiveSpan() {
18398
+ return getSpan(context_2.ContextAPI.getInstance().active());
18399
+ }
18400
+ exports.getActiveSpan = getActiveSpan;
18401
+ function setSpan(context, span) {
18402
+ return context.setValue(SPAN_KEY, span);
18403
+ }
18404
+ exports.setSpan = setSpan;
18405
+ function deleteSpan(context) {
18406
+ return context.deleteValue(SPAN_KEY);
18407
+ }
18408
+ exports.deleteSpan = deleteSpan;
18409
+ function setSpanContext(context, spanContext) {
18410
+ return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
18411
+ }
18412
+ exports.setSpanContext = setSpanContext;
18413
+ function getSpanContext(context) {
18414
+ var _a3;
18415
+ return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
18416
+ }
18417
+ exports.getSpanContext = getSpanContext;
18418
+ });
18419
+
18420
+ // ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
18421
+ var require_spancontext_utils = __commonJS((exports) => {
18422
+ Object.defineProperty(exports, "__esModule", { value: true });
18423
+ exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
18424
+ var invalid_span_constants_1 = require_invalid_span_constants();
18425
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18426
+ var isHex = new Uint8Array([
18427
+ 0,
18428
+ 0,
18429
+ 0,
18430
+ 0,
18431
+ 0,
18432
+ 0,
18433
+ 0,
18434
+ 0,
18435
+ 0,
18436
+ 0,
18437
+ 0,
18438
+ 0,
18439
+ 0,
18440
+ 0,
18441
+ 0,
18442
+ 0,
18443
+ 0,
18444
+ 0,
18445
+ 0,
18446
+ 0,
18447
+ 0,
18448
+ 0,
18449
+ 0,
18450
+ 0,
18451
+ 0,
18452
+ 0,
18453
+ 0,
18454
+ 0,
18455
+ 0,
18456
+ 0,
18457
+ 0,
18458
+ 0,
18459
+ 0,
18460
+ 0,
18461
+ 0,
18462
+ 0,
18463
+ 0,
18464
+ 0,
18465
+ 0,
18466
+ 0,
18467
+ 0,
18468
+ 0,
18469
+ 0,
18470
+ 0,
18471
+ 0,
18472
+ 0,
18473
+ 0,
18474
+ 0,
18475
+ 1,
18476
+ 1,
18477
+ 1,
18478
+ 1,
18479
+ 1,
18480
+ 1,
18481
+ 1,
18482
+ 1,
18483
+ 1,
18484
+ 1,
18485
+ 0,
18486
+ 0,
18487
+ 0,
18488
+ 0,
18489
+ 0,
18490
+ 0,
18491
+ 0,
18492
+ 1,
18493
+ 1,
18494
+ 1,
18495
+ 1,
18496
+ 1,
18497
+ 1,
18498
+ 0,
18499
+ 0,
18500
+ 0,
18501
+ 0,
18502
+ 0,
18503
+ 0,
18504
+ 0,
18505
+ 0,
18506
+ 0,
18507
+ 0,
18508
+ 0,
18509
+ 0,
18510
+ 0,
18511
+ 0,
18512
+ 0,
18513
+ 0,
18514
+ 0,
18515
+ 0,
18516
+ 0,
18517
+ 0,
18518
+ 0,
18519
+ 0,
18520
+ 0,
18521
+ 0,
18522
+ 0,
18523
+ 0,
18524
+ 1,
18525
+ 1,
18526
+ 1,
18527
+ 1,
18528
+ 1,
18529
+ 1
18530
+ ]);
18531
+ function isValidHex(id, length) {
18532
+ if (typeof id !== "string" || id.length !== length)
18533
+ return false;
18534
+ let r = 0;
18535
+ for (let i = 0;i < id.length; i += 4) {
18536
+ r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
18537
+ }
18538
+ return r === length;
18539
+ }
18540
+ function isValidTraceId(traceId) {
18541
+ return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
18542
+ }
18543
+ exports.isValidTraceId = isValidTraceId;
18544
+ function isValidSpanId(spanId) {
18545
+ return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
18546
+ }
18547
+ exports.isValidSpanId = isValidSpanId;
18548
+ function isSpanContextValid(spanContext) {
18549
+ return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
18550
+ }
18551
+ exports.isSpanContextValid = isSpanContextValid;
18552
+ function wrapSpanContext(spanContext) {
18553
+ return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
18554
+ }
18555
+ exports.wrapSpanContext = wrapSpanContext;
18556
+ });
18557
+
18558
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
18559
+ var require_NoopTracer = __commonJS((exports) => {
18560
+ Object.defineProperty(exports, "__esModule", { value: true });
18561
+ exports.NoopTracer = undefined;
18562
+ var context_1 = require_context2();
18563
+ var context_utils_1 = require_context_utils();
18564
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18565
+ var spancontext_utils_1 = require_spancontext_utils();
18566
+ var contextApi = context_1.ContextAPI.getInstance();
18567
+
18568
+ class NoopTracer {
18569
+ startSpan(name, options, context = contextApi.active()) {
18570
+ const root = Boolean(options === null || options === undefined ? undefined : options.root);
18571
+ if (root) {
18572
+ return new NonRecordingSpan_1.NonRecordingSpan;
18573
+ }
18574
+ const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
18575
+ if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
18576
+ return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
18577
+ } else {
18578
+ return new NonRecordingSpan_1.NonRecordingSpan;
18579
+ }
18580
+ }
18581
+ startActiveSpan(name, arg2, arg3, arg4) {
18582
+ let opts;
18583
+ let ctx;
18584
+ let fn;
18585
+ if (arguments.length < 2) {
18586
+ return;
18587
+ } else if (arguments.length === 2) {
18588
+ fn = arg2;
18589
+ } else if (arguments.length === 3) {
18590
+ opts = arg2;
18591
+ fn = arg3;
18592
+ } else {
18593
+ opts = arg2;
18594
+ ctx = arg3;
18595
+ fn = arg4;
18596
+ }
18597
+ const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
18598
+ const span = this.startSpan(name, opts, parentContext);
18599
+ const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
18600
+ return contextApi.with(contextWithSpanSet, fn, undefined, span);
18601
+ }
18602
+ }
18603
+ exports.NoopTracer = NoopTracer;
18604
+ function isSpanContext(spanContext) {
18605
+ 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";
18606
+ }
18607
+ });
18608
+
18609
+ // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
18610
+ var require_ProxyTracer = __commonJS((exports) => {
18611
+ Object.defineProperty(exports, "__esModule", { value: true });
18612
+ exports.ProxyTracer = undefined;
18613
+ var NoopTracer_1 = require_NoopTracer();
18614
+ var NOOP_TRACER = new NoopTracer_1.NoopTracer;
18615
+
18616
+ class ProxyTracer {
18617
+ constructor(provider, name, version2, options) {
18618
+ this._provider = provider;
18619
+ this.name = name;
18620
+ this.version = version2;
18621
+ this.options = options;
18622
+ }
18623
+ startSpan(name, options, context) {
18624
+ return this._getTracer().startSpan(name, options, context);
18625
+ }
18626
+ startActiveSpan(_name, _options, _context, _fn) {
18627
+ const tracer = this._getTracer();
18628
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
18629
+ }
18630
+ _getTracer() {
18631
+ if (this._delegate) {
18632
+ return this._delegate;
18633
+ }
18634
+ const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
18635
+ if (!tracer) {
18636
+ return NOOP_TRACER;
18637
+ }
18638
+ this._delegate = tracer;
18639
+ return this._delegate;
18640
+ }
18641
+ }
18642
+ exports.ProxyTracer = ProxyTracer;
18643
+ });
18644
+
18645
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
18646
+ var require_NoopTracerProvider = __commonJS((exports) => {
18647
+ Object.defineProperty(exports, "__esModule", { value: true });
18648
+ exports.NoopTracerProvider = undefined;
18649
+ var NoopTracer_1 = require_NoopTracer();
18650
+
18651
+ class NoopTracerProvider {
18652
+ getTracer(_name, _version, _options) {
18653
+ return new NoopTracer_1.NoopTracer;
18654
+ }
18655
+ }
18656
+ exports.NoopTracerProvider = NoopTracerProvider;
18657
+ });
18658
+
18659
+ // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
18660
+ var require_ProxyTracerProvider = __commonJS((exports) => {
18661
+ Object.defineProperty(exports, "__esModule", { value: true });
18662
+ exports.ProxyTracerProvider = undefined;
18663
+ var ProxyTracer_1 = require_ProxyTracer();
18664
+ var NoopTracerProvider_1 = require_NoopTracerProvider();
18665
+ var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
18666
+
18667
+ class ProxyTracerProvider {
18668
+ getTracer(name, version2, options) {
18669
+ var _a3;
18670
+ return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
18671
+ }
18672
+ getDelegate() {
18673
+ var _a3;
18674
+ return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
18675
+ }
18676
+ setDelegate(delegate) {
18677
+ this._delegate = delegate;
18678
+ }
18679
+ getDelegateTracer(name, version2, options) {
18680
+ var _a3;
18681
+ return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
18682
+ }
18683
+ }
18684
+ exports.ProxyTracerProvider = ProxyTracerProvider;
18685
+ });
18686
+
18687
+ // ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
18688
+ var require_SamplingResult = __commonJS((exports) => {
18689
+ Object.defineProperty(exports, "__esModule", { value: true });
18690
+ exports.SamplingDecision = undefined;
18691
+ var SamplingDecision;
18692
+ (function(SamplingDecision2) {
18693
+ SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
18694
+ SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
18695
+ SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
18696
+ })(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
18697
+ });
18698
+
18699
+ // ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
18700
+ var require_span_kind = __commonJS((exports) => {
18701
+ Object.defineProperty(exports, "__esModule", { value: true });
18702
+ exports.SpanKind = undefined;
18703
+ var SpanKind;
18704
+ (function(SpanKind2) {
18705
+ SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
18706
+ SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
18707
+ SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
18708
+ SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
18709
+ SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
18710
+ })(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
18711
+ });
18712
+
18713
+ // ../../node_modules/@opentelemetry/api/build/src/trace/status.js
18714
+ var require_status = __commonJS((exports) => {
18715
+ Object.defineProperty(exports, "__esModule", { value: true });
18716
+ exports.SpanStatusCode = undefined;
18717
+ var SpanStatusCode;
18718
+ (function(SpanStatusCode2) {
18719
+ SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
18720
+ SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
18721
+ SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
18722
+ })(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
18723
+ });
18724
+
18725
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
18726
+ var require_tracestate_validators = __commonJS((exports) => {
18727
+ Object.defineProperty(exports, "__esModule", { value: true });
18728
+ exports.validateValue = exports.validateKey = undefined;
18729
+ var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
18730
+ var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
18731
+ var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
18732
+ var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
18733
+ var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
18734
+ var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
18735
+ function validateKey(key) {
18736
+ return VALID_KEY_REGEX.test(key);
18737
+ }
18738
+ exports.validateKey = validateKey;
18739
+ function validateValue(value) {
18740
+ return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
18741
+ }
18742
+ exports.validateValue = validateValue;
18743
+ });
18744
+
18745
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
18746
+ var require_tracestate_impl = __commonJS((exports) => {
18747
+ Object.defineProperty(exports, "__esModule", { value: true });
18748
+ exports.TraceStateImpl = undefined;
18749
+ var tracestate_validators_1 = require_tracestate_validators();
18750
+ var MAX_TRACE_STATE_ITEMS = 32;
18751
+ var MAX_TRACE_STATE_LEN = 512;
18752
+ var LIST_MEMBERS_SEPARATOR = ",";
18753
+ var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
18754
+
18755
+ class TraceStateImpl {
18756
+ constructor(rawTraceState) {
18757
+ this._internalState = new Map;
18758
+ if (rawTraceState)
18759
+ this._parse(rawTraceState);
18760
+ }
18761
+ set(key, value) {
18762
+ const traceState = this._clone();
18763
+ if (traceState._internalState.has(key)) {
18764
+ traceState._internalState.delete(key);
18765
+ }
18766
+ traceState._internalState.set(key, value);
18767
+ return traceState;
18768
+ }
18769
+ unset(key) {
18770
+ const traceState = this._clone();
18771
+ traceState._internalState.delete(key);
18772
+ return traceState;
18773
+ }
18774
+ get(key) {
18775
+ return this._internalState.get(key);
18776
+ }
18777
+ serialize() {
18778
+ return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
18779
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
18780
+ return agg;
18781
+ }, []).join(LIST_MEMBERS_SEPARATOR);
18782
+ }
18783
+ _parse(rawTraceState) {
18784
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN)
18785
+ return;
18786
+ this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
18787
+ const listMember = part.trim();
18788
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
18789
+ if (i !== -1) {
18790
+ const key = listMember.slice(0, i);
18791
+ const value = listMember.slice(i + 1, part.length);
18792
+ if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
18793
+ agg.set(key, value);
18794
+ }
18795
+ }
18796
+ return agg;
18797
+ }, new Map);
18798
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
18799
+ this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
18800
+ }
18801
+ }
18802
+ _keys() {
18803
+ return Array.from(this._internalState.keys()).reverse();
18804
+ }
18805
+ _clone() {
18806
+ const traceState = new TraceStateImpl;
18807
+ traceState._internalState = new Map(this._internalState);
18808
+ return traceState;
18809
+ }
18810
+ }
18811
+ exports.TraceStateImpl = TraceStateImpl;
18812
+ });
18813
+
18814
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
18815
+ var require_utils2 = __commonJS((exports) => {
18816
+ Object.defineProperty(exports, "__esModule", { value: true });
18817
+ exports.createTraceState = undefined;
18818
+ var tracestate_impl_1 = require_tracestate_impl();
18819
+ function createTraceState(rawTraceState) {
18820
+ return new tracestate_impl_1.TraceStateImpl(rawTraceState);
18821
+ }
18822
+ exports.createTraceState = createTraceState;
18823
+ });
18824
+
18825
+ // ../../node_modules/@opentelemetry/api/build/src/context-api.js
18826
+ var require_context_api = __commonJS((exports) => {
18827
+ Object.defineProperty(exports, "__esModule", { value: true });
18828
+ exports.context = undefined;
18829
+ var context_1 = require_context2();
18830
+ exports.context = context_1.ContextAPI.getInstance();
18831
+ });
18832
+
18833
+ // ../../node_modules/@opentelemetry/api/build/src/diag-api.js
18834
+ var require_diag_api = __commonJS((exports) => {
18835
+ Object.defineProperty(exports, "__esModule", { value: true });
18836
+ exports.diag = undefined;
18837
+ var diag_1 = require_diag();
18838
+ exports.diag = diag_1.DiagAPI.instance();
18839
+ });
18840
+
18841
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
18842
+ var require_NoopMeterProvider = __commonJS((exports) => {
18843
+ Object.defineProperty(exports, "__esModule", { value: true });
18844
+ exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
18845
+ var NoopMeter_1 = require_NoopMeter();
18846
+
18847
+ class NoopMeterProvider {
18848
+ getMeter(_name, _version, _options) {
18849
+ return NoopMeter_1.NOOP_METER;
18850
+ }
18851
+ }
18852
+ exports.NoopMeterProvider = NoopMeterProvider;
18853
+ exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
18854
+ });
18855
+
18856
+ // ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
18857
+ var require_metrics = __commonJS((exports) => {
18858
+ Object.defineProperty(exports, "__esModule", { value: true });
18859
+ exports.MetricsAPI = undefined;
18860
+ var NoopMeterProvider_1 = require_NoopMeterProvider();
18861
+ var global_utils_1 = require_global_utils();
18862
+ var diag_1 = require_diag();
18863
+ var API_NAME = "metrics";
18864
+
18865
+ class MetricsAPI {
18866
+ constructor() {}
18867
+ static getInstance() {
18868
+ if (!this._instance) {
18869
+ this._instance = new MetricsAPI;
18870
+ }
18871
+ return this._instance;
18872
+ }
18873
+ setGlobalMeterProvider(provider) {
18874
+ return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
18875
+ }
18876
+ getMeterProvider() {
18877
+ return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
18878
+ }
18879
+ getMeter(name, version2, options) {
18880
+ return this.getMeterProvider().getMeter(name, version2, options);
18881
+ }
18882
+ disable() {
18883
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18884
+ }
18885
+ }
18886
+ exports.MetricsAPI = MetricsAPI;
18887
+ });
18888
+
18889
+ // ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
18890
+ var require_metrics_api = __commonJS((exports) => {
18891
+ Object.defineProperty(exports, "__esModule", { value: true });
18892
+ exports.metrics = undefined;
18893
+ var metrics_1 = require_metrics();
18894
+ exports.metrics = metrics_1.MetricsAPI.getInstance();
18895
+ });
18896
+
18897
+ // ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
18898
+ var require_NoopTextMapPropagator = __commonJS((exports) => {
18899
+ Object.defineProperty(exports, "__esModule", { value: true });
18900
+ exports.NoopTextMapPropagator = undefined;
18901
+
18902
+ class NoopTextMapPropagator {
18903
+ inject(_context, _carrier) {}
18904
+ extract(context, _carrier) {
18905
+ return context;
18906
+ }
18907
+ fields() {
18908
+ return [];
18909
+ }
18910
+ }
18911
+ exports.NoopTextMapPropagator = NoopTextMapPropagator;
18912
+ });
18913
+
18914
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
18915
+ var require_context_helpers = __commonJS((exports) => {
18916
+ Object.defineProperty(exports, "__esModule", { value: true });
18917
+ exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
18918
+ var context_1 = require_context2();
18919
+ var context_2 = require_context();
18920
+ var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
18921
+ function getBaggage(context) {
18922
+ return context.getValue(BAGGAGE_KEY) || undefined;
18923
+ }
18924
+ exports.getBaggage = getBaggage;
18925
+ function getActiveBaggage() {
18926
+ return getBaggage(context_1.ContextAPI.getInstance().active());
18927
+ }
18928
+ exports.getActiveBaggage = getActiveBaggage;
18929
+ function setBaggage(context, baggage) {
18930
+ return context.setValue(BAGGAGE_KEY, baggage);
18931
+ }
18932
+ exports.setBaggage = setBaggage;
18933
+ function deleteBaggage(context) {
18934
+ return context.deleteValue(BAGGAGE_KEY);
18935
+ }
18936
+ exports.deleteBaggage = deleteBaggage;
18937
+ });
18938
+
18939
+ // ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
18940
+ var require_propagation = __commonJS((exports) => {
18941
+ Object.defineProperty(exports, "__esModule", { value: true });
18942
+ exports.PropagationAPI = undefined;
18943
+ var global_utils_1 = require_global_utils();
18944
+ var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
18945
+ var TextMapPropagator_1 = require_TextMapPropagator();
18946
+ var context_helpers_1 = require_context_helpers();
18947
+ var utils_1 = require_utils();
18948
+ var diag_1 = require_diag();
18949
+ var API_NAME = "propagation";
18950
+ var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
18951
+
18952
+ class PropagationAPI {
18953
+ constructor() {
18954
+ this.createBaggage = utils_1.createBaggage;
18955
+ this.getBaggage = context_helpers_1.getBaggage;
18956
+ this.getActiveBaggage = context_helpers_1.getActiveBaggage;
18957
+ this.setBaggage = context_helpers_1.setBaggage;
18958
+ this.deleteBaggage = context_helpers_1.deleteBaggage;
18959
+ }
18960
+ static getInstance() {
18961
+ if (!this._instance) {
18962
+ this._instance = new PropagationAPI;
18963
+ }
18964
+ return this._instance;
18965
+ }
18966
+ setGlobalPropagator(propagator) {
18967
+ return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
18968
+ }
18969
+ inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
18970
+ return this._getGlobalPropagator().inject(context, carrier, setter);
18971
+ }
18972
+ extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
18973
+ return this._getGlobalPropagator().extract(context, carrier, getter);
18974
+ }
18975
+ fields() {
18976
+ return this._getGlobalPropagator().fields();
18977
+ }
18978
+ disable() {
18979
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18980
+ }
18981
+ _getGlobalPropagator() {
18982
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
18983
+ }
18984
+ }
18985
+ exports.PropagationAPI = PropagationAPI;
18986
+ });
18987
+
18988
+ // ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
18989
+ var require_propagation_api = __commonJS((exports) => {
18990
+ Object.defineProperty(exports, "__esModule", { value: true });
18991
+ exports.propagation = undefined;
18992
+ var propagation_1 = require_propagation();
18993
+ exports.propagation = propagation_1.PropagationAPI.getInstance();
18994
+ });
18995
+
18996
+ // ../../node_modules/@opentelemetry/api/build/src/api/trace.js
18997
+ var require_trace = __commonJS((exports) => {
18998
+ Object.defineProperty(exports, "__esModule", { value: true });
18999
+ exports.TraceAPI = undefined;
19000
+ var global_utils_1 = require_global_utils();
19001
+ var ProxyTracerProvider_1 = require_ProxyTracerProvider();
19002
+ var spancontext_utils_1 = require_spancontext_utils();
19003
+ var context_utils_1 = require_context_utils();
19004
+ var diag_1 = require_diag();
19005
+ var API_NAME = "trace";
19006
+
19007
+ class TraceAPI {
19008
+ constructor() {
19009
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
19010
+ this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
19011
+ this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
19012
+ this.deleteSpan = context_utils_1.deleteSpan;
19013
+ this.getSpan = context_utils_1.getSpan;
19014
+ this.getActiveSpan = context_utils_1.getActiveSpan;
19015
+ this.getSpanContext = context_utils_1.getSpanContext;
19016
+ this.setSpan = context_utils_1.setSpan;
19017
+ this.setSpanContext = context_utils_1.setSpanContext;
19018
+ }
19019
+ static getInstance() {
19020
+ if (!this._instance) {
19021
+ this._instance = new TraceAPI;
19022
+ }
19023
+ return this._instance;
19024
+ }
19025
+ setGlobalTracerProvider(provider) {
19026
+ const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
19027
+ if (success3) {
19028
+ this._proxyTracerProvider.setDelegate(provider);
19029
+ }
19030
+ return success3;
19031
+ }
19032
+ getTracerProvider() {
19033
+ return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
19034
+ }
19035
+ getTracer(name, version2) {
19036
+ return this.getTracerProvider().getTracer(name, version2);
19037
+ }
19038
+ disable() {
19039
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
19040
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
19041
+ }
19042
+ }
19043
+ exports.TraceAPI = TraceAPI;
19044
+ });
19045
+
19046
+ // ../../node_modules/@opentelemetry/api/build/src/trace-api.js
19047
+ var require_trace_api = __commonJS((exports) => {
19048
+ Object.defineProperty(exports, "__esModule", { value: true });
19049
+ exports.trace = undefined;
19050
+ var trace_1 = require_trace();
19051
+ exports.trace = trace_1.TraceAPI.getInstance();
19052
+ });
19053
+
19054
+ // ../../node_modules/@opentelemetry/api/build/src/index.js
19055
+ var require_src = __commonJS((exports) => {
19056
+ Object.defineProperty(exports, "__esModule", { value: true });
19057
+ 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;
19058
+ var utils_1 = require_utils();
19059
+ Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
19060
+ return utils_1.baggageEntryMetadataFromString;
19061
+ } });
19062
+ var context_1 = require_context();
19063
+ Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
19064
+ return context_1.createContextKey;
19065
+ } });
19066
+ Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
19067
+ return context_1.ROOT_CONTEXT;
19068
+ } });
19069
+ var consoleLogger_1 = require_consoleLogger();
19070
+ Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
19071
+ return consoleLogger_1.DiagConsoleLogger;
19072
+ } });
19073
+ var types_1 = require_types();
19074
+ Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
19075
+ return types_1.DiagLogLevel;
19076
+ } });
19077
+ var NoopMeter_1 = require_NoopMeter();
19078
+ Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
19079
+ return NoopMeter_1.createNoopMeter;
19080
+ } });
19081
+ var Metric_1 = require_Metric();
19082
+ Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
19083
+ return Metric_1.ValueType;
19084
+ } });
19085
+ var TextMapPropagator_1 = require_TextMapPropagator();
19086
+ Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
19087
+ return TextMapPropagator_1.defaultTextMapGetter;
19088
+ } });
19089
+ Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
19090
+ return TextMapPropagator_1.defaultTextMapSetter;
19091
+ } });
19092
+ var ProxyTracer_1 = require_ProxyTracer();
19093
+ Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
19094
+ return ProxyTracer_1.ProxyTracer;
19095
+ } });
19096
+ var ProxyTracerProvider_1 = require_ProxyTracerProvider();
19097
+ Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
19098
+ return ProxyTracerProvider_1.ProxyTracerProvider;
19099
+ } });
19100
+ var SamplingResult_1 = require_SamplingResult();
19101
+ Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
19102
+ return SamplingResult_1.SamplingDecision;
19103
+ } });
19104
+ var span_kind_1 = require_span_kind();
19105
+ Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
19106
+ return span_kind_1.SpanKind;
19107
+ } });
19108
+ var status_1 = require_status();
19109
+ Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
19110
+ return status_1.SpanStatusCode;
19111
+ } });
19112
+ var trace_flags_1 = require_trace_flags();
19113
+ Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
19114
+ return trace_flags_1.TraceFlags;
19115
+ } });
19116
+ var utils_2 = require_utils2();
19117
+ Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
19118
+ return utils_2.createTraceState;
19119
+ } });
19120
+ var spancontext_utils_1 = require_spancontext_utils();
19121
+ Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
19122
+ return spancontext_utils_1.isSpanContextValid;
19123
+ } });
19124
+ Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
19125
+ return spancontext_utils_1.isValidTraceId;
19126
+ } });
19127
+ Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
19128
+ return spancontext_utils_1.isValidSpanId;
19129
+ } });
19130
+ var invalid_span_constants_1 = require_invalid_span_constants();
19131
+ Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
19132
+ return invalid_span_constants_1.INVALID_SPANID;
19133
+ } });
19134
+ Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
19135
+ return invalid_span_constants_1.INVALID_TRACEID;
19136
+ } });
19137
+ Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
19138
+ return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
19139
+ } });
19140
+ var context_api_1 = require_context_api();
19141
+ Object.defineProperty(exports, "context", { enumerable: true, get: function() {
19142
+ return context_api_1.context;
19143
+ } });
19144
+ var diag_api_1 = require_diag_api();
19145
+ Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
19146
+ return diag_api_1.diag;
19147
+ } });
19148
+ var metrics_api_1 = require_metrics_api();
19149
+ Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
19150
+ return metrics_api_1.metrics;
19151
+ } });
19152
+ var propagation_api_1 = require_propagation_api();
19153
+ Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
19154
+ return propagation_api_1.propagation;
19155
+ } });
19156
+ var trace_api_1 = require_trace_api();
19157
+ Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
19158
+ return trace_api_1.trace;
19159
+ } });
19160
+ exports.default = {
19161
+ context: context_api_1.context,
19162
+ diag: diag_api_1.diag,
19163
+ metrics: metrics_api_1.metrics,
19164
+ propagation: propagation_api_1.propagation,
19165
+ trace: trace_api_1.trace
19166
+ };
19167
+ });
19168
+
19169
+ // ../types/src/processor/processor.ts
19170
+ var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
19171
+ var init_processor = __esm(() => {
19172
+ init_zod();
19173
+ init_common();
19174
+ import_api = __toESM(require_src(), 1);
19175
+ noopTracingContext = {
19176
+ traceId: "",
19177
+ getActiveSpan() {
19178
+ return;
19179
+ },
19180
+ async withSpan(_name, _options, fn) {
19181
+ const noopSpan = {
19182
+ spanContext: () => ({
19183
+ traceId: "",
19184
+ spanId: "",
19185
+ traceFlags: 0
19186
+ }),
19187
+ setAttribute: () => noopSpan,
19188
+ setAttributes: () => noopSpan,
19189
+ addEvent: () => noopSpan,
19190
+ addLink: () => noopSpan,
19191
+ addLinks: () => noopSpan,
19192
+ setStatus: () => noopSpan,
19193
+ updateName: () => noopSpan,
19194
+ end: () => {},
19195
+ isRecording: () => false,
19196
+ recordException: () => {}
19197
+ };
19198
+ return fn(noopSpan);
19199
+ }
19200
+ };
19201
+ ProcessorPortSchema = exports_external.object({
19202
+ name: exports_external.string(),
19203
+ schema: JsonSchemaSchema,
19204
+ required: exports_external.boolean().default(true)
19205
+ });
19206
+ ProcessorDefinitionSchema = exports_external.object({
19207
+ id: exports_external.string(),
19208
+ name: exports_external.string(),
19209
+ description: exports_external.string().optional(),
19210
+ inputSchema: JsonSchemaSchema,
19211
+ outputSchema: JsonSchemaSchema,
19212
+ configSchema: JsonSchemaSchema.optional(),
19213
+ inputPorts: exports_external.array(ProcessorPortSchema).optional(),
19214
+ outputPorts: exports_external.array(ProcessorPortSchema).optional(),
19215
+ isBuiltin: exports_external.boolean().default(true),
19216
+ pluginName: exports_external.string().optional()
19217
+ });
19218
+ ProcessorExecutionContextSchema = exports_external.object({
19219
+ jobId: exports_external.string(),
19220
+ stepId: exports_external.string(),
19221
+ tenantId: exports_external.string(),
19222
+ automationId: exports_external.string().optional(),
19223
+ workflowId: exports_external.string(),
19224
+ workerId: exports_external.string().optional(),
19225
+ stepExecutionId: exports_external.string().optional()
19226
+ });
19227
+ ((TraceStatus2) => {
19228
+ TraceStatus2["PENDING"] = "pending";
19229
+ TraceStatus2["RUNNING"] = "running";
19230
+ TraceStatus2["COMPLETED"] = "completed";
19231
+ TraceStatus2["FAILED"] = "failed";
19232
+ })(TraceStatus ||= {});
19233
+ });
19234
+
19235
+ // ../types/src/processor/normalize-extract-input.ts
19236
+ function normalizeExtractInputToText(input) {
19237
+ if (typeof input === "string") {
19238
+ return input;
19239
+ }
19240
+ if (input && typeof input === "object") {
19241
+ const obj = input;
19242
+ if (typeof obj.content === "string") {
19243
+ return obj.content;
19244
+ }
19245
+ if (typeof obj.text === "string") {
19246
+ return obj.text;
19247
+ }
19248
+ return JSON.stringify(input, null, 2);
19249
+ }
19250
+ return String(input ?? "");
19251
+ }
19252
+ function extractSourceTextFromResolvedConfig(config2) {
19253
+ if (!config2 || typeof config2 !== "object")
19254
+ return null;
19255
+ if (typeof config2.content === "string") {
19256
+ return normalizeExtractInputToText({ content: config2.content });
19257
+ }
19258
+ if (typeof config2.text === "string") {
19259
+ return normalizeExtractInputToText({ text: config2.text });
19260
+ }
19261
+ if (typeof config2.input === "string") {
19262
+ return normalizeExtractInputToText({ content: config2.input });
19263
+ }
19264
+ if (config2.input !== null && config2.input !== undefined) {
19265
+ return normalizeExtractInputToText(config2.input);
19266
+ }
19267
+ return null;
19268
+ }
19269
+
19270
+ // ../types/src/processor/grounding.ts
19271
+ function stripGroundingMetadata(value) {
19272
+ if (Array.isArray(value))
19273
+ return value.map(stripGroundingMetadata);
19274
+ if (value && typeof value === "object") {
19275
+ const out = {};
19276
+ for (const [k, v] of Object.entries(value)) {
19277
+ if (k === "_grounding")
19278
+ continue;
19279
+ out[k] = stripGroundingMetadata(v);
19280
+ }
19281
+ return out;
19282
+ }
19283
+ return value;
19284
+ }
19285
+
19286
+ // ../types/src/processor/execution.ts
19287
+ function asTuple(values) {
19288
+ return values;
19289
+ }
19290
+ var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
19291
+ var init_execution = __esm(() => {
19292
+ init_zod();
19293
+ WorkflowExecutionStatusValue = {
19294
+ CREATED: "created",
19295
+ PENDING: "pending",
19296
+ RUNNING: "running",
19297
+ WAITING: "waiting",
19298
+ COMPLETED: "completed",
19299
+ FAILED: "failed",
19300
+ CANCELLED: "cancelled"
19301
+ };
19302
+ WorkflowExecutionStatusSchema = exports_external.enum([
19303
+ WorkflowExecutionStatusValue.CREATED,
19304
+ WorkflowExecutionStatusValue.PENDING,
19305
+ WorkflowExecutionStatusValue.RUNNING,
19306
+ WorkflowExecutionStatusValue.WAITING,
19307
+ WorkflowExecutionStatusValue.COMPLETED,
19308
+ WorkflowExecutionStatusValue.FAILED,
19309
+ WorkflowExecutionStatusValue.CANCELLED
19310
+ ]);
19311
+ StepExecutionStatusValue = {
19312
+ PENDING: "pending",
19313
+ RUNNING: "running",
19314
+ SUCCESS: "success",
19315
+ FAILURE: "failure",
19316
+ WAITING: "waiting",
19317
+ SKIPPED: "skipped"
19318
+ };
19319
+ StepExecutionStatusSchema = exports_external.enum([
19320
+ StepExecutionStatusValue.PENDING,
19321
+ StepExecutionStatusValue.RUNNING,
19322
+ StepExecutionStatusValue.SUCCESS,
19323
+ StepExecutionStatusValue.FAILURE,
19324
+ StepExecutionStatusValue.WAITING,
19325
+ StepExecutionStatusValue.SKIPPED
19326
+ ]);
19327
+ TriggerTypeValue = {
19328
+ MANUAL: "manual",
19329
+ API: "api",
19330
+ WEBHOOK: "webhook",
19331
+ SCHEDULE: "schedule",
19332
+ EMAIL: "email",
19333
+ EVAL: "eval",
19334
+ CLI: "cli"
19335
+ };
19336
+ TriggerTypeSchema = exports_external.enum([
19337
+ TriggerTypeValue.MANUAL,
19338
+ TriggerTypeValue.API,
19339
+ TriggerTypeValue.WEBHOOK,
19340
+ TriggerTypeValue.SCHEDULE,
19341
+ TriggerTypeValue.EMAIL,
19342
+ TriggerTypeValue.EVAL,
19343
+ TriggerTypeValue.CLI
19344
+ ]);
19345
+ ExecutionTypeValue = {
19346
+ PROD: "prod",
19347
+ EVAL: "eval",
19348
+ PLAYGROUND: "playground"
19349
+ };
19350
+ ExecutionTypeSchema = exports_external.enum([
19351
+ ExecutionTypeValue.PROD,
19352
+ ExecutionTypeValue.EVAL,
19353
+ ExecutionTypeValue.PLAYGROUND
19354
+ ]);
19355
+ WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
19356
+ STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
19357
+ TRIGGER_TYPES = TriggerTypeSchema.options;
19358
+ EXECUTION_TYPES = ExecutionTypeSchema.options;
19359
+ });
19360
+
19361
+ // ../types/src/processor/configs/classify.ts
19362
+ var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
19363
+ var init_classify = __esm(() => {
19364
+ init_zod();
19365
+ ClassifyInputSchema = exports_external.object({
19366
+ content: exports_external.string().optional().describe("Text content to classify"),
19367
+ text: exports_external.string().optional().describe("Text content (alternative to content)")
19368
+ }).refine((data) => !!(data.content || data.text), {
19369
+ message: "Either content or text must be provided"
19370
+ });
19371
+ ClassifyLabelSchema = exports_external.object({
19372
+ name: exports_external.string().min(1).describe("Label value returned in output.label"),
19373
+ description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
19374
+ });
19375
+ ClassifyConfigSchema = exports_external.object({
19376
+ labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
19377
+ 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."),
19378
+ provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
19379
+ model: exports_external.string().optional().describe("Model override"),
19380
+ maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
19381
+ });
19382
+ ClassifyOutputSchema = exports_external.object({
19383
+ label: exports_external.string().describe("The selected label name"),
19384
+ confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
19385
+ reason: exports_external.string().describe("Short justification for the chosen label")
19386
+ });
19387
+ });
19388
+
19389
+ // ../types/src/processor/configs/classify-pages.ts
19390
+ var ClassifyPagesInputSchema, ClassifyPagesLabelSchema, ClassifyPagesConfigSchema, ClassifyPagesOutputSchema;
19391
+ var init_classify_pages = __esm(() => {
19392
+ init_zod();
19393
+ ClassifyPagesInputSchema = exports_external.object({
19394
+ pages: exports_external.array(exports_external.object({
19395
+ pageIndex: exports_external.number().int().nonnegative().describe("0-based page index"),
19396
+ text: exports_external.string().describe("Extracted text for this page"),
19397
+ pageName: exports_external.string().optional()
19398
+ })).min(1).describe("Per-page parsed content from a document parser")
19399
+ }).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly.");
19400
+ ClassifyPagesLabelSchema = exports_external.union([
19401
+ exports_external.string().min(1),
19402
+ exports_external.object({
19403
+ name: exports_external.string().min(1),
19404
+ description: exports_external.string().optional()
19405
+ })
19406
+ ]);
19407
+ ClassifyPagesConfigSchema = exports_external.object({
19408
+ labels: exports_external.array(ClassifyPagesLabelSchema).min(1),
19409
+ prompt: exports_external.string().optional(),
19410
+ provider: exports_external.string().optional(),
19411
+ model: exports_external.string().optional(),
19412
+ windowTokenBudget: exports_external.number().int().positive().optional()
19413
+ });
19414
+ ClassifyPagesOutputSchema = exports_external.object({
19415
+ pages: exports_external.array(exports_external.object({
19416
+ pageIndex: exports_external.number().int(),
19417
+ labels: exports_external.array(exports_external.string())
19418
+ })),
19419
+ byLabel: exports_external.record(exports_external.string(), exports_external.array(exports_external.number().int()))
19420
+ });
19421
+ });
19422
+
19423
+ // ../types/src/parser/parser.ts
19424
+ function resolveEffectiveMimeType(filename, declaredMimeType) {
19425
+ const ext = filename.split(".").pop()?.toLowerCase();
19426
+ if (!ext)
19427
+ return declaredMimeType;
19428
+ const extensionMime = EXTENSION_TO_MIME[ext];
19429
+ return extensionMime ?? declaredMimeType;
19430
+ }
19431
+ function mimeTypeForExtension(extension) {
19432
+ return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
19433
+ }
19434
+ function extensionForMimeType(mimeType) {
19435
+ const base = mimeType.split(";")[0]?.trim().toLowerCase();
19436
+ return base ? MIME_TO_EXTENSION[base] : undefined;
19437
+ }
19438
+ function getParserCategory(mimeType) {
19439
+ const normalized = mimeType.toLowerCase().trim();
19440
+ if (ParserCategory.PLAINTEXT.includes(normalized)) {
19441
+ return "plaintext";
19442
+ }
19443
+ if (ParserCategory.OFFICE.includes(normalized)) {
19444
+ return "office";
19445
+ }
19446
+ if (ParserCategory.DOCUMENT.includes(normalized)) {
19447
+ return "document";
19448
+ }
19449
+ return null;
19450
+ }
19451
+ function requiresSpecializedParser(mimeType) {
19452
+ return getParserCategory(mimeType) === "document";
19453
+ }
19454
+ function getAllSupportedMimeTypes() {
19455
+ return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
19456
+ }
19457
+ function getSupportedFormatsLabel() {
19458
+ const allMimes = getAllSupportedMimeTypes();
19459
+ const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
19460
+ return labels.join(", ");
19461
+ }
19462
+ var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, StructuredDocumentSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_EXTENSION, MIME_TO_LABEL;
19463
+ var init_parser = __esm(() => {
19464
+ init_zod();
19465
+ OFFICE_MIME_TYPES = [
19466
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
19467
+ "application/msword",
19468
+ "application/vnd.oasis.opendocument.text",
19469
+ "application/rtf",
19470
+ "text/rtf",
19471
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19472
+ "application/vnd.ms-excel",
19473
+ "application/vnd.ms-excel.sheet.macroenabled.12",
19474
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12",
19475
+ "application/vnd.oasis.opendocument.spreadsheet",
19476
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
19477
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
19478
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12",
19479
+ "application/vnd.ms-powerpoint",
19480
+ "application/vnd.oasis.opendocument.presentation",
19481
+ "message/rfc822",
19482
+ "application/vnd.ms-outlook",
19483
+ "application/epub+zip"
19484
+ ];
19485
+ ParserCategory = {
19486
+ PLAINTEXT: [
19487
+ "text/plain",
19488
+ "text/markdown",
19489
+ "text/csv",
19490
+ "text/tab-separated-values",
19491
+ "text/html",
19492
+ "text/xml",
19493
+ "application/json",
19494
+ "application/x-yaml",
19495
+ "application/toml",
19496
+ "image/svg+xml",
19497
+ "text/x-rst",
19498
+ "text/x-org",
19499
+ "application/x-latex",
19500
+ "application/x-ipynb+json",
19501
+ "application/x-bibtex",
19502
+ "application/docbook+xml",
19503
+ "application/x-fictionbook+xml"
19504
+ ],
19505
+ OFFICE: [...OFFICE_MIME_TYPES],
19506
+ DOCUMENT: [
19507
+ "application/pdf",
19508
+ "image/png",
19509
+ "image/jpeg",
19510
+ "image/webp",
19511
+ "image/tiff",
19512
+ "image/gif",
19513
+ "image/bmp"
19514
+ ]
19515
+ };
19516
+ ParserTypeSchema = exports_external.enum([
19517
+ "plaintext",
19518
+ "office",
19519
+ "llm-vision",
19520
+ "ocr"
19521
+ ]);
19522
+ DocumentMetadataSchema = exports_external.object({
19523
+ filename: exports_external.string(),
19524
+ mimeType: exports_external.string(),
19525
+ size: exports_external.number().describe("File size in bytes"),
19526
+ storageRef: exports_external.string().optional().describe("Storage reference for the original file")
19527
+ });
19528
+ ParseUsageSchema = exports_external.object({
19529
+ pageCount: exports_external.number(),
19530
+ processingTimeMs: exports_external.number().optional()
19531
+ });
19532
+ StructuredDocumentSchema = exports_external.record(exports_external.string(), exports_external.unknown());
19533
+ CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
19534
+ PointSchema = exports_external.object({
19535
+ x: exports_external.number(),
19536
+ y: exports_external.number()
19537
+ });
19538
+ BoundingRegionSchema = exports_external.object({
19539
+ polygon: exports_external.array(PointSchema).min(3),
19540
+ unit: CoordinateUnitSchema,
19541
+ pageIndex: exports_external.number()
19542
+ });
19543
+ PositionedTextSchema = exports_external.object({
19544
+ text: exports_external.string(),
19545
+ confidence: exports_external.number().min(0).max(1).optional(),
19546
+ boundingRegion: BoundingRegionSchema.optional()
19547
+ });
19548
+ TableCellSchema = exports_external.object({
19549
+ content: exports_external.string(),
19550
+ rowIndex: exports_external.number(),
19551
+ columnIndex: exports_external.number(),
19552
+ rowSpan: exports_external.number().default(1),
19553
+ columnSpan: exports_external.number().default(1),
19554
+ boundingRegion: BoundingRegionSchema.optional()
19555
+ });
19556
+ ExtractedTableSchema = exports_external.object({
19557
+ cells: exports_external.array(TableCellSchema),
19558
+ rowCount: exports_external.number(),
19559
+ columnCount: exports_external.number(),
19560
+ boundingRegion: BoundingRegionSchema.optional()
19561
+ });
19562
+ LayoutElementTypeSchema = exports_external.enum([
19563
+ "paragraph",
19564
+ "title",
19565
+ "sectionHeading",
19566
+ "pageHeader",
19567
+ "pageFooter",
19568
+ "pageNumber",
19569
+ "footnote",
19570
+ "table",
19571
+ "figure",
19572
+ "formulaBlock"
19573
+ ]);
19574
+ LayoutElementSchema = exports_external.object({
19575
+ type: LayoutElementTypeSchema,
19576
+ content: exports_external.string(),
19577
+ table: ExtractedTableSchema.optional(),
19578
+ caption: exports_external.string().optional(),
19579
+ figureId: exports_external.string().optional(),
19580
+ boundingRegion: BoundingRegionSchema.optional()
19581
+ });
19582
+ PageResultSchema = exports_external.object({
19583
+ pageIndex: exports_external.number().describe("0-based page index"),
19584
+ text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
19585
+ pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
19586
+ layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
19587
+ words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
19588
+ lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
19589
+ tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
19590
+ width: exports_external.number().optional().describe("Page width"),
19591
+ height: exports_external.number().optional().describe("Page height"),
19592
+ unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
19593
+ confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
19594
+ });
19595
+ ParseResultSchema = exports_external.object({
19596
+ document: DocumentMetadataSchema,
19597
+ usage: ParseUsageSchema,
19598
+ pages: exports_external.array(PageResultSchema),
19599
+ text: exports_external.string().describe("Combined text from all pages"),
19600
+ parserType: ParserTypeSchema,
19601
+ parserVersion: exports_external.string().optional(),
19602
+ model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
19603
+ structured: StructuredDocumentSchema.optional().describe("Canonical structured document with ordered blocks, regions, bounding boxes, tables, figures, and chunks when supported by the parser"),
19604
+ rawResponse: exports_external.unknown().optional()
19605
+ });
19606
+ ParseOptionsSchema = exports_external.object({
19607
+ outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
19608
+ ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
19609
+ includeWordPositions: exports_external.boolean().default(false),
19610
+ includeLinePositions: exports_external.boolean().default(false),
19611
+ extractTables: exports_external.boolean().default(true),
19612
+ provider: exports_external.string().optional().describe("LLM provider ID to use"),
19613
+ model: exports_external.string().optional(),
19614
+ maxConcurrency: exports_external.number().min(1).max(30).default(3),
19615
+ pagesPerBatch: exports_external.number().min(1).max(20).default(5),
19616
+ pdfRenderScale: exports_external.number().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
19617
+ imageQuality: exports_external.number().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
19618
+ prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
19619
+ languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
19620
+ tenantId: exports_external.string().optional()
19621
+ });
19622
+ ParserInputSchema = exports_external.object({
19623
+ data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
19624
+ filename: exports_external.string(),
19625
+ mimeType: exports_external.string(),
19626
+ options: ParseOptionsSchema.optional()
19627
+ });
19628
+ EXTENSION_TO_MIME = {
19629
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
19630
+ doc: "application/msword",
19631
+ odt: "application/vnd.oasis.opendocument.text",
19632
+ rtf: "application/rtf",
19633
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19634
+ xls: "application/vnd.ms-excel",
19635
+ xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
19636
+ xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
19637
+ ods: "application/vnd.oasis.opendocument.spreadsheet",
19638
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
19639
+ ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
19640
+ pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
19641
+ ppt: "application/vnd.ms-powerpoint",
19642
+ odp: "application/vnd.oasis.opendocument.presentation",
19643
+ eml: "message/rfc822",
19644
+ msg: "application/vnd.ms-outlook",
19645
+ epub: "application/epub+zip",
19646
+ pdf: "application/pdf",
19647
+ png: "image/png",
19648
+ jpg: "image/jpeg",
19649
+ jpeg: "image/jpeg",
19650
+ webp: "image/webp",
19651
+ tiff: "image/tiff",
19652
+ tif: "image/tiff",
19653
+ gif: "image/gif",
19654
+ bmp: "image/bmp",
19655
+ svg: "image/svg+xml",
19656
+ txt: "text/plain",
19657
+ md: "text/markdown",
19658
+ markdown: "text/markdown",
19659
+ csv: "text/csv",
19660
+ tsv: "text/tab-separated-values",
19661
+ html: "text/html",
19662
+ htm: "text/html",
19663
+ xml: "text/xml",
19664
+ json: "application/json",
19665
+ yaml: "application/x-yaml",
19666
+ yml: "application/x-yaml",
19667
+ toml: "application/toml",
19668
+ rst: "text/x-rst",
19669
+ org: "text/x-org",
19670
+ tex: "application/x-latex",
19671
+ latex: "application/x-latex",
19672
+ ipynb: "application/x-ipynb+json",
19673
+ bib: "application/x-bibtex",
19674
+ dbk: "application/docbook+xml",
19675
+ docbook: "application/docbook+xml",
19676
+ fb2: "application/x-fictionbook+xml"
19677
+ };
19678
+ MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
19679
+ if (!(mime in acc))
19680
+ acc[mime] = ext;
19681
+ return acc;
19682
+ }, {});
19683
+ MIME_TO_LABEL = {
19684
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
19685
+ "application/msword": "DOC",
19686
+ "application/vnd.oasis.opendocument.text": "ODT",
19687
+ "application/rtf": "RTF",
19688
+ "text/rtf": "RTF",
19689
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
19690
+ "application/vnd.ms-excel": "XLS",
19691
+ "application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
19692
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
19693
+ "application/vnd.oasis.opendocument.spreadsheet": "ODS",
19694
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
19695
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
19696
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
19697
+ "application/vnd.ms-powerpoint": "PPT",
19698
+ "application/vnd.oasis.opendocument.presentation": "ODP",
19699
+ "message/rfc822": "EML",
19700
+ "application/vnd.ms-outlook": "MSG",
19701
+ "application/epub+zip": "EPUB",
19702
+ "application/pdf": "PDF",
19703
+ "image/png": "PNG",
19704
+ "image/jpeg": "JPEG",
19705
+ "image/webp": "WebP",
19706
+ "image/tiff": "TIFF",
19707
+ "image/gif": "GIF",
19708
+ "image/bmp": "BMP",
19709
+ "image/svg+xml": "SVG",
19710
+ "text/plain": "TXT",
19711
+ "text/markdown": "Markdown",
19712
+ "text/csv": "CSV",
19713
+ "text/tab-separated-values": "TSV",
19714
+ "text/html": "HTML",
19715
+ "text/xml": "XML",
19716
+ "application/json": "JSON",
19717
+ "application/x-yaml": "YAML",
19718
+ "application/toml": "TOML",
19719
+ "text/x-rst": "RST",
19720
+ "text/x-org": "Org",
19721
+ "application/x-latex": "LaTeX",
19722
+ "application/x-ipynb+json": "Jupyter",
19723
+ "application/x-bibtex": "BibTeX",
19724
+ "application/docbook+xml": "DocBook",
19725
+ "application/x-fictionbook+xml": "FB2"
19726
+ };
19727
+ });
19728
+
19729
+ // ../types/src/processor/configs/document-parser.ts
19730
+ var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
19731
+ var init_document_parser = __esm(() => {
19732
+ init_zod();
19733
+ init_runtime_file_ref();
19734
+ init_parser();
19735
+ DocumentParserInputSchema = ResolvedProcessorFileSchema;
19736
+ DocumentParserOutputSchema = ParseResultSchema;
19737
+ DocumentParserConfigSchema = exports_external.object({
19738
+ parseMode: exports_external.enum(["ocr", "vision"]).optional().describe("Base parser for PDF/image inputs. OCR is the default."),
19739
+ ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
19740
+ llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
19741
+ figureModel: exports_external.string().optional().describe("Vision model used only for the optional figure-description pass"),
19742
+ maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
19743
+ pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
19744
+ pdfRenderScale: exports_external.number().min(1).max(4).default(1).optional().describe("Scale factor used when rendering PDF pages for VLM parsing"),
19745
+ imageQuality: exports_external.number().int().min(1).max(100).default(85).optional().describe("JPEG quality used for PDF page images sent to VLM parsing"),
19746
+ prompt: exports_external.string().optional().describe("Custom extraction prompt"),
19747
+ nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
19748
+ describeFigures: exports_external.boolean().optional().describe("Opt-in (default off). After text extraction, detect figure pages with a layout model and caption them with a vision model, appending `<figure>description</figure>` to their text. Skipped for plaintext. The caption vision calls are billed."),
19749
+ figureInstructions: exports_external.string().optional().describe("Custom instruction for the figure-description pass."),
19750
+ languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
19751
+ 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.")
19752
+ }).prefault({});
19753
+ });
19754
+
19755
+ // ../types/src/processor/configs/extract.ts
19756
+ var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
19757
+ var init_extract = __esm(() => {
19758
+ init_zod();
19759
+ ExtractInputSchema = exports_external.object({
19760
+ content: exports_external.string().optional().describe("Text content to extract from"),
19761
+ text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
19762
+ contentType: exports_external.enum(["text", "image"]).default("text"),
19763
+ imageData: exports_external.string().optional(),
19764
+ imageMimeType: exports_external.string().optional()
19765
+ }).refine((data) => data.content || data.text, {
19766
+ message: "Either content or text must be provided"
19767
+ });
19768
+ ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema. Unless grounding is disabled (grounded: false), the output also carries a reserved `_grounding` map keyed by field name: `_grounding.<field> = { confidence: high|medium|low, needsReview, reason?, source_span: { start, end, text, alignment } | null }`, plus reserved `_degraded: true` / `_reason` markers when the grounding LLM pass could not run.");
19769
+ ExtractConfigSchema = exports_external.object({
19770
+ schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
19771
+ prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
19772
+ provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
19773
+ model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
19774
+ maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
19775
+ grounded: exports_external.boolean().optional().describe("Grounding is ON by default: a grounding pass runs over the schema fields and attaches per-field source spans + confidence under a reserved `_grounding` output key, flagging fields whose value cannot be located in the source for human review. The pass runs through the workspace LLM (any provider) and chunks long documents automatically. Tri-state: unset (default) = on, degrading gracefully to deterministic text alignment (`_grounding._degraded: true`) if no grounding model is available; `true` = strict, the step fails when the grounding model cannot be resolved; `false` = off, no `_grounding` key at all."),
19776
+ groundingModel: exports_external.string().optional().describe("Provider/model for the grounding pass. Defaults to the workspace default LLM. Any configured provider works; the pass only fails the step when `grounded: true` is set explicitly and no model resolves."),
19777
+ groundingExamples: exports_external.array(exports_external.object({
19778
+ text: exports_external.string(),
19779
+ extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
19780
+ })).optional().describe("Few-shot examples for grounding (verbatim source text per field). Optional."),
19781
+ reviewOn: exports_external.enum(["medium_or_low", "low_only"]).optional().describe("Which grounding confidences set needsReview on a field. Default: low_only (only fields whose value could not be located in the source). Use medium_or_low to also flag approximate and derived matches.")
19782
+ });
19783
+ });
19784
+
19785
+ // ../types/src/processor/configs/merge.ts
19786
+ var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
19787
+ var init_merge = __esm(() => {
19788
+ init_zod();
19789
+ MergeConfigSchema = exports_external.object({
19790
+ preservePortNames: exports_external.boolean().default(true),
19791
+ outputKey: exports_external.string().optional()
19792
+ });
19793
+ MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
19794
+ MergeOutputSchema = exports_external.object({
19795
+ items: exports_external.array(exports_external.unknown()),
19796
+ count: exports_external.number(),
19797
+ merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
19798
+ });
19799
+ });
19800
+
19801
+ // ../types/src/processor/configs/pdf-embedder.ts
19802
+ var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
19803
+ var init_pdf_embedder = __esm(() => {
19804
+ init_zod();
19805
+ init_runtime_file_ref();
19806
+ init_parser();
19807
+ PdfEmbedderInputSchema = exports_external.object({
19808
+ file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
19809
+ parseResult: exports_external.object({
19810
+ pages: exports_external.array(PageResultSchema),
19811
+ text: exports_external.string().optional()
19812
+ }).describe("Parse result from ai.parse step (must include word positions)")
19813
+ });
19814
+ PdfEmbedderOutputSchema = exports_external.object({
19815
+ fileId: exports_external.string().describe("File ID from files table"),
19816
+ pageCount: exports_external.number().describe("Number of pages in the output PDF"),
19817
+ wordCount: exports_external.number().describe("Number of words embedded"),
19818
+ text: exports_external.string().describe("Extracted text (from parse step)")
19819
+ });
19820
+ PdfEmbedderConfigSchema = exports_external.object({
19821
+ outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
19822
+ 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")
19823
+ }).prefault({});
19824
+ });
19825
+
19826
+ // ../types/src/processor/configs/segment.ts
19827
+ var SegmentInputSchema, SEGMENT_UNKNOWN_TYPE = "unknown", SegmentConfigSchema, ConfidenceLevelSchema, SegmentSummarySchema, SegmentOutputSchema;
19828
+ var init_segment = __esm(() => {
19829
+ init_zod();
19830
+ SegmentInputSchema = exports_external.object({
19831
+ pages: exports_external.array(exports_external.object({
19832
+ pageIndex: exports_external.number().describe("0-based page index"),
19833
+ text: exports_external.string().describe("Extracted text for this page"),
19834
+ pageName: exports_external.string().optional()
19835
+ })).min(1).describe("Per-page parsed content from a document parser")
19836
+ }).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
19837
+ SegmentConfigSchema = exports_external.object({
19838
+ documentTypes: exports_external.array(exports_external.object({
19839
+ name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo").'),
19840
+ description: exports_external.string().optional().describe("What this document type looks like — headings, layout, vocabulary, and the visual cues that mark its FIRST page. Fed to the LLM as guidance for both boundary detection and typing.")
19841
+ })).min(1).describe('The document-type taxonomy. The LLM tags each detected document with one of these names, or the reserved "unknown" type when none fit.'),
19842
+ rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
19843
+ 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.'),
19844
+ windowTokenBudget: exports_external.number().int().positive().optional().describe("Per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000. Smaller windows give sharper boundaries on dense batches; larger windows when documents routinely exceed the per-window page count.")
19845
+ });
19846
+ 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.");
19847
+ SegmentSummarySchema = exports_external.object({
19848
+ total: exports_external.number().int().describe("Total documents discovered in the batch."),
19849
+ labelled: exports_external.number().int().describe('Documents assigned a known taxonomy type (type !== "unknown").'),
19850
+ unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type === "unknown") — escalate to a human.'),
19851
+ lowConfidence: exports_external.number().int().describe('Documents whose boundary/type confidence is "low" — also worth human review.'),
19852
+ byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe('Per-type document counts, keyed by type name (includes "unknown").'),
19853
+ needsReview: exports_external.array(exports_external.object({
19854
+ index: exports_external.number().int(),
19855
+ type: exports_external.string(),
19856
+ page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
19857
+ reason: exports_external.enum(["unlabelled", "low_confidence"]).describe("Why this document should be escalated to a human operator."),
19858
+ notes: exports_external.string()
19859
+ })).describe("The exact documents to escalate to a human operator, with the reason for each.")
19860
+ });
19861
+ SegmentOutputSchema = exports_external.object({
19862
+ summary: SegmentSummarySchema.describe("Batch-level escalation summary: labelled vs unlabelled counts and the documents needing human review."),
19863
+ documents: exports_external.array(exports_external.object({
19864
+ index: exports_external.number().int().describe("0-based position of this document in the batch, in page order."),
19865
+ type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown" when none fit.'),
19866
+ page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("Inclusive [startPage, endPage], 0-based, matching input pageIndex."),
19867
+ confidence: ConfidenceLevelSchema.describe("LLM confidence at the document boundary + type: low | medium | high."),
19868
+ notes: exports_external.string().describe("Short prose citing what marked this page as a new document."),
19869
+ evidence: exports_external.object({
19870
+ start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
19871
+ start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
19872
+ }).optional().describe("Structured start evidence — for downstream parsing without regex over `notes`."),
19873
+ text: exports_external.string().describe("Joined per-page text for this document, ready for ai.extract"),
19874
+ pages: exports_external.array(exports_external.object({
19875
+ pageIndex: exports_external.number().int(),
19876
+ text: exports_external.string(),
19877
+ pageName: exports_external.string().optional(),
19878
+ source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM boundary (direct evidence) or filled in by continuity")
19879
+ })).describe("Raw per-page records covered by this document, in page order."),
19880
+ pages_anchored: exports_external.array(exports_external.number().int()),
19881
+ pages_inferred: exports_external.array(exports_external.number().int())
19882
+ }))
19883
+ });
19884
+ });
19885
+
19886
+ // ../types/src/processor/configs/split.ts
19887
+ var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema2, SplitSectionSchema, SplitOutputSchema;
19888
+ var init_split = __esm(() => {
19889
+ init_zod();
19890
+ SplitInputSchema = exports_external.object({
19891
+ pages: exports_external.array(exports_external.object({
19892
+ pageIndex: exports_external.number().describe("0-based page index"),
19893
+ text: exports_external.string().describe("Extracted text for this page"),
19894
+ pageName: exports_external.string().optional()
19895
+ })).min(1).describe("Per-page parsed content from a document parser")
19896
+ }).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
19897
+ SplitConfigSchema = exports_external.object({
19898
+ sections: exports_external.array(exports_external.object({
19899
+ name: exports_external.string().min(1).describe("Stable id for the section"),
19900
+ 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."),
19901
+ 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").'),
19902
+ 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.')
19903
+ })).min(1),
19904
+ rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
19905
+ 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.'),
19906
+ 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.")
19907
+ });
19908
+ ConfidenceLevelSchema2 = exports_external.enum(["low", "medium", "high"]).describe("LLM confidence as a coarse enum. Numeric (0..1) confidences cluster at 0.85–0.95 and gradations are noise; low/medium/high is reliable.");
19909
+ SplitSectionSchema = exports_external.object({
19910
+ name: exports_external.string(),
19911
+ page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
19912
+ confidence: ConfidenceLevelSchema2.describe("LLM confidence at the start anchor: low | medium | high."),
19913
+ notes: exports_external.string(),
19914
+ evidence: exports_external.object({
19915
+ start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
19916
+ start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
19917
+ }).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
19918
+ end_evidence: exports_external.object({
19919
+ end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
19920
+ confidence: ConfidenceLevelSchema2,
19921
+ 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.")
19922
+ }).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)."),
19923
+ text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
19924
+ pages: exports_external.array(exports_external.object({
19925
+ pageIndex: exports_external.number().int(),
19926
+ text: exports_external.string(),
19927
+ pageName: exports_external.string().optional(),
19928
+ source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
19929
+ })).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."),
19930
+ pages_anchored: exports_external.array(exports_external.number().int()),
19931
+ pages_inferred: exports_external.array(exports_external.number().int())
19932
+ });
19933
+ SplitOutputSchema = exports_external.object({
19934
+ splits: exports_external.array(SplitSectionSchema),
19935
+ sections: exports_external.record(exports_external.string(), SplitSectionSchema).describe("The same sections keyed by their config name, for direct reference: `steps.<split>.output.sections.<name>.page_range`. On the rare duplicate name, the last section wins; use `splits` for the full ordered list.")
19936
+ });
19937
+ });
19938
+
19939
+ // ../types/src/processor/configs/template.ts
19940
+ var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
19941
+ var init_template = __esm(() => {
19942
+ init_zod();
19943
+ TemplateInputSchema = exports_external.object({
19944
+ data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
19945
+ });
19946
+ TemplateOutputSchema = exports_external.object({
19947
+ fileId: exports_external.string().describe("File ID from files table")
19948
+ });
19949
+ TemplateConfigSchema = exports_external.object({
19950
+ templateId: exports_external.string().describe("ID of the template from templates table"),
19951
+ outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
19952
+ highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
19953
+ notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
19954
+ });
19955
+ });
19956
+
19957
+ // ../types/src/processor/configs/xlsx-to-json.ts
19958
+ var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
19959
+ var init_xlsx_to_json = __esm(() => {
19960
+ init_zod();
19961
+ init_runtime_file_ref();
19962
+ XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
19963
+ XlsxToJsonOutputSchema = exports_external.object({
19964
+ rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
19965
+ fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
19966
+ });
19967
+ XlsxToJsonConfigSchema = exports_external.object({
19968
+ sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
19969
+ outputCsv: exports_external.boolean().default(false).optional(),
19970
+ outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
19971
+ });
19972
+ });
19973
+
19974
+ // ../types/src/processor/configs/react-hook-form.ts
19975
+ function extractFieldMetadata(schema) {
19976
+ const fields = [];
19977
+ let inner = schema;
19978
+ while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
19979
+ inner = inner.unwrap();
19980
+ }
19981
+ if (inner instanceof exports_external.ZodObject) {
19982
+ for (const [name, fieldSchema] of Object.entries(inner.shape)) {
19983
+ fields.push(extractSingleFieldMetadata(name, fieldSchema));
19984
+ }
19985
+ }
19986
+ return fields;
19987
+ }
19988
+ function extractSingleFieldMetadata(name, schema) {
19989
+ let current = schema;
19990
+ let required2 = true;
19991
+ let defaultValue = undefined;
19992
+ let description = current.description;
19993
+ while (true) {
19994
+ if (current instanceof exports_external.ZodOptional) {
19995
+ required2 = false;
19996
+ current = current.unwrap();
19997
+ } else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
19998
+ defaultValue = current._def.defaultValue;
19999
+ current = current.unwrap();
20000
+ } else {
20001
+ break;
20002
+ }
20003
+ description ??= current.description;
20004
+ }
20005
+ const base = { name, type: "unknown", required: required2, description, defaultValue };
20006
+ if (current instanceof exports_external.ZodString)
20007
+ return { ...base, type: "string" };
20008
+ if (current instanceof exports_external.ZodNumber) {
20009
+ let min;
20010
+ let max;
20011
+ for (const c of current._def.checks ?? []) {
20012
+ const def = c._zod.def;
20013
+ if (def.check === "greater_than")
20014
+ min = def.value;
20015
+ if (def.check === "less_than")
20016
+ max = def.value;
20017
+ }
20018
+ return { ...base, type: "number", min, max };
20019
+ }
20020
+ if (current instanceof exports_external.ZodBoolean)
20021
+ return { ...base, type: "boolean" };
20022
+ if (current instanceof exports_external.ZodEnum) {
20023
+ return { ...base, type: "enum", enumValues: current.options };
20024
+ }
20025
+ if (current instanceof exports_external.ZodArray)
20026
+ return { ...base, type: "array" };
20027
+ if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
20028
+ return { ...base, type: "object" };
20029
+ }
20030
+ return base;
20031
+ }
20032
+ function getConfigFieldMetadata(processorId) {
20033
+ const schema = getConfigSchema(processorId);
20034
+ if (!schema)
20035
+ return;
20036
+ return extractFieldMetadata(schema);
20037
+ }
20038
+ function getConfigDefaults(processorId) {
20039
+ const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
20040
+ if (!schema)
20041
+ return {};
20042
+ try {
20043
+ const result = schema.safeParse({});
20044
+ if (result.success) {
20045
+ return result.data;
20046
+ }
20047
+ } catch {}
20048
+ const fields = extractFieldMetadata(schema);
20049
+ const defaults = {};
20050
+ for (const field of fields) {
20051
+ if (field.defaultValue !== undefined) {
20052
+ defaults[field.name] = field.defaultValue;
20053
+ }
20054
+ }
20055
+ return defaults;
20056
+ }
20057
+ function validateConfig(processorId, config2) {
20058
+ const schema = getConfigSchema(processorId);
20059
+ if (!schema) {
20060
+ return { valid: true, errors: {} };
20061
+ }
20062
+ const result = schema.safeParse(config2);
20063
+ if (result.success) {
20064
+ return { valid: true, errors: {} };
20065
+ }
20066
+ const errors3 = {};
20067
+ for (const issue2 of result.error.issues) {
20068
+ const path = issue2.path.join(".");
20069
+ errors3[path] = issue2.message;
20070
+ }
20071
+ return { valid: false, errors: errors3 };
20072
+ }
20073
+ var init_react_hook_form = __esm(() => {
20074
+ init_zod();
20075
+ init_configs();
20076
+ });
20077
+
20078
+ // ../types/src/processor/configs/index.ts
20079
+ function getProcessorSchemas(processorId) {
20080
+ return PROCESSOR_SCHEMAS[processorId];
20081
+ }
20082
+ function getConfigSchema(processorId) {
20083
+ return PROCESSOR_SCHEMAS[processorId]?.configSchema;
20084
+ }
20085
+ function getAllProcessorJsonSchemas() {
20086
+ return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
20087
+ id: p.id,
20088
+ inputSchema: toJsonSchema(p.inputSchema),
20089
+ outputSchema: toJsonSchema(p.outputSchema),
20090
+ configSchema: toJsonSchema(p.configSchema)
20091
+ }));
20092
+ }
20093
+ function listProcessorIds() {
20094
+ return Object.keys(PROCESSOR_SCHEMAS);
20095
+ }
20096
+ var PROCESSOR_SCHEMAS;
20097
+ var init_configs = __esm(() => {
20098
+ init_common();
20099
+ init_ids();
20100
+ init_classify();
20101
+ init_classify_pages();
20102
+ init_document_parser();
20103
+ init_extract();
20104
+ init_merge();
20105
+ init_pdf_embedder();
20106
+ init_segment();
20107
+ init_split();
20108
+ init_template();
20109
+ init_xlsx_to_json();
20110
+ init_react_hook_form();
20111
+ init_classify();
20112
+ init_classify_pages();
20113
+ init_document_parser();
20114
+ init_extract();
20115
+ init_merge();
20116
+ init_pdf_embedder();
20117
+ init_segment();
20118
+ init_split();
20119
+ init_template();
20120
+ init_xlsx_to_json();
20121
+ PROCESSOR_SCHEMAS = {
20122
+ [PROCESSOR_IDS.EXTRACT]: {
20123
+ id: PROCESSOR_IDS.EXTRACT,
20124
+ inputSchema: ExtractInputSchema,
20125
+ outputSchema: ExtractOutputSchema,
20126
+ configSchema: ExtractConfigSchema
20127
+ },
20128
+ [PROCESSOR_IDS.DOCUMENT_PARSER]: {
20129
+ id: PROCESSOR_IDS.DOCUMENT_PARSER,
20130
+ inputSchema: DocumentParserInputSchema,
20131
+ outputSchema: DocumentParserOutputSchema,
20132
+ configSchema: DocumentParserConfigSchema
20133
+ },
20134
+ [PROCESSOR_IDS.MERGE]: {
20135
+ id: PROCESSOR_IDS.MERGE,
20136
+ inputSchema: MergeInputSchema,
20137
+ outputSchema: MergeOutputSchema,
20138
+ configSchema: MergeConfigSchema
20139
+ },
20140
+ [PROCESSOR_IDS.TEMPLATE]: {
20141
+ id: PROCESSOR_IDS.TEMPLATE,
20142
+ inputSchema: TemplateInputSchema,
20143
+ outputSchema: TemplateOutputSchema,
20144
+ configSchema: TemplateConfigSchema
20145
+ },
20146
+ [PROCESSOR_IDS.PDF_EMBEDDER]: {
20147
+ id: PROCESSOR_IDS.PDF_EMBEDDER,
20148
+ inputSchema: PdfEmbedderInputSchema,
20149
+ outputSchema: PdfEmbedderOutputSchema,
20150
+ configSchema: PdfEmbedderConfigSchema
20151
+ },
20152
+ [PROCESSOR_IDS.SPLIT]: {
20153
+ id: PROCESSOR_IDS.SPLIT,
20154
+ inputSchema: SplitInputSchema,
20155
+ outputSchema: SplitOutputSchema,
20156
+ configSchema: SplitConfigSchema
20157
+ },
20158
+ [PROCESSOR_IDS.SEGMENT]: {
20159
+ id: PROCESSOR_IDS.SEGMENT,
20160
+ inputSchema: SegmentInputSchema,
20161
+ outputSchema: SegmentOutputSchema,
20162
+ configSchema: SegmentConfigSchema
20163
+ },
20164
+ [PROCESSOR_IDS.CLASSIFY]: {
20165
+ id: PROCESSOR_IDS.CLASSIFY,
20166
+ inputSchema: ClassifyInputSchema,
20167
+ outputSchema: ClassifyOutputSchema,
20168
+ configSchema: ClassifyConfigSchema
20169
+ },
20170
+ [PROCESSOR_IDS.CLASSIFY_PAGES]: {
20171
+ id: PROCESSOR_IDS.CLASSIFY_PAGES,
20172
+ inputSchema: ClassifyPagesInputSchema,
20173
+ outputSchema: ClassifyPagesOutputSchema,
20174
+ configSchema: ClassifyPagesConfigSchema
20175
+ },
20176
+ [PROCESSOR_IDS.XLSX_TO_JSON]: {
20177
+ id: PROCESSOR_IDS.XLSX_TO_JSON,
20178
+ inputSchema: XlsxToJsonInputSchema,
20179
+ outputSchema: XlsxToJsonOutputSchema,
20180
+ configSchema: XlsxToJsonConfigSchema
20181
+ }
20182
+ };
20183
+ });
20184
+
17544
20185
  // ../types/src/processor/index.ts
17545
- var init_processor = () => {};
20186
+ var init_processor2 = __esm(() => {
20187
+ init_processor();
20188
+ init_execution();
20189
+ init_configs();
20190
+ });
17546
20191
 
17547
20192
  // ../types/src/parser/index.ts
17548
- var init_parser = () => {};
20193
+ var init_parser2 = __esm(() => {
20194
+ init_parser();
20195
+ });
17549
20196
 
17550
20197
  // ../types/src/otel/semantic-conventions.ts
17551
20198
  function mapLLMAttributes(attrs) {
@@ -20598,9 +23245,9 @@ var require_validate = __commonJS((exports) => {
20598
23245
  }
20599
23246
  let expr = data;
20600
23247
  const segments = jsonPointer.split("/");
20601
- for (const segment of segments) {
20602
- if (segment) {
20603
- data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
23248
+ for (const segment2 of segments) {
23249
+ if (segment2) {
23250
+ data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment2))}`;
20604
23251
  expr = (0, codegen_1._)`${expr} && ${data}`;
20605
23252
  }
20606
23253
  }
@@ -20880,7 +23527,7 @@ var require_data = __commonJS((exports, module) => {
20880
23527
  });
20881
23528
 
20882
23529
  // ../../node_modules/fast-uri/lib/utils.js
20883
- var require_utils = __commonJS((exports, module) => {
23530
+ var require_utils3 = __commonJS((exports, module) => {
20884
23531
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
20885
23532
  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);
20886
23533
  function stringArrayToHexStripped(input) {
@@ -21136,7 +23783,7 @@ var require_utils = __commonJS((exports, module) => {
21136
23783
 
21137
23784
  // ../../node_modules/fast-uri/lib/schemes.js
21138
23785
  var require_schemes = __commonJS((exports, module) => {
21139
- var { isUUID } = require_utils();
23786
+ var { isUUID } = require_utils3();
21140
23787
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
21141
23788
  var supportedSchemeNames = [
21142
23789
  "http",
@@ -21310,7 +23957,7 @@ var require_schemes = __commonJS((exports, module) => {
21310
23957
 
21311
23958
  // ../../node_modules/fast-uri/index.js
21312
23959
  var require_fast_uri = __commonJS((exports, module) => {
21313
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
23960
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
21314
23961
  var { SCHEMES, getSchemeHandler } = require_schemes();
21315
23962
  function normalize(uri, options) {
21316
23963
  if (typeof uri === "string") {
@@ -23720,7 +26367,7 @@ var require_draft7 = __commonJS((exports) => {
23720
26367
  });
23721
26368
 
23722
26369
  // ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
23723
- var require_types = __commonJS((exports) => {
26370
+ var require_types2 = __commonJS((exports) => {
23724
26371
  Object.defineProperty(exports, "__esModule", { value: true });
23725
26372
  exports.DiscrError = undefined;
23726
26373
  var DiscrError;
@@ -23734,7 +26381,7 @@ var require_types = __commonJS((exports) => {
23734
26381
  var require_discriminator = __commonJS((exports) => {
23735
26382
  Object.defineProperty(exports, "__esModule", { value: true });
23736
26383
  var codegen_1 = require_codegen();
23737
- var types_1 = require_types();
26384
+ var types_1 = require_types2();
23738
26385
  var compile_1 = require_compile();
23739
26386
  var ref_error_1 = require_ref_error();
23740
26387
  var util_1 = require_util();
@@ -24662,248 +27309,6 @@ var init_validation = __esm(() => {
24662
27309
  init_workspace_schema();
24663
27310
  });
24664
27311
 
24665
- // ../types/src/core/common.ts
24666
- function toJsonSchema2(schema) {
24667
- return exports_external.toJSONSchema(schema, { target: "draft-7" });
24668
- }
24669
- var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
24670
- var init_common = __esm(() => {
24671
- init_zod();
24672
- TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
24673
- return typeof val === "string" ? new Date(val) : val;
24674
- });
24675
- JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
24676
- BaseEntitySchema2 = exports_external.object({
24677
- id: exports_external.string(),
24678
- createdAt: TimestampSchema2.optional(),
24679
- updatedAt: TimestampSchema2.optional()
24680
- });
24681
- });
24682
-
24683
- // ../types/src/parser/parser.ts
24684
- var OFFICE_MIME_TYPES2, ParserCategory2, ParserTypeSchema2, DocumentMetadataSchema2, ParseUsageSchema2, StructuredDocumentSchema, CoordinateUnitSchema2, PointSchema2, BoundingRegionSchema2, PositionedTextSchema2, TableCellSchema2, ExtractedTableSchema2, LayoutElementTypeSchema2, LayoutElementSchema2, PageResultSchema2, ParseResultSchema2, ParseOptionsSchema2, ParserInputSchema2, EXTENSION_TO_MIME, MIME_TO_EXTENSION;
24685
- var init_parser2 = __esm(() => {
24686
- init_zod();
24687
- OFFICE_MIME_TYPES2 = [
24688
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
24689
- "application/msword",
24690
- "application/vnd.oasis.opendocument.text",
24691
- "application/rtf",
24692
- "text/rtf",
24693
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
24694
- "application/vnd.ms-excel",
24695
- "application/vnd.ms-excel.sheet.macroenabled.12",
24696
- "application/vnd.ms-excel.sheet.binary.macroenabled.12",
24697
- "application/vnd.oasis.opendocument.spreadsheet",
24698
- "application/vnd.openxmlformats-officedocument.presentationml.presentation",
24699
- "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
24700
- "application/vnd.ms-powerpoint.presentation.macroenabled.12",
24701
- "application/vnd.ms-powerpoint",
24702
- "application/vnd.oasis.opendocument.presentation",
24703
- "message/rfc822",
24704
- "application/vnd.ms-outlook",
24705
- "application/epub+zip"
24706
- ];
24707
- ParserCategory2 = {
24708
- PLAINTEXT: [
24709
- "text/plain",
24710
- "text/markdown",
24711
- "text/csv",
24712
- "text/tab-separated-values",
24713
- "text/html",
24714
- "text/xml",
24715
- "application/json",
24716
- "application/x-yaml",
24717
- "application/toml",
24718
- "image/svg+xml",
24719
- "text/x-rst",
24720
- "text/x-org",
24721
- "application/x-latex",
24722
- "application/x-ipynb+json",
24723
- "application/x-bibtex",
24724
- "application/docbook+xml",
24725
- "application/x-fictionbook+xml"
24726
- ],
24727
- OFFICE: [...OFFICE_MIME_TYPES2],
24728
- DOCUMENT: [
24729
- "application/pdf",
24730
- "image/png",
24731
- "image/jpeg",
24732
- "image/webp",
24733
- "image/tiff",
24734
- "image/gif",
24735
- "image/bmp"
24736
- ]
24737
- };
24738
- ParserTypeSchema2 = exports_external.enum([
24739
- "plaintext",
24740
- "office",
24741
- "llm-vision",
24742
- "ocr"
24743
- ]);
24744
- DocumentMetadataSchema2 = exports_external.object({
24745
- filename: exports_external.string(),
24746
- mimeType: exports_external.string(),
24747
- size: exports_external.number().describe("File size in bytes"),
24748
- storageRef: exports_external.string().optional().describe("Storage reference for the original file")
24749
- });
24750
- ParseUsageSchema2 = exports_external.object({
24751
- pageCount: exports_external.number(),
24752
- processingTimeMs: exports_external.number().optional()
24753
- });
24754
- StructuredDocumentSchema = exports_external.record(exports_external.string(), exports_external.unknown());
24755
- CoordinateUnitSchema2 = exports_external.enum(["pixel", "inch", "point", "normalized"]);
24756
- PointSchema2 = exports_external.object({
24757
- x: exports_external.number(),
24758
- y: exports_external.number()
24759
- });
24760
- BoundingRegionSchema2 = exports_external.object({
24761
- polygon: exports_external.array(PointSchema2).min(3),
24762
- unit: CoordinateUnitSchema2,
24763
- pageIndex: exports_external.number()
24764
- });
24765
- PositionedTextSchema2 = exports_external.object({
24766
- text: exports_external.string(),
24767
- confidence: exports_external.number().min(0).max(1).optional(),
24768
- boundingRegion: BoundingRegionSchema2.optional()
24769
- });
24770
- TableCellSchema2 = exports_external.object({
24771
- content: exports_external.string(),
24772
- rowIndex: exports_external.number(),
24773
- columnIndex: exports_external.number(),
24774
- rowSpan: exports_external.number().default(1),
24775
- columnSpan: exports_external.number().default(1),
24776
- boundingRegion: BoundingRegionSchema2.optional()
24777
- });
24778
- ExtractedTableSchema2 = exports_external.object({
24779
- cells: exports_external.array(TableCellSchema2),
24780
- rowCount: exports_external.number(),
24781
- columnCount: exports_external.number(),
24782
- boundingRegion: BoundingRegionSchema2.optional()
24783
- });
24784
- LayoutElementTypeSchema2 = exports_external.enum([
24785
- "paragraph",
24786
- "title",
24787
- "sectionHeading",
24788
- "pageHeader",
24789
- "pageFooter",
24790
- "pageNumber",
24791
- "footnote",
24792
- "table",
24793
- "figure",
24794
- "formulaBlock"
24795
- ]);
24796
- LayoutElementSchema2 = exports_external.object({
24797
- type: LayoutElementTypeSchema2,
24798
- content: exports_external.string(),
24799
- table: ExtractedTableSchema2.optional(),
24800
- caption: exports_external.string().optional(),
24801
- figureId: exports_external.string().optional(),
24802
- boundingRegion: BoundingRegionSchema2.optional()
24803
- });
24804
- PageResultSchema2 = exports_external.object({
24805
- pageIndex: exports_external.number().describe("0-based page index"),
24806
- text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
24807
- pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
24808
- layoutElements: exports_external.array(LayoutElementSchema2).optional().describe("Semantic layout elements in reading order"),
24809
- words: exports_external.array(PositionedTextSchema2).optional().describe("Word-level positions"),
24810
- lines: exports_external.array(PositionedTextSchema2).optional().describe("Line-level positions"),
24811
- tables: exports_external.array(ExtractedTableSchema2).optional().describe("Extracted tables"),
24812
- width: exports_external.number().optional().describe("Page width"),
24813
- height: exports_external.number().optional().describe("Page height"),
24814
- unit: CoordinateUnitSchema2.optional().describe("Unit for width/height and bounding regions"),
24815
- confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
24816
- });
24817
- ParseResultSchema2 = exports_external.object({
24818
- document: DocumentMetadataSchema2,
24819
- usage: ParseUsageSchema2,
24820
- pages: exports_external.array(PageResultSchema2),
24821
- text: exports_external.string().describe("Combined text from all pages"),
24822
- parserType: ParserTypeSchema2,
24823
- parserVersion: exports_external.string().optional(),
24824
- model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
24825
- structured: StructuredDocumentSchema.optional().describe("Canonical structured document with ordered blocks, regions, bounding boxes, tables, figures, and chunks when supported by the parser"),
24826
- rawResponse: exports_external.unknown().optional()
24827
- });
24828
- ParseOptionsSchema2 = exports_external.object({
24829
- outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
24830
- ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
24831
- includeWordPositions: exports_external.boolean().default(false),
24832
- includeLinePositions: exports_external.boolean().default(false),
24833
- extractTables: exports_external.boolean().default(true),
24834
- provider: exports_external.string().optional().describe("LLM provider ID to use"),
24835
- model: exports_external.string().optional(),
24836
- maxConcurrency: exports_external.number().min(1).max(30).default(3),
24837
- pagesPerBatch: exports_external.number().min(1).max(20).default(5),
24838
- pdfRenderScale: exports_external.number().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
24839
- imageQuality: exports_external.number().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
24840
- prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
24841
- languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
24842
- tenantId: exports_external.string().optional()
24843
- });
24844
- ParserInputSchema2 = exports_external.object({
24845
- data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
24846
- filename: exports_external.string(),
24847
- mimeType: exports_external.string(),
24848
- options: ParseOptionsSchema2.optional()
24849
- });
24850
- EXTENSION_TO_MIME = {
24851
- docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
24852
- doc: "application/msword",
24853
- odt: "application/vnd.oasis.opendocument.text",
24854
- rtf: "application/rtf",
24855
- xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
24856
- xls: "application/vnd.ms-excel",
24857
- xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
24858
- xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
24859
- ods: "application/vnd.oasis.opendocument.spreadsheet",
24860
- pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
24861
- ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
24862
- pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
24863
- ppt: "application/vnd.ms-powerpoint",
24864
- odp: "application/vnd.oasis.opendocument.presentation",
24865
- eml: "message/rfc822",
24866
- msg: "application/vnd.ms-outlook",
24867
- epub: "application/epub+zip",
24868
- pdf: "application/pdf",
24869
- png: "image/png",
24870
- jpg: "image/jpeg",
24871
- jpeg: "image/jpeg",
24872
- webp: "image/webp",
24873
- tiff: "image/tiff",
24874
- tif: "image/tiff",
24875
- gif: "image/gif",
24876
- bmp: "image/bmp",
24877
- svg: "image/svg+xml",
24878
- txt: "text/plain",
24879
- md: "text/markdown",
24880
- markdown: "text/markdown",
24881
- csv: "text/csv",
24882
- tsv: "text/tab-separated-values",
24883
- html: "text/html",
24884
- htm: "text/html",
24885
- xml: "text/xml",
24886
- json: "application/json",
24887
- yaml: "application/x-yaml",
24888
- yml: "application/x-yaml",
24889
- toml: "application/toml",
24890
- rst: "text/x-rst",
24891
- org: "text/x-org",
24892
- tex: "application/x-latex",
24893
- latex: "application/x-latex",
24894
- ipynb: "application/x-ipynb+json",
24895
- bib: "application/x-bibtex",
24896
- dbk: "application/docbook+xml",
24897
- docbook: "application/docbook+xml",
24898
- fb2: "application/x-fictionbook+xml"
24899
- };
24900
- MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
24901
- if (!(mime in acc))
24902
- acc[mime] = ext;
24903
- return acc;
24904
- }, {});
24905
- });
24906
-
24907
27312
  // ../../node_modules/@babel/parser/lib/index.js
24908
27313
  var require_lib = __commonJS((exports) => {
24909
27314
  Object.defineProperty(exports, "__esModule", {
@@ -25317,12 +27722,12 @@ var require_lib = __commonJS((exports) => {
25317
27722
  }
25318
27723
  const ParseErrorConstructors = {};
25319
27724
  for (const reasonCode of Object.keys(argument)) {
25320
- const template = argument[reasonCode];
25321
- const _ref = typeof template === "string" ? {
25322
- message: () => template
25323
- } : typeof template === "function" ? {
25324
- message: template
25325
- } : template, {
27725
+ const template2 = argument[reasonCode];
27726
+ const _ref = typeof template2 === "string" ? {
27727
+ message: () => template2
27728
+ } : typeof template2 === "function" ? {
27729
+ message: template2
27730
+ } : template2, {
25326
27731
  message
25327
27732
  } = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
25328
27733
  const toMessage = typeof message === "string" ? () => message : message;
@@ -39795,7 +42200,7 @@ var require_keywords = __commonJS((exports) => {
39795
42200
  });
39796
42201
 
39797
42202
  // ../../node_modules/sucrase/dist/parser/tokenizer/types.js
39798
- var require_types2 = __commonJS((exports) => {
42203
+ var require_types3 = __commonJS((exports) => {
39799
42204
  Object.defineProperty(exports, "__esModule", { value: true });
39800
42205
  var TokenType;
39801
42206
  (function(TokenType2) {
@@ -39859,8 +42264,8 @@ var require_types2 = __commonJS((exports) => {
39859
42264
  TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
39860
42265
  const arrow = 22528;
39861
42266
  TokenType2[TokenType2["arrow"] = arrow] = "arrow";
39862
- const template = 23552;
39863
- TokenType2[TokenType2["template"] = template] = "template";
42267
+ const template2 = 23552;
42268
+ TokenType2[TokenType2["template"] = template2] = "template";
39864
42269
  const ellipsis = 24576;
39865
42270
  TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
39866
42271
  const backQuote = 25600;
@@ -40279,7 +42684,7 @@ var require_types2 = __commonJS((exports) => {
40279
42684
  var require_state = __commonJS((exports) => {
40280
42685
  Object.defineProperty(exports, "__esModule", { value: true });
40281
42686
  var _keywords = require_keywords();
40282
- var _types = require_types2();
42687
+ var _types = require_types3();
40283
42688
 
40284
42689
  class Scope {
40285
42690
  constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
@@ -40665,7 +43070,7 @@ var require_base = __commonJS((exports) => {
40665
43070
  var require_util2 = __commonJS((exports) => {
40666
43071
  Object.defineProperty(exports, "__esModule", { value: true });
40667
43072
  var _index = require_tokenizer();
40668
- var _types = require_types2();
43073
+ var _types = require_types3();
40669
43074
  var _charcodes = require_charcodes();
40670
43075
  var _base = require_base();
40671
43076
  function isContextual(contextualKeyword) {
@@ -40827,7 +43232,7 @@ var require_identifier = __commonJS((exports) => {
40827
43232
  var require_readWordTree = __commonJS((exports) => {
40828
43233
  Object.defineProperty(exports, "__esModule", { value: true });
40829
43234
  var _keywords = require_keywords();
40830
- var _types = require_types2();
43235
+ var _types = require_types3();
40831
43236
  var READ_WORD_TREE = new Int32Array([
40832
43237
  -1,
40833
43238
  27,
@@ -49805,7 +52210,7 @@ var require_readWord = __commonJS((exports) => {
49805
52210
  var _identifier = require_identifier();
49806
52211
  var _index = require_tokenizer();
49807
52212
  var _readWordTree = require_readWordTree();
49808
- var _types = require_types2();
52213
+ var _types = require_types3();
49809
52214
  function readWord() {
49810
52215
  let treePos = 0;
49811
52216
  let code = 0;
@@ -49871,7 +52276,7 @@ var require_tokenizer = __commonJS((exports) => {
49871
52276
  var _keywords = require_keywords();
49872
52277
  var _readWord = require_readWord();
49873
52278
  var _readWord2 = _interopRequireDefault(_readWord);
49874
- var _types = require_types2();
52279
+ var _types = require_types3();
49875
52280
  var IdentifierRole;
49876
52281
  (function(IdentifierRole2) {
49877
52282
  const Access = 0;
@@ -50588,7 +52993,7 @@ var require_tokenizer = __commonJS((exports) => {
50588
52993
  // ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
50589
52994
  var require_getImportExportSpecifierInfo = __commonJS((exports) => {
50590
52995
  Object.defineProperty(exports, "__esModule", { value: true });
50591
- var _types = require_types2();
52996
+ var _types = require_types3();
50592
52997
  function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
50593
52998
  let endIndex = index + 1;
50594
52999
  if (isSpecifierEnd(tokens, endIndex)) {
@@ -50941,7 +53346,7 @@ var require_JSXTransformer = __commonJS((exports) => {
50941
53346
  var _xhtml = require_xhtml();
50942
53347
  var _xhtml2 = _interopRequireDefault(_xhtml);
50943
53348
  var _tokenizer = require_tokenizer();
50944
- var _types = require_types2();
53349
+ var _types = require_types3();
50945
53350
  var _charcodes = require_charcodes();
50946
53351
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
50947
53352
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -51445,7 +53850,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
51445
53850
  return obj && obj.__esModule ? obj : { default: obj };
51446
53851
  }
51447
53852
  var _tokenizer = require_tokenizer();
51448
- var _types = require_types2();
53853
+ var _types = require_types3();
51449
53854
  var _JSXTransformer = require_JSXTransformer();
51450
53855
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
51451
53856
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -51484,7 +53889,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
51484
53889
  }
51485
53890
  var _tokenizer = require_tokenizer();
51486
53891
  var _keywords = require_keywords();
51487
- var _types = require_types2();
53892
+ var _types = require_types3();
51488
53893
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
51489
53894
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
51490
53895
  var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
@@ -52255,18 +54660,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
52255
54660
  continue;
52256
54661
  let genColumn = 0;
52257
54662
  for (let j = 0;j < line.length; j++) {
52258
- const segment = line[j];
54663
+ const segment2 = line[j];
52259
54664
  if (j > 0)
52260
54665
  writer.write(comma);
52261
- genColumn = encodeInteger(writer, segment[0], genColumn);
52262
- if (segment.length === 1)
54666
+ genColumn = encodeInteger(writer, segment2[0], genColumn);
54667
+ if (segment2.length === 1)
52263
54668
  continue;
52264
- sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
52265
- sourceLine = encodeInteger(writer, segment[2], sourceLine);
52266
- sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
52267
- if (segment.length === 4)
54669
+ sourcesIndex = encodeInteger(writer, segment2[1], sourcesIndex);
54670
+ sourceLine = encodeInteger(writer, segment2[2], sourceLine);
54671
+ sourceColumn = encodeInteger(writer, segment2[3], sourceColumn);
54672
+ if (segment2.length === 4)
52268
54673
  continue;
52269
- namesIndex = encodeInteger(writer, segment[4], namesIndex);
54674
+ namesIndex = encodeInteger(writer, segment2[4], namesIndex);
52270
54675
  }
52271
54676
  }
52272
54677
  return writer.flush();
@@ -52821,11 +55226,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
52821
55226
  const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
52822
55227
  if (index === -1)
52823
55228
  return OMapping(null, null, null, null);
52824
- const segment = segments[index];
52825
- if (segment.length === 1)
55229
+ const segment2 = segments[index];
55230
+ if (segment2.length === 1)
52826
55231
  return OMapping(null, null, null, null);
52827
55232
  const { names, resolvedSources } = map2;
52828
- return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
55233
+ return OMapping(resolvedSources[segment2[SOURCES_INDEX]], segment2[SOURCE_LINE] + 1, segment2[SOURCE_COLUMN], segment2.length === 5 ? names[segment2[NAMES_INDEX]] : null);
52829
55234
  }
52830
55235
  function generatedPositionFor(map2, needle) {
52831
55236
  const { source, line, column, bias } = needle;
@@ -52938,8 +55343,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
52938
55343
  const max = upperBound(segments, matchedColumn, min);
52939
55344
  const result = [];
52940
55345
  for (;min <= max; min++) {
52941
- const segment = segments[min];
52942
- result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
55346
+ const segment2 = segments[min];
55347
+ result.push(GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]));
52943
55348
  }
52944
55349
  return result;
52945
55350
  }
@@ -52967,8 +55372,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
52967
55372
  const index = traceSegmentInternal(segments, memo, line, column, bias);
52968
55373
  if (index === -1)
52969
55374
  return GMapping(null, null);
52970
- const segment = segments[index];
52971
- return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
55375
+ const segment2 = segments[index];
55376
+ return GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]);
52972
55377
  }
52973
55378
  });
52974
55379
  });
@@ -53519,7 +55924,7 @@ var require_HelperManager = __commonJS((exports) => {
53519
55924
  var require_identifyShadowedGlobals = __commonJS((exports) => {
53520
55925
  Object.defineProperty(exports, "__esModule", { value: true });
53521
55926
  var _tokenizer = require_tokenizer();
53522
- var _types = require_types2();
55927
+ var _types = require_types3();
53523
55928
  function identifyShadowedGlobals(tokens, scopes, globalNames) {
53524
55929
  if (!hasShadowedGlobals(tokens, globalNames)) {
53525
55930
  return;
@@ -53584,7 +55989,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
53584
55989
  // ../../node_modules/sucrase/dist/util/getIdentifierNames.js
53585
55990
  var require_getIdentifierNames = __commonJS((exports) => {
53586
55991
  Object.defineProperty(exports, "__esModule", { value: true });
53587
- var _types = require_types2();
55992
+ var _types = require_types3();
53588
55993
  function getIdentifierNames(code, tokens) {
53589
55994
  const names = [];
53590
55995
  for (const token of tokens) {
@@ -53760,7 +56165,7 @@ var require_util3 = __commonJS((exports) => {
53760
56165
  });
53761
56166
 
53762
56167
  // ../../node_modules/ts-interface-checker/dist/types.js
53763
- var require_types3 = __commonJS((exports) => {
56168
+ var require_types4 = __commonJS((exports) => {
53764
56169
  var __extends = exports && exports.__extends || function() {
53765
56170
  var extendStatics = function(d, b) {
53766
56171
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -54360,9 +56765,9 @@ var require_dist2 = __commonJS((exports) => {
54360
56765
  };
54361
56766
  Object.defineProperty(exports, "__esModule", { value: true });
54362
56767
  exports.Checker = exports.createCheckers = undefined;
54363
- var types_1 = require_types3();
56768
+ var types_1 = require_types4();
54364
56769
  var util_1 = require_util3();
54365
- var types_2 = require_types3();
56770
+ var types_2 = require_types4();
54366
56771
  Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
54367
56772
  return types_2.TArray;
54368
56773
  } });
@@ -54644,7 +57049,7 @@ var require_lval = __commonJS((exports) => {
54644
57049
  var _typescript = require_typescript();
54645
57050
  var _index = require_tokenizer();
54646
57051
  var _keywords = require_keywords();
54647
- var _types = require_types2();
57052
+ var _types = require_types3();
54648
57053
  var _base = require_base();
54649
57054
  var _expression = require_expression();
54650
57055
  var _util = require_util2();
@@ -54776,7 +57181,7 @@ var require_typescript = __commonJS((exports) => {
54776
57181
  Object.defineProperty(exports, "__esModule", { value: true });
54777
57182
  var _index = require_tokenizer();
54778
57183
  var _keywords = require_keywords();
54779
- var _types = require_types2();
57184
+ var _types = require_types3();
54780
57185
  var _base = require_base();
54781
57186
  var _expression = require_expression();
54782
57187
  var _lval = require_lval();
@@ -56038,7 +58443,7 @@ var require_typescript = __commonJS((exports) => {
56038
58443
  var require_jsx = __commonJS((exports) => {
56039
58444
  Object.defineProperty(exports, "__esModule", { value: true });
56040
58445
  var _index = require_tokenizer();
56041
- var _types = require_types2();
58446
+ var _types = require_types3();
56042
58447
  var _base = require_base();
56043
58448
  var _expression = require_expression();
56044
58449
  var _util = require_util2();
@@ -56301,10 +58706,10 @@ var require_jsx = __commonJS((exports) => {
56301
58706
  });
56302
58707
 
56303
58708
  // ../../node_modules/sucrase/dist/parser/plugins/types.js
56304
- var require_types4 = __commonJS((exports) => {
58709
+ var require_types5 = __commonJS((exports) => {
56305
58710
  Object.defineProperty(exports, "__esModule", { value: true });
56306
58711
  var _index = require_tokenizer();
56307
- var _types = require_types2();
58712
+ var _types = require_types3();
56308
58713
  var _base = require_base();
56309
58714
  var _expression = require_expression();
56310
58715
  var _flow = require_flow();
@@ -56337,12 +58742,12 @@ var require_expression = __commonJS((exports) => {
56337
58742
  Object.defineProperty(exports, "__esModule", { value: true });
56338
58743
  var _flow = require_flow();
56339
58744
  var _index = require_jsx();
56340
- var _types = require_types4();
58745
+ var _types = require_types5();
56341
58746
  var _typescript = require_typescript();
56342
58747
  var _index3 = require_tokenizer();
56343
58748
  var _keywords = require_keywords();
56344
58749
  var _state = require_state();
56345
- var _types3 = require_types2();
58750
+ var _types3 = require_types3();
56346
58751
  var _charcodes = require_charcodes();
56347
58752
  var _identifier = require_identifier();
56348
58753
  var _base = require_base();
@@ -57058,7 +59463,7 @@ var require_flow = __commonJS((exports) => {
57058
59463
  Object.defineProperty(exports, "__esModule", { value: true });
57059
59464
  var _index = require_tokenizer();
57060
59465
  var _keywords = require_keywords();
57061
- var _types = require_types2();
59466
+ var _types = require_types3();
57062
59467
  var _base = require_base();
57063
59468
  var _expression = require_expression();
57064
59469
  var _statement = require_statement();
@@ -57933,7 +60338,7 @@ var require_statement = __commonJS((exports) => {
57933
60338
  var _tokenizer = require_tokenizer();
57934
60339
  var _keywords = require_keywords();
57935
60340
  var _state = require_state();
57936
- var _types = require_types2();
60341
+ var _types = require_types3();
57937
60342
  var _charcodes = require_charcodes();
57938
60343
  var _base = require_base();
57939
60344
  var _expression = require_expression();
@@ -58968,7 +61373,7 @@ var require_TokenProcessor = __commonJS((exports) => {
58968
61373
  function _interopRequireDefault(obj) {
58969
61374
  return obj && obj.__esModule ? obj : { default: obj };
58970
61375
  }
58971
- var _types = require_types2();
61376
+ var _types = require_types3();
58972
61377
  var _isAsyncOperation = require_isAsyncOperation();
58973
61378
  var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
58974
61379
 
@@ -59226,7 +61631,7 @@ var require_TokenProcessor = __commonJS((exports) => {
59226
61631
  var require_getClassInfo = __commonJS((exports) => {
59227
61632
  Object.defineProperty(exports, "__esModule", { value: true });
59228
61633
  var _keywords = require_keywords();
59229
- var _types = require_types2();
61634
+ var _types = require_types3();
59230
61635
  function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
59231
61636
  const snapshot = tokens.snapshot();
59232
61637
  const headerInfo = processClassHeader(tokens);
@@ -59464,7 +61869,7 @@ var require_getClassInfo = __commonJS((exports) => {
59464
61869
  // ../../node_modules/sucrase/dist/util/elideImportEquals.js
59465
61870
  var require_elideImportEquals = __commonJS((exports) => {
59466
61871
  Object.defineProperty(exports, "__esModule", { value: true });
59467
- var _types = require_types2();
61872
+ var _types = require_types3();
59468
61873
  function elideImportEquals(tokens) {
59469
61874
  tokens.removeInitialToken();
59470
61875
  tokens.removeToken();
@@ -59488,7 +61893,7 @@ var require_elideImportEquals = __commonJS((exports) => {
59488
61893
  var require_getDeclarationInfo = __commonJS((exports) => {
59489
61894
  Object.defineProperty(exports, "__esModule", { value: true });
59490
61895
  var _tokenizer = require_tokenizer();
59491
- var _types = require_types2();
61896
+ var _types = require_types3();
59492
61897
  var EMPTY_DECLARATION_INFO = {
59493
61898
  typeDeclarations: new Set,
59494
61899
  valueDeclarations: new Set
@@ -59516,7 +61921,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
59516
61921
  var require_isExportFrom = __commonJS((exports) => {
59517
61922
  Object.defineProperty(exports, "__esModule", { value: true });
59518
61923
  var _keywords = require_keywords();
59519
- var _types = require_types2();
61924
+ var _types = require_types3();
59520
61925
  function isExportFrom(tokens) {
59521
61926
  let closeBraceIndex = tokens.currentIndex();
59522
61927
  while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
@@ -59531,7 +61936,7 @@ var require_isExportFrom = __commonJS((exports) => {
59531
61936
  var require_removeMaybeImportAttributes = __commonJS((exports) => {
59532
61937
  Object.defineProperty(exports, "__esModule", { value: true });
59533
61938
  var _keywords = require_keywords();
59534
- var _types = require_types2();
61939
+ var _types = require_types3();
59535
61940
  function removeMaybeImportAttributes(tokens) {
59536
61941
  if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
59537
61942
  tokens.removeToken();
@@ -59546,7 +61951,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
59546
61951
  // ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
59547
61952
  var require_shouldElideDefaultExport = __commonJS((exports) => {
59548
61953
  Object.defineProperty(exports, "__esModule", { value: true });
59549
- var _types = require_types2();
61954
+ var _types = require_types3();
59550
61955
  function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
59551
61956
  if (!isTypeScriptTransformEnabled || keepUnusedImports) {
59552
61957
  return false;
@@ -59577,7 +61982,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
59577
61982
  }
59578
61983
  var _tokenizer = require_tokenizer();
59579
61984
  var _keywords = require_keywords();
59580
- var _types = require_types2();
61985
+ var _types = require_types3();
59581
61986
  var _elideImportEquals = require_elideImportEquals();
59582
61987
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
59583
61988
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -60219,7 +62624,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
60219
62624
  return obj && obj.__esModule ? obj : { default: obj };
60220
62625
  }
60221
62626
  var _keywords = require_keywords();
60222
- var _types = require_types2();
62627
+ var _types = require_types3();
60223
62628
  var _elideImportEquals = require_elideImportEquals();
60224
62629
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
60225
62630
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -60489,7 +62894,7 @@ var require_FlowTransformer = __commonJS((exports) => {
60489
62894
  return obj && obj.__esModule ? obj : { default: obj };
60490
62895
  }
60491
62896
  var _keywords = require_keywords();
60492
- var _types = require_types2();
62897
+ var _types = require_types3();
60493
62898
  var _Transformer = require_Transformer();
60494
62899
  var _Transformer2 = _interopRequireDefault(_Transformer);
60495
62900
 
@@ -60609,7 +63014,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
60609
63014
  }
60610
63015
  return value;
60611
63016
  }
60612
- var _types = require_types2();
63017
+ var _types = require_types3();
60613
63018
  var _Transformer = require_Transformer();
60614
63019
  var _Transformer2 = _interopRequireDefault(_Transformer);
60615
63020
  var JEST_GLOBAL_NAME = "jest";
@@ -60683,7 +63088,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
60683
63088
  function _interopRequireDefault(obj) {
60684
63089
  return obj && obj.__esModule ? obj : { default: obj };
60685
63090
  }
60686
- var _types = require_types2();
63091
+ var _types = require_types3();
60687
63092
  var _Transformer = require_Transformer();
60688
63093
  var _Transformer2 = _interopRequireDefault(_Transformer);
60689
63094
 
@@ -60712,7 +63117,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
60712
63117
  function _interopRequireDefault(obj) {
60713
63118
  return obj && obj.__esModule ? obj : { default: obj };
60714
63119
  }
60715
- var _types = require_types2();
63120
+ var _types = require_types3();
60716
63121
  var _Transformer = require_Transformer();
60717
63122
  var _Transformer2 = _interopRequireDefault(_Transformer);
60718
63123
 
@@ -60740,7 +63145,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
60740
63145
  function _interopRequireDefault(obj) {
60741
63146
  return obj && obj.__esModule ? obj : { default: obj };
60742
63147
  }
60743
- var _types = require_types2();
63148
+ var _types = require_types3();
60744
63149
  var _Transformer = require_Transformer();
60745
63150
  var _Transformer2 = _interopRequireDefault(_Transformer);
60746
63151
 
@@ -60856,7 +63261,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
60856
63261
  return obj && obj.__esModule ? obj : { default: obj };
60857
63262
  }
60858
63263
  var _tokenizer = require_tokenizer();
60859
- var _types = require_types2();
63264
+ var _types = require_types3();
60860
63265
  var _Transformer = require_Transformer();
60861
63266
  var _Transformer2 = _interopRequireDefault(_Transformer);
60862
63267
 
@@ -61107,7 +63512,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
61107
63512
  function _interopRequireDefault(obj) {
61108
63513
  return obj && obj.__esModule ? obj : { default: obj };
61109
63514
  }
61110
- var _types = require_types2();
63515
+ var _types = require_types3();
61111
63516
  var _isIdentifier = require_isIdentifier();
61112
63517
  var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
61113
63518
  var _Transformer = require_Transformer();
@@ -61253,7 +63658,7 @@ var require_RootTransformer = __commonJS((exports) => {
61253
63658
  return obj && obj.__esModule ? obj : { default: obj };
61254
63659
  }
61255
63660
  var _keywords = require_keywords();
61256
- var _types = require_types2();
63661
+ var _types = require_types3();
61257
63662
  var _getClassInfo = require_getClassInfo();
61258
63663
  var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
61259
63664
  var _CJSImportTransformer = require_CJSImportTransformer();
@@ -61652,7 +64057,7 @@ var require_formatTokens = __commonJS((exports) => {
61652
64057
  }
61653
64058
  var _linesandcolumns = require_build();
61654
64059
  var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
61655
- var _types = require_types2();
64060
+ var _types = require_types3();
61656
64061
  function formatTokens(code, tokens) {
61657
64062
  if (tokens.length === 0) {
61658
64063
  return "";
@@ -61717,7 +64122,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
61717
64122
  function _interopRequireDefault(obj) {
61718
64123
  return obj && obj.__esModule ? obj : { default: obj };
61719
64124
  }
61720
- var _types = require_types2();
64125
+ var _types = require_types3();
61721
64126
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
61722
64127
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
61723
64128
  function getTSImportedNames(tokens) {
@@ -62102,7 +64507,7 @@ function describeUnsupportedType(nodeType) {
62102
64507
  function compileTypedScript(opts) {
62103
64508
  let ast;
62104
64509
  try {
62105
- ast = import_parser2.parse(opts.source, {
64510
+ ast = import_parser4.parse(opts.source, {
62106
64511
  sourceType: "script",
62107
64512
  plugins: ["typescript"],
62108
64513
  ranges: true
@@ -62354,9 +64759,9 @@ function stripCommentsAndStrings(s) {
62354
64759
  out = out.replace(/`(\\.|[^`\\])*`/g, "``");
62355
64760
  return out;
62356
64761
  }
62357
- var import_parser2, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
64762
+ var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
62358
64763
  var init_compile = __esm(() => {
62359
- import_parser2 = __toESM(require_lib(), 1);
64764
+ import_parser4 = __toESM(require_lib(), 1);
62360
64765
  import_sucrase = __toESM(require_dist3(), 1);
62361
64766
  EVALUATOR_PARAM_NAMES = ["expected", "actual"];
62362
64767
  });
@@ -62718,8 +65123,8 @@ function getAllStepJsonSchemas() {
62718
65123
  category: def.category,
62719
65124
  name: def.name,
62720
65125
  description: def.description,
62721
- configSchema: toJsonSchema2(def.configSchema),
62722
- outputSchema: toJsonSchema2(def.outputSchema),
65126
+ configSchema: toJsonSchema(def.configSchema),
65127
+ outputSchema: toJsonSchema(def.outputSchema),
62723
65128
  configInWith: def.configInWith
62724
65129
  }));
62725
65130
  }
@@ -62773,7 +65178,7 @@ var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOu
62773
65178
  var init_step_configs = __esm(() => {
62774
65179
  init_zod();
62775
65180
  init_common();
62776
- init_parser2();
65181
+ init_parser();
62777
65182
  init_typed_script();
62778
65183
  init_steps();
62779
65184
  AiParseConfigSchema = exports_external.object({
@@ -62793,7 +65198,7 @@ var init_step_configs = __esm(() => {
62793
65198
  describeFigures: exports_external.boolean().optional().describe("Opt-in (default off). After text extraction, detect which pages contain figures with an in-worker layout model, then caption those pages with a vision model and append `<figure>description</figure>` to their text — so image-only pages (property photos, signatures, charts) become findable by text-based steps like ai.split. Note: the layout scan runs over all pages, and the caption step and its vision calls are billed. Skipped for plaintext."),
62794
65199
  figureInstructions: exports_external.string().optional().describe('Custom instruction for the figure-description pass, e.g. "Describe each figure; label a handwritten signature as `<figure>signature</figure>` and a stamp as `<figure>stamp</figure>`; for property photos note the room or exterior shown." Applied only when describeFigures runs.')
62795
65200
  });
62796
- AiParseOutputSchema = ParseResultSchema2.omit({ rawResponse: true });
65201
+ AiParseOutputSchema = ParseResultSchema.omit({ rawResponse: true });
62797
65202
  AiExtractConfigSchema = exports_external.object({
62798
65203
  input: exports_external.string().describe("Text content or template expression"),
62799
65204
  schema: exports_external.object({
@@ -63627,81 +66032,6 @@ var init_actions = __esm(() => {
63627
66032
  ACTION_TYPES = ActionTypeSchema.options;
63628
66033
  });
63629
66034
 
63630
- // ../types/src/processor/execution.ts
63631
- function asTuple(values) {
63632
- return values;
63633
- }
63634
- var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
63635
- var init_execution = __esm(() => {
63636
- init_zod();
63637
- WorkflowExecutionStatusValue2 = {
63638
- CREATED: "created",
63639
- PENDING: "pending",
63640
- RUNNING: "running",
63641
- WAITING: "waiting",
63642
- COMPLETED: "completed",
63643
- FAILED: "failed",
63644
- CANCELLED: "cancelled"
63645
- };
63646
- WorkflowExecutionStatusSchema2 = exports_external.enum([
63647
- WorkflowExecutionStatusValue2.CREATED,
63648
- WorkflowExecutionStatusValue2.PENDING,
63649
- WorkflowExecutionStatusValue2.RUNNING,
63650
- WorkflowExecutionStatusValue2.WAITING,
63651
- WorkflowExecutionStatusValue2.COMPLETED,
63652
- WorkflowExecutionStatusValue2.FAILED,
63653
- WorkflowExecutionStatusValue2.CANCELLED
63654
- ]);
63655
- StepExecutionStatusValue2 = {
63656
- PENDING: "pending",
63657
- RUNNING: "running",
63658
- SUCCESS: "success",
63659
- FAILURE: "failure",
63660
- WAITING: "waiting",
63661
- SKIPPED: "skipped"
63662
- };
63663
- StepExecutionStatusSchema2 = exports_external.enum([
63664
- StepExecutionStatusValue2.PENDING,
63665
- StepExecutionStatusValue2.RUNNING,
63666
- StepExecutionStatusValue2.SUCCESS,
63667
- StepExecutionStatusValue2.FAILURE,
63668
- StepExecutionStatusValue2.WAITING,
63669
- StepExecutionStatusValue2.SKIPPED
63670
- ]);
63671
- TriggerTypeValue2 = {
63672
- MANUAL: "manual",
63673
- API: "api",
63674
- WEBHOOK: "webhook",
63675
- SCHEDULE: "schedule",
63676
- EMAIL: "email",
63677
- EVAL: "eval",
63678
- CLI: "cli"
63679
- };
63680
- TriggerTypeSchema2 = exports_external.enum([
63681
- TriggerTypeValue2.MANUAL,
63682
- TriggerTypeValue2.API,
63683
- TriggerTypeValue2.WEBHOOK,
63684
- TriggerTypeValue2.SCHEDULE,
63685
- TriggerTypeValue2.EMAIL,
63686
- TriggerTypeValue2.EVAL,
63687
- TriggerTypeValue2.CLI
63688
- ]);
63689
- ExecutionTypeValue2 = {
63690
- PROD: "prod",
63691
- EVAL: "eval",
63692
- PLAYGROUND: "playground"
63693
- };
63694
- ExecutionTypeSchema2 = exports_external.enum([
63695
- ExecutionTypeValue2.PROD,
63696
- ExecutionTypeValue2.EVAL,
63697
- ExecutionTypeValue2.PLAYGROUND
63698
- ]);
63699
- WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
63700
- STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
63701
- TRIGGER_TYPES2 = TriggerTypeSchema2.options;
63702
- EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
63703
- });
63704
-
63705
66035
  // ../types/src/workflow/workflow.ts
63706
66036
  function suggestWorkflowName(raw) {
63707
66037
  return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
@@ -63783,11 +66113,11 @@ var init_workflow = __esm(() => {
63783
66113
  ManualTriggerMethodSchema = exports_external.object({
63784
66114
  type: exports_external.literal("manual"),
63785
66115
  enabled: exports_external.boolean().optional(),
63786
- inputSchema: JsonSchemaSchema2.optional()
66116
+ inputSchema: JsonSchemaSchema.optional()
63787
66117
  });
63788
66118
  ApiTriggerMethodSchema = exports_external.object({
63789
66119
  type: exports_external.literal("api"),
63790
- inputSchema: JsonSchemaSchema2.optional()
66120
+ inputSchema: JsonSchemaSchema.optional()
63791
66121
  });
63792
66122
  EmailTriggerMethodSchema = exports_external.object({
63793
66123
  type: exports_external.literal("email"),
@@ -63827,8 +66157,8 @@ var init_workflow = __esm(() => {
63827
66157
  yamlContent: exports_external.string(),
63828
66158
  definition: WorkflowDefinitionSchema,
63829
66159
  isCurrent: exports_external.boolean().default(true),
63830
- createdAt: TimestampSchema2,
63831
- updatedAt: TimestampSchema2.optional(),
66160
+ createdAt: TimestampSchema,
66161
+ updatedAt: TimestampSchema.optional(),
63832
66162
  createdBy: exports_external.string()
63833
66163
  });
63834
66164
  CreateWorkflowDefinitionSchema = exports_external.object({
@@ -64010,15 +66340,15 @@ function isFileOutput(value) {
64010
66340
  function isWorkflowResult(value) {
64011
66341
  return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
64012
66342
  }
64013
- var WorkflowExecutionStatusSchema3, StepExecutionStatusSchema3, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, StepExecutionAttemptSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
66343
+ var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, StepExecutionAttemptSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
64014
66344
  var init_execution2 = __esm(() => {
64015
66345
  init_zod();
64016
66346
  init_common();
64017
66347
  init_execution();
64018
66348
  init_retry();
64019
66349
  init_workflow();
64020
- WorkflowExecutionStatusSchema3 = WorkflowExecutionStatusSchema2;
64021
- StepExecutionStatusSchema3 = StepExecutionStatusSchema2;
66350
+ WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
66351
+ StepExecutionStatusSchema2 = StepExecutionStatusSchema;
64022
66352
  ScopeEntryTypeSchema = exports_external.enum([
64023
66353
  "root",
64024
66354
  "if-then",
@@ -64041,7 +66371,7 @@ var init_execution2 = __esm(() => {
64041
66371
  ScopeStackSchema = exports_external.array(ScopeEntrySchema);
64042
66372
  StepResultSchema = exports_external.object({
64043
66373
  output: exports_external.unknown(),
64044
- status: StepExecutionStatusSchema3
66374
+ status: StepExecutionStatusSchema2
64045
66375
  });
64046
66376
  ExecutionContextSchema = exports_external.object({
64047
66377
  input: exports_external.record(exports_external.string(), exports_external.unknown()),
@@ -64069,24 +66399,24 @@ var init_execution2 = __esm(() => {
64069
66399
  triggerType: exports_external.string(),
64070
66400
  triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
64071
66401
  overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
64072
- status: WorkflowExecutionStatusSchema3,
66402
+ status: WorkflowExecutionStatusSchema2,
64073
66403
  scopeStack: ScopeStackSchema,
64074
66404
  currentStepIndex: exports_external.number(),
64075
66405
  stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
64076
66406
  result: exports_external.unknown().nullable(),
64077
66407
  error: exports_external.string().nullable(),
64078
66408
  priority: exports_external.number().default(50),
64079
- availableAt: TimestampSchema2,
66409
+ availableAt: TimestampSchema,
64080
66410
  leaseId: exports_external.string().nullable(),
64081
- leaseExpiresAt: TimestampSchema2.nullable(),
66411
+ leaseExpiresAt: TimestampSchema.nullable(),
64082
66412
  workerId: exports_external.string().nullable(),
64083
66413
  maxRetries: exports_external.number().default(0),
64084
66414
  originalExecutionId: exports_external.string().nullable().optional(),
64085
66415
  previousExecutionId: exports_external.string().nullable().optional(),
64086
66416
  retryNumber: exports_external.number().default(0),
64087
- createdAt: TimestampSchema2,
64088
- startedAt: TimestampSchema2.nullable(),
64089
- completedAt: TimestampSchema2.nullable(),
66417
+ createdAt: TimestampSchema,
66418
+ startedAt: TimestampSchema.nullable(),
66419
+ completedAt: TimestampSchema.nullable(),
64090
66420
  createdBy: exports_external.string().nullable()
64091
66421
  });
64092
66422
  StepExecutionSchema = exports_external.object({
@@ -64105,15 +66435,15 @@ var init_execution2 = __esm(() => {
64105
66435
  effectiveRetryPolicy: ResolvedRetryPolicySchema.nullable().optional(),
64106
66436
  retryPolicySource: RetryPolicySourceSchema.nullable().optional(),
64107
66437
  latestAttempt: exports_external.number().default(0),
64108
- nextAttemptAt: TimestampSchema2.nullable().optional(),
66438
+ nextAttemptAt: TimestampSchema.nullable().optional(),
64109
66439
  inputData: exports_external.unknown().nullable(),
64110
66440
  outputData: exports_external.unknown().nullable(),
64111
- status: StepExecutionStatusSchema3,
66441
+ status: StepExecutionStatusSchema2,
64112
66442
  error: exports_external.string().nullable(),
64113
66443
  overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
64114
66444
  durationMs: exports_external.number().nullable(),
64115
- startedAt: TimestampSchema2.nullable(),
64116
- completedAt: TimestampSchema2.nullable()
66445
+ startedAt: TimestampSchema.nullable(),
66446
+ completedAt: TimestampSchema.nullable()
64117
66447
  });
64118
66448
  StepExecutionAttemptSchema = exports_external.object({
64119
66449
  id: exports_external.string(),
@@ -64126,8 +66456,8 @@ var init_execution2 = __esm(() => {
64126
66456
  failure: ExecutionFailureSchema.nullable(),
64127
66457
  retryDecision: RetryDecisionSchema.nullable(),
64128
66458
  replaySafe: exports_external.boolean().nullable(),
64129
- startedAt: TimestampSchema2,
64130
- completedAt: TimestampSchema2.nullable(),
66459
+ startedAt: TimestampSchema,
66460
+ completedAt: TimestampSchema.nullable(),
64131
66461
  durationMs: exports_external.number().nullable()
64132
66462
  });
64133
66463
  ConnectorSchema = exports_external.object({
@@ -64139,8 +66469,8 @@ var init_execution2 = __esm(() => {
64139
66469
  config: exports_external.record(exports_external.string(), exports_external.unknown()),
64140
66470
  inputSchema: exports_external.unknown().optional(),
64141
66471
  outputSchema: exports_external.unknown().optional(),
64142
- createdAt: TimestampSchema2,
64143
- updatedAt: TimestampSchema2.optional(),
66472
+ createdAt: TimestampSchema,
66473
+ updatedAt: TimestampSchema.optional(),
64144
66474
  createdBy: exports_external.string()
64145
66475
  });
64146
66476
  WorkflowFileOutputSchema = exports_external.object({
@@ -65107,8 +67437,8 @@ function parseRunTarget(target) {
65107
67437
  if (root !== "agents") {
65108
67438
  throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
65109
67439
  }
65110
- for (const segment of segments) {
65111
- RunTargetSegmentSchema.parse(segment);
67440
+ for (const segment2 of segments) {
67441
+ RunTargetSegmentSchema.parse(segment2);
65112
67442
  }
65113
67443
  const packagePath = packageName.split(".").join("/");
65114
67444
  const [, ...slugParts] = packagePath.split("/");
@@ -65221,9 +67551,9 @@ var init_grammar = __esm(() => {
65221
67551
  if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
65222
67552
  ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
65223
67553
  }
65224
- for (const segment of parts.slice(1)) {
65225
- if (!SourcePackageSegmentSchema.safeParse(segment).success) {
65226
- ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
67554
+ for (const segment2 of parts.slice(1)) {
67555
+ if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
67556
+ ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
65227
67557
  }
65228
67558
  }
65229
67559
  });
@@ -65239,9 +67569,9 @@ var init_grammar = __esm(() => {
65239
67569
  if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
65240
67570
  ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
65241
67571
  }
65242
- for (const segment of parts.slice(1)) {
65243
- if (!SourcePackageSegmentSchema.safeParse(segment).success) {
65244
- ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
67572
+ for (const segment2 of parts.slice(1)) {
67573
+ if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
67574
+ ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
65245
67575
  }
65246
67576
  }
65247
67577
  });
@@ -65335,9 +67665,9 @@ var init_grammar = __esm(() => {
65335
67665
  });
65336
67666
  return;
65337
67667
  }
65338
- for (const segment of parts.slice(1)) {
65339
- if (!RunTargetSegmentSchema.safeParse(segment).success) {
65340
- ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment}` });
67668
+ for (const segment2 of parts.slice(1)) {
67669
+ if (!RunTargetSegmentSchema.safeParse(segment2).success) {
67670
+ ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment2}` });
65341
67671
  }
65342
67672
  }
65343
67673
  if (ref) {
@@ -66087,7 +68417,7 @@ function fromBig(n, le = false) {
66087
68417
  return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
66088
68418
  return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
66089
68419
  }
66090
- function split(lst, le = false) {
68420
+ function split2(lst, le = false) {
66091
68421
  const len = lst.length;
66092
68422
  let Ah = new Uint32Array(len);
66093
68423
  let Al = new Uint32Array(len);
@@ -66267,7 +68597,7 @@ var init_sha2 = __esm(() => {
66267
68597
  super(28);
66268
68598
  }
66269
68599
  };
66270
- K512 = /* @__PURE__ */ (() => split([
68600
+ K512 = /* @__PURE__ */ (() => split2([
66271
68601
  "0x428a2f98d728ae22",
66272
68602
  "0x7137449123ef65cd",
66273
68603
  "0xb5c0fbcfec4d3b2f",
@@ -66870,11 +69200,11 @@ function walkGrammar(node, parts) {
66870
69200
  }
66871
69201
  return current;
66872
69202
  }
66873
- function normalizeTemplate(template) {
66874
- return template.endsWith("/") ? template.slice(0, -1) : template;
69203
+ function normalizeTemplate(template2) {
69204
+ return template2.endsWith("/") ? template2.slice(0, -1) : template2;
66875
69205
  }
66876
- function renderTemplate(template, params) {
66877
- return normalizeTemplate(template).split("/").flatMap((part) => {
69206
+ function renderTemplate(template2, params) {
69207
+ return normalizeTemplate(template2).split("/").flatMap((part) => {
66878
69208
  if (!part.startsWith(":")) {
66879
69209
  return [part];
66880
69210
  }
@@ -66884,36 +69214,36 @@ function renderTemplate(template, params) {
66884
69214
  throw new Error(`Missing S3 path parameter: ${part}`);
66885
69215
  }
66886
69216
  if (name === "path") {
66887
- return value.split("/").map((segment) => assertSegment("path", segment));
69217
+ return value.split("/").map((segment2) => assertSegment("path", segment2));
66888
69218
  }
66889
69219
  return [assertSegment(String(name), value)];
66890
69220
  });
66891
69221
  }
66892
- function buildS3Path(tenantId, template, params) {
69222
+ function buildS3Path(tenantId, template2, params) {
66893
69223
  const tenant = assertSegment("tenantId", tenantId);
66894
- const parts = renderTemplate(template, params);
69224
+ const parts = renderTemplate(template2, params);
66895
69225
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
66896
- if (template.endsWith("/") && node === PATH_LEAF) {
66897
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
69226
+ if (template2.endsWith("/") && node === PATH_LEAF) {
69227
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
66898
69228
  }
66899
69229
  const path = ["tenants", tenant, ...parts].join("/");
66900
- return template.endsWith("/") ? `${path}/` : path;
69230
+ return template2.endsWith("/") ? `${path}/` : path;
66901
69231
  }
66902
- function buildS3PathSuffix(template, params) {
66903
- const parts = renderTemplate(template, params);
69232
+ function buildS3PathSuffix(template2, params) {
69233
+ const parts = renderTemplate(template2, params);
66904
69234
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
66905
- if (template.endsWith("/") && node === PATH_LEAF) {
66906
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
69235
+ if (template2.endsWith("/") && node === PATH_LEAF) {
69236
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
66907
69237
  }
66908
69238
  const path = parts.join("/");
66909
- return template.endsWith("/") ? `${path}/` : path;
69239
+ return template2.endsWith("/") ? `${path}/` : path;
66910
69240
  }
66911
69241
  function stripTenantPrefix(key) {
66912
69242
  return key.replace(TENANT_PREFIX_RX, "");
66913
69243
  }
66914
- function matchS3Path(template, key) {
69244
+ function matchS3Path(template2, key) {
66915
69245
  const keyParts = stripTenantPrefix(key).split("/");
66916
- const templateParts = normalizeTemplate(template).split("/");
69246
+ const templateParts = normalizeTemplate(template2).split("/");
66917
69247
  const params = {};
66918
69248
  let keyIndex = 0;
66919
69249
  for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
@@ -66932,7 +69262,7 @@ function matchS3Path(template, key) {
66932
69262
  if (rest.length === 0)
66933
69263
  return null;
66934
69264
  try {
66935
- params.path = rest.map((segment) => assertSegment("path", segment)).join("/");
69265
+ params.path = rest.map((segment2) => assertSegment("path", segment2)).join("/");
66936
69266
  walkGrammar(S3_PATH_GRAMMAR, keyParts);
66937
69267
  } catch {
66938
69268
  return null;
@@ -66966,23 +69296,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
66966
69296
  }
66967
69297
  return assertSegment("tenantId", tenantId);
66968
69298
  };
66969
- const build = (template, params) => {
69299
+ const build = (template2, params) => {
66970
69300
  const tenant = resolveTenantId(params);
66971
- const parts = renderTemplate(template, params ?? {});
69301
+ const parts = renderTemplate(template2, params ?? {});
66972
69302
  const node = walkGrammar(grammarNode, parts);
66973
- if (template.endsWith("/") && node === PATH_LEAF) {
66974
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
69303
+ if (template2.endsWith("/") && node === PATH_LEAF) {
69304
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
66975
69305
  }
66976
69306
  const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
66977
- return template.endsWith("/") ? `${path}/` : path;
69307
+ return template2.endsWith("/") ? `${path}/` : path;
66978
69308
  };
66979
69309
  const builder = build;
66980
- builder.at = (template, params) => {
69310
+ builder.at = (template2, params) => {
66981
69311
  const tenant = resolveTenantId(params);
66982
- const parts = renderTemplate(template, params ?? {});
69312
+ const parts = renderTemplate(template2, params ?? {});
66983
69313
  const nextNode = walkGrammar(grammarNode, parts);
66984
- if (template.endsWith("/") && nextNode === PATH_LEAF) {
66985
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
69314
+ if (template2.endsWith("/") && nextNode === PATH_LEAF) {
69315
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
66986
69316
  }
66987
69317
  return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
66988
69318
  };
@@ -67413,7 +69743,7 @@ __export(exports_src, {
67413
69743
  SplitConfigSchema: () => SplitConfigSchema,
67414
69744
  SpanTypes: () => SpanTypes,
67415
69745
  SpanKindMap: () => SpanKindMap,
67416
- SpanKind: () => SpanKind,
69746
+ SpanKind: () => import_api.SpanKind,
67417
69747
  SourceVersionRefSchema: () => SourceVersionRefSchema,
67418
69748
  SourceSecretsFileSchema: () => SourceSecretsFileSchema,
67419
69749
  SourcePackageTypeSchema: () => SourcePackageTypeSchema,
@@ -67534,7 +69864,7 @@ __export(exports_src, {
67534
69864
  FileUploadStatusSchema: () => FileUploadStatusSchema,
67535
69865
  FileUploadPurposeSchema: () => FileUploadPurposeSchema,
67536
69866
  FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
67537
- FilePathDescriptorSchema: () => FilePathDescriptorSchema2,
69867
+ FilePathDescriptorSchema: () => FilePathDescriptorSchema,
67538
69868
  FileIngressRefSchema: () => FileIngressRefSchema,
67539
69869
  FileIdIngressRefSchema: () => FileIdIngressRefSchema,
67540
69870
  FailStepSchema: () => FailStepSchema,
@@ -67670,8 +70000,8 @@ var init_src = __esm(() => {
67670
70000
  init_runtime_file_ref();
67671
70001
  init_scoped_file_ref();
67672
70002
  init_upload_session();
67673
- init_processor();
67674
- init_parser();
70003
+ init_processor2();
70004
+ init_parser2();
67675
70005
  init_otel();
67676
70006
  init_execution_row();
67677
70007
  init_run_expand();
@@ -68586,7 +70916,7 @@ var require_foldFlowLines = __commonJS((exports) => {
68586
70916
  else
68587
70917
  end = lineWidth - indentAtStart;
68588
70918
  }
68589
- let split2 = undefined;
70919
+ let split3 = undefined;
68590
70920
  let prev = undefined;
68591
70921
  let overflow = false;
68592
70922
  let i = -1;
@@ -68620,20 +70950,20 @@ var require_foldFlowLines = __commonJS((exports) => {
68620
70950
  if (mode === FOLD_BLOCK)
68621
70951
  i = consumeMoreIndentedLines(text, i, indent.length);
68622
70952
  end = i + indent.length + endStep;
68623
- split2 = undefined;
70953
+ split3 = undefined;
68624
70954
  } else {
68625
70955
  if (ch === " " && prev && prev !== " " && prev !== `
68626
70956
  ` && prev !== "\t") {
68627
70957
  const next = text[i + 1];
68628
70958
  if (next && next !== " " && next !== `
68629
70959
  ` && next !== "\t")
68630
- split2 = i;
70960
+ split3 = i;
68631
70961
  }
68632
70962
  if (i >= end) {
68633
- if (split2) {
68634
- folds.push(split2);
68635
- end = split2 + endStep;
68636
- split2 = undefined;
70963
+ if (split3) {
70964
+ folds.push(split3);
70965
+ end = split3 + endStep;
70966
+ split3 = undefined;
68637
70967
  } else if (mode === FOLD_QUOTED) {
68638
70968
  while (prev === " " || prev === "\t") {
68639
70969
  prev = ch;
@@ -68646,7 +70976,7 @@ var require_foldFlowLines = __commonJS((exports) => {
68646
70976
  folds.push(j);
68647
70977
  escapedFolds[j] = true;
68648
70978
  end = j + endStep;
68649
- split2 = undefined;
70979
+ split3 = undefined;
68650
70980
  } else {
68651
70981
  overflow = true;
68652
70982
  }
@@ -69280,7 +71610,7 @@ var require_merge = __commonJS((exports) => {
69280
71610
  var identity = require_identity();
69281
71611
  var Scalar = require_Scalar();
69282
71612
  var MERGE_KEY = "<<";
69283
- var merge2 = {
71613
+ var merge3 = {
69284
71614
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
69285
71615
  default: "key",
69286
71616
  tag: "tag:yaml.org,2002:merge",
@@ -69290,7 +71620,7 @@ var require_merge = __commonJS((exports) => {
69290
71620
  }),
69291
71621
  stringify: () => MERGE_KEY
69292
71622
  };
69293
- 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);
71623
+ 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);
69294
71624
  function addMergeToJSMap(ctx, map2, value) {
69295
71625
  const source = resolveAliasValue(ctx, value);
69296
71626
  if (identity.isSeq(source))
@@ -69329,21 +71659,21 @@ var require_merge = __commonJS((exports) => {
69329
71659
  }
69330
71660
  exports.addMergeToJSMap = addMergeToJSMap;
69331
71661
  exports.isMergeKey = isMergeKey;
69332
- exports.merge = merge2;
71662
+ exports.merge = merge3;
69333
71663
  });
69334
71664
 
69335
71665
  // node_modules/yaml/dist/nodes/addPairToJSMap.js
69336
71666
  var require_addPairToJSMap = __commonJS((exports) => {
69337
71667
  var log = require_log();
69338
- var merge2 = require_merge();
71668
+ var merge3 = require_merge();
69339
71669
  var stringify = require_stringify();
69340
71670
  var identity = require_identity();
69341
71671
  var toJS = require_toJS();
69342
71672
  function addPairToJSMap(ctx, map2, { key, value }) {
69343
71673
  if (identity.isNode(key) && key.addToJSMap)
69344
71674
  key.addToJSMap(ctx, map2, value);
69345
- else if (merge2.isMergeKey(ctx, key))
69346
- merge2.addMergeToJSMap(ctx, map2, value);
71675
+ else if (merge3.isMergeKey(ctx, key))
71676
+ merge3.addMergeToJSMap(ctx, map2, value);
69347
71677
  else {
69348
71678
  const jsKey = toJS.toJS(key, "", ctx);
69349
71679
  if (map2 instanceof Map) {
@@ -70619,7 +72949,7 @@ var require_schema3 = __commonJS((exports) => {
70619
72949
  var bool = require_bool2();
70620
72950
  var float = require_float2();
70621
72951
  var int2 = require_int2();
70622
- var merge2 = require_merge();
72952
+ var merge3 = require_merge();
70623
72953
  var omap = require_omap();
70624
72954
  var pairs = require_pairs();
70625
72955
  var set2 = require_set();
@@ -70639,7 +72969,7 @@ var require_schema3 = __commonJS((exports) => {
70639
72969
  float.floatExp,
70640
72970
  float.float,
70641
72971
  binary.binary,
70642
- merge2.merge,
72972
+ merge3.merge,
70643
72973
  omap.omap,
70644
72974
  pairs.pairs,
70645
72975
  set2.set,
@@ -70662,7 +72992,7 @@ var require_tags = __commonJS((exports) => {
70662
72992
  var schema = require_schema();
70663
72993
  var schema$1 = require_schema2();
70664
72994
  var binary = require_binary();
70665
- var merge2 = require_merge();
72995
+ var merge3 = require_merge();
70666
72996
  var omap = require_omap();
70667
72997
  var pairs = require_pairs();
70668
72998
  var schema$2 = require_schema3();
@@ -70687,7 +73017,7 @@ var require_tags = __commonJS((exports) => {
70687
73017
  intOct: int2.intOct,
70688
73018
  intTime: timestamp.intTime,
70689
73019
  map: map2.map,
70690
- merge: merge2.merge,
73020
+ merge: merge3.merge,
70691
73021
  null: _null4.nullTag,
70692
73022
  omap: omap.omap,
70693
73023
  pairs: pairs.pairs,
@@ -70697,7 +73027,7 @@ var require_tags = __commonJS((exports) => {
70697
73027
  };
70698
73028
  var coreKnownTags = {
70699
73029
  "tag:yaml.org,2002:binary": binary.binary,
70700
- "tag:yaml.org,2002:merge": merge2.merge,
73030
+ "tag:yaml.org,2002:merge": merge3.merge,
70701
73031
  "tag:yaml.org,2002:omap": omap.omap,
70702
73032
  "tag:yaml.org,2002:pairs": pairs.pairs,
70703
73033
  "tag:yaml.org,2002:set": set2.set,
@@ -70706,7 +73036,7 @@ var require_tags = __commonJS((exports) => {
70706
73036
  function getTags(customTags, schemaName, addMergeTag) {
70707
73037
  const schemaTags = schemas3.get(schemaName);
70708
73038
  if (schemaTags && !customTags) {
70709
- return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
73039
+ return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
70710
73040
  }
70711
73041
  let tags = schemaTags;
70712
73042
  if (!tags) {
@@ -70724,7 +73054,7 @@ var require_tags = __commonJS((exports) => {
70724
73054
  tags = customTags(tags.slice());
70725
73055
  }
70726
73056
  if (addMergeTag)
70727
- tags = tags.concat(merge2.merge);
73057
+ tags = tags.concat(merge3.merge);
70728
73058
  return tags.reduce((tags2, tag) => {
70729
73059
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
70730
73060
  if (!tagObj) {
@@ -70751,11 +73081,11 @@ var require_Schema = __commonJS((exports) => {
70751
73081
  var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
70752
73082
 
70753
73083
  class Schema {
70754
- constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
73084
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
70755
73085
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
70756
73086
  this.name = typeof schema === "string" && schema || "core";
70757
73087
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
70758
- this.tags = tags.getTags(customTags, this.name, merge2);
73088
+ this.tags = tags.getTags(customTags, this.name, merge3);
70759
73089
  this.toStringOptions = toStringDefaults ?? null;
70760
73090
  Object.defineProperty(this, identity.MAP, { value: map2.map });
70761
73091
  Object.defineProperty(this, identity.SCALAR, { value: string4.string });
@@ -71978,13 +74308,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
71978
74308
  return { mode, indent, chomp, comment, length };
71979
74309
  }
71980
74310
  function splitLines(source) {
71981
- const split2 = source.split(/\n( *)/);
71982
- const first = split2[0];
74311
+ const split3 = source.split(/\n( *)/);
74312
+ const first = split3[0];
71983
74313
  const m = first.match(/^( *)/);
71984
74314
  const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
71985
74315
  const lines = [line0];
71986
- for (let i = 1;i < split2.length; i += 2)
71987
- lines.push([split2[i], split2[i + 1]]);
74316
+ for (let i = 1;i < split3.length; i += 2)
74317
+ lines.push([split3[i], split3[i + 1]]);
71988
74318
  return lines;
71989
74319
  }
71990
74320
  exports.resolveBlockScalar = resolveBlockScalar;
@@ -75018,7 +77348,7 @@ var init_main = __esm(() => {
75018
77348
  });
75019
77349
 
75020
77350
  // ../../node_modules/sisteransi/src/index.js
75021
- var require_src = __commonJS((exports, module) => {
77351
+ var require_src2 = __commonJS((exports, module) => {
75022
77352
  var ESC2 = "\x1B";
75023
77353
  var CSI2 = `${ESC2}[`;
75024
77354
  var beep = "\x07";
@@ -75361,7 +77691,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
75361
77691
  }, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
75362
77692
  var init_dist3 = __esm(() => {
75363
77693
  init_main();
75364
- import_sisteransi = __toESM(require_src(), 1);
77694
+ import_sisteransi = __toESM(require_src2(), 1);
75365
77695
  G = ["up", "down", "left", "right", "space", "enter", "cancel"];
75366
77696
  K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
75367
77697
  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)}` } } };
@@ -76704,7 +79034,7 @@ var init_dist4 = __esm(() => {
76704
79034
  init_dist3();
76705
79035
  init_main();
76706
79036
  init_dist2();
76707
- import_sisteransi2 = __toESM(require_src(), 1);
79037
+ import_sisteransi2 = __toESM(require_src2(), 1);
76708
79038
  tt2 = te();
76709
79039
  _t = w2("◆", "*");
76710
79040
  ot2 = w2("■", "x");
@@ -170196,7 +172526,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
170196
172526
  __defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
170197
172527
  }
170198
172528
  return to5;
170199
- }, __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 {
172529
+ }, __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 {
170200
172530
  diff(oldStr, newStr, options8 = {}) {
170201
172531
  let callback;
170202
172532
  if (typeof options8 === "function") {
@@ -171218,7 +173548,7 @@ var init_prettier = __esm(() => {
171218
173548
  };
171219
173549
  }
171220
173550
  });
171221
- require_utils2 = __commonJS2({
173551
+ require_utils4 = __commonJS2({
171222
173552
  "node_modules/braces/lib/utils.js"(exports) {
171223
173553
  exports.isInteger = (num) => {
171224
173554
  if (typeof num === "number") {
@@ -171307,7 +173637,7 @@ var init_prettier = __esm(() => {
171307
173637
  });
171308
173638
  require_stringify2 = __commonJS2({
171309
173639
  "node_modules/braces/lib/stringify.js"(exports, module) {
171310
- var utils2 = require_utils2();
173640
+ var utils2 = require_utils4();
171311
173641
  module.exports = (ast, options8 = {}) => {
171312
173642
  const stringify2 = (node, parent = {}) => {
171313
173643
  const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
@@ -171761,7 +174091,7 @@ var init_prettier = __esm(() => {
171761
174091
  require_compile2 = __commonJS2({
171762
174092
  "node_modules/braces/lib/compile.js"(exports, module) {
171763
174093
  var fill2 = require_fill_range();
171764
- var utils2 = require_utils2();
174094
+ var utils2 = require_utils4();
171765
174095
  var compile = (ast, options8 = {}) => {
171766
174096
  const walk = (node, parent = {}) => {
171767
174097
  const invalidBlock = utils2.isInvalidBrace(parent);
@@ -171811,7 +174141,7 @@ var init_prettier = __esm(() => {
171811
174141
  "node_modules/braces/lib/expand.js"(exports, module) {
171812
174142
  var fill2 = require_fill_range();
171813
174143
  var stringify2 = require_stringify2();
171814
- var utils2 = require_utils2();
174144
+ var utils2 = require_utils4();
171815
174145
  var append = (queue = "", stash = "", enclose = false) => {
171816
174146
  const result = [];
171817
174147
  queue = [].concat(queue);
@@ -174010,8 +176340,8 @@ var init_prettier = __esm(() => {
174010
176340
  var Stream = __require2("stream");
174011
176341
  var PassThrough = Stream.PassThrough;
174012
176342
  var slice = Array.prototype.slice;
174013
- module.exports = merge2;
174014
- function merge2() {
176343
+ module.exports = merge22;
176344
+ function merge22() {
174015
176345
  const streamsQueue = [];
174016
176346
  const args = slice.call(arguments);
174017
176347
  let merging = false;
@@ -174125,9 +176455,9 @@ var init_prettier = __esm(() => {
174125
176455
  "node_modules/fast-glob/out/utils/stream.js"(exports) {
174126
176456
  Object.defineProperty(exports, "__esModule", { value: true });
174127
176457
  exports.merge = undefined;
174128
- var merge2 = require_merge2();
176458
+ var merge22 = require_merge2();
174129
176459
  function merge3(streams) {
174130
- const mergedStream = merge2(streams);
176460
+ const mergedStream = merge22(streams);
174131
176461
  streams.forEach((stream) => {
174132
176462
  stream.once("error", (error52) => mergedStream.emit("error", error52));
174133
176463
  });
@@ -174155,7 +176485,7 @@ var init_prettier = __esm(() => {
174155
176485
  exports.isEmpty = isEmpty;
174156
176486
  }
174157
176487
  });
174158
- require_utils3 = __commonJS2({
176488
+ require_utils32 = __commonJS2({
174159
176489
  "node_modules/fast-glob/out/utils/index.js"(exports) {
174160
176490
  Object.defineProperty(exports, "__esModule", { value: true });
174161
176491
  exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
@@ -174179,7 +176509,7 @@ var init_prettier = __esm(() => {
174179
176509
  "node_modules/fast-glob/out/managers/tasks.js"(exports) {
174180
176510
  Object.defineProperty(exports, "__esModule", { value: true });
174181
176511
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
174182
- var utils2 = require_utils3();
176512
+ var utils2 = require_utils32();
174183
176513
  function generate(input, settings) {
174184
176514
  const patterns = processPatterns(input, settings);
174185
176515
  const ignore = processPatterns(settings.ignore, settings);
@@ -174488,7 +176818,7 @@ var init_prettier = __esm(() => {
174488
176818
  exports.createDirentFromStats = createDirentFromStats;
174489
176819
  }
174490
176820
  });
174491
- require_utils4 = __commonJS2({
176821
+ require_utils42 = __commonJS2({
174492
176822
  "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
174493
176823
  Object.defineProperty(exports, "__esModule", { value: true });
174494
176824
  exports.fs = undefined;
@@ -174516,7 +176846,7 @@ var init_prettier = __esm(() => {
174516
176846
  var fsStat = require_out();
174517
176847
  var rpl = require_run_parallel();
174518
176848
  var constants_1 = require_constants3();
174519
- var utils2 = require_utils4();
176849
+ var utils2 = require_utils42();
174520
176850
  var common = require_common();
174521
176851
  function read3(directory, settings, callback) {
174522
176852
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -174622,7 +176952,7 @@ var init_prettier = __esm(() => {
174622
176952
  exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
174623
176953
  var fsStat = require_out();
174624
176954
  var constants_1 = require_constants3();
174625
- var utils2 = require_utils4();
176955
+ var utils2 = require_utils42();
174626
176956
  var common = require_common();
174627
176957
  function read3(directory, settings) {
174628
176958
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -175402,7 +177732,7 @@ var init_prettier = __esm(() => {
175402
177732
  Object.defineProperty(exports, "__esModule", { value: true });
175403
177733
  var path15 = __require2("path");
175404
177734
  var fsStat = require_out();
175405
- var utils2 = require_utils3();
177735
+ var utils2 = require_utils32();
175406
177736
  var Reader = class {
175407
177737
  constructor(_settings) {
175408
177738
  this._settings = _settings;
@@ -175526,7 +177856,7 @@ var init_prettier = __esm(() => {
175526
177856
  require_matcher = __commonJS2({
175527
177857
  "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
175528
177858
  Object.defineProperty(exports, "__esModule", { value: true });
175529
- var utils2 = require_utils3();
177859
+ var utils2 = require_utils32();
175530
177860
  var Matcher = class {
175531
177861
  constructor(_patterns, _settings, _micromatchOptions) {
175532
177862
  this._patterns = _patterns;
@@ -175565,7 +177895,7 @@ var init_prettier = __esm(() => {
175565
177895
  });
175566
177896
  }
175567
177897
  _splitSegmentsIntoSections(segments) {
175568
- return utils2.array.splitWhen(segments, (segment) => segment.dynamic && utils2.pattern.hasGlobStar(segment.pattern));
177898
+ return utils2.array.splitWhen(segments, (segment2) => segment2.dynamic && utils2.pattern.hasGlobStar(segment2.pattern));
175569
177899
  }
175570
177900
  };
175571
177901
  exports.default = Matcher;
@@ -175586,11 +177916,11 @@ var init_prettier = __esm(() => {
175586
177916
  return true;
175587
177917
  }
175588
177918
  const match = parts.every((part, index) => {
175589
- const segment = pattern.segments[index];
175590
- if (segment.dynamic && segment.patternRe.test(part)) {
177919
+ const segment2 = pattern.segments[index];
177920
+ if (segment2.dynamic && segment2.patternRe.test(part)) {
175591
177921
  return true;
175592
177922
  }
175593
- if (!segment.dynamic && segment.pattern === part) {
177923
+ if (!segment2.dynamic && segment2.pattern === part) {
175594
177924
  return true;
175595
177925
  }
175596
177926
  return false;
@@ -175608,7 +177938,7 @@ var init_prettier = __esm(() => {
175608
177938
  require_deep = __commonJS2({
175609
177939
  "node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
175610
177940
  Object.defineProperty(exports, "__esModule", { value: true });
175611
- var utils2 = require_utils3();
177941
+ var utils2 = require_utils32();
175612
177942
  var partial_1 = require_partial();
175613
177943
  var DeepFilter = class {
175614
177944
  constructor(_settings, _micromatchOptions) {
@@ -175670,7 +178000,7 @@ var init_prettier = __esm(() => {
175670
178000
  require_entry = __commonJS2({
175671
178001
  "node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
175672
178002
  Object.defineProperty(exports, "__esModule", { value: true });
175673
- var utils2 = require_utils3();
178003
+ var utils2 = require_utils32();
175674
178004
  var EntryFilter = class {
175675
178005
  constructor(_settings, _micromatchOptions) {
175676
178006
  this._settings = _settings;
@@ -175755,7 +178085,7 @@ var init_prettier = __esm(() => {
175755
178085
  require_error2 = __commonJS2({
175756
178086
  "node_modules/fast-glob/out/providers/filters/error.js"(exports) {
175757
178087
  Object.defineProperty(exports, "__esModule", { value: true });
175758
- var utils2 = require_utils3();
178088
+ var utils2 = require_utils32();
175759
178089
  var ErrorFilter = class {
175760
178090
  constructor(_settings) {
175761
178091
  this._settings = _settings;
@@ -175773,7 +178103,7 @@ var init_prettier = __esm(() => {
175773
178103
  require_entry2 = __commonJS2({
175774
178104
  "node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
175775
178105
  Object.defineProperty(exports, "__esModule", { value: true });
175776
- var utils2 = require_utils3();
178106
+ var utils2 = require_utils32();
175777
178107
  var EntryTransformer = class {
175778
178108
  constructor(_settings) {
175779
178109
  this._settings = _settings;
@@ -176041,7 +178371,7 @@ var init_prettier = __esm(() => {
176041
178371
  var stream_1 = require_stream4();
176042
178372
  var sync_1 = require_sync6();
176043
178373
  var settings_1 = require_settings4();
176044
- var utils2 = require_utils3();
178374
+ var utils2 = require_utils32();
176045
178375
  async function FastGlob(source2, options8) {
176046
178376
  assertPatternsInput(source2);
176047
178377
  const works = getWorks(source2, async_1.default, options8);
@@ -176359,7 +178689,7 @@ var init_prettier = __esm(() => {
176359
178689
  };
176360
178690
  }
176361
178691
  });
176362
- require_semver = __commonJS2({
178692
+ require_semver2 = __commonJS2({
176363
178693
  "node_modules/semver/classes/semver.js"(exports, module) {
176364
178694
  var debug = require_debug();
176365
178695
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
@@ -176629,7 +178959,7 @@ var init_prettier = __esm(() => {
176629
178959
  });
176630
178960
  require_compare = __commonJS2({
176631
178961
  "node_modules/semver/functions/compare.js"(exports, module) {
176632
- var SemVer = require_semver();
178962
+ var SemVer = require_semver2();
176633
178963
  var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
176634
178964
  module.exports = compare;
176635
178965
  }
@@ -178362,7 +180692,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
178362
180692
  };
178363
180693
  }
178364
180694
  });
178365
- require_src2 = __commonJS2({
180695
+ require_src3 = __commonJS2({
178366
180696
  "node_modules/editorconfig/src/index.js"(exports) {
178367
180697
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
178368
180698
  return new (P9 || (P9 = Promise))(function(resolve3, reject) {
@@ -179825,7 +182155,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
179825
182155
  mockable_default = mockable.mocked;
179826
182156
  import_micromatch = __toESM2(require_micromatch(), 1);
179827
182157
  partition_default = partition2;
179828
- import_editorconfig = __toESM2(require_src2(), 1);
182158
+ import_editorconfig = __toESM2(require_src3(), 1);
179829
182159
  iterate_directory_up_default = iterateDirectoryUp;
179830
182160
  FileSearcher = class extends Searcher {
179831
182161
  findInDirectory = findFile;
@@ -183296,7 +185626,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
183296
185626
  else
183297
185627
  end = lineWidth - indentAtStart;
183298
185628
  }
183299
- let split2 = undefined;
185629
+ let split3 = undefined;
183300
185630
  let prev = undefined;
183301
185631
  let overflow = false;
183302
185632
  let i5 = -1;
@@ -183330,20 +185660,20 @@ var require_foldFlowLines2 = __commonJS((exports) => {
183330
185660
  if (mode === FOLD_BLOCK)
183331
185661
  i5 = consumeMoreIndentedLines(text, i5, indent3.length);
183332
185662
  end = i5 + indent3.length + endStep;
183333
- split2 = undefined;
185663
+ split3 = undefined;
183334
185664
  } else {
183335
185665
  if (ch2 === " " && prev && prev !== " " && prev !== `
183336
185666
  ` && prev !== "\t") {
183337
185667
  const next = text[i5 + 1];
183338
185668
  if (next && next !== " " && next !== `
183339
185669
  ` && next !== "\t")
183340
- split2 = i5;
185670
+ split3 = i5;
183341
185671
  }
183342
185672
  if (i5 >= end) {
183343
- if (split2) {
183344
- folds.push(split2);
183345
- end = split2 + endStep;
183346
- split2 = undefined;
185673
+ if (split3) {
185674
+ folds.push(split3);
185675
+ end = split3 + endStep;
185676
+ split3 = undefined;
183347
185677
  } else if (mode === FOLD_QUOTED) {
183348
185678
  while (prev === " " || prev === "\t") {
183349
185679
  prev = ch2;
@@ -183356,7 +185686,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
183356
185686
  folds.push(j11);
183357
185687
  escapedFolds[j11] = true;
183358
185688
  end = j11 + endStep;
183359
- split2 = undefined;
185689
+ split3 = undefined;
183360
185690
  } else {
183361
185691
  overflow = true;
183362
185692
  }
@@ -183990,7 +186320,7 @@ var require_merge3 = __commonJS((exports) => {
183990
186320
  var identity = require_identity2();
183991
186321
  var Scalar = require_Scalar2();
183992
186322
  var MERGE_KEY = "<<";
183993
- var merge2 = {
186323
+ var merge3 = {
183994
186324
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
183995
186325
  default: "key",
183996
186326
  tag: "tag:yaml.org,2002:merge",
@@ -184000,7 +186330,7 @@ var require_merge3 = __commonJS((exports) => {
184000
186330
  }),
184001
186331
  stringify: () => MERGE_KEY
184002
186332
  };
184003
- 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);
186333
+ 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);
184004
186334
  function addMergeToJSMap(ctx, map2, value) {
184005
186335
  const source2 = resolveAliasValue(ctx, value);
184006
186336
  if (identity.isSeq(source2))
@@ -184039,21 +186369,21 @@ var require_merge3 = __commonJS((exports) => {
184039
186369
  }
184040
186370
  exports.addMergeToJSMap = addMergeToJSMap;
184041
186371
  exports.isMergeKey = isMergeKey;
184042
- exports.merge = merge2;
186372
+ exports.merge = merge3;
184043
186373
  });
184044
186374
 
184045
186375
  // ../workflow-yaml/node_modules/yaml/dist/nodes/addPairToJSMap.js
184046
186376
  var require_addPairToJSMap2 = __commonJS((exports) => {
184047
186377
  var log = require_log2();
184048
- var merge2 = require_merge3();
186378
+ var merge3 = require_merge3();
184049
186379
  var stringify = require_stringify3();
184050
186380
  var identity = require_identity2();
184051
186381
  var toJS = require_toJS2();
184052
186382
  function addPairToJSMap(ctx, map2, { key: key2, value }) {
184053
186383
  if (identity.isNode(key2) && key2.addToJSMap)
184054
186384
  key2.addToJSMap(ctx, map2, value);
184055
- else if (merge2.isMergeKey(ctx, key2))
184056
- merge2.addMergeToJSMap(ctx, map2, value);
186385
+ else if (merge3.isMergeKey(ctx, key2))
186386
+ merge3.addMergeToJSMap(ctx, map2, value);
184057
186387
  else {
184058
186388
  const jsKey = toJS.toJS(key2, "", ctx);
184059
186389
  if (map2 instanceof Map) {
@@ -185329,7 +187659,7 @@ var require_schema6 = __commonJS((exports) => {
185329
187659
  var bool = require_bool4();
185330
187660
  var float = require_float4();
185331
187661
  var int2 = require_int4();
185332
- var merge2 = require_merge3();
187662
+ var merge3 = require_merge3();
185333
187663
  var omap = require_omap2();
185334
187664
  var pairs = require_pairs2();
185335
187665
  var set2 = require_set2();
@@ -185349,7 +187679,7 @@ var require_schema6 = __commonJS((exports) => {
185349
187679
  float.floatExp,
185350
187680
  float.float,
185351
187681
  binary.binary,
185352
- merge2.merge,
187682
+ merge3.merge,
185353
187683
  omap.omap,
185354
187684
  pairs.pairs,
185355
187685
  set2.set,
@@ -185372,7 +187702,7 @@ var require_tags2 = __commonJS((exports) => {
185372
187702
  var schema = require_schema4();
185373
187703
  var schema$1 = require_schema5();
185374
187704
  var binary = require_binary2();
185375
- var merge2 = require_merge3();
187705
+ var merge3 = require_merge3();
185376
187706
  var omap = require_omap2();
185377
187707
  var pairs = require_pairs2();
185378
187708
  var schema$2 = require_schema6();
@@ -185397,7 +187727,7 @@ var require_tags2 = __commonJS((exports) => {
185397
187727
  intOct: int2.intOct,
185398
187728
  intTime: timestamp.intTime,
185399
187729
  map: map2.map,
185400
- merge: merge2.merge,
187730
+ merge: merge3.merge,
185401
187731
  null: _null4.nullTag,
185402
187732
  omap: omap.omap,
185403
187733
  pairs: pairs.pairs,
@@ -185407,7 +187737,7 @@ var require_tags2 = __commonJS((exports) => {
185407
187737
  };
185408
187738
  var coreKnownTags = {
185409
187739
  "tag:yaml.org,2002:binary": binary.binary,
185410
- "tag:yaml.org,2002:merge": merge2.merge,
187740
+ "tag:yaml.org,2002:merge": merge3.merge,
185411
187741
  "tag:yaml.org,2002:omap": omap.omap,
185412
187742
  "tag:yaml.org,2002:pairs": pairs.pairs,
185413
187743
  "tag:yaml.org,2002:set": set2.set,
@@ -185416,7 +187746,7 @@ var require_tags2 = __commonJS((exports) => {
185416
187746
  function getTags(customTags, schemaName, addMergeTag) {
185417
187747
  const schemaTags = schemas3.get(schemaName);
185418
187748
  if (schemaTags && !customTags) {
185419
- return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
187749
+ return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
185420
187750
  }
185421
187751
  let tags = schemaTags;
185422
187752
  if (!tags) {
@@ -185434,7 +187764,7 @@ var require_tags2 = __commonJS((exports) => {
185434
187764
  tags = customTags(tags.slice());
185435
187765
  }
185436
187766
  if (addMergeTag)
185437
- tags = tags.concat(merge2.merge);
187767
+ tags = tags.concat(merge3.merge);
185438
187768
  return tags.reduce((tags2, tag) => {
185439
187769
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
185440
187770
  if (!tagObj) {
@@ -185461,11 +187791,11 @@ var require_Schema2 = __commonJS((exports) => {
185461
187791
  var sortMapEntriesByKey = (a5, b8) => a5.key < b8.key ? -1 : a5.key > b8.key ? 1 : 0;
185462
187792
 
185463
187793
  class Schema2 {
185464
- constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
187794
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
185465
187795
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
185466
187796
  this.name = typeof schema === "string" && schema || "core";
185467
187797
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
185468
- this.tags = tags.getTags(customTags, this.name, merge2);
187798
+ this.tags = tags.getTags(customTags, this.name, merge3);
185469
187799
  this.toStringOptions = toStringDefaults ?? null;
185470
187800
  Object.defineProperty(this, identity.MAP, { value: map2.map });
185471
187801
  Object.defineProperty(this, identity.SCALAR, { value: string4.string });
@@ -186688,13 +189018,13 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
186688
189018
  return { mode, indent: indent3, chomp, comment, length };
186689
189019
  }
186690
189020
  function splitLines2(source2) {
186691
- const split2 = source2.split(/\n( *)/);
186692
- const first = split2[0];
189021
+ const split3 = source2.split(/\n( *)/);
189022
+ const first = split3[0];
186693
189023
  const m7 = first.match(/^( *)/);
186694
189024
  const line0 = m7?.[1] ? [m7[1], first.slice(m7[1].length)] : ["", first];
186695
189025
  const lines = [line0];
186696
- for (let i5 = 1;i5 < split2.length; i5 += 2)
186697
- lines.push([split2[i5], split2[i5 + 1]]);
189026
+ for (let i5 = 1;i5 < split3.length; i5 += 2)
189027
+ lines.push([split3[i5], split3[i5 + 1]]);
186698
189028
  return lines;
186699
189029
  }
186700
189030
  exports.resolveBlockScalar = resolveBlockScalar;
@@ -189362,7 +191692,7 @@ import { fileURLToPath as fileURLToPath9 } from "url";
189362
191692
  // package.json
189363
191693
  var package_default = {
189364
191694
  name: "@eigenpal/cli",
189365
- version: "0.11.1",
191695
+ version: "0.11.3",
189366
191696
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
189367
191697
  keywords: [
189368
191698
  "eigenpal",
@@ -190887,7 +193217,7 @@ async function pushCurrentBranch(input) {
190887
193217
  function slugifyPackageSegment(value) {
190888
193218
  return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
190889
193219
  }
190890
- function packagePathForTemplate(template, name) {
193220
+ function packagePathForTemplate(template2, name) {
190891
193221
  const slug = slugifyPackageSegment(name);
190892
193222
  if (!slug)
190893
193223
  throw new Error("Package name must include at least one letter or number.");
@@ -190899,7 +193229,7 @@ function packagePathForTemplate(template, name) {
190899
193229
  knowledge: "resources/knowledge",
190900
193230
  evaluator: "evaluators"
190901
193231
  };
190902
- const root = rootByTemplate[template];
193232
+ const root = rootByTemplate[template2];
190903
193233
  if (!root)
190904
193234
  throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
190905
193235
  return SourcePackagePathSchema.parse(`${root}/${slug}`);
@@ -191330,12 +193660,12 @@ function archivePackage(input) {
191330
193660
  runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
191331
193661
  cwd: input.gitRoot
191332
193662
  });
191333
- const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
193663
+ const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
191334
193664
  cwd: input.outDir,
191335
193665
  encoding: "utf8"
191336
193666
  });
191337
- if (extract.status !== 0)
191338
- throw new Error(extract.stderr.trim() || "tar extraction failed");
193667
+ if (extract2.status !== 0)
193668
+ throw new Error(extract2.stderr.trim() || "tar extraction failed");
191339
193669
  } finally {
191340
193670
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
191341
193671
  }
@@ -191364,12 +193694,12 @@ async function tryHostedArchive(input) {
191364
193694
  const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
191365
193695
  try {
191366
193696
  writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
191367
- const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
193697
+ const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
191368
193698
  cwd: input.outDir,
191369
193699
  encoding: "utf8"
191370
193700
  });
191371
- if (extract.status !== 0)
191372
- throw new Error(extract.stderr.trim() || "tar extraction failed");
193701
+ if (extract2.status !== 0)
193702
+ throw new Error(extract2.stderr.trim() || "tar extraction failed");
191373
193703
  return true;
191374
193704
  } finally {
191375
193705
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
@@ -196350,18 +198680,18 @@ async function init(name, opts) {
196350
198680
  if (existsSync13(target) && readdirSync4(target).length > 0) {
196351
198681
  throw new Error(`Target directory ${relative2(process.cwd(), target)} exists and is not empty.`);
196352
198682
  }
196353
- let template;
198683
+ let template2;
196354
198684
  if (opts.template) {
196355
198685
  if (!isTemplateName(opts.template)) {
196356
198686
  throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
196357
198687
  }
196358
- template = opts.template;
198688
+ template2 = opts.template;
196359
198689
  } else if (opts.yes || !process.stdin.isTTY) {
196360
- template = "blank";
198690
+ template2 = "blank";
196361
198691
  } else {
196362
- template = await promptForTemplate();
198692
+ template2 = await promptForTemplate();
196363
198693
  }
196364
- const sourceRoot = join7(resolveTemplatesRoot(), template);
198694
+ const sourceRoot = join7(resolveTemplatesRoot(), template2);
196365
198695
  if (!existsSync13(sourceRoot)) {
196366
198696
  throw new Error(`Template directory missing on disk: ${sourceRoot}`);
196367
198697
  }