@eigenpal/cli 0.10.17 → 0.10.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -17080,8 +17080,139 @@ var require_picocolors = __commonJS((exports, module) => {
17080
17080
  module.exports.createColors = createColors;
17081
17081
  });
17082
17082
 
17083
+ // ../../node_modules/nanoid/url-alphabet/index.js
17084
+ var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
17085
+
17086
+ // ../../node_modules/nanoid/index.js
17087
+ import { webcrypto as crypto } from "node:crypto";
17088
+ function fillPool(bytes) {
17089
+ if (!pool || pool.length < bytes) {
17090
+ pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
17091
+ crypto.getRandomValues(pool);
17092
+ poolOffset = 0;
17093
+ } else if (poolOffset + bytes > pool.length) {
17094
+ crypto.getRandomValues(pool);
17095
+ poolOffset = 0;
17096
+ }
17097
+ poolOffset += bytes;
17098
+ }
17099
+ function nanoid3(size = 21) {
17100
+ fillPool(size |= 0);
17101
+ let id = "";
17102
+ for (let i = poolOffset - size;i < poolOffset; i++) {
17103
+ id += urlAlphabet[pool[i] & 63];
17104
+ }
17105
+ return id;
17106
+ }
17107
+ var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
17108
+ var init_nanoid = () => {};
17109
+
17110
+ // ../types/src/core/common.ts
17111
+ function generateId(prefix) {
17112
+ const id = nanoid3();
17113
+ return prefix ? `${prefix}_${id}` : id;
17114
+ }
17115
+ function toJsonSchema(schema) {
17116
+ return exports_external.toJSONSchema(schema, { target: "draft-7" });
17117
+ }
17118
+ var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
17119
+ var init_common = __esm(() => {
17120
+ init_nanoid();
17121
+ init_zod();
17122
+ ID_PREFIXES = {
17123
+ WORKFLOW: "wf",
17124
+ WORKFLOW_VERSION: "wfv",
17125
+ WORKFLOW_HISTORY: "wfh",
17126
+ JOB: "job",
17127
+ EXECUTION: "exec",
17128
+ STEP_EXECUTION: "step",
17129
+ FILE: "file",
17130
+ TEMPLATE: "tmpl",
17131
+ USER: "user",
17132
+ TENANT: "org",
17133
+ TENANT_INVITE: "inv",
17134
+ API_KEY: "eig",
17135
+ PROCESSOR: "proc",
17136
+ AI_PROVIDER: "aip",
17137
+ ACCOUNT: "acct",
17138
+ SESSION: "sess",
17139
+ VERIFICATION: "vrf",
17140
+ DATASET: "ds",
17141
+ DATASET_EXAMPLE: "dex",
17142
+ EXPERIMENT: "exp",
17143
+ EXPERIMENT_RUN: "exr",
17144
+ EXPERIMENT_EVALUATION: "evl",
17145
+ EVAL_EXAMPLE: "evx",
17146
+ EVAL_RESULT: "evr",
17147
+ EVAL_BATCH: "evb",
17148
+ RUN_REVIEW: "rev",
17149
+ RUN_REVIEW_CORRECTION: "rvc",
17150
+ TABLE_ROW: "row",
17151
+ FOLDER: "fldr",
17152
+ AGENT_WORKFLOW: "awf",
17153
+ AGENT_EXECUTION: "aex",
17154
+ AGENT_EXAMPLE: "aeg",
17155
+ AGENT_VERSION: "avr",
17156
+ AGENT_TRAINING_SESSION: "ats",
17157
+ AGENT_EXPERIMENT: "aexp",
17158
+ AGENT_EMAIL_ALIAS: "aea",
17159
+ AGENT_EMAIL_INVOCATION: "aei",
17160
+ AUTOMATION_TRIGGER: "atr",
17161
+ FILE_SOURCE_CONFIG: "fsc",
17162
+ SANDBOX_WS_TOKEN: "sws"
17163
+ };
17164
+ TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
17165
+ return typeof val === "string" ? new Date(val) : val;
17166
+ });
17167
+ JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
17168
+ BaseEntitySchema = exports_external.object({
17169
+ id: exports_external.string(),
17170
+ createdAt: TimestampSchema.optional(),
17171
+ updatedAt: TimestampSchema.optional()
17172
+ });
17173
+ });
17174
+
17175
+ // ../types/src/core/ids.ts
17176
+ var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
17177
+ var init_ids = __esm(() => {
17178
+ PROCESSOR_IDS = {
17179
+ MERGE: "builtin/merge",
17180
+ DOCUMENT_PARSER: "builtin/parser",
17181
+ EXTRACT: "builtin/extract",
17182
+ SPLIT: "builtin/split",
17183
+ SEGMENT: "builtin/segment",
17184
+ CLASSIFY: "builtin/classify",
17185
+ TEMPLATE: "builtin/template",
17186
+ PDF_EMBEDDER: "builtin/pdf-embedder",
17187
+ XLSX_TO_JSON: "builtin/xlsx-to-json"
17188
+ };
17189
+ PARSER_IDS = {
17190
+ KREUZBERG: "builtin/kreuzberg",
17191
+ OCR: "builtin/ocr",
17192
+ LLM_VISION: "builtin/llm-vision"
17193
+ };
17194
+ INPUT_KINDS = {
17195
+ DOCUMENT: "document",
17196
+ PAYLOAD: "payload"
17197
+ };
17198
+ });
17199
+
17200
+ // ../types/src/core/pagination.ts
17201
+ var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
17202
+ var init_pagination = __esm(() => {
17203
+ init_zod();
17204
+ PaginationParamsSchema = exports_external.object({
17205
+ limit: exports_external.coerce.number().int().min(1).max(100).default(50),
17206
+ offset: exports_external.coerce.number().int().min(0).default(0)
17207
+ });
17208
+ });
17209
+
17083
17210
  // ../types/src/core/index.ts
17084
- var init_core3 = () => {};
17211
+ var init_core3 = __esm(() => {
17212
+ init_common();
17213
+ init_ids();
17214
+ init_pagination();
17215
+ });
17085
17216
 
17086
17217
  // ../types/src/files/legacy-boundary.ts
17087
17218
  var LEGACY_FILE_REF_COMPATIBILITY;
@@ -17106,6 +17237,9 @@ var init_legacy_boundary = __esm(() => {
17106
17237
  function isRuntimeFileRef(input) {
17107
17238
  return RuntimeFileRefSchema.safeParse(input).success;
17108
17239
  }
17240
+ function isFilePathDescriptor(input) {
17241
+ return FilePathDescriptorSchema.safeParse(input).success;
17242
+ }
17109
17243
  function isResolvedProcessorFile(input) {
17110
17244
  return ResolvedProcessorFileSchema.safeParse(input).success;
17111
17245
  }
@@ -17328,11 +17462,2411 @@ var init_scoped_file_ref = __esm(() => {
17328
17462
  ]);
17329
17463
  });
17330
17464
 
