@eigenpal/cli 0.8.0 → 0.9.1

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,14 +17080,2478 @@ 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
+ TABLE_ROW: "row",
17149
+ FOLDER: "fldr",
17150
+ AGENT_WORKFLOW: "awf",
17151
+ AGENT_EXECUTION: "aex",
17152
+ AGENT_EXAMPLE: "aeg",
17153
+ AGENT_VERSION: "avr",
17154
+ AGENT_TRAINING_SESSION: "ats",
17155
+ AGENT_EXPERIMENT: "aexp",
17156
+ AGENT_EMAIL_ALIAS: "aea",
17157
+ AGENT_EMAIL_INVOCATION: "aei",
17158
+ AUTOMATION_TRIGGER: "atr",
17159
+ SANDBOX_WS_TOKEN: "sws"
17160
+ };
17161
+ TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
17162
+ return typeof val === "string" ? new Date(val) : val;
17163
+ });
17164
+ JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
17165
+ BaseEntitySchema = exports_external.object({
17166
+ id: exports_external.string(),
17167
+ createdAt: TimestampSchema.optional(),
17168
+ updatedAt: TimestampSchema.optional()
17169
+ });
17170
+ });
17171
+
17172
+ // ../types/src/core/ids.ts
17173
+ var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
17174
+ var init_ids = __esm(() => {
17175
+ PROCESSOR_IDS = {
17176
+ MERGE: "builtin/merge",
17177
+ DOCUMENT_PARSER: "builtin/parser",
17178
+ EXTRACT: "builtin/extract",
17179
+ SPLIT: "builtin/split",
17180
+ CLASSIFY: "builtin/classify",
17181
+ TEMPLATE: "builtin/template",
17182
+ PDF_EMBEDDER: "builtin/pdf-embedder",
17183
+ XLSX_TO_JSON: "builtin/xlsx-to-json"
17184
+ };
17185
+ PARSER_IDS = {
17186
+ KREUZBERG: "builtin/kreuzberg",
17187
+ OCR: "builtin/ocr",
17188
+ LLM_VISION: "builtin/llm-vision"
17189
+ };
17190
+ INPUT_KINDS = {
17191
+ DOCUMENT: "document",
17192
+ PAYLOAD: "payload"
17193
+ };
17194
+ });
17195
+
17196
+ // ../types/src/core/pagination.ts
17197
+ var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
17198
+ var init_pagination = __esm(() => {
17199
+ init_zod();
17200
+ PaginationParamsSchema = exports_external.object({
17201
+ limit: exports_external.coerce.number().int().min(1).max(100).default(50),
17202
+ offset: exports_external.coerce.number().int().min(0).default(0)
17203
+ });
17204
+ });
17205
+
17083
17206
  // ../types/src/core/index.ts
