@eigenpal/cli 0.10.45 → 0.10.46

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