17465
+ // ../../node_modules/@opentelemetry/api/build/src/version.js
17466
+ var require_version = __commonJS((exports) => {
17467
+ Object.defineProperty(exports, "__esModule", { value: true });
17468
+ exports.VERSION = undefined;
17469
+ exports.VERSION = "1.9.1";
17470
+ });
17471
+
17472
+ // ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
17473
+ var require_semver = __commonJS((exports) => {
17474
+ Object.defineProperty(exports, "__esModule", { value: true });
17475
+ exports.isCompatible = exports._makeCompatibilityCheck = undefined;
17476
+ var version_1 = require_version();
17477
+ var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
17478
+ function _makeCompatibilityCheck(ownVersion) {
17479
+ const acceptedVersions = new Set([ownVersion]);
17480
+ const rejectedVersions = new Set;
17481
+ const myVersionMatch = ownVersion.match(re);
17482
+ if (!myVersionMatch) {
17483
+ return () => false;
17484
+ }
17485
+ const ownVersionParsed = {
17486
+ major: +myVersionMatch[1],
17487
+ minor: +myVersionMatch[2],
17488
+ patch: +myVersionMatch[3],
17489
+ prerelease: myVersionMatch[4]
17490
+ };
17491
+ if (ownVersionParsed.prerelease != null) {
17492
+ return function isExactmatch(globalVersion) {
17493
+ return globalVersion === ownVersion;
17494
+ };
17495
+ }
17496
+ function _reject(v) {
17497
+ rejectedVersions.add(v);
17498
+ return false;
17499
+ }
17500
+ function _accept(v) {
17501
+ acceptedVersions.add(v);
17502
+ return true;
17503
+ }
17504
+ return function isCompatible(globalVersion) {
17505
+ if (acceptedVersions.has(globalVersion)) {
17506
+ return true;
17507
+ }
17508
+ if (rejectedVersions.has(globalVersion)) {
17509
+ return false;
17510
+ }
17511
+ const globalVersionMatch = globalVersion.match(re);
17512
+ if (!globalVersionMatch) {
17513
+ return _reject(globalVersion);
17514
+ }
17515
+ const globalVersionParsed = {
17516
+ major: +globalVersionMatch[1],
17517
+ minor: +globalVersionMatch[2],
17518
+ patch: +globalVersionMatch[3],
17519
+ prerelease: globalVersionMatch[4]
17520
+ };
17521
+ if (globalVersionParsed.prerelease != null) {
17522
+ return _reject(globalVersion);
17523
+ }
17524
+ if (ownVersionParsed.major !== globalVersionParsed.major) {
17525
+ return _reject(globalVersion);
17526
+ }
17527
+ if (ownVersionParsed.major === 0) {
17528
+ if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
17529
+ return _accept(globalVersion);
17530
+ }
17531
+ return _reject(globalVersion);
17532
+ }
17533
+ if (ownVersionParsed.minor <= globalVersionParsed.minor) {
17534
+ return _accept(globalVersion);
17535
+ }
17536
+ return _reject(globalVersion);
17537
+ };
17538
+ }
17539
+ exports._makeCompatibilityCheck = _makeCompatibilityCheck;
17540
+ exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
17541
+ });
17542
+
17543
+ // ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
17544
+ var require_global_utils = __commonJS((exports) => {
17545
+ Object.defineProperty(exports, "__esModule", { value: true });
17546
+ exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
17547
+ var version_1 = require_version();
17548
+ var semver_1 = require_semver();
17549
+ var major = version_1.VERSION.split(".")[0];
17550
+ var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
17551
+ var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
17552
+ function registerGlobal(type, instance, diag, allowOverride = false) {
17553
+ var _a3;
17554
+ const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
17555
+ version: version_1.VERSION
17556
+ };
17557
+ if (!allowOverride && api2[type]) {
17558
+ const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
17559
+ diag.error(err.stack || err.message);
17560
+ return false;
17561
+ }
17562
+ if (api2.version !== version_1.VERSION) {
17563
+ const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
17564
+ diag.error(err.stack || err.message);
17565
+ return false;
17566
+ }
17567
+ api2[type] = instance;
17568
+ diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
17569
+ return true;
17570
+ }
17571
+ exports.registerGlobal = registerGlobal;
17572
+ function getGlobal(type) {
17573
+ var _a3, _b;
17574
+ const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
17575
+ if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
17576
+ return;
17577
+ }
17578
+ return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
17579
+ }
17580
+ exports.getGlobal = getGlobal;
17581
+ function unregisterGlobal(type, diag) {
17582
+ diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
17583
+ const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
17584
+ if (api2) {
17585
+ delete api2[type];
17586
+ }
17587
+ }
17588
+ exports.unregisterGlobal = unregisterGlobal;
17589
+ });
17590
+
17591
+ // ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
17592
+ var require_ComponentLogger = __commonJS((exports) => {
17593
+ Object.defineProperty(exports, "__esModule", { value: true });
17594
+ exports.DiagComponentLogger = undefined;
17595
+ var global_utils_1 = require_global_utils();
17596
+
17597
+ class DiagComponentLogger {
17598
+ constructor(props) {
17599
+ this._namespace = props.namespace || "DiagComponentLogger";
17600
+ }
17601
+ debug(...args) {
17602
+ return logProxy("debug", this._namespace, args);
17603
+ }
17604
+ error(...args) {
17605
+ return logProxy("error", this._namespace, args);
17606
+ }
17607
+ info(...args) {
17608
+ return logProxy("info", this._namespace, args);
17609
+ }
17610
+ warn(...args) {
17611
+ return logProxy("warn", this._namespace, args);
17612
+ }
17613
+ verbose(...args) {
17614
+ return logProxy("verbose", this._namespace, args);
17615
+ }
17616
+ }
17617
+ exports.DiagComponentLogger = DiagComponentLogger;
17618
+ function logProxy(funcName, namespace, args) {
17619
+ const logger = (0, global_utils_1.getGlobal)("diag");
17620
+ if (!logger) {
17621
+ return;
17622
+ }
17623
+ return logger[funcName](namespace, ...args);
17624
+ }
17625
+ });
17626
+
17627
+ // ../../node_modules/@opentelemetry/api/build/src/diag/types.js
17628
+ var require_types = __commonJS((exports) => {
17629
+ Object.defineProperty(exports, "__esModule", { value: true });
17630
+ exports.DiagLogLevel = undefined;
17631
+ var DiagLogLevel;
17632
+ (function(DiagLogLevel2) {
17633
+ DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
17634
+ DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
17635
+ DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
17636
+ DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
17637
+ DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
17638
+ DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
17639
+ DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
17640
+ })(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
17641
+ });
17642
+
17643
+ // ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
17644
+ var require_logLevelLogger = __commonJS((exports) => {
17645
+ Object.defineProperty(exports, "__esModule", { value: true });
17646
+ exports.createLogLevelDiagLogger = undefined;
17647
+ var types_1 = require_types();
17648
+ function createLogLevelDiagLogger(maxLevel, logger) {
17649
+ if (maxLevel < types_1.DiagLogLevel.NONE) {
17650
+ maxLevel = types_1.DiagLogLevel.NONE;
17651
+ } else if (maxLevel > types_1.DiagLogLevel.ALL) {
17652
+ maxLevel = types_1.DiagLogLevel.ALL;
17653
+ }
17654
+ logger = logger || {};
17655
+ function _filterFunc(funcName, theLevel) {
17656
+ const theFunc = logger[funcName];
17657
+ if (typeof theFunc === "function" && maxLevel >= theLevel) {
17658
+ return theFunc.bind(logger);
17659
+ }
17660
+ return function() {};
17661
+ }
17662
+ return {
17663
+ error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
17664
+ warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
17665
+ info: _filterFunc("info", types_1.DiagLogLevel.INFO),
17666
+ debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
17667
+ verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
17668
+ };
17669
+ }
17670
+ exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
17671
+ });
17672
+
17673
+ // ../../node_modules/@opentelemetry/api/build/src/api/diag.js
17674
+ var require_diag = __commonJS((exports) => {
17675
+ Object.defineProperty(exports, "__esModule", { value: true });
17676
+ exports.DiagAPI = undefined;
17677
+ var ComponentLogger_1 = require_ComponentLogger();
17678
+ var logLevelLogger_1 = require_logLevelLogger();
17679
+ var types_1 = require_types();
17680
+ var global_utils_1 = require_global_utils();
17681
+ var API_NAME = "diag";
17682
+
17683
+ class DiagAPI {
17684
+ static instance() {
17685
+ if (!this._instance) {
17686
+ this._instance = new DiagAPI;
17687
+ }
17688
+ return this._instance;
17689
+ }
17690
+ constructor() {
17691
+ function _logProxy(funcName) {
17692
+ return function(...args) {
17693
+ const logger = (0, global_utils_1.getGlobal)("diag");
17694
+ if (!logger)
17695
+ return;
17696
+ return logger[funcName](...args);
17697
+ };
17698
+ }
17699
+ const self2 = this;
17700
+ const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
17701
+ var _a3, _b, _c;
17702
+ if (logger === self2) {
17703
+ const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
17704
+ self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
17705
+ return false;
17706
+ }
17707
+ if (typeof optionsOrLogLevel === "number") {
17708
+ optionsOrLogLevel = {
17709
+ logLevel: optionsOrLogLevel
17710
+ };
17711
+ }
17712
+ const oldLogger = (0, global_utils_1.getGlobal)("diag");
17713
+ const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
17714
+ if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
17715
+ const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
17716
+ oldLogger.warn(`Current logger will be overwritten from ${stack}`);
17717
+ newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
17718
+ }
17719
+ return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
17720
+ };
17721
+ self2.setLogger = setLogger;
17722
+ self2.disable = () => {
17723
+ (0, global_utils_1.unregisterGlobal)(API_NAME, self2);
17724
+ };
17725
+ self2.createComponentLogger = (options) => {
17726
+ return new ComponentLogger_1.DiagComponentLogger(options);
17727
+ };
17728
+ self2.verbose = _logProxy("verbose");
17729
+ self2.debug = _logProxy("debug");
17730
+ self2.info = _logProxy("info");
17731
+ self2.warn = _logProxy("warn");
17732
+ self2.error = _logProxy("error");
17733
+ }
17734
+ }
17735
+ exports.DiagAPI = DiagAPI;
17736
+ });
17737
+
17738
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
17739
+ var require_baggage_impl = __commonJS((exports) => {
17740
+ Object.defineProperty(exports, "__esModule", { value: true });
17741
+ exports.BaggageImpl = undefined;
17742
+
17743
+ class BaggageImpl {
17744
+ constructor(entries) {
17745
+ this._entries = entries ? new Map(entries) : new Map;
17746
+ }
17747
+ getEntry(key) {
17748
+ const entry = this._entries.get(key);
17749
+ if (!entry) {
17750
+ return;
17751
+ }
17752
+ return Object.assign({}, entry);
17753
+ }
17754
+ getAllEntries() {
17755
+ return Array.from(this._entries.entries());
17756
+ }
17757
+ setEntry(key, entry) {
17758
+ const newBaggage = new BaggageImpl(this._entries);
17759
+ newBaggage._entries.set(key, entry);
17760
+ return newBaggage;
17761
+ }
17762
+ removeEntry(key) {
17763
+ const newBaggage = new BaggageImpl(this._entries);
17764
+ newBaggage._entries.delete(key);
17765
+ return newBaggage;
17766
+ }
17767
+ removeEntries(...keys) {
17768
+ const newBaggage = new BaggageImpl(this._entries);
17769
+ for (const key of keys) {
17770
+ newBaggage._entries.delete(key);
17771
+ }
17772
+ return newBaggage;
17773
+ }
17774
+ clear() {
17775
+ return new BaggageImpl;
17776
+ }
17777
+ }
17778
+ exports.BaggageImpl = BaggageImpl;
17779
+ });
17780
+
17781
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
17782
+ var require_symbol = __commonJS((exports) => {
17783
+ Object.defineProperty(exports, "__esModule", { value: true });
17784
+ exports.baggageEntryMetadataSymbol = undefined;
17785
+ exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
17786
+ });
17787
+
17788
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
17789
+ var require_utils = __commonJS((exports) => {
17790
+ Object.defineProperty(exports, "__esModule", { value: true });
17791
+ exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
17792
+ var diag_1 = require_diag();
17793
+ var baggage_impl_1 = require_baggage_impl();
17794
+ var symbol_1 = require_symbol();
17795
+ var diag = diag_1.DiagAPI.instance();
17796
+ function createBaggage(entries = {}) {
17797
+ return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
17798
+ }
17799
+ exports.createBaggage = createBaggage;
17800
+ function baggageEntryMetadataFromString(str) {
17801
+ if (typeof str !== "string") {
17802
+ diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
17803
+ str = "";
17804
+ }
17805
+ return {
17806
+ __TYPE__: symbol_1.baggageEntryMetadataSymbol,
17807
+ toString() {
17808
+ return str;
17809
+ }
17810
+ };
17811
+ }
17812
+ exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
17813
+ });
17814
+
17815
+ // ../../node_modules/@opentelemetry/api/build/src/context/context.js
17816
+ var require_context = __commonJS((exports) => {
17817
+ Object.defineProperty(exports, "__esModule", { value: true });
17818
+ exports.ROOT_CONTEXT = exports.createContextKey = undefined;
17819
+ function createContextKey(description) {
17820
+ return Symbol.for(description);
17821
+ }
17822
+ exports.createContextKey = createContextKey;
17823
+
17824
+ class BaseContext {
17825
+ constructor(parentContext) {
17826
+ const self2 = this;
17827
+ self2._currentContext = parentContext ? new Map(parentContext) : new Map;
17828
+ self2.getValue = (key) => self2._currentContext.get(key);
17829
+ self2.setValue = (key, value) => {
17830
+ const context = new BaseContext(self2._currentContext);
17831
+ context._currentContext.set(key, value);
17832
+ return context;
17833
+ };
17834
+ self2.deleteValue = (key) => {
17835
+ const context = new BaseContext(self2._currentContext);
17836
+ context._currentContext.delete(key);
17837
+ return context;
17838
+ };
17839
+ }
17840
+ }
17841
+ exports.ROOT_CONTEXT = new BaseContext;
17842
+ });
17843
+
17844
+ // ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
17845
+ var require_consoleLogger = __commonJS((exports) => {
17846
+ Object.defineProperty(exports, "__esModule", { value: true });
17847
+ exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
17848
+ var consoleMap = [
17849
+ { n: "error", c: "error" },
17850
+ { n: "warn", c: "warn" },
17851
+ { n: "info", c: "info" },
17852
+ { n: "debug", c: "debug" },
17853
+ { n: "verbose", c: "trace" }
17854
+ ];
17855
+ exports._originalConsoleMethods = {};
17856
+ if (typeof console !== "undefined") {
17857
+ const keys = [
17858
+ "error",
17859
+ "warn",
17860
+ "info",
17861
+ "debug",
17862
+ "trace",
17863
+ "log"
17864
+ ];
17865
+ for (const key of keys) {
17866
+ if (typeof console[key] === "function") {
17867
+ exports._originalConsoleMethods[key] = console[key];
17868
+ }
17869
+ }
17870
+ }
17871
+
17872
+ class DiagConsoleLogger {
17873
+ constructor() {
17874
+ function _consoleFunc(funcName) {
17875
+ return function(...args) {
17876
+ let theFunc = exports._originalConsoleMethods[funcName];
17877
+ if (typeof theFunc !== "function") {
17878
+ theFunc = exports._originalConsoleMethods["log"];
17879
+ }
17880
+ if (typeof theFunc !== "function" && console) {
17881
+ theFunc = console[funcName];
17882
+ if (typeof theFunc !== "function") {
17883
+ theFunc = console.log;
17884
+ }
17885
+ }
17886
+ if (typeof theFunc === "function") {
17887
+ return theFunc.apply(console, args);
17888
+ }
17889
+ };
17890
+ }
17891
+ for (let i = 0;i < consoleMap.length; i++) {
17892
+ this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
17893
+ }
17894
+ }
17895
+ }
17896
+ exports.DiagConsoleLogger = DiagConsoleLogger;
17897
+ });
17898
+
17899
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
17900
+ var require_NoopMeter = __commonJS((exports) => {
17901
+ Object.defineProperty(exports, "__esModule", { value: true });
17902
+ 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;
17903
+
17904
+ class NoopMeter {
17905
+ constructor() {}
17906
+ createGauge(_name, _options) {
17907
+ return exports.NOOP_GAUGE_METRIC;
17908
+ }
17909
+ createHistogram(_name, _options) {
17910
+ return exports.NOOP_HISTOGRAM_METRIC;
17911
+ }
17912
+ createCounter(_name, _options) {
17913
+ return exports.NOOP_COUNTER_METRIC;
17914
+ }
17915
+ createUpDownCounter(_name, _options) {
17916
+ return exports.NOOP_UP_DOWN_COUNTER_METRIC;
17917
+ }
17918
+ createObservableGauge(_name, _options) {
17919
+ return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
17920
+ }
17921
+ createObservableCounter(_name, _options) {
17922
+ return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
17923
+ }
17924
+ createObservableUpDownCounter(_name, _options) {
17925
+ return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
17926
+ }
17927
+ addBatchObservableCallback(_callback, _observables) {}
17928
+ removeBatchObservableCallback(_callback) {}
17929
+ }
17930
+ exports.NoopMeter = NoopMeter;
17931
+
17932
+ class NoopMetric {
17933
+ }
17934
+ exports.NoopMetric = NoopMetric;
17935
+
17936
+ class NoopCounterMetric extends NoopMetric {
17937
+ add(_value, _attributes) {}
17938
+ }
17939
+ exports.NoopCounterMetric = NoopCounterMetric;
17940
+
17941
+ class NoopUpDownCounterMetric extends NoopMetric {
17942
+ add(_value, _attributes) {}
17943
+ }
17944
+ exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
17945
+
17946
+ class NoopGaugeMetric extends NoopMetric {
17947
+ record(_value, _attributes) {}
17948
+ }
17949
+ exports.NoopGaugeMetric = NoopGaugeMetric;
17950
+
17951
+ class NoopHistogramMetric extends NoopMetric {
17952
+ record(_value, _attributes) {}
17953
+ }
17954
+ exports.NoopHistogramMetric = NoopHistogramMetric;
17955
+
17956
+ class NoopObservableMetric {
17957
+ addCallback(_callback) {}
17958
+ removeCallback(_callback) {}
17959
+ }
17960
+ exports.NoopObservableMetric = NoopObservableMetric;
17961
+
17962
+ class NoopObservableCounterMetric extends NoopObservableMetric {
17963
+ }
17964
+ exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
17965
+
17966
+ class NoopObservableGaugeMetric extends NoopObservableMetric {
17967
+ }
17968
+ exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
17969
+
17970
+ class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
17971
+ }
17972
+ exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
17973
+ exports.NOOP_METER = new NoopMeter;
17974
+ exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
17975
+ exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
17976
+ exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
17977
+ exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
17978
+ exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
17979
+ exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
17980
+ exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
17981
+ function createNoopMeter() {
17982
+ return exports.NOOP_METER;
17983
+ }
17984
+ exports.createNoopMeter = createNoopMeter;
17985
+ });
17986
+
17987
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
17988
+ var require_Metric = __commonJS((exports) => {
17989
+ Object.defineProperty(exports, "__esModule", { value: true });
17990
+ exports.ValueType = undefined;
17991
+ var ValueType;
17992
+ (function(ValueType2) {
17993
+ ValueType2[ValueType2["INT"] = 0] = "INT";
17994
+ ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
17995
+ })(ValueType = exports.ValueType || (exports.ValueType = {}));
17996
+ });
17997
+
17998
+ // ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
17999
+ var require_TextMapPropagator = __commonJS((exports) => {
18000
+ Object.defineProperty(exports, "__esModule", { value: true });
18001
+ exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
18002
+ exports.defaultTextMapGetter = {
18003
+ get(carrier, key) {
18004
+ if (carrier == null) {
18005
+ return;
18006
+ }
18007
+ return carrier[key];
18008
+ },
18009
+ keys(carrier) {
18010
+ if (carrier == null) {
18011
+ return [];
18012
+ }
18013
+ return Object.keys(carrier);
18014
+ }
18015
+ };
18016
+ exports.defaultTextMapSetter = {
18017
+ set(carrier, key, value) {
18018
+ if (carrier == null) {
18019
+ return;
18020
+ }
18021
+ carrier[key] = value;
18022
+ }
18023
+ };
18024
+ });
18025
+
18026
+ // ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
18027
+ var require_NoopContextManager = __commonJS((exports) => {
18028
+ Object.defineProperty(exports, "__esModule", { value: true });
18029
+ exports.NoopContextManager = undefined;
18030
+ var context_1 = require_context();
18031
+
18032
+ class NoopContextManager {
18033
+ active() {
18034
+ return context_1.ROOT_CONTEXT;
18035
+ }
18036
+ with(_context, fn, thisArg, ...args) {
18037
+ return fn.call(thisArg, ...args);
18038
+ }
18039
+ bind(_context, target) {
18040
+ return target;
18041
+ }
18042
+ enable() {
18043
+ return this;
18044
+ }
18045
+ disable() {
18046
+ return this;
18047
+ }
18048
+ }
18049
+ exports.NoopContextManager = NoopContextManager;
18050
+ });
18051
+
18052
+ // ../../node_modules/@opentelemetry/api/build/src/api/context.js
18053
+ var require_context2 = __commonJS((exports) => {
18054
+ Object.defineProperty(exports, "__esModule", { value: true });
18055
+ exports.ContextAPI = undefined;
18056
+ var NoopContextManager_1 = require_NoopContextManager();
18057
+ var global_utils_1 = require_global_utils();
18058
+ var diag_1 = require_diag();
18059
+ var API_NAME = "context";
18060
+ var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
18061
+
18062
+ class ContextAPI {
18063
+ constructor() {}
18064
+ static getInstance() {
18065
+ if (!this._instance) {
18066
+ this._instance = new ContextAPI;
18067
+ }
18068
+ return this._instance;
18069
+ }
18070
+ setGlobalContextManager(contextManager) {
18071
+ return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
18072
+ }
18073
+ active() {
18074
+ return this._getContextManager().active();
18075
+ }
18076
+ with(context, fn, thisArg, ...args) {
18077
+ return this._getContextManager().with(context, fn, thisArg, ...args);
18078
+ }
18079
+ bind(context, target) {
18080
+ return this._getContextManager().bind(context, target);
18081
+ }
18082
+ _getContextManager() {
18083
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
18084
+ }
18085
+ disable() {
18086
+ this._getContextManager().disable();
18087
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18088
+ }
18089
+ }
18090
+ exports.ContextAPI = ContextAPI;
18091
+ });
18092
+
18093
+ // ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
18094
+ var require_trace_flags = __commonJS((exports) => {
18095
+ Object.defineProperty(exports, "__esModule", { value: true });
18096
+ exports.TraceFlags = undefined;
18097
+ var TraceFlags;
18098
+ (function(TraceFlags2) {
18099
+ TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
18100
+ TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
18101
+ })(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
18102
+ });
18103
+
18104
+ // ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
18105
+ var require_invalid_span_constants = __commonJS((exports) => {
18106
+ Object.defineProperty(exports, "__esModule", { value: true });
18107
+ exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
18108
+ var trace_flags_1 = require_trace_flags();
18109
+ exports.INVALID_SPANID = "0000000000000000";
18110
+ exports.INVALID_TRACEID = "00000000000000000000000000000000";
18111
+ exports.INVALID_SPAN_CONTEXT = {
18112
+ traceId: exports.INVALID_TRACEID,
18113
+ spanId: exports.INVALID_SPANID,
18114
+ traceFlags: trace_flags_1.TraceFlags.NONE
18115
+ };
18116
+ });
18117
+
18118
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
18119
+ var require_NonRecordingSpan = __commonJS((exports) => {
18120
+ Object.defineProperty(exports, "__esModule", { value: true });
18121
+ exports.NonRecordingSpan = undefined;
18122
+ var invalid_span_constants_1 = require_invalid_span_constants();
18123
+
18124
+ class NonRecordingSpan {
18125
+ constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
18126
+ this._spanContext = spanContext;
18127
+ }
18128
+ spanContext() {
18129
+ return this._spanContext;
18130
+ }
18131
+ setAttribute(_key, _value) {
18132
+ return this;
18133
+ }
18134
+ setAttributes(_attributes) {
18135
+ return this;
18136
+ }
18137
+ addEvent(_name, _attributes) {
18138
+ return this;
18139
+ }
18140
+ addLink(_link) {
18141
+ return this;
18142
+ }
18143
+ addLinks(_links) {
18144
+ return this;
18145
+ }
18146
+ setStatus(_status) {
18147
+ return this;
18148
+ }
18149
+ updateName(_name) {
18150
+ return this;
18151
+ }
18152
+ end(_endTime) {}
18153
+ isRecording() {
18154
+ return false;
18155
+ }
18156
+ recordException(_exception, _time) {}
18157
+ }
18158
+ exports.NonRecordingSpan = NonRecordingSpan;
18159
+ });
18160
+
18161
+ // ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
18162
+ var require_context_utils = __commonJS((exports) => {
18163
+ Object.defineProperty(exports, "__esModule", { value: true });
18164
+ exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
18165
+ var context_1 = require_context();
18166
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18167
+ var context_2 = require_context2();
18168
+ var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
18169
+ function getSpan(context) {
18170
+ return context.getValue(SPAN_KEY) || undefined;
18171
+ }
18172
+ exports.getSpan = getSpan;
18173
+ function getActiveSpan() {
18174
+ return getSpan(context_2.ContextAPI.getInstance().active());
18175
+ }
18176
+ exports.getActiveSpan = getActiveSpan;
18177
+ function setSpan(context, span) {
18178
+ return context.setValue(SPAN_KEY, span);
18179
+ }
18180
+ exports.setSpan = setSpan;
18181
+ function deleteSpan(context) {
18182
+ return context.deleteValue(SPAN_KEY);
18183
+ }
18184
+ exports.deleteSpan = deleteSpan;
18185
+ function setSpanContext(context, spanContext) {
18186
+ return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
18187
+ }
18188
+ exports.setSpanContext = setSpanContext;
18189
+ function getSpanContext(context) {
18190
+ var _a3;
18191
+ return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
18192
+ }
18193
+ exports.getSpanContext = getSpanContext;
18194
+ });
18195
+
18196
+ // ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
18197
+ var require_spancontext_utils = __commonJS((exports) => {
18198
+ Object.defineProperty(exports, "__esModule", { value: true });
18199
+ exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
18200
+ var invalid_span_constants_1 = require_invalid_span_constants();
18201
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18202
+ var isHex = new Uint8Array([
18203
+ 0,
18204
+ 0,
18205
+ 0,
18206
+ 0,
18207
+ 0,
18208
+ 0,
18209
+ 0,
18210
+ 0,
18211
+ 0,
18212
+ 0,
18213
+ 0,
18214
+ 0,
18215
+ 0,
18216
+ 0,
18217
+ 0,
18218
+ 0,
18219
+ 0,
18220
+ 0,
18221
+ 0,
18222
+ 0,
18223
+ 0,
18224
+ 0,
18225
+ 0,
18226
+ 0,
18227
+ 0,
18228
+ 0,
18229
+ 0,
18230
+ 0,
18231
+ 0,
18232
+ 0,
18233
+ 0,
18234
+ 0,
18235
+ 0,
18236
+ 0,
18237
+ 0,
18238
+ 0,
18239
+ 0,
18240
+ 0,
18241
+ 0,
18242
+ 0,
18243
+ 0,
18244
+ 0,
18245
+ 0,
18246
+ 0,
18247
+ 0,
18248
+ 0,
18249
+ 0,
18250
+ 0,
18251
+ 1,
18252
+ 1,
18253
+ 1,
18254
+ 1,
18255
+ 1,
18256
+ 1,
18257
+ 1,
18258
+ 1,
18259
+ 1,
18260
+ 1,
18261
+ 0,
18262
+ 0,
18263
+ 0,
18264
+ 0,
18265
+ 0,
18266
+ 0,
18267
+ 0,
18268
+ 1,
18269
+ 1,
18270
+ 1,
18271
+ 1,
18272
+ 1,
18273
+ 1,
18274
+ 0,
18275
+ 0,
18276
+ 0,
18277
+ 0,
18278
+ 0,
18279
+ 0,
18280
+ 0,
18281
+ 0,
18282
+ 0,
18283
+ 0,
18284
+ 0,
18285
+ 0,
18286
+ 0,
18287
+ 0,
18288
+ 0,
18289
+ 0,
18290
+ 0,
18291
+ 0,
18292
+ 0,
18293
+ 0,
18294
+ 0,
18295
+ 0,
18296
+ 0,
18297
+ 0,
18298
+ 0,
18299
+ 0,
18300
+ 1,
18301
+ 1,
18302
+ 1,
18303
+ 1,
18304
+ 1,
18305
+ 1
18306
+ ]);
18307
+ function isValidHex(id, length) {
18308
+ if (typeof id !== "string" || id.length !== length)
18309
+ return false;
18310
+ let r = 0;
18311
+ for (let i = 0;i < id.length; i += 4) {
18312
+ r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
18313
+ }
18314
+ return r === length;
18315
+ }
18316
+ function isValidTraceId(traceId) {
18317
+ return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
18318
+ }
18319
+ exports.isValidTraceId = isValidTraceId;
18320
+ function isValidSpanId(spanId) {
18321
+ return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
18322
+ }
18323
+ exports.isValidSpanId = isValidSpanId;
18324
+ function isSpanContextValid(spanContext) {
18325
+ return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
18326
+ }
18327
+ exports.isSpanContextValid = isSpanContextValid;
18328
+ function wrapSpanContext(spanContext) {
18329
+ return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
18330
+ }
18331
+ exports.wrapSpanContext = wrapSpanContext;
18332
+ });
18333
+
18334
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
18335
+ var require_NoopTracer = __commonJS((exports) => {
18336
+ Object.defineProperty(exports, "__esModule", { value: true });
18337
+ exports.NoopTracer = undefined;
18338
+ var context_1 = require_context2();
18339
+ var context_utils_1 = require_context_utils();
18340
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18341
+ var spancontext_utils_1 = require_spancontext_utils();
18342
+ var contextApi = context_1.ContextAPI.getInstance();
18343
+
18344
+ class NoopTracer {
18345
+ startSpan(name, options, context = contextApi.active()) {
18346
+ const root = Boolean(options === null || options === undefined ? undefined : options.root);
18347
+ if (root) {
18348
+ return new NonRecordingSpan_1.NonRecordingSpan;
18349
+ }
18350
+ const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
18351
+ if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
18352
+ return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
18353
+ } else {
18354
+ return new NonRecordingSpan_1.NonRecordingSpan;
18355
+ }
18356
+ }
18357
+ startActiveSpan(name, arg2, arg3, arg4) {
18358
+ let opts;
18359
+ let ctx;
18360
+ let fn;
18361
+ if (arguments.length < 2) {
18362
+ return;
18363
+ } else if (arguments.length === 2) {
18364
+ fn = arg2;
18365
+ } else if (arguments.length === 3) {
18366
+ opts = arg2;
18367
+ fn = arg3;
18368
+ } else {
18369
+ opts = arg2;
18370
+ ctx = arg3;
18371
+ fn = arg4;
18372
+ }
18373
+ const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
18374
+ const span = this.startSpan(name, opts, parentContext);
18375
+ const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
18376
+ return contextApi.with(contextWithSpanSet, fn, undefined, span);
18377
+ }
18378
+ }
18379
+ exports.NoopTracer = NoopTracer;
18380
+ function isSpanContext(spanContext) {
18381
+ 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";
18382
+ }
18383
+ });
18384
+
18385
+ // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
18386
+ var require_ProxyTracer = __commonJS((exports) => {
18387
+ Object.defineProperty(exports, "__esModule", { value: true });
18388
+ exports.ProxyTracer = undefined;
18389
+ var NoopTracer_1 = require_NoopTracer();
18390
+ var NOOP_TRACER = new NoopTracer_1.NoopTracer;
18391
+
18392
+ class ProxyTracer {
18393
+ constructor(provider, name, version2, options) {
18394
+ this._provider = provider;
18395
+ this.name = name;
18396
+ this.version = version2;
18397
+ this.options = options;
18398
+ }
18399
+ startSpan(name, options, context) {
18400
+ return this._getTracer().startSpan(name, options, context);
18401
+ }
18402
+ startActiveSpan(_name, _options, _context, _fn) {
18403
+ const tracer = this._getTracer();
18404
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
18405
+ }
18406
+ _getTracer() {
18407
+ if (this._delegate) {
18408
+ return this._delegate;
18409
+ }
18410
+ const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
18411
+ if (!tracer) {
18412
+ return NOOP_TRACER;
18413
+ }
18414
+ this._delegate = tracer;
18415
+ return this._delegate;
18416
+ }
18417
+ }
18418
+ exports.ProxyTracer = ProxyTracer;
18419
+ });
18420
+
18421
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
18422
+ var require_NoopTracerProvider = __commonJS((exports) => {
18423
+ Object.defineProperty(exports, "__esModule", { value: true });
18424
+ exports.NoopTracerProvider = undefined;
18425
+ var NoopTracer_1 = require_NoopTracer();
18426
+
18427
+ class NoopTracerProvider {
18428
+ getTracer(_name, _version, _options) {
18429
+ return new NoopTracer_1.NoopTracer;
18430
+ }
18431
+ }
18432
+ exports.NoopTracerProvider = NoopTracerProvider;
18433
+ });
18434
+
18435
+ // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
18436
+ var require_ProxyTracerProvider = __commonJS((exports) => {
18437
+ Object.defineProperty(exports, "__esModule", { value: true });
18438
+ exports.ProxyTracerProvider = undefined;
18439
+ var ProxyTracer_1 = require_ProxyTracer();
18440
+ var NoopTracerProvider_1 = require_NoopTracerProvider();
18441
+ var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
18442
+
18443
+ class ProxyTracerProvider {
18444
+ getTracer(name, version2, options) {
18445
+ var _a3;
18446
+ return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
18447
+ }
18448
+ getDelegate() {
18449
+ var _a3;
18450
+ return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
18451
+ }
18452
+ setDelegate(delegate) {
18453
+ this._delegate = delegate;
18454
+ }
18455
+ getDelegateTracer(name, version2, options) {
18456
+ var _a3;
18457
+ return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
18458
+ }
18459
+ }
18460
+ exports.ProxyTracerProvider = ProxyTracerProvider;
18461
+ });
18462
+
18463
+ // ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
18464
+ var require_SamplingResult = __commonJS((exports) => {
18465
+ Object.defineProperty(exports, "__esModule", { value: true });
18466
+ exports.SamplingDecision = undefined;
18467
+ var SamplingDecision;
18468
+ (function(SamplingDecision2) {
18469
+ SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
18470
+ SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
18471
+ SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
18472
+ })(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
18473
+ });
18474
+
18475
+ // ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
18476
+ var require_span_kind = __commonJS((exports) => {
18477
+ Object.defineProperty(exports, "__esModule", { value: true });
18478
+ exports.SpanKind = undefined;
18479
+ var SpanKind;
18480
+ (function(SpanKind2) {
18481
+ SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
18482
+ SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
18483
+ SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
18484
+ SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
18485
+ SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
18486
+ })(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
18487
+ });
18488
+
18489
+ // ../../node_modules/@opentelemetry/api/build/src/trace/status.js
18490
+ var require_status = __commonJS((exports) => {
18491
+ Object.defineProperty(exports, "__esModule", { value: true });
18492
+ exports.SpanStatusCode = undefined;
18493
+ var SpanStatusCode;
18494
+ (function(SpanStatusCode2) {
18495
+ SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
18496
+ SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
18497
+ SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
18498
+ })(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
18499
+ });
18500
+
18501
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
18502
+ var require_tracestate_validators = __commonJS((exports) => {
18503
+ Object.defineProperty(exports, "__esModule", { value: true });
18504
+ exports.validateValue = exports.validateKey = undefined;
18505
+ var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
18506
+ var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
18507
+ var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
18508
+ var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
18509
+ var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
18510
+ var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
18511
+ function validateKey(key) {
18512
+ return VALID_KEY_REGEX.test(key);
18513
+ }
18514
+ exports.validateKey = validateKey;
18515
+ function validateValue(value) {
18516
+ return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
18517
+ }
18518
+ exports.validateValue = validateValue;
18519
+ });
18520
+
18521
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
18522
+ var require_tracestate_impl = __commonJS((exports) => {
18523
+ Object.defineProperty(exports, "__esModule", { value: true });
18524
+ exports.TraceStateImpl = undefined;
18525
+ var tracestate_validators_1 = require_tracestate_validators();
18526
+ var MAX_TRACE_STATE_ITEMS = 32;
18527
+ var MAX_TRACE_STATE_LEN = 512;
18528
+ var LIST_MEMBERS_SEPARATOR = ",";
18529
+ var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
18530
+
18531
+ class TraceStateImpl {
18532
+ constructor(rawTraceState) {
18533
+ this._internalState = new Map;
18534
+ if (rawTraceState)
18535
+ this._parse(rawTraceState);
18536
+ }
18537
+ set(key, value) {
18538
+ const traceState = this._clone();
18539
+ if (traceState._internalState.has(key)) {
18540
+ traceState._internalState.delete(key);
18541
+ }
18542
+ traceState._internalState.set(key, value);
18543
+ return traceState;
18544
+ }
18545
+ unset(key) {
18546
+ const traceState = this._clone();
18547
+ traceState._internalState.delete(key);
18548
+ return traceState;
18549
+ }
18550
+ get(key) {
18551
+ return this._internalState.get(key);
18552
+ }
18553
+ serialize() {
18554
+ return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
18555
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
18556
+ return agg;
18557
+ }, []).join(LIST_MEMBERS_SEPARATOR);
18558
+ }
18559
+ _parse(rawTraceState) {
18560
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN)
18561
+ return;
18562
+ this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
18563
+ const listMember = part.trim();
18564
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
18565
+ if (i !== -1) {
18566
+ const key = listMember.slice(0, i);
18567
+ const value = listMember.slice(i + 1, part.length);
18568
+ if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
18569
+ agg.set(key, value);
18570
+ }
18571
+ }
18572
+ return agg;
18573
+ }, new Map);
18574
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
18575
+ this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
18576
+ }
18577
+ }
18578
+ _keys() {
18579
+ return Array.from(this._internalState.keys()).reverse();
18580
+ }
18581
+ _clone() {
18582
+ const traceState = new TraceStateImpl;
18583
+ traceState._internalState = new Map(this._internalState);
18584
+ return traceState;
18585
+ }
18586
+ }
18587
+ exports.TraceStateImpl = TraceStateImpl;
18588
+ });
18589
+
18590
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
18591
+ var require_utils2 = __commonJS((exports) => {
18592
+ Object.defineProperty(exports, "__esModule", { value: true });
18593
+ exports.createTraceState = undefined;
18594
+ var tracestate_impl_1 = require_tracestate_impl();
18595
+ function createTraceState(rawTraceState) {
18596
+ return new tracestate_impl_1.TraceStateImpl(rawTraceState);
18597
+ }
18598
+ exports.createTraceState = createTraceState;
18599
+ });
18600
+
18601
+ // ../../node_modules/@opentelemetry/api/build/src/context-api.js
18602
+ var require_context_api = __commonJS((exports) => {
18603
+ Object.defineProperty(exports, "__esModule", { value: true });
18604
+ exports.context = undefined;
18605
+ var context_1 = require_context2();
18606
+ exports.context = context_1.ContextAPI.getInstance();
18607
+ });
18608
+
18609
+ // ../../node_modules/@opentelemetry/api/build/src/diag-api.js
18610
+ var require_diag_api = __commonJS((exports) => {
18611
+ Object.defineProperty(exports, "__esModule", { value: true });
18612
+ exports.diag = undefined;
18613
+ var diag_1 = require_diag();
18614
+ exports.diag = diag_1.DiagAPI.instance();
18615
+ });
18616
+
18617
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
18618
+ var require_NoopMeterProvider = __commonJS((exports) => {
18619
+ Object.defineProperty(exports, "__esModule", { value: true });
18620
+ exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
18621
+ var NoopMeter_1 = require_NoopMeter();
18622
+
18623
+ class NoopMeterProvider {
18624
+ getMeter(_name, _version, _options) {
18625
+ return NoopMeter_1.NOOP_METER;
18626
+ }
18627
+ }
18628
+ exports.NoopMeterProvider = NoopMeterProvider;
18629
+ exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
18630
+ });
18631
+
18632
+ // ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
18633
+ var require_metrics = __commonJS((exports) => {
18634
+ Object.defineProperty(exports, "__esModule", { value: true });
18635
+ exports.MetricsAPI = undefined;
18636
+ var NoopMeterProvider_1 = require_NoopMeterProvider();
18637
+ var global_utils_1 = require_global_utils();
18638
+ var diag_1 = require_diag();
18639
+ var API_NAME = "metrics";
18640
+
18641
+ class MetricsAPI {
18642
+ constructor() {}
18643
+ static getInstance() {
18644
+ if (!this._instance) {
18645
+ this._instance = new MetricsAPI;
18646
+ }
18647
+ return this._instance;
18648
+ }
18649
+ setGlobalMeterProvider(provider) {
18650
+ return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
18651
+ }
18652
+ getMeterProvider() {
18653
+ return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
18654
+ }
18655
+ getMeter(name, version2, options) {
18656
+ return this.getMeterProvider().getMeter(name, version2, options);
18657
+ }
18658
+ disable() {
18659
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18660
+ }
18661
+ }
18662
+ exports.MetricsAPI = MetricsAPI;
18663
+ });
18664
+
18665
+ // ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
18666
+ var require_metrics_api = __commonJS((exports) => {
18667
+ Object.defineProperty(exports, "__esModule", { value: true });
18668
+ exports.metrics = undefined;
18669
+ var metrics_1 = require_metrics();
18670
+ exports.metrics = metrics_1.MetricsAPI.getInstance();
18671
+ });
18672
+
18673
+ // ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
18674
+ var require_NoopTextMapPropagator = __commonJS((exports) => {
18675
+ Object.defineProperty(exports, "__esModule", { value: true });
18676
+ exports.NoopTextMapPropagator = undefined;
18677
+
18678
+ class NoopTextMapPropagator {
18679
+ inject(_context, _carrier) {}
18680
+ extract(context, _carrier) {
18681
+ return context;
18682
+ }
18683
+ fields() {
18684
+ return [];
18685
+ }
18686
+ }
18687
+ exports.NoopTextMapPropagator = NoopTextMapPropagator;
18688
+ });
18689
+
18690
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
18691
+ var require_context_helpers = __commonJS((exports) => {
18692
+ Object.defineProperty(exports, "__esModule", { value: true });
18693
+ exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
18694
+ var context_1 = require_context2();
18695
+ var context_2 = require_context();
18696
+ var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
18697
+ function getBaggage(context) {
18698
+ return context.getValue(BAGGAGE_KEY) || undefined;
18699
+ }
18700
+ exports.getBaggage = getBaggage;
18701
+ function getActiveBaggage() {
18702
+ return getBaggage(context_1.ContextAPI.getInstance().active());
18703
+ }
18704
+ exports.getActiveBaggage = getActiveBaggage;
18705
+ function setBaggage(context, baggage) {
18706
+ return context.setValue(BAGGAGE_KEY, baggage);
18707
+ }
18708
+ exports.setBaggage = setBaggage;
18709
+ function deleteBaggage(context) {
18710
+ return context.deleteValue(BAGGAGE_KEY);
18711
+ }
18712
+ exports.deleteBaggage = deleteBaggage;
18713
+ });
18714
+
18715
+ // ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
18716
+ var require_propagation = __commonJS((exports) => {
18717
+ Object.defineProperty(exports, "__esModule", { value: true });
18718
+ exports.PropagationAPI = undefined;
18719
+ var global_utils_1 = require_global_utils();
18720
+ var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
18721
+ var TextMapPropagator_1 = require_TextMapPropagator();
18722
+ var context_helpers_1 = require_context_helpers();
18723
+ var utils_1 = require_utils();
18724
+ var diag_1 = require_diag();
18725
+ var API_NAME = "propagation";
18726
+ var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
18727
+
18728
+ class PropagationAPI {
18729
+ constructor() {
18730
+ this.createBaggage = utils_1.createBaggage;
18731
+ this.getBaggage = context_helpers_1.getBaggage;
18732
+ this.getActiveBaggage = context_helpers_1.getActiveBaggage;
18733
+ this.setBaggage = context_helpers_1.setBaggage;
18734
+ this.deleteBaggage = context_helpers_1.deleteBaggage;
18735
+ }
18736
+ static getInstance() {
18737
+ if (!this._instance) {
18738
+ this._instance = new PropagationAPI;
18739
+ }
18740
+ return this._instance;
18741
+ }
18742
+ setGlobalPropagator(propagator) {
18743
+ return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
18744
+ }
18745
+ inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
18746
+ return this._getGlobalPropagator().inject(context, carrier, setter);
18747
+ }
18748
+ extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
18749
+ return this._getGlobalPropagator().extract(context, carrier, getter);
18750
+ }
18751
+ fields() {
18752
+ return this._getGlobalPropagator().fields();
18753
+ }
18754
+ disable() {
18755
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18756
+ }
18757
+ _getGlobalPropagator() {
18758
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
18759
+ }
18760
+ }
18761
+ exports.PropagationAPI = PropagationAPI;
18762
+ });
18763
+
18764
+ // ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
18765
+ var require_propagation_api = __commonJS((exports) => {
18766
+ Object.defineProperty(exports, "__esModule", { value: true });
18767
+ exports.propagation = undefined;
18768
+ var propagation_1 = require_propagation();
18769
+ exports.propagation = propagation_1.PropagationAPI.getInstance();
18770
+ });
18771
+
18772
+ // ../../node_modules/@opentelemetry/api/build/src/api/trace.js
18773
+ var require_trace = __commonJS((exports) => {
18774
+ Object.defineProperty(exports, "__esModule", { value: true });
18775
+ exports.TraceAPI = undefined;
18776
+ var global_utils_1 = require_global_utils();
18777
+ var ProxyTracerProvider_1 = require_ProxyTracerProvider();
18778
+ var spancontext_utils_1 = require_spancontext_utils();
18779
+ var context_utils_1 = require_context_utils();
18780
+ var diag_1 = require_diag();
18781
+ var API_NAME = "trace";
18782
+
18783
+ class TraceAPI {
18784
+ constructor() {
18785
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
18786
+ this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
18787
+ this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
18788
+ this.deleteSpan = context_utils_1.deleteSpan;
18789
+ this.getSpan = context_utils_1.getSpan;
18790
+ this.getActiveSpan = context_utils_1.getActiveSpan;
18791
+ this.getSpanContext = context_utils_1.getSpanContext;
18792
+ this.setSpan = context_utils_1.setSpan;
18793
+ this.setSpanContext = context_utils_1.setSpanContext;
18794
+ }
18795
+ static getInstance() {
18796
+ if (!this._instance) {
18797
+ this._instance = new TraceAPI;
18798
+ }
18799
+ return this._instance;
18800
+ }
18801
+ setGlobalTracerProvider(provider) {
18802
+ const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
18803
+ if (success3) {
18804
+ this._proxyTracerProvider.setDelegate(provider);
18805
+ }
18806
+ return success3;
18807
+ }
18808
+ getTracerProvider() {
18809
+ return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
18810
+ }
18811
+ getTracer(name, version2) {
18812
+ return this.getTracerProvider().getTracer(name, version2);
18813
+ }
18814
+ disable() {
18815
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18816
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
18817
+ }
18818
+ }
18819
+ exports.TraceAPI = TraceAPI;
18820
+ });
18821
+
18822
+ // ../../node_modules/@opentelemetry/api/build/src/trace-api.js
18823
+ var require_trace_api = __commonJS((exports) => {
18824
+ Object.defineProperty(exports, "__esModule", { value: true });
18825
+ exports.trace = undefined;
18826
+ var trace_1 = require_trace();
18827
+ exports.trace = trace_1.TraceAPI.getInstance();
18828
+ });
18829
+
18830
+ // ../../node_modules/@opentelemetry/api/build/src/index.js
18831
+ var require_src = __commonJS((exports) => {
18832
+ Object.defineProperty(exports, "__esModule", { value: true });
18833
+ 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;
18834
+ var utils_1 = require_utils();
18835
+ Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
18836
+ return utils_1.baggageEntryMetadataFromString;
18837
+ } });
18838
+ var context_1 = require_context();
18839
+ Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
18840
+ return context_1.createContextKey;
18841
+ } });
18842
+ Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
18843
+ return context_1.ROOT_CONTEXT;
18844
+ } });
18845
+ var consoleLogger_1 = require_consoleLogger();
18846
+ Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
18847
+ return consoleLogger_1.DiagConsoleLogger;
18848
+ } });
18849
+ var types_1 = require_types();
18850
+ Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
18851
+ return types_1.DiagLogLevel;
18852
+ } });
18853
+ var NoopMeter_1 = require_NoopMeter();
18854
+ Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
18855
+ return NoopMeter_1.createNoopMeter;
18856
+ } });
18857
+ var Metric_1 = require_Metric();
18858
+ Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
18859
+ return Metric_1.ValueType;
18860
+ } });
18861
+ var TextMapPropagator_1 = require_TextMapPropagator();
18862
+ Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
18863
+ return TextMapPropagator_1.defaultTextMapGetter;
18864
+ } });
18865
+ Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
18866
+ return TextMapPropagator_1.defaultTextMapSetter;
18867
+ } });
18868
+ var ProxyTracer_1 = require_ProxyTracer();
18869
+ Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
18870
+ return ProxyTracer_1.ProxyTracer;
18871
+ } });
18872
+ var ProxyTracerProvider_1 = require_ProxyTracerProvider();
18873
+ Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
18874
+ return ProxyTracerProvider_1.ProxyTracerProvider;
18875
+ } });
18876
+ var SamplingResult_1 = require_SamplingResult();
18877
+ Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
18878
+ return SamplingResult_1.SamplingDecision;
18879
+ } });
18880
+ var span_kind_1 = require_span_kind();
18881
+ Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
18882
+ return span_kind_1.SpanKind;
18883
+ } });
18884
+ var status_1 = require_status();
18885
+ Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
18886
+ return status_1.SpanStatusCode;
18887
+ } });
18888
+ var trace_flags_1 = require_trace_flags();
18889
+ Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
18890
+ return trace_flags_1.TraceFlags;
18891
+ } });
18892
+ var utils_2 = require_utils2();
18893
+ Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
18894
+ return utils_2.createTraceState;
18895
+ } });
18896
+ var spancontext_utils_1 = require_spancontext_utils();
18897
+ Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
18898
+ return spancontext_utils_1.isSpanContextValid;
18899
+ } });
18900
+ Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
18901
+ return spancontext_utils_1.isValidTraceId;
18902
+ } });
18903
+ Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
18904
+ return spancontext_utils_1.isValidSpanId;
18905
+ } });
18906
+ var invalid_span_constants_1 = require_invalid_span_constants();
18907
+ Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
18908
+ return invalid_span_constants_1.INVALID_SPANID;
18909
+ } });
18910
+ Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
18911
+ return invalid_span_constants_1.INVALID_TRACEID;
18912
+ } });
18913
+ Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
18914
+ return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
18915
+ } });
18916
+ var context_api_1 = require_context_api();
18917
+ Object.defineProperty(exports, "context", { enumerable: true, get: function() {
18918
+ return context_api_1.context;
18919
+ } });
18920
+ var diag_api_1 = require_diag_api();
18921
+ Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
18922
+ return diag_api_1.diag;
18923
+ } });
18924
+ var metrics_api_1 = require_metrics_api();
18925
+ Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
18926
+ return metrics_api_1.metrics;
18927
+ } });
18928
+ var propagation_api_1 = require_propagation_api();
18929
+ Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
18930
+ return propagation_api_1.propagation;
18931
+ } });
18932
+ var trace_api_1 = require_trace_api();
18933
+ Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
18934
+ return trace_api_1.trace;
18935
+ } });
18936
+ exports.default = {
18937
+ context: context_api_1.context,
18938
+ diag: diag_api_1.diag,
18939
+ metrics: metrics_api_1.metrics,
18940
+ propagation: propagation_api_1.propagation,
18941
+ trace: trace_api_1.trace
18942
+ };
18943
+ });
18944
+
18945
+ // ../types/src/processor/processor.ts
18946
+ var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
18947
+ var init_processor = __esm(() => {
18948
+ init_zod();
18949
+ init_common();
18950
+ import_api = __toESM(require_src(), 1);
18951
+ noopTracingContext = {
18952
+ traceId: "",
18953
+ getActiveSpan() {
18954
+ return;
18955
+ },
18956
+ async withSpan(_name, _options, fn) {
18957
+ const noopSpan = {
18958
+ spanContext: () => ({
18959
+ traceId: "",
18960
+ spanId: "",
18961
+ traceFlags: 0
18962
+ }),
18963
+ setAttribute: () => noopSpan,
18964
+ setAttributes: () => noopSpan,
18965
+ addEvent: () => noopSpan,
18966
+ addLink: () => noopSpan,
18967
+ addLinks: () => noopSpan,
18968
+ setStatus: () => noopSpan,
18969
+ updateName: () => noopSpan,
18970
+ end: () => {},
18971
+ isRecording: () => false,
18972
+ recordException: () => {}
18973
+ };
18974
+ return fn(noopSpan);
18975
+ }
18976
+ };
18977
+ ProcessorPortSchema = exports_external.object({
18978
+ name: exports_external.string(),
18979
+ schema: JsonSchemaSchema,
18980
+ required: exports_external.boolean().default(true)
18981
+ });
18982
+ ProcessorDefinitionSchema = exports_external.object({
18983
+ id: exports_external.string(),
18984
+ name: exports_external.string(),
18985
+ description: exports_external.string().optional(),
18986
+ inputSchema: JsonSchemaSchema,
18987
+ outputSchema: JsonSchemaSchema,
18988
+ configSchema: JsonSchemaSchema.optional(),
18989
+ inputPorts: exports_external.array(ProcessorPortSchema).optional(),
18990
+ outputPorts: exports_external.array(ProcessorPortSchema).optional(),
18991
+ isBuiltin: exports_external.boolean().default(true),
18992
+ pluginName: exports_external.string().optional()
18993
+ });
18994
+ ProcessorExecutionContextSchema = exports_external.object({
18995
+ jobId: exports_external.string(),
18996
+ stepId: exports_external.string(),
18997
+ tenantId: exports_external.string(),
18998
+ automationId: exports_external.string().optional(),
18999
+ workflowId: exports_external.string(),
19000
+ workerId: exports_external.string().optional()
19001
+ });
19002
+ ((TraceStatus2) => {
19003
+ TraceStatus2["PENDING"] = "pending";
19004
+ TraceStatus2["RUNNING"] = "running";
19005
+ TraceStatus2["COMPLETED"] = "completed";
19006
+ TraceStatus2["FAILED"] = "failed";
19007
+ })(TraceStatus ||= {});
19008
+ });
19009
+
19010
+ // ../types/src/processor/execution.ts
19011
+ function asTuple(values) {
19012
+ return values;
19013
+ }
19014
+ var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
19015
+ var init_execution = __esm(() => {
19016
+ init_zod();
19017
+ WorkflowExecutionStatusValue = {
19018
+ CREATED: "created",
19019
+ PENDING: "pending",
19020
+ RUNNING: "running",
19021
+ WAITING: "waiting",
19022
+ COMPLETED: "completed",
19023
+ FAILED: "failed",
19024
+ CANCELLED: "cancelled"
19025
+ };
19026
+ WorkflowExecutionStatusSchema = exports_external.enum([
19027
+ WorkflowExecutionStatusValue.CREATED,
19028
+ WorkflowExecutionStatusValue.PENDING,
19029
+ WorkflowExecutionStatusValue.RUNNING,
19030
+ WorkflowExecutionStatusValue.WAITING,
19031
+ WorkflowExecutionStatusValue.COMPLETED,
19032
+ WorkflowExecutionStatusValue.FAILED,
19033
+ WorkflowExecutionStatusValue.CANCELLED
19034
+ ]);
19035
+ StepExecutionStatusValue = {
19036
+ PENDING: "pending",
19037
+ RUNNING: "running",
19038
+ SUCCESS: "success",
19039
+ FAILURE: "failure",
19040
+ WAITING: "waiting",
19041
+ SKIPPED: "skipped"
19042
+ };
19043
+ StepExecutionStatusSchema = exports_external.enum([
19044
+ StepExecutionStatusValue.PENDING,
19045
+ StepExecutionStatusValue.RUNNING,
19046
+ StepExecutionStatusValue.SUCCESS,
19047
+ StepExecutionStatusValue.FAILURE,
19048
+ StepExecutionStatusValue.WAITING,
19049
+ StepExecutionStatusValue.SKIPPED
19050
+ ]);
19051
+ TriggerTypeValue = {
19052
+ MANUAL: "manual",
19053
+ API: "api",
19054
+ WEBHOOK: "webhook",
19055
+ SCHEDULE: "schedule",
19056
+ EMAIL: "email",
19057
+ EVAL: "eval",
19058
+ CLI: "cli"
19059
+ };
19060
+ TriggerTypeSchema = exports_external.enum([
19061
+ TriggerTypeValue.MANUAL,
19062
+ TriggerTypeValue.API,
19063
+ TriggerTypeValue.WEBHOOK,
19064
+ TriggerTypeValue.SCHEDULE,
19065
+ TriggerTypeValue.EMAIL,
19066
+ TriggerTypeValue.EVAL,
19067
+ TriggerTypeValue.CLI
19068
+ ]);
19069
+ ExecutionTypeValue = {
19070
+ PROD: "prod",
19071
+ EVAL: "eval",
19072
+ PLAYGROUND: "playground"
19073
+ };
19074
+ ExecutionTypeSchema = exports_external.enum([
19075
+ ExecutionTypeValue.PROD,
19076
+ ExecutionTypeValue.EVAL,
19077
+ ExecutionTypeValue.PLAYGROUND
19078
+ ]);
19079
+ WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
19080
+ STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
19081
+ TRIGGER_TYPES = TriggerTypeSchema.options;
19082
+ EXECUTION_TYPES = ExecutionTypeSchema.options;
19083
+ });
19084
+
19085
+ // ../types/src/processor/configs/classify.ts
19086
+ var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
19087
+ var init_classify = __esm(() => {
19088
+ init_zod();
19089
+ ClassifyInputSchema = exports_external.object({
19090
+ content: exports_external.string().optional().describe("Text content to classify"),
19091
+ text: exports_external.string().optional().describe("Text content (alternative to content)")
19092
+ }).refine((data) => !!(data.content || data.text), {
19093
+ message: "Either content or text must be provided"
19094
+ });
19095
+ ClassifyLabelSchema = exports_external.object({
19096
+ name: exports_external.string().min(1).describe("Label value returned in output.label"),
19097
+ description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
19098
+ });
19099
+ ClassifyConfigSchema = exports_external.object({
19100
+ labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
19101
+ 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."),
19102
+ provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
19103
+ model: exports_external.string().optional().describe("Model override"),
19104
+ maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
19105
+ });
19106
+ ClassifyOutputSchema = exports_external.object({
19107
+ label: exports_external.string().describe("The selected label name"),
19108
+ confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
19109
+ reason: exports_external.string().describe("Short justification for the chosen label")
19110
+ });
19111
+ });
19112
+
19113
+ // ../types/src/parser/parser.ts
19114
+ function resolveEffectiveMimeType(filename, declaredMimeType) {
19115
+ const ext = filename.split(".").pop()?.toLowerCase();
19116
+ if (!ext)
19117
+ return declaredMimeType;
19118
+ const extensionMime = EXTENSION_TO_MIME[ext];
19119
+ return extensionMime ?? declaredMimeType;
19120
+ }
19121
+ function mimeTypeForExtension(extension) {
19122
+ return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
19123
+ }
19124
+ function extensionForMimeType(mimeType) {
19125
+ const base = mimeType.split(";")[0]?.trim().toLowerCase();
19126
+ return base ? MIME_TO_EXTENSION[base] : undefined;
19127
+ }
19128
+ function getParserCategory(mimeType) {
19129
+ const normalized = mimeType.toLowerCase().trim();
19130
+ if (ParserCategory.PLAINTEXT.includes(normalized)) {
19131
+ return "plaintext";
19132
+ }
19133
+ if (ParserCategory.OFFICE.includes(normalized)) {
19134
+ return "office";
19135
+ }
19136
+ if (ParserCategory.DOCUMENT.includes(normalized)) {
19137
+ return "document";
19138
+ }
19139
+ return null;
19140
+ }
19141
+ function requiresSpecializedParser(mimeType) {
19142
+ return getParserCategory(mimeType) === "document";
19143
+ }
19144
+ function getAllSupportedMimeTypes() {
19145
+ return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
19146
+ }
19147
+ function getSupportedFormatsLabel() {
19148
+ const allMimes = getAllSupportedMimeTypes();
19149
+ const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
19150
+ return labels.join(", ");
19151
+ }
19152
+ var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_EXTENSION, MIME_TO_LABEL;
19153
+ var init_parser = __esm(() => {
19154
+ init_zod();
19155
+ OFFICE_MIME_TYPES = [
19156
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
19157
+ "application/msword",
19158
+ "application/vnd.oasis.opendocument.text",
19159
+ "application/rtf",
19160
+ "text/rtf",
19161
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19162
+ "application/vnd.ms-excel",
19163
+ "application/vnd.ms-excel.sheet.macroenabled.12",
19164
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12",
19165
+ "application/vnd.oasis.opendocument.spreadsheet",
19166
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
19167
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
19168
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12",
19169
+ "application/vnd.ms-powerpoint",
19170
+ "application/vnd.oasis.opendocument.presentation",
19171
+ "message/rfc822",
19172
+ "application/vnd.ms-outlook",
19173
+ "application/epub+zip"
19174
+ ];
19175
+ ParserCategory = {
19176
+ PLAINTEXT: [
19177
+ "text/plain",
19178
+ "text/markdown",
19179
+ "text/csv",
19180
+ "text/tab-separated-values",
19181
+ "text/html",
19182
+ "text/xml",
19183
+ "application/json",
19184
+ "application/x-yaml",
19185
+ "application/toml",
19186
+ "image/svg+xml",
19187
+ "text/x-rst",
19188
+ "text/x-org",
19189
+ "application/x-latex",
19190
+ "application/x-ipynb+json",
19191
+ "application/x-bibtex",
19192
+ "application/docbook+xml",
19193
+ "application/x-fictionbook+xml"
19194
+ ],
19195
+ OFFICE: [...OFFICE_MIME_TYPES],
19196
+ DOCUMENT: [
19197
+ "application/pdf",
19198
+ "image/png",
19199
+ "image/jpeg",
19200
+ "image/webp",
19201
+ "image/tiff",
19202
+ "image/gif",
19203
+ "image/bmp"
19204
+ ]
19205
+ };
19206
+ ParserTypeSchema = exports_external.enum([
19207
+ "plaintext",
19208
+ "office",
19209
+ "llm-vision",
19210
+ "ocr"
19211
+ ]);
19212
+ DocumentMetadataSchema = exports_external.object({
19213
+ filename: exports_external.string(),
19214
+ mimeType: exports_external.string(),
19215
+ size: exports_external.number().describe("File size in bytes"),
19216
+ storageRef: exports_external.string().optional().describe("Storage reference for the original file")
19217
+ });
19218
+ ParseUsageSchema = exports_external.object({
19219
+ pageCount: exports_external.number(),
19220
+ processingTimeMs: exports_external.number().optional()
19221
+ });
19222
+ CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
19223
+ PointSchema = exports_external.object({
19224
+ x: exports_external.number(),
19225
+ y: exports_external.number()
19226
+ });
19227
+ BoundingRegionSchema = exports_external.object({
19228
+ polygon: exports_external.array(PointSchema).min(3),
19229
+ unit: CoordinateUnitSchema,
19230
+ pageIndex: exports_external.number()
19231
+ });
19232
+ PositionedTextSchema = exports_external.object({
19233
+ text: exports_external.string(),
19234
+ confidence: exports_external.number().min(0).max(1).optional(),
19235
+ boundingRegion: BoundingRegionSchema.optional()
19236
+ });
19237
+ TableCellSchema = exports_external.object({
19238
+ content: exports_external.string(),
19239
+ rowIndex: exports_external.number(),
19240
+ columnIndex: exports_external.number(),
19241
+ rowSpan: exports_external.number().default(1),
19242
+ columnSpan: exports_external.number().default(1),
19243
+ boundingRegion: BoundingRegionSchema.optional()
19244
+ });
19245
+ ExtractedTableSchema = exports_external.object({
19246
+ cells: exports_external.array(TableCellSchema),
19247
+ rowCount: exports_external.number(),
19248
+ columnCount: exports_external.number(),
19249
+ boundingRegion: BoundingRegionSchema.optional()
19250
+ });
19251
+ LayoutElementTypeSchema = exports_external.enum([
19252
+ "paragraph",
19253
+ "title",
19254
+ "sectionHeading",
19255
+ "pageHeader",
19256
+ "pageFooter",
19257
+ "pageNumber",
19258
+ "footnote",
19259
+ "table",
19260
+ "figure",
19261
+ "formulaBlock"
19262
+ ]);
19263
+ LayoutElementSchema = exports_external.object({
19264
+ type: LayoutElementTypeSchema,
19265
+ content: exports_external.string(),
19266
+ table: ExtractedTableSchema.optional(),
19267
+ caption: exports_external.string().optional(),
19268
+ figureId: exports_external.string().optional(),
19269
+ boundingRegion: BoundingRegionSchema.optional()
19270
+ });
19271
+ PageResultSchema = exports_external.object({
19272
+ pageIndex: exports_external.number().describe("0-based page index"),
19273
+ text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
19274
+ pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
19275
+ layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
19276
+ words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
19277
+ lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
19278
+ tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
19279
+ width: exports_external.number().optional().describe("Page width"),
19280
+ height: exports_external.number().optional().describe("Page height"),
19281
+ unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
19282
+ confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
19283
+ });
19284
+ ParseResultSchema = exports_external.object({
19285
+ document: DocumentMetadataSchema,
19286
+ usage: ParseUsageSchema,
19287
+ pages: exports_external.array(PageResultSchema),
19288
+ text: exports_external.string().describe("Combined text from all pages"),
19289
+ parserType: ParserTypeSchema,
19290
+ parserVersion: exports_external.string().optional(),
19291
+ model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
19292
+ rawResponse: exports_external.unknown().optional()
19293
+ });
19294
+ ParseOptionsSchema = exports_external.object({
19295
+ outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
19296
+ ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
19297
+ includeWordPositions: exports_external.boolean().default(false),
19298
+ includeLinePositions: exports_external.boolean().default(false),
19299
+ extractTables: exports_external.boolean().default(true),
19300
+ provider: exports_external.string().optional().describe("LLM provider ID to use"),
19301
+ model: exports_external.string().optional(),
19302
+ maxConcurrency: exports_external.number().min(1).max(30).default(3),
19303
+ pagesPerBatch: exports_external.number().min(1).max(20).default(5),
19304
+ pdfRenderScale: exports_external.number().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
19305
+ imageQuality: exports_external.number().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
19306
+ prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
19307
+ languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
19308
+ tenantId: exports_external.string().optional()
19309
+ });
19310
+ ParserInputSchema = exports_external.object({
19311
+ data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
19312
+ filename: exports_external.string(),
19313
+ mimeType: exports_external.string(),
19314
+ options: ParseOptionsSchema.optional()
19315
+ });
19316
+ EXTENSION_TO_MIME = {
19317
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
19318
+ doc: "application/msword",
19319
+ odt: "application/vnd.oasis.opendocument.text",
19320
+ rtf: "application/rtf",
19321
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19322
+ xls: "application/vnd.ms-excel",
19323
+ xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
19324
+ xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
19325
+ ods: "application/vnd.oasis.opendocument.spreadsheet",
19326
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
19327
+ ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
19328
+ pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
19329
+ ppt: "application/vnd.ms-powerpoint",
19330
+ odp: "application/vnd.oasis.opendocument.presentation",
19331
+ eml: "message/rfc822",
19332
+ msg: "application/vnd.ms-outlook",
19333
+ epub: "application/epub+zip",
19334
+ pdf: "application/pdf",
19335
+ png: "image/png",
19336
+ jpg: "image/jpeg",
19337
+ jpeg: "image/jpeg",
19338
+ webp: "image/webp",
19339
+ tiff: "image/tiff",
19340
+ tif: "image/tiff",
19341
+ gif: "image/gif",
19342
+ bmp: "image/bmp",
19343
+ svg: "image/svg+xml",
19344
+ txt: "text/plain",
19345
+ md: "text/markdown",
19346
+ markdown: "text/markdown",
19347
+ csv: "text/csv",
19348
+ tsv: "text/tab-separated-values",
19349
+ html: "text/html",
19350
+ htm: "text/html",
19351
+ xml: "text/xml",
19352
+ json: "application/json",
19353
+ yaml: "application/x-yaml",
19354
+ yml: "application/x-yaml",
19355
+ toml: "application/toml",
19356
+ rst: "text/x-rst",
19357
+ org: "text/x-org",
19358
+ tex: "application/x-latex",
19359
+ latex: "application/x-latex",
19360
+ ipynb: "application/x-ipynb+json",
19361
+ bib: "application/x-bibtex",
19362
+ dbk: "application/docbook+xml",
19363
+ docbook: "application/docbook+xml",
19364
+ fb2: "application/x-fictionbook+xml"
19365
+ };
19366
+ MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
19367
+ if (!(mime in acc))
19368
+ acc[mime] = ext;
19369
+ return acc;
19370
+ }, {});
19371
+ MIME_TO_LABEL = {
19372
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
19373
+ "application/msword": "DOC",
19374
+ "application/vnd.oasis.opendocument.text": "ODT",
19375
+ "application/rtf": "RTF",
19376
+ "text/rtf": "RTF",
19377
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
19378
+ "application/vnd.ms-excel": "XLS",
19379
+ "application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
19380
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
19381
+ "application/vnd.oasis.opendocument.spreadsheet": "ODS",
19382
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
19383
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
19384
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
19385
+ "application/vnd.ms-powerpoint": "PPT",
19386
+ "application/vnd.oasis.opendocument.presentation": "ODP",
19387
+ "message/rfc822": "EML",
19388
+ "application/vnd.ms-outlook": "MSG",
19389
+ "application/epub+zip": "EPUB",
19390
+ "application/pdf": "PDF",
19391
+ "image/png": "PNG",
19392
+ "image/jpeg": "JPEG",
19393
+ "image/webp": "WebP",
19394
+ "image/tiff": "TIFF",
19395
+ "image/gif": "GIF",
19396
+ "image/bmp": "BMP",
19397
+ "image/svg+xml": "SVG",
19398
+ "text/plain": "TXT",
19399
+ "text/markdown": "Markdown",
19400
+ "text/csv": "CSV",
19401
+ "text/tab-separated-values": "TSV",
19402
+ "text/html": "HTML",
19403
+ "text/xml": "XML",
19404
+ "application/json": "JSON",
19405
+ "application/x-yaml": "YAML",
19406
+ "application/toml": "TOML",
19407
+ "text/x-rst": "RST",
19408
+ "text/x-org": "Org",
19409
+ "application/x-latex": "LaTeX",
19410
+ "application/x-ipynb+json": "Jupyter",
19411
+ "application/x-bibtex": "BibTeX",
19412
+ "application/docbook+xml": "DocBook",
19413
+ "application/x-fictionbook+xml": "FB2"
19414
+ };
19415
+ });
19416
+
19417
+ // ../types/src/processor/configs/document-parser.ts
19418
+ var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
19419
+ var init_document_parser = __esm(() => {
19420
+ init_zod();
19421
+ init_runtime_file_ref();
19422
+ init_parser();
19423
+ DocumentParserInputSchema = ResolvedProcessorFileSchema;
19424
+ DocumentParserOutputSchema = ParseResultSchema;
19425
+ DocumentParserConfigSchema = exports_external.object({
19426
+ ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
19427
+ llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
19428
+ maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
19429
+ pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
19430
+ pdfRenderScale: exports_external.number().min(1).max(4).default(1).optional().describe("Scale factor used when rendering PDF pages for VLM parsing"),
19431
+ imageQuality: exports_external.number().int().min(1).max(100).default(85).optional().describe("JPEG quality used for PDF page images sent to VLM parsing"),
19432
+ prompt: exports_external.string().optional().describe("Custom extraction prompt"),
19433
+ nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
19434
+ languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
19435
+ 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.")
19436
+ }).prefault({});
19437
+ });
19438
+
19439
+ // ../types/src/processor/configs/extract.ts
19440
+ var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
19441
+ var init_extract = __esm(() => {
19442
+ init_zod();
19443
+ ExtractInputSchema = exports_external.object({
19444
+ content: exports_external.string().optional().describe("Text content to extract from"),
19445
+ text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
19446
+ contentType: exports_external.enum(["text", "image"]).default("text"),
19447
+ imageData: exports_external.string().optional(),
19448
+ imageMimeType: exports_external.string().optional()
19449
+ }).refine((data) => data.content || data.text, {
19450
+ message: "Either content or text must be provided"
19451
+ });
19452
+ ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
19453
+ ExtractConfigSchema = exports_external.object({
19454
+ schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
19455
+ prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
19456
+ provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
19457
+ model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
19458
+ maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
19459
+ grounded: exports_external.boolean().optional().describe("When true, run a grounding pass over the schema fields and attach per-field source spans + confidence under a `_grounding` key, flagging ungrounded/fuzzy fields for human review. Grounding always calls OpenAI directly (independent of the extract provider) and requires OPENAI_API_KEY."),
19460
+ groundingModel: exports_external.string().optional().describe("Provider/model for the grounding pass. Defaults to the workspace default LLM; grounding runs against OpenAI, so pick an OpenAI-compatible model."),
19461
+ groundingExamples: exports_external.array(exports_external.object({
19462
+ text: exports_external.string(),
19463
+ extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
19464
+ })).optional().describe("Few-shot examples for grounding (verbatim source text per field). Optional."),
19465
+ reviewOn: exports_external.enum(["medium_or_low", "low_only"]).optional().describe("Which grounding confidences flag a field for review. Default: medium_or_low.")
19466
+ });
19467
+ });
19468
+
19469
+ // ../types/src/processor/configs/merge.ts
19470
+ var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
19471
+ var init_merge = __esm(() => {
19472
+ init_zod();
19473
+ MergeConfigSchema = exports_external.object({
19474
+ preservePortNames: exports_external.boolean().default(true),
19475
+ outputKey: exports_external.string().optional()
19476
+ });
19477
+ MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
19478
+ MergeOutputSchema = exports_external.object({
19479
+ items: exports_external.array(exports_external.unknown()),
19480
+ count: exports_external.number(),
19481
+ merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
19482
+ });
19483
+ });
19484
+
19485
+ // ../types/src/processor/configs/pdf-embedder.ts
19486
+ var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
19487
+ var init_pdf_embedder = __esm(() => {
19488
+ init_zod();
19489
+ init_runtime_file_ref();
19490
+ init_parser();
19491
+ PdfEmbedderInputSchema = exports_external.object({
19492
+ file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
19493
+ parseResult: exports_external.object({
19494
+ pages: exports_external.array(PageResultSchema),
19495
+ text: exports_external.string().optional()
19496
+ }).describe("Parse result from ai.parse step (must include word positions)")
19497
+ });
19498
+ PdfEmbedderOutputSchema = exports_external.object({
19499
+ fileId: exports_external.string().describe("File ID from files table"),
19500
+ pageCount: exports_external.number().describe("Number of pages in the output PDF"),
19501
+ wordCount: exports_external.number().describe("Number of words embedded"),
19502
+ text: exports_external.string().describe("Extracted text (from parse step)")
19503
+ });
19504
+ PdfEmbedderConfigSchema = exports_external.object({
19505
+ outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
19506
+ 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")
19507
+ }).prefault({});
19508
+ });
19509
+
19510
+ // ../types/src/processor/configs/segment.ts
19511
+ var SegmentInputSchema, SEGMENT_UNKNOWN_TYPE = "unknown", SegmentConfigSchema, ConfidenceLevelSchema, SegmentSummarySchema, SegmentOutputSchema;
19512
+ var init_segment = __esm(() => {
19513
+ init_zod();
19514
+ SegmentInputSchema = exports_external.object({
19515
+ pages: exports_external.array(exports_external.object({
19516
+ pageIndex: exports_external.number().describe("0-based page index"),
19517
+ text: exports_external.string().describe("Extracted text for this page"),
19518
+ pageName: exports_external.string().optional()
19519
+ })).min(1).describe("Per-page parsed content from a document parser")
19520
+ }).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
19521
+ SegmentConfigSchema = exports_external.object({
19522
+ documentTypes: exports_external.array(exports_external.object({
19523
+ name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo").'),
19524
+ 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.")
19525
+ })).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.'),
19526
+ rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
19527
+ 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.'),
19528
+ 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.")
19529
+ });
19530
+ 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.");
19531
+ SegmentSummarySchema = exports_external.object({
19532
+ total: exports_external.number().int().describe("Total documents discovered in the batch."),
19533
+ labelled: exports_external.number().int().describe('Documents assigned a known taxonomy type (type !== "unknown").'),
19534
+ unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type === "unknown") — escalate to a human.'),
19535
+ lowConfidence: exports_external.number().int().describe('Documents whose boundary/type confidence is "low" — also worth human review.'),
19536
+ byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe('Per-type document counts, keyed by type name (includes "unknown").'),
19537
+ needsReview: exports_external.array(exports_external.object({
19538
+ index: exports_external.number().int(),
19539
+ type: exports_external.string(),
19540
+ page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
19541
+ reason: exports_external.enum(["unlabelled", "low_confidence"]).describe("Why this document should be escalated to a human operator."),
19542
+ notes: exports_external.string()
19543
+ })).describe("The exact documents to escalate to a human operator, with the reason for each.")
19544
+ });
19545
+ SegmentOutputSchema = exports_external.object({
19546
+ summary: SegmentSummarySchema.describe("Batch-level escalation summary: labelled vs unlabelled counts and the documents needing human review."),
19547
+ documents: exports_external.array(exports_external.object({
19548
+ index: exports_external.number().int().describe("0-based position of this document in the batch, in page order."),
19549
+ type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown" when none fit.'),
19550
+ page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("Inclusive [startPage, endPage], 0-based, matching input pageIndex."),
19551
+ confidence: ConfidenceLevelSchema.describe("LLM confidence at the document boundary + type: low | medium | high."),
19552
+ notes: exports_external.string().describe("Short prose citing what marked this page as a new document."),
19553
+ evidence: exports_external.object({
19554
+ start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
19555
+ start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
19556
+ }).optional().describe("Structured start evidence — for downstream parsing without regex over `notes`."),
19557
+ text: exports_external.string().describe("Joined per-page text for this document, ready for ai.extract"),
19558
+ pages: exports_external.array(exports_external.object({
19559
+ pageIndex: exports_external.number().int(),
19560
+ text: exports_external.string(),
19561
+ pageName: exports_external.string().optional(),
19562
+ source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM boundary (direct evidence) or filled in by continuity")
19563
+ })).describe("Raw per-page records covered by this document, in page order."),
19564
+ pages_anchored: exports_external.array(exports_external.number().int()),
19565
+ pages_inferred: exports_external.array(exports_external.number().int())
19566
+ }))
19567
+ });
19568
+ });
19569
+
19570
+ // ../types/src/processor/configs/split.ts
19571
+ var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema2, SplitOutputSchema;
19572
+ var init_split = __esm(() => {
19573
+ init_zod();
19574
+ SplitInputSchema = exports_external.object({
19575
+ pages: exports_external.array(exports_external.object({
19576
+ pageIndex: exports_external.number().describe("0-based page index"),
19577
+ text: exports_external.string().describe("Extracted text for this page"),
19578
+ pageName: exports_external.string().optional()
19579
+ })).min(1).describe("Per-page parsed content from a document parser")
19580
+ }).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
19581
+ SplitConfigSchema = exports_external.object({
19582
+ sections: exports_external.array(exports_external.object({
19583
+ name: exports_external.string().min(1).describe("Stable id for the section"),
19584
+ 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."),
19585
+ 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").'),
19586
+ 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.')
19587
+ })).min(1),
19588
+ rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
19589
+ 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.'),
19590
+ 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.")
19591
+ });
19592
+ 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.");
19593
+ SplitOutputSchema = exports_external.object({
19594
+ splits: exports_external.array(exports_external.object({
19595
+ name: exports_external.string(),
19596
+ page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
19597
+ confidence: ConfidenceLevelSchema2.describe("LLM confidence at the start anchor: low | medium | high."),
19598
+ notes: exports_external.string(),
19599
+ evidence: exports_external.object({
19600
+ start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
19601
+ start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
19602
+ }).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
19603
+ end_evidence: exports_external.object({
19604
+ end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
19605
+ confidence: ConfidenceLevelSchema2,
19606
+ 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.")
19607
+ }).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)."),
19608
+ text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
19609
+ pages: exports_external.array(exports_external.object({
19610
+ pageIndex: exports_external.number().int(),
19611
+ text: exports_external.string(),
19612
+ pageName: exports_external.string().optional(),
19613
+ source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
19614
+ })).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."),
19615
+ pages_anchored: exports_external.array(exports_external.number().int()),
19616
+ pages_inferred: exports_external.array(exports_external.number().int())
19617
+ }))
19618
+ });
19619
+ });
19620
+
19621
+ // ../types/src/processor/configs/template.ts
19622
+ var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
19623
+ var init_template = __esm(() => {
19624
+ init_zod();
19625
+ TemplateInputSchema = exports_external.object({
19626
+ data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
19627
+ });
19628
+ TemplateOutputSchema = exports_external.object({
19629
+ fileId: exports_external.string().describe("File ID from files table")
19630
+ });
19631
+ TemplateConfigSchema = exports_external.object({
19632
+ templateId: exports_external.string().describe("ID of the template from templates table"),
19633
+ outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
19634
+ highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
19635
+ notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
19636
+ });
19637
+ });
19638
+
19639
+ // ../types/src/processor/configs/xlsx-to-json.ts
19640
+ var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
19641
+ var init_xlsx_to_json = __esm(() => {
19642
+ init_zod();
19643
+ init_runtime_file_ref();
19644
+ XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
19645
+ XlsxToJsonOutputSchema = exports_external.object({
19646
+ rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
19647
+ fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
19648
+ });
19649
+ XlsxToJsonConfigSchema = exports_external.object({
19650
+ sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
19651
+ outputCsv: exports_external.boolean().default(false).optional(),
19652
+ outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
19653
+ });
19654
+ });
19655
+
19656
+ // ../types/src/processor/configs/react-hook-form.ts
19657
+ function extractFieldMetadata(schema) {
19658
+ const fields = [];
19659
+ let inner = schema;
19660
+ while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
19661
+ inner = inner.unwrap();
19662
+ }
19663
+ if (inner instanceof exports_external.ZodObject) {
19664
+ for (const [name, fieldSchema] of Object.entries(inner.shape)) {
19665
+ fields.push(extractSingleFieldMetadata(name, fieldSchema));
19666
+ }
19667
+ }
19668
+ return fields;
19669
+ }
19670
+ function extractSingleFieldMetadata(name, schema) {
19671
+ let current = schema;
19672
+ let required2 = true;
19673
+ let defaultValue = undefined;
19674
+ let description = current.description;
19675
+ while (true) {
19676
+ if (current instanceof exports_external.ZodOptional) {
19677
+ required2 = false;
19678
+ current = current.unwrap();
19679
+ } else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
19680
+ defaultValue = current._def.defaultValue;
19681
+ current = current.unwrap();
19682
+ } else {
19683
+ break;
19684
+ }
19685
+ description ??= current.description;
19686
+ }
19687
+ const base = { name, type: "unknown", required: required2, description, defaultValue };
19688
+ if (current instanceof exports_external.ZodString)
19689
+ return { ...base, type: "string" };
19690
+ if (current instanceof exports_external.ZodNumber) {
19691
+ let min;
19692
+ let max;
19693
+ for (const c of current._def.checks ?? []) {
19694
+ const def = c._zod.def;
19695
+ if (def.check === "greater_than")
19696
+ min = def.value;
19697
+ if (def.check === "less_than")
19698
+ max = def.value;
19699
+ }
19700
+ return { ...base, type: "number", min, max };
19701
+ }
19702
+ if (current instanceof exports_external.ZodBoolean)
19703
+ return { ...base, type: "boolean" };
19704
+ if (current instanceof exports_external.ZodEnum) {
19705
+ return { ...base, type: "enum", enumValues: current.options };
19706
+ }
19707
+ if (current instanceof exports_external.ZodArray)
19708
+ return { ...base, type: "array" };
19709
+ if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
19710
+ return { ...base, type: "object" };
19711
+ }
19712
+ return base;
19713
+ }
19714
+ function getConfigFieldMetadata(processorId) {
19715
+ const schema = getConfigSchema(processorId);
19716
+ if (!schema)
19717
+ return;
19718
+ return extractFieldMetadata(schema);
19719
+ }
19720
+ function getConfigDefaults(processorId) {
19721
+ const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
19722
+ if (!schema)
19723
+ return {};
19724
+ try {
19725
+ const result = schema.safeParse({});
19726
+ if (result.success) {
19727
+ return result.data;
19728
+ }
19729
+ } catch {}
19730
+ const fields = extractFieldMetadata(schema);
19731
+ const defaults = {};
19732
+ for (const field of fields) {
19733
+ if (field.defaultValue !== undefined) {
19734
+ defaults[field.name] = field.defaultValue;
19735
+ }
19736
+ }
19737
+ return defaults;
19738
+ }
19739
+ function validateConfig(processorId, config2) {
19740
+ const schema = getConfigSchema(processorId);
19741
+ if (!schema) {
19742
+ return { valid: true, errors: {} };
19743
+ }
19744
+ const result = schema.safeParse(config2);
19745
+ if (result.success) {
19746
+ return { valid: true, errors: {} };
19747
+ }
19748
+ const errors3 = {};
19749
+ for (const issue2 of result.error.issues) {
19750
+ const path = issue2.path.join(".");
19751
+ errors3[path] = issue2.message;
19752
+ }
19753
+ return { valid: false, errors: errors3 };
19754
+ }
19755
+ var init_react_hook_form = __esm(() => {
19756
+ init_zod();
19757
+ init_configs();
19758
+ });
19759
+
19760
+ // ../types/src/processor/configs/index.ts
19761
+ function getProcessorSchemas(processorId) {
19762
+ return PROCESSOR_SCHEMAS[processorId];
19763
+ }
19764
+ function getConfigSchema(processorId) {
19765
+ return PROCESSOR_SCHEMAS[processorId]?.configSchema;
19766
+ }
19767
+ function getAllProcessorJsonSchemas() {
19768
+ return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
19769
+ id: p.id,
19770
+ inputSchema: toJsonSchema(p.inputSchema),
19771
+ outputSchema: toJsonSchema(p.outputSchema),
19772
+ configSchema: toJsonSchema(p.configSchema)
19773
+ }));
19774
+ }
19775
+ function listProcessorIds() {
19776
+ return Object.keys(PROCESSOR_SCHEMAS);
19777
+ }
19778
+ var PROCESSOR_SCHEMAS;
19779
+ var init_configs = __esm(() => {
19780
+ init_common();
19781
+ init_ids();
19782
+ init_classify();
19783
+ init_document_parser();
19784
+ init_extract();
19785
+ init_merge();
19786
+ init_pdf_embedder();
19787
+ init_segment();
19788
+ init_split();
19789
+ init_template();
19790
+ init_xlsx_to_json();
19791
+ init_react_hook_form();
19792
+ init_classify();
19793
+ init_document_parser();
19794
+ init_extract();
19795
+ init_merge();
19796
+ init_pdf_embedder();
19797
+ init_segment();
19798
+ init_split();
19799
+ init_template();
19800
+ init_xlsx_to_json();
19801
+ PROCESSOR_SCHEMAS = {
19802
+ [PROCESSOR_IDS.EXTRACT]: {
19803
+ id: PROCESSOR_IDS.EXTRACT,
19804
+ inputSchema: ExtractInputSchema,
19805
+ outputSchema: ExtractOutputSchema,
19806
+ configSchema: ExtractConfigSchema
19807
+ },
19808
+ [PROCESSOR_IDS.DOCUMENT_PARSER]: {
19809
+ id: PROCESSOR_IDS.DOCUMENT_PARSER,
19810
+ inputSchema: DocumentParserInputSchema,
19811
+ outputSchema: DocumentParserOutputSchema,
19812
+ configSchema: DocumentParserConfigSchema
19813
+ },
19814
+ [PROCESSOR_IDS.MERGE]: {
19815
+ id: PROCESSOR_IDS.MERGE,
19816
+ inputSchema: MergeInputSchema,
19817
+ outputSchema: MergeOutputSchema,
19818
+ configSchema: MergeConfigSchema
19819
+ },
19820
+ [PROCESSOR_IDS.TEMPLATE]: {
19821
+ id: PROCESSOR_IDS.TEMPLATE,
19822
+ inputSchema: TemplateInputSchema,
19823
+ outputSchema: TemplateOutputSchema,
19824
+ configSchema: TemplateConfigSchema
19825
+ },
19826
+ [PROCESSOR_IDS.PDF_EMBEDDER]: {
19827
+ id: PROCESSOR_IDS.PDF_EMBEDDER,
19828
+ inputSchema: PdfEmbedderInputSchema,
19829
+ outputSchema: PdfEmbedderOutputSchema,
19830
+ configSchema: PdfEmbedderConfigSchema
19831
+ },
19832
+ [PROCESSOR_IDS.SPLIT]: {
19833
+ id: PROCESSOR_IDS.SPLIT,
19834
+ inputSchema: SplitInputSchema,
19835
+ outputSchema: SplitOutputSchema,
19836
+ configSchema: SplitConfigSchema
19837
+ },
19838
+ [PROCESSOR_IDS.SEGMENT]: {
19839
+ id: PROCESSOR_IDS.SEGMENT,
19840
+ inputSchema: SegmentInputSchema,
19841
+ outputSchema: SegmentOutputSchema,
19842
+ configSchema: SegmentConfigSchema
19843
+ },
19844
+ [PROCESSOR_IDS.CLASSIFY]: {
19845
+ id: PROCESSOR_IDS.CLASSIFY,
19846
+ inputSchema: ClassifyInputSchema,
19847
+ outputSchema: ClassifyOutputSchema,
19848
+ configSchema: ClassifyConfigSchema
19849
+ },
19850
+ [PROCESSOR_IDS.XLSX_TO_JSON]: {
19851
+ id: PROCESSOR_IDS.XLSX_TO_JSON,
19852
+ inputSchema: XlsxToJsonInputSchema,
19853
+ outputSchema: XlsxToJsonOutputSchema,
19854
+ configSchema: XlsxToJsonConfigSchema
19855
+ }
19856
+ };
19857
+ });
19858
+
17331
19859
  // ../types/src/processor/index.ts