17084
- var init_core3 = () => {};
17207
+ var init_core3 = __esm(() => {
17208
+ init_common();
17209
+ init_ids();
17210
+ init_pagination();
17211
+ });
17212
+
17213
+ // ../../node_modules/@opentelemetry/api/build/src/version.js
17214
+ var require_version = __commonJS((exports) => {
17215
+ Object.defineProperty(exports, "__esModule", { value: true });
17216
+ exports.VERSION = undefined;
17217
+ exports.VERSION = "1.9.1";
17218
+ });
17219
+
17220
+ // ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
17221
+ var require_semver = __commonJS((exports) => {
17222
+ Object.defineProperty(exports, "__esModule", { value: true });
17223
+ exports.isCompatible = exports._makeCompatibilityCheck = undefined;
17224
+ var version_1 = require_version();
17225
+ var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
17226
+ function _makeCompatibilityCheck(ownVersion) {
17227
+ const acceptedVersions = new Set([ownVersion]);
17228
+ const rejectedVersions = new Set;
17229
+ const myVersionMatch = ownVersion.match(re);
17230
+ if (!myVersionMatch) {
17231
+ return () => false;
17232
+ }
17233
+ const ownVersionParsed = {
17234
+ major: +myVersionMatch[1],
17235
+ minor: +myVersionMatch[2],
17236
+ patch: +myVersionMatch[3],
17237
+ prerelease: myVersionMatch[4]
17238
+ };
17239
+ if (ownVersionParsed.prerelease != null) {
17240
+ return function isExactmatch(globalVersion) {
17241
+ return globalVersion === ownVersion;
17242
+ };
17243
+ }
17244
+ function _reject(v) {
17245
+ rejectedVersions.add(v);
17246
+ return false;
17247
+ }
17248
+ function _accept(v) {
17249
+ acceptedVersions.add(v);
17250
+ return true;
17251
+ }
17252
+ return function isCompatible(globalVersion) {
17253
+ if (acceptedVersions.has(globalVersion)) {
17254
+ return true;
17255
+ }
17256
+ if (rejectedVersions.has(globalVersion)) {
17257
+ return false;
17258
+ }
17259
+ const globalVersionMatch = globalVersion.match(re);
17260
+ if (!globalVersionMatch) {
17261
+ return _reject(globalVersion);
17262
+ }
17263
+ const globalVersionParsed = {
17264
+ major: +globalVersionMatch[1],
17265
+ minor: +globalVersionMatch[2],
17266
+ patch: +globalVersionMatch[3],
17267
+ prerelease: globalVersionMatch[4]
17268
+ };
17269
+ if (globalVersionParsed.prerelease != null) {
17270
+ return _reject(globalVersion);
17271
+ }
17272
+ if (ownVersionParsed.major !== globalVersionParsed.major) {
17273
+ return _reject(globalVersion);
17274
+ }
17275
+ if (ownVersionParsed.major === 0) {
17276
+ if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
17277
+ return _accept(globalVersion);
17278
+ }
17279
+ return _reject(globalVersion);
17280
+ }
17281
+ if (ownVersionParsed.minor <= globalVersionParsed.minor) {
17282
+ return _accept(globalVersion);
17283
+ }
17284
+ return _reject(globalVersion);
17285
+ };
17286
+ }
17287
+ exports._makeCompatibilityCheck = _makeCompatibilityCheck;
17288
+ exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
17289
+ });
17290
+
17291
+ // ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
17292
+ var require_global_utils = __commonJS((exports) => {
17293
+ Object.defineProperty(exports, "__esModule", { value: true });
17294
+ exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
17295
+ var version_1 = require_version();
17296
+ var semver_1 = require_semver();
17297
+ var major = version_1.VERSION.split(".")[0];
17298
+ var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
17299
+ var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
17300
+ function registerGlobal(type, instance, diag, allowOverride = false) {
17301
+ var _a3;
17302
+ const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
17303
+ version: version_1.VERSION
17304
+ };
17305
+ if (!allowOverride && api2[type]) {
17306
+ const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
17307
+ diag.error(err.stack || err.message);
17308
+ return false;
17309
+ }
17310
+ if (api2.version !== version_1.VERSION) {
17311
+ const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
17312
+ diag.error(err.stack || err.message);
17313
+ return false;
17314
+ }
17315
+ api2[type] = instance;
17316
+ diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
17317
+ return true;
17318
+ }
17319
+ exports.registerGlobal = registerGlobal;
17320
+ function getGlobal(type) {
17321
+ var _a3, _b;
17322
+ const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
17323
+ if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
17324
+ return;
17325
+ }
17326
+ return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
17327
+ }
17328
+ exports.getGlobal = getGlobal;
17329
+ function unregisterGlobal(type, diag) {
17330
+ diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
17331
+ const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
17332
+ if (api2) {
17333
+ delete api2[type];
17334
+ }
17335
+ }
17336
+ exports.unregisterGlobal = unregisterGlobal;
17337
+ });
17338
+
17339
+ // ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
17340
+ var require_ComponentLogger = __commonJS((exports) => {
17341
+ Object.defineProperty(exports, "__esModule", { value: true });
17342
+ exports.DiagComponentLogger = undefined;
17343
+ var global_utils_1 = require_global_utils();
17344
+
17345
+ class DiagComponentLogger {
17346
+ constructor(props) {
17347
+ this._namespace = props.namespace || "DiagComponentLogger";
17348
+ }
17349
+ debug(...args) {
17350
+ return logProxy("debug", this._namespace, args);
17351
+ }
17352
+ error(...args) {
17353
+ return logProxy("error", this._namespace, args);
17354
+ }
17355
+ info(...args) {
17356
+ return logProxy("info", this._namespace, args);
17357
+ }
17358
+ warn(...args) {
17359
+ return logProxy("warn", this._namespace, args);
17360
+ }
17361
+ verbose(...args) {
17362
+ return logProxy("verbose", this._namespace, args);
17363
+ }
17364
+ }
17365
+ exports.DiagComponentLogger = DiagComponentLogger;
17366
+ function logProxy(funcName, namespace, args) {
17367
+ const logger = (0, global_utils_1.getGlobal)("diag");
17368
+ if (!logger) {
17369
+ return;
17370
+ }
17371
+ return logger[funcName](namespace, ...args);
17372
+ }
17373
+ });
17374
+
17375
+ // ../../node_modules/@opentelemetry/api/build/src/diag/types.js
17376
+ var require_types = __commonJS((exports) => {
17377
+ Object.defineProperty(exports, "__esModule", { value: true });
17378
+ exports.DiagLogLevel = undefined;
17379
+ var DiagLogLevel;
17380
+ (function(DiagLogLevel2) {
17381
+ DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
17382
+ DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
17383
+ DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
17384
+ DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
17385
+ DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
17386
+ DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
17387
+ DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
17388
+ })(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
17389
+ });
17390
+
17391
+ // ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
17392
+ var require_logLevelLogger = __commonJS((exports) => {
17393
+ Object.defineProperty(exports, "__esModule", { value: true });
17394
+ exports.createLogLevelDiagLogger = undefined;
17395
+ var types_1 = require_types();
17396
+ function createLogLevelDiagLogger(maxLevel, logger) {
17397
+ if (maxLevel < types_1.DiagLogLevel.NONE) {
17398
+ maxLevel = types_1.DiagLogLevel.NONE;
17399
+ } else if (maxLevel > types_1.DiagLogLevel.ALL) {
17400
+ maxLevel = types_1.DiagLogLevel.ALL;
17401
+ }
17402
+ logger = logger || {};
17403
+ function _filterFunc(funcName, theLevel) {
17404
+ const theFunc = logger[funcName];
17405
+ if (typeof theFunc === "function" && maxLevel >= theLevel) {
17406
+ return theFunc.bind(logger);
17407
+ }
17408
+ return function() {};
17409
+ }
17410
+ return {
17411
+ error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
17412
+ warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
17413
+ info: _filterFunc("info", types_1.DiagLogLevel.INFO),
17414
+ debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
17415
+ verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
17416
+ };
17417
+ }
17418
+ exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
17419
+ });
17420
+
17421
+ // ../../node_modules/@opentelemetry/api/build/src/api/diag.js
17422
+ var require_diag = __commonJS((exports) => {
17423
+ Object.defineProperty(exports, "__esModule", { value: true });
17424
+ exports.DiagAPI = undefined;
17425
+ var ComponentLogger_1 = require_ComponentLogger();
17426
+ var logLevelLogger_1 = require_logLevelLogger();
17427
+ var types_1 = require_types();
17428
+ var global_utils_1 = require_global_utils();
17429
+ var API_NAME = "diag";
17430
+
17431
+ class DiagAPI {
17432
+ static instance() {
17433
+ if (!this._instance) {
17434
+ this._instance = new DiagAPI;
17435
+ }
17436
+ return this._instance;
17437
+ }
17438
+ constructor() {
17439
+ function _logProxy(funcName) {
17440
+ return function(...args) {
17441
+ const logger = (0, global_utils_1.getGlobal)("diag");
17442
+ if (!logger)
17443
+ return;
17444
+ return logger[funcName](...args);
17445
+ };
17446
+ }
17447
+ const self2 = this;
17448
+ const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
17449
+ var _a3, _b, _c;
17450
+ if (logger === self2) {
17451
+ const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
17452
+ self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
17453
+ return false;
17454
+ }
17455
+ if (typeof optionsOrLogLevel === "number") {
17456
+ optionsOrLogLevel = {
17457
+ logLevel: optionsOrLogLevel
17458
+ };
17459
+ }
17460
+ const oldLogger = (0, global_utils_1.getGlobal)("diag");
17461
+ const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
17462
+ if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
17463
+ const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
17464
+ oldLogger.warn(`Current logger will be overwritten from ${stack}`);
17465
+ newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
17466
+ }
17467
+ return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
17468
+ };
17469
+ self2.setLogger = setLogger;
17470
+ self2.disable = () => {
17471
+ (0, global_utils_1.unregisterGlobal)(API_NAME, self2);
17472
+ };
17473
+ self2.createComponentLogger = (options) => {
17474
+ return new ComponentLogger_1.DiagComponentLogger(options);
17475
+ };
17476
+ self2.verbose = _logProxy("verbose");
17477
+ self2.debug = _logProxy("debug");
17478
+ self2.info = _logProxy("info");
17479
+ self2.warn = _logProxy("warn");
17480
+ self2.error = _logProxy("error");
17481
+ }
17482
+ }
17483
+ exports.DiagAPI = DiagAPI;
17484
+ });
17485
+
17486
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
17487
+ var require_baggage_impl = __commonJS((exports) => {
17488
+ Object.defineProperty(exports, "__esModule", { value: true });
17489
+ exports.BaggageImpl = undefined;
17490
+
17491
+ class BaggageImpl {
17492
+ constructor(entries) {
17493
+ this._entries = entries ? new Map(entries) : new Map;
17494
+ }
17495
+ getEntry(key) {
17496
+ const entry = this._entries.get(key);
17497
+ if (!entry) {
17498
+ return;
17499
+ }
17500
+ return Object.assign({}, entry);
17501
+ }
17502
+ getAllEntries() {
17503
+ return Array.from(this._entries.entries());
17504
+ }
17505
+ setEntry(key, entry) {
17506
+ const newBaggage = new BaggageImpl(this._entries);
17507
+ newBaggage._entries.set(key, entry);
17508
+ return newBaggage;
17509
+ }
17510
+ removeEntry(key) {
17511
+ const newBaggage = new BaggageImpl(this._entries);
17512
+ newBaggage._entries.delete(key);
17513
+ return newBaggage;
17514
+ }
17515
+ removeEntries(...keys) {
17516
+ const newBaggage = new BaggageImpl(this._entries);
17517
+ for (const key of keys) {
17518
+ newBaggage._entries.delete(key);
17519
+ }
17520
+ return newBaggage;
17521
+ }
17522
+ clear() {
17523
+ return new BaggageImpl;
17524
+ }
17525
+ }
17526
+ exports.BaggageImpl = BaggageImpl;
17527
+ });
17528
+
17529
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
17530
+ var require_symbol = __commonJS((exports) => {
17531
+ Object.defineProperty(exports, "__esModule", { value: true });
17532
+ exports.baggageEntryMetadataSymbol = undefined;
17533
+ exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
17534
+ });
17535
+
17536
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
17537
+ var require_utils = __commonJS((exports) => {
17538
+ Object.defineProperty(exports, "__esModule", { value: true });
17539
+ exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
17540
+ var diag_1 = require_diag();
17541
+ var baggage_impl_1 = require_baggage_impl();
17542
+ var symbol_1 = require_symbol();
17543
+ var diag = diag_1.DiagAPI.instance();
17544
+ function createBaggage(entries = {}) {
17545
+ return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
17546
+ }
17547
+ exports.createBaggage = createBaggage;
17548
+ function baggageEntryMetadataFromString(str) {
17549
+ if (typeof str !== "string") {
17550
+ diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
17551
+ str = "";
17552
+ }
17553
+ return {
17554
+ __TYPE__: symbol_1.baggageEntryMetadataSymbol,
17555
+ toString() {
17556
+ return str;
17557
+ }
17558
+ };
17559
+ }
17560
+ exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
17561
+ });
17562
+
17563
+ // ../../node_modules/@opentelemetry/api/build/src/context/context.js
17564
+ var require_context = __commonJS((exports) => {
17565
+ Object.defineProperty(exports, "__esModule", { value: true });
17566
+ exports.ROOT_CONTEXT = exports.createContextKey = undefined;
17567
+ function createContextKey(description) {
17568
+ return Symbol.for(description);
17569
+ }
17570
+ exports.createContextKey = createContextKey;
17571
+
17572
+ class BaseContext {
17573
+ constructor(parentContext) {
17574
+ const self2 = this;
17575
+ self2._currentContext = parentContext ? new Map(parentContext) : new Map;
17576
+ self2.getValue = (key) => self2._currentContext.get(key);
17577
+ self2.setValue = (key, value) => {
17578
+ const context = new BaseContext(self2._currentContext);
17579
+ context._currentContext.set(key, value);
17580
+ return context;
17581
+ };
17582
+ self2.deleteValue = (key) => {
17583
+ const context = new BaseContext(self2._currentContext);
17584
+ context._currentContext.delete(key);
17585
+ return context;
17586
+ };
17587
+ }
17588
+ }
17589
+ exports.ROOT_CONTEXT = new BaseContext;
17590
+ });
17591
+
17592
+ // ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
17593
+ var require_consoleLogger = __commonJS((exports) => {
17594
+ Object.defineProperty(exports, "__esModule", { value: true });
17595
+ exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
17596
+ var consoleMap = [
17597
+ { n: "error", c: "error" },
17598
+ { n: "warn", c: "warn" },
17599
+ { n: "info", c: "info" },
17600
+ { n: "debug", c: "debug" },
17601
+ { n: "verbose", c: "trace" }
17602
+ ];
17603
+ exports._originalConsoleMethods = {};
17604
+ if (typeof console !== "undefined") {
17605
+ const keys = [
17606
+ "error",
17607
+ "warn",
17608
+ "info",
17609
+ "debug",
17610
+ "trace",
17611
+ "log"
17612
+ ];
17613
+ for (const key of keys) {
17614
+ if (typeof console[key] === "function") {
17615
+ exports._originalConsoleMethods[key] = console[key];
17616
+ }
17617
+ }
17618
+ }
17619
+
17620
+ class DiagConsoleLogger {
17621
+ constructor() {
17622
+ function _consoleFunc(funcName) {
17623
+ return function(...args) {
17624
+ let theFunc = exports._originalConsoleMethods[funcName];
17625
+ if (typeof theFunc !== "function") {
17626
+ theFunc = exports._originalConsoleMethods["log"];
17627
+ }
17628
+ if (typeof theFunc !== "function" && console) {
17629
+ theFunc = console[funcName];
17630
+ if (typeof theFunc !== "function") {
17631
+ theFunc = console.log;
17632
+ }
17633
+ }
17634
+ if (typeof theFunc === "function") {
17635
+ return theFunc.apply(console, args);
17636
+ }
17637
+ };
17638
+ }
17639
+ for (let i = 0;i < consoleMap.length; i++) {
17640
+ this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
17641
+ }
17642
+ }
17643
+ }
17644
+ exports.DiagConsoleLogger = DiagConsoleLogger;
17645
+ });
17646
+
17647
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
17648
+ var require_NoopMeter = __commonJS((exports) => {
17649
+ Object.defineProperty(exports, "__esModule", { value: true });
17650
+ 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;
17651
+
17652
+ class NoopMeter {
17653
+ constructor() {}
17654
+ createGauge(_name, _options) {
17655
+ return exports.NOOP_GAUGE_METRIC;
17656
+ }
17657
+ createHistogram(_name, _options) {
17658
+ return exports.NOOP_HISTOGRAM_METRIC;
17659
+ }
17660
+ createCounter(_name, _options) {
17661
+ return exports.NOOP_COUNTER_METRIC;
17662
+ }
17663
+ createUpDownCounter(_name, _options) {
17664
+ return exports.NOOP_UP_DOWN_COUNTER_METRIC;
17665
+ }
17666
+ createObservableGauge(_name, _options) {
17667
+ return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
17668
+ }
17669
+ createObservableCounter(_name, _options) {
17670
+ return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
17671
+ }
17672
+ createObservableUpDownCounter(_name, _options) {
17673
+ return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
17674
+ }
17675
+ addBatchObservableCallback(_callback, _observables) {}
17676
+ removeBatchObservableCallback(_callback) {}
17677
+ }
17678
+ exports.NoopMeter = NoopMeter;
17679
+
17680
+ class NoopMetric {
17681
+ }
17682
+ exports.NoopMetric = NoopMetric;
17683
+
17684
+ class NoopCounterMetric extends NoopMetric {
17685
+ add(_value, _attributes) {}
17686
+ }
17687
+ exports.NoopCounterMetric = NoopCounterMetric;
17688
+
17689
+ class NoopUpDownCounterMetric extends NoopMetric {
17690
+ add(_value, _attributes) {}
17691
+ }
17692
+ exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
17693
+
17694
+ class NoopGaugeMetric extends NoopMetric {
17695
+ record(_value, _attributes) {}
17696
+ }
17697
+ exports.NoopGaugeMetric = NoopGaugeMetric;
17698
+
17699
+ class NoopHistogramMetric extends NoopMetric {
17700
+ record(_value, _attributes) {}
17701
+ }
17702
+ exports.NoopHistogramMetric = NoopHistogramMetric;
17703
+
17704
+ class NoopObservableMetric {
17705
+ addCallback(_callback) {}
17706
+ removeCallback(_callback) {}
17707
+ }
17708
+ exports.NoopObservableMetric = NoopObservableMetric;
17709
+
17710
+ class NoopObservableCounterMetric extends NoopObservableMetric {
17711
+ }
17712
+ exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
17713
+
17714
+ class NoopObservableGaugeMetric extends NoopObservableMetric {
17715
+ }
17716
+ exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
17717
+
17718
+ class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
17719
+ }
17720
+ exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
17721
+ exports.NOOP_METER = new NoopMeter;
17722
+ exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
17723
+ exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
17724
+ exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
17725
+ exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
17726
+ exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
17727
+ exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
17728
+ exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
17729
+ function createNoopMeter() {
17730
+ return exports.NOOP_METER;
17731
+ }
17732
+ exports.createNoopMeter = createNoopMeter;
17733
+ });
17734
+
17735
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
17736
+ var require_Metric = __commonJS((exports) => {
17737
+ Object.defineProperty(exports, "__esModule", { value: true });
17738
+ exports.ValueType = undefined;
17739
+ var ValueType;
17740
+ (function(ValueType2) {
17741
+ ValueType2[ValueType2["INT"] = 0] = "INT";
17742
+ ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
17743
+ })(ValueType = exports.ValueType || (exports.ValueType = {}));
17744
+ });
17745
+
17746
+ // ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
17747
+ var require_TextMapPropagator = __commonJS((exports) => {
17748
+ Object.defineProperty(exports, "__esModule", { value: true });
17749
+ exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
17750
+ exports.defaultTextMapGetter = {
17751
+ get(carrier, key) {
17752
+ if (carrier == null) {
17753
+ return;
17754
+ }
17755
+ return carrier[key];
17756
+ },
17757
+ keys(carrier) {
17758
+ if (carrier == null) {
17759
+ return [];
17760
+ }
17761
+ return Object.keys(carrier);
17762
+ }
17763
+ };
17764
+ exports.defaultTextMapSetter = {
17765
+ set(carrier, key, value) {
17766
+ if (carrier == null) {
17767
+ return;
17768
+ }
17769
+ carrier[key] = value;
17770
+ }
17771
+ };
17772
+ });
17773
+
17774
+ // ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
17775
+ var require_NoopContextManager = __commonJS((exports) => {
17776
+ Object.defineProperty(exports, "__esModule", { value: true });
17777
+ exports.NoopContextManager = undefined;
17778
+ var context_1 = require_context();
17779
+
17780
+ class NoopContextManager {
17781
+ active() {
17782
+ return context_1.ROOT_CONTEXT;
17783
+ }
17784
+ with(_context, fn, thisArg, ...args) {
17785
+ return fn.call(thisArg, ...args);
17786
+ }
17787
+ bind(_context, target) {
17788
+ return target;
17789
+ }
17790
+ enable() {
17791
+ return this;
17792
+ }
17793
+ disable() {
17794
+ return this;
17795
+ }
17796
+ }
17797
+ exports.NoopContextManager = NoopContextManager;
17798
+ });
17799
+
17800
+ // ../../node_modules/@opentelemetry/api/build/src/api/context.js
17801
+ var require_context2 = __commonJS((exports) => {
17802
+ Object.defineProperty(exports, "__esModule", { value: true });
17803
+ exports.ContextAPI = undefined;
17804
+ var NoopContextManager_1 = require_NoopContextManager();
17805
+ var global_utils_1 = require_global_utils();
17806
+ var diag_1 = require_diag();
17807
+ var API_NAME = "context";
17808
+ var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
17809
+
17810
+ class ContextAPI {
17811
+ constructor() {}
17812
+ static getInstance() {
17813
+ if (!this._instance) {
17814
+ this._instance = new ContextAPI;
17815
+ }
17816
+ return this._instance;
17817
+ }
17818
+ setGlobalContextManager(contextManager) {
17819
+ return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
17820
+ }
17821
+ active() {
17822
+ return this._getContextManager().active();
17823
+ }
17824
+ with(context, fn, thisArg, ...args) {
17825
+ return this._getContextManager().with(context, fn, thisArg, ...args);
17826
+ }
17827
+ bind(context, target) {
17828
+ return this._getContextManager().bind(context, target);
17829
+ }
17830
+ _getContextManager() {
17831
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
17832
+ }
17833
+ disable() {
17834
+ this._getContextManager().disable();
17835
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
17836
+ }
17837
+ }
17838
+ exports.ContextAPI = ContextAPI;
17839
+ });
17840
+
17841
+ // ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
17842
+ var require_trace_flags = __commonJS((exports) => {
17843
+ Object.defineProperty(exports, "__esModule", { value: true });
17844
+ exports.TraceFlags = undefined;
17845
+ var TraceFlags;
17846
+ (function(TraceFlags2) {
17847
+ TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
17848
+ TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
17849
+ })(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
17850
+ });
17851
+
17852
+ // ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
17853
+ var require_invalid_span_constants = __commonJS((exports) => {
17854
+ Object.defineProperty(exports, "__esModule", { value: true });
17855
+ exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
17856
+ var trace_flags_1 = require_trace_flags();
17857
+ exports.INVALID_SPANID = "0000000000000000";
17858
+ exports.INVALID_TRACEID = "00000000000000000000000000000000";
17859
+ exports.INVALID_SPAN_CONTEXT = {
17860
+ traceId: exports.INVALID_TRACEID,
17861
+ spanId: exports.INVALID_SPANID,
17862
+ traceFlags: trace_flags_1.TraceFlags.NONE
17863
+ };
17864
+ });
17865
+
17866
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
17867
+ var require_NonRecordingSpan = __commonJS((exports) => {
17868
+ Object.defineProperty(exports, "__esModule", { value: true });
17869
+ exports.NonRecordingSpan = undefined;
17870
+ var invalid_span_constants_1 = require_invalid_span_constants();
17871
+
17872
+ class NonRecordingSpan {
17873
+ constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
17874
+ this._spanContext = spanContext;
17875
+ }
17876
+ spanContext() {
17877
+ return this._spanContext;
17878
+ }
17879
+ setAttribute(_key, _value) {
17880
+ return this;
17881
+ }
17882
+ setAttributes(_attributes) {
17883
+ return this;
17884
+ }
17885
+ addEvent(_name, _attributes) {
17886
+ return this;
17887
+ }
17888
+ addLink(_link) {
17889
+ return this;
17890
+ }
17891
+ addLinks(_links) {
17892
+ return this;
17893
+ }
17894
+ setStatus(_status) {
17895
+ return this;
17896
+ }
17897
+ updateName(_name) {
17898
+ return this;
17899
+ }
17900
+ end(_endTime) {}
17901
+ isRecording() {
17902
+ return false;
17903
+ }
17904
+ recordException(_exception, _time) {}
17905
+ }
17906
+ exports.NonRecordingSpan = NonRecordingSpan;
17907
+ });
17908
+
17909
+ // ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
17910
+ var require_context_utils = __commonJS((exports) => {
17911
+ Object.defineProperty(exports, "__esModule", { value: true });
17912
+ exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
17913
+ var context_1 = require_context();
17914
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
17915
+ var context_2 = require_context2();
17916
+ var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
17917
+ function getSpan(context) {
17918
+ return context.getValue(SPAN_KEY) || undefined;
17919
+ }
17920
+ exports.getSpan = getSpan;
17921
+ function getActiveSpan() {
17922
+ return getSpan(context_2.ContextAPI.getInstance().active());
17923
+ }
17924
+ exports.getActiveSpan = getActiveSpan;
17925
+ function setSpan(context, span) {
17926
+ return context.setValue(SPAN_KEY, span);
17927
+ }
17928
+ exports.setSpan = setSpan;
17929
+ function deleteSpan(context) {
17930
+ return context.deleteValue(SPAN_KEY);
17931
+ }
17932
+ exports.deleteSpan = deleteSpan;
17933
+ function setSpanContext(context, spanContext) {
17934
+ return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
17935
+ }
17936
+ exports.setSpanContext = setSpanContext;
17937
+ function getSpanContext(context) {
17938
+ var _a3;
17939
+ return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
17940
+ }
17941
+ exports.getSpanContext = getSpanContext;
17942
+ });
17943
+
17944
+ // ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
17945
+ var require_spancontext_utils = __commonJS((exports) => {
17946
+ Object.defineProperty(exports, "__esModule", { value: true });
17947
+ exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
17948
+ var invalid_span_constants_1 = require_invalid_span_constants();
17949
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
17950
+ var isHex = new Uint8Array([
17951
+ 0,
17952
+ 0,
17953
+ 0,
17954
+ 0,
17955
+ 0,
17956
+ 0,
17957
+ 0,
17958
+ 0,
17959
+ 0,
17960
+ 0,
17961
+ 0,
17962
+ 0,
17963
+ 0,
17964
+ 0,
17965
+ 0,
17966
+ 0,
17967
+ 0,
17968
+ 0,
17969
+ 0,
17970
+ 0,
17971
+ 0,
17972
+ 0,
17973
+ 0,
17974
+ 0,
17975
+ 0,
17976
+ 0,
17977
+ 0,
17978
+ 0,
17979
+ 0,
17980
+ 0,
17981
+ 0,
17982
+ 0,
17983
+ 0,
17984
+ 0,
17985
+ 0,
17986
+ 0,
17987
+ 0,
17988
+ 0,
17989
+ 0,
17990
+ 0,
17991
+ 0,
17992
+ 0,
17993
+ 0,
17994
+ 0,
17995
+ 0,
17996
+ 0,
17997
+ 0,
17998
+ 0,
17999
+ 1,
18000
+ 1,
18001
+ 1,
18002
+ 1,
18003
+ 1,
18004
+ 1,
18005
+ 1,
18006
+ 1,
18007
+ 1,
18008
+ 1,
18009
+ 0,
18010
+ 0,
18011
+ 0,
18012
+ 0,
18013
+ 0,
18014
+ 0,
18015
+ 0,
18016
+ 1,
18017
+ 1,
18018
+ 1,
18019
+ 1,
18020
+ 1,
18021
+ 1,
18022
+ 0,
18023
+ 0,
18024
+ 0,
18025
+ 0,
18026
+ 0,
18027
+ 0,
18028
+ 0,
18029
+ 0,
18030
+ 0,
18031
+ 0,
18032
+ 0,
18033
+ 0,
18034
+ 0,
18035
+ 0,
18036
+ 0,
18037
+ 0,
18038
+ 0,
18039
+ 0,
18040
+ 0,
18041
+ 0,
18042
+ 0,
18043
+ 0,
18044
+ 0,
18045
+ 0,
18046
+ 0,
18047
+ 0,
18048
+ 1,
18049
+ 1,
18050
+ 1,
18051
+ 1,
18052
+ 1,
18053
+ 1
18054
+ ]);
18055
+ function isValidHex(id, length) {
18056
+ if (typeof id !== "string" || id.length !== length)
18057
+ return false;
18058
+ let r = 0;
18059
+ for (let i = 0;i < id.length; i += 4) {
18060
+ r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
18061
+ }
18062
+ return r === length;
18063
+ }
18064
+ function isValidTraceId(traceId) {
18065
+ return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
18066
+ }
18067
+ exports.isValidTraceId = isValidTraceId;
18068
+ function isValidSpanId(spanId) {
18069
+ return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
18070
+ }
18071
+ exports.isValidSpanId = isValidSpanId;
18072
+ function isSpanContextValid(spanContext) {
18073
+ return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
18074
+ }
18075
+ exports.isSpanContextValid = isSpanContextValid;
18076
+ function wrapSpanContext(spanContext) {
18077
+ return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
18078
+ }
18079
+ exports.wrapSpanContext = wrapSpanContext;
18080
+ });
18081
+
18082
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
18083
+ var require_NoopTracer = __commonJS((exports) => {
18084
+ Object.defineProperty(exports, "__esModule", { value: true });
18085
+ exports.NoopTracer = undefined;
18086
+ var context_1 = require_context2();
18087
+ var context_utils_1 = require_context_utils();
18088
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18089
+ var spancontext_utils_1 = require_spancontext_utils();
18090
+ var contextApi = context_1.ContextAPI.getInstance();
18091
+
18092
+ class NoopTracer {
18093
+ startSpan(name, options, context = contextApi.active()) {
18094
+ const root = Boolean(options === null || options === undefined ? undefined : options.root);
18095
+ if (root) {
18096
+ return new NonRecordingSpan_1.NonRecordingSpan;
18097
+ }
18098
+ const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
18099
+ if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
18100
+ return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
18101
+ } else {
18102
+ return new NonRecordingSpan_1.NonRecordingSpan;
18103
+ }
18104
+ }
18105
+ startActiveSpan(name, arg2, arg3, arg4) {
18106
+ let opts;
18107
+ let ctx;
18108
+ let fn;
18109
+ if (arguments.length < 2) {
18110
+ return;
18111
+ } else if (arguments.length === 2) {
18112
+ fn = arg2;
18113
+ } else if (arguments.length === 3) {
18114
+ opts = arg2;
18115
+ fn = arg3;
18116
+ } else {
18117
+ opts = arg2;
18118
+ ctx = arg3;
18119
+ fn = arg4;
18120
+ }
18121
+ const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
18122
+ const span = this.startSpan(name, opts, parentContext);
18123
+ const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
18124
+ return contextApi.with(contextWithSpanSet, fn, undefined, span);
18125
+ }
18126
+ }
18127
+ exports.NoopTracer = NoopTracer;
18128
+ function isSpanContext(spanContext) {
18129
+ 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";
18130
+ }
18131
+ });
18132
+
18133
+ // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
18134
+ var require_ProxyTracer = __commonJS((exports) => {
18135
+ Object.defineProperty(exports, "__esModule", { value: true });
18136
+ exports.ProxyTracer = undefined;
18137
+ var NoopTracer_1 = require_NoopTracer();
18138
+ var NOOP_TRACER = new NoopTracer_1.NoopTracer;
18139
+
18140
+ class ProxyTracer {
18141
+ constructor(provider, name, version2, options) {
18142
+ this._provider = provider;
18143
+ this.name = name;
18144
+ this.version = version2;
18145
+ this.options = options;
18146
+ }
18147
+ startSpan(name, options, context) {
18148
+ return this._getTracer().startSpan(name, options, context);
18149
+ }
18150
+ startActiveSpan(_name, _options, _context, _fn) {
18151
+ const tracer = this._getTracer();
18152
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
18153
+ }
18154
+ _getTracer() {
18155
+ if (this._delegate) {
18156
+ return this._delegate;
18157
+ }
18158
+ const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
18159
+ if (!tracer) {
18160
+ return NOOP_TRACER;
18161
+ }
18162
+ this._delegate = tracer;
18163
+ return this._delegate;
18164
+ }
18165
+ }
18166
+ exports.ProxyTracer = ProxyTracer;
18167
+ });
18168
+
18169
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
18170
+ var require_NoopTracerProvider = __commonJS((exports) => {
18171
+ Object.defineProperty(exports, "__esModule", { value: true });
18172
+ exports.NoopTracerProvider = undefined;
18173
+ var NoopTracer_1 = require_NoopTracer();
18174
+
18175
+ class NoopTracerProvider {
18176
+ getTracer(_name, _version, _options) {
18177
+ return new NoopTracer_1.NoopTracer;
18178
+ }
18179
+ }
18180
+ exports.NoopTracerProvider = NoopTracerProvider;
18181
+ });
18182
+
18183
+ // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
18184
+ var require_ProxyTracerProvider = __commonJS((exports) => {
18185
+ Object.defineProperty(exports, "__esModule", { value: true });
18186
+ exports.ProxyTracerProvider = undefined;
18187
+ var ProxyTracer_1 = require_ProxyTracer();
18188
+ var NoopTracerProvider_1 = require_NoopTracerProvider();
18189
+ var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
18190
+
18191
+ class ProxyTracerProvider {
18192
+ getTracer(name, version2, options) {
18193
+ var _a3;
18194
+ return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
18195
+ }
18196
+ getDelegate() {
18197
+ var _a3;
18198
+ return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
18199
+ }
18200
+ setDelegate(delegate) {
18201
+ this._delegate = delegate;
18202
+ }
18203
+ getDelegateTracer(name, version2, options) {
18204
+ var _a3;
18205
+ return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
18206
+ }
18207
+ }
18208
+ exports.ProxyTracerProvider = ProxyTracerProvider;
18209
+ });
18210
+
18211
+ // ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
18212
+ var require_SamplingResult = __commonJS((exports) => {
18213
+ Object.defineProperty(exports, "__esModule", { value: true });
18214
+ exports.SamplingDecision = undefined;
18215
+ var SamplingDecision;
18216
+ (function(SamplingDecision2) {
18217
+ SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
18218
+ SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
18219
+ SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
18220
+ })(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
18221
+ });
18222
+
18223
+ // ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
18224
+ var require_span_kind = __commonJS((exports) => {
18225
+ Object.defineProperty(exports, "__esModule", { value: true });
18226
+ exports.SpanKind = undefined;
18227
+ var SpanKind;
18228
+ (function(SpanKind2) {
18229
+ SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
18230
+ SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
18231
+ SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
18232
+ SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
18233
+ SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
18234
+ })(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
18235
+ });
18236
+
18237
+ // ../../node_modules/@opentelemetry/api/build/src/trace/status.js
18238
+ var require_status = __commonJS((exports) => {
18239
+ Object.defineProperty(exports, "__esModule", { value: true });
18240
+ exports.SpanStatusCode = undefined;
18241
+ var SpanStatusCode;
18242
+ (function(SpanStatusCode2) {
18243
+ SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
18244
+ SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
18245
+ SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
18246
+ })(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
18247
+ });
18248
+
18249
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
18250
+ var require_tracestate_validators = __commonJS((exports) => {
18251
+ Object.defineProperty(exports, "__esModule", { value: true });
18252
+ exports.validateValue = exports.validateKey = undefined;
18253
+ var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
18254
+ var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
18255
+ var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
18256
+ var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
18257
+ var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
18258
+ var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
18259
+ function validateKey(key) {
18260
+ return VALID_KEY_REGEX.test(key);
18261
+ }
18262
+ exports.validateKey = validateKey;
18263
+ function validateValue(value) {
18264
+ return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
18265
+ }
18266
+ exports.validateValue = validateValue;
18267
+ });
18268
+
18269
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
18270
+ var require_tracestate_impl = __commonJS((exports) => {
18271
+ Object.defineProperty(exports, "__esModule", { value: true });
18272
+ exports.TraceStateImpl = undefined;
18273
+ var tracestate_validators_1 = require_tracestate_validators();
18274
+ var MAX_TRACE_STATE_ITEMS = 32;
18275
+ var MAX_TRACE_STATE_LEN = 512;
18276
+ var LIST_MEMBERS_SEPARATOR = ",";
18277
+ var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
18278
+
18279
+ class TraceStateImpl {
18280
+ constructor(rawTraceState) {
18281
+ this._internalState = new Map;
18282
+ if (rawTraceState)
18283
+ this._parse(rawTraceState);
18284
+ }
18285
+ set(key, value) {
18286
+ const traceState = this._clone();
18287
+ if (traceState._internalState.has(key)) {
18288
+ traceState._internalState.delete(key);
18289
+ }
18290
+ traceState._internalState.set(key, value);
18291
+ return traceState;
18292
+ }
18293
+ unset(key) {
18294
+ const traceState = this._clone();
18295
+ traceState._internalState.delete(key);
18296
+ return traceState;
18297
+ }
18298
+ get(key) {
18299
+ return this._internalState.get(key);
18300
+ }
18301
+ serialize() {
18302
+ return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
18303
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
18304
+ return agg;
18305
+ }, []).join(LIST_MEMBERS_SEPARATOR);
18306
+ }
18307
+ _parse(rawTraceState) {
18308
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN)
18309
+ return;
18310
+ this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
18311
+ const listMember = part.trim();
18312
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
18313
+ if (i !== -1) {
18314
+ const key = listMember.slice(0, i);
18315
+ const value = listMember.slice(i + 1, part.length);
18316
+ if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
18317
+ agg.set(key, value);
18318
+ }
18319
+ }
18320
+ return agg;
18321
+ }, new Map);
18322
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
18323
+ this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
18324
+ }
18325
+ }
18326
+ _keys() {
18327
+ return Array.from(this._internalState.keys()).reverse();
18328
+ }
18329
+ _clone() {
18330
+ const traceState = new TraceStateImpl;
18331
+ traceState._internalState = new Map(this._internalState);
18332
+ return traceState;
18333
+ }
18334
+ }
18335
+ exports.TraceStateImpl = TraceStateImpl;
18336
+ });
18337
+
18338
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
18339
+ var require_utils2 = __commonJS((exports) => {
18340
+ Object.defineProperty(exports, "__esModule", { value: true });
18341
+ exports.createTraceState = undefined;
18342
+ var tracestate_impl_1 = require_tracestate_impl();
18343
+ function createTraceState(rawTraceState) {
18344
+ return new tracestate_impl_1.TraceStateImpl(rawTraceState);
18345
+ }
18346
+ exports.createTraceState = createTraceState;
18347
+ });
18348
+
18349
+ // ../../node_modules/@opentelemetry/api/build/src/context-api.js
18350
+ var require_context_api = __commonJS((exports) => {
18351
+ Object.defineProperty(exports, "__esModule", { value: true });
18352
+ exports.context = undefined;
18353
+ var context_1 = require_context2();
18354
+ exports.context = context_1.ContextAPI.getInstance();
18355
+ });
18356
+
18357
+ // ../../node_modules/@opentelemetry/api/build/src/diag-api.js
18358
+ var require_diag_api = __commonJS((exports) => {
18359
+ Object.defineProperty(exports, "__esModule", { value: true });
18360
+ exports.diag = undefined;
18361
+ var diag_1 = require_diag();
18362
+ exports.diag = diag_1.DiagAPI.instance();
18363
+ });
18364
+
18365
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
18366
+ var require_NoopMeterProvider = __commonJS((exports) => {
18367
+ Object.defineProperty(exports, "__esModule", { value: true });
18368
+ exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
18369
+ var NoopMeter_1 = require_NoopMeter();
18370
+
18371
+ class NoopMeterProvider {
18372
+ getMeter(_name, _version, _options) {
18373
+ return NoopMeter_1.NOOP_METER;
18374
+ }
18375
+ }
18376
+ exports.NoopMeterProvider = NoopMeterProvider;
18377
+ exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
18378
+ });
18379
+
18380
+ // ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
18381
+ var require_metrics = __commonJS((exports) => {
18382
+ Object.defineProperty(exports, "__esModule", { value: true });
18383
+ exports.MetricsAPI = undefined;
18384
+ var NoopMeterProvider_1 = require_NoopMeterProvider();
18385
+ var global_utils_1 = require_global_utils();
18386
+ var diag_1 = require_diag();
18387
+ var API_NAME = "metrics";
18388
+
18389
+ class MetricsAPI {
18390
+ constructor() {}
18391
+ static getInstance() {
18392
+ if (!this._instance) {
18393
+ this._instance = new MetricsAPI;
18394
+ }
18395
+ return this._instance;
18396
+ }
18397
+ setGlobalMeterProvider(provider) {
18398
+ return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
18399
+ }
18400
+ getMeterProvider() {
18401
+ return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
18402
+ }
18403
+ getMeter(name, version2, options) {
18404
+ return this.getMeterProvider().getMeter(name, version2, options);
18405
+ }
18406
+ disable() {
18407
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18408
+ }
18409
+ }
18410
+ exports.MetricsAPI = MetricsAPI;
18411
+ });
18412
+
18413
+ // ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
18414
+ var require_metrics_api = __commonJS((exports) => {
18415
+ Object.defineProperty(exports, "__esModule", { value: true });
18416
+ exports.metrics = undefined;
18417
+ var metrics_1 = require_metrics();
18418
+ exports.metrics = metrics_1.MetricsAPI.getInstance();
18419
+ });
18420
+
18421
+ // ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
18422
+ var require_NoopTextMapPropagator = __commonJS((exports) => {
18423
+ Object.defineProperty(exports, "__esModule", { value: true });
18424
+ exports.NoopTextMapPropagator = undefined;
18425
+
18426
+ class NoopTextMapPropagator {
18427
+ inject(_context, _carrier) {}
18428
+ extract(context, _carrier) {
18429
+ return context;
18430
+ }
18431
+ fields() {
18432
+ return [];
18433
+ }
18434
+ }
18435
+ exports.NoopTextMapPropagator = NoopTextMapPropagator;
18436
+ });
18437
+
18438
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
18439
+ var require_context_helpers = __commonJS((exports) => {
18440
+ Object.defineProperty(exports, "__esModule", { value: true });
18441
+ exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
18442
+ var context_1 = require_context2();
18443
+ var context_2 = require_context();
18444
+ var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
18445
+ function getBaggage(context) {
18446
+ return context.getValue(BAGGAGE_KEY) || undefined;
18447
+ }
18448
+ exports.getBaggage = getBaggage;
18449
+ function getActiveBaggage() {
18450
+ return getBaggage(context_1.ContextAPI.getInstance().active());
18451
+ }
18452
+ exports.getActiveBaggage = getActiveBaggage;
18453
+ function setBaggage(context, baggage) {
18454
+ return context.setValue(BAGGAGE_KEY, baggage);
18455
+ }
18456
+ exports.setBaggage = setBaggage;
18457
+ function deleteBaggage(context) {
18458
+ return context.deleteValue(BAGGAGE_KEY);
18459
+ }
18460
+ exports.deleteBaggage = deleteBaggage;
18461
+ });
18462
+
18463
+ // ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
18464
+ var require_propagation = __commonJS((exports) => {
18465
+ Object.defineProperty(exports, "__esModule", { value: true });
18466
+ exports.PropagationAPI = undefined;
18467
+ var global_utils_1 = require_global_utils();
18468
+ var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
18469
+ var TextMapPropagator_1 = require_TextMapPropagator();
18470
+ var context_helpers_1 = require_context_helpers();
18471
+ var utils_1 = require_utils();
18472
+ var diag_1 = require_diag();
18473
+ var API_NAME = "propagation";
18474
+ var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
18475
+
18476
+ class PropagationAPI {
18477
+ constructor() {
18478
+ this.createBaggage = utils_1.createBaggage;
18479
+ this.getBaggage = context_helpers_1.getBaggage;
18480
+ this.getActiveBaggage = context_helpers_1.getActiveBaggage;
18481
+ this.setBaggage = context_helpers_1.setBaggage;
18482
+ this.deleteBaggage = context_helpers_1.deleteBaggage;
18483
+ }
18484
+ static getInstance() {
18485
+ if (!this._instance) {
18486
+ this._instance = new PropagationAPI;
18487
+ }
18488
+ return this._instance;
18489
+ }
18490
+ setGlobalPropagator(propagator) {
18491
+ return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
18492
+ }
18493
+ inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
18494
+ return this._getGlobalPropagator().inject(context, carrier, setter);
18495
+ }
18496
+ extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
18497
+ return this._getGlobalPropagator().extract(context, carrier, getter);
18498
+ }
18499
+ fields() {
18500
+ return this._getGlobalPropagator().fields();
18501
+ }
18502
+ disable() {
18503
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18504
+ }
18505
+ _getGlobalPropagator() {
18506
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
18507
+ }
18508
+ }
18509
+ exports.PropagationAPI = PropagationAPI;
18510
+ });
18511
+
18512
+ // ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
18513
+ var require_propagation_api = __commonJS((exports) => {
18514
+ Object.defineProperty(exports, "__esModule", { value: true });
18515
+ exports.propagation = undefined;
18516
+ var propagation_1 = require_propagation();
18517
+ exports.propagation = propagation_1.PropagationAPI.getInstance();
18518
+ });
18519
+
18520
+ // ../../node_modules/@opentelemetry/api/build/src/api/trace.js
18521
+ var require_trace = __commonJS((exports) => {
18522
+ Object.defineProperty(exports, "__esModule", { value: true });
18523
+ exports.TraceAPI = undefined;
18524
+ var global_utils_1 = require_global_utils();
18525
+ var ProxyTracerProvider_1 = require_ProxyTracerProvider();
18526
+ var spancontext_utils_1 = require_spancontext_utils();
18527
+ var context_utils_1 = require_context_utils();
18528
+ var diag_1 = require_diag();
18529
+ var API_NAME = "trace";
18530
+
18531
+ class TraceAPI {
18532
+ constructor() {
18533
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
18534
+ this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
18535
+ this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
18536
+ this.deleteSpan = context_utils_1.deleteSpan;
18537
+ this.getSpan = context_utils_1.getSpan;
18538
+ this.getActiveSpan = context_utils_1.getActiveSpan;
18539
+ this.getSpanContext = context_utils_1.getSpanContext;
18540
+ this.setSpan = context_utils_1.setSpan;
18541
+ this.setSpanContext = context_utils_1.setSpanContext;
18542
+ }
18543
+ static getInstance() {
18544
+ if (!this._instance) {
18545
+ this._instance = new TraceAPI;
18546
+ }
18547
+ return this._instance;
18548
+ }
18549
+ setGlobalTracerProvider(provider) {
18550
+ const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
18551
+ if (success3) {
18552
+ this._proxyTracerProvider.setDelegate(provider);
18553
+ }
18554
+ return success3;
18555
+ }
18556
+ getTracerProvider() {
18557
+ return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
18558
+ }
18559
+ getTracer(name, version2) {
18560
+ return this.getTracerProvider().getTracer(name, version2);
18561
+ }
18562
+ disable() {
18563
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18564
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
18565
+ }
18566
+ }
18567
+ exports.TraceAPI = TraceAPI;
18568
+ });
18569
+
18570
+ // ../../node_modules/@opentelemetry/api/build/src/trace-api.js
18571
+ var require_trace_api = __commonJS((exports) => {
18572
+ Object.defineProperty(exports, "__esModule", { value: true });
18573
+ exports.trace = undefined;
18574
+ var trace_1 = require_trace();
18575
+ exports.trace = trace_1.TraceAPI.getInstance();
18576
+ });
18577
+
18578
+ // ../../node_modules/@opentelemetry/api/build/src/index.js
18579
+ var require_src = __commonJS((exports) => {
18580
+ Object.defineProperty(exports, "__esModule", { value: true });
18581
+ 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;
18582
+ var utils_1 = require_utils();
18583
+ Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
18584
+ return utils_1.baggageEntryMetadataFromString;
18585
+ } });
18586
+ var context_1 = require_context();
18587
+ Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
18588
+ return context_1.createContextKey;
18589
+ } });
18590
+ Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
18591
+ return context_1.ROOT_CONTEXT;
18592
+ } });
18593
+ var consoleLogger_1 = require_consoleLogger();
18594
+ Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
18595
+ return consoleLogger_1.DiagConsoleLogger;
18596
+ } });
18597
+ var types_1 = require_types();
18598
+ Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
18599
+ return types_1.DiagLogLevel;
18600
+ } });
18601
+ var NoopMeter_1 = require_NoopMeter();
18602
+ Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
18603
+ return NoopMeter_1.createNoopMeter;
18604
+ } });
18605
+ var Metric_1 = require_Metric();
18606
+ Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
18607
+ return Metric_1.ValueType;
18608
+ } });
18609
+ var TextMapPropagator_1 = require_TextMapPropagator();
18610
+ Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
18611
+ return TextMapPropagator_1.defaultTextMapGetter;
18612
+ } });
18613
+ Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
18614
+ return TextMapPropagator_1.defaultTextMapSetter;
18615
+ } });
18616
+ var ProxyTracer_1 = require_ProxyTracer();
18617
+ Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
18618
+ return ProxyTracer_1.ProxyTracer;
18619
+ } });
18620
+ var ProxyTracerProvider_1 = require_ProxyTracerProvider();
18621
+ Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
18622
+ return ProxyTracerProvider_1.ProxyTracerProvider;
18623
+ } });
18624
+ var SamplingResult_1 = require_SamplingResult();
18625
+ Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
18626
+ return SamplingResult_1.SamplingDecision;
18627
+ } });
18628
+ var span_kind_1 = require_span_kind();
18629
+ Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
18630
+ return span_kind_1.SpanKind;
18631
+ } });
18632
+ var status_1 = require_status();
18633
+ Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
18634
+ return status_1.SpanStatusCode;
18635
+ } });
18636
+ var trace_flags_1 = require_trace_flags();
18637
+ Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
18638
+ return trace_flags_1.TraceFlags;
18639
+ } });
18640
+ var utils_2 = require_utils2();
18641
+ Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
18642
+ return utils_2.createTraceState;
18643
+ } });
18644
+ var spancontext_utils_1 = require_spancontext_utils();
18645
+ Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
18646
+ return spancontext_utils_1.isSpanContextValid;
18647
+ } });
18648
+ Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
18649
+ return spancontext_utils_1.isValidTraceId;
18650
+ } });
18651
+ Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
18652
+ return spancontext_utils_1.isValidSpanId;
18653
+ } });
18654
+ var invalid_span_constants_1 = require_invalid_span_constants();
18655
+ Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
18656
+ return invalid_span_constants_1.INVALID_SPANID;
18657
+ } });
18658
+ Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
18659
+ return invalid_span_constants_1.INVALID_TRACEID;
18660
+ } });
18661
+ Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
18662
+ return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
18663
+ } });
18664
+ var context_api_1 = require_context_api();
18665
+ Object.defineProperty(exports, "context", { enumerable: true, get: function() {
18666
+ return context_api_1.context;
18667
+ } });
18668
+ var diag_api_1 = require_diag_api();
18669
+ Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
18670
+ return diag_api_1.diag;
18671
+ } });
18672
+ var metrics_api_1 = require_metrics_api();
18673
+ Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
18674
+ return metrics_api_1.metrics;
18675
+ } });
18676
+ var propagation_api_1 = require_propagation_api();
18677
+ Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
18678
+ return propagation_api_1.propagation;
18679
+ } });
18680
+ var trace_api_1 = require_trace_api();
18681
+ Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
18682
+ return trace_api_1.trace;
18683
+ } });
18684
+ exports.default = {
18685
+ context: context_api_1.context,
18686
+ diag: diag_api_1.diag,
18687
+ metrics: metrics_api_1.metrics,
18688
+ propagation: propagation_api_1.propagation,
18689
+ trace: trace_api_1.trace
18690
+ };
18691
+ });
18692
+
18693
+ // ../types/src/processor/processor.ts
18694
+ var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
18695
+ var init_processor = __esm(() => {
18696
+ init_zod();
18697
+ init_common();
18698
+ import_api = __toESM(require_src(), 1);
18699
+ noopTracingContext = {
18700
+ traceId: "",
18701
+ getActiveSpan() {
18702
+ return;
18703
+ },
18704
+ async withSpan(_name, _options, fn) {
18705
+ const noopSpan = {
18706
+ spanContext: () => ({
18707
+ traceId: "",
18708
+ spanId: "",
18709
+ traceFlags: 0
18710
+ }),
18711
+ setAttribute: () => noopSpan,
18712
+ setAttributes: () => noopSpan,
18713
+ addEvent: () => noopSpan,
18714
+ addLink: () => noopSpan,
18715
+ addLinks: () => noopSpan,
18716
+ setStatus: () => noopSpan,
18717
+ updateName: () => noopSpan,
18718
+ end: () => {},
18719
+ isRecording: () => false,
18720
+ recordException: () => {}
18721
+ };
18722
+ return fn(noopSpan);
18723
+ }
18724
+ };
18725
+ ProcessorPortSchema = exports_external.object({
18726
+ name: exports_external.string(),
18727
+ schema: JsonSchemaSchema,
18728
+ required: exports_external.boolean().default(true)
18729
+ });
18730
+ ProcessorDefinitionSchema = exports_external.object({
18731
+ id: exports_external.string(),
18732
+ name: exports_external.string(),
18733
+ description: exports_external.string().optional(),
18734
+ inputSchema: JsonSchemaSchema,
18735
+ outputSchema: JsonSchemaSchema,
18736
+ configSchema: JsonSchemaSchema.optional(),
18737
+ inputPorts: exports_external.array(ProcessorPortSchema).optional(),
18738
+ outputPorts: exports_external.array(ProcessorPortSchema).optional(),
18739
+ isBuiltin: exports_external.boolean().default(true),
18740
+ pluginName: exports_external.string().optional()
18741
+ });
18742
+ ProcessorExecutionContextSchema = exports_external.object({
18743
+ jobId: exports_external.string(),
18744
+ stepId: exports_external.string(),
18745
+ tenantId: exports_external.string(),
18746
+ workflowId: exports_external.string(),
18747
+ workerId: exports_external.string().optional()
18748
+ });
18749
+ ((TraceStatus2) => {
18750
+ TraceStatus2["PENDING"] = "pending";
18751
+ TraceStatus2["RUNNING"] = "running";
18752
+ TraceStatus2["COMPLETED"] = "completed";
18753
+ TraceStatus2["FAILED"] = "failed";
18754
+ })(TraceStatus ||= {});
18755
+ });
18756
+
18757
+ // ../types/src/processor/execution.ts
18758
+ function asTuple(values) {
18759
+ return values;
18760
+ }
18761
+ var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
18762
+ var init_execution = __esm(() => {
18763
+ init_zod();
18764
+ WorkflowExecutionStatusValue = {
18765
+ CREATED: "created",
18766
+ PENDING: "pending",
18767
+ RUNNING: "running",
18768
+ WAITING: "waiting",
18769
+ COMPLETED: "completed",
18770
+ FAILED: "failed",
18771
+ CANCELLED: "cancelled"
18772
+ };
18773
+ WorkflowExecutionStatusSchema = exports_external.enum([
18774
+ WorkflowExecutionStatusValue.CREATED,
18775
+ WorkflowExecutionStatusValue.PENDING,
18776
+ WorkflowExecutionStatusValue.RUNNING,
18777
+ WorkflowExecutionStatusValue.WAITING,
18778
+ WorkflowExecutionStatusValue.COMPLETED,
18779
+ WorkflowExecutionStatusValue.FAILED,
18780
+ WorkflowExecutionStatusValue.CANCELLED
18781
+ ]);
18782
+ StepExecutionStatusValue = {
18783
+ PENDING: "pending",
18784
+ RUNNING: "running",
18785
+ SUCCESS: "success",
18786
+ FAILURE: "failure",
18787
+ WAITING: "waiting",
18788
+ SKIPPED: "skipped"
18789
+ };
18790
+ StepExecutionStatusSchema = exports_external.enum([
18791
+ StepExecutionStatusValue.PENDING,
18792
+ StepExecutionStatusValue.RUNNING,
18793
+ StepExecutionStatusValue.SUCCESS,
18794
+ StepExecutionStatusValue.FAILURE,
18795
+ StepExecutionStatusValue.WAITING,
18796
+ StepExecutionStatusValue.SKIPPED
18797
+ ]);
18798
+ TriggerTypeValue = {
18799
+ MANUAL: "manual",
18800
+ API: "api",
18801
+ WEBHOOK: "webhook",
18802
+ SCHEDULE: "schedule",
18803
+ EMAIL: "email",
18804
+ EVAL: "eval",
18805
+ CLI: "cli"
18806
+ };
18807
+ TriggerTypeSchema = exports_external.enum([
18808
+ TriggerTypeValue.MANUAL,
18809
+ TriggerTypeValue.API,
18810
+ TriggerTypeValue.WEBHOOK,
18811
+ TriggerTypeValue.SCHEDULE,
18812
+ TriggerTypeValue.EMAIL,
18813
+ TriggerTypeValue.EVAL,
18814
+ TriggerTypeValue.CLI
18815
+ ]);
18816
+ ExecutionTypeValue = {
18817
+ PROD: "prod",
18818
+ EVAL: "eval",
18819
+ PLAYGROUND: "playground"
18820
+ };
18821
+ ExecutionTypeSchema = exports_external.enum([
18822
+ ExecutionTypeValue.PROD,
18823
+ ExecutionTypeValue.EVAL,
18824
+ ExecutionTypeValue.PLAYGROUND
18825
+ ]);
18826
+ WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
18827
+ STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
18828
+ TRIGGER_TYPES = TriggerTypeSchema.options;
18829
+ EXECUTION_TYPES = ExecutionTypeSchema.options;
18830
+ });
18831
+
18832
+ // ../types/src/processor/configs/classify.ts
18833
+ var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
18834
+ var init_classify = __esm(() => {
18835
+ init_zod();
18836
+ ClassifyInputSchema = exports_external.object({
18837
+ content: exports_external.string().optional().describe("Text content to classify"),
18838
+ text: exports_external.string().optional().describe("Text content (alternative to content)")
18839
+ }).refine((data) => !!(data.content || data.text), {
18840
+ message: "Either content or text must be provided"
18841
+ });
18842
+ ClassifyLabelSchema = exports_external.object({
18843
+ name: exports_external.string().min(1).describe("Label value returned in output.label"),
18844
+ description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
18845
+ });
18846
+ ClassifyConfigSchema = exports_external.object({
18847
+ labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
18848
+ 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."),
18849
+ provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
18850
+ model: exports_external.string().optional().describe("Model override"),
18851
+ maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
18852
+ });
18853
+ ClassifyOutputSchema = exports_external.object({
18854
+ label: exports_external.string().describe("The selected label name"),
18855
+ confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
18856
+ reason: exports_external.string().describe("Short justification for the chosen label")
18857
+ });
18858
+ });
18859
+
18860
+ // ../types/src/parser/parser.ts
18861
+ function resolveEffectiveMimeType(filename, declaredMimeType) {
18862
+ const ext = filename.split(".").pop()?.toLowerCase();
18863
+ if (!ext)
18864
+ return declaredMimeType;
18865
+ const extensionMime = EXTENSION_TO_MIME[ext];
18866
+ return extensionMime ?? declaredMimeType;
18867
+ }
18868
+ function getParserCategory(mimeType) {
18869
+ const normalized = mimeType.toLowerCase().trim();
18870
+ if (ParserCategory.PLAINTEXT.includes(normalized)) {
18871
+ return "plaintext";
18872
+ }
18873
+ if (ParserCategory.OFFICE.includes(normalized)) {
18874
+ return "office";
18875
+ }
18876
+ if (ParserCategory.DOCUMENT.includes(normalized)) {
18877
+ return "document";
18878
+ }
18879
+ return null;
18880
+ }
18881
+ function requiresSpecializedParser(mimeType) {
18882
+ return getParserCategory(mimeType) === "document";
18883
+ }
18884
+ function getAllSupportedMimeTypes() {
18885
+ return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
18886
+ }
18887
+ function getSupportedFormatsLabel() {
18888
+ const allMimes = getAllSupportedMimeTypes();
18889
+ const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
18890
+ return labels.join(", ");
18891
+ }
18892
+ var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_LABEL;
18893
+ var init_parser = __esm(() => {
18894
+ init_zod();
18895
+ OFFICE_MIME_TYPES = [
18896
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
18897
+ "application/msword",
18898
+ "application/vnd.oasis.opendocument.text",
18899
+ "application/rtf",
18900
+ "text/rtf",
18901
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
18902
+ "application/vnd.ms-excel",
18903
+ "application/vnd.ms-excel.sheet.macroenabled.12",
18904
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12",
18905
+ "application/vnd.oasis.opendocument.spreadsheet",
18906
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
18907
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
18908
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12",
18909
+ "application/vnd.ms-powerpoint",
18910
+ "application/vnd.oasis.opendocument.presentation",
18911
+ "message/rfc822",
18912
+ "application/vnd.ms-outlook",
18913
+ "application/epub+zip"
18914
+ ];
18915
+ ParserCategory = {
18916
+ PLAINTEXT: [
18917
+ "text/plain",
18918
+ "text/markdown",
18919
+ "text/csv",
18920
+ "text/tab-separated-values",
18921
+ "text/html",
18922
+ "text/xml",
18923
+ "application/json",
18924
+ "application/x-yaml",
18925
+ "application/toml",
18926
+ "image/svg+xml",
18927
+ "text/x-rst",
18928
+ "text/x-org",
18929
+ "application/x-latex",
18930
+ "application/x-ipynb+json",
18931
+ "application/x-bibtex",
18932
+ "application/docbook+xml",
18933
+ "application/x-fictionbook+xml"
18934
+ ],
18935
+ OFFICE: [...OFFICE_MIME_TYPES],
18936
+ DOCUMENT: [
18937
+ "application/pdf",
18938
+ "image/png",
18939
+ "image/jpeg",
18940
+ "image/webp",
18941
+ "image/tiff",
18942
+ "image/gif",
18943
+ "image/bmp"
18944
+ ]
18945
+ };
18946
+ ParserTypeSchema = exports_external.enum([
18947
+ "plaintext",
18948
+ "office",
18949
+ "llm-vision",
18950
+ "ocr"
18951
+ ]);
18952
+ DocumentMetadataSchema = exports_external.object({
18953
+ filename: exports_external.string(),
18954
+ mimeType: exports_external.string(),
18955
+ size: exports_external.number().describe("File size in bytes"),
18956
+ storageRef: exports_external.string().optional().describe("Storage reference for the original file")
18957
+ });
18958
+ ParseUsageSchema = exports_external.object({
18959
+ pageCount: exports_external.number(),
18960
+ processingTimeMs: exports_external.number().optional()
18961
+ });
18962
+ CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
18963
+ PointSchema = exports_external.object({
18964
+ x: exports_external.number(),
18965
+ y: exports_external.number()
18966
+ });
18967
+ BoundingRegionSchema = exports_external.object({
18968
+ polygon: exports_external.array(PointSchema).min(3),
18969
+ unit: CoordinateUnitSchema,
18970
+ pageIndex: exports_external.number()
18971
+ });
18972
+ PositionedTextSchema = exports_external.object({
18973
+ text: exports_external.string(),
18974
+ confidence: exports_external.number().min(0).max(1).optional(),
18975
+ boundingRegion: BoundingRegionSchema.optional()
18976
+ });
18977
+ TableCellSchema = exports_external.object({
18978
+ content: exports_external.string(),
18979
+ rowIndex: exports_external.number(),
18980
+ columnIndex: exports_external.number(),
18981
+ rowSpan: exports_external.number().default(1),
18982
+ columnSpan: exports_external.number().default(1),
18983
+ boundingRegion: BoundingRegionSchema.optional()
18984
+ });
18985
+ ExtractedTableSchema = exports_external.object({
18986
+ cells: exports_external.array(TableCellSchema),
18987
+ rowCount: exports_external.number(),
18988
+ columnCount: exports_external.number(),
18989
+ boundingRegion: BoundingRegionSchema.optional()
18990
+ });
18991
+ LayoutElementTypeSchema = exports_external.enum([
18992
+ "paragraph",
18993
+ "title",
18994
+ "sectionHeading",
18995
+ "pageHeader",
18996
+ "pageFooter",
18997
+ "pageNumber",
18998
+ "footnote",
18999
+ "table",
19000
+ "figure",
19001
+ "formulaBlock"
19002
+ ]);
19003
+ LayoutElementSchema = exports_external.object({
19004
+ type: LayoutElementTypeSchema,
19005
+ content: exports_external.string(),
19006
+ table: ExtractedTableSchema.optional(),
19007
+ caption: exports_external.string().optional(),
19008
+ figureId: exports_external.string().optional(),
19009
+ boundingRegion: BoundingRegionSchema.optional()
19010
+ });
19011
+ PageResultSchema = exports_external.object({
19012
+ pageIndex: exports_external.number().describe("0-based page index"),
19013
+ text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
19014
+ pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
19015
+ layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
19016
+ words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
19017
+ lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
19018
+ tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
19019
+ width: exports_external.number().optional().describe("Page width"),
19020
+ height: exports_external.number().optional().describe("Page height"),
19021
+ unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
19022
+ confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
19023
+ });
19024
+ ParseResultSchema = exports_external.object({
19025
+ document: DocumentMetadataSchema,
19026
+ usage: ParseUsageSchema,
19027
+ pages: exports_external.array(PageResultSchema),
19028
+ text: exports_external.string().describe("Combined text from all pages"),
19029
+ parserType: ParserTypeSchema,
19030
+ parserVersion: exports_external.string().optional(),
19031
+ model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
19032
+ rawResponse: exports_external.unknown().optional()
19033
+ });
19034
+ ParseOptionsSchema = exports_external.object({
19035
+ outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
19036
+ ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
19037
+ includeWordPositions: exports_external.boolean().default(false),
19038
+ includeLinePositions: exports_external.boolean().default(false),
19039
+ extractTables: exports_external.boolean().default(true),
19040
+ provider: exports_external.string().optional().describe("LLM provider ID to use"),
19041
+ model: exports_external.string().optional(),
19042
+ maxConcurrency: exports_external.number().min(1).max(30).default(3),
19043
+ pagesPerBatch: exports_external.number().min(1).max(20).default(5),
19044
+ prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
19045
+ languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
19046
+ tenantId: exports_external.string().optional()
19047
+ });
19048
+ ParserInputSchema = exports_external.object({
19049
+ data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
19050
+ filename: exports_external.string(),
19051
+ mimeType: exports_external.string(),
19052
+ options: ParseOptionsSchema.optional()
19053
+ });
19054
+ EXTENSION_TO_MIME = {
19055
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
19056
+ doc: "application/msword",
19057
+ odt: "application/vnd.oasis.opendocument.text",
19058
+ rtf: "application/rtf",
19059
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19060
+ xls: "application/vnd.ms-excel",
19061
+ xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
19062
+ xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
19063
+ ods: "application/vnd.oasis.opendocument.spreadsheet",
19064
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
19065
+ ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
19066
+ pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
19067
+ ppt: "application/vnd.ms-powerpoint",
19068
+ odp: "application/vnd.oasis.opendocument.presentation",
19069
+ eml: "message/rfc822",
19070
+ msg: "application/vnd.ms-outlook",
19071
+ epub: "application/epub+zip",
19072
+ pdf: "application/pdf",
19073
+ png: "image/png",
19074
+ jpg: "image/jpeg",
19075
+ jpeg: "image/jpeg",
19076
+ webp: "image/webp",
19077
+ tiff: "image/tiff",
19078
+ tif: "image/tiff",
19079
+ gif: "image/gif",
19080
+ bmp: "image/bmp",
19081
+ svg: "image/svg+xml",
19082
+ txt: "text/plain",
19083
+ md: "text/markdown",
19084
+ markdown: "text/markdown",
19085
+ csv: "text/csv",
19086
+ tsv: "text/tab-separated-values",
19087
+ html: "text/html",
19088
+ htm: "text/html",
19089
+ xml: "text/xml",
19090
+ json: "application/json",
19091
+ yaml: "application/x-yaml",
19092
+ yml: "application/x-yaml",
19093
+ toml: "application/toml",
19094
+ rst: "text/x-rst",
19095
+ org: "text/x-org",
19096
+ tex: "application/x-latex",
19097
+ latex: "application/x-latex",
19098
+ ipynb: "application/x-ipynb+json",
19099
+ bib: "application/x-bibtex",
19100
+ dbk: "application/docbook+xml",
19101
+ docbook: "application/docbook+xml",
19102
+ fb2: "application/x-fictionbook+xml"
19103
+ };
19104
+ MIME_TO_LABEL = {
19105
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
19106
+ "application/msword": "DOC",
19107
+ "application/vnd.oasis.opendocument.text": "ODT",
19108
+ "application/rtf": "RTF",
19109
+ "text/rtf": "RTF",
19110
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
19111
+ "application/vnd.ms-excel": "XLS",
19112
+ "application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
19113
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
19114
+ "application/vnd.oasis.opendocument.spreadsheet": "ODS",
19115
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
19116
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
19117
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
19118
+ "application/vnd.ms-powerpoint": "PPT",
19119
+ "application/vnd.oasis.opendocument.presentation": "ODP",
19120
+ "message/rfc822": "EML",
19121
+ "application/vnd.ms-outlook": "MSG",
19122
+ "application/epub+zip": "EPUB",
19123
+ "application/pdf": "PDF",
19124
+ "image/png": "PNG",
19125
+ "image/jpeg": "JPEG",
19126
+ "image/webp": "WebP",
19127
+ "image/tiff": "TIFF",
19128
+ "image/gif": "GIF",
19129
+ "image/bmp": "BMP",
19130
+ "image/svg+xml": "SVG",
19131
+ "text/plain": "TXT",
19132
+ "text/markdown": "Markdown",
19133
+ "text/csv": "CSV",
19134
+ "text/tab-separated-values": "TSV",
19135
+ "text/html": "HTML",
19136
+ "text/xml": "XML",
19137
+ "application/json": "JSON",
19138
+ "application/x-yaml": "YAML",
19139
+ "application/toml": "TOML",
19140
+ "text/x-rst": "RST",
19141
+ "text/x-org": "Org",
19142
+ "application/x-latex": "LaTeX",
19143
+ "application/x-ipynb+json": "Jupyter",
19144
+ "application/x-bibtex": "BibTeX",
19145
+ "application/docbook+xml": "DocBook",
19146
+ "application/x-fictionbook+xml": "FB2"
19147
+ };
19148
+ });
19149
+
19150
+ // ../types/src/processor/configs/document-parser.ts
19151
+ function isFilePathDescriptor(input) {
19152
+ return FilePathDescriptorSchema.safeParse(input).success;
19153
+ }
19154
+ var FileIdInputSchema, LocalFileRefSchema, S3FileRefSchema, InlineFileRefSchema, FilePathDescriptorSchema, DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
19155
+ var init_document_parser = __esm(() => {
19156
+ init_zod();
19157
+ init_parser();
19158
+ FileIdInputSchema = exports_external.object({
19159
+ fileId: exports_external.string().describe("File ID from files table"),
19160
+ filename: exports_external.string().optional().describe("Original filename (for inline files)"),
19161
+ mimeType: exports_external.string().optional().describe("MIME type (for inline files)")
19162
+ });
19163
+ LocalFileRefSchema = exports_external.object({
19164
+ kind: exports_external.literal("local"),
19165
+ path: exports_external.string().describe("Absolute path to a file on disk"),
19166
+ filename: exports_external.string().describe("Original filename"),
19167
+ mimeType: exports_external.string().describe("MIME type of the file")
19168
+ });
19169
+ S3FileRefSchema = exports_external.object({
19170
+ kind: exports_external.literal("s3"),
19171
+ ref: exports_external.string().describe("Storage key (suffix-only, prefix added by adapter)"),
19172
+ filename: exports_external.string().describe("Original filename"),
19173
+ mimeType: exports_external.string().describe("MIME type of the file")
19174
+ });
19175
+ InlineFileRefSchema = exports_external.object({
19176
+ kind: exports_external.literal("inline"),
19177
+ base64: exports_external.string().describe("Base64-encoded file bytes"),
19178
+ filename: exports_external.string().describe("Original filename"),
19179
+ mimeType: exports_external.string().describe("MIME type of the file")
19180
+ });
19181
+ FilePathDescriptorSchema = exports_external.discriminatedUnion("kind", [
19182
+ LocalFileRefSchema,
19183
+ S3FileRefSchema,
19184
+ InlineFileRefSchema
19185
+ ]);
19186
+ DocumentParserInputSchema = exports_external.union([FileIdInputSchema, FilePathDescriptorSchema]);
19187
+ DocumentParserOutputSchema = ParseResultSchema;
19188
+ DocumentParserConfigSchema = exports_external.object({
19189
+ ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
19190
+ llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
19191
+ maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
19192
+ pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
19193
+ prompt: exports_external.string().optional().describe("Custom extraction prompt"),
19194
+ nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
19195
+ languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
19196
+ 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.")
19197
+ }).prefault({});
19198
+ });
19199
+
19200
+ // ../types/src/processor/configs/extract.ts
19201
+ var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
19202
+ var init_extract = __esm(() => {
19203
+ init_zod();
19204
+ ExtractInputSchema = exports_external.object({
19205
+ content: exports_external.string().optional().describe("Text content to extract from"),
19206
+ text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
19207
+ contentType: exports_external.enum(["text", "image"]).default("text"),
19208
+ imageData: exports_external.string().optional(),
19209
+ imageMimeType: exports_external.string().optional()
19210
+ }).refine((data) => data.content || data.text, {
19211
+ message: "Either content or text must be provided"
19212
+ });
19213
+ ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
19214
+ ExtractConfigSchema = exports_external.object({
19215
+ schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
19216
+ prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
19217
+ provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
19218
+ model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
19219
+ maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit.")
19220
+ });
19221
+ });
19222
+
19223
+ // ../types/src/processor/configs/merge.ts
19224
+ var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
19225
+ var init_merge = __esm(() => {
19226
+ init_zod();
19227
+ MergeConfigSchema = exports_external.object({
19228
+ preservePortNames: exports_external.boolean().default(true),
19229
+ outputKey: exports_external.string().optional()
19230
+ });
19231
+ MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
19232
+ MergeOutputSchema = exports_external.object({
19233
+ items: exports_external.array(exports_external.unknown()),
19234
+ count: exports_external.number(),
19235
+ merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
19236
+ });
19237
+ });
19238
+
19239
+ // ../types/src/processor/configs/pdf-embedder.ts
19240
+ var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
19241
+ var init_pdf_embedder = __esm(() => {
19242
+ init_zod();
19243
+ init_parser();
19244
+ PdfEmbedderInputSchema = exports_external.object({
19245
+ fileId: exports_external.string().describe("File ID from files table"),
19246
+ parseResult: exports_external.object({
19247
+ pages: exports_external.array(PageResultSchema),
19248
+ text: exports_external.string().optional()
19249
+ }).describe("Parse result from ai.parse step (must include word positions)")
19250
+ });
19251
+ PdfEmbedderOutputSchema = exports_external.object({
19252
+ fileId: exports_external.string().describe("File ID from files table"),
19253
+ pageCount: exports_external.number().describe("Number of pages in the output PDF"),
19254
+ wordCount: exports_external.number().describe("Number of words embedded"),
19255
+ text: exports_external.string().describe("Extracted text (from parse step)")
19256
+ });
19257
+ PdfEmbedderConfigSchema = exports_external.object({
19258
+ outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
19259
+ 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")
19260
+ }).prefault({});
19261
+ });
19262
+
19263
+ // ../types/src/processor/configs/split.ts
19264
+ var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema, SplitOutputSchema;
19265
+ var init_split = __esm(() => {
19266
+ init_zod();
19267
+ SplitInputSchema = exports_external.object({
19268
+ pages: exports_external.array(exports_external.object({
19269
+ pageIndex: exports_external.number().describe("0-based page index"),
19270
+ text: exports_external.string().describe("Extracted text for this page"),
19271
+ pageName: exports_external.string().optional()
19272
+ })).min(1).describe("Per-page parsed content from a document parser")
19273
+ }).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
19274
+ SplitConfigSchema = exports_external.object({
19275
+ sections: exports_external.array(exports_external.object({
19276
+ name: exports_external.string().min(1).describe("Stable id for the section"),
19277
+ 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."),
19278
+ 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").'),
19279
+ 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.')
19280
+ })).min(1),
19281
+ rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
19282
+ 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.'),
19283
+ 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.")
19284
+ });
19285
+ 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.");
19286
+ SplitOutputSchema = exports_external.object({
19287
+ splits: exports_external.array(exports_external.object({
19288
+ name: exports_external.string(),
19289
+ page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
19290
+ confidence: ConfidenceLevelSchema.describe("LLM confidence at the start anchor: low | medium | high."),
19291
+ notes: exports_external.string(),
19292
+ evidence: exports_external.object({
19293
+ start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
19294
+ start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
19295
+ }).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
19296
+ end_evidence: exports_external.object({
19297
+ end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
19298
+ confidence: ConfidenceLevelSchema,
19299
+ 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.")
19300
+ }).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)."),
19301
+ text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
19302
+ pages: exports_external.array(exports_external.object({
19303
+ pageIndex: exports_external.number().int(),
19304
+ text: exports_external.string(),
19305
+ pageName: exports_external.string().optional(),
19306
+ source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
19307
+ })).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."),
19308
+ pages_anchored: exports_external.array(exports_external.number().int()),
19309
+ pages_inferred: exports_external.array(exports_external.number().int())
19310
+ }))
19311
+ });
19312
+ });
19313
+
19314
+ // ../types/src/processor/configs/template.ts
19315
+ var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
19316
+ var init_template = __esm(() => {
19317
+ init_zod();
19318
+ TemplateInputSchema = exports_external.object({
19319
+ data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
19320
+ });
19321
+ TemplateOutputSchema = exports_external.object({
19322
+ fileId: exports_external.string().describe("File ID from files table")
19323
+ });
19324
+ TemplateConfigSchema = exports_external.object({
19325
+ templateId: exports_external.string().describe("ID of the template from templates table"),
19326
+ outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
19327
+ highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
19328
+ notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
19329
+ });
19330
+ });
19331
+
19332
+ // ../types/src/processor/configs/xlsx-to-json.ts
19333
+ var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
19334
+ var init_xlsx_to_json = __esm(() => {
19335
+ init_zod();
19336
+ init_document_parser();
19337
+ XlsxToJsonInputSchema = exports_external.union([FileIdInputSchema, FilePathDescriptorSchema]);
19338
+ XlsxToJsonOutputSchema = exports_external.object({
19339
+ rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
19340
+ fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
19341
+ });
19342
+ XlsxToJsonConfigSchema = exports_external.object({
19343
+ sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
19344
+ outputCsv: exports_external.boolean().default(false).optional(),
19345
+ outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
19346
+ });
19347
+ });
19348
+
19349
+ // ../types/src/processor/configs/react-hook-form.ts
19350
+ function extractFieldMetadata(schema) {
19351
+ const fields = [];
19352
+ let inner = schema;
19353
+ while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
19354
+ inner = inner.unwrap();
19355
+ }
19356
+ if (inner instanceof exports_external.ZodObject) {
19357
+ for (const [name, fieldSchema] of Object.entries(inner.shape)) {
19358
+ fields.push(extractSingleFieldMetadata(name, fieldSchema));
19359
+ }
19360
+ }
19361
+ return fields;
19362
+ }
19363
+ function extractSingleFieldMetadata(name, schema) {
19364
+ let current = schema;
19365
+ let required2 = true;
19366
+ let defaultValue = undefined;
19367
+ let description = current.description;
19368
+ while (true) {
19369
+ if (current instanceof exports_external.ZodOptional) {
19370
+ required2 = false;
19371
+ current = current.unwrap();
19372
+ } else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
19373
+ defaultValue = current._def.defaultValue;
19374
+ current = current.unwrap();
19375
+ } else {
19376
+ break;
19377
+ }
19378
+ description ??= current.description;
19379
+ }
19380
+ const base = { name, type: "unknown", required: required2, description, defaultValue };
19381
+ if (current instanceof exports_external.ZodString)
19382
+ return { ...base, type: "string" };
19383
+ if (current instanceof exports_external.ZodNumber) {
19384
+ let min;
19385
+ let max;
19386
+ for (const c of current._def.checks ?? []) {
19387
+ const def = c._zod.def;
19388
+ if (def.check === "greater_than")
19389
+ min = def.value;
19390
+ if (def.check === "less_than")
19391
+ max = def.value;
19392
+ }
19393
+ return { ...base, type: "number", min, max };
19394
+ }
19395
+ if (current instanceof exports_external.ZodBoolean)
19396
+ return { ...base, type: "boolean" };
19397
+ if (current instanceof exports_external.ZodEnum) {
19398
+ return { ...base, type: "enum", enumValues: current.options };
19399
+ }
19400
+ if (current instanceof exports_external.ZodArray)
19401
+ return { ...base, type: "array" };
19402
+ if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
19403
+ return { ...base, type: "object" };
19404
+ }
19405
+ return base;
19406
+ }
19407
+ function getConfigFieldMetadata(processorId) {
19408
+ const schema = getConfigSchema(processorId);
19409
+ if (!schema)
19410
+ return;
19411
+ return extractFieldMetadata(schema);
19412
+ }
19413
+ function getConfigDefaults(processorId) {
19414
+ const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
19415
+ if (!schema)
19416
+ return {};
19417
+ try {
19418
+ const result = schema.safeParse({});
19419
+ if (result.success) {
19420
+ return result.data;
19421
+ }
19422
+ } catch {}
19423
+ const fields = extractFieldMetadata(schema);
19424
+ const defaults = {};
19425
+ for (const field of fields) {
19426
+ if (field.defaultValue !== undefined) {
19427
+ defaults[field.name] = field.defaultValue;
19428
+ }
19429
+ }
19430
+ return defaults;
19431
+ }
19432
+ function validateConfig(processorId, config2) {
19433
+ const schema = getConfigSchema(processorId);
19434
+ if (!schema) {
19435
+ return { valid: true, errors: {} };
19436
+ }
19437
+ const result = schema.safeParse(config2);
19438
+ if (result.success) {
19439
+ return { valid: true, errors: {} };
19440
+ }
19441
+ const errors3 = {};
19442
+ for (const issue2 of result.error.issues) {
19443
+ const path = issue2.path.join(".");
19444
+ errors3[path] = issue2.message;
19445
+ }
19446
+ return { valid: false, errors: errors3 };
19447
+ }
19448
+ var init_react_hook_form = __esm(() => {
19449
+ init_zod();
19450
+ init_configs();
19451
+ });
19452
+
19453
+ // ../types/src/processor/configs/index.ts
19454
+ function getProcessorSchemas(processorId) {
19455
+ return PROCESSOR_SCHEMAS[processorId];
19456
+ }
19457
+ function getConfigSchema(processorId) {
19458
+ return PROCESSOR_SCHEMAS[processorId]?.configSchema;
19459
+ }
19460
+ function getAllProcessorJsonSchemas() {
19461
+ return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
19462
+ id: p.id,
19463
+ inputSchema: toJsonSchema(p.inputSchema),
19464
+ outputSchema: toJsonSchema(p.outputSchema),
19465
+ configSchema: toJsonSchema(p.configSchema)
19466
+ }));
19467
+ }
19468
+ function listProcessorIds() {
19469
+ return Object.keys(PROCESSOR_SCHEMAS);
19470
+ }
19471
+ var PROCESSOR_SCHEMAS;
19472
+ var init_configs = __esm(() => {
19473
+ init_common();
19474
+ init_ids();
19475
+ init_classify();
19476
+ init_document_parser();
19477
+ init_extract();
19478
+ init_merge();
19479
+ init_pdf_embedder();
19480
+ init_split();
19481
+ init_template();
19482
+ init_xlsx_to_json();
19483
+ init_react_hook_form();
19484
+ init_classify();
19485
+ init_document_parser();
19486
+ init_extract();
19487
+ init_merge();
19488
+ init_pdf_embedder();
19489
+ init_split();
19490
+ init_template();
19491
+ init_xlsx_to_json();
19492
+ PROCESSOR_SCHEMAS = {
19493
+ [PROCESSOR_IDS.EXTRACT]: {
19494
+ id: PROCESSOR_IDS.EXTRACT,
19495
+ inputSchema: ExtractInputSchema,
19496
+ outputSchema: ExtractOutputSchema,
19497
+ configSchema: ExtractConfigSchema
19498
+ },
19499
+ [PROCESSOR_IDS.DOCUMENT_PARSER]: {
19500
+ id: PROCESSOR_IDS.DOCUMENT_PARSER,
19501
+ inputSchema: DocumentParserInputSchema,
19502
+ outputSchema: DocumentParserOutputSchema,
19503
+ configSchema: DocumentParserConfigSchema
19504
+ },
19505
+ [PROCESSOR_IDS.MERGE]: {
19506
+ id: PROCESSOR_IDS.MERGE,
19507
+ inputSchema: MergeInputSchema,
19508
+ outputSchema: MergeOutputSchema,
19509
+ configSchema: MergeConfigSchema
19510
+ },
19511
+ [PROCESSOR_IDS.TEMPLATE]: {
19512
+ id: PROCESSOR_IDS.TEMPLATE,
19513
+ inputSchema: TemplateInputSchema,
19514
+ outputSchema: TemplateOutputSchema,
19515
+ configSchema: TemplateConfigSchema
19516
+ },
19517
+ [PROCESSOR_IDS.PDF_EMBEDDER]: {
19518
+ id: PROCESSOR_IDS.PDF_EMBEDDER,
19519
+ inputSchema: PdfEmbedderInputSchema,
19520
+ outputSchema: PdfEmbedderOutputSchema,
19521
+ configSchema: PdfEmbedderConfigSchema
19522
+ },
19523
+ [PROCESSOR_IDS.SPLIT]: {
19524
+ id: PROCESSOR_IDS.SPLIT,
19525
+ inputSchema: SplitInputSchema,
19526
+ outputSchema: SplitOutputSchema,
19527
+ configSchema: SplitConfigSchema
19528
+ },
19529
+ [PROCESSOR_IDS.CLASSIFY]: {
19530
+ id: PROCESSOR_IDS.CLASSIFY,
19531
+ inputSchema: ClassifyInputSchema,
19532
+ outputSchema: ClassifyOutputSchema,
19533
+ configSchema: ClassifyConfigSchema
19534
+ },
19535
+ [PROCESSOR_IDS.XLSX_TO_JSON]: {
19536
+ id: PROCESSOR_IDS.XLSX_TO_JSON,
19537
+ inputSchema: XlsxToJsonInputSchema,
19538
+ outputSchema: XlsxToJsonOutputSchema,
19539
+ configSchema: XlsxToJsonConfigSchema
19540
+ }
19541
+ };
19542
+ });
17085
19543
 
