@eigenpal/cli 0.10.46 → 0.10.48

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