17332
- var init_processor = () => {};
19860
+ var init_processor2 = __esm(() => {
19861
+ init_processor();
19862
+ init_execution();
19863
+ init_configs();
19864
+ });
17333
19865
 
17334
19866
  // ../types/src/parser/index.ts
17335
- var init_parser = () => {};
19867
+ var init_parser2 = __esm(() => {
19868
+ init_parser();
19869
+ });
17336
19870
 
17337
19871
  // ../types/src/otel/semantic-conventions.ts
17338
19872
  function mapLLMAttributes(attrs) {
@@ -20370,9 +22904,9 @@ var require_validate = __commonJS((exports) => {
20370
22904
  }
20371
22905
  let expr = data;
20372
22906
  const segments = jsonPointer.split("/");
20373
- for (const segment of segments) {
20374
- if (segment) {
20375
- data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
22907
+ for (const segment2 of segments) {
22908
+ if (segment2) {
22909
+ data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment2))}`;
20376
22910
  expr = (0, codegen_1._)`${expr} && ${data}`;
20377
22911
  }
20378
22912
  }
@@ -20652,7 +23186,7 @@ var require_data = __commonJS((exports, module) => {
20652
23186
  });
20653
23187
 
20654
23188
  // ../../node_modules/fast-uri/lib/utils.js
20655
- var require_utils = __commonJS((exports, module) => {
23189
+ var require_utils3 = __commonJS((exports, module) => {
20656
23190
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
20657
23191
  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);
20658
23192
  function stringArrayToHexStripped(input) {
@@ -20908,7 +23442,7 @@ var require_utils = __commonJS((exports, module) => {
20908
23442
 
20909
23443
  // ../../node_modules/fast-uri/lib/schemes.js
20910
23444
  var require_schemes = __commonJS((exports, module) => {
20911
- var { isUUID } = require_utils();
23445
+ var { isUUID } = require_utils3();
20912
23446
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
20913
23447
  var supportedSchemeNames = [
20914
23448
  "http",
@@ -21082,7 +23616,7 @@ var require_schemes = __commonJS((exports, module) => {
21082
23616
 
21083
23617
  // ../../node_modules/fast-uri/index.js
21084
23618
  var require_fast_uri = __commonJS((exports, module) => {
21085
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
23619
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
21086
23620
  var { SCHEMES, getSchemeHandler } = require_schemes();
21087
23621
  function normalize(uri, options) {
21088
23622
  if (typeof uri === "string") {
@@ -23492,7 +26026,7 @@ var require_draft7 = __commonJS((exports) => {
23492
26026
  });
23493
26027
 
23494
26028
  // ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
23495
- var require_types = __commonJS((exports) => {
26029
+ var require_types2 = __commonJS((exports) => {
23496
26030
  Object.defineProperty(exports, "__esModule", { value: true });
23497
26031
  exports.DiscrError = undefined;
23498
26032
  var DiscrError;
@@ -23506,7 +26040,7 @@ var require_types = __commonJS((exports) => {
23506
26040
  var require_discriminator = __commonJS((exports) => {
23507
26041
  Object.defineProperty(exports, "__esModule", { value: true });
23508
26042
  var codegen_1 = require_codegen();
23509
- var types_1 = require_types();
26043
+ var types_1 = require_types2();
23510
26044
  var compile_1 = require_compile();
23511
26045
  var ref_error_1 = require_ref_error();
23512
26046
  var util_1 = require_util();
@@ -24434,24 +26968,6 @@ var init_validation = __esm(() => {
24434
26968
  init_workspace_schema();
24435
26969
  });
24436
26970
 
24437
- // ../types/src/core/common.ts
24438
- function toJsonSchema2(schema) {
24439
- return exports_external.toJSONSchema(schema, { target: "draft-7" });
24440
- }
24441
- var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
24442
- var init_common = __esm(() => {
24443
- init_zod();
24444
- TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
24445
- return typeof val === "string" ? new Date(val) : val;
24446
- });
24447
- JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
24448
- BaseEntitySchema2 = exports_external.object({
24449
- id: exports_external.string(),
24450
- createdAt: TimestampSchema2.optional(),
24451
- updatedAt: TimestampSchema2.optional()
24452
- });
24453
- });
24454
-
24455
26971
  // ../../node_modules/@babel/parser/lib/index.js
24456
26972
  var require_lib = __commonJS((exports) => {
24457
26973
  Object.defineProperty(exports, "__esModule", {
@@ -24865,12 +27381,12 @@ var require_lib = __commonJS((exports) => {
24865
27381
  }
24866
27382
  const ParseErrorConstructors = {};
24867
27383
  for (const reasonCode of Object.keys(argument)) {
24868
- const template = argument[reasonCode];
24869
- const _ref = typeof template === "string" ? {
24870
- message: () => template
24871
- } : typeof template === "function" ? {
24872
- message: template
24873
- } : template, {
27384
+ const template2 = argument[reasonCode];
27385
+ const _ref = typeof template2 === "string" ? {
27386
+ message: () => template2
27387
+ } : typeof template2 === "function" ? {
27388
+ message: template2
27389
+ } : template2, {
24874
27390
  message
24875
27391
  } = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
24876
27392
  const toMessage = typeof message === "string" ? () => message : message;
@@ -39343,7 +41859,7 @@ var require_keywords = __commonJS((exports) => {
39343
41859
  });
39344
41860
 
39345
41861
  // ../../node_modules/sucrase/dist/parser/tokenizer/types.js
39346
- var require_types2 = __commonJS((exports) => {
41862
+ var require_types3 = __commonJS((exports) => {
39347
41863
  Object.defineProperty(exports, "__esModule", { value: true });
39348
41864
  var TokenType;
39349
41865
  (function(TokenType2) {
@@ -39407,8 +41923,8 @@ var require_types2 = __commonJS((exports) => {
39407
41923
  TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
39408
41924
  const arrow = 22528;
39409
41925
  TokenType2[TokenType2["arrow"] = arrow] = "arrow";
39410
- const template = 23552;
39411
- TokenType2[TokenType2["template"] = template] = "template";
41926
+ const template2 = 23552;
41927
+ TokenType2[TokenType2["template"] = template2] = "template";
39412
41928
  const ellipsis = 24576;
39413
41929
  TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
39414
41930
  const backQuote = 25600;
@@ -39827,7 +42343,7 @@ var require_types2 = __commonJS((exports) => {
39827
42343
  var require_state = __commonJS((exports) => {
39828
42344
  Object.defineProperty(exports, "__esModule", { value: true });
39829
42345
  var _keywords = require_keywords();
39830
- var _types = require_types2();
42346
+ var _types = require_types3();
39831
42347
 
39832
42348
  class Scope {
39833
42349
  constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
@@ -40213,7 +42729,7 @@ var require_base = __commonJS((exports) => {
40213
42729
  var require_util2 = __commonJS((exports) => {
40214
42730
  Object.defineProperty(exports, "__esModule", { value: true });
40215
42731
  var _index = require_tokenizer();
40216
- var _types = require_types2();
42732
+ var _types = require_types3();
40217
42733
  var _charcodes = require_charcodes();
40218
42734
  var _base = require_base();
40219
42735
  function isContextual(contextualKeyword) {
@@ -40375,7 +42891,7 @@ var require_identifier = __commonJS((exports) => {
40375
42891
  var require_readWordTree = __commonJS((exports) => {
40376
42892
  Object.defineProperty(exports, "__esModule", { value: true });
40377
42893
  var _keywords = require_keywords();
40378
- var _types = require_types2();
42894
+ var _types = require_types3();
40379
42895
  var READ_WORD_TREE = new Int32Array([
40380
42896
  -1,
40381
42897
  27,
@@ -49353,7 +51869,7 @@ var require_readWord = __commonJS((exports) => {
49353
51869
  var _identifier = require_identifier();
49354
51870
  var _index = require_tokenizer();
49355
51871
  var _readWordTree = require_readWordTree();
49356
- var _types = require_types2();
51872
+ var _types = require_types3();
49357
51873
  function readWord() {
49358
51874
  let treePos = 0;
49359
51875
  let code = 0;
@@ -49419,7 +51935,7 @@ var require_tokenizer = __commonJS((exports) => {
49419
51935
  var _keywords = require_keywords();
49420
51936
  var _readWord = require_readWord();
49421
51937
  var _readWord2 = _interopRequireDefault(_readWord);
49422
- var _types = require_types2();
51938
+ var _types = require_types3();
49423
51939
  var IdentifierRole;
49424
51940
  (function(IdentifierRole2) {
49425
51941
  const Access = 0;
@@ -50136,7 +52652,7 @@ var require_tokenizer = __commonJS((exports) => {
50136
52652
  // ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
50137
52653
  var require_getImportExportSpecifierInfo = __commonJS((exports) => {
50138
52654
  Object.defineProperty(exports, "__esModule", { value: true });
50139
- var _types = require_types2();
52655
+ var _types = require_types3();
50140
52656
  function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
50141
52657
  let endIndex = index + 1;
50142
52658
  if (isSpecifierEnd(tokens, endIndex)) {
@@ -50489,7 +53005,7 @@ var require_JSXTransformer = __commonJS((exports) => {
50489
53005
  var _xhtml = require_xhtml();
50490
53006
  var _xhtml2 = _interopRequireDefault(_xhtml);
50491
53007
  var _tokenizer = require_tokenizer();
50492
- var _types = require_types2();
53008
+ var _types = require_types3();
50493
53009
  var _charcodes = require_charcodes();
50494
53010
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
50495
53011
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -50993,7 +53509,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
50993
53509
  return obj && obj.__esModule ? obj : { default: obj };
50994
53510
  }
50995
53511
  var _tokenizer = require_tokenizer();
50996
- var _types = require_types2();
53512
+ var _types = require_types3();
50997
53513
  var _JSXTransformer = require_JSXTransformer();
50998
53514
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
50999
53515
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -51032,7 +53548,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
51032
53548
  }
51033
53549
  var _tokenizer = require_tokenizer();
51034
53550
  var _keywords = require_keywords();
51035
- var _types = require_types2();
53551
+ var _types = require_types3();
51036
53552
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
51037
53553
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
51038
53554
  var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
@@ -51803,18 +54319,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
51803
54319
  continue;
51804
54320
  let genColumn = 0;
51805
54321
  for (let j = 0;j < line.length; j++) {
51806
- const segment = line[j];
54322
+ const segment2 = line[j];
51807
54323
  if (j > 0)
51808
54324
  writer.write(comma);
51809
- genColumn = encodeInteger(writer, segment[0], genColumn);
51810
- if (segment.length === 1)
54325
+ genColumn = encodeInteger(writer, segment2[0], genColumn);
54326
+ if (segment2.length === 1)
51811
54327
  continue;
51812
- sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
51813
- sourceLine = encodeInteger(writer, segment[2], sourceLine);
51814
- sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
51815
- if (segment.length === 4)
54328
+ sourcesIndex = encodeInteger(writer, segment2[1], sourcesIndex);
54329
+ sourceLine = encodeInteger(writer, segment2[2], sourceLine);
54330
+ sourceColumn = encodeInteger(writer, segment2[3], sourceColumn);
54331
+ if (segment2.length === 4)
51816
54332
  continue;
51817
- namesIndex = encodeInteger(writer, segment[4], namesIndex);
54333
+ namesIndex = encodeInteger(writer, segment2[4], namesIndex);
51818
54334
  }
51819
54335
  }
51820
54336
  return writer.flush();
@@ -52369,11 +54885,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
52369
54885
  const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
52370
54886
  if (index === -1)
52371
54887
  return OMapping(null, null, null, null);
52372
- const segment = segments[index];
52373
- if (segment.length === 1)
54888
+ const segment2 = segments[index];
54889
+ if (segment2.length === 1)
52374
54890
  return OMapping(null, null, null, null);
52375
54891
  const { names, resolvedSources } = map2;
52376
- return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
54892
+ return OMapping(resolvedSources[segment2[SOURCES_INDEX]], segment2[SOURCE_LINE] + 1, segment2[SOURCE_COLUMN], segment2.length === 5 ? names[segment2[NAMES_INDEX]] : null);
52377
54893
  }
52378
54894
  function generatedPositionFor(map2, needle) {
52379
54895
  const { source, line, column, bias } = needle;
@@ -52486,8 +55002,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
52486
55002
  const max = upperBound(segments, matchedColumn, min);
52487
55003
  const result = [];
52488
55004
  for (;min <= max; min++) {
52489
- const segment = segments[min];
52490
- result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
55005
+ const segment2 = segments[min];
55006
+ result.push(GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]));
52491
55007
  }
52492
55008
  return result;
52493
55009
  }
@@ -52515,8 +55031,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
52515
55031
  const index = traceSegmentInternal(segments, memo, line, column, bias);
52516
55032
  if (index === -1)
52517
55033
  return GMapping(null, null);
52518
- const segment = segments[index];
52519
- return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
55034
+ const segment2 = segments[index];
55035
+ return GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]);
52520
55036
  }
52521
55037
  });
52522
55038
  });
@@ -53067,7 +55583,7 @@ var require_HelperManager = __commonJS((exports) => {
53067
55583
  var require_identifyShadowedGlobals = __commonJS((exports) => {
53068
55584
  Object.defineProperty(exports, "__esModule", { value: true });
53069
55585
  var _tokenizer = require_tokenizer();
53070
- var _types = require_types2();
55586
+ var _types = require_types3();
53071
55587
  function identifyShadowedGlobals(tokens, scopes, globalNames) {
53072
55588
  if (!hasShadowedGlobals(tokens, globalNames)) {
53073
55589
  return;
@@ -53132,7 +55648,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
53132
55648
  // ../../node_modules/sucrase/dist/util/getIdentifierNames.js
53133
55649
  var require_getIdentifierNames = __commonJS((exports) => {
53134
55650
  Object.defineProperty(exports, "__esModule", { value: true });
53135
- var _types = require_types2();
55651
+ var _types = require_types3();
53136
55652
  function getIdentifierNames(code, tokens) {
53137
55653
  const names = [];
53138
55654
  for (const token of tokens) {
@@ -53308,7 +55824,7 @@ var require_util3 = __commonJS((exports) => {
53308
55824
  });
53309
55825
 
53310
55826
  // ../../node_modules/ts-interface-checker/dist/types.js
53311
- var require_types3 = __commonJS((exports) => {
55827
+ var require_types4 = __commonJS((exports) => {
53312
55828
  var __extends = exports && exports.__extends || function() {
53313
55829
  var extendStatics = function(d, b) {
53314
55830
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -53908,9 +56424,9 @@ var require_dist2 = __commonJS((exports) => {
53908
56424
  };
53909
56425
  Object.defineProperty(exports, "__esModule", { value: true });
53910
56426
  exports.Checker = exports.createCheckers = undefined;
53911
- var types_1 = require_types3();
56427
+ var types_1 = require_types4();
53912
56428
  var util_1 = require_util3();
53913
- var types_2 = require_types3();
56429
+ var types_2 = require_types4();
53914
56430
  Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
53915
56431
  return types_2.TArray;
53916
56432
  } });
@@ -54192,7 +56708,7 @@ var require_lval = __commonJS((exports) => {
54192
56708
  var _typescript = require_typescript();
54193
56709
  var _index = require_tokenizer();
54194
56710
  var _keywords = require_keywords();
54195
- var _types = require_types2();
56711
+ var _types = require_types3();
54196
56712
  var _base = require_base();
54197
56713
  var _expression = require_expression();
54198
56714
  var _util = require_util2();
@@ -54324,7 +56840,7 @@ var require_typescript = __commonJS((exports) => {
54324
56840
  Object.defineProperty(exports, "__esModule", { value: true });
54325
56841
  var _index = require_tokenizer();
54326
56842
  var _keywords = require_keywords();
54327
- var _types = require_types2();
56843
+ var _types = require_types3();
54328
56844
  var _base = require_base();
54329
56845
  var _expression = require_expression();
54330
56846
  var _lval = require_lval();
@@ -55586,7 +58102,7 @@ var require_typescript = __commonJS((exports) => {
55586
58102
  var require_jsx = __commonJS((exports) => {
55587
58103
  Object.defineProperty(exports, "__esModule", { value: true });
55588
58104
  var _index = require_tokenizer();
55589
- var _types = require_types2();
58105
+ var _types = require_types3();
55590
58106
  var _base = require_base();
55591
58107
  var _expression = require_expression();
55592
58108
  var _util = require_util2();
@@ -55849,10 +58365,10 @@ var require_jsx = __commonJS((exports) => {
55849
58365
  });
55850
58366
 
55851
58367
  // ../../node_modules/sucrase/dist/parser/plugins/types.js
55852
- var require_types4 = __commonJS((exports) => {
58368
+ var require_types5 = __commonJS((exports) => {
55853
58369
  Object.defineProperty(exports, "__esModule", { value: true });
55854
58370
  var _index = require_tokenizer();
55855
- var _types = require_types2();
58371
+ var _types = require_types3();
55856
58372
  var _base = require_base();
55857
58373
  var _expression = require_expression();
55858
58374
  var _flow = require_flow();
@@ -55885,12 +58401,12 @@ var require_expression = __commonJS((exports) => {
55885
58401
  Object.defineProperty(exports, "__esModule", { value: true });
55886
58402
  var _flow = require_flow();
55887
58403
  var _index = require_jsx();
55888
- var _types = require_types4();
58404
+ var _types = require_types5();
55889
58405
  var _typescript = require_typescript();
55890
58406
  var _index3 = require_tokenizer();
55891
58407
  var _keywords = require_keywords();
55892
58408
  var _state = require_state();
55893
- var _types3 = require_types2();
58409
+ var _types3 = require_types3();
55894
58410
  var _charcodes = require_charcodes();
55895
58411
  var _identifier = require_identifier();
55896
58412
  var _base = require_base();
@@ -56606,7 +59122,7 @@ var require_flow = __commonJS((exports) => {
56606
59122
  Object.defineProperty(exports, "__esModule", { value: true });
56607
59123
  var _index = require_tokenizer();
56608
59124
  var _keywords = require_keywords();
56609
- var _types = require_types2();
59125
+ var _types = require_types3();
56610
59126
  var _base = require_base();
56611
59127
  var _expression = require_expression();
56612
59128
  var _statement = require_statement();
@@ -57481,7 +59997,7 @@ var require_statement = __commonJS((exports) => {
57481
59997
  var _tokenizer = require_tokenizer();
57482
59998
  var _keywords = require_keywords();
57483
59999
  var _state = require_state();
57484
- var _types = require_types2();
60000
+ var _types = require_types3();
57485
60001
  var _charcodes = require_charcodes();
57486
60002
  var _base = require_base();
57487
60003
  var _expression = require_expression();
@@ -58516,7 +61032,7 @@ var require_TokenProcessor = __commonJS((exports) => {
58516
61032
  function _interopRequireDefault(obj) {
58517
61033
  return obj && obj.__esModule ? obj : { default: obj };
58518
61034
  }
58519
- var _types = require_types2();
61035
+ var _types = require_types3();
58520
61036
  var _isAsyncOperation = require_isAsyncOperation();
58521
61037
  var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
58522
61038
 
@@ -58774,7 +61290,7 @@ var require_TokenProcessor = __commonJS((exports) => {
58774
61290
  var require_getClassInfo = __commonJS((exports) => {
58775
61291
  Object.defineProperty(exports, "__esModule", { value: true });
58776
61292
  var _keywords = require_keywords();
58777
- var _types = require_types2();
61293
+ var _types = require_types3();
58778
61294
  function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
58779
61295
  const snapshot = tokens.snapshot();
58780
61296
  const headerInfo = processClassHeader(tokens);
@@ -59012,7 +61528,7 @@ var require_getClassInfo = __commonJS((exports) => {
59012
61528
  // ../../node_modules/sucrase/dist/util/elideImportEquals.js
59013
61529
  var require_elideImportEquals = __commonJS((exports) => {
59014
61530
  Object.defineProperty(exports, "__esModule", { value: true });
59015
- var _types = require_types2();
61531
+ var _types = require_types3();
59016
61532
  function elideImportEquals(tokens) {
59017
61533
  tokens.removeInitialToken();
59018
61534
  tokens.removeToken();
@@ -59036,7 +61552,7 @@ var require_elideImportEquals = __commonJS((exports) => {
59036
61552
  var require_getDeclarationInfo = __commonJS((exports) => {
59037
61553
  Object.defineProperty(exports, "__esModule", { value: true });
59038
61554
  var _tokenizer = require_tokenizer();
59039
- var _types = require_types2();
61555
+ var _types = require_types3();
59040
61556
  var EMPTY_DECLARATION_INFO = {
59041
61557
  typeDeclarations: new Set,
59042
61558
  valueDeclarations: new Set
@@ -59064,7 +61580,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
59064
61580
  var require_isExportFrom = __commonJS((exports) => {
59065
61581
  Object.defineProperty(exports, "__esModule", { value: true });
59066
61582
  var _keywords = require_keywords();
59067
- var _types = require_types2();
61583
+ var _types = require_types3();
59068
61584
  function isExportFrom(tokens) {
59069
61585
  let closeBraceIndex = tokens.currentIndex();
59070
61586
  while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
@@ -59079,7 +61595,7 @@ var require_isExportFrom = __commonJS((exports) => {
59079
61595
  var require_removeMaybeImportAttributes = __commonJS((exports) => {
59080
61596
  Object.defineProperty(exports, "__esModule", { value: true });
59081
61597
  var _keywords = require_keywords();
59082
- var _types = require_types2();
61598
+ var _types = require_types3();
59083
61599
  function removeMaybeImportAttributes(tokens) {
59084
61600
  if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
59085
61601
  tokens.removeToken();
@@ -59094,7 +61610,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
59094
61610
  // ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
59095
61611
  var require_shouldElideDefaultExport = __commonJS((exports) => {
59096
61612
  Object.defineProperty(exports, "__esModule", { value: true });
59097
- var _types = require_types2();
61613
+ var _types = require_types3();
59098
61614
  function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
59099
61615
  if (!isTypeScriptTransformEnabled || keepUnusedImports) {
59100
61616
  return false;
@@ -59125,7 +61641,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
59125
61641
  }
59126
61642
  var _tokenizer = require_tokenizer();
59127
61643
  var _keywords = require_keywords();
59128
- var _types = require_types2();
61644
+ var _types = require_types3();
59129
61645
  var _elideImportEquals = require_elideImportEquals();
59130
61646
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
59131
61647
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -59767,7 +62283,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
59767
62283
  return obj && obj.__esModule ? obj : { default: obj };
59768
62284
  }
59769
62285
  var _keywords = require_keywords();
59770
- var _types = require_types2();
62286
+ var _types = require_types3();
59771
62287
  var _elideImportEquals = require_elideImportEquals();
59772
62288
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
59773
62289
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -60037,7 +62553,7 @@ var require_FlowTransformer = __commonJS((exports) => {
60037
62553
  return obj && obj.__esModule ? obj : { default: obj };
60038
62554
  }
60039
62555
  var _keywords = require_keywords();
60040
- var _types = require_types2();
62556
+ var _types = require_types3();
60041
62557
  var _Transformer = require_Transformer();
60042
62558
  var _Transformer2 = _interopRequireDefault(_Transformer);
60043
62559
 
@@ -60157,7 +62673,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
60157
62673
  }
60158
62674
  return value;
60159
62675
  }
60160
- var _types = require_types2();
62676
+ var _types = require_types3();
60161
62677
  var _Transformer = require_Transformer();
60162
62678
  var _Transformer2 = _interopRequireDefault(_Transformer);
60163
62679
  var JEST_GLOBAL_NAME = "jest";
@@ -60231,7 +62747,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
60231
62747
  function _interopRequireDefault(obj) {
60232
62748
  return obj && obj.__esModule ? obj : { default: obj };
60233
62749
  }
60234
- var _types = require_types2();
62750
+ var _types = require_types3();
60235
62751
  var _Transformer = require_Transformer();
60236
62752
  var _Transformer2 = _interopRequireDefault(_Transformer);
60237
62753
 
@@ -60260,7 +62776,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
60260
62776
  function _interopRequireDefault(obj) {
60261
62777
  return obj && obj.__esModule ? obj : { default: obj };
60262
62778
  }
60263
- var _types = require_types2();
62779
+ var _types = require_types3();
60264
62780
  var _Transformer = require_Transformer();
60265
62781
  var _Transformer2 = _interopRequireDefault(_Transformer);
60266
62782
 
@@ -60288,7 +62804,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
60288
62804
  function _interopRequireDefault(obj) {
60289
62805
  return obj && obj.__esModule ? obj : { default: obj };
60290
62806
  }
60291
- var _types = require_types2();
62807
+ var _types = require_types3();
60292
62808
  var _Transformer = require_Transformer();
60293
62809
  var _Transformer2 = _interopRequireDefault(_Transformer);
60294
62810
 
@@ -60404,7 +62920,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
60404
62920
  return obj && obj.__esModule ? obj : { default: obj };
60405
62921
  }
60406
62922
  var _tokenizer = require_tokenizer();
60407
- var _types = require_types2();
62923
+ var _types = require_types3();
60408
62924
  var _Transformer = require_Transformer();
60409
62925
  var _Transformer2 = _interopRequireDefault(_Transformer);
60410
62926
 
@@ -60655,7 +63171,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
60655
63171
  function _interopRequireDefault(obj) {
60656
63172
  return obj && obj.__esModule ? obj : { default: obj };
60657
63173
  }
60658
- var _types = require_types2();
63174
+ var _types = require_types3();
60659
63175
  var _isIdentifier = require_isIdentifier();
60660
63176
  var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
60661
63177
  var _Transformer = require_Transformer();
@@ -60801,7 +63317,7 @@ var require_RootTransformer = __commonJS((exports) => {
60801
63317
  return obj && obj.__esModule ? obj : { default: obj };
60802
63318
  }
60803
63319
  var _keywords = require_keywords();
60804
- var _types = require_types2();
63320
+ var _types = require_types3();
60805
63321
  var _getClassInfo = require_getClassInfo();
60806
63322
  var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
60807
63323
  var _CJSImportTransformer = require_CJSImportTransformer();
@@ -61200,7 +63716,7 @@ var require_formatTokens = __commonJS((exports) => {
61200
63716
  }
61201
63717
  var _linesandcolumns = require_build();
61202
63718
  var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
61203
- var _types = require_types2();
63719
+ var _types = require_types3();
61204
63720
  function formatTokens(code, tokens) {
61205
63721
  if (tokens.length === 0) {
61206
63722
  return "";
@@ -61265,7 +63781,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
61265
63781
  function _interopRequireDefault(obj) {
61266
63782
  return obj && obj.__esModule ? obj : { default: obj };
61267
63783
  }
61268
- var _types = require_types2();
63784
+ var _types = require_types3();
61269
63785
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
61270
63786
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
61271
63787
  function getTSImportedNames(tokens) {
@@ -61650,7 +64166,7 @@ function describeUnsupportedType(nodeType) {
61650
64166
  function compileTypedScript(opts) {
61651
64167
  let ast;
61652
64168
  try {
61653
- ast = import_parser2.parse(opts.source, {
64169
+ ast = import_parser4.parse(opts.source, {
61654
64170
  sourceType: "script",
61655
64171
  plugins: ["typescript"],
61656
64172
  ranges: true
@@ -61902,9 +64418,9 @@ function stripCommentsAndStrings(s) {
61902
64418
  out = out.replace(/`(\\.|[^`\\])*`/g, "``");
61903
64419
  return out;
61904
64420
  }
61905
- var import_parser2, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
64421
+ var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
61906
64422
  var init_compile = __esm(() => {
61907
- import_parser2 = __toESM(require_lib(), 1);
64423
+ import_parser4 = __toESM(require_lib(), 1);
61908
64424
  import_sucrase = __toESM(require_dist3(), 1);
61909
64425
  EVALUATOR_PARAM_NAMES = ["expected", "actual"];
61910
64426
  });
@@ -61947,7 +64463,7 @@ function parseStepType(type) {
61947
64463
  function isStepCategory(type, category) {
61948
64464
  return type.startsWith(`${category}.`);
61949
64465
  }
61950
- var AI_STEP_TYPES, TRANSFORM_STEP_TYPES, ACTION_STEP_TYPES, CONTROL_STEP_TYPES, STEP_TYPES, StepTypeValue, StepTypeSchema, BaseStepSchema, AIStepSchema, TransformStepSchema, HttpMethodSchema, ActionStepSchema, WaitStepSchema, FailStepSchema, BlockStepSchemaInner, IfStepSchemaInner, SwitchCaseSchemaInner, SwitchStepSchemaInner, ParallelBranchSchemaInner, ParallelStepSchemaInner, ForeachStepSchemaInner, ParallelMapStepSchemaInner, StepSchema, BlockStepSchema, IfStepSchema, SwitchStepSchema, ParallelBranchSchema, ParallelStepSchema, ForeachStepSchema, ParallelMapStepSchema;
64466
+ var AI_STEP_TYPES, TRANSFORM_STEP_TYPES, ACTION_STEP_TYPES, CONTROL_STEP_TYPES, STEP_TYPES, StepTypeValue, StepTypeSchema, BaseStepSchema, AIStepSchema, TransformStepSchema, HttpMethodSchema, ActionStepSchema, WaitStepSchema, FailStepSchema, LegacyBlockStepSchemaInner, IfStepSchemaInner, SwitchCaseSchemaInner, SwitchStepSchemaInner, ParallelBranchSchemaInner, ParallelStepSchemaInner, ForeachStepSchemaInner, ParallelMapStepSchemaInner, StepSchema, LegacyBlockStepSchema, IfStepSchema, SwitchStepSchema, ParallelBranchSchema, ParallelStepSchema, ForeachStepSchema, ParallelMapStepSchema;
61951
64467
  var init_steps = __esm(() => {
61952
64468
  init_zod();
61953
64469
  AI_STEP_TYPES = [
@@ -61982,7 +64498,6 @@ var init_steps = __esm(() => {
61982
64498
  "control.parallel",
61983
64499
  "control.parallel_map",
61984
64500
  "control.wait",
61985
- "control.block",
61986
64501
  "control.fail"
61987
64502
  ];
61988
64503
  STEP_TYPES = [
@@ -62017,7 +64532,6 @@ var init_steps = __esm(() => {
62017
64532
  CONTROL_PARALLEL: "control.parallel",
62018
64533
  CONTROL_PARALLEL_MAP: "control.parallel_map",
62019
64534
  CONTROL_WAIT: "control.wait",
62020
- CONTROL_BLOCK: "control.block",
62021
64535
  CONTROL_FAIL: "control.fail"
62022
64536
  };
62023
64537
  StepTypeSchema = exports_external.enum(STEP_TYPES);
@@ -62051,7 +64565,7 @@ var init_steps = __esm(() => {
62051
64565
  statusCode: exports_external.number().int().min(400).max(599).optional(),
62052
64566
  message: exports_external.string().min(1)
62053
64567
  });
62054
- BlockStepSchemaInner = BaseStepSchema.extend({
64568
+ LegacyBlockStepSchemaInner = BaseStepSchema.extend({
62055
64569
  type: exports_external.literal("control.block"),
62056
64570
  blockName: exports_external.string().min(1),
62057
64571
  inputs: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
@@ -62101,14 +64615,14 @@ var init_steps = __esm(() => {
62101
64615
  ActionStepSchema,
62102
64616
  WaitStepSchema,
62103
64617
  FailStepSchema,
62104
- BlockStepSchemaInner,
64618
+ LegacyBlockStepSchemaInner,
62105
64619
  IfStepSchemaInner,
62106
64620
  SwitchStepSchemaInner,
62107
64621
  ParallelStepSchemaInner,
62108
64622
  ForeachStepSchemaInner,
62109
64623
  ParallelMapStepSchemaInner
62110
64624
  ]));
62111
- BlockStepSchema = BlockStepSchemaInner;
64625
+ LegacyBlockStepSchema = LegacyBlockStepSchemaInner;
62112
64626
  IfStepSchema = IfStepSchemaInner;
62113
64627
  SwitchStepSchema = SwitchStepSchemaInner;
62114
64628
  ParallelBranchSchema = ParallelBranchSchemaInner;
@@ -62139,8 +64653,8 @@ function getAllStepJsonSchemas() {
62139
64653
  category: def.category,
62140
64654
  name: def.name,
62141
64655
  description: def.description,
62142
- configSchema: toJsonSchema2(def.configSchema),
62143
- outputSchema: toJsonSchema2(def.outputSchema),
64656
+ configSchema: toJsonSchema(def.configSchema),
64657
+ outputSchema: toJsonSchema(def.outputSchema),
62144
64658
  configInWith: def.configInWith
62145
64659
  }));
62146
64660
  }
@@ -62190,7 +64704,7 @@ function isOutputSchemaUnknown(stepType) {
62190
64704
  const def = schema._def;
62191
64705
  return def?.typeName === "ZodUnknown";
62192
64706
  }
62193
- var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, AiSplitConfigSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlBlockConfigSchema, ControlBlockOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, STEP_SCHEMAS;
64707
+ var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, AiSplitConfigSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, STEP_SCHEMAS;
62194
64708
  var init_step_configs = __esm(() => {
62195
64709
  init_zod();
62196
64710
  init_common();
@@ -62530,11 +65044,54 @@ var init_step_configs = __esm(() => {
62530
65044
  responseCharset: exports_external.string().describe("Charset used to decode the response body (e.g. utf-8, windows-1250)")
62531
65045
  });
62532
65046
  ActionInvokeWorkflowConfigSchema = exports_external.object({
62533
- workflowId: exports_external.string().min(1, "Workflow ID is required").describe("ID of workflow to invoke"),
65047
+ workflow: exports_external.string().min(1).optional().describe("Workflow to invoke — definition name or wf_ id (tenant-scoped)"),
65048
+ workflowId: exports_external.string().min(1).optional().describe("Legacy alias for workflow when the value is a wf_ id"),
65049
+ execution: exports_external.enum(["inline", "child"]).optional().describe("inline: run target steps in this execution (default). child: spawn a separate run with lineage."),
62534
65050
  input: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Input record keyed by the invoked workflow's declared inputs"),
62535
- wait: exports_external.boolean().optional().describe("Wait for the invoked workflow to complete and return its output (default: true). Set false for fire-and-forget."),
62536
- timeout: exports_external.number().optional().describe("Max wait time in ms when waiting (default: 300000)"),
62537
- pollInterval: exports_external.number().optional().describe("How often to poll status in ms when waiting (default: 1000)")
65051
+ wait: exports_external.boolean().optional().describe("Child mode only. Wait for the invoked workflow to complete and return its output (default: true). Set false for fire-and-forget."),
65052
+ timeout: exports_external.number().optional().describe("Child mode only. Max wait time in ms when waiting (default: 300000)"),
65053
+ pollInterval: exports_external.number().optional().describe("Child mode only. How often to poll status in ms when waiting (default: 1000)")
65054
+ }).superRefine((data, ctx) => {
65055
+ const hasWorkflow = typeof data.workflow === "string" && data.workflow.length > 0;
65056
+ const hasWorkflowId = typeof data.workflowId === "string" && data.workflowId.length > 0;
65057
+ if (hasWorkflow && hasWorkflowId) {
65058
+ ctx.addIssue({
65059
+ code: "custom",
65060
+ message: "Cannot set both workflow and workflowId",
65061
+ path: ["workflow"]
65062
+ });
65063
+ }
65064
+ if (!hasWorkflow && !hasWorkflowId) {
65065
+ ctx.addIssue({
65066
+ code: "custom",
65067
+ message: "workflow or workflowId is required",
65068
+ path: ["workflow"]
65069
+ });
65070
+ }
65071
+ const mode = data.execution === "child" ? "child" : "inline";
65072
+ if (mode === "inline") {
65073
+ if (data.wait === false) {
65074
+ ctx.addIssue({
65075
+ code: "custom",
65076
+ message: "wait: false is not supported with execution: inline",
65077
+ path: ["wait"]
65078
+ });
65079
+ }
65080
+ if (data.timeout !== undefined) {
65081
+ ctx.addIssue({
65082
+ code: "custom",
65083
+ message: "timeout is only supported with execution: child",
65084
+ path: ["timeout"]
65085
+ });
65086
+ }
65087
+ if (data.pollInterval !== undefined) {
65088
+ ctx.addIssue({
65089
+ code: "custom",
65090
+ message: "pollInterval is only supported with execution: child",
65091
+ path: ["pollInterval"]
65092
+ });
65093
+ }
65094
+ }
62538
65095
  });
62539
65096
  ActionInvokeWorkflowOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("When wait is true, the invoked workflow's declared output fields are flattened to the top level alongside a `files` array — reference them as {{ steps.<invoke>.output.<field> }} (there is no `.data` or `.result` wrapper). When wait is false, execution metadata. Call get_workflow_output_schema to see the exact resolved fields.");
62540
65097
  ActionWebsiteReaderConfigSchema = exports_external.object({
@@ -62599,11 +65156,6 @@ var init_step_configs = __esm(() => {
62599
65156
  ControlWaitOutputSchema = exports_external.object({
62600
65157
  waited: exports_external.number().describe("Actual milliseconds waited")
62601
65158
  });
62602
- ControlBlockConfigSchema = exports_external.object({
62603
- blockName: exports_external.string().min(1, "Block name is required").describe("Name of the block to execute"),
62604
- inputs: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Input mapping for the block")
62605
- });
62606
- ControlBlockOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Output from block's declared output mapping");
62607
65159
  ControlFailConfigSchema = exports_external.object({
62608
65160
  condition: exports_external.string().optional().describe("Optional LiquidJS expression. When set, the step only fails if this evaluates truthy; when omitted, it always fails when reached (compose with control.if for legacy gating)."),
62609
65161
  statusCode: exports_external.number().int().min(400).max(599).default(422).describe("HTTP-style status code returned to the caller (sync runs) and persisted on the execution. Default 422 (Unprocessable Entity)."),
@@ -62836,15 +65388,6 @@ var init_step_configs = __esm(() => {
62836
65388
  outputSchema: ControlWaitOutputSchema,
62837
65389
  configInWith: false
62838
65390
  },
62839
- "control.block": {
62840
- type: "control.block",
62841
- category: "control",
62842
- name: "Block",
62843
- description: "Execute a reusable block workflow inline with input/output mapping",
62844
- configSchema: ControlBlockConfigSchema,
62845
- outputSchema: ControlBlockOutputSchema,
62846
- configInWith: false
62847
- },
62848
65391
  "control.fail": {
62849
65392
  type: "control.fail",
62850
65393
  category: "control",
@@ -62870,81 +65413,6 @@ var init_actions = __esm(() => {
62870
65413
  ACTION_TYPES = ActionTypeSchema.options;
62871
65414
  });
62872
65415
 
62873
- // ../types/src/processor/execution.ts
62874
- function asTuple(values) {
62875
- return values;
62876
- }
62877
- var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
62878
- var init_execution = __esm(() => {
62879
- init_zod();
62880
- WorkflowExecutionStatusValue2 = {
62881
- CREATED: "created",
62882
- PENDING: "pending",
62883
- RUNNING: "running",
62884
- WAITING: "waiting",
62885
- COMPLETED: "completed",
62886
- FAILED: "failed",
62887
- CANCELLED: "cancelled"
62888
- };
62889
- WorkflowExecutionStatusSchema2 = exports_external.enum([
62890
- WorkflowExecutionStatusValue2.CREATED,
62891
- WorkflowExecutionStatusValue2.PENDING,
62892
- WorkflowExecutionStatusValue2.RUNNING,
62893
- WorkflowExecutionStatusValue2.WAITING,
62894
- WorkflowExecutionStatusValue2.COMPLETED,
62895
- WorkflowExecutionStatusValue2.FAILED,
62896
- WorkflowExecutionStatusValue2.CANCELLED
62897
- ]);
62898
- StepExecutionStatusValue2 = {
62899
- PENDING: "pending",
62900
- RUNNING: "running",
62901
- SUCCESS: "success",
62902
- FAILURE: "failure",
62903
- WAITING: "waiting",
62904
- SKIPPED: "skipped"
62905
- };
62906
- StepExecutionStatusSchema2 = exports_external.enum([
62907
- StepExecutionStatusValue2.PENDING,
62908
- StepExecutionStatusValue2.RUNNING,
62909
- StepExecutionStatusValue2.SUCCESS,
62910
- StepExecutionStatusValue2.FAILURE,
62911
- StepExecutionStatusValue2.WAITING,
62912
- StepExecutionStatusValue2.SKIPPED
62913
- ]);
62914
- TriggerTypeValue2 = {
62915
- MANUAL: "manual",
62916
- API: "api",
62917
- WEBHOOK: "webhook",
62918
- SCHEDULE: "schedule",
62919
- EMAIL: "email",
62920
- EVAL: "eval",
62921
- CLI: "cli"
62922
- };
62923
- TriggerTypeSchema2 = exports_external.enum([
62924
- TriggerTypeValue2.MANUAL,
62925
- TriggerTypeValue2.API,
62926
- TriggerTypeValue2.WEBHOOK,
62927
- TriggerTypeValue2.SCHEDULE,
62928
- TriggerTypeValue2.EMAIL,
62929
- TriggerTypeValue2.EVAL,
62930
- TriggerTypeValue2.CLI
62931
- ]);
62932
- ExecutionTypeValue2 = {
62933
- PROD: "prod",
62934
- EVAL: "eval",
62935
- PLAYGROUND: "playground"
62936
- };
62937
- ExecutionTypeSchema2 = exports_external.enum([
62938
- ExecutionTypeValue2.PROD,
62939
- ExecutionTypeValue2.EVAL,
62940
- ExecutionTypeValue2.PLAYGROUND
62941
- ]);
62942
- WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
62943
- STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
62944
- TRIGGER_TYPES2 = TriggerTypeSchema2.options;
62945
- EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
62946
- });
62947
-
62948
65416
  // ../types/src/workflow/workflow.ts
62949
65417
  function suggestWorkflowName(raw) {
62950
65418
  return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
@@ -63025,11 +65493,11 @@ var init_workflow = __esm(() => {
63025
65493
  ManualTriggerMethodSchema = exports_external.object({
63026
65494
  type: exports_external.literal("manual"),
63027
65495
  enabled: exports_external.boolean().optional(),
63028
- inputSchema: JsonSchemaSchema2.optional()
65496
+ inputSchema: JsonSchemaSchema.optional()
63029
65497
  });
63030
65498
  ApiTriggerMethodSchema = exports_external.object({
63031
65499
  type: exports_external.literal("api"),
63032
- inputSchema: JsonSchemaSchema2.optional()
65500
+ inputSchema: JsonSchemaSchema.optional()
63033
65501
  });
63034
65502
  EmailTriggerMethodSchema = exports_external.object({
63035
65503
  type: exports_external.literal("email"),
@@ -63051,7 +65519,7 @@ var init_workflow = __esm(() => {
63051
65519
  });
63052
65520
  WorkflowDefinitionSchema = exports_external.object({
63053
65521
  name: WorkflowNameSchema,
63054
- kind: exports_external.enum(["workflow", "block"]).default("workflow").optional(),
65522
+ kind: exports_external.enum(["workflow"]).default("workflow").optional(),
63055
65523
  version: exports_external.string().default("1.0.0"),
63056
65524
  description: exports_external.string().optional(),
63057
65525
  enabled: exports_external.boolean().default(true),
@@ -63068,8 +65536,8 @@ var init_workflow = __esm(() => {
63068
65536
  yamlContent: exports_external.string(),
63069
65537
  definition: WorkflowDefinitionSchema,
63070
65538
  isCurrent: exports_external.boolean().default(true),
63071
- createdAt: TimestampSchema2,
63072
- updatedAt: TimestampSchema2.optional(),
65539
+ createdAt: TimestampSchema,
65540
+ updatedAt: TimestampSchema.optional(),
63073
65541
  createdBy: exports_external.string()
63074
65542
  });
63075
65543
  CreateWorkflowDefinitionSchema = exports_external.object({
@@ -63251,14 +65719,14 @@ function isFileOutput(value) {
63251
65719
  function isWorkflowResult(value) {
63252
65720
  return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
63253
65721
  }
63254
- var WorkflowExecutionStatusSchema3, StepExecutionStatusSchema3, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
65722
+ var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
63255
65723
  var init_execution2 = __esm(() => {
63256
65724
  init_zod();
63257
65725
  init_common();
63258
65726
  init_execution();
63259
65727
  init_workflow();
63260
- WorkflowExecutionStatusSchema3 = WorkflowExecutionStatusSchema2;
63261
- StepExecutionStatusSchema3 = StepExecutionStatusSchema2;
65728
+ WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
65729
+ StepExecutionStatusSchema2 = StepExecutionStatusSchema;
63262
65730
  ScopeEntryTypeSchema = exports_external.enum([
63263
65731
  "root",
63264
65732
  "if-then",
@@ -63266,6 +65734,7 @@ var init_execution2 = __esm(() => {
63266
65734
  "parallel-branch",
63267
65735
  "foreach-iteration",
63268
65736
  "parallel-map-iteration",
65737
+ "inline-invoke",
63269
65738
  "block"
63270
65739
  ]);
63271
65740
  ScopeEntrySchema = exports_external.object({
@@ -63280,7 +65749,7 @@ var init_execution2 = __esm(() => {
63280
65749
  ScopeStackSchema = exports_external.array(ScopeEntrySchema);
63281
65750
  StepResultSchema = exports_external.object({
63282
65751
  output: exports_external.unknown(),
63283
- status: StepExecutionStatusSchema3
65752
+ status: StepExecutionStatusSchema2
63284
65753
  });
63285
65754
  ExecutionContextSchema = exports_external.object({
63286
65755
  input: exports_external.record(exports_external.string(), exports_external.unknown()),
@@ -63308,7 +65777,7 @@ var init_execution2 = __esm(() => {
63308
65777
  triggerType: exports_external.string(),
63309
65778
  triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
63310
65779
  overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
63311
- status: WorkflowExecutionStatusSchema3,
65780
+ status: WorkflowExecutionStatusSchema2,
63312
65781
  scopeStack: ScopeStackSchema,
63313
65782
  currentStepIndex: exports_external.number(),
63314
65783
  stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
@@ -63316,15 +65785,15 @@ var init_execution2 = __esm(() => {
63316
65785
  error: exports_external.string().nullable(),
63317
65786
  priority: exports_external.number().default(50),
63318
65787
  leaseId: exports_external.string().nullable(),
63319
- leaseExpiresAt: TimestampSchema2.nullable(),
65788
+ leaseExpiresAt: TimestampSchema.nullable(),
63320
65789
  workerId: exports_external.string().nullable(),
63321
65790
  maxRetries: exports_external.number().default(0),
63322
65791
  originalExecutionId: exports_external.string().nullable().optional(),
63323
65792
  previousExecutionId: exports_external.string().nullable().optional(),
63324
65793
  retryNumber: exports_external.number().default(0),
63325
- createdAt: TimestampSchema2,
63326
- startedAt: TimestampSchema2.nullable(),
63327
- completedAt: TimestampSchema2.nullable(),
65794
+ createdAt: TimestampSchema,
65795
+ startedAt: TimestampSchema.nullable(),
65796
+ completedAt: TimestampSchema.nullable(),
63328
65797
  createdBy: exports_external.string().nullable()
63329
65798
  });
63330
65799
  StepExecutionSchema = exports_external.object({
@@ -63341,12 +65810,12 @@ var init_execution2 = __esm(() => {
63341
65810
  stepAttempt: exports_external.number().default(0),
63342
65811
  inputData: exports_external.unknown().nullable(),
63343
65812
  outputData: exports_external.unknown().nullable(),
63344
- status: StepExecutionStatusSchema3,
65813
+ status: StepExecutionStatusSchema2,
63345
65814
  error: exports_external.string().nullable(),
63346
65815
  overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
63347
65816
  durationMs: exports_external.number().nullable(),
63348
- startedAt: TimestampSchema2.nullable(),
63349
- completedAt: TimestampSchema2.nullable()
65817
+ startedAt: TimestampSchema.nullable(),
65818
+ completedAt: TimestampSchema.nullable()
63350
65819
  });
63351
65820
  ConnectorSchema = exports_external.object({
63352
65821
  id: exports_external.string(),
@@ -63357,8 +65826,8 @@ var init_execution2 = __esm(() => {
63357
65826
  config: exports_external.record(exports_external.string(), exports_external.unknown()),
63358
65827
  inputSchema: exports_external.unknown().optional(),
63359
65828
  outputSchema: exports_external.unknown().optional(),
63360
- createdAt: TimestampSchema2,
63361
- updatedAt: TimestampSchema2.optional(),
65829
+ createdAt: TimestampSchema,
65830
+ updatedAt: TimestampSchema.optional(),
63362
65831
  createdBy: exports_external.string()
63363
65832
  });
63364
65833
  WorkflowFileOutputSchema = exports_external.object({
@@ -63448,6 +65917,21 @@ function hasDeclaredOutput(output) {
63448
65917
  return output.trim().length > 0;
63449
65918
  return !!output && Object.keys(output).length > 0;
63450
65919
  }
65920
+ function isWorkflowIdRef(ref) {
65921
+ return ref.startsWith("wf_");
65922
+ }
65923
+ function getInvokeExecutionMode(withConfig) {
65924
+ return withConfig?.execution === "child" ? "child" : "inline";
65925
+ }
65926
+ function getInvokeWorkflowRef(withConfig) {
65927
+ const workflow = withConfig?.workflow;
65928
+ if (typeof workflow === "string" && workflow.length > 0)
65929
+ return workflow;
65930
+ const workflowId = withConfig?.workflowId;
65931
+ if (typeof workflowId === "string" && workflowId.length > 0)
65932
+ return workflowId;
65933
+ return;
65934
+ }
63451
65935
  function* iterateSteps(steps) {
63452
65936
  if (!Array.isArray(steps))
63453
65937
  return;
@@ -63472,17 +65956,44 @@ function* iterateSteps(steps) {
63472
65956
  }
63473
65957
  }
63474
65958
  }
65959
+ function collectInvokeWorkflowTargets(definition) {
65960
+ const seen = new Set;
65961
+ const targets = [];
65962
+ for (const step of iterateSteps(definition?.steps)) {
65963
+ if (step.type !== "action.invoke-workflow")
65964
+ continue;
65965
+ const withConfig = step.with;
65966
+ const ref = getInvokeWorkflowRef(withConfig);
65967
+ if (!ref)
65968
+ continue;
65969
+ const key = `${getInvokeExecutionMode(withConfig)}:${ref}`;
65970
+ if (seen.has(key))
65971
+ continue;
65972
+ seen.add(key);
65973
+ targets.push({
65974
+ ref,
65975
+ mode: getInvokeExecutionMode(withConfig),
65976
+ stepName: typeof step.name === "string" ? step.name : undefined
65977
+ });
65978
+ }
65979
+ return targets;
65980
+ }
63475
65981
  function collectInvokeWorkflowTargetIds(definition) {
63476
65982
  const ids = new Set;
63477
- for (const step of iterateSteps(definition?.steps)) {
63478
- if (step.type === "action.invoke-workflow") {
63479
- const id = step.with?.workflowId;
63480
- if (typeof id === "string" && id.length > 0)
63481
- ids.add(id);
63482
- }
65983
+ for (const { ref } of collectInvokeWorkflowTargets(definition)) {
65984
+ if (isWorkflowIdRef(ref))
65985
+ ids.add(ref);
63483
65986
  }
63484
65987
  return [...ids];
63485
65988
  }
65989
+ function collectInvokeWorkflowTargetNames(definition) {
65990
+ const names = new Set;
65991
+ for (const { ref } of collectInvokeWorkflowTargets(definition)) {
65992
+ if (!isWorkflowIdRef(ref))
65993
+ names.add(ref);
65994
+ }
65995
+ return [...names];
65996
+ }
63486
65997
 
63487
65998
  // ../types/src/workflow/index.ts
63488
65999
  var init_workflow2 = __esm(() => {
@@ -64281,8 +66792,8 @@ function parseRunTarget(target) {
64281
66792
  if (root !== "agents") {
64282
66793
  throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
64283
66794
  }
64284
- for (const segment of segments) {
64285
- RunTargetSegmentSchema.parse(segment);
66795
+ for (const segment2 of segments) {
66796
+ RunTargetSegmentSchema.parse(segment2);
64286
66797
  }
64287
66798
  const packagePath = packageName.split(".").join("/");
64288
66799
  const [, ...slugParts] = packagePath.split("/");
@@ -64395,9 +66906,9 @@ var init_grammar = __esm(() => {
64395
66906
  if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
64396
66907
  ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
64397
66908
  }
64398
- for (const segment of parts.slice(1)) {
64399
- if (!SourcePackageSegmentSchema.safeParse(segment).success) {
64400
- ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
66909
+ for (const segment2 of parts.slice(1)) {
66910
+ if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
66911
+ ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
64401
66912
  }
64402
66913
  }
64403
66914
  });
@@ -64413,9 +66924,9 @@ var init_grammar = __esm(() => {
64413
66924
  if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
64414
66925
  ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
64415
66926
  }
64416
- for (const segment of parts.slice(1)) {
64417
- if (!SourcePackageSegmentSchema.safeParse(segment).success) {
64418
- ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
66927
+ for (const segment2 of parts.slice(1)) {
66928
+ if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
66929
+ ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
64419
66930
  }
64420
66931
  }
64421
66932
  });
@@ -64509,9 +67020,9 @@ var init_grammar = __esm(() => {
64509
67020
  });
64510
67021
  return;
64511
67022
  }
64512
- for (const segment of parts.slice(1)) {
64513
- if (!RunTargetSegmentSchema.safeParse(segment).success) {
64514
- ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment}` });
67023
+ for (const segment2 of parts.slice(1)) {
67024
+ if (!RunTargetSegmentSchema.safeParse(segment2).success) {
67025
+ ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment2}` });
64515
67026
  }
64516
67027
  }
64517
67028
  if (ref) {
@@ -64969,8 +67480,6 @@ function workflowMethodEnabled(methods, type) {
64969
67480
  return methods.some((method) => method.type === type);
64970
67481
  }
64971
67482
  function triggersFromWorkflowDefinition(definition) {
64972
- if (definition.kind === "block")
64973
- return [];
64974
67483
  const methods = getTriggerMethods(definition);
64975
67484
  return [
64976
67485
  { type: "api", enabled: workflowMethodEnabled(methods, "api") },
@@ -65263,7 +67772,7 @@ function fromBig(n, le = false) {
65263
67772
  return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
65264
67773
  return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
65265
67774
  }
65266
- function split(lst, le = false) {
67775
+ function split2(lst, le = false) {
65267
67776
  const len = lst.length;
65268
67777
  let Ah = new Uint32Array(len);
65269
67778
  let Al = new Uint32Array(len);
@@ -65443,7 +67952,7 @@ var init_sha2 = __esm(() => {
65443
67952
  super(28);
65444
67953
  }
65445
67954
  };
65446
- K512 = /* @__PURE__ */ (() => split([
67955
+ K512 = /* @__PURE__ */ (() => split2([
65447
67956
  "0x428a2f98d728ae22",
65448
67957
  "0x7137449123ef65cd",
65449
67958
  "0xb5c0fbcfec4d3b2f",
@@ -65832,11 +68341,11 @@ function walkGrammar(node, parts) {
65832
68341
  }
65833
68342
  return current;
65834
68343
  }
65835
- function normalizeTemplate(template) {
65836
- return template.endsWith("/") ? template.slice(0, -1) : template;
68344
+ function normalizeTemplate(template2) {
68345
+ return template2.endsWith("/") ? template2.slice(0, -1) : template2;
65837
68346
  }
65838
- function renderTemplate(template, params) {
65839
- return normalizeTemplate(template).split("/").flatMap((part) => {
68347
+ function renderTemplate(template2, params) {
68348
+ return normalizeTemplate(template2).split("/").flatMap((part) => {
65840
68349
  if (!part.startsWith(":")) {
65841
68350
  return [part];
65842
68351
  }
@@ -65846,36 +68355,36 @@ function renderTemplate(template, params) {
65846
68355
  throw new Error(`Missing S3 path parameter: ${part}`);
65847
68356
  }
65848
68357
  if (name === "path") {
65849
- return value.split("/").map((segment) => assertSegment("path", segment));
68358
+ return value.split("/").map((segment2) => assertSegment("path", segment2));
65850
68359
  }
65851
68360
  return [assertSegment(String(name), value)];
65852
68361
  });
65853
68362
  }
65854
- function buildS3Path(tenantId, template, params) {
68363
+ function buildS3Path(tenantId, template2, params) {
65855
68364
  const tenant = assertSegment("tenantId", tenantId);
65856
- const parts = renderTemplate(template, params);
68365
+ const parts = renderTemplate(template2, params);
65857
68366
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
65858
- if (template.endsWith("/") && node === PATH_LEAF) {
65859
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
68367
+ if (template2.endsWith("/") && node === PATH_LEAF) {
68368
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65860
68369
  }
65861
68370
  const path = ["tenants", tenant, ...parts].join("/");
65862
- return template.endsWith("/") ? `${path}/` : path;
68371
+ return template2.endsWith("/") ? `${path}/` : path;
65863
68372
  }
65864
- function buildS3PathSuffix(template, params) {
65865
- const parts = renderTemplate(template, params);
68373
+ function buildS3PathSuffix(template2, params) {
68374
+ const parts = renderTemplate(template2, params);
65866
68375
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
65867
- if (template.endsWith("/") && node === PATH_LEAF) {
65868
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
68376
+ if (template2.endsWith("/") && node === PATH_LEAF) {
68377
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65869
68378
  }
65870
68379
  const path = parts.join("/");
65871
- return template.endsWith("/") ? `${path}/` : path;
68380
+ return template2.endsWith("/") ? `${path}/` : path;
65872
68381
  }
65873
68382
  function stripTenantPrefix(key) {
65874
68383
  return key.replace(TENANT_PREFIX_RX, "");
65875
68384
  }
65876
- function matchS3Path(template, key) {
68385
+ function matchS3Path(template2, key) {
65877
68386
  const keyParts = stripTenantPrefix(key).split("/");
65878
- const templateParts = normalizeTemplate(template).split("/");
68387
+ const templateParts = normalizeTemplate(template2).split("/");
65879
68388
  const params = {};
65880
68389
  let keyIndex = 0;
65881
68390
  for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
@@ -65894,7 +68403,7 @@ function matchS3Path(template, key) {
65894
68403
  if (rest.length === 0)
65895
68404
  return null;
65896
68405
  try {
65897
- params.path = rest.map((segment) => assertSegment("path", segment)).join("/");
68406
+ params.path = rest.map((segment2) => assertSegment("path", segment2)).join("/");
65898
68407
  walkGrammar(S3_PATH_GRAMMAR, keyParts);
65899
68408
  } catch {
65900
68409
  return null;
@@ -65928,23 +68437,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
65928
68437
  }
65929
68438
  return assertSegment("tenantId", tenantId);
65930
68439
  };
65931
- const build = (template, params) => {
68440
+ const build = (template2, params) => {
65932
68441
  const tenant = resolveTenantId(params);
65933
- const parts = renderTemplate(template, params ?? {});
68442
+ const parts = renderTemplate(template2, params ?? {});
65934
68443
  const node = walkGrammar(grammarNode, parts);
65935
- if (template.endsWith("/") && node === PATH_LEAF) {
65936
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
68444
+ if (template2.endsWith("/") && node === PATH_LEAF) {
68445
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65937
68446
  }
65938
68447
  const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
65939
- return template.endsWith("/") ? `${path}/` : path;
68448
+ return template2.endsWith("/") ? `${path}/` : path;
65940
68449
  };
65941
68450
  const builder = build;
65942
- builder.at = (template, params) => {
68451
+ builder.at = (template2, params) => {
65943
68452
  const tenant = resolveTenantId(params);
65944
- const parts = renderTemplate(template, params ?? {});
68453
+ const parts = renderTemplate(template2, params ?? {});
65945
68454
  const nextNode = walkGrammar(grammarNode, parts);
65946
- if (template.endsWith("/") && nextNode === PATH_LEAF) {
65947
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
68455
+ if (template2.endsWith("/") && nextNode === PATH_LEAF) {
68456
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65948
68457
  }
65949
68458
  return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
65950
68459
  };
@@ -66179,6 +68688,7 @@ __export(exports_src, {
66179
68688
  judgeScoreJson: () => judgeScoreJson,
66180
68689
  judgeLabelJson: () => judgeLabelJson,
66181
68690
  isWorkflowResult: () => isWorkflowResult,
68691
+ isWorkflowIdRef: () => isWorkflowIdRef,
66182
68692
  isTerminalExecutionStatus: () => isTerminalExecutionStatus,
66183
68693
  isStepCategory: () => isStepCategory,
66184
68694
  isScopedFileRef: () => isScopedFileRef,
@@ -66211,6 +68721,8 @@ __export(exports_src, {
66211
68721
  getRequiredOutputKeys: () => getRequiredOutputKeys,
66212
68722
  getProcessorSchemas: () => getProcessorSchemas,
66213
68723
  getParserCategory: () => getParserCategory,
68724
+ getInvokeWorkflowRef: () => getInvokeWorkflowRef,
68725
+ getInvokeExecutionMode: () => getInvokeExecutionMode,
66214
68726
  getConfigSchema: () => getConfigSchema,
66215
68727
  getConfigFieldMetadata: () => getConfigFieldMetadata,
66216
68728
  getConfigDefaults: () => getConfigDefaults,
@@ -66246,6 +68758,8 @@ __export(exports_src, {
66246
68758
  compareExpectedValues: () => compareExpectedValues,
66247
68759
  compareExpectedError: () => compareExpectedError,
66248
68760
  combineEvalScores: () => combineEvalScores,
68761
+ collectInvokeWorkflowTargets: () => collectInvokeWorkflowTargets,
68762
+ collectInvokeWorkflowTargetNames: () => collectInvokeWorkflowTargetNames,
66249
68763
  collectInvokeWorkflowTargetIds: () => collectInvokeWorkflowTargetIds,
66250
68764
  collectFileReferenceSentinels: () => collectFileReferenceSentinels,
66251
68765
  coerceInput: () => coerceInput,
@@ -66329,7 +68843,7 @@ __export(exports_src, {
66329
68843
  SplitConfigSchema: () => SplitConfigSchema,
66330
68844
  SpanTypes: () => SpanTypes,
66331
68845
  SpanKindMap: () => SpanKindMap,
66332
- SpanKind: () => SpanKind,
68846
+ SpanKind: () => import_api.SpanKind,
66333
68847
  SourceVersionRefSchema: () => SourceVersionRefSchema,
66334
68848
  SourceSecretsFileSchema: () => SourceSecretsFileSchema,
66335
68849
  SourcePackageTypeSchema: () => SourcePackageTypeSchema,
@@ -66415,6 +68929,7 @@ __export(exports_src, {
66415
68929
  LocalAgentResourceDirectorySchema: () => LocalAgentResourceDirectorySchema,
66416
68930
  LlmJudgeConfigSchema: () => LlmJudgeConfigSchema,
66417
68931
  LegacyFileIdInputSchema: () => LegacyFileIdInputSchema,
68932
+ LegacyBlockStepSchema: () => LegacyBlockStepSchema,
66418
68933
  LayoutElementTypeSchema: () => LayoutElementTypeSchema,
66419
68934
  LayoutElementSchema: () => LayoutElementSchema,
66420
68935
  LLM_JUDGE_PROMPT_MIN_LENGTH: () => LLM_JUDGE_PROMPT_MIN_LENGTH,
@@ -66435,7 +68950,7 @@ __export(exports_src, {
66435
68950
  GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
66436
68951
  ForeachStepSchema: () => ForeachStepSchema,
66437
68952
  FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
66438
- FilePathDescriptorSchema: () => FilePathDescriptorSchema2,
68953
+ FilePathDescriptorSchema: () => FilePathDescriptorSchema,
66439
68954
  FileIngressRefSchema: () => FileIngressRefSchema,
66440
68955
  FileIdIngressRefSchema: () => FileIdIngressRefSchema,
66441
68956
  FailStepSchema: () => FailStepSchema,
@@ -66520,8 +69035,6 @@ __export(exports_src, {
66520
69035
  ControlForeachConfigSchema: () => ControlForeachConfigSchema,
66521
69036
  ControlFailOutputSchema: () => ControlFailOutputSchema,
66522
69037
  ControlFailConfigSchema: () => ControlFailConfigSchema,
66523
- ControlBlockOutputSchema: () => ControlBlockOutputSchema,
66524
- ControlBlockConfigSchema: () => ControlBlockConfigSchema,
66525
69038
  ConnectorSchema: () => ConnectorSchema,
66526
69039
  ClassifyOutputSchema: () => ClassifyOutputSchema,
66527
69040
  ClassifyLabelSchema: () => ClassifyLabelSchema,
@@ -66532,7 +69045,6 @@ __export(exports_src, {
66532
69045
  CUSTOM_SCRIPT_MAX_BYTES: () => CUSTOM_SCRIPT_MAX_BYTES,
66533
69046
  CUSTOM_SCRIPT_CONTRACT: () => CUSTOM_SCRIPT_CONTRACT,
66534
69047
  BoundingRegionSchema: () => BoundingRegionSchema,
66535
- BlockStepSchema: () => BlockStepSchema,
66536
69048
  BaseEntitySchema: () => BaseEntitySchema,
66537
69049
  BUILTIN_FILE_SOURCE_DESCRIPTORS: () => BUILTIN_FILE_SOURCE_DESCRIPTORS,
66538
69050
  AutomationTargetSchema: () => AutomationTargetSchema,
@@ -66558,8 +69070,8 @@ var init_src = __esm(() => {
66558
69070
  init_legacy_boundary();
66559
69071
  init_runtime_file_ref();
66560
69072
  init_scoped_file_ref();
66561
- init_processor();
66562
- init_parser();
69073
+ init_processor2();
69074
+ init_parser2();
66563
69075
  init_otel();
66564
69076
  init_execution_row();
66565
69077
  init_run_expand();
@@ -67472,7 +69984,7 @@ var require_foldFlowLines = __commonJS((exports) => {
67472
69984
  else
67473
69985
  end = lineWidth - indentAtStart;
67474
69986
  }
67475
- let split2 = undefined;
69987
+ let split3 = undefined;
67476
69988
  let prev = undefined;
67477
69989
  let overflow = false;
67478
69990
  let i = -1;
@@ -67506,20 +70018,20 @@ var require_foldFlowLines = __commonJS((exports) => {
67506
70018
  if (mode === FOLD_BLOCK)
67507
70019
  i = consumeMoreIndentedLines(text, i, indent.length);
67508
70020
  end = i + indent.length + endStep;
67509
- split2 = undefined;
70021
+ split3 = undefined;
67510
70022
  } else {
67511
70023
  if (ch === " " && prev && prev !== " " && prev !== `
67512
70024
  ` && prev !== "\t") {
67513
70025
  const next = text[i + 1];
67514
70026
  if (next && next !== " " && next !== `
67515
70027
  ` && next !== "\t")
67516
- split2 = i;
70028
+ split3 = i;
67517
70029
  }
67518
70030
  if (i >= end) {
67519
- if (split2) {
67520
- folds.push(split2);
67521
- end = split2 + endStep;
67522
- split2 = undefined;
70031
+ if (split3) {
70032
+ folds.push(split3);
70033
+ end = split3 + endStep;
70034
+ split3 = undefined;
67523
70035
  } else if (mode === FOLD_QUOTED) {
67524
70036
  while (prev === " " || prev === "\t") {
67525
70037
  prev = ch;
@@ -67532,7 +70044,7 @@ var require_foldFlowLines = __commonJS((exports) => {
67532
70044
  folds.push(j);
67533
70045
  escapedFolds[j] = true;
67534
70046
  end = j + endStep;
67535
- split2 = undefined;
70047
+ split3 = undefined;
67536
70048
  } else {
67537
70049
  overflow = true;
67538
70050
  }
@@ -68166,7 +70678,7 @@ var require_merge = __commonJS((exports) => {
68166
70678
  var identity = require_identity();
68167
70679
  var Scalar = require_Scalar();
68168
70680
  var MERGE_KEY = "<<";
68169
- var merge2 = {
70681
+ var merge3 = {
68170
70682
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
68171
70683
  default: "key",
68172
70684
  tag: "tag:yaml.org,2002:merge",
@@ -68176,7 +70688,7 @@ var require_merge = __commonJS((exports) => {
68176
70688
  }),
68177
70689
  stringify: () => MERGE_KEY
68178
70690
  };
68179
- 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);
70691
+ 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);
68180
70692
  function addMergeToJSMap(ctx, map2, value) {
68181
70693
  const source = resolveAliasValue(ctx, value);
68182
70694
  if (identity.isSeq(source))
@@ -68215,21 +70727,21 @@ var require_merge = __commonJS((exports) => {
68215
70727
  }
68216
70728
  exports.addMergeToJSMap = addMergeToJSMap;
68217
70729
  exports.isMergeKey = isMergeKey;
68218
- exports.merge = merge2;
70730
+ exports.merge = merge3;
68219
70731
  });
68220
70732
 
68221
70733
  // ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
68222
70734
  var require_addPairToJSMap = __commonJS((exports) => {
68223
70735
  var log = require_log();
68224
- var merge2 = require_merge();
70736
+ var merge3 = require_merge();
68225
70737
  var stringify = require_stringify();
68226
70738
  var identity = require_identity();
68227
70739
  var toJS = require_toJS();
68228
70740
  function addPairToJSMap(ctx, map2, { key, value }) {
68229
70741
  if (identity.isNode(key) && key.addToJSMap)
68230
70742
  key.addToJSMap(ctx, map2, value);
68231
- else if (merge2.isMergeKey(ctx, key))
68232
- merge2.addMergeToJSMap(ctx, map2, value);
70743
+ else if (merge3.isMergeKey(ctx, key))
70744
+ merge3.addMergeToJSMap(ctx, map2, value);
68233
70745
  else {
68234
70746
  const jsKey = toJS.toJS(key, "", ctx);
68235
70747
  if (map2 instanceof Map) {
@@ -69505,7 +72017,7 @@ var require_schema3 = __commonJS((exports) => {
69505
72017
  var bool = require_bool2();
69506
72018
  var float = require_float2();
69507
72019
  var int2 = require_int2();
69508
- var merge2 = require_merge();
72020
+ var merge3 = require_merge();
69509
72021
  var omap = require_omap();
69510
72022
  var pairs = require_pairs();
69511
72023
  var set2 = require_set();
@@ -69525,7 +72037,7 @@ var require_schema3 = __commonJS((exports) => {
69525
72037
  float.floatExp,
69526
72038
  float.float,
69527
72039
  binary.binary,
69528
- merge2.merge,
72040
+ merge3.merge,
69529
72041
  omap.omap,
69530
72042
  pairs.pairs,
69531
72043
  set2.set,
@@ -69548,7 +72060,7 @@ var require_tags = __commonJS((exports) => {
69548
72060
  var schema = require_schema();
69549
72061
  var schema$1 = require_schema2();
69550
72062
  var binary = require_binary();
69551
- var merge2 = require_merge();
72063
+ var merge3 = require_merge();
69552
72064
  var omap = require_omap();
69553
72065
  var pairs = require_pairs();
69554
72066
  var schema$2 = require_schema3();
@@ -69573,7 +72085,7 @@ var require_tags = __commonJS((exports) => {
69573
72085
  intOct: int2.intOct,
69574
72086
  intTime: timestamp.intTime,
69575
72087
  map: map2.map,
69576
- merge: merge2.merge,
72088
+ merge: merge3.merge,
69577
72089
  null: _null4.nullTag,
69578
72090
  omap: omap.omap,
69579
72091
  pairs: pairs.pairs,
@@ -69583,7 +72095,7 @@ var require_tags = __commonJS((exports) => {
69583
72095
  };
69584
72096
  var coreKnownTags = {
69585
72097
  "tag:yaml.org,2002:binary": binary.binary,
69586
- "tag:yaml.org,2002:merge": merge2.merge,
72098
+ "tag:yaml.org,2002:merge": merge3.merge,
69587
72099
  "tag:yaml.org,2002:omap": omap.omap,
69588
72100
  "tag:yaml.org,2002:pairs": pairs.pairs,
69589
72101
  "tag:yaml.org,2002:set": set2.set,
@@ -69592,7 +72104,7 @@ var require_tags = __commonJS((exports) => {
69592
72104
  function getTags(customTags, schemaName, addMergeTag) {
69593
72105
  const schemaTags = schemas3.get(schemaName);
69594
72106
  if (schemaTags && !customTags) {
69595
- return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
72107
+ return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
69596
72108
  }
69597
72109
  let tags = schemaTags;
69598
72110
  if (!tags) {
@@ -69610,7 +72122,7 @@ var require_tags = __commonJS((exports) => {
69610
72122
  tags = customTags(tags.slice());
69611
72123
  }
69612
72124
  if (addMergeTag)
69613
- tags = tags.concat(merge2.merge);
72125
+ tags = tags.concat(merge3.merge);
69614
72126
  return tags.reduce((tags2, tag) => {
69615
72127
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
69616
72128
  if (!tagObj) {
@@ -69637,11 +72149,11 @@ var require_Schema = __commonJS((exports) => {
69637
72149
  var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
69638
72150
 
69639
72151
  class Schema {
69640
- constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
72152
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
69641
72153
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
69642
72154
  this.name = typeof schema === "string" && schema || "core";
69643
72155
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
69644
- this.tags = tags.getTags(customTags, this.name, merge2);
72156
+ this.tags = tags.getTags(customTags, this.name, merge3);
69645
72157
  this.toStringOptions = toStringDefaults ?? null;
69646
72158
  Object.defineProperty(this, identity.MAP, { value: map2.map });
69647
72159
  Object.defineProperty(this, identity.SCALAR, { value: string4.string });
@@ -70864,13 +73376,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
70864
73376
  return { mode, indent, chomp, comment, length };
70865
73377
  }
70866
73378
  function splitLines(source) {
70867
- const split2 = source.split(/\n( *)/);
70868
- const first = split2[0];
73379
+ const split3 = source.split(/\n( *)/);
73380
+ const first = split3[0];
70869
73381
  const m = first.match(/^( *)/);
70870
73382
  const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
70871
73383
  const lines = [line0];
70872
- for (let i = 1;i < split2.length; i += 2)
70873
- lines.push([split2[i], split2[i + 1]]);
73384
+ for (let i = 1;i < split3.length; i += 2)
73385
+ lines.push([split3[i], split3[i + 1]]);
70874
73386
  return lines;
70875
73387
  }
70876
73388
  exports.resolveBlockScalar = resolveBlockScalar;
@@ -73884,7 +76396,7 @@ var init_main = __esm(() => {
73884
76396
  });
73885
76397
 
73886
76398
  // ../../node_modules/sisteransi/src/index.js
73887
- var require_src = __commonJS((exports, module) => {
76399
+ var require_src2 = __commonJS((exports, module) => {
73888
76400
  var ESC2 = "\x1B";
73889
76401
  var CSI2 = `${ESC2}[`;
73890
76402
  var beep = "\x07";
@@ -74227,7 +76739,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
74227
76739
  }, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
74228
76740
  var init_dist3 = __esm(() => {
74229
76741
  init_main();
74230
- import_sisteransi = __toESM(require_src(), 1);
76742
+ import_sisteransi = __toESM(require_src2(), 1);
74231
76743
  G = ["up", "down", "left", "right", "space", "enter", "cancel"];
74232
76744
  K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
74233
76745
  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)}` } } };
@@ -75570,7 +78082,7 @@ var init_dist4 = __esm(() => {
75570
78082
  init_dist3();
75571
78083
  init_main();
75572
78084
  init_dist2();
75573
- import_sisteransi2 = __toESM(require_src(), 1);
78085
+ import_sisteransi2 = __toESM(require_src2(), 1);
75574
78086
  tt2 = te();
75575
78087
  _t = w2("◆", "*");
75576
78088
  ot2 = w2("■", "x");
@@ -169062,7 +171574,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
169062
171574
  __defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
169063
171575
  }
169064
171576
  return to5;
169065
- }, __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 {
171577
+ }, __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 {
169066
171578
  diff(oldStr, newStr, options8 = {}) {
169067
171579
  let callback;
169068
171580
  if (typeof options8 === "function") {
@@ -170084,7 +172596,7 @@ var init_prettier = __esm(() => {
170084
172596
  };
170085
172597
  }
170086
172598
  });
170087
- require_utils2 = __commonJS2({
172599
+ require_utils4 = __commonJS2({
170088
172600
  "node_modules/braces/lib/utils.js"(exports) {
170089
172601
  exports.isInteger = (num) => {
170090
172602
  if (typeof num === "number") {
@@ -170173,7 +172685,7 @@ var init_prettier = __esm(() => {
170173
172685
  });
170174
172686
  require_stringify2 = __commonJS2({
170175
172687
  "node_modules/braces/lib/stringify.js"(exports, module) {
170176
- var utils2 = require_utils2();
172688
+ var utils2 = require_utils4();
170177
172689
  module.exports = (ast, options8 = {}) => {
170178
172690
  const stringify2 = (node, parent = {}) => {
170179
172691
  const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
@@ -170627,7 +173139,7 @@ var init_prettier = __esm(() => {
170627
173139
  require_compile2 = __commonJS2({
170628
173140
  "node_modules/braces/lib/compile.js"(exports, module) {
170629
173141
  var fill2 = require_fill_range();
170630
- var utils2 = require_utils2();
173142
+ var utils2 = require_utils4();
170631
173143
  var compile = (ast, options8 = {}) => {
170632
173144
  const walk2 = (node, parent = {}) => {
170633
173145
  const invalidBlock = utils2.isInvalidBrace(parent);
@@ -170677,7 +173189,7 @@ var init_prettier = __esm(() => {
170677
173189
  "node_modules/braces/lib/expand.js"(exports, module) {
170678
173190
  var fill2 = require_fill_range();
170679
173191
  var stringify2 = require_stringify2();
170680
- var utils2 = require_utils2();
173192
+ var utils2 = require_utils4();
170681
173193
  var append = (queue = "", stash = "", enclose = false) => {
170682
173194
  const result = [];
170683
173195
  queue = [].concat(queue);
@@ -172876,8 +175388,8 @@ var init_prettier = __esm(() => {
172876
175388
  var Stream = __require2("stream");
172877
175389
  var PassThrough = Stream.PassThrough;
172878
175390
  var slice = Array.prototype.slice;
172879
- module.exports = merge2;
172880
- function merge2() {
175391
+ module.exports = merge22;
175392
+ function merge22() {
172881
175393
  const streamsQueue = [];
172882
175394
  const args = slice.call(arguments);
172883
175395
  let merging = false;
@@ -172991,9 +175503,9 @@ var init_prettier = __esm(() => {
172991
175503
  "node_modules/fast-glob/out/utils/stream.js"(exports) {
172992
175504
  Object.defineProperty(exports, "__esModule", { value: true });
172993
175505
  exports.merge = undefined;
172994
- var merge2 = require_merge2();
175506
+ var merge22 = require_merge2();
172995
175507
  function merge3(streams) {
172996
- const mergedStream = merge2(streams);
175508
+ const mergedStream = merge22(streams);
172997
175509
  streams.forEach((stream) => {
172998
175510
  stream.once("error", (error52) => mergedStream.emit("error", error52));
172999
175511
  });
@@ -173021,7 +175533,7 @@ var init_prettier = __esm(() => {
173021
175533
  exports.isEmpty = isEmpty;
173022
175534
  }
173023
175535
  });
173024
- require_utils3 = __commonJS2({
175536
+ require_utils32 = __commonJS2({
173025
175537
  "node_modules/fast-glob/out/utils/index.js"(exports) {
173026
175538
  Object.defineProperty(exports, "__esModule", { value: true });
173027
175539
  exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
@@ -173045,7 +175557,7 @@ var init_prettier = __esm(() => {
173045
175557
  "node_modules/fast-glob/out/managers/tasks.js"(exports) {
173046
175558
  Object.defineProperty(exports, "__esModule", { value: true });
173047
175559
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
173048
- var utils2 = require_utils3();
175560
+ var utils2 = require_utils32();
173049
175561
  function generate(input, settings) {
173050
175562
  const patterns = processPatterns(input, settings);
173051
175563
  const ignore = processPatterns(settings.ignore, settings);
@@ -173354,7 +175866,7 @@ var init_prettier = __esm(() => {
173354
175866
  exports.createDirentFromStats = createDirentFromStats;
173355
175867
  }
173356
175868
  });
173357
- require_utils4 = __commonJS2({
175869
+ require_utils42 = __commonJS2({
173358
175870
  "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
173359
175871
  Object.defineProperty(exports, "__esModule", { value: true });
173360
175872
  exports.fs = undefined;
@@ -173382,7 +175894,7 @@ var init_prettier = __esm(() => {
173382
175894
  var fsStat = require_out();
173383
175895
  var rpl = require_run_parallel();
173384
175896
  var constants_1 = require_constants3();
173385
- var utils2 = require_utils4();
175897
+ var utils2 = require_utils42();
173386
175898
  var common = require_common();
173387
175899
  function read3(directory, settings, callback) {
173388
175900
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -173488,7 +176000,7 @@ var init_prettier = __esm(() => {
173488
176000
  exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
173489
176001
  var fsStat = require_out();
173490
176002
  var constants_1 = require_constants3();
173491
- var utils2 = require_utils4();
176003
+ var utils2 = require_utils42();
173492
176004
  var common = require_common();
173493
176005
  function read3(directory, settings) {
173494
176006
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -174268,7 +176780,7 @@ var init_prettier = __esm(() => {
174268
176780
  Object.defineProperty(exports, "__esModule", { value: true });
174269
176781
  var path15 = __require2("path");
174270
176782
  var fsStat = require_out();
174271
- var utils2 = require_utils3();
176783
+ var utils2 = require_utils32();
174272
176784
  var Reader = class {
174273
176785
  constructor(_settings) {
174274
176786
  this._settings = _settings;
@@ -174392,7 +176904,7 @@ var init_prettier = __esm(() => {
174392
176904
  require_matcher = __commonJS2({
174393
176905
  "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
174394
176906
  Object.defineProperty(exports, "__esModule", { value: true });
174395
- var utils2 = require_utils3();
176907
+ var utils2 = require_utils32();
174396
176908
  var Matcher = class {
174397
176909
  constructor(_patterns, _settings, _micromatchOptions) {
174398
176910
  this._patterns = _patterns;
@@ -174431,7 +176943,7 @@ var init_prettier = __esm(() => {
174431
176943
  });
174432
176944
  }
174433
176945
  _splitSegmentsIntoSections(segments) {
174434
- return utils2.array.splitWhen(segments, (segment) => segment.dynamic && utils2.pattern.hasGlobStar(segment.pattern));
176946
+ return utils2.array.splitWhen(segments, (segment2) => segment2.dynamic && utils2.pattern.hasGlobStar(segment2.pattern));
174435
176947
  }
174436
176948
  };
174437
176949
  exports.default = Matcher;
@@ -174452,11 +176964,11 @@ var init_prettier = __esm(() => {
174452
176964
  return true;
174453
176965
  }
174454
176966
  const match = parts.every((part, index) => {
174455
- const segment = pattern.segments[index];
174456
- if (segment.dynamic && segment.patternRe.test(part)) {
176967
+ const segment2 = pattern.segments[index];
176968
+ if (segment2.dynamic && segment2.patternRe.test(part)) {
174457
176969
  return true;
174458
176970
  }
174459
- if (!segment.dynamic && segment.pattern === part) {
176971
+ if (!segment2.dynamic && segment2.pattern === part) {
174460
176972
  return true;
174461
176973
  }
174462
176974
  return false;
@@ -174474,7 +176986,7 @@ var init_prettier = __esm(() => {
174474
176986
  require_deep = __commonJS2({
174475
176987
  "node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
174476
176988
  Object.defineProperty(exports, "__esModule", { value: true });
174477
- var utils2 = require_utils3();
176989
+ var utils2 = require_utils32();
174478
176990
  var partial_1 = require_partial();
174479
176991
  var DeepFilter = class {
174480
176992
  constructor(_settings, _micromatchOptions) {
@@ -174536,7 +177048,7 @@ var init_prettier = __esm(() => {
174536
177048
  require_entry = __commonJS2({
174537
177049
  "node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
174538
177050
  Object.defineProperty(exports, "__esModule", { value: true });
174539
- var utils2 = require_utils3();
177051
+ var utils2 = require_utils32();
174540
177052
  var EntryFilter = class {
174541
177053
  constructor(_settings, _micromatchOptions) {
174542
177054
  this._settings = _settings;
@@ -174621,7 +177133,7 @@ var init_prettier = __esm(() => {
174621
177133
  require_error2 = __commonJS2({
174622
177134
  "node_modules/fast-glob/out/providers/filters/error.js"(exports) {
174623
177135
  Object.defineProperty(exports, "__esModule", { value: true });
174624
- var utils2 = require_utils3();
177136
+ var utils2 = require_utils32();
174625
177137
  var ErrorFilter = class {
174626
177138
  constructor(_settings) {
174627
177139
  this._settings = _settings;
@@ -174639,7 +177151,7 @@ var init_prettier = __esm(() => {
174639
177151
  require_entry2 = __commonJS2({
174640
177152
  "node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
174641
177153
  Object.defineProperty(exports, "__esModule", { value: true });
174642
- var utils2 = require_utils3();
177154
+ var utils2 = require_utils32();
174643
177155
  var EntryTransformer = class {
174644
177156
  constructor(_settings) {
174645
177157
  this._settings = _settings;
@@ -174907,7 +177419,7 @@ var init_prettier = __esm(() => {
174907
177419
  var stream_1 = require_stream4();
174908
177420
  var sync_1 = require_sync6();
174909
177421
  var settings_1 = require_settings4();
174910
- var utils2 = require_utils3();
177422
+ var utils2 = require_utils32();
174911
177423
  async function FastGlob(source2, options8) {
174912
177424
  assertPatternsInput(source2);
174913
177425
  const works = getWorks(source2, async_1.default, options8);
@@ -175225,7 +177737,7 @@ var init_prettier = __esm(() => {
175225
177737
  };
175226
177738
  }
175227
177739
  });
175228
- require_semver = __commonJS2({
177740
+ require_semver2 = __commonJS2({
175229
177741
  "node_modules/semver/classes/semver.js"(exports, module) {
175230
177742
  var debug = require_debug();
175231
177743
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
@@ -175495,7 +178007,7 @@ var init_prettier = __esm(() => {
175495
178007
  });
175496
178008
  require_compare = __commonJS2({
175497
178009
  "node_modules/semver/functions/compare.js"(exports, module) {
175498
- var SemVer = require_semver();
178010
+ var SemVer = require_semver2();
175499
178011
  var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
175500
178012
  module.exports = compare;
175501
178013
  }
@@ -177228,7 +179740,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
177228
179740
  };
177229
179741
  }
177230
179742
  });
177231
- require_src2 = __commonJS2({
179743
+ require_src3 = __commonJS2({
177232
179744
  "node_modules/editorconfig/src/index.js"(exports) {
177233
179745
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
177234
179746
  return new (P9 || (P9 = Promise))(function(resolve32, reject) {
@@ -178691,7 +181203,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
178691
181203
  mockable_default = mockable.mocked;
178692
181204
  import_micromatch = __toESM2(require_micromatch(), 1);
178693
181205
  partition_default = partition2;
178694
- import_editorconfig = __toESM2(require_src2(), 1);
181206
+ import_editorconfig = __toESM2(require_src3(), 1);
178695
181207
  iterate_directory_up_default = iterateDirectoryUp;
178696
181208
  FileSearcher = class extends Searcher {
178697
181209
  findInDirectory = findFile;
@@ -181287,7 +183799,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
181287
183799
  // package.json
181288
183800
  var package_default = {
181289
183801
  name: "@eigenpal/cli",
181290
- version: "0.10.17",
183802
+ version: "0.10.19",
181291
183803
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
181292
183804
  keywords: [
181293
183805
  "eigenpal",
@@ -182801,7 +185313,7 @@ async function pushCurrentBranch(input) {
182801
185313
  function slugifyPackageSegment(value) {
182802
185314
  return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
182803
185315
  }
182804
- function packagePathForTemplate(template, name) {
185316
+ function packagePathForTemplate(template2, name) {
182805
185317
  const slug = slugifyPackageSegment(name);
182806
185318
  if (!slug)
182807
185319
  throw new Error("Package name must include at least one letter or number.");
@@ -182813,7 +185325,7 @@ function packagePathForTemplate(template, name) {
182813
185325
  knowledge: "resources/knowledge",
182814
185326
  evaluator: "evaluators"
182815
185327
  };
182816
- const root = rootByTemplate[template];
185328
+ const root = rootByTemplate[template2];
182817
185329
  if (!root)
182818
185330
  throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
182819
185331
  return SourcePackagePathSchema.parse(`${root}/${slug}`);
@@ -183222,12 +185734,12 @@ function archivePackage(input) {
183222
185734
  runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
183223
185735
  cwd: input.gitRoot
183224
185736
  });
183225
- const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
185737
+ const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
183226
185738
  cwd: input.outDir,
183227
185739
  encoding: "utf8"
183228
185740
  });
183229
- if (extract.status !== 0)
183230
- throw new Error(extract.stderr.trim() || "tar extraction failed");
185741
+ if (extract2.status !== 0)
185742
+ throw new Error(extract2.stderr.trim() || "tar extraction failed");
183231
185743
  } finally {
183232
185744
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
183233
185745
  }
@@ -183256,12 +185768,12 @@ async function tryHostedArchive(input) {
183256
185768
  const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
183257
185769
  try {
183258
185770
  writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
183259
- const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
185771
+ const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
183260
185772
  cwd: input.outDir,
183261
185773
  encoding: "utf8"
183262
185774
  });
183263
- if (extract.status !== 0)
183264
- throw new Error(extract.stderr.trim() || "tar extraction failed");
185775
+ if (extract2.status !== 0)
185776
+ throw new Error(extract2.stderr.trim() || "tar extraction failed");
183265
185777
  return true;
183266
185778
  } finally {
183267
185779
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
@@ -187616,18 +190128,18 @@ async function init(name, opts) {
187616
190128
  if (existsSync11(target) && readdirSync2(target).length > 0) {
187617
190129
  throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
187618
190130
  }
187619
- let template;
190131
+ let template2;
187620
190132
  if (opts.template) {
187621
190133
  if (!isTemplateName(opts.template)) {
187622
190134
  throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
187623
190135
  }
187624
- template = opts.template;
190136
+ template2 = opts.template;
187625
190137
  } else if (opts.yes || !process.stdin.isTTY) {
187626
- template = "blank";
190138
+ template2 = "blank";
187627
190139
  } else {
187628
- template = await promptForTemplate();
190140
+ template2 = await promptForTemplate();
187629
190141
  }
187630
- const sourceRoot = join2(resolveTemplatesRoot(), template);
190142
+ const sourceRoot = join2(resolveTemplatesRoot(), template2);
187631
190143
  if (!existsSync11(sourceRoot)) {
187632
190144
  throw new Error(`Template directory missing on disk: ${sourceRoot}`);
187633
190145
  }
@@ -189348,6 +191860,11 @@ function parseWorkflow(yaml) {
189348
191860
  throw new YamlParseError(`Invalid YAML: ${message}`);
189349
191861
  }
189350
191862
  const upgraded = upgradeWorkflow(parsed);
191863
+ const deprecatedIssues = collectDeprecatedBlockIssues(upgraded);
191864
+ if (deprecatedIssues.length > 0) {
191865
+ const errorMessages = deprecatedIssues.map((e8) => `${e8.path.join(".")}: ${e8.message}`).join("; ");
191866
+ throw new WorkflowValidationError(`Invalid workflow definition: ${errorMessages}`, deprecatedIssues);
191867
+ }
189351
191868
  const result = WorkflowDefinitionSchema.safeParse(upgraded);
189352
191869
  if (!result.success) {
189353
191870
  const validationIssues = result.error.issues.map((e8) => ({
@@ -189365,11 +191882,83 @@ function parseWorkflow(yaml) {
189365
191882
  }
189366
191883
  return result.data;
189367
191884
  }
191885
+ function collectDeprecatedBlockIssues(definition) {
191886
+ const issues = [];
191887
+ if (definition.kind === "block") {
191888
+ issues.push({
191889
+ path: ["kind"],
191890
+ message: "kind: block was removed. Define a regular workflow and invoke it with action.invoke-workflow (execution: inline).",
191891
+ code: "deprecated_kind_block"
191892
+ });
191893
+ }
191894
+ function walkSteps(steps, pathPrefix) {
191895
+ if (!Array.isArray(steps))
191896
+ return;
191897
+ for (let i5 = 0;i5 < steps.length; i5++) {
191898
+ const raw = steps[i5];
191899
+ if (!raw || typeof raw !== "object")
191900
+ continue;
191901
+ const step = raw;
191902
+ const stepPath = [...pathPrefix, i5];
191903
+ if (step.type === "control.block") {
191904
+ issues.push({
191905
+ path: [...stepPath, "type"],
191906
+ message: "control.block was removed. Use action.invoke-workflow with execution: inline and workflow set to the target name or wf_ id.",
191907
+ code: "deprecated_control_block"
191908
+ });
191909
+ }
191910
+ for (const [key2, value] of Object.entries(step)) {
191911
+ if (!Array.isArray(value))
191912
+ continue;
191913
+ for (let j11 = 0;j11 < value.length; j11++) {
191914
+ const item = value[j11];
191915
+ if (!item || typeof item !== "object")
191916
+ continue;
191917
+ const obj = item;
191918
+ if ("type" in obj) {
191919
+ walkSteps([obj], [...stepPath, key2]);
191920
+ } else if (Array.isArray(obj.steps)) {
191921
+ walkSteps(obj.steps, [...stepPath, key2, j11, "steps"]);
191922
+ }
191923
+ }
191924
+ }
191925
+ if (Array.isArray(step.then))
191926
+ walkSteps(step.then, [...stepPath, "then"]);
191927
+ if (Array.isArray(step.else))
191928
+ walkSteps(step.else, [...stepPath, "else"]);
191929
+ if (Array.isArray(step.steps))
191930
+ walkSteps(step.steps, [...stepPath, "steps"]);
191931
+ if (Array.isArray(step.default))
191932
+ walkSteps(step.default, [...stepPath, "default"]);
191933
+ if (Array.isArray(step.cases)) {
191934
+ for (let j11 = 0;j11 < step.cases.length; j11++) {
191935
+ const c7 = step.cases[j11];
191936
+ if (Array.isArray(c7?.steps)) {
191937
+ walkSteps(c7.steps, [...stepPath, "cases", j11, "steps"]);
191938
+ }
191939
+ }
191940
+ }
191941
+ if (Array.isArray(step.branches)) {
191942
+ for (let j11 = 0;j11 < step.branches.length; j11++) {
191943
+ const b8 = step.branches[j11];
191944
+ if (Array.isArray(b8?.steps)) {
191945
+ walkSteps(b8.steps, [...stepPath, "branches", j11, "steps"]);
191946
+ }
191947
+ }
191948
+ }
191949
+ }
191950
+ }
191951
+ walkSteps(definition.steps, ["steps"]);
191952
+ return issues;
191953
+ }
189368
191954
  function validateStepConfigsRecursive(steps, pathPrefix) {
189369
191955
  const issues = [];
189370
191956
  for (let i5 = 0;i5 < steps.length; i5++) {
189371
191957
  const step = steps[i5];
189372
191958
  const stepPath = [...pathPrefix, i5];
191959
+ if (step.type === "control.block") {
191960
+ continue;
191961
+ }
189373
191962
  const schemaDef = getStepSchema(step.type);
189374
191963
  if (schemaDef?.configInWith) {
189375
191964
  const cfg = step.with ?? {};