17086
19544
  // ../types/src/processor/index.ts
17087
- var init_processor = () => {};
19545
+ var init_processor2 = __esm(() => {
19546
+ init_processor();
19547
+ init_execution();
19548
+ init_configs();
19549
+ });
17088
19550
 
17089
19551
  // ../types/src/parser/index.ts
17090
- var init_parser = () => {};
19552
+ var init_parser2 = __esm(() => {
19553
+ init_parser();
19554
+ });
17091
19555
 
17092
19556
  // ../types/src/otel/semantic-conventions.ts
17093
19557
  function mapLLMAttributes(attrs) {
@@ -17389,7 +19853,7 @@ var init_run_expand = __esm(() => {
17389
19853
  observability: "use `expand=debug`",
17390
19854
  feedback: "use `expand=execution` — feedback lives at `execution.feedback` (agent runs)",
17391
19855
  steps: "use `expand=execution` — steps live at `execution.steps` (workflow runs)",
17392
- definition: "use `GET /api/v1/runs/{id}/definition`",
19856
+ definition: "use `expand=execution` — definitionSnapshot lives at `execution.definitionSnapshot` (workflow runs)",
17393
19857
  files: "downloadable output refs live at top-level `files` on completed detail responses; `expand=execution` adds `execution.files.output` metadata for agent runs",
17394
19858
  expected: "use `expand=execution` — expected output lives at `execution.expected`",
17395
19859
  trace: "trace id: `expand=debug` (`debug.traceId`); trace files: `GET /api/v1/runs/{id}/artifacts`",
@@ -20407,7 +22871,7 @@ var require_data = __commonJS((exports, module) => {
20407
22871
  });
20408
22872
 
20409
22873
  // ../../node_modules/fast-uri/lib/utils.js
20410
- var require_utils = __commonJS((exports, module) => {
22874
+ var require_utils3 = __commonJS((exports, module) => {
20411
22875
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
20412
22876
  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);
20413
22877
  function stringArrayToHexStripped(input) {
@@ -20663,7 +23127,7 @@ var require_utils = __commonJS((exports, module) => {
20663
23127
 
20664
23128
  // ../../node_modules/fast-uri/lib/schemes.js
20665
23129
  var require_schemes = __commonJS((exports, module) => {
20666
- var { isUUID } = require_utils();
23130
+ var { isUUID } = require_utils3();
20667
23131
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
20668
23132
  var supportedSchemeNames = [
20669
23133
  "http",
@@ -20837,7 +23301,7 @@ var require_schemes = __commonJS((exports, module) => {
20837
23301
 
20838
23302
  // ../../node_modules/fast-uri/index.js
20839
23303
  var require_fast_uri = __commonJS((exports, module) => {
20840
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
23304
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
20841
23305
  var { SCHEMES, getSchemeHandler } = require_schemes();
20842
23306
  function normalize(uri, options) {
20843
23307
  if (typeof uri === "string") {
@@ -23247,7 +25711,7 @@ var require_draft7 = __commonJS((exports) => {
23247
25711
  });
23248
25712
 
23249
25713
  // ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
23250
- var require_types = __commonJS((exports) => {
25714
+ var require_types2 = __commonJS((exports) => {
23251
25715
  Object.defineProperty(exports, "__esModule", { value: true });
23252
25716
  exports.DiscrError = undefined;
23253
25717
  var DiscrError;
@@ -23261,7 +25725,7 @@ var require_types = __commonJS((exports) => {
23261
25725
  var require_discriminator = __commonJS((exports) => {
23262
25726
  Object.defineProperty(exports, "__esModule", { value: true });
23263
25727
  var codegen_1 = require_codegen();
23264
- var types_1 = require_types();
25728
+ var types_1 = require_types2();
23265
25729
  var compile_1 = require_compile();
23266
25730
  var ref_error_1 = require_ref_error();
23267
25731
  var util_1 = require_util();
@@ -24194,24 +26658,6 @@ var init_validation = __esm(() => {
24194
26658
  init_workspace_schema();
24195
26659
  });
24196
26660
 
24197
- // ../types/src/core/common.ts
24198
- function toJsonSchema2(schema) {
24199
- return exports_external.toJSONSchema(schema, { target: "draft-7" });
24200
- }
24201
- var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
24202
- var init_common = __esm(() => {
24203
- init_zod();
24204
- TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
24205
- return typeof val === "string" ? new Date(val) : val;
24206
- });
24207
- JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
24208
- BaseEntitySchema2 = exports_external.object({
24209
- id: exports_external.string(),
24210
- createdAt: TimestampSchema2.optional(),
24211
- updatedAt: TimestampSchema2.optional()
24212
- });
24213
- });
24214
-
24215
26661
  // ../../node_modules/@babel/parser/lib/index.js
24216
26662
  var require_lib = __commonJS((exports) => {
24217
26663
  Object.defineProperty(exports, "__esModule", {
@@ -24625,12 +27071,12 @@ var require_lib = __commonJS((exports) => {
24625
27071
  }
24626
27072
  const ParseErrorConstructors = {};
24627
27073
  for (const reasonCode of Object.keys(argument)) {
24628
- const template = argument[reasonCode];
24629
- const _ref = typeof template === "string" ? {
24630
- message: () => template
24631
- } : typeof template === "function" ? {
24632
- message: template
24633
- } : template, {
27074
+ const template2 = argument[reasonCode];
27075
+ const _ref = typeof template2 === "string" ? {
27076
+ message: () => template2
27077
+ } : typeof template2 === "function" ? {
27078
+ message: template2
27079
+ } : template2, {
24634
27080
  message
24635
27081
  } = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
24636
27082
  const toMessage = typeof message === "string" ? () => message : message;
@@ -39103,7 +41549,7 @@ var require_keywords = __commonJS((exports) => {
39103
41549
  });
39104
41550
 
39105
41551
  // ../../node_modules/sucrase/dist/parser/tokenizer/types.js
39106
- var require_types2 = __commonJS((exports) => {
41552
+ var require_types3 = __commonJS((exports) => {
39107
41553
  Object.defineProperty(exports, "__esModule", { value: true });
39108
41554
  var TokenType;
39109
41555
  (function(TokenType2) {
@@ -39167,8 +41613,8 @@ var require_types2 = __commonJS((exports) => {
39167
41613
  TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
39168
41614
  const arrow = 22528;
39169
41615
  TokenType2[TokenType2["arrow"] = arrow] = "arrow";
39170
- const template = 23552;
39171
- TokenType2[TokenType2["template"] = template] = "template";
41616
+ const template2 = 23552;
41617
+ TokenType2[TokenType2["template"] = template2] = "template";
39172
41618
  const ellipsis = 24576;
39173
41619
  TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
39174
41620
  const backQuote = 25600;
@@ -39587,7 +42033,7 @@ var require_types2 = __commonJS((exports) => {
39587
42033
  var require_state = __commonJS((exports) => {
39588
42034
  Object.defineProperty(exports, "__esModule", { value: true });
39589
42035
  var _keywords = require_keywords();
39590
- var _types = require_types2();
42036
+ var _types = require_types3();
39591
42037
 
39592
42038
  class Scope {
39593
42039
  constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
@@ -39973,7 +42419,7 @@ var require_base = __commonJS((exports) => {
39973
42419
  var require_util2 = __commonJS((exports) => {
39974
42420
  Object.defineProperty(exports, "__esModule", { value: true });
39975
42421
  var _index = require_tokenizer();
39976
- var _types = require_types2();
42422
+ var _types = require_types3();
39977
42423
  var _charcodes = require_charcodes();
39978
42424
  var _base = require_base();
39979
42425
  function isContextual(contextualKeyword) {
@@ -40135,7 +42581,7 @@ var require_identifier = __commonJS((exports) => {
40135
42581
  var require_readWordTree = __commonJS((exports) => {
40136
42582
  Object.defineProperty(exports, "__esModule", { value: true });
40137
42583
  var _keywords = require_keywords();
40138
- var _types = require_types2();
42584
+ var _types = require_types3();
40139
42585
  var READ_WORD_TREE = new Int32Array([
40140
42586
  -1,
40141
42587
  27,
@@ -49113,7 +51559,7 @@ var require_readWord = __commonJS((exports) => {
49113
51559
  var _identifier = require_identifier();
49114
51560
  var _index = require_tokenizer();
49115
51561
  var _readWordTree = require_readWordTree();
49116
- var _types = require_types2();
51562
+ var _types = require_types3();
49117
51563
  function readWord() {
49118
51564
  let treePos = 0;
49119
51565
  let code = 0;
@@ -49179,7 +51625,7 @@ var require_tokenizer = __commonJS((exports) => {
49179
51625
  var _keywords = require_keywords();
49180
51626
  var _readWord = require_readWord();
49181
51627
  var _readWord2 = _interopRequireDefault(_readWord);
49182
- var _types = require_types2();
51628
+ var _types = require_types3();
49183
51629
  var IdentifierRole;
49184
51630
  (function(IdentifierRole2) {
49185
51631
  const Access = 0;
@@ -49896,7 +52342,7 @@ var require_tokenizer = __commonJS((exports) => {
49896
52342
  // ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
49897
52343
  var require_getImportExportSpecifierInfo = __commonJS((exports) => {
49898
52344
  Object.defineProperty(exports, "__esModule", { value: true });
49899
- var _types = require_types2();
52345
+ var _types = require_types3();
49900
52346
  function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
49901
52347
  let endIndex = index + 1;
49902
52348
  if (isSpecifierEnd(tokens, endIndex)) {
@@ -50249,7 +52695,7 @@ var require_JSXTransformer = __commonJS((exports) => {
50249
52695
  var _xhtml = require_xhtml();
50250
52696
  var _xhtml2 = _interopRequireDefault(_xhtml);
50251
52697
  var _tokenizer = require_tokenizer();
50252
- var _types = require_types2();
52698
+ var _types = require_types3();
50253
52699
  var _charcodes = require_charcodes();
50254
52700
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
50255
52701
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -50753,7 +53199,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
50753
53199
  return obj && obj.__esModule ? obj : { default: obj };
50754
53200
  }
50755
53201
  var _tokenizer = require_tokenizer();
50756
- var _types = require_types2();
53202
+ var _types = require_types3();
50757
53203
  var _JSXTransformer = require_JSXTransformer();
50758
53204
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
50759
53205
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -50792,7 +53238,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
50792
53238
  }
50793
53239
  var _tokenizer = require_tokenizer();
50794
53240
  var _keywords = require_keywords();
50795
- var _types = require_types2();
53241
+ var _types = require_types3();
50796
53242
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
50797
53243
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
50798
53244
  var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
@@ -52827,7 +55273,7 @@ var require_HelperManager = __commonJS((exports) => {
52827
55273
  var require_identifyShadowedGlobals = __commonJS((exports) => {
52828
55274
  Object.defineProperty(exports, "__esModule", { value: true });
52829
55275
  var _tokenizer = require_tokenizer();
52830
- var _types = require_types2();
55276
+ var _types = require_types3();
52831
55277
  function identifyShadowedGlobals(tokens, scopes, globalNames) {
52832
55278
  if (!hasShadowedGlobals(tokens, globalNames)) {
52833
55279
  return;
@@ -52892,7 +55338,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
52892
55338
  // ../../node_modules/sucrase/dist/util/getIdentifierNames.js
52893
55339
  var require_getIdentifierNames = __commonJS((exports) => {
52894
55340
  Object.defineProperty(exports, "__esModule", { value: true });
52895
- var _types = require_types2();
55341
+ var _types = require_types3();
52896
55342
  function getIdentifierNames(code, tokens) {
52897
55343
  const names = [];
52898
55344
  for (const token of tokens) {
@@ -53068,7 +55514,7 @@ var require_util3 = __commonJS((exports) => {
53068
55514
  });
53069
55515
 
53070
55516
  // ../../node_modules/ts-interface-checker/dist/types.js
53071
- var require_types3 = __commonJS((exports) => {
55517
+ var require_types4 = __commonJS((exports) => {
53072
55518
  var __extends = exports && exports.__extends || function() {
53073
55519
  var extendStatics = function(d, b) {
53074
55520
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -53668,9 +56114,9 @@ var require_dist2 = __commonJS((exports) => {
53668
56114
  };
53669
56115
  Object.defineProperty(exports, "__esModule", { value: true });
53670
56116
  exports.Checker = exports.createCheckers = undefined;
53671
- var types_1 = require_types3();
56117
+ var types_1 = require_types4();
53672
56118
  var util_1 = require_util3();
53673
- var types_2 = require_types3();
56119
+ var types_2 = require_types4();
53674
56120
  Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
53675
56121
  return types_2.TArray;
53676
56122
  } });
@@ -53952,7 +56398,7 @@ var require_lval = __commonJS((exports) => {
53952
56398
  var _typescript = require_typescript();
53953
56399
  var _index = require_tokenizer();
53954
56400
  var _keywords = require_keywords();
53955
- var _types = require_types2();
56401
+ var _types = require_types3();
53956
56402
  var _base = require_base();
53957
56403
  var _expression = require_expression();
53958
56404
  var _util = require_util2();
@@ -54084,7 +56530,7 @@ var require_typescript = __commonJS((exports) => {
54084
56530
  Object.defineProperty(exports, "__esModule", { value: true });
54085
56531
  var _index = require_tokenizer();
54086
56532
  var _keywords = require_keywords();
54087
- var _types = require_types2();
56533
+ var _types = require_types3();
54088
56534
  var _base = require_base();
54089
56535
  var _expression = require_expression();
54090
56536
  var _lval = require_lval();
@@ -55346,7 +57792,7 @@ var require_typescript = __commonJS((exports) => {
55346
57792
  var require_jsx = __commonJS((exports) => {
55347
57793
  Object.defineProperty(exports, "__esModule", { value: true });
55348
57794
  var _index = require_tokenizer();
55349
- var _types = require_types2();
57795
+ var _types = require_types3();
55350
57796
  var _base = require_base();
55351
57797
  var _expression = require_expression();
55352
57798
  var _util = require_util2();
@@ -55609,10 +58055,10 @@ var require_jsx = __commonJS((exports) => {
55609
58055
  });
55610
58056
 
55611
58057
  // ../../node_modules/sucrase/dist/parser/plugins/types.js
55612
- var require_types4 = __commonJS((exports) => {
58058
+ var require_types5 = __commonJS((exports) => {
55613
58059
  Object.defineProperty(exports, "__esModule", { value: true });
55614
58060
  var _index = require_tokenizer();
55615
- var _types = require_types2();
58061
+ var _types = require_types3();
55616
58062
  var _base = require_base();
55617
58063
  var _expression = require_expression();
55618
58064
  var _flow = require_flow();
@@ -55645,12 +58091,12 @@ var require_expression = __commonJS((exports) => {
55645
58091
  Object.defineProperty(exports, "__esModule", { value: true });
55646
58092
  var _flow = require_flow();
55647
58093
  var _index = require_jsx();
55648
- var _types = require_types4();
58094
+ var _types = require_types5();
55649
58095
  var _typescript = require_typescript();
55650
58096
  var _index3 = require_tokenizer();
55651
58097
  var _keywords = require_keywords();
55652
58098
  var _state = require_state();
55653
- var _types3 = require_types2();
58099
+ var _types3 = require_types3();
55654
58100
  var _charcodes = require_charcodes();
55655
58101
  var _identifier = require_identifier();
55656
58102
  var _base = require_base();
@@ -56366,7 +58812,7 @@ var require_flow = __commonJS((exports) => {
56366
58812
  Object.defineProperty(exports, "__esModule", { value: true });
56367
58813
  var _index = require_tokenizer();
56368
58814
  var _keywords = require_keywords();
56369
- var _types = require_types2();
58815
+ var _types = require_types3();
56370
58816
  var _base = require_base();
56371
58817
  var _expression = require_expression();
56372
58818
  var _statement = require_statement();
@@ -57241,7 +59687,7 @@ var require_statement = __commonJS((exports) => {
57241
59687
  var _tokenizer = require_tokenizer();
57242
59688
  var _keywords = require_keywords();
57243
59689
  var _state = require_state();
57244
- var _types = require_types2();
59690
+ var _types = require_types3();
57245
59691
  var _charcodes = require_charcodes();
57246
59692
  var _base = require_base();
57247
59693
  var _expression = require_expression();
@@ -58276,7 +60722,7 @@ var require_TokenProcessor = __commonJS((exports) => {
58276
60722
  function _interopRequireDefault(obj) {
58277
60723
  return obj && obj.__esModule ? obj : { default: obj };
58278
60724
  }
58279
- var _types = require_types2();
60725
+ var _types = require_types3();
58280
60726
  var _isAsyncOperation = require_isAsyncOperation();
58281
60727
  var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
58282
60728
 
@@ -58534,7 +60980,7 @@ var require_TokenProcessor = __commonJS((exports) => {
58534
60980
  var require_getClassInfo = __commonJS((exports) => {
58535
60981
  Object.defineProperty(exports, "__esModule", { value: true });
58536
60982
  var _keywords = require_keywords();
58537
- var _types = require_types2();
60983
+ var _types = require_types3();
58538
60984
  function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
58539
60985
  const snapshot = tokens.snapshot();
58540
60986
  const headerInfo = processClassHeader(tokens);
@@ -58772,7 +61218,7 @@ var require_getClassInfo = __commonJS((exports) => {
58772
61218
  // ../../node_modules/sucrase/dist/util/elideImportEquals.js
58773
61219
  var require_elideImportEquals = __commonJS((exports) => {
58774
61220
  Object.defineProperty(exports, "__esModule", { value: true });
58775
- var _types = require_types2();
61221
+ var _types = require_types3();
58776
61222
  function elideImportEquals(tokens) {
58777
61223
  tokens.removeInitialToken();
58778
61224
  tokens.removeToken();
@@ -58796,7 +61242,7 @@ var require_elideImportEquals = __commonJS((exports) => {
58796
61242
  var require_getDeclarationInfo = __commonJS((exports) => {
58797
61243
  Object.defineProperty(exports, "__esModule", { value: true });
58798
61244
  var _tokenizer = require_tokenizer();
58799
- var _types = require_types2();
61245
+ var _types = require_types3();
58800
61246
  var EMPTY_DECLARATION_INFO = {
58801
61247
  typeDeclarations: new Set,
58802
61248
  valueDeclarations: new Set
@@ -58824,7 +61270,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
58824
61270
  var require_isExportFrom = __commonJS((exports) => {
58825
61271
  Object.defineProperty(exports, "__esModule", { value: true });
58826
61272
  var _keywords = require_keywords();
58827
- var _types = require_types2();
61273
+ var _types = require_types3();
58828
61274
  function isExportFrom(tokens) {
58829
61275
  let closeBraceIndex = tokens.currentIndex();
58830
61276
  while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
@@ -58839,7 +61285,7 @@ var require_isExportFrom = __commonJS((exports) => {
58839
61285
  var require_removeMaybeImportAttributes = __commonJS((exports) => {
58840
61286
  Object.defineProperty(exports, "__esModule", { value: true });
58841
61287
  var _keywords = require_keywords();
58842
- var _types = require_types2();
61288
+ var _types = require_types3();
58843
61289
  function removeMaybeImportAttributes(tokens) {
58844
61290
  if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
58845
61291
  tokens.removeToken();
@@ -58854,7 +61300,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
58854
61300
  // ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
58855
61301
  var require_shouldElideDefaultExport = __commonJS((exports) => {
58856
61302
  Object.defineProperty(exports, "__esModule", { value: true });
58857
- var _types = require_types2();
61303
+ var _types = require_types3();
58858
61304
  function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
58859
61305
  if (!isTypeScriptTransformEnabled || keepUnusedImports) {
58860
61306
  return false;
@@ -58885,7 +61331,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
58885
61331
  }
58886
61332
  var _tokenizer = require_tokenizer();
58887
61333
  var _keywords = require_keywords();
58888
- var _types = require_types2();
61334
+ var _types = require_types3();
58889
61335
  var _elideImportEquals = require_elideImportEquals();
58890
61336
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
58891
61337
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -59527,7 +61973,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
59527
61973
  return obj && obj.__esModule ? obj : { default: obj };
59528
61974
  }
59529
61975
  var _keywords = require_keywords();
59530
- var _types = require_types2();
61976
+ var _types = require_types3();
59531
61977
  var _elideImportEquals = require_elideImportEquals();
59532
61978
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
59533
61979
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -59797,7 +62243,7 @@ var require_FlowTransformer = __commonJS((exports) => {
59797
62243
  return obj && obj.__esModule ? obj : { default: obj };
59798
62244
  }
59799
62245
  var _keywords = require_keywords();
59800
- var _types = require_types2();
62246
+ var _types = require_types3();
59801
62247
  var _Transformer = require_Transformer();
59802
62248
  var _Transformer2 = _interopRequireDefault(_Transformer);
59803
62249
 
@@ -59917,7 +62363,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
59917
62363
  }
59918
62364
  return value;
59919
62365
  }
59920
- var _types = require_types2();
62366
+ var _types = require_types3();
59921
62367
  var _Transformer = require_Transformer();
59922
62368
  var _Transformer2 = _interopRequireDefault(_Transformer);
59923
62369
  var JEST_GLOBAL_NAME = "jest";
@@ -59991,7 +62437,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
59991
62437
  function _interopRequireDefault(obj) {
59992
62438
  return obj && obj.__esModule ? obj : { default: obj };
59993
62439
  }
59994
- var _types = require_types2();
62440
+ var _types = require_types3();
59995
62441
  var _Transformer = require_Transformer();
59996
62442
  var _Transformer2 = _interopRequireDefault(_Transformer);
59997
62443
 
@@ -60020,7 +62466,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
60020
62466
  function _interopRequireDefault(obj) {
60021
62467
  return obj && obj.__esModule ? obj : { default: obj };
60022
62468
  }
60023
- var _types = require_types2();
62469
+ var _types = require_types3();
60024
62470
  var _Transformer = require_Transformer();
60025
62471
  var _Transformer2 = _interopRequireDefault(_Transformer);
60026
62472
 
@@ -60048,7 +62494,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
60048
62494
  function _interopRequireDefault(obj) {
60049
62495
  return obj && obj.__esModule ? obj : { default: obj };
60050
62496
  }
60051
- var _types = require_types2();
62497
+ var _types = require_types3();
60052
62498
  var _Transformer = require_Transformer();
60053
62499
  var _Transformer2 = _interopRequireDefault(_Transformer);
60054
62500
 
@@ -60164,7 +62610,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
60164
62610
  return obj && obj.__esModule ? obj : { default: obj };
60165
62611
  }
60166
62612
  var _tokenizer = require_tokenizer();
60167
- var _types = require_types2();
62613
+ var _types = require_types3();
60168
62614
  var _Transformer = require_Transformer();
60169
62615
  var _Transformer2 = _interopRequireDefault(_Transformer);
60170
62616
 
@@ -60415,7 +62861,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
60415
62861
  function _interopRequireDefault(obj) {
60416
62862
  return obj && obj.__esModule ? obj : { default: obj };
60417
62863
  }
60418
- var _types = require_types2();
62864
+ var _types = require_types3();
60419
62865
  var _isIdentifier = require_isIdentifier();
60420
62866
  var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
60421
62867
  var _Transformer = require_Transformer();
@@ -60561,7 +63007,7 @@ var require_RootTransformer = __commonJS((exports) => {
60561
63007
  return obj && obj.__esModule ? obj : { default: obj };
60562
63008
  }
60563
63009
  var _keywords = require_keywords();
60564
- var _types = require_types2();
63010
+ var _types = require_types3();
60565
63011
  var _getClassInfo = require_getClassInfo();
60566
63012
  var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
60567
63013
  var _CJSImportTransformer = require_CJSImportTransformer();
@@ -60960,7 +63406,7 @@ var require_formatTokens = __commonJS((exports) => {
60960
63406
  }
60961
63407
  var _linesandcolumns = require_build();
60962
63408
  var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
60963
- var _types = require_types2();
63409
+ var _types = require_types3();
60964
63410
  function formatTokens(code, tokens) {
60965
63411
  if (tokens.length === 0) {
60966
63412
  return "";
@@ -61025,7 +63471,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
61025
63471
  function _interopRequireDefault(obj) {
61026
63472
  return obj && obj.__esModule ? obj : { default: obj };
61027
63473
  }
61028
- var _types = require_types2();
63474
+ var _types = require_types3();
61029
63475
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
61030
63476
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
61031
63477
  function getTSImportedNames(tokens) {
@@ -61410,7 +63856,7 @@ function describeUnsupportedType(nodeType) {
61410
63856
  function compileTypedScript(opts) {
61411
63857
  let ast;
61412
63858
  try {
61413
- ast = import_parser2.parse(opts.source, {
63859
+ ast = import_parser4.parse(opts.source, {
61414
63860
  sourceType: "script",
61415
63861
  plugins: ["typescript"],
61416
63862
  ranges: true
@@ -61662,9 +64108,9 @@ function stripCommentsAndStrings(s) {
61662
64108
  out = out.replace(/`(\\.|[^`\\])*`/g, "``");
61663
64109
  return out;
61664
64110
  }
61665
- var import_parser2, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
64111
+ var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
61666
64112
  var init_compile = __esm(() => {
61667
- import_parser2 = __toESM(require_lib(), 1);
64113
+ import_parser4 = __toESM(require_lib(), 1);
61668
64114
  import_sucrase = __toESM(require_dist3(), 1);
61669
64115
  EVALUATOR_PARAM_NAMES = ["expected", "actual"];
61670
64116
  });
@@ -61878,8 +64324,8 @@ function getAllStepJsonSchemas() {
61878
64324
  category: def.category,
61879
64325
  name: def.name,
61880
64326
  description: def.description,
61881
- configSchema: toJsonSchema2(def.configSchema),
61882
- outputSchema: toJsonSchema2(def.outputSchema),
64327
+ configSchema: toJsonSchema(def.configSchema),
64328
+ outputSchema: toJsonSchema(def.outputSchema),
61883
64329
  configInWith: def.configInWith
61884
64330
  }));
61885
64331
  }
@@ -62369,7 +64815,7 @@ var init_step_configs = __esm(() => {
62369
64815
  type: "transform.template",
62370
64816
  category: "transform",
62371
64817
  name: "Fill Template",
62372
- description: "Fill a DOCX template with data. Use list_templates tool to get template IDs and their placeholder schemas.",
64818
+ description: "Fill a DOCX template with data from previous steps. Select a template in the workflow builder or provide a template ID from your workspace.",
62373
64819
  configSchema: TransformTemplateConfigSchema,
62374
64820
  outputSchema: TransformTemplateOutputSchema,
62375
64821
  configInWith: true
@@ -62525,81 +64971,6 @@ var init_actions = __esm(() => {
62525
64971
  ACTION_TYPES = ActionTypeSchema.options;
62526
64972
  });
62527
64973
 
62528
- // ../types/src/processor/execution.ts
62529
- function asTuple(values) {
62530
- return values;
62531
- }
62532
- var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
62533
- var init_execution = __esm(() => {
62534
- init_zod();
62535
- WorkflowExecutionStatusValue2 = {
62536
- CREATED: "created",
62537
- PENDING: "pending",
62538
- RUNNING: "running",
62539
- WAITING: "waiting",
62540
- COMPLETED: "completed",
62541
- FAILED: "failed",
62542
- CANCELLED: "cancelled"
62543
- };
62544
- WorkflowExecutionStatusSchema2 = exports_external.enum([
62545
- WorkflowExecutionStatusValue2.CREATED,
62546
- WorkflowExecutionStatusValue2.PENDING,
62547
- WorkflowExecutionStatusValue2.RUNNING,
62548
- WorkflowExecutionStatusValue2.WAITING,
62549
- WorkflowExecutionStatusValue2.COMPLETED,
62550
- WorkflowExecutionStatusValue2.FAILED,
62551
- WorkflowExecutionStatusValue2.CANCELLED
62552
- ]);
62553
- StepExecutionStatusValue2 = {
62554
- PENDING: "pending",
62555
- RUNNING: "running",
62556
- SUCCESS: "success",
62557
- FAILURE: "failure",
62558
- WAITING: "waiting",
62559
- SKIPPED: "skipped"
62560
- };
62561
- StepExecutionStatusSchema2 = exports_external.enum([
62562
- StepExecutionStatusValue2.PENDING,
62563
- StepExecutionStatusValue2.RUNNING,
62564
- StepExecutionStatusValue2.SUCCESS,
62565
- StepExecutionStatusValue2.FAILURE,
62566
- StepExecutionStatusValue2.WAITING,
62567
- StepExecutionStatusValue2.SKIPPED
62568
- ]);
62569
- TriggerTypeValue2 = {
62570
- MANUAL: "manual",
62571
- API: "api",
62572
- WEBHOOK: "webhook",
62573
- SCHEDULE: "schedule",
62574
- EMAIL: "email",
62575
- EVAL: "eval",
62576
- CLI: "cli"
62577
- };
62578
- TriggerTypeSchema2 = exports_external.enum([
62579
- TriggerTypeValue2.MANUAL,
62580
- TriggerTypeValue2.API,
62581
- TriggerTypeValue2.WEBHOOK,
62582
- TriggerTypeValue2.SCHEDULE,
62583
- TriggerTypeValue2.EMAIL,
62584
- TriggerTypeValue2.EVAL,
62585
- TriggerTypeValue2.CLI
62586
- ]);
62587
- ExecutionTypeValue2 = {
62588
- PROD: "prod",
62589
- EVAL: "eval",
62590
- PLAYGROUND: "playground"
62591
- };
62592
- ExecutionTypeSchema2 = exports_external.enum([
62593
- ExecutionTypeValue2.PROD,
62594
- ExecutionTypeValue2.EVAL,
62595
- ExecutionTypeValue2.PLAYGROUND
62596
- ]);
62597
- WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
62598
- STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
62599
- TRIGGER_TYPES2 = TriggerTypeSchema2.options;
62600
- EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
62601
- });
62602
-
62603
64974
  // ../types/src/workflow/workflow.ts
62604
64975
  function suggestWorkflowName(raw) {
62605
64976
  return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
@@ -62640,11 +65011,11 @@ var init_workflow = __esm(() => {
62640
65011
  ManualTriggerMethodSchema = exports_external.object({
62641
65012
  type: exports_external.literal("manual"),
62642
65013
  enabled: exports_external.boolean().optional(),
62643
- inputSchema: JsonSchemaSchema2.optional()
65014
+ inputSchema: JsonSchemaSchema.optional()
62644
65015
  });
62645
65016
  ApiTriggerMethodSchema = exports_external.object({
62646
65017
  type: exports_external.literal("api"),
62647
- inputSchema: JsonSchemaSchema2.optional()
65018
+ inputSchema: JsonSchemaSchema.optional()
62648
65019
  });
62649
65020
  EmailTriggerMethodSchema = exports_external.object({
62650
65021
  type: exports_external.literal("email"),
@@ -62683,8 +65054,8 @@ var init_workflow = __esm(() => {
62683
65054
  yamlContent: exports_external.string(),
62684
65055
  definition: WorkflowDefinitionSchema,
62685
65056
  isCurrent: exports_external.boolean().default(true),
62686
- createdAt: TimestampSchema2,
62687
- updatedAt: TimestampSchema2.optional(),
65057
+ createdAt: TimestampSchema,
65058
+ updatedAt: TimestampSchema.optional(),
62688
65059
  createdBy: exports_external.string()
62689
65060
  });
62690
65061
  CreateWorkflowDefinitionSchema = exports_external.object({
@@ -62767,7 +65138,7 @@ var init_expected_error = __esm(() => {
62767
65138
  messageContains: exports_external.string().min(1).max(1000).optional(),
62768
65139
  step: exports_external.string().min(1).max(200).optional()
62769
65140
  }).refine((v) => v.code != null || v.messageContains != null || v.step != null, {
62770
- message: "expected/error.json must specify at least one of: code, messageContains, step (otherwise any failure would match)"
65141
+ message: "expected.json $error must specify at least one of: code, messageContains, step (otherwise any failure would match)"
62771
65142
  });
62772
65143
  });
62773
65144
 
@@ -62866,14 +65237,14 @@ function isFileOutput(value) {
62866
65237
  function isWorkflowResult(value) {
62867
65238
  return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
62868
65239
  }
62869
- var WorkflowExecutionStatusSchema3, StepExecutionStatusSchema3, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
65240
+ var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
62870
65241
  var init_execution2 = __esm(() => {
62871
65242
  init_zod();
62872
65243
  init_common();
62873
65244
  init_execution();
62874
65245
  init_workflow();
62875
- WorkflowExecutionStatusSchema3 = WorkflowExecutionStatusSchema2;
62876
- StepExecutionStatusSchema3 = StepExecutionStatusSchema2;
65246
+ WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
65247
+ StepExecutionStatusSchema2 = StepExecutionStatusSchema;
62877
65248
  ScopeEntryTypeSchema = exports_external.enum([
62878
65249
  "root",
62879
65250
  "if-then",
@@ -62895,7 +65266,7 @@ var init_execution2 = __esm(() => {
62895
65266
  ScopeStackSchema = exports_external.array(ScopeEntrySchema);
62896
65267
  StepResultSchema = exports_external.object({
62897
65268
  output: exports_external.unknown(),
62898
- status: StepExecutionStatusSchema3
65269
+ status: StepExecutionStatusSchema2
62899
65270
  });
62900
65271
  ExecutionContextSchema = exports_external.object({
62901
65272
  input: exports_external.record(exports_external.string(), exports_external.unknown()),
@@ -62923,7 +65294,7 @@ var init_execution2 = __esm(() => {
62923
65294
  triggerType: exports_external.string(),
62924
65295
  triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
62925
65296
  overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
62926
- status: WorkflowExecutionStatusSchema3,
65297
+ status: WorkflowExecutionStatusSchema2,
62927
65298
  scopeStack: ScopeStackSchema,
62928
65299
  currentStepIndex: exports_external.number(),
62929
65300
  stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
@@ -62931,15 +65302,15 @@ var init_execution2 = __esm(() => {
62931
65302
  error: exports_external.string().nullable(),
62932
65303
  priority: exports_external.number().default(50),
62933
65304
  leaseId: exports_external.string().nullable(),
62934
- leaseExpiresAt: TimestampSchema2.nullable(),
65305
+ leaseExpiresAt: TimestampSchema.nullable(),
62935
65306
  workerId: exports_external.string().nullable(),
62936
65307
  maxRetries: exports_external.number().default(0),
62937
65308
  originalExecutionId: exports_external.string().nullable().optional(),
62938
65309
  previousExecutionId: exports_external.string().nullable().optional(),
62939
65310
  retryNumber: exports_external.number().default(0),
62940
- createdAt: TimestampSchema2,
62941
- startedAt: TimestampSchema2.nullable(),
62942
- completedAt: TimestampSchema2.nullable(),
65311
+ createdAt: TimestampSchema,
65312
+ startedAt: TimestampSchema.nullable(),
65313
+ completedAt: TimestampSchema.nullable(),
62943
65314
  createdBy: exports_external.string().nullable()
62944
65315
  });
62945
65316
  StepExecutionSchema = exports_external.object({
@@ -62956,12 +65327,12 @@ var init_execution2 = __esm(() => {
62956
65327
  stepAttempt: exports_external.number().default(0),
62957
65328
  inputData: exports_external.unknown().nullable(),
62958
65329
  outputData: exports_external.unknown().nullable(),
62959
- status: StepExecutionStatusSchema3,
65330
+ status: StepExecutionStatusSchema2,
62960
65331
  error: exports_external.string().nullable(),
62961
65332
  overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
62962
65333
  durationMs: exports_external.number().nullable(),
62963
- startedAt: TimestampSchema2.nullable(),
62964
- completedAt: TimestampSchema2.nullable()
65334
+ startedAt: TimestampSchema.nullable(),
65335
+ completedAt: TimestampSchema.nullable()
62965
65336
  });
62966
65337
  ConnectorSchema = exports_external.object({
62967
65338
  id: exports_external.string(),
@@ -62972,8 +65343,8 @@ var init_execution2 = __esm(() => {
62972
65343
  config: exports_external.record(exports_external.string(), exports_external.unknown()),
62973
65344
  inputSchema: exports_external.unknown().optional(),
62974
65345
  outputSchema: exports_external.unknown().optional(),
62975
- createdAt: TimestampSchema2,
62976
- updatedAt: TimestampSchema2.optional(),
65346
+ createdAt: TimestampSchema,
65347
+ updatedAt: TimestampSchema.optional(),
62977
65348
  createdBy: exports_external.string()
62978
65349
  });
62979
65350
  WorkflowFileOutputSchema = exports_external.object({
@@ -63266,7 +65637,7 @@ function formatZodError(source) {
63266
65637
  severity: "error"
63267
65638
  }));
63268
65639
  }
63269
- var DATASET_NAME_PATTERN, DatasetNameSchema, DatasetMetaSchema, DatasetImportModeSchema, DatasetImportRequestSchema, EvaluatorsImportRequestSchema, EvalResultsExportFormatSchema, EvalResultsExportQuerySchema, EvalResultsExportByBatchQuerySchema, EvalResultExportRowSchema, EvalResultsExportJsonSchema, ERROR_HINTS;
65640
+ var DATASET_NAME_PATTERN, DatasetNameSchema, DatasetMetaSchema, DatasetImportModeSchema, DatasetImportRequestSchema, EvaluatorsImportRequestSchema, EvalResultsExportFormatSchema, ExperimentExportQuerySchema, EvalResultsExportQuerySchema, EvalResultExportRowSchema, EvalResultsExportJsonSchema, ERROR_HINTS;
63270
65641
  var init_dataset_archive = __esm(() => {
63271
65642
  init_zod();
63272
65643
  DATASET_NAME_PATTERN = /^[a-z0-9][a-z0-9-_]*$/;
@@ -63284,14 +65655,10 @@ var init_dataset_archive = __esm(() => {
63284
65655
  yaml: exports_external.string().min(1, "yaml content is required").max(1048576, "evaluator YAML exceeds 1 MB")
63285
65656
  });
63286
65657
  EvalResultsExportFormatSchema = exports_external.enum(["csv", "json"]);
63287
- EvalResultsExportQuerySchema = exports_external.object({
63288
- format: EvalResultsExportFormatSchema,
63289
- batchId: exports_external.string().min(1).optional()
63290
- });
63291
- EvalResultsExportByBatchQuerySchema = exports_external.object({
63292
- format: EvalResultsExportFormatSchema,
63293
- batchId: exports_external.string().min(1)
65658
+ ExperimentExportQuerySchema = exports_external.object({
65659
+ format: EvalResultsExportFormatSchema
63294
65660
  });
65661
+ EvalResultsExportQuerySchema = ExperimentExportQuerySchema;
63295
65662
  EvalResultExportRowSchema = exports_external.object({
63296
65663
  executionId: exports_external.string().min(1),
63297
65664
  exampleId: exports_external.string().min(1).nullable(),
@@ -63315,7 +65682,7 @@ var init_dataset_archive = __esm(() => {
63315
65682
  "dataset-too-large": "Datasets are capped at 500 MB. Split into multiple Append imports.",
63316
65683
  "execution-in-flight": "Wait for the in-flight execution to complete, or cancel it from the Experiments tab.",
63317
65684
  "download-token-expired": "Re-request the resource to mint a new URL.",
63318
- "legacy-dataset-format": "Re-export the dataset using the new folder convention (examples/<name>/input/arguments.json + input/<arg>/<file> + expected/output.json)."
65685
+ "legacy-dataset-format": "Re-export the dataset using the canonical automation convention (examples/<name>/input.json + input/<file> refs + expected.json)."
63319
65686
  };
63320
65687
  });
63321
65688
 
@@ -64476,11 +66843,11 @@ function walkGrammar(node, parts) {
64476
66843
  }
64477
66844
  return current;
64478
66845
  }
64479
- function normalizeTemplate(template) {
64480
- return template.endsWith("/") ? template.slice(0, -1) : template;
66846
+ function normalizeTemplate(template2) {
66847
+ return template2.endsWith("/") ? template2.slice(0, -1) : template2;
64481
66848
  }
64482
- function renderTemplate(template, params) {
64483
- return normalizeTemplate(template).split("/").flatMap((part) => {
66849
+ function renderTemplate(template2, params) {
66850
+ return normalizeTemplate(template2).split("/").flatMap((part) => {
64484
66851
  if (!part.startsWith(":")) {
64485
66852
  return [part];
64486
66853
  }
@@ -64495,31 +66862,31 @@ function renderTemplate(template, params) {
64495
66862
  return [assertSegment(String(name), value)];
64496
66863
  });
64497
66864
  }
64498
- function buildS3Path(tenantId, template, params) {
66865
+ function buildS3Path(tenantId, template2, params) {
64499
66866
  const tenant = assertSegment("tenantId", tenantId);
64500
- const parts = renderTemplate(template, params);
66867
+ const parts = renderTemplate(template2, params);
64501
66868
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
64502
- if (template.endsWith("/") && node === PATH_LEAF) {
64503
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
66869
+ if (template2.endsWith("/") && node === PATH_LEAF) {
66870
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
64504
66871
  }
64505
66872
  const path = ["tenants", tenant, ...parts].join("/");
64506
- return template.endsWith("/") ? `${path}/` : path;
66873
+ return template2.endsWith("/") ? `${path}/` : path;
64507
66874
  }
64508
- function buildS3PathSuffix(template, params) {
64509
- const parts = renderTemplate(template, params);
66875
+ function buildS3PathSuffix(template2, params) {
66876
+ const parts = renderTemplate(template2, params);
64510
66877
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
64511
- if (template.endsWith("/") && node === PATH_LEAF) {
64512
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
66878
+ if (template2.endsWith("/") && node === PATH_LEAF) {
66879
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
64513
66880
  }
64514
66881
  const path = parts.join("/");
64515
- return template.endsWith("/") ? `${path}/` : path;
66882
+ return template2.endsWith("/") ? `${path}/` : path;
64516
66883
  }
64517
66884
  function stripTenantPrefix(key) {
64518
66885
  return key.replace(TENANT_PREFIX_RX, "");
64519
66886
  }
64520
- function matchS3Path(template, key) {
66887
+ function matchS3Path(template2, key) {
64521
66888
  const keyParts = stripTenantPrefix(key).split("/");
64522
- const templateParts = normalizeTemplate(template).split("/");
66889
+ const templateParts = normalizeTemplate(template2).split("/");
64523
66890
  const params = {};
64524
66891
  let keyIndex = 0;
64525
66892
  for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
@@ -64572,23 +66939,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
64572
66939
  }
64573
66940
  return assertSegment("tenantId", tenantId);
64574
66941
  };
64575
- const build = (template, params) => {
66942
+ const build = (template2, params) => {
64576
66943
  const tenant = resolveTenantId(params);
64577
- const parts = renderTemplate(template, params ?? {});
66944
+ const parts = renderTemplate(template2, params ?? {});
64578
66945
  const node = walkGrammar(grammarNode, parts);
64579
- if (template.endsWith("/") && node === PATH_LEAF) {
64580
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
66946
+ if (template2.endsWith("/") && node === PATH_LEAF) {
66947
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
64581
66948
  }
64582
66949
  const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
64583
- return template.endsWith("/") ? `${path}/` : path;
66950
+ return template2.endsWith("/") ? `${path}/` : path;
64584
66951
  };
64585
66952
  const builder = build;
64586
- builder.at = (template, params) => {
66953
+ builder.at = (template2, params) => {
64587
66954
  const tenant = resolveTenantId(params);
64588
- const parts = renderTemplate(template, params ?? {});
66955
+ const parts = renderTemplate(template2, params ?? {});
64589
66956
  const nextNode = walkGrammar(grammarNode, parts);
64590
- if (template.endsWith("/") && nextNode === PATH_LEAF) {
64591
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
66957
+ if (template2.endsWith("/") && nextNode === PATH_LEAF) {
66958
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
64592
66959
  }
64593
66960
  return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
64594
66961
  };
@@ -64947,7 +67314,7 @@ __export(exports_src, {
64947
67314
  SplitConfigSchema: () => SplitConfigSchema,
64948
67315
  SpanTypes: () => SpanTypes,
64949
67316
  SpanKindMap: () => SpanKindMap,
64950
- SpanKind: () => SpanKind,
67317
+ SpanKind: () => import_api.SpanKind,
64951
67318
  SourceVersionRefSchema: () => SourceVersionRefSchema,
64952
67319
  SourceSecretsFileSchema: () => SourceSecretsFileSchema,
64953
67320
  SourcePackageTypeSchema: () => SourcePackageTypeSchema,
@@ -65041,6 +67408,7 @@ __export(exports_src, {
65041
67408
  ExtractOutputSchema: () => ExtractOutputSchema,
65042
67409
  ExtractInputSchema: () => ExtractInputSchema,
65043
67410
  ExtractConfigSchema: () => ExtractConfigSchema,
67411
+ ExperimentExportQuerySchema: () => ExperimentExportQuerySchema,
65044
67412
  ExpectedOutputSchema: () => ExpectedOutputSchema,
65045
67413
  ExpectedOutputFilesSchema: () => ExpectedOutputFilesSchema,
65046
67414
  ExpectedErrorSchema: () => ExpectedErrorSchema,
@@ -65062,7 +67430,6 @@ __export(exports_src, {
65062
67430
  EvalResultsExportQuerySchema: () => EvalResultsExportQuerySchema,
65063
67431
  EvalResultsExportJsonSchema: () => EvalResultsExportJsonSchema,
65064
67432
  EvalResultsExportFormatSchema: () => EvalResultsExportFormatSchema,
65065
- EvalResultsExportByBatchQuerySchema: () => EvalResultsExportByBatchQuerySchema,
65066
67433
  EvalResultExportRowSchema: () => EvalResultExportRowSchema,
65067
67434
  EvalOverridesSchema: () => EvalOverridesSchema,
65068
67435
  EvalExampleMetaSchema: () => EvalExampleMetaSchema,
@@ -65149,8 +67516,8 @@ __export(exports_src, {
65149
67516
  });
65150
67517
  var init_src = __esm(() => {
65151
67518
  init_core3();
65152
- init_processor();
65153
- init_parser();
67519
+ init_processor2();
67520
+ init_parser2();
65154
67521
  init_otel();
65155
67522
  init_execution_row();
65156
67523
  init_run_expand();
@@ -66061,7 +68428,7 @@ var require_foldFlowLines = __commonJS((exports) => {
66061
68428
  else
66062
68429
  end = lineWidth - indentAtStart;
66063
68430
  }
66064
- let split = undefined;
68431
+ let split2 = undefined;
66065
68432
  let prev = undefined;
66066
68433
  let overflow = false;
66067
68434
  let i = -1;
@@ -66095,20 +68462,20 @@ var require_foldFlowLines = __commonJS((exports) => {
66095
68462
  if (mode === FOLD_BLOCK)
66096
68463
  i = consumeMoreIndentedLines(text, i, indent.length);
66097
68464
  end = i + indent.length + endStep;
66098
- split = undefined;
68465
+ split2 = undefined;
66099
68466
  } else {
66100
68467
  if (ch === " " && prev && prev !== " " && prev !== `
66101
68468
  ` && prev !== "\t") {
66102
68469
  const next = text[i + 1];
66103
68470
  if (next && next !== " " && next !== `
66104
68471
  ` && next !== "\t")
66105
- split = i;
68472
+ split2 = i;
66106
68473
  }
66107
68474
  if (i >= end) {
66108
- if (split) {
66109
- folds.push(split);
66110
- end = split + endStep;
66111
- split = undefined;
68475
+ if (split2) {
68476
+ folds.push(split2);
68477
+ end = split2 + endStep;
68478
+ split2 = undefined;
66112
68479
  } else if (mode === FOLD_QUOTED) {
66113
68480
  while (prev === " " || prev === "\t") {
66114
68481
  prev = ch;
@@ -66121,7 +68488,7 @@ var require_foldFlowLines = __commonJS((exports) => {
66121
68488
  folds.push(j);
66122
68489
  escapedFolds[j] = true;
66123
68490
  end = j + endStep;
66124
- split = undefined;
68491
+ split2 = undefined;
66125
68492
  } else {
66126
68493
  overflow = true;
66127
68494
  }
@@ -66755,7 +69122,7 @@ var require_merge = __commonJS((exports) => {
66755
69122
  var identity = require_identity();
66756
69123
  var Scalar = require_Scalar();
66757
69124
  var MERGE_KEY = "<<";
66758
- var merge2 = {
69125
+ var merge3 = {
66759
69126
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
66760
69127
  default: "key",
66761
69128
  tag: "tag:yaml.org,2002:merge",
@@ -66765,7 +69132,7 @@ var require_merge = __commonJS((exports) => {
66765
69132
  }),
66766
69133
  stringify: () => MERGE_KEY
66767
69134
  };
66768
- 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);
69135
+ 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);
66769
69136
  function addMergeToJSMap(ctx, map2, value) {
66770
69137
  const source = resolveAliasValue(ctx, value);
66771
69138
  if (identity.isSeq(source))
@@ -66804,21 +69171,21 @@ var require_merge = __commonJS((exports) => {
66804
69171
  }
66805
69172
  exports.addMergeToJSMap = addMergeToJSMap;
66806
69173
  exports.isMergeKey = isMergeKey;
66807
- exports.merge = merge2;
69174
+ exports.merge = merge3;
66808
69175
  });
66809
69176
 
66810
69177
  // node_modules/yaml/dist/nodes/addPairToJSMap.js
66811
69178
  var require_addPairToJSMap = __commonJS((exports) => {
66812
69179
  var log = require_log();
66813
- var merge2 = require_merge();
69180
+ var merge3 = require_merge();
66814
69181
  var stringify = require_stringify();
66815
69182
  var identity = require_identity();
66816
69183
  var toJS = require_toJS();
66817
69184
  function addPairToJSMap(ctx, map2, { key, value }) {
66818
69185
  if (identity.isNode(key) && key.addToJSMap)
66819
69186
  key.addToJSMap(ctx, map2, value);
66820
- else if (merge2.isMergeKey(ctx, key))
66821
- merge2.addMergeToJSMap(ctx, map2, value);
69187
+ else if (merge3.isMergeKey(ctx, key))
69188
+ merge3.addMergeToJSMap(ctx, map2, value);
66822
69189
  else {
66823
69190
  const jsKey = toJS.toJS(key, "", ctx);
66824
69191
  if (map2 instanceof Map) {
@@ -68094,7 +70461,7 @@ var require_schema3 = __commonJS((exports) => {
68094
70461
  var bool = require_bool2();
68095
70462
  var float = require_float2();
68096
70463
  var int2 = require_int2();
68097
- var merge2 = require_merge();
70464
+ var merge3 = require_merge();
68098
70465
  var omap = require_omap();
68099
70466
  var pairs = require_pairs();
68100
70467
  var set2 = require_set();
@@ -68114,7 +70481,7 @@ var require_schema3 = __commonJS((exports) => {
68114
70481
  float.floatExp,
68115
70482
  float.float,
68116
70483
  binary.binary,
68117
- merge2.merge,
70484
+ merge3.merge,
68118
70485
  omap.omap,
68119
70486
  pairs.pairs,
68120
70487
  set2.set,
@@ -68137,7 +70504,7 @@ var require_tags = __commonJS((exports) => {
68137
70504
  var schema = require_schema();
68138
70505
  var schema$1 = require_schema2();
68139
70506
  var binary = require_binary();
68140
- var merge2 = require_merge();
70507
+ var merge3 = require_merge();
68141
70508
  var omap = require_omap();
68142
70509
  var pairs = require_pairs();
68143
70510
  var schema$2 = require_schema3();
@@ -68162,7 +70529,7 @@ var require_tags = __commonJS((exports) => {
68162
70529
  intOct: int2.intOct,
68163
70530
  intTime: timestamp.intTime,
68164
70531
  map: map2.map,
68165
- merge: merge2.merge,
70532
+ merge: merge3.merge,
68166
70533
  null: _null4.nullTag,
68167
70534
  omap: omap.omap,
68168
70535
  pairs: pairs.pairs,
@@ -68172,7 +70539,7 @@ var require_tags = __commonJS((exports) => {
68172
70539
  };
68173
70540
  var coreKnownTags = {
68174
70541
  "tag:yaml.org,2002:binary": binary.binary,
68175
- "tag:yaml.org,2002:merge": merge2.merge,
70542
+ "tag:yaml.org,2002:merge": merge3.merge,
68176
70543
  "tag:yaml.org,2002:omap": omap.omap,
68177
70544
  "tag:yaml.org,2002:pairs": pairs.pairs,
68178
70545
  "tag:yaml.org,2002:set": set2.set,
@@ -68181,7 +70548,7 @@ var require_tags = __commonJS((exports) => {
68181
70548
  function getTags(customTags, schemaName, addMergeTag) {
68182
70549
  const schemaTags = schemas3.get(schemaName);
68183
70550
  if (schemaTags && !customTags) {
68184
- return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
70551
+ return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
68185
70552
  }
68186
70553
  let tags = schemaTags;
68187
70554
  if (!tags) {
@@ -68199,7 +70566,7 @@ var require_tags = __commonJS((exports) => {
68199
70566
  tags = customTags(tags.slice());
68200
70567
  }
68201
70568
  if (addMergeTag)
68202
- tags = tags.concat(merge2.merge);
70569
+ tags = tags.concat(merge3.merge);
68203
70570
  return tags.reduce((tags2, tag) => {
68204
70571
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
68205
70572
  if (!tagObj) {
@@ -68226,11 +70593,11 @@ var require_Schema = __commonJS((exports) => {
68226
70593
  var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
68227
70594
 
68228
70595
  class Schema {
68229
- constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
70596
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
68230
70597
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
68231
70598
  this.name = typeof schema === "string" && schema || "core";
68232
70599
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
68233
- this.tags = tags.getTags(customTags, this.name, merge2);
70600
+ this.tags = tags.getTags(customTags, this.name, merge3);
68234
70601
  this.toStringOptions = toStringDefaults ?? null;
68235
70602
  Object.defineProperty(this, identity.MAP, { value: map2.map });
68236
70603
  Object.defineProperty(this, identity.SCALAR, { value: string4.string });
@@ -69453,13 +71820,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
69453
71820
  return { mode, indent, chomp, comment, length };
69454
71821
  }
69455
71822
  function splitLines(source) {
69456
- const split = source.split(/\n( *)/);
69457
- const first = split[0];
71823
+ const split2 = source.split(/\n( *)/);
71824
+ const first = split2[0];
69458
71825
  const m = first.match(/^( *)/);
69459
71826
  const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
69460
71827
  const lines = [line0];
69461
- for (let i = 1;i < split.length; i += 2)
69462
- lines.push([split[i], split[i + 1]]);
71828
+ for (let i = 1;i < split2.length; i += 2)
71829
+ lines.push([split2[i], split2[i + 1]]);
69463
71830
  return lines;
69464
71831
  }
69465
71832
  exports.resolveBlockScalar = resolveBlockScalar;
@@ -72473,7 +74840,7 @@ var init_main = __esm(() => {
72473
74840
  });
72474
74841
 
72475
74842
  // ../../node_modules/sisteransi/src/index.js
72476
- var require_src = __commonJS((exports, module) => {
74843
+ var require_src2 = __commonJS((exports, module) => {
72477
74844
  var ESC2 = "\x1B";
72478
74845
  var CSI2 = `${ESC2}[`;
72479
74846
  var beep = "\x07";
@@ -72816,7 +75183,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
72816
75183
  }, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
72817
75184
  var init_dist3 = __esm(() => {
72818
75185
  init_main();
72819
- import_sisteransi = __toESM(require_src(), 1);
75186
+ import_sisteransi = __toESM(require_src2(), 1);
72820
75187
  G = ["up", "down", "left", "right", "space", "enter", "cancel"];
72821
75188
  K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
72822
75189
  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)}` } } };
@@ -74159,7 +76526,7 @@ var init_dist4 = __esm(() => {
74159
76526
  init_dist3();
74160
76527
  init_main();
74161
76528
  init_dist2();
74162
- import_sisteransi2 = __toESM(require_src(), 1);
76529
+ import_sisteransi2 = __toESM(require_src2(), 1);
74163
76530
  tt2 = te();
74164
76531
  _t = w2("◆", "*");
74165
76532
  ot2 = w2("■", "x");
@@ -167651,7 +170018,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
167651
170018
  __defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
167652
170019
  }
167653
170020
  return to5;
167654
- }, __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 {
170021
+ }, __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 {
167655
170022
  diff(oldStr, newStr, options8 = {}) {
167656
170023
  let callback;
167657
170024
  if (typeof options8 === "function") {
@@ -168673,7 +171040,7 @@ var init_prettier = __esm(() => {
168673
171040
  };
168674
171041
  }
168675
171042
  });
168676
- require_utils2 = __commonJS2({
171043
+ require_utils4 = __commonJS2({
168677
171044
  "node_modules/braces/lib/utils.js"(exports) {
168678
171045
  exports.isInteger = (num) => {
168679
171046
  if (typeof num === "number") {
@@ -168762,7 +171129,7 @@ var init_prettier = __esm(() => {
168762
171129
  });
168763
171130
  require_stringify2 = __commonJS2({
168764
171131
  "node_modules/braces/lib/stringify.js"(exports, module) {
168765
- var utils2 = require_utils2();
171132
+ var utils2 = require_utils4();
168766
171133
  module.exports = (ast, options8 = {}) => {
168767
171134
  const stringify2 = (node, parent = {}) => {
168768
171135
  const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
@@ -169216,7 +171583,7 @@ var init_prettier = __esm(() => {
169216
171583
  require_compile2 = __commonJS2({
169217
171584
  "node_modules/braces/lib/compile.js"(exports, module) {
169218
171585
  var fill2 = require_fill_range();
169219
- var utils2 = require_utils2();
171586
+ var utils2 = require_utils4();
169220
171587
  var compile = (ast, options8 = {}) => {
169221
171588
  const walk2 = (node, parent = {}) => {
169222
171589
  const invalidBlock = utils2.isInvalidBrace(parent);
@@ -169266,7 +171633,7 @@ var init_prettier = __esm(() => {
169266
171633
  "node_modules/braces/lib/expand.js"(exports, module) {
169267
171634
  var fill2 = require_fill_range();
169268
171635
  var stringify2 = require_stringify2();
169269
- var utils2 = require_utils2();
171636
+ var utils2 = require_utils4();
169270
171637
  var append = (queue = "", stash = "", enclose = false) => {
169271
171638
  const result = [];
169272
171639
  queue = [].concat(queue);
@@ -171465,8 +173832,8 @@ var init_prettier = __esm(() => {
171465
173832
  var Stream = __require2("stream");
171466
173833
  var PassThrough = Stream.PassThrough;
171467
173834
  var slice = Array.prototype.slice;
171468
- module.exports = merge2;
171469
- function merge2() {
173835
+ module.exports = merge22;
173836
+ function merge22() {
171470
173837
  const streamsQueue = [];
171471
173838
  const args = slice.call(arguments);
171472
173839
  let merging = false;
@@ -171580,9 +173947,9 @@ var init_prettier = __esm(() => {
171580
173947
  "node_modules/fast-glob/out/utils/stream.js"(exports) {
171581
173948
  Object.defineProperty(exports, "__esModule", { value: true });
171582
173949
  exports.merge = undefined;
171583
- var merge2 = require_merge2();
173950
+ var merge22 = require_merge2();
171584
173951
  function merge3(streams) {
171585
- const mergedStream = merge2(streams);
173952
+ const mergedStream = merge22(streams);
171586
173953
  streams.forEach((stream) => {
171587
173954
  stream.once("error", (error52) => mergedStream.emit("error", error52));
171588
173955
  });
@@ -171610,7 +173977,7 @@ var init_prettier = __esm(() => {
171610
173977
  exports.isEmpty = isEmpty;
171611
173978
  }
171612
173979
  });
171613
- require_utils3 = __commonJS2({
173980
+ require_utils32 = __commonJS2({
171614
173981
  "node_modules/fast-glob/out/utils/index.js"(exports) {
171615
173982
  Object.defineProperty(exports, "__esModule", { value: true });
171616
173983
  exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
@@ -171634,7 +174001,7 @@ var init_prettier = __esm(() => {
171634
174001
  "node_modules/fast-glob/out/managers/tasks.js"(exports) {
171635
174002
  Object.defineProperty(exports, "__esModule", { value: true });
171636
174003
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
171637
- var utils2 = require_utils3();
174004
+ var utils2 = require_utils32();
171638
174005
  function generate(input, settings) {
171639
174006
  const patterns = processPatterns(input, settings);
171640
174007
  const ignore = processPatterns(settings.ignore, settings);
@@ -171943,7 +174310,7 @@ var init_prettier = __esm(() => {
171943
174310
  exports.createDirentFromStats = createDirentFromStats;
171944
174311
  }
171945
174312
  });
171946
- require_utils4 = __commonJS2({
174313
+ require_utils42 = __commonJS2({
171947
174314
  "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
171948
174315
  Object.defineProperty(exports, "__esModule", { value: true });
171949
174316
  exports.fs = undefined;
@@ -171971,7 +174338,7 @@ var init_prettier = __esm(() => {
171971
174338
  var fsStat = require_out();
171972
174339
  var rpl = require_run_parallel();
171973
174340
  var constants_1 = require_constants3();
171974
- var utils2 = require_utils4();
174341
+ var utils2 = require_utils42();
171975
174342
  var common = require_common();
171976
174343
  function read3(directory, settings, callback) {
171977
174344
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -172077,7 +174444,7 @@ var init_prettier = __esm(() => {
172077
174444
  exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
172078
174445
  var fsStat = require_out();
172079
174446
  var constants_1 = require_constants3();
172080
- var utils2 = require_utils4();
174447
+ var utils2 = require_utils42();
172081
174448
  var common = require_common();
172082
174449
  function read3(directory, settings) {
172083
174450
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -172857,7 +175224,7 @@ var init_prettier = __esm(() => {
172857
175224
  Object.defineProperty(exports, "__esModule", { value: true });
172858
175225
  var path15 = __require2("path");
172859
175226
  var fsStat = require_out();
172860
- var utils2 = require_utils3();
175227
+ var utils2 = require_utils32();
172861
175228
  var Reader = class {
172862
175229
  constructor(_settings) {
172863
175230
  this._settings = _settings;
@@ -172981,7 +175348,7 @@ var init_prettier = __esm(() => {
172981
175348
  require_matcher = __commonJS2({
172982
175349
  "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
172983
175350
  Object.defineProperty(exports, "__esModule", { value: true });
172984
- var utils2 = require_utils3();
175351
+ var utils2 = require_utils32();
172985
175352
  var Matcher = class {
172986
175353
  constructor(_patterns, _settings, _micromatchOptions) {
172987
175354
  this._patterns = _patterns;
@@ -173063,7 +175430,7 @@ var init_prettier = __esm(() => {
173063
175430
  require_deep = __commonJS2({
173064
175431
  "node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
173065
175432
  Object.defineProperty(exports, "__esModule", { value: true });
173066
- var utils2 = require_utils3();
175433
+ var utils2 = require_utils32();
173067
175434
  var partial_1 = require_partial();
173068
175435
  var DeepFilter = class {
173069
175436
  constructor(_settings, _micromatchOptions) {
@@ -173125,7 +175492,7 @@ var init_prettier = __esm(() => {
173125
175492
  require_entry = __commonJS2({
173126
175493
  "node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
173127
175494
  Object.defineProperty(exports, "__esModule", { value: true });
173128
- var utils2 = require_utils3();
175495
+ var utils2 = require_utils32();
173129
175496
  var EntryFilter = class {
173130
175497
  constructor(_settings, _micromatchOptions) {
173131
175498
  this._settings = _settings;
@@ -173210,7 +175577,7 @@ var init_prettier = __esm(() => {
173210
175577
  require_error2 = __commonJS2({
173211
175578
  "node_modules/fast-glob/out/providers/filters/error.js"(exports) {
173212
175579
  Object.defineProperty(exports, "__esModule", { value: true });
173213
- var utils2 = require_utils3();
175580
+ var utils2 = require_utils32();
173214
175581
  var ErrorFilter = class {
173215
175582
  constructor(_settings) {
173216
175583
  this._settings = _settings;
@@ -173228,7 +175595,7 @@ var init_prettier = __esm(() => {
173228
175595
  require_entry2 = __commonJS2({
173229
175596
  "node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
173230
175597
  Object.defineProperty(exports, "__esModule", { value: true });
173231
- var utils2 = require_utils3();
175598
+ var utils2 = require_utils32();
173232
175599
  var EntryTransformer = class {
173233
175600
  constructor(_settings) {
173234
175601
  this._settings = _settings;
@@ -173496,7 +175863,7 @@ var init_prettier = __esm(() => {
173496
175863
  var stream_1 = require_stream4();
173497
175864
  var sync_1 = require_sync6();
173498
175865
  var settings_1 = require_settings4();
173499
- var utils2 = require_utils3();
175866
+ var utils2 = require_utils32();
173500
175867
  async function FastGlob(source2, options8) {
173501
175868
  assertPatternsInput(source2);
173502
175869
  const works = getWorks(source2, async_1.default, options8);
@@ -173814,7 +176181,7 @@ var init_prettier = __esm(() => {
173814
176181
  };
173815
176182
  }
173816
176183
  });
173817
- require_semver = __commonJS2({
176184
+ require_semver2 = __commonJS2({
173818
176185
  "node_modules/semver/classes/semver.js"(exports, module) {
173819
176186
  var debug = require_debug();
173820
176187
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
@@ -174084,7 +176451,7 @@ var init_prettier = __esm(() => {
174084
176451
  });
174085
176452
  require_compare = __commonJS2({
174086
176453
  "node_modules/semver/functions/compare.js"(exports, module) {
174087
- var SemVer = require_semver();
176454
+ var SemVer = require_semver2();
174088
176455
  var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
174089
176456
  module.exports = compare;
174090
176457
  }
@@ -175817,7 +178184,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
175817
178184
  };
175818
178185
  }
175819
178186
  });
175820
- require_src2 = __commonJS2({
178187
+ require_src3 = __commonJS2({
175821
178188
  "node_modules/editorconfig/src/index.js"(exports) {
175822
178189
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
175823
178190
  return new (P9 || (P9 = Promise))(function(resolve32, reject) {
@@ -177280,7 +179647,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
177280
179647
  mockable_default = mockable.mocked;
177281
179648
  import_micromatch = __toESM2(require_micromatch(), 1);
177282
179649
  partition_default = partition2;
177283
- import_editorconfig = __toESM2(require_src2(), 1);
179650
+ import_editorconfig = __toESM2(require_src3(), 1);
177284
179651
  iterate_directory_up_default = iterateDirectoryUp;
177285
179652
  FileSearcher = class extends Searcher {
177286
179653
  findInDirectory = findFile;
@@ -180751,7 +183118,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
180751
183118
  else
180752
183119
  end = lineWidth - indentAtStart;
180753
183120
  }
180754
- let split = undefined;
183121
+ let split2 = undefined;
180755
183122
  let prev = undefined;
180756
183123
  let overflow = false;
180757
183124
  let i5 = -1;
@@ -180785,20 +183152,20 @@ var require_foldFlowLines2 = __commonJS((exports) => {
180785
183152
  if (mode === FOLD_BLOCK)
180786
183153
  i5 = consumeMoreIndentedLines(text, i5, indent3.length);
180787
183154
  end = i5 + indent3.length + endStep;
180788
- split = undefined;
183155
+ split2 = undefined;
180789
183156
  } else {
180790
183157
  if (ch2 === " " && prev && prev !== " " && prev !== `
180791
183158
  ` && prev !== "\t") {
180792
183159
  const next = text[i5 + 1];
180793
183160
  if (next && next !== " " && next !== `
180794
183161
  ` && next !== "\t")
180795
- split = i5;
183162
+ split2 = i5;
180796
183163
  }
180797
183164
  if (i5 >= end) {
180798
- if (split) {
180799
- folds.push(split);
180800
- end = split + endStep;
180801
- split = undefined;
183165
+ if (split2) {
183166
+ folds.push(split2);
183167
+ end = split2 + endStep;
183168
+ split2 = undefined;
180802
183169
  } else if (mode === FOLD_QUOTED) {
180803
183170
  while (prev === " " || prev === "\t") {
180804
183171
  prev = ch2;
@@ -180811,7 +183178,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
180811
183178
  folds.push(j11);
180812
183179
  escapedFolds[j11] = true;
180813
183180
  end = j11 + endStep;
180814
- split = undefined;
183181
+ split2 = undefined;
180815
183182
  } else {
180816
183183
  overflow = true;
180817
183184
  }
@@ -181445,7 +183812,7 @@ var require_merge3 = __commonJS((exports) => {
181445
183812
  var identity = require_identity2();
181446
183813
  var Scalar = require_Scalar2();
181447
183814
  var MERGE_KEY = "<<";
181448
- var merge2 = {
183815
+ var merge3 = {
181449
183816
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
181450
183817
  default: "key",
181451
183818
  tag: "tag:yaml.org,2002:merge",
@@ -181455,7 +183822,7 @@ var require_merge3 = __commonJS((exports) => {
181455
183822
  }),
181456
183823
  stringify: () => MERGE_KEY
181457
183824
  };
181458
- var isMergeKey = (ctx, key2) => (merge2.identify(key2) || identity.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge2.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
183825
+ var isMergeKey = (ctx, key2) => (merge3.identify(key2) || identity.isScalar(key2) && (!key2.type || key2.type === Scalar.Scalar.PLAIN) && merge3.identify(key2.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
181459
183826
  function addMergeToJSMap(ctx, map2, value) {
181460
183827
  const source2 = resolveAliasValue(ctx, value);
181461
183828
  if (identity.isSeq(source2))
@@ -181494,21 +183861,21 @@ var require_merge3 = __commonJS((exports) => {
181494
183861
  }
181495
183862
  exports.addMergeToJSMap = addMergeToJSMap;
181496
183863
  exports.isMergeKey = isMergeKey;
181497
- exports.merge = merge2;
183864
+ exports.merge = merge3;
181498
183865
  });
181499
183866
 
181500
183867
  // ../workflow-yaml/node_modules/yaml/dist/nodes/addPairToJSMap.js
181501
183868
  var require_addPairToJSMap2 = __commonJS((exports) => {
181502
183869
  var log = require_log2();
181503
- var merge2 = require_merge3();
183870
+ var merge3 = require_merge3();
181504
183871
  var stringify = require_stringify3();
181505
183872
  var identity = require_identity2();
181506
183873
  var toJS = require_toJS2();
181507
183874
  function addPairToJSMap(ctx, map2, { key: key2, value }) {
181508
183875
  if (identity.isNode(key2) && key2.addToJSMap)
181509
183876
  key2.addToJSMap(ctx, map2, value);
181510
- else if (merge2.isMergeKey(ctx, key2))
181511
- merge2.addMergeToJSMap(ctx, map2, value);
183877
+ else if (merge3.isMergeKey(ctx, key2))
183878
+ merge3.addMergeToJSMap(ctx, map2, value);
181512
183879
  else {
181513
183880
  const jsKey = toJS.toJS(key2, "", ctx);
181514
183881
  if (map2 instanceof Map) {
@@ -182784,7 +185151,7 @@ var require_schema6 = __commonJS((exports) => {
182784
185151
  var bool = require_bool4();
182785
185152
  var float = require_float4();
182786
185153
  var int2 = require_int4();
182787
- var merge2 = require_merge3();
185154
+ var merge3 = require_merge3();
182788
185155
  var omap = require_omap2();
182789
185156
  var pairs = require_pairs2();
182790
185157
  var set2 = require_set2();
@@ -182804,7 +185171,7 @@ var require_schema6 = __commonJS((exports) => {
182804
185171
  float.floatExp,
182805
185172
  float.float,
182806
185173
  binary.binary,
182807
- merge2.merge,
185174
+ merge3.merge,
182808
185175
  omap.omap,
182809
185176
  pairs.pairs,
182810
185177
  set2.set,
@@ -182827,7 +185194,7 @@ var require_tags2 = __commonJS((exports) => {
182827
185194
  var schema = require_schema4();
182828
185195
  var schema$1 = require_schema5();
182829
185196
  var binary = require_binary2();
182830
- var merge2 = require_merge3();
185197
+ var merge3 = require_merge3();
182831
185198
  var omap = require_omap2();
182832
185199
  var pairs = require_pairs2();
182833
185200
  var schema$2 = require_schema6();
@@ -182852,7 +185219,7 @@ var require_tags2 = __commonJS((exports) => {
182852
185219
  intOct: int2.intOct,
182853
185220
  intTime: timestamp.intTime,
182854
185221
  map: map2.map,
182855
- merge: merge2.merge,
185222
+ merge: merge3.merge,
182856
185223
  null: _null4.nullTag,
182857
185224
  omap: omap.omap,
182858
185225
  pairs: pairs.pairs,
@@ -182862,7 +185229,7 @@ var require_tags2 = __commonJS((exports) => {
182862
185229
  };
182863
185230
  var coreKnownTags = {
182864
185231
  "tag:yaml.org,2002:binary": binary.binary,
182865
- "tag:yaml.org,2002:merge": merge2.merge,
185232
+ "tag:yaml.org,2002:merge": merge3.merge,
182866
185233
  "tag:yaml.org,2002:omap": omap.omap,
182867
185234
  "tag:yaml.org,2002:pairs": pairs.pairs,
182868
185235
  "tag:yaml.org,2002:set": set2.set,
@@ -182871,7 +185238,7 @@ var require_tags2 = __commonJS((exports) => {
182871
185238
  function getTags(customTags, schemaName, addMergeTag) {
182872
185239
  const schemaTags = schemas3.get(schemaName);
182873
185240
  if (schemaTags && !customTags) {
182874
- return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
185241
+ return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
182875
185242
  }
182876
185243
  let tags = schemaTags;
182877
185244
  if (!tags) {
@@ -182889,7 +185256,7 @@ var require_tags2 = __commonJS((exports) => {
182889
185256
  tags = customTags(tags.slice());
182890
185257
  }
182891
185258
  if (addMergeTag)
182892
- tags = tags.concat(merge2.merge);
185259
+ tags = tags.concat(merge3.merge);
182893
185260
  return tags.reduce((tags2, tag) => {
182894
185261
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
182895
185262
  if (!tagObj) {
@@ -182916,11 +185283,11 @@ var require_Schema2 = __commonJS((exports) => {
182916
185283
  var sortMapEntriesByKey = (a5, b8) => a5.key < b8.key ? -1 : a5.key > b8.key ? 1 : 0;
182917
185284
 
182918
185285
  class Schema2 {
182919
- constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
185286
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
182920
185287
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
182921
185288
  this.name = typeof schema === "string" && schema || "core";
182922
185289
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
182923
- this.tags = tags.getTags(customTags, this.name, merge2);
185290
+ this.tags = tags.getTags(customTags, this.name, merge3);
182924
185291
  this.toStringOptions = toStringDefaults ?? null;
182925
185292
  Object.defineProperty(this, identity.MAP, { value: map2.map });
182926
185293
  Object.defineProperty(this, identity.SCALAR, { value: string4.string });
@@ -184143,13 +186510,13 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
184143
186510
  return { mode, indent: indent3, chomp, comment, length };
184144
186511
  }
184145
186512
  function splitLines2(source2) {
184146
- const split = source2.split(/\n( *)/);
184147
- const first = split[0];
186513
+ const split2 = source2.split(/\n( *)/);
186514
+ const first = split2[0];
184148
186515
  const m7 = first.match(/^( *)/);
184149
186516
  const line0 = m7?.[1] ? [m7[1], first.slice(m7[1].length)] : ["", first];
184150
186517
  const lines = [line0];
184151
- for (let i5 = 1;i5 < split.length; i5 += 2)
184152
- lines.push([split[i5], split[i5 + 1]]);
186518
+ for (let i5 = 1;i5 < split2.length; i5 += 2)
186519
+ lines.push([split2[i5], split2[i5 + 1]]);
184153
186520
  return lines;
184154
186521
  }
184155
186522
  exports.resolveBlockScalar = resolveBlockScalar;
@@ -186797,7 +189164,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
186797
189164
  // package.json
186798
189165
  var package_default = {
186799
189166
  name: "@eigenpal/cli",
186800
- version: "0.8.0",
189167
+ version: "0.9.1",
186801
189168
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
186802
189169
  keywords: [
186803
189170
  "eigenpal",
@@ -188314,7 +190681,7 @@ async function pushCurrentBranch(input) {
188314
190681
  function slugifyPackageSegment(value) {
188315
190682
  return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
188316
190683
  }
188317
- function packagePathForTemplate(template, name) {
190684
+ function packagePathForTemplate(template2, name) {
188318
190685
  const slug = slugifyPackageSegment(name);
188319
190686
  if (!slug)
188320
190687
  throw new Error("Package name must include at least one letter or number.");
@@ -188326,7 +190693,7 @@ function packagePathForTemplate(template, name) {
188326
190693
  knowledge: "resources/knowledge",
188327
190694
  evaluator: "evaluators"
188328
190695
  };
188329
- const root = rootByTemplate[template];
190696
+ const root = rootByTemplate[template2];
188330
190697
  if (!root)
188331
190698
  throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
188332
190699
  return SourcePackagePathSchema.parse(`${root}/${slug}`);
@@ -188735,12 +191102,12 @@ function archivePackage(input) {
188735
191102
  runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
188736
191103
  cwd: input.gitRoot
188737
191104
  });
188738
- const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
191105
+ const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
188739
191106
  cwd: input.outDir,
188740
191107
  encoding: "utf8"
188741
191108
  });
188742
- if (extract.status !== 0)
188743
- throw new Error(extract.stderr.trim() || "tar extraction failed");
191109
+ if (extract2.status !== 0)
191110
+ throw new Error(extract2.stderr.trim() || "tar extraction failed");
188744
191111
  } finally {
188745
191112
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
188746
191113
  }
@@ -188769,12 +191136,12 @@ async function tryHostedArchive(input) {
188769
191136
  const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
188770
191137
  try {
188771
191138
  writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
188772
- const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
191139
+ const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
188773
191140
  cwd: input.outDir,
188774
191141
  encoding: "utf8"
188775
191142
  });
188776
- if (extract.status !== 0)
188777
- throw new Error(extract.stderr.trim() || "tar extraction failed");
191143
+ if (extract2.status !== 0)
191144
+ throw new Error(extract2.stderr.trim() || "tar extraction failed");
188778
191145
  return true;
188779
191146
  } finally {
188780
191147
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
@@ -188897,6 +191264,52 @@ function resolveAgentPackagePath(target) {
188897
191264
  return resolvePackagePath(target);
188898
191265
  return SourcePackagePathSchema.parse(`agents/${target}`);
188899
191266
  }
191267
+ function publicAgentAutomationTarget(target) {
191268
+ if (target.includes("/")) {
191269
+ return pathToDottedPackageName(SourcePackagePathSchema.parse(target));
191270
+ }
191271
+ if (target.startsWith("agents."))
191272
+ return target;
191273
+ if (/^[a-z]+_[a-zA-Z0-9]/.test(target) || target.includes(" ") || target.includes(".")) {
191274
+ return target;
191275
+ }
191276
+ return `agents.${target}`;
191277
+ }
191278
+ function formatTriggerState(triggers2) {
191279
+ if (!triggers2)
191280
+ return "";
191281
+ return ["api", "email", "manual", "cron"].filter((key) => triggers2[key]).join(",");
191282
+ }
191283
+ async function findAgentAutomationBySearch(client, target) {
191284
+ const payload = await client.get("/api/v1/automations", {
191285
+ type: "agent",
191286
+ search: target,
191287
+ limit: "100"
191288
+ });
191289
+ const candidates = payload.data ?? [];
191290
+ return candidates.find((automation) => automation.id === target || automation.slug === target || automation.name === target) ?? (candidates.length === 1 ? candidates[0] : null);
191291
+ }
191292
+ async function getPublicAgentAutomation(client, target) {
191293
+ const publicTarget = publicAgentAutomationTarget(target);
191294
+ try {
191295
+ const automation = await client.get(`/api/v1/automations/${encodeURIComponent(publicTarget)}`);
191296
+ if (automation.type !== "agent") {
191297
+ throw new Error(`Automation ${target} is not an agent.`);
191298
+ }
191299
+ return automation;
191300
+ } catch (err) {
191301
+ if (!(err instanceof ApiError) || err.status !== 404)
191302
+ throw err;
191303
+ }
191304
+ const resolved = await findAgentAutomationBySearch(client, target);
191305
+ if (!resolved) {
191306
+ throw new Error(`Agent automation not found: ${target}`);
191307
+ }
191308
+ if (resolved.type !== "agent") {
191309
+ throw new Error(`Automation ${target} is not an agent.`);
191310
+ }
191311
+ return resolved;
191312
+ }
188900
191313
  function isAutomationPackagePath(packagePath) {
188901
191314
  return packagePath.startsWith("agents/") || packagePath.startsWith("workflows/");
188902
191315
  }
@@ -188934,7 +191347,7 @@ function bumpReleaseVersion(releases, bump) {
188934
191347
  }
188935
191348
  async function syncLatestAutomation(client, packagePath) {
188936
191349
  const automation = pathToDottedPackageName(packagePath);
188937
- await client.post(`/api/automations/${encodeURIComponent(automation)}/sync`);
191350
+ await client.post(`/api/v1/automations/${encodeURIComponent(automation)}/sync`);
188938
191351
  success2(`Synced ${automation} to latest release.`);
188939
191352
  }
188940
191353
  async function cloneSource(opts) {
@@ -188954,52 +191367,38 @@ async function cloneSource(opts) {
188954
191367
  success2(`Cloned ${repo.remoteUrl}`);
188955
191368
  }
188956
191369
  async function show(target, opts) {
188957
- const packagePath = resolveAgentPackagePath(target);
188958
- const slug = packagePath.replace(/^agents\//, "");
188959
191370
  const client = new ApiClient(resolveConfig(opts));
188960
- const payload = await client.get(`/api/v1/agents/${encodeURIComponent(slug)}`, {
188961
- include: "files,dataset,runs"
188962
- });
191371
+ const automation = await getPublicAgentAutomation(client, target);
188963
191372
  if (opts.json)
188964
- console.log(JSON.stringify(payload, null, 2));
191373
+ console.log(JSON.stringify(automation, null, 2));
188965
191374
  else {
188966
- const agent = payload.agent;
191375
+ const slug = automation.slug ?? target;
188967
191376
  console.log(table([
188968
191377
  {
188969
191378
  type: "agent",
188970
- slug: agent.slug ?? slug,
188971
- path: packagePath,
188972
- name: agent.name ?? "",
188973
- status: agent.status ?? "",
188974
- source: agent.sourceIntegrity ?? "",
188975
- latest: agent.latestVersion ?? "",
188976
- commit: agent.latestCommit ?? ""
191379
+ id: automation.id ?? "",
191380
+ slug,
191381
+ path: `agents/${slug}`,
191382
+ name: automation.name ?? "",
191383
+ status: automation.status ?? "",
191384
+ version: automation.version ?? "",
191385
+ triggers: formatTriggerState(automation.triggers),
191386
+ implementation: automation.implementationAvailable === false ? "missing" : "available"
188977
191387
  }
188978
191388
  ], [
188979
191389
  { key: "type", header: "type" },
191390
+ { key: "id", header: "id" },
188980
191391
  { key: "slug", header: "slug" },
188981
191392
  { key: "path", header: "path" },
188982
191393
  { key: "name", header: "name" },
188983
191394
  { key: "status", header: "status" },
188984
- { key: "source", header: "source" },
188985
- { key: "latest", header: "latest" },
188986
- { key: "commit", header: "commit", format: (value) => String(value || "-").slice(0, 12) }
191395
+ { key: "version", header: "version" },
191396
+ { key: "triggers", header: "triggers" },
191397
+ { key: "implementation", header: "implementation" }
188987
191398
  ]));
188988
- if (agent.description)
191399
+ if (automation.description)
188989
191400
  console.log(`
188990
- description: ${agent.description}`);
188991
- const runs = agent.recentRuns ?? agent.runs ?? [];
188992
- console.log(`
188993
- recent runs`);
188994
- console.log(table(runs.slice(0, 5), [
188995
- { key: "id", header: "id" },
188996
- { key: "createdAt", header: "time", format: (value) => formatTimestamp(value) },
188997
- { key: "durationMs", header: "duration", format: (value) => formatDuration(Number(value)) },
188998
- { key: "triggeredBy", header: "triggered-by" },
188999
- { key: "requestedVersion", header: "requested" },
189000
- { key: "resolvedVersion", header: "resolved" },
189001
- { key: "status", header: "status" }
189002
- ]));
191401
+ description: ${automation.description}`);
189003
191402
  }
189004
191403
  }
189005
191404
  async function versions2(target, opts) {
@@ -190931,40 +193330,13 @@ function renderBatchDiffHuman(diff) {
190931
193330
  process.stderr.write(`${ui.dim("mean Δ:")} ${meanDeltaText} ` + `${ui.dim("examples shared:")} ${diff.summary.sharedExamples} ` + `${ui.dim("only in A:")} ${diff.summary.onlyInA.length} ` + `${ui.dim("only in B:")} ${diff.summary.onlyInB.length}
190932
193331
  `);
190933
193332
  }
190934
- async function fetchEvalResults(client, batchId) {
190935
- const runs = await listBatchRuns(client, batchId);
190936
- const results = [];
190937
- for (const run of runs) {
190938
- const payload = await client.get(`/api/v1/runs/${encodeURIComponent(run.id)}/eval-results`);
190939
- for (const result of payload.results ?? []) {
190940
- results.push({
190941
- exampleId: run.exampleId,
190942
- exampleName: run.exampleName,
190943
- evaluatorName: String(result.evaluatorName ?? ""),
190944
- score: typeof result.score === "number" ? result.score : null
190945
- });
190946
- }
193333
+ async function fetchEvalResults(client, experimentId) {
193334
+ const ref = await client.get(`/api/v1/experiments/${encodeURIComponent(experimentId)}`);
193335
+ const raw = await client.get(`/api/v1/automations/${encodeURIComponent(ref.automationId)}/experiments/${encodeURIComponent(experimentId)}/export`, { format: "json" });
193336
+ if (!raw || !Array.isArray(raw.results)) {
193337
+ throw new Error(`Unexpected experiment export response for ${experimentId}: missing 'results' array`);
190947
193338
  }
190948
- return { results };
190949
- }
190950
- async function listBatchRuns(client, batchId) {
190951
- const out = [];
190952
- let cursor;
190953
- do {
190954
- const query = { batchId, limit: "100" };
190955
- if (cursor)
190956
- query.cursor = cursor;
190957
- const page = await client.get("/api/v1/runs", query);
190958
- for (const run of page.runs ?? []) {
190959
- out.push({
190960
- id: run.id,
190961
- exampleId: run.eval?.exampleId ?? null,
190962
- exampleName: run.eval?.example ?? null
190963
- });
190964
- }
190965
- cursor = page.nextCursor ?? undefined;
190966
- } while (cursor);
190967
- return out;
193339
+ return raw;
190968
193340
  }
190969
193341
 
190970
193342
  // src/commands/agents/experiments.ts
@@ -190974,7 +193346,7 @@ function registerExperimentCommands(agent) {
190974
193346
  process.exit(2);
190975
193347
  });
190976
193348
  addJsonFlag(withBaseUrl(experiment.command("run <agent-id-or-slug>"))).description("Start an experiment over dataset examples.").option("--example-id <id>", "Run one dataset example").option("--wait", "Poll until the experiment reaches a terminal status").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).action(action(runExperiment));
190977
- addJsonFlag(withBaseUrl(experiment.command("status <agent-id-or-slug> <batch-id>"))).description("Get experiment status.").option("--watch", "Poll until complete").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exiting 2", intArg, 1800).option("--include <parts>", "Reserved for future detailed parts").action(action(experimentStatus));
193349
+ addJsonFlag(withBaseUrl(experiment.command("status <agent-id-or-slug> <batch-id>"))).description("Get experiment status.").option("--watch", "Poll until complete").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exit code 2", intArg, 1800).option("--include <parts>", "Reserved for future detailed parts").action(action(experimentStatus));
190978
193350
  withBaseUrl(experiment.command("results <agent-id-or-slug> [batch-id]")).description("Print experiment results as JSON or CSV.").requiredOption("--format <csv|json>", "Output format", parseResultsFormat).option("--out <path>", "Write output to file").action(action(experimentResults));
190979
193351
  addJsonFlag(withPagination(withBaseUrl(experiment.command("list <agent-id-or-slug>")), 50)).description("List experiments.").option("--batch-id <id>", "Filter to one batch id").action(action(listExperiments));
190980
193352
  addJsonFlag(withBaseUrl(experiment.command("compare <batch-id-a> <batch-id-b>"))).description("Diff eval scores between two experiment batches.").option("--sort <abs-delta-desc|delta-asc|delta-desc|name>", "Row sort order (default: biggest movers first)", "abs-delta-desc").option("--regression-threshold <n>", "Δ below this is flagged as a regression (default 0.05)", Number.parseFloat, 0.05).action(action(compareExperiments));
@@ -191078,8 +193450,10 @@ function registerAgentFileCommands(agent) {
191078
193450
  }
191079
193451
  async function listAgentFiles(agentId, opts) {
191080
193452
  const client = buildClient(opts);
191081
- const payload = await client.get(`/api/v1/agents/${encodeURIComponent(agentId)}/files`, {
191082
- ...opts.path ? { prefix: opts.path } : {}
193453
+ const packagePath = await resolveAgentPackagePath2(client, agentId);
193454
+ const payload = await client.get("/api/v1/source/tree", {
193455
+ packagePath,
193456
+ ...opts.path ? { prefix: normalizeAgentFilePath(opts.path, { allowEmpty: true }) } : {}
191083
193457
  });
191084
193458
  if (opts.json)
191085
193459
  return printJson(payload);
@@ -191087,9 +193461,7 @@ async function listAgentFiles(agentId, opts) {
191087
193461
  }
191088
193462
  async function getAgentFile(agentId, remotePath, opts) {
191089
193463
  const client = buildClient(opts);
191090
- const payload = await client.get(`/api/v1/agents/${encodeURIComponent(agentId)}/files`, {
191091
- path: remotePath
191092
- });
193464
+ const payload = await readAgentFile(client, agentId, remotePath);
191093
193465
  if (opts.json)
191094
193466
  return printJson(payload);
191095
193467
  const out = path10.resolve(opts.out ?? payload.path);
@@ -191106,11 +193478,9 @@ async function buildAgentFileDiff(agentId, remotePath, localPath, opts) {
191106
193478
  const client = buildClient(opts);
191107
193479
  const local = await fs6.readFile(localPath);
191108
193480
  let remote = null;
191109
- let serverPath = remotePath;
193481
+ let serverPath = normalizeAgentFilePath(remotePath);
191110
193482
  try {
191111
- const payload = await client.get(`/api/v1/agents/${encodeURIComponent(agentId)}/files`, {
191112
- path: remotePath
191113
- });
193483
+ const payload = await readAgentFile(client, agentId, remotePath);
191114
193484
  serverPath = String(payload.path ?? remotePath);
191115
193485
  remote = Buffer.from(String(payload.contentBase64 ?? ""), "base64");
191116
193486
  } catch (err2) {
@@ -191132,6 +193502,34 @@ async function buildAgentFileDiff(agentId, remotePath, localPath, opts) {
191132
193502
  textPreview: remote && isLikelyText(local) && isLikelyText(remote) ? buildTextDiffPreview(remote.toString("utf-8"), local.toString("utf-8")) : null
191133
193503
  };
191134
193504
  }
193505
+ async function resolveAgentPackagePath2(client, agentId) {
193506
+ const automation = await client.get(`/api/v1/automations/${encodeURIComponent(agentAutomationId(agentId))}`);
193507
+ if (automation.type !== "agent" || !automation.slug) {
193508
+ throw new Error(`Agent not found: ${agentId}`);
193509
+ }
193510
+ return `agents/${automation.slug}`;
193511
+ }
193512
+ async function readAgentFile(client, agentId, remotePath) {
193513
+ const packagePath = await resolveAgentPackagePath2(client, agentId);
193514
+ const relativePath = normalizeAgentFilePath(remotePath);
193515
+ const sourcePath = `${packagePath}/${relativePath}`;
193516
+ const payload = await client.get("/api/v1/source/raw", {
193517
+ path: sourcePath
193518
+ });
193519
+ return {
193520
+ path: relativePath,
193521
+ contentBase64: Buffer.from(payload.content).toString("base64"),
193522
+ contentType: payload.contentType
193523
+ };
193524
+ }
193525
+ function normalizeAgentFilePath(filePath, options = {}) {
193526
+ const raw = filePath.trim();
193527
+ const trimmed = raw.replace(/^agent\/+/, "").replace(/^\/+|\/+$/g, "");
193528
+ if (!trimmed && !options.allowEmpty || raw !== filePath || trimmed.includes("\x00") || trimmed.includes("\\") || trimmed.includes("..") || trimmed !== "" && trimmed.split("/").some((part) => part === "")) {
193529
+ throw new Error("Invalid agent file path");
193530
+ }
193531
+ return trimmed;
193532
+ }
191135
193533
  function renderAgentFileDiff(report) {
191136
193534
  const label = `File ${report.status}`;
191137
193535
  if (report.status === "match")
@@ -191259,7 +193657,7 @@ function levenshtein(a, b2, maxDistance) {
191259
193657
  }
191260
193658
  async function findSimilarSlug(client, slug) {
191261
193659
  try {
191262
- const res = await client.get("/api/v1/workflows", {
193660
+ const res = await client.get("/api/workflows", {
191263
193661
  search: slug,
191264
193662
  limit: "20"
191265
193663
  });
@@ -191284,13 +193682,13 @@ function notFound(idOrSlug, suggestion) {
191284
193682
  async function resolveWorkflowId(client, idOrSlug) {
191285
193683
  if (looksLikeWorkflowId(idOrSlug)) {
191286
193684
  try {
191287
- const wf = await client.get(`/api/v1/workflows/${idOrSlug}`);
193685
+ const wf = await client.get(`/api/workflows/${idOrSlug}`);
191288
193686
  return wf.id;
191289
193687
  } catch {
191290
193688
  throw notFound(idOrSlug, null);
191291
193689
  }
191292
193690
  }
191293
- const res = await client.get("/api/v1/workflows", { name: idOrSlug });
193691
+ const res = await client.get("/api/workflows", { name: idOrSlug });
191294
193692
  const match = res.data?.[0];
191295
193693
  if (!match) {
191296
193694
  const suggestion = await findSimilarSlug(client, idOrSlug);
@@ -191428,7 +193826,7 @@ function registerRunsCommands(program2) {
191428
193826
  listRunsCmd.action(action(listRuns));
191429
193827
  addJsonFlag(withBaseUrl(runs.command("get <run-id>"))).description("Get one run.").option("--step <name>", "For workflow runs, show only this step (or comma-separated list)").option("--expand <sections>", "Comma-separated server expand sections for GET /api/v1/runs/:id: input, usage, execution, debug. Use execution for status/schemaValid; completed runs include top-level output/files/error.").option("--include <parts>", "Comma-separated local workflow step projection fields (error, duration, inputRef, …). Legacy expand names are mapped when possible; use --expand for server sections.", "feedback").action(action(getRun));
191430
193828
  addJsonFlag(withBaseUrl(runs.command("compare <reference-run-id> <run-id>"))).description("Compare one run against another run. PDF/DOCX text comparison uses pdftotext/python3 and reports byte fallbacks.").option("--baseline", "Compare actual outputs from both runs instead of expected artifacts").option("--step <name>", "For workflow runs, restrict comparison to one step").option("--out <dir>", "Write comparison artifacts to this directory").option("--normalize-dates", "Normalize YYYYMMDD and YYYY-MM-DD tokens in filenames/text").option("--fail-on-diff", "Exit 1 when comparison status is fail").action(action(compareRun));
191431
- addJsonFlag(withBaseUrl(runs.command("rerun <run-id>"))).description("Create a new run from a previous run's stored input snapshot.").option("--version <version>", "Version/source ref for the new run: latest (default), original, or an explicit ref (same grammar as eigenpal run)").option("--source-ref <ref>", "Alias for --version").option("--wait", "Poll until the rerun reaches a terminal status").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exiting 2", intArg, 1800).action(action(rerunRun));
193829
+ addJsonFlag(withBaseUrl(runs.command("rerun <run-id>"))).description("Create a new run from a previous run's stored input snapshot.").option("--version <version>", "Version/source ref for the new run: latest (default), original, or an explicit ref (same grammar as eigenpal run)").option("--source-ref <ref>", "Alias for --version").option("--wait", "Poll until the rerun reaches a terminal status").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exit code 2", intArg, 1800).action(action(rerunRun));
191432
193830
  addJsonFlag(withBaseUrl(runs.command("promote <run-id>"))).description("Promote a run into a dataset example on the run's automation.").option("--name <name>", "Name for the created example").addHelpText("after", `
191433
193831
  Examples
191434
193832
  $ eigenpal runs promote run_abc123 --name golden-invoice
@@ -191446,7 +193844,7 @@ Use \`eigenpal runs feedback update\` first when you need to correct expected ou
191446
193844
  withBaseUrl(runs.command("trace <run-id>")).description("Print raw trace.jsonl for a run, or write it with --out.").option("--out <file>", "Output file path").action(action(traceRun));
191447
193845
  registerRunFeedbackCommands(runs);
191448
193846
  registerRunExpectedCommands(runs);
191449
- addJsonFlag(withBaseUrl(runs.command("watch <run-id>"))).description("Watch a run until it reaches a terminal status.").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exiting 2", intArg, 1800).action(action(watchRunCommand));
193847
+ addJsonFlag(withBaseUrl(runs.command("watch <run-id>"))).description("Watch a run until it reaches a terminal status.").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exit code 2", intArg, 1800).action(action(watchRunCommand));
191450
193848
  addJsonFlag(withBaseUrl(runs.command("cancel <run-id>"))).description("Cancel a run.").option("--yes", "Required in non-interactive environments").action(action(cancelRun));
191451
193849
  }
191452
193850
  function registerRunFeedbackCommands(runs) {
@@ -192251,12 +194649,12 @@ async function uploadRunExpected(executionId, file2, opts) {
192251
194649
  form.append("file", new Blob([data]), path11.basename(file2));
192252
194650
  if (opts.name)
192253
194651
  form.append("name", opts.name);
192254
- const payload = await client.postFormData(`/api/v1/runs/${encodeURIComponent(executionId)}/expected`, form);
194652
+ const payload = await client.postFormData(`/api/v1/runs/${encodeURIComponent(executionId)}/feedback/expected`, form);
192255
194653
  renderGeneric(payload, opts, `Uploaded expected file for ${executionId}`);
192256
194654
  }
192257
194655
  async function copyOutputToExpected(executionId, outputFile, opts) {
192258
194656
  const client = buildClient(opts);
192259
- const payload = await client.post(`/api/v1/runs/${encodeURIComponent(executionId)}/expected`, {
194657
+ const payload = await client.post(`/api/v1/runs/${encodeURIComponent(executionId)}/feedback/expected`, {
192260
194658
  outputFileName: outputFile,
192261
194659
  ...opts.name ? { expectedName: opts.name } : {}
192262
194660
  });
@@ -192264,7 +194662,7 @@ async function copyOutputToExpected(executionId, outputFile, opts) {
192264
194662
  }
192265
194663
  async function renameRunExpected(executionId, oldName, newName, opts) {
192266
194664
  const client = buildClient(opts);
192267
- const payload = await client.patch(`/api/v1/runs/${encodeURIComponent(executionId)}/expected/${encodeURIComponent(oldName)}`, { name: newName });
194665
+ const payload = await client.patch(`/api/v1/runs/${encodeURIComponent(executionId)}/feedback/expected/${encodeURIComponent(oldName)}`, { name: newName });
192268
194666
  renderGeneric(payload, opts, `Renamed expected file for ${executionId}`);
192269
194667
  }
192270
194668
  async function deleteRunExpected(executionId, name, opts) {
@@ -192272,7 +194670,7 @@ async function deleteRunExpected(executionId, name, opts) {
192272
194670
  throw new Error("Delete cancelled");
192273
194671
  }
192274
194672
  const client = buildClient(opts);
192275
- await client.delete(`/api/v1/runs/${encodeURIComponent(executionId)}/expected/${encodeURIComponent(name)}`);
194673
+ await client.delete(`/api/v1/runs/${encodeURIComponent(executionId)}/feedback/expected/${encodeURIComponent(name)}`);
192276
194674
  renderGeneric({ ok: true }, opts, `Deleted expected file ${name}`);
192277
194675
  }
192278
194676
  async function watchRunCommand(executionId, opts) {
@@ -192557,7 +194955,10 @@ function registerAgentCommands(program2) {
192557
194955
  }
192558
194956
  async function listAgents(opts) {
192559
194957
  const client = buildClient(opts);
192560
- const payload = await client.get("/api/v1/agents", compactParams(opts));
194958
+ const payload = await client.get("/api/v1/automations", {
194959
+ ...compactParams(opts),
194960
+ type: "agent"
194961
+ });
192561
194962
  if (opts.json)
192562
194963
  return printJson(payload);
192563
194964
  console.log(table(payload.data, [
@@ -193089,18 +195490,18 @@ async function init(name, opts) {
193089
195490
  if (existsSync11(target) && readdirSync2(target).length > 0) {
193090
195491
  throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
193091
195492
  }
193092
- let template;
195493
+ let template2;
193093
195494
  if (opts.template) {
193094
195495
  if (!isTemplateName(opts.template)) {
193095
195496
  throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
193096
195497
  }
193097
- template = opts.template;
195498
+ template2 = opts.template;
193098
195499
  } else if (opts.yes || !process.stdin.isTTY) {
193099
- template = "blank";
195500
+ template2 = "blank";
193100
195501
  } else {
193101
- template = await promptForTemplate();
195502
+ template2 = await promptForTemplate();
193102
195503
  }
193103
- const sourceRoot = join2(resolveTemplatesRoot(), template);
195504
+ const sourceRoot = join2(resolveTemplatesRoot(), template2);
193104
195505
  if (!existsSync11(sourceRoot)) {
193105
195506
  throw new Error(`Template directory missing on disk: ${sourceRoot}`);
193106
195507
  }
@@ -193470,32 +195871,69 @@ function getExampleNames(dir, exampleNamesFilter) {
193470
195871
  if (!baseDir) {
193471
195872
  throw new Error(`No dataset/examples directory found at ${join8(dir, ...DATASET_EXAMPLES_DIR)}. Run \`eigenpal init workflow <name>\` to scaffold one.`);
193472
195873
  }
193473
- const all = readdirSync4(baseDir).filter((name) => statSync4(join8(baseDir, name)).isDirectory() && existsSync14(join8(baseDir, name, "input", "arguments.json"))).sort((a5, b8) => a5.localeCompare(b8, undefined, { numeric: true }));
195874
+ const all = readdirSync4(baseDir).filter((name) => statSync4(join8(baseDir, name)).isDirectory() && existsSync14(join8(baseDir, name, "input.json"))).sort((a5, b8) => a5.localeCompare(b8, undefined, { numeric: true }));
193474
195875
  if (!exampleNamesFilter?.length)
193475
195876
  return all;
193476
195877
  return all.filter((n5) => exampleNamesFilter.includes(n5));
193477
195878
  }
193478
195879
  function readInput(exampleDir) {
193479
- const argsPath = join8(exampleDir, "input", "arguments.json");
193480
- const inputDir = join8(exampleDir, "input");
193481
- const scalars = JSON.parse(readFileSync13(argsPath, "utf-8"));
195880
+ const canonicalPath = join8(exampleDir, "input.json");
195881
+ return readCanonicalInput(exampleDir, canonicalPath);
195882
+ }
195883
+ function readCanonicalInput(exampleDir, inputPath) {
195884
+ const raw = JSON.parse(readFileSync13(inputPath, "utf-8"));
195885
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
195886
+ throw new Error(`${inputPath} must contain a JSON object.`);
195887
+ }
195888
+ const scalars = {};
193482
195889
  const files = [];
193483
- for (const entry of readdirSync4(inputDir)) {
193484
- const full = join8(inputDir, entry);
193485
- if (!statSync4(full).isDirectory())
195890
+ for (const [key2, value] of Object.entries(raw)) {
195891
+ const refs = topLevelFileRefs(value);
195892
+ if (refs.length === 0) {
195893
+ scalars[key2] = value;
193486
195894
  continue;
193487
- const filenames = readdirSync4(full).filter((f7) => statSync4(join8(full, f7)).isFile()).sort();
193488
- for (const filename of filenames) {
195895
+ }
195896
+ for (const ref of refs) {
195897
+ const relative3 = parseDatasetInputFileRef(ref);
195898
+ if (!relative3) {
195899
+ throw new Error(`${inputPath}: ${key2} must reference files under input/ without path traversal.`);
195900
+ }
195901
+ const filePath = join8(exampleDir, "input", relative3);
195902
+ const filename = relative3.split("/").at(-1) ?? relative3;
193489
195903
  files.push({
193490
- argument: entry,
195904
+ argument: key2,
193491
195905
  filename,
193492
- content: readFileSync13(join8(full, filename)),
195906
+ content: readFileSync13(filePath),
193493
195907
  mimeType: guessMimeType(filename)
193494
195908
  });
193495
195909
  }
193496
195910
  }
193497
195911
  return { scalars, files };
193498
195912
  }
195913
+ function topLevelFileRefs(value) {
195914
+ if (isFileRef(value))
195915
+ return [value.$file];
195916
+ if (Array.isArray(value) && value.every(isFileRef))
195917
+ return value.map((item) => item.$file);
195918
+ if (Array.isArray(value) && value.some(isFileRef)) {
195919
+ throw new Error('file arrays must contain only { "$file": "input/..." } entries.');
195920
+ }
195921
+ return [];
195922
+ }
195923
+ function isFileRef(value) {
195924
+ return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.$file === "string";
195925
+ }
195926
+ function parseDatasetInputFileRef(path15) {
195927
+ if (!path15.startsWith("input/"))
195928
+ return null;
195929
+ if (path15.startsWith("/") || path15.includes("\\") || path15.includes("\x00"))
195930
+ return null;
195931
+ const relative3 = path15.slice("input/".length);
195932
+ const parts = relative3.split("/");
195933
+ if (parts.some((part) => !part || part === "." || part === ".."))
195934
+ return null;
195935
+ return parts.join("/");
195936
+ }
193499
195937
  function readOverrides(exampleDir) {
193500
195938
  const metaPath = join8(exampleDir, "meta.json");
193501
195939
  if (!existsSync14(metaPath))
@@ -193772,8 +196210,8 @@ async function runSavedWorkflowExamples(workflow2, examples, opts) {
193772
196210
 
193773
196211
  // src/commands/run.ts
193774
196212
  function registerRunCommands(program2) {
193775
- addJsonFlag(withBaseUrl(program2.command("run <target>"))).description("Start a workflow or agent run, e.g. workflows.extract-invoice.").option("--input-json <json>", "JSON input object").option("--input-file <field=path>", 'Input file to upload as multipart form-data. Repeat for multiple files; bare paths use field "file".', collectRepeated, []).option("--example <name>", "Run one persisted example by name").option("--dir <dir>", "Local eigenpal directory for workflow examples", undefined).option("--wait", "Poll until the run reaches a terminal status").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exiting 2", intArg, 1800).action(action(runTarget));
193776
- addJsonFlag(withBaseUrl(program2.command("rerun <run-id>"))).description("Create a new run from a previous run's stored input snapshot.").option("--version <version>", "Version/source ref for the new run: latest, original, or an explicit ref", "latest").option("--wait", "Poll until the rerun reaches a terminal status").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exiting 2", intArg, 1800).action(action(rerunTarget));
196213
+ addJsonFlag(withBaseUrl(program2.command("run <target>"))).description("Start a workflow or agent run, e.g. workflows.extract-invoice.").option("--input-json <json>", "JSON input object").option("--input-file <field=path>", 'Input file to upload as multipart form-data. Repeat for multiple files; bare paths use field "file".', collectRepeated, []).option("--example <name>", "Run one persisted example by name").option("--dir <dir>", "Local eigenpal directory for workflow examples", undefined).option("--wait", "Poll until the run reaches a terminal status").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exit code 2", intArg, 1800).action(action(runTarget));
196214
+ addJsonFlag(withBaseUrl(program2.command("rerun <run-id>"))).description("Create a new run from a previous run's stored input snapshot.").option("--version <version>", "Version/source ref for the new run: latest, original, or an explicit ref", "latest").option("--wait", "Poll until the rerun reaches a terminal status").option("--interval <seconds>", "Polling interval in seconds", intArg, 2).option("--max-wait <seconds>", "Maximum wait before exit code 2", intArg, 1800).action(action(rerunTarget));
193777
196215
  }
193778
196216
  async function runTarget(target, opts) {
193779
196217
  const parsed = parseRunTarget(target);
@@ -194366,8 +196804,8 @@ async function status(opts) {
194366
196804
  }
194367
196805
  process.exit(1);
194368
196806
  }
194369
- const workflows = await fetchOrNull(client, "/api/v1/workflows?limit=1");
194370
- const workflowCount = typeof workflows?.total === "number" ? workflows.total : Array.isArray(workflows?.items) ? workflows.items.length : null;
196807
+ const workflows = await fetchOrNull(client, "/api/workflows?limit=1");
196808
+ const workflowCount = typeof workflows?.total === "number" ? workflows.total : Array.isArray(workflows?.data) ? workflows.data.length : Array.isArray(workflows?.items) ? workflows.items.length : null;
194371
196809
  if (opts.json) {
194372
196810
  console.log(JSON.stringify({
194373
196811
  authenticated: true,
@@ -195230,122 +197668,60 @@ function validateDatasetFolder(root2) {
195230
197668
  });
195231
197669
  continue;
195232
197670
  }
195233
- const argsPath = join13(exampleFolder, "input", "arguments.json");
195234
- if (!existsSync17(argsPath)) {
197671
+ const inputJsonPath = join13(exampleFolder, "input.json");
197672
+ const hasInputJson = existsSync17(inputJsonPath);
197673
+ if (!hasInputJson) {
195235
197674
  issues.push({
195236
- field: `examples/${exampleName}/input/arguments.json`,
195237
- message: "Missing required arguments.json."
197675
+ field: `examples/${exampleName}/input.json`,
197676
+ message: "Missing required input.json."
195238
197677
  });
195239
197678
  continue;
195240
197679
  }
195241
197680
  let args;
195242
197681
  try {
195243
- const parsed = JSON.parse(readFileSync15(argsPath, "utf-8"));
197682
+ const parsed = JSON.parse(readFileSync15(inputJsonPath, "utf-8"));
195244
197683
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
195245
197684
  issues.push({
195246
- field: `examples/${exampleName}/input/arguments.json`,
195247
- message: "arguments.json must be a JSON object."
197685
+ field: `examples/${exampleName}/input.json`,
197686
+ message: "input.json must be a JSON object."
195248
197687
  });
195249
197688
  continue;
195250
197689
  }
195251
197690
  args = parsed;
195252
197691
  } catch {
195253
197692
  issues.push({
195254
- field: `examples/${exampleName}/input/arguments.json`,
195255
- message: "arguments.json is not valid JSON."
197693
+ field: `examples/${exampleName}/input.json`,
197694
+ message: "input.json is not valid JSON."
195256
197695
  });
195257
197696
  continue;
195258
197697
  }
195259
197698
  const inputDir = join13(exampleFolder, "input");
195260
- for (const entry of readdirSync7(inputDir)) {
195261
- if (entry === "arguments.json")
195262
- continue;
195263
- const sub = join13(inputDir, entry);
195264
- const field = `examples/${exampleName}/input/${entry}`;
195265
- let isDir;
195266
- try {
195267
- isDir = statSync6(sub).isDirectory();
195268
- } catch (err2) {
195269
- issues.push({
195270
- field,
195271
- message: `unreadable filesystem entry: ${err2 instanceof Error ? err2.message : String(err2)}`
195272
- });
195273
- continue;
195274
- }
195275
- if (!isDir) {
195276
- issues.push({
195277
- field,
195278
- message: "Entries under input/ must live inside an argument folder."
195279
- });
195280
- continue;
195281
- }
195282
- if (!NAME_RE.test(entry)) {
195283
- issues.push({
195284
- field: `examples/${exampleName}/input/${entry}`,
195285
- message: "Argument folder name must be lowercase kebab/snake-case."
195286
- });
195287
- }
195288
- if (Object.prototype.hasOwnProperty.call(args, entry)) {
195289
- issues.push({
195290
- field: `examples/${exampleName}/input/${entry}`,
195291
- message: `Argument-name collision: "${entry}" appears in both arguments.json and as an input/ folder.`
195292
- });
195293
- }
197699
+ if (existsSync17(join13(inputDir, "arguments.json"))) {
197700
+ issues.push({
197701
+ field: `examples/${exampleName}/input/arguments.json`,
197702
+ message: "Legacy input/arguments.json is no longer accepted. Use input.json instead."
197703
+ });
197704
+ }
197705
+ const fileRefs = collectDatasetFileRefs(args);
197706
+ for (const issue2 of validateFileRefs({
197707
+ refs: fileRefs,
197708
+ filesRoot: inputDir,
197709
+ root: "input",
197710
+ fieldPrefix: `examples/${exampleName}/input.json`
197711
+ })) {
197712
+ issues.push(issue2);
195294
197713
  }
195295
197714
  const expectedDir = join13(exampleFolder, "expected");
197715
+ const expectedJsonPath = join13(exampleFolder, "expected.json");
195296
197716
  if (existsSync17(expectedDir)) {
195297
- const expectedPath = join13(expectedDir, "output.json");
195298
- const expectedErrorPath = join13(expectedDir, "error.json");
195299
- const hasExpectedOutput = existsSync17(expectedPath);
195300
- const hasExpectedError = existsSync17(expectedErrorPath);
195301
- if (hasExpectedOutput && hasExpectedError) {
195302
- issues.push({
195303
- field: `examples/${exampleName}/expected`,
195304
- message: "expected/output.json and expected/error.json are mutually exclusive (pick success-expected OR failure-expected)."
195305
- });
195306
- }
195307
- if (hasExpectedOutput) {
195308
- let parsed;
195309
- try {
195310
- parsed = JSON.parse(readFileSync15(expectedPath, "utf-8"));
195311
- } catch {
195312
- issues.push({
195313
- field: `examples/${exampleName}/expected/output.json`,
195314
- message: "expected/output.json is not valid JSON."
195315
- });
195316
- continue;
195317
- }
195318
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
195319
- issues.push({
195320
- field: `examples/${exampleName}/expected/output.json`,
195321
- message: "expected/output.json must be a JSON object (mirrors the workflow `output:` shape)."
195322
- });
195323
- }
195324
- }
195325
- if (hasExpectedError) {
195326
- let parsed;
195327
- try {
195328
- parsed = JSON.parse(readFileSync15(expectedErrorPath, "utf-8"));
195329
- } catch {
197717
+ for (const entry of readdirSync7(expectedDir)) {
197718
+ if (entry === "output.json" || entry === "error.json") {
195330
197719
  issues.push({
195331
- field: `examples/${exampleName}/expected/error.json`,
195332
- message: "expected/error.json is not valid JSON."
197720
+ field: `examples/${exampleName}/expected/${entry}`,
197721
+ message: "Legacy expected files are no longer accepted. Use expected.json instead."
195333
197722
  });
195334
197723
  continue;
195335
197724
  }
195336
- const result = ExpectedErrorSchema.safeParse(parsed);
195337
- if (!result.success) {
195338
- for (const err2 of result.error.issues) {
195339
- issues.push({
195340
- field: `examples/${exampleName}/expected/error.json${err2.path.length > 0 ? `:${err2.path.join(".")}` : ""}`,
195341
- message: err2.message
195342
- });
195343
- }
195344
- }
195345
- }
195346
- for (const entry of readdirSync7(expectedDir)) {
195347
- if (entry === "output.json" || entry === "error.json")
195348
- continue;
195349
197725
  const sub = join13(expectedDir, entry);
195350
197726
  const field = `examples/${exampleName}/expected/${entry}`;
195351
197727
  let isDir;
@@ -195361,7 +197737,7 @@ function validateDatasetFolder(root2) {
195361
197737
  if (!isDir) {
195362
197738
  issues.push({
195363
197739
  field,
195364
- message: "Entries under expected/ must be `output.json`, `error.json`, or a doc folder (`expected/<docKey>/<file>`)."
197740
+ message: 'Entries under expected/ must be file folders referenced from expected.json with { "$file": "expected/..." }.'
195365
197741
  });
195366
197742
  continue;
195367
197743
  }
@@ -195373,6 +197749,43 @@ function validateDatasetFolder(root2) {
195373
197749
  }
195374
197750
  }
195375
197751
  }
197752
+ if (existsSync17(expectedJsonPath)) {
197753
+ let parsed;
197754
+ try {
197755
+ parsed = JSON.parse(readFileSync15(expectedJsonPath, "utf-8"));
197756
+ } catch {
197757
+ issues.push({
197758
+ field: `examples/${exampleName}/expected.json`,
197759
+ message: "expected.json is not valid JSON."
197760
+ });
197761
+ continue;
197762
+ }
197763
+ if (isExpectedErrorRef(parsed)) {
197764
+ const result = ExpectedErrorSchema.safeParse(parsed.$error);
197765
+ if (!result.success) {
197766
+ for (const err2 of result.error.issues) {
197767
+ issues.push({
197768
+ field: `examples/${exampleName}/expected.json:$error${err2.path.length > 0 ? `.${err2.path.join(".")}` : ""}`,
197769
+ message: err2.message
197770
+ });
197771
+ }
197772
+ }
197773
+ } else if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
197774
+ issues.push({
197775
+ field: `examples/${exampleName}/expected.json`,
197776
+ message: "expected.json must be a JSON object."
197777
+ });
197778
+ } else {
197779
+ for (const issue2 of validateFileRefs({
197780
+ refs: collectDatasetFileRefs(parsed),
197781
+ filesRoot: join13(exampleFolder, "expected"),
197782
+ root: "expected",
197783
+ fieldPrefix: `examples/${exampleName}/expected.json`
197784
+ })) {
197785
+ issues.push(issue2);
197786
+ }
197787
+ }
197788
+ }
195376
197789
  }
195377
197790
  return issues;
195378
197791
  }
@@ -195390,6 +197803,54 @@ function printIssues(label2, path15, issues) {
195390
197803
  console.error("");
195391
197804
  return false;
195392
197805
  }
197806
+ function isFileRef2(value) {
197807
+ return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.$file === "string";
197808
+ }
197809
+ function isExpectedErrorRef(value) {
197810
+ return value !== null && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 1 && Object.prototype.hasOwnProperty.call(value, "$error");
197811
+ }
197812
+ function collectDatasetFileRefs(value, jsonPath = "<root>") {
197813
+ if (isFileRef2(value))
197814
+ return [{ path: value.$file, jsonPath }];
197815
+ if (Array.isArray(value)) {
197816
+ return value.flatMap((item, index) => collectDatasetFileRefs(item, `${jsonPath}.${index}`));
197817
+ }
197818
+ if (value && typeof value === "object") {
197819
+ return Object.entries(value).flatMap(([key2, item]) => collectDatasetFileRefs(item, jsonPath === "<root>" ? key2 : `${jsonPath}.${key2}`));
197820
+ }
197821
+ return [];
197822
+ }
197823
+ function validateFileRefs(args) {
197824
+ const issues = [];
197825
+ for (const ref of args.refs) {
197826
+ const relative4 = parseDatasetFileRef(ref.path, args.root);
197827
+ if (!relative4) {
197828
+ issues.push({
197829
+ field: `${args.fieldPrefix}:${ref.jsonPath}`,
197830
+ message: `File reference must point inside ${args.root}/ and must not contain path traversal.`
197831
+ });
197832
+ continue;
197833
+ }
197834
+ if (!existsSync17(join13(args.filesRoot, relative4))) {
197835
+ issues.push({
197836
+ field: `${args.fieldPrefix}:${ref.jsonPath}`,
197837
+ message: `Referenced file does not exist: ${ref.path}.`
197838
+ });
197839
+ }
197840
+ }
197841
+ return issues;
197842
+ }
197843
+ function parseDatasetFileRef(path15, root2) {
197844
+ if (!path15.startsWith(`${root2}/`))
197845
+ return null;
197846
+ if (path15.startsWith("/") || path15.includes("\\") || path15.includes("\x00"))
197847
+ return null;
197848
+ const relative4 = path15.slice(root2.length + 1);
197849
+ const parts = relative4.split("/");
197850
+ if (parts.some((part) => !part || part === "." || part === ".."))
197851
+ return null;
197852
+ return parts.join("/");
197853
+ }
195393
197854
  function rootDir(opts) {
195394
197855
  return resolve6(opts.dir ?? process.cwd());
195395
197856
  }
@@ -195577,7 +198038,7 @@ function registerWorkflowCoreCommands(parent) {
195577
198038
  };
195578
198039
  if (opts.search)
195579
198040
  params.search = opts.search;
195580
- const raw = await client.get("/api/v1/workflows", params);
198041
+ const raw = await client.get("/api/workflows", params);
195581
198042
  renderListResult(raw, [
195582
198043
  { key: "id", header: "id" },
195583
198044
  { key: "name", header: "name", format: (v11) => typeof v11 === "string" ? v11 : "-" },
@@ -195588,7 +198049,7 @@ function registerWorkflowCoreCommands(parent) {
195588
198049
  const pullCmd = parent.command("pull <workflow-id>").description(descriptionFor("workflow_get_definition")).option("--out <path>", "Write YAML to file instead of stdout");
195589
198050
  withBaseUrl(pullCmd).action(action(async (workflow2, opts) => {
195590
198051
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
195591
- const result = await client.get(`/api/v1/workflows/${workflowId}`);
198052
+ const result = await client.get(`/api/workflows/${workflowId}`);
195592
198053
  if (typeof result?.yamlContent !== "string" || result.yamlContent.length === 0) {
195593
198054
  throw new Error(`Workflow ${workflowId} has no published version yet, nothing to pull. Run \`eigenpal workflow push\` first.`);
195594
198055
  }
@@ -195659,7 +198120,7 @@ flag would otherwise shadow it. Validation failures come back as
195659
198120
  if (opts.setVersion) {
195660
198121
  nextVersion = opts.setVersion;
195661
198122
  } else if (opts.bump) {
195662
- const wf3 = await client.get(`/api/v1/workflows/${workflowId}`);
198123
+ const wf3 = await client.get(`/api/workflows/${workflowId}`);
195663
198124
  const current = wf3?.version;
195664
198125
  if (!current) {
195665
198126
  throw new Error(`Cannot --bump ${opts.bump} on ${workflowId}: server has no current version. Push an initial version (with \`--set-version 1.0.0\` or a YAML \`version:\` field) first.`);
@@ -195676,7 +198137,7 @@ flag would otherwise shadow it. Validation failures come back as
195676
198137
  process.exit(1);
195677
198138
  }
195678
198139
  const yamlToSend = cliWantsRewrite ? spliceWorkflowVersion2(yamlOnDisk, nextVersion) : yamlOnDisk;
195679
- const result = await client.post(`/api/v1/workflows/${workflowId}/versions`, {
198140
+ const result = await client.post(`/api/workflows/${workflowId}/versions`, {
195680
198141
  yaml: yamlToSend,
195681
198142
  version: nextVersion
195682
198143
  });
@@ -195692,7 +198153,7 @@ flag would otherwise shadow it. Validation failures come back as
195692
198153
  }
195693
198154
  const yamlToSend = opts.setVersion && !extractWorkflowVersion(yamlOnDisk) ? spliceWorkflowVersion2(yamlOnDisk, opts.setVersion) : yamlOnDisk;
195694
198155
  const createVersion = opts.setVersion ?? extractWorkflowVersion(yamlToSend) ?? undefined;
195695
- const result = await client.post("/api/v1/workflows", {
198156
+ const result = await client.post("/api/workflows", {
195696
198157
  yaml: yamlToSend,
195697
198158
  ...createVersion ? { version: createVersion } : {}
195698
198159
  });
@@ -195709,7 +198170,7 @@ flag would otherwise shadow it. Validation failures come back as
195709
198170
  const moveCmd = parent.command("move <workflow-id>").description("Move a workflow to a folder path, creating folders as needed").requiredOption("--folder <path>", "Target folder path (`/` for root)");
195710
198171
  addJsonFlag(withBaseUrl(moveCmd)).action(action(async (workflow2, opts) => {
195711
198172
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
195712
- const result = await client.patch(`/api/v1/workflows/${workflowId}`, {
198173
+ const result = await client.patch(`/api/workflows/${workflowId}`, {
195713
198174
  folderPath: opts.folder
195714
198175
  });
195715
198176
  if (opts.json) {
@@ -195898,19 +198359,12 @@ skip in CI). Folder layout reference: \`packages/cli/src/skill/reference/dataset
195898
198359
  process.stderr.write(` ${ui.dim(`size cap: ${errPayload.limitMb} MB, archive: ${errPayload.actualMb} MB`)}
195899
198360
  `);
195900
198361
  }
195901
- const codes2 = new Set(issues.map((i5) => i5.code).filter(Boolean));
195902
- if (codes2.has("invalid_expected_output")) {
198362
+ if (issues.some((i5) => i5.code === "invalid_expected_output")) {
195903
198363
  process.stderr.write(`
195904
- ${ui.dim("hint:")} ${ui.bold("expected/output.json")} must be a JSON object mirroring your workflow ${ui.bold("output:")} shape.
195905
- ` + ` For expected file outputs, drop binaries under ${ui.bold("expected/<docKey>/<file>")}.
198364
+ ${ui.dim("hint:")} ${ui.bold("expected.json")} must be a JSON object mirroring your automation output.
198365
+ ` + ` For expected files, reference binaries from JSON with ${ui.bold('{ "$file": "expected/<path>" }')}.
195906
198366
  ` + ` See ${ui.bold("reference/dataset-format.md")} or run ${ui.bold("eigenpal workflow dataset validate ./dataset")}.
195907
198367
 
195908
- `);
195909
- }
195910
- if (codes2.has("argument_name_collision")) {
195911
- process.stderr.write(`
195912
- ${ui.dim("hint:")} an arg cannot live in both ${ui.bold("arguments.json")} AND ${ui.bold("input/<arg>/")}; pick one.
195913
-
195914
198368
  `);
195915
198369
  }
195916
198370
  }
@@ -195926,7 +198380,7 @@ skip in CI). Folder layout reference: \`packages/cli/src/skill/reference/dataset
195926
198380
  const expectedSet = done.expectedSet ?? 0;
195927
198381
  success2(`Imported ${created} example${created === 1 ? "" : "s"}` + (done.mode === "replace" && done.deleted != null ? ` ${ui.dim(`(replaced ${done.deleted}, freed ${done.filesDeleted ?? 0} files)`)}` : ""));
195928
198382
  if (created > 0 && expectedSet < created) {
195929
- warn(`${expectedSet}/${created} examples have expected/output.json — the rest will run un-graded.`);
198383
+ warn(`${expectedSet}/${created} examples have expected.json — the rest will run un-graded.`);
195930
198384
  } else if (expectedSet > 0) {
195931
198385
  process.stderr.write(` ${ui.dim(`${expectedSet} with expected output`)}
195932
198386
  `);
@@ -195980,8 +198434,8 @@ Examples:
195980
198434
  $ cat expected.json | eigenpal workflow dataset example create wf_abc123 --name piped --input-json '{}' --expected-file -
195981
198435
 
195982
198436
  \`--input-json\` and \`--input-file\` (same for \`--expected-*\`) are mutually
195983
- exclusive. File-arg uploads still require a full \`dataset push\`; CRUD only
195984
- handles scalar args + \`expected/output.json\`-style outputs.
198437
+ exclusive. File uploads still require a full \`dataset push\`; CRUD only
198438
+ handles JSON input + \`expected.json\`-style outputs.
195985
198439
  `);
195986
198440
  addJsonFlag(withBaseUrl(createCmd)).action(action(async (workflow2, opts) => {
195987
198441
  const triggerInput = await readJsonInput(opts.inputJson, opts.inputFile, "input");
@@ -196298,9 +198752,8 @@ Behavior:
196298
198752
  withBaseUrl(resultsCmd).action(action(async (workflow2, batchId, opts) => {
196299
198753
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
196300
198754
  const params = new URLSearchParams({ format: opts.format });
196301
- if (batchId)
196302
- params.set("batchId", batchId);
196303
- await downloadStreamToFile2(client, `/api/v1/workflows/${workflowId}/eval-results/export?${params.toString()}`, opts.out);
198755
+ const exportPath = batchId ? `/api/v1/automations/${workflowId}/experiments/${batchId}/export?${params.toString()}` : `/api/v1/automations/${workflowId}/experiments/export?${params.toString()}`;
198756
+ await downloadStreamToFile2(client, exportPath, opts.out);
196304
198757
  }));
196305
198758
  const compareCmd = experiment.command("compare <batchIdA> <batchIdB>").description("Diff eval scores between two experiment batches.").option("--sort <abs-delta-desc|delta-asc|delta-desc|name>", "Row sort order (default: biggest movers first)", "abs-delta-desc").option("--regression-threshold <n>", "Δ below this is flagged as a regression (default 0.05)", Number.parseFloat, 0.05).addHelpText("after", `
196306
198759
  Examples:
@@ -196386,9 +198839,9 @@ Behavior:
196386
198839
  onTerminal: async () => {
196387
198840
  if (!dest)
196388
198841
  return;
196389
- const params = new URLSearchParams({ format: opts.format, batchId });
198842
+ const params = new URLSearchParams({ format: opts.format });
196390
198843
  try {
196391
- await downloadStreamToFile2(client, `/api/v1/workflows/${workflowId}/eval-results/export?${params.toString()}`, dest);
198844
+ await downloadStreamToFile2(client, `/api/v1/automations/${workflowId}/experiments/${batchId}/export?${params.toString()}`, dest);
196392
198845
  } catch (err2) {
196393
198846
  error51(`Watch finished but pulling results failed: ${err2 instanceof Error ? err2.message : String(err2)}. Re-run \`experiment results <wf> <batch>\` to retry.`);
196394
198847
  process.exit(1);
@@ -196515,7 +198968,7 @@ function registerVersionsCommands(parent) {
196515
198968
  const listCmd = versions3.command("list <workflow-id>").description(descriptionFor("workflow_list_versions"));
196516
198969
  addJsonFlag(withBaseUrl(withPagination(listCmd))).action(action(async (workflow2, opts) => {
196517
198970
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
196518
- const raw = await client.get(`/api/v1/workflows/${workflowId}/versions`, {
198971
+ const raw = await client.get(`/api/workflows/${workflowId}/versions`, {
196519
198972
  limit: String(opts.limit),
196520
198973
  offset: String(opts.offset)
196521
198974
  });
@@ -196529,7 +198982,7 @@ function registerVersionsCommands(parent) {
196529
198982
  const restoreCmd = versions3.command("restore <workflow-id> <versionId>").description(descriptionFor("workflow_restore_version"));
196530
198983
  addJsonFlag(withBaseUrl(restoreCmd)).action(action(async (workflow2, versionId, opts) => {
196531
198984
  const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
196532
- const result = await client.post(`/api/v1/workflows/${workflowId}/history/${versionId}/restore`, {});
198985
+ const result = await client.post(`/api/workflows/${workflowId}/history/${versionId}/restore`, {});
196533
198986
  if (opts.json) {
196534
198987
  printJson2(result);
196535
198988
  return;