@eigenpal/cli 0.10.4 → 0.10.5

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,2713 @@ var require_picocolors = __commonJS((exports, module) => {
17080
17080
  module.exports.createColors = createColors;
17081
17081
  });
17082
17082
 
17083
+ // ../../node_modules/nanoid/url-alphabet/index.js
17084
+ var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
17085
+
17086
+ // ../../node_modules/nanoid/index.js
17087
+ import { webcrypto as crypto } from "node:crypto";
17088
+ function fillPool(bytes) {
17089
+ if (!pool || pool.length < bytes) {
17090
+ pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
17091
+ crypto.getRandomValues(pool);
17092
+ poolOffset = 0;
17093
+ } else if (poolOffset + bytes > pool.length) {
17094
+ crypto.getRandomValues(pool);
17095
+ poolOffset = 0;
17096
+ }
17097
+ poolOffset += bytes;
17098
+ }
17099
+ function nanoid3(size = 21) {
17100
+ fillPool(size |= 0);
17101
+ let id = "";
17102
+ for (let i = poolOffset - size;i < poolOffset; i++) {
17103
+ id += urlAlphabet[pool[i] & 63];
17104
+ }
17105
+ return id;
17106
+ }
17107
+ var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
17108
+ var init_nanoid = () => {};
17109
+
17110
+ // ../types/src/core/common.ts
17111
+ function generateId(prefix) {
17112
+ const id = nanoid3();
17113
+ return prefix ? `${prefix}_${id}` : id;
17114
+ }
17115
+ function toJsonSchema(schema) {
17116
+ return exports_external.toJSONSchema(schema, { target: "draft-7" });
17117
+ }
17118
+ var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
17119
+ var init_common = __esm(() => {
17120
+ init_nanoid();
17121
+ init_zod();
17122
+ ID_PREFIXES = {
17123
+ WORKFLOW: "wf",
17124
+ WORKFLOW_VERSION: "wfv",
17125
+ WORKFLOW_HISTORY: "wfh",
17126
+ JOB: "job",
17127
+ EXECUTION: "exec",
17128
+ STEP_EXECUTION: "step",
17129
+ FILE: "file",
17130
+ TEMPLATE: "tmpl",
17131
+ USER: "user",
17132
+ TENANT: "org",
17133
+ TENANT_INVITE: "inv",
17134
+ API_KEY: "eig",
17135
+ PROCESSOR: "proc",
17136
+ AI_PROVIDER: "aip",
17137
+ ACCOUNT: "acct",
17138
+ SESSION: "sess",
17139
+ VERIFICATION: "vrf",
17140
+ DATASET: "ds",
17141
+ DATASET_EXAMPLE: "dex",
17142
+ EXPERIMENT: "exp",
17143
+ EXPERIMENT_RUN: "exr",
17144
+ EXPERIMENT_EVALUATION: "evl",
17145
+ EVAL_EXAMPLE: "evx",
17146
+ EVAL_RESULT: "evr",
17147
+ EVAL_BATCH: "evb",
17148
+ RUN_REVIEW: "rev",
17149
+ RUN_REVIEW_CORRECTION: "rvc",
17150
+ TABLE_ROW: "row",
17151
+ FOLDER: "fldr",
17152
+ AGENT_WORKFLOW: "awf",
17153
+ AGENT_EXECUTION: "aex",
17154
+ AGENT_EXAMPLE: "aeg",
17155
+ AGENT_VERSION: "avr",
17156
+ AGENT_TRAINING_SESSION: "ats",
17157
+ AGENT_EXPERIMENT: "aexp",
17158
+ AGENT_EMAIL_ALIAS: "aea",
17159
+ AGENT_EMAIL_INVOCATION: "aei",
17160
+ AUTOMATION_TRIGGER: "atr",
17161
+ FILE_SOURCE_CONFIG: "fsc",
17162
+ SANDBOX_WS_TOKEN: "sws"
17163
+ };
17164
+ TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
17165
+ return typeof val === "string" ? new Date(val) : val;
17166
+ });
17167
+ JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
17168
+ BaseEntitySchema = exports_external.object({
17169
+ id: exports_external.string(),
17170
+ createdAt: TimestampSchema.optional(),
17171
+ updatedAt: TimestampSchema.optional()
17172
+ });
17173
+ });
17174
+
17175
+ // ../types/src/core/ids.ts
17176
+ var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
17177
+ var init_ids = __esm(() => {
17178
+ PROCESSOR_IDS = {
17179
+ MERGE: "builtin/merge",
17180
+ DOCUMENT_PARSER: "builtin/parser",
17181
+ EXTRACT: "builtin/extract",
17182
+ SPLIT: "builtin/split",
17183
+ CLASSIFY: "builtin/classify",
17184
+ TEMPLATE: "builtin/template",
17185
+ PDF_EMBEDDER: "builtin/pdf-embedder",
17186
+ XLSX_TO_JSON: "builtin/xlsx-to-json"
17187
+ };
17188
+ PARSER_IDS = {
17189
+ KREUZBERG: "builtin/kreuzberg",
17190
+ OCR: "builtin/ocr",
17191
+ LLM_VISION: "builtin/llm-vision"
17192
+ };
17193
+ INPUT_KINDS = {
17194
+ DOCUMENT: "document",
17195
+ PAYLOAD: "payload"
17196
+ };
17197
+ });
17198
+
17199
+ // ../types/src/core/pagination.ts
17200
+ var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
17201
+ var init_pagination = __esm(() => {
17202
+ init_zod();
17203
+ PaginationParamsSchema = exports_external.object({
17204
+ limit: exports_external.coerce.number().int().min(1).max(100).default(50),
17205
+ offset: exports_external.coerce.number().int().min(0).default(0)
17206
+ });
17207
+ });
17208
+
17083
17209
  // ../types/src/core/index.ts
17084
- var init_core3 = () => {};
17210
+ var init_core3 = __esm(() => {
17211
+ init_common();
17212
+ init_ids();
17213
+ init_pagination();
17214
+ });
17215
+
17216
+ // ../types/src/files/legacy-boundary.ts
17217
+ var LEGACY_FILE_REF_COMPATIBILITY;
17218
+ var init_legacy_boundary = __esm(() => {
17219
+ LEGACY_FILE_REF_COMPATIBILITY = [
17220
+ {
17221
+ id: "legacy-workflow-execution-routes",
17222
+ description: "Old workflow execution list/detail routes may hydrate historical { fileId } trigger inputs for display only."
17223
+ },
17224
+ {
17225
+ id: "rerun-old-immutable-runs",
17226
+ description: "Rerun may remap historical immutable { fileId } trigger inputs while copying those bytes into the new run."
17227
+ },
17228
+ {
17229
+ id: "processor-adapter-runtime-handles",
17230
+ description: "Executor/headless/CLI adapters may normalize local, S3, inline, or fileId runtime handles into private ResolvedProcessorFile objects before processor invocation."
17231
+ }
17232
+ ];
17233
+ });
17234
+
17235
+ // ../types/src/files/runtime-file-ref.ts
17236
+ function isRuntimeFileRef(input) {
17237
+ return RuntimeFileRefSchema.safeParse(input).success;
17238
+ }
17239
+ function isFilePathDescriptor(input) {
17240
+ return FilePathDescriptorSchema.safeParse(input).success;
17241
+ }
17242
+ function isResolvedProcessorFile(input) {
17243
+ return ResolvedProcessorFileSchema.safeParse(input).success;
17244
+ }
17245
+ function normalizeLegacyFileIdInput(input) {
17246
+ return {
17247
+ kind: "file",
17248
+ fileId: input.fileId,
17249
+ ...input.filename ? { filename: input.filename } : {},
17250
+ ...input.mimeType ? { mimeType: input.mimeType } : {}
17251
+ };
17252
+ }
17253
+ var DbFileRefSchema, LegacyFileIdInputSchema, LocalFileRefSchema, S3FileRefSchema, InlineFileRefSchema, RuntimeFileRefSchema, FilePathDescriptorSchema, ResolvedProcessorFileSchema, STRING_SCHEMA, WORKFLOW_FILE_REF_JSON_SCHEMA;
17254
+ var init_runtime_file_ref = __esm(() => {
17255
+ init_zod();
17256
+ DbFileRefSchema = exports_external.object({
17257
+ kind: exports_external.literal("file"),
17258
+ fileId: exports_external.string().describe("File ID from files table"),
17259
+ filename: exports_external.string().optional().describe("Original filename"),
17260
+ mimeType: exports_external.string().optional().describe("MIME type")
17261
+ });
17262
+ LegacyFileIdInputSchema = exports_external.object({
17263
+ kind: exports_external.never().optional(),
17264
+ fileId: exports_external.string().describe("File ID from files table"),
17265
+ filename: exports_external.string().optional().describe("Original filename"),
17266
+ mimeType: exports_external.string().optional().describe("MIME type")
17267
+ });
17268
+ LocalFileRefSchema = exports_external.object({
17269
+ kind: exports_external.literal("local"),
17270
+ path: exports_external.string().describe("Absolute path to a file on disk"),
17271
+ filename: exports_external.string().describe("Original filename"),
17272
+ mimeType: exports_external.string().describe("MIME type of the file")
17273
+ });
17274
+ S3FileRefSchema = exports_external.object({
17275
+ kind: exports_external.literal("s3"),
17276
+ ref: exports_external.string().describe("Storage key (suffix-only, prefix added by adapter)"),
17277
+ filename: exports_external.string().describe("Original filename"),
17278
+ mimeType: exports_external.string().describe("MIME type of the file")
17279
+ });
17280
+ InlineFileRefSchema = exports_external.object({
17281
+ kind: exports_external.literal("inline"),
17282
+ base64: exports_external.string().describe("Base64-encoded file bytes"),
17283
+ filename: exports_external.string().describe("Original filename"),
17284
+ mimeType: exports_external.string().describe("MIME type of the file")
17285
+ });
17286
+ RuntimeFileRefSchema = exports_external.discriminatedUnion("kind", [
17287
+ DbFileRefSchema,
17288
+ LocalFileRefSchema,
17289
+ S3FileRefSchema,
17290
+ InlineFileRefSchema
17291
+ ]);
17292
+ FilePathDescriptorSchema = exports_external.discriminatedUnion("kind", [
17293
+ LocalFileRefSchema,
17294
+ S3FileRefSchema,
17295
+ InlineFileRefSchema
17296
+ ]);
17297
+ ResolvedProcessorFileSchema = exports_external.object({
17298
+ __eigenpalFile: exports_external.literal(true),
17299
+ source: exports_external.enum(["db", "tenant-s3", "local", "inline"]),
17300
+ filename: exports_external.string().describe("Display filename for processor logs and parser routing"),
17301
+ mimeType: exports_external.string().describe("MIME type for processor routing"),
17302
+ fileId: exports_external.string().optional().describe("Legacy files-table id for db-backed handles"),
17303
+ ref: exports_external.string().optional().describe("Tenant-scoped storage key suffix for S3-backed handles"),
17304
+ path: exports_external.string().optional().describe("Local filesystem path for headless/CLI handles"),
17305
+ base64: exports_external.string().optional().describe("Base64 bytes for inline handles")
17306
+ }).strict();
17307
+ STRING_SCHEMA = { type: "string" };
17308
+ WORKFLOW_FILE_REF_JSON_SCHEMA = {
17309
+ "x-eigenpal-type": "file",
17310
+ type: "object",
17311
+ anyOf: [
17312
+ {
17313
+ type: "object",
17314
+ required: ["$file"],
17315
+ additionalProperties: false,
17316
+ properties: {
17317
+ $file: STRING_SCHEMA
17318
+ }
17319
+ },
17320
+ {
17321
+ type: "object",
17322
+ required: ["$fileId"],
17323
+ additionalProperties: false,
17324
+ properties: {
17325
+ $fileId: STRING_SCHEMA
17326
+ }
17327
+ },
17328
+ {
17329
+ type: "object",
17330
+ required: ["$inline"],
17331
+ additionalProperties: false,
17332
+ properties: {
17333
+ $inline: {
17334
+ type: "object",
17335
+ required: ["filename", "mimeType", "base64"],
17336
+ additionalProperties: false,
17337
+ properties: {
17338
+ filename: STRING_SCHEMA,
17339
+ mimeType: STRING_SCHEMA,
17340
+ base64: STRING_SCHEMA
17341
+ }
17342
+ }
17343
+ }
17344
+ }
17345
+ ]
17346
+ };
17347
+ });
17348
+
17349
+ // ../types/src/files/scoped-file-ref.ts
17350
+ function isScopedFileRef(value) {
17351
+ return ScopedFileRefSchema.safeParse(value).success;
17352
+ }
17353
+ function isFileIdIngressRef(value) {
17354
+ return FileIdIngressRefSchema.safeParse(value).success;
17355
+ }
17356
+ function isInlineFileIngressRef(value) {
17357
+ return InlineFileIngressRefSchema.safeParse(value).success;
17358
+ }
17359
+ function isFileIngressRef(value) {
17360
+ return FileIngressRefSchema.safeParse(value).success;
17361
+ }
17362
+ function isFileReferenceSentinel(value) {
17363
+ return FileReferenceSentinelSchema.safeParse(value).success;
17364
+ }
17365
+ function fileReferenceKind(ref) {
17366
+ if ("$file" in ref)
17367
+ return "file";
17368
+ if ("$fileId" in ref)
17369
+ return "fileId";
17370
+ return "inline";
17371
+ }
17372
+ function validateScopedArtifactPath(path, options = {}) {
17373
+ if (path.length === 0)
17374
+ return { ok: false, reason: "path is empty" };
17375
+ if (path.startsWith("/"))
17376
+ return { ok: false, reason: "leading slash not allowed" };
17377
+ if (path.includes("\\"))
17378
+ return { ok: false, reason: "backslashes not allowed" };
17379
+ if (path.includes("\x00"))
17380
+ return { ok: false, reason: "null bytes not allowed" };
17381
+ const segments = path.split("/");
17382
+ for (const segment of segments) {
17383
+ if (segment.length === 0)
17384
+ return { ok: false, reason: "empty path segment not allowed" };
17385
+ if (segment === ".")
17386
+ return { ok: false, reason: "current-directory segment not allowed" };
17387
+ if (segment === "..")
17388
+ return { ok: false, reason: "path traversal segment not allowed" };
17389
+ }
17390
+ if (segments[0] === "tenants" || segments[0] === "automations" || segments[0] === "workflows" || segments[0] === "agents") {
17391
+ return { ok: false, reason: "storage prefixes are not allowed in scoped file refs" };
17392
+ }
17393
+ const normalizedRoots = (options.allowedRoots ?? []).map((root) => root.replace(/^\/+|\/+$/g, ""));
17394
+ if (normalizedRoots.length > 0 && !normalizedRoots.some((root) => path === root || path.startsWith(`${root}/`))) {
17395
+ return { ok: false, reason: `path root must be one of: ${normalizedRoots.join(", ")}` };
17396
+ }
17397
+ return { ok: true, value: { path: segments.join("/"), segments, root: segments[0] } };
17398
+ }
17399
+ function collectFileReferenceSentinels(value) {
17400
+ const matches = [];
17401
+ walkFileReferenceSentinels(value, (match) => {
17402
+ matches.push(match);
17403
+ });
17404
+ return matches;
17405
+ }
17406
+ function walkFileReferenceSentinels(value, visit, path = []) {
17407
+ const parsed = FileReferenceSentinelSchema.safeParse(value);
17408
+ if (parsed.success) {
17409
+ visit({ path, ref: parsed.data, kind: fileReferenceKind(parsed.data) });
17410
+ return;
17411
+ }
17412
+ if (Array.isArray(value)) {
17413
+ value.forEach((item, index) => walkFileReferenceSentinels(item, visit, [...path, String(index)]));
17414
+ return;
17415
+ }
17416
+ if (value && typeof value === "object") {
17417
+ for (const [key, item] of Object.entries(value)) {
17418
+ walkFileReferenceSentinels(item, visit, [...path, key]);
17419
+ }
17420
+ }
17421
+ }
17422
+ function mapFileReferenceSentinels(value, mapper, path = []) {
17423
+ const parsed = FileReferenceSentinelSchema.safeParse(value);
17424
+ if (parsed.success) {
17425
+ return mapper({ path, ref: parsed.data, kind: fileReferenceKind(parsed.data) });
17426
+ }
17427
+ if (Array.isArray(value)) {
17428
+ return value.map((item, index) => mapFileReferenceSentinels(item, mapper, [...path, String(index)]));
17429
+ }
17430
+ if (value && typeof value === "object") {
17431
+ const out = {};
17432
+ for (const [key, item] of Object.entries(value)) {
17433
+ out[key] = mapFileReferenceSentinels(item, mapper, [...path, key]);
17434
+ }
17435
+ return out;
17436
+ }
17437
+ return value;
17438
+ }
17439
+ var ScopedFileRefSchema, FileIdIngressRefSchema, InlineFileIngressPayloadSchema, InlineFileIngressRefSchema, FileIngressRefSchema, FileReferenceSentinelSchema;
17440
+ var init_scoped_file_ref = __esm(() => {
17441
+ init_zod();
17442
+ ScopedFileRefSchema = exports_external.object({
17443
+ $file: exports_external.string().min(1).describe("Owner-relative artifact path")
17444
+ }).strict();
17445
+ FileIdIngressRefSchema = exports_external.object({
17446
+ $fileId: exports_external.string().min(1).describe("Reusable file-pool id to materialize")
17447
+ }).strict();
17448
+ InlineFileIngressPayloadSchema = exports_external.object({
17449
+ filename: exports_external.string().min(1).describe("Original filename for the materialized artifact"),
17450
+ mimeType: exports_external.string().min(1).describe("MIME type for the materialized artifact"),
17451
+ base64: exports_external.string().min(1).describe("Base64-encoded file bytes")
17452
+ }).strict();
17453
+ InlineFileIngressRefSchema = exports_external.object({
17454
+ $inline: InlineFileIngressPayloadSchema
17455
+ }).strict();
17456
+ FileIngressRefSchema = exports_external.union([FileIdIngressRefSchema, InlineFileIngressRefSchema]);
17457
+ FileReferenceSentinelSchema = exports_external.union([
17458
+ ScopedFileRefSchema,
17459
+ FileIdIngressRefSchema,
17460
+ InlineFileIngressRefSchema
17461
+ ]);
17462
+ });
17463
+
17464
+ // ../../node_modules/@opentelemetry/api/build/src/version.js
17465
+ var require_version = __commonJS((exports) => {
17466
+ Object.defineProperty(exports, "__esModule", { value: true });
17467
+ exports.VERSION = undefined;
17468
+ exports.VERSION = "1.9.1";
17469
+ });
17470
+
17471
+ // ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
17472
+ var require_semver = __commonJS((exports) => {
17473
+ Object.defineProperty(exports, "__esModule", { value: true });
17474
+ exports.isCompatible = exports._makeCompatibilityCheck = undefined;
17475
+ var version_1 = require_version();
17476
+ var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
17477
+ function _makeCompatibilityCheck(ownVersion) {
17478
+ const acceptedVersions = new Set([ownVersion]);
17479
+ const rejectedVersions = new Set;
17480
+ const myVersionMatch = ownVersion.match(re);
17481
+ if (!myVersionMatch) {
17482
+ return () => false;
17483
+ }
17484
+ const ownVersionParsed = {
17485
+ major: +myVersionMatch[1],
17486
+ minor: +myVersionMatch[2],
17487
+ patch: +myVersionMatch[3],
17488
+ prerelease: myVersionMatch[4]
17489
+ };
17490
+ if (ownVersionParsed.prerelease != null) {
17491
+ return function isExactmatch(globalVersion) {
17492
+ return globalVersion === ownVersion;
17493
+ };
17494
+ }
17495
+ function _reject(v) {
17496
+ rejectedVersions.add(v);
17497
+ return false;
17498
+ }
17499
+ function _accept(v) {
17500
+ acceptedVersions.add(v);
17501
+ return true;
17502
+ }
17503
+ return function isCompatible(globalVersion) {
17504
+ if (acceptedVersions.has(globalVersion)) {
17505
+ return true;
17506
+ }
17507
+ if (rejectedVersions.has(globalVersion)) {
17508
+ return false;
17509
+ }
17510
+ const globalVersionMatch = globalVersion.match(re);
17511
+ if (!globalVersionMatch) {
17512
+ return _reject(globalVersion);
17513
+ }
17514
+ const globalVersionParsed = {
17515
+ major: +globalVersionMatch[1],
17516
+ minor: +globalVersionMatch[2],
17517
+ patch: +globalVersionMatch[3],
17518
+ prerelease: globalVersionMatch[4]
17519
+ };
17520
+ if (globalVersionParsed.prerelease != null) {
17521
+ return _reject(globalVersion);
17522
+ }
17523
+ if (ownVersionParsed.major !== globalVersionParsed.major) {
17524
+ return _reject(globalVersion);
17525
+ }
17526
+ if (ownVersionParsed.major === 0) {
17527
+ if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
17528
+ return _accept(globalVersion);
17529
+ }
17530
+ return _reject(globalVersion);
17531
+ }
17532
+ if (ownVersionParsed.minor <= globalVersionParsed.minor) {
17533
+ return _accept(globalVersion);
17534
+ }
17535
+ return _reject(globalVersion);
17536
+ };
17537
+ }
17538
+ exports._makeCompatibilityCheck = _makeCompatibilityCheck;
17539
+ exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
17540
+ });
17541
+
17542
+ // ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
17543
+ var require_global_utils = __commonJS((exports) => {
17544
+ Object.defineProperty(exports, "__esModule", { value: true });
17545
+ exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
17546
+ var version_1 = require_version();
17547
+ var semver_1 = require_semver();
17548
+ var major = version_1.VERSION.split(".")[0];
17549
+ var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
17550
+ var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
17551
+ function registerGlobal(type, instance, diag, allowOverride = false) {
17552
+ var _a3;
17553
+ const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
17554
+ version: version_1.VERSION
17555
+ };
17556
+ if (!allowOverride && api2[type]) {
17557
+ const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
17558
+ diag.error(err.stack || err.message);
17559
+ return false;
17560
+ }
17561
+ if (api2.version !== version_1.VERSION) {
17562
+ const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
17563
+ diag.error(err.stack || err.message);
17564
+ return false;
17565
+ }
17566
+ api2[type] = instance;
17567
+ diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
17568
+ return true;
17569
+ }
17570
+ exports.registerGlobal = registerGlobal;
17571
+ function getGlobal(type) {
17572
+ var _a3, _b;
17573
+ const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
17574
+ if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
17575
+ return;
17576
+ }
17577
+ return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
17578
+ }
17579
+ exports.getGlobal = getGlobal;
17580
+ function unregisterGlobal(type, diag) {
17581
+ diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
17582
+ const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
17583
+ if (api2) {
17584
+ delete api2[type];
17585
+ }
17586
+ }
17587
+ exports.unregisterGlobal = unregisterGlobal;
17588
+ });
17589
+
17590
+ // ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
17591
+ var require_ComponentLogger = __commonJS((exports) => {
17592
+ Object.defineProperty(exports, "__esModule", { value: true });
17593
+ exports.DiagComponentLogger = undefined;
17594
+ var global_utils_1 = require_global_utils();
17595
+
17596
+ class DiagComponentLogger {
17597
+ constructor(props) {
17598
+ this._namespace = props.namespace || "DiagComponentLogger";
17599
+ }
17600
+ debug(...args) {
17601
+ return logProxy("debug", this._namespace, args);
17602
+ }
17603
+ error(...args) {
17604
+ return logProxy("error", this._namespace, args);
17605
+ }
17606
+ info(...args) {
17607
+ return logProxy("info", this._namespace, args);
17608
+ }
17609
+ warn(...args) {
17610
+ return logProxy("warn", this._namespace, args);
17611
+ }
17612
+ verbose(...args) {
17613
+ return logProxy("verbose", this._namespace, args);
17614
+ }
17615
+ }
17616
+ exports.DiagComponentLogger = DiagComponentLogger;
17617
+ function logProxy(funcName, namespace, args) {
17618
+ const logger = (0, global_utils_1.getGlobal)("diag");
17619
+ if (!logger) {
17620
+ return;
17621
+ }
17622
+ return logger[funcName](namespace, ...args);
17623
+ }
17624
+ });
17625
+
17626
+ // ../../node_modules/@opentelemetry/api/build/src/diag/types.js
17627
+ var require_types = __commonJS((exports) => {
17628
+ Object.defineProperty(exports, "__esModule", { value: true });
17629
+ exports.DiagLogLevel = undefined;
17630
+ var DiagLogLevel;
17631
+ (function(DiagLogLevel2) {
17632
+ DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
17633
+ DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
17634
+ DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
17635
+ DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
17636
+ DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
17637
+ DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
17638
+ DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
17639
+ })(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
17640
+ });
17641
+
17642
+ // ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
17643
+ var require_logLevelLogger = __commonJS((exports) => {
17644
+ Object.defineProperty(exports, "__esModule", { value: true });
17645
+ exports.createLogLevelDiagLogger = undefined;
17646
+ var types_1 = require_types();
17647
+ function createLogLevelDiagLogger(maxLevel, logger) {
17648
+ if (maxLevel < types_1.DiagLogLevel.NONE) {
17649
+ maxLevel = types_1.DiagLogLevel.NONE;
17650
+ } else if (maxLevel > types_1.DiagLogLevel.ALL) {
17651
+ maxLevel = types_1.DiagLogLevel.ALL;
17652
+ }
17653
+ logger = logger || {};
17654
+ function _filterFunc(funcName, theLevel) {
17655
+ const theFunc = logger[funcName];
17656
+ if (typeof theFunc === "function" && maxLevel >= theLevel) {
17657
+ return theFunc.bind(logger);
17658
+ }
17659
+ return function() {};
17660
+ }
17661
+ return {
17662
+ error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
17663
+ warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
17664
+ info: _filterFunc("info", types_1.DiagLogLevel.INFO),
17665
+ debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
17666
+ verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
17667
+ };
17668
+ }
17669
+ exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
17670
+ });
17671
+
17672
+ // ../../node_modules/@opentelemetry/api/build/src/api/diag.js
17673
+ var require_diag = __commonJS((exports) => {
17674
+ Object.defineProperty(exports, "__esModule", { value: true });
17675
+ exports.DiagAPI = undefined;
17676
+ var ComponentLogger_1 = require_ComponentLogger();
17677
+ var logLevelLogger_1 = require_logLevelLogger();
17678
+ var types_1 = require_types();
17679
+ var global_utils_1 = require_global_utils();
17680
+ var API_NAME = "diag";
17681
+
17682
+ class DiagAPI {
17683
+ static instance() {
17684
+ if (!this._instance) {
17685
+ this._instance = new DiagAPI;
17686
+ }
17687
+ return this._instance;
17688
+ }
17689
+ constructor() {
17690
+ function _logProxy(funcName) {
17691
+ return function(...args) {
17692
+ const logger = (0, global_utils_1.getGlobal)("diag");
17693
+ if (!logger)
17694
+ return;
17695
+ return logger[funcName](...args);
17696
+ };
17697
+ }
17698
+ const self2 = this;
17699
+ const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
17700
+ var _a3, _b, _c;
17701
+ if (logger === self2) {
17702
+ const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
17703
+ self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
17704
+ return false;
17705
+ }
17706
+ if (typeof optionsOrLogLevel === "number") {
17707
+ optionsOrLogLevel = {
17708
+ logLevel: optionsOrLogLevel
17709
+ };
17710
+ }
17711
+ const oldLogger = (0, global_utils_1.getGlobal)("diag");
17712
+ const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
17713
+ if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
17714
+ const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
17715
+ oldLogger.warn(`Current logger will be overwritten from ${stack}`);
17716
+ newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
17717
+ }
17718
+ return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
17719
+ };
17720
+ self2.setLogger = setLogger;
17721
+ self2.disable = () => {
17722
+ (0, global_utils_1.unregisterGlobal)(API_NAME, self2);
17723
+ };
17724
+ self2.createComponentLogger = (options) => {
17725
+ return new ComponentLogger_1.DiagComponentLogger(options);
17726
+ };
17727
+ self2.verbose = _logProxy("verbose");
17728
+ self2.debug = _logProxy("debug");
17729
+ self2.info = _logProxy("info");
17730
+ self2.warn = _logProxy("warn");
17731
+ self2.error = _logProxy("error");
17732
+ }
17733
+ }
17734
+ exports.DiagAPI = DiagAPI;
17735
+ });
17736
+
17737
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
17738
+ var require_baggage_impl = __commonJS((exports) => {
17739
+ Object.defineProperty(exports, "__esModule", { value: true });
17740
+ exports.BaggageImpl = undefined;
17741
+
17742
+ class BaggageImpl {
17743
+ constructor(entries) {
17744
+ this._entries = entries ? new Map(entries) : new Map;
17745
+ }
17746
+ getEntry(key) {
17747
+ const entry = this._entries.get(key);
17748
+ if (!entry) {
17749
+ return;
17750
+ }
17751
+ return Object.assign({}, entry);
17752
+ }
17753
+ getAllEntries() {
17754
+ return Array.from(this._entries.entries());
17755
+ }
17756
+ setEntry(key, entry) {
17757
+ const newBaggage = new BaggageImpl(this._entries);
17758
+ newBaggage._entries.set(key, entry);
17759
+ return newBaggage;
17760
+ }
17761
+ removeEntry(key) {
17762
+ const newBaggage = new BaggageImpl(this._entries);
17763
+ newBaggage._entries.delete(key);
17764
+ return newBaggage;
17765
+ }
17766
+ removeEntries(...keys) {
17767
+ const newBaggage = new BaggageImpl(this._entries);
17768
+ for (const key of keys) {
17769
+ newBaggage._entries.delete(key);
17770
+ }
17771
+ return newBaggage;
17772
+ }
17773
+ clear() {
17774
+ return new BaggageImpl;
17775
+ }
17776
+ }
17777
+ exports.BaggageImpl = BaggageImpl;
17778
+ });
17779
+
17780
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
17781
+ var require_symbol = __commonJS((exports) => {
17782
+ Object.defineProperty(exports, "__esModule", { value: true });
17783
+ exports.baggageEntryMetadataSymbol = undefined;
17784
+ exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
17785
+ });
17786
+
17787
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
17788
+ var require_utils = __commonJS((exports) => {
17789
+ Object.defineProperty(exports, "__esModule", { value: true });
17790
+ exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
17791
+ var diag_1 = require_diag();
17792
+ var baggage_impl_1 = require_baggage_impl();
17793
+ var symbol_1 = require_symbol();
17794
+ var diag = diag_1.DiagAPI.instance();
17795
+ function createBaggage(entries = {}) {
17796
+ return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
17797
+ }
17798
+ exports.createBaggage = createBaggage;
17799
+ function baggageEntryMetadataFromString(str) {
17800
+ if (typeof str !== "string") {
17801
+ diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
17802
+ str = "";
17803
+ }
17804
+ return {
17805
+ __TYPE__: symbol_1.baggageEntryMetadataSymbol,
17806
+ toString() {
17807
+ return str;
17808
+ }
17809
+ };
17810
+ }
17811
+ exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
17812
+ });
17813
+
17814
+ // ../../node_modules/@opentelemetry/api/build/src/context/context.js
17815
+ var require_context = __commonJS((exports) => {
17816
+ Object.defineProperty(exports, "__esModule", { value: true });
17817
+ exports.ROOT_CONTEXT = exports.createContextKey = undefined;
17818
+ function createContextKey(description) {
17819
+ return Symbol.for(description);
17820
+ }
17821
+ exports.createContextKey = createContextKey;
17822
+
17823
+ class BaseContext {
17824
+ constructor(parentContext) {
17825
+ const self2 = this;
17826
+ self2._currentContext = parentContext ? new Map(parentContext) : new Map;
17827
+ self2.getValue = (key) => self2._currentContext.get(key);
17828
+ self2.setValue = (key, value) => {
17829
+ const context = new BaseContext(self2._currentContext);
17830
+ context._currentContext.set(key, value);
17831
+ return context;
17832
+ };
17833
+ self2.deleteValue = (key) => {
17834
+ const context = new BaseContext(self2._currentContext);
17835
+ context._currentContext.delete(key);
17836
+ return context;
17837
+ };
17838
+ }
17839
+ }
17840
+ exports.ROOT_CONTEXT = new BaseContext;
17841
+ });
17842
+
17843
+ // ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
17844
+ var require_consoleLogger = __commonJS((exports) => {
17845
+ Object.defineProperty(exports, "__esModule", { value: true });
17846
+ exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
17847
+ var consoleMap = [
17848
+ { n: "error", c: "error" },
17849
+ { n: "warn", c: "warn" },
17850
+ { n: "info", c: "info" },
17851
+ { n: "debug", c: "debug" },
17852
+ { n: "verbose", c: "trace" }
17853
+ ];
17854
+ exports._originalConsoleMethods = {};
17855
+ if (typeof console !== "undefined") {
17856
+ const keys = [
17857
+ "error",
17858
+ "warn",
17859
+ "info",
17860
+ "debug",
17861
+ "trace",
17862
+ "log"
17863
+ ];
17864
+ for (const key of keys) {
17865
+ if (typeof console[key] === "function") {
17866
+ exports._originalConsoleMethods[key] = console[key];
17867
+ }
17868
+ }
17869
+ }
17870
+
17871
+ class DiagConsoleLogger {
17872
+ constructor() {
17873
+ function _consoleFunc(funcName) {
17874
+ return function(...args) {
17875
+ let theFunc = exports._originalConsoleMethods[funcName];
17876
+ if (typeof theFunc !== "function") {
17877
+ theFunc = exports._originalConsoleMethods["log"];
17878
+ }
17879
+ if (typeof theFunc !== "function" && console) {
17880
+ theFunc = console[funcName];
17881
+ if (typeof theFunc !== "function") {
17882
+ theFunc = console.log;
17883
+ }
17884
+ }
17885
+ if (typeof theFunc === "function") {
17886
+ return theFunc.apply(console, args);
17887
+ }
17888
+ };
17889
+ }
17890
+ for (let i = 0;i < consoleMap.length; i++) {
17891
+ this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
17892
+ }
17893
+ }
17894
+ }
17895
+ exports.DiagConsoleLogger = DiagConsoleLogger;
17896
+ });
17897
+
17898
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
17899
+ var require_NoopMeter = __commonJS((exports) => {
17900
+ Object.defineProperty(exports, "__esModule", { value: true });
17901
+ 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;
17902
+
17903
+ class NoopMeter {
17904
+ constructor() {}
17905
+ createGauge(_name, _options) {
17906
+ return exports.NOOP_GAUGE_METRIC;
17907
+ }
17908
+ createHistogram(_name, _options) {
17909
+ return exports.NOOP_HISTOGRAM_METRIC;
17910
+ }
17911
+ createCounter(_name, _options) {
17912
+ return exports.NOOP_COUNTER_METRIC;
17913
+ }
17914
+ createUpDownCounter(_name, _options) {
17915
+ return exports.NOOP_UP_DOWN_COUNTER_METRIC;
17916
+ }
17917
+ createObservableGauge(_name, _options) {
17918
+ return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
17919
+ }
17920
+ createObservableCounter(_name, _options) {
17921
+ return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
17922
+ }
17923
+ createObservableUpDownCounter(_name, _options) {
17924
+ return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
17925
+ }
17926
+ addBatchObservableCallback(_callback, _observables) {}
17927
+ removeBatchObservableCallback(_callback) {}
17928
+ }
17929
+ exports.NoopMeter = NoopMeter;
17930
+
17931
+ class NoopMetric {
17932
+ }
17933
+ exports.NoopMetric = NoopMetric;
17934
+
17935
+ class NoopCounterMetric extends NoopMetric {
17936
+ add(_value, _attributes) {}
17937
+ }
17938
+ exports.NoopCounterMetric = NoopCounterMetric;
17939
+
17940
+ class NoopUpDownCounterMetric extends NoopMetric {
17941
+ add(_value, _attributes) {}
17942
+ }
17943
+ exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
17944
+
17945
+ class NoopGaugeMetric extends NoopMetric {
17946
+ record(_value, _attributes) {}
17947
+ }
17948
+ exports.NoopGaugeMetric = NoopGaugeMetric;
17949
+
17950
+ class NoopHistogramMetric extends NoopMetric {
17951
+ record(_value, _attributes) {}
17952
+ }
17953
+ exports.NoopHistogramMetric = NoopHistogramMetric;
17954
+
17955
+ class NoopObservableMetric {
17956
+ addCallback(_callback) {}
17957
+ removeCallback(_callback) {}
17958
+ }
17959
+ exports.NoopObservableMetric = NoopObservableMetric;
17960
+
17961
+ class NoopObservableCounterMetric extends NoopObservableMetric {
17962
+ }
17963
+ exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
17964
+
17965
+ class NoopObservableGaugeMetric extends NoopObservableMetric {
17966
+ }
17967
+ exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
17968
+
17969
+ class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
17970
+ }
17971
+ exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
17972
+ exports.NOOP_METER = new NoopMeter;
17973
+ exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
17974
+ exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
17975
+ exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
17976
+ exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
17977
+ exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
17978
+ exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
17979
+ exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
17980
+ function createNoopMeter() {
17981
+ return exports.NOOP_METER;
17982
+ }
17983
+ exports.createNoopMeter = createNoopMeter;
17984
+ });
17985
+
17986
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
17987
+ var require_Metric = __commonJS((exports) => {
17988
+ Object.defineProperty(exports, "__esModule", { value: true });
17989
+ exports.ValueType = undefined;
17990
+ var ValueType;
17991
+ (function(ValueType2) {
17992
+ ValueType2[ValueType2["INT"] = 0] = "INT";
17993
+ ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
17994
+ })(ValueType = exports.ValueType || (exports.ValueType = {}));
17995
+ });
17996
+
17997
+ // ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
17998
+ var require_TextMapPropagator = __commonJS((exports) => {
17999
+ Object.defineProperty(exports, "__esModule", { value: true });
18000
+ exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
18001
+ exports.defaultTextMapGetter = {
18002
+ get(carrier, key) {
18003
+ if (carrier == null) {
18004
+ return;
18005
+ }
18006
+ return carrier[key];
18007
+ },
18008
+ keys(carrier) {
18009
+ if (carrier == null) {
18010
+ return [];
18011
+ }
18012
+ return Object.keys(carrier);
18013
+ }
18014
+ };
18015
+ exports.defaultTextMapSetter = {
18016
+ set(carrier, key, value) {
18017
+ if (carrier == null) {
18018
+ return;
18019
+ }
18020
+ carrier[key] = value;
18021
+ }
18022
+ };
18023
+ });
18024
+
18025
+ // ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
18026
+ var require_NoopContextManager = __commonJS((exports) => {
18027
+ Object.defineProperty(exports, "__esModule", { value: true });
18028
+ exports.NoopContextManager = undefined;
18029
+ var context_1 = require_context();
18030
+
18031
+ class NoopContextManager {
18032
+ active() {
18033
+ return context_1.ROOT_CONTEXT;
18034
+ }
18035
+ with(_context, fn, thisArg, ...args) {
18036
+ return fn.call(thisArg, ...args);
18037
+ }
18038
+ bind(_context, target) {
18039
+ return target;
18040
+ }
18041
+ enable() {
18042
+ return this;
18043
+ }
18044
+ disable() {
18045
+ return this;
18046
+ }
18047
+ }
18048
+ exports.NoopContextManager = NoopContextManager;
18049
+ });
18050
+
18051
+ // ../../node_modules/@opentelemetry/api/build/src/api/context.js
18052
+ var require_context2 = __commonJS((exports) => {
18053
+ Object.defineProperty(exports, "__esModule", { value: true });
18054
+ exports.ContextAPI = undefined;
18055
+ var NoopContextManager_1 = require_NoopContextManager();
18056
+ var global_utils_1 = require_global_utils();
18057
+ var diag_1 = require_diag();
18058
+ var API_NAME = "context";
18059
+ var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
18060
+
18061
+ class ContextAPI {
18062
+ constructor() {}
18063
+ static getInstance() {
18064
+ if (!this._instance) {
18065
+ this._instance = new ContextAPI;
18066
+ }
18067
+ return this._instance;
18068
+ }
18069
+ setGlobalContextManager(contextManager) {
18070
+ return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
18071
+ }
18072
+ active() {
18073
+ return this._getContextManager().active();
18074
+ }
18075
+ with(context, fn, thisArg, ...args) {
18076
+ return this._getContextManager().with(context, fn, thisArg, ...args);
18077
+ }
18078
+ bind(context, target) {
18079
+ return this._getContextManager().bind(context, target);
18080
+ }
18081
+ _getContextManager() {
18082
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
18083
+ }
18084
+ disable() {
18085
+ this._getContextManager().disable();
18086
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18087
+ }
18088
+ }
18089
+ exports.ContextAPI = ContextAPI;
18090
+ });
18091
+
18092
+ // ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
18093
+ var require_trace_flags = __commonJS((exports) => {
18094
+ Object.defineProperty(exports, "__esModule", { value: true });
18095
+ exports.TraceFlags = undefined;
18096
+ var TraceFlags;
18097
+ (function(TraceFlags2) {
18098
+ TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
18099
+ TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
18100
+ })(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
18101
+ });
18102
+
18103
+ // ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
18104
+ var require_invalid_span_constants = __commonJS((exports) => {
18105
+ Object.defineProperty(exports, "__esModule", { value: true });
18106
+ exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
18107
+ var trace_flags_1 = require_trace_flags();
18108
+ exports.INVALID_SPANID = "0000000000000000";
18109
+ exports.INVALID_TRACEID = "00000000000000000000000000000000";
18110
+ exports.INVALID_SPAN_CONTEXT = {
18111
+ traceId: exports.INVALID_TRACEID,
18112
+ spanId: exports.INVALID_SPANID,
18113
+ traceFlags: trace_flags_1.TraceFlags.NONE
18114
+ };
18115
+ });
18116
+
18117
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
18118
+ var require_NonRecordingSpan = __commonJS((exports) => {
18119
+ Object.defineProperty(exports, "__esModule", { value: true });
18120
+ exports.NonRecordingSpan = undefined;
18121
+ var invalid_span_constants_1 = require_invalid_span_constants();
18122
+
18123
+ class NonRecordingSpan {
18124
+ constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
18125
+ this._spanContext = spanContext;
18126
+ }
18127
+ spanContext() {
18128
+ return this._spanContext;
18129
+ }
18130
+ setAttribute(_key, _value) {
18131
+ return this;
18132
+ }
18133
+ setAttributes(_attributes) {
18134
+ return this;
18135
+ }
18136
+ addEvent(_name, _attributes) {
18137
+ return this;
18138
+ }
18139
+ addLink(_link) {
18140
+ return this;
18141
+ }
18142
+ addLinks(_links) {
18143
+ return this;
18144
+ }
18145
+ setStatus(_status) {
18146
+ return this;
18147
+ }
18148
+ updateName(_name) {
18149
+ return this;
18150
+ }
18151
+ end(_endTime) {}
18152
+ isRecording() {
18153
+ return false;
18154
+ }
18155
+ recordException(_exception, _time) {}
18156
+ }
18157
+ exports.NonRecordingSpan = NonRecordingSpan;
18158
+ });
18159
+
18160
+ // ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
18161
+ var require_context_utils = __commonJS((exports) => {
18162
+ Object.defineProperty(exports, "__esModule", { value: true });
18163
+ exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
18164
+ var context_1 = require_context();
18165
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18166
+ var context_2 = require_context2();
18167
+ var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
18168
+ function getSpan(context) {
18169
+ return context.getValue(SPAN_KEY) || undefined;
18170
+ }
18171
+ exports.getSpan = getSpan;
18172
+ function getActiveSpan() {
18173
+ return getSpan(context_2.ContextAPI.getInstance().active());
18174
+ }
18175
+ exports.getActiveSpan = getActiveSpan;
18176
+ function setSpan(context, span) {
18177
+ return context.setValue(SPAN_KEY, span);
18178
+ }
18179
+ exports.setSpan = setSpan;
18180
+ function deleteSpan(context) {
18181
+ return context.deleteValue(SPAN_KEY);
18182
+ }
18183
+ exports.deleteSpan = deleteSpan;
18184
+ function setSpanContext(context, spanContext) {
18185
+ return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
18186
+ }
18187
+ exports.setSpanContext = setSpanContext;
18188
+ function getSpanContext(context) {
18189
+ var _a3;
18190
+ return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
18191
+ }
18192
+ exports.getSpanContext = getSpanContext;
18193
+ });
18194
+
18195
+ // ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
18196
+ var require_spancontext_utils = __commonJS((exports) => {
18197
+ Object.defineProperty(exports, "__esModule", { value: true });
18198
+ exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
18199
+ var invalid_span_constants_1 = require_invalid_span_constants();
18200
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18201
+ var isHex = new Uint8Array([
18202
+ 0,
18203
+ 0,
18204
+ 0,
18205
+ 0,
18206
+ 0,
18207
+ 0,
18208
+ 0,
18209
+ 0,
18210
+ 0,
18211
+ 0,
18212
+ 0,
18213
+ 0,
18214
+ 0,
18215
+ 0,
18216
+ 0,
18217
+ 0,
18218
+ 0,
18219
+ 0,
18220
+ 0,
18221
+ 0,
18222
+ 0,
18223
+ 0,
18224
+ 0,
18225
+ 0,
18226
+ 0,
18227
+ 0,
18228
+ 0,
18229
+ 0,
18230
+ 0,
18231
+ 0,
18232
+ 0,
18233
+ 0,
18234
+ 0,
18235
+ 0,
18236
+ 0,
18237
+ 0,
18238
+ 0,
18239
+ 0,
18240
+ 0,
18241
+ 0,
18242
+ 0,
18243
+ 0,
18244
+ 0,
18245
+ 0,
18246
+ 0,
18247
+ 0,
18248
+ 0,
18249
+ 0,
18250
+ 1,
18251
+ 1,
18252
+ 1,
18253
+ 1,
18254
+ 1,
18255
+ 1,
18256
+ 1,
18257
+ 1,
18258
+ 1,
18259
+ 1,
18260
+ 0,
18261
+ 0,
18262
+ 0,
18263
+ 0,
18264
+ 0,
18265
+ 0,
18266
+ 0,
18267
+ 1,
18268
+ 1,
18269
+ 1,
18270
+ 1,
18271
+ 1,
18272
+ 1,
18273
+ 0,
18274
+ 0,
18275
+ 0,
18276
+ 0,
18277
+ 0,
18278
+ 0,
18279
+ 0,
18280
+ 0,
18281
+ 0,
18282
+ 0,
18283
+ 0,
18284
+ 0,
18285
+ 0,
18286
+ 0,
18287
+ 0,
18288
+ 0,
18289
+ 0,
18290
+ 0,
18291
+ 0,
18292
+ 0,
18293
+ 0,
18294
+ 0,
18295
+ 0,
18296
+ 0,
18297
+ 0,
18298
+ 0,
18299
+ 1,
18300
+ 1,
18301
+ 1,
18302
+ 1,
18303
+ 1,
18304
+ 1
18305
+ ]);
18306
+ function isValidHex(id, length) {
18307
+ if (typeof id !== "string" || id.length !== length)
18308
+ return false;
18309
+ let r = 0;
18310
+ for (let i = 0;i < id.length; i += 4) {
18311
+ r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
18312
+ }
18313
+ return r === length;
18314
+ }
18315
+ function isValidTraceId(traceId) {
18316
+ return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
18317
+ }
18318
+ exports.isValidTraceId = isValidTraceId;
18319
+ function isValidSpanId(spanId) {
18320
+ return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
18321
+ }
18322
+ exports.isValidSpanId = isValidSpanId;
18323
+ function isSpanContextValid(spanContext) {
18324
+ return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
18325
+ }
18326
+ exports.isSpanContextValid = isSpanContextValid;
18327
+ function wrapSpanContext(spanContext) {
18328
+ return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
18329
+ }
18330
+ exports.wrapSpanContext = wrapSpanContext;
18331
+ });
18332
+
18333
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
18334
+ var require_NoopTracer = __commonJS((exports) => {
18335
+ Object.defineProperty(exports, "__esModule", { value: true });
18336
+ exports.NoopTracer = undefined;
18337
+ var context_1 = require_context2();
18338
+ var context_utils_1 = require_context_utils();
18339
+ var NonRecordingSpan_1 = require_NonRecordingSpan();
18340
+ var spancontext_utils_1 = require_spancontext_utils();
18341
+ var contextApi = context_1.ContextAPI.getInstance();
18342
+
18343
+ class NoopTracer {
18344
+ startSpan(name, options, context = contextApi.active()) {
18345
+ const root = Boolean(options === null || options === undefined ? undefined : options.root);
18346
+ if (root) {
18347
+ return new NonRecordingSpan_1.NonRecordingSpan;
18348
+ }
18349
+ const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
18350
+ if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
18351
+ return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
18352
+ } else {
18353
+ return new NonRecordingSpan_1.NonRecordingSpan;
18354
+ }
18355
+ }
18356
+ startActiveSpan(name, arg2, arg3, arg4) {
18357
+ let opts;
18358
+ let ctx;
18359
+ let fn;
18360
+ if (arguments.length < 2) {
18361
+ return;
18362
+ } else if (arguments.length === 2) {
18363
+ fn = arg2;
18364
+ } else if (arguments.length === 3) {
18365
+ opts = arg2;
18366
+ fn = arg3;
18367
+ } else {
18368
+ opts = arg2;
18369
+ ctx = arg3;
18370
+ fn = arg4;
18371
+ }
18372
+ const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
18373
+ const span = this.startSpan(name, opts, parentContext);
18374
+ const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
18375
+ return contextApi.with(contextWithSpanSet, fn, undefined, span);
18376
+ }
18377
+ }
18378
+ exports.NoopTracer = NoopTracer;
18379
+ function isSpanContext(spanContext) {
18380
+ 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";
18381
+ }
18382
+ });
18383
+
18384
+ // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
18385
+ var require_ProxyTracer = __commonJS((exports) => {
18386
+ Object.defineProperty(exports, "__esModule", { value: true });
18387
+ exports.ProxyTracer = undefined;
18388
+ var NoopTracer_1 = require_NoopTracer();
18389
+ var NOOP_TRACER = new NoopTracer_1.NoopTracer;
18390
+
18391
+ class ProxyTracer {
18392
+ constructor(provider, name, version2, options) {
18393
+ this._provider = provider;
18394
+ this.name = name;
18395
+ this.version = version2;
18396
+ this.options = options;
18397
+ }
18398
+ startSpan(name, options, context) {
18399
+ return this._getTracer().startSpan(name, options, context);
18400
+ }
18401
+ startActiveSpan(_name, _options, _context, _fn) {
18402
+ const tracer = this._getTracer();
18403
+ return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
18404
+ }
18405
+ _getTracer() {
18406
+ if (this._delegate) {
18407
+ return this._delegate;
18408
+ }
18409
+ const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
18410
+ if (!tracer) {
18411
+ return NOOP_TRACER;
18412
+ }
18413
+ this._delegate = tracer;
18414
+ return this._delegate;
18415
+ }
18416
+ }
18417
+ exports.ProxyTracer = ProxyTracer;
18418
+ });
18419
+
18420
+ // ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
18421
+ var require_NoopTracerProvider = __commonJS((exports) => {
18422
+ Object.defineProperty(exports, "__esModule", { value: true });
18423
+ exports.NoopTracerProvider = undefined;
18424
+ var NoopTracer_1 = require_NoopTracer();
18425
+
18426
+ class NoopTracerProvider {
18427
+ getTracer(_name, _version, _options) {
18428
+ return new NoopTracer_1.NoopTracer;
18429
+ }
18430
+ }
18431
+ exports.NoopTracerProvider = NoopTracerProvider;
18432
+ });
18433
+
18434
+ // ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
18435
+ var require_ProxyTracerProvider = __commonJS((exports) => {
18436
+ Object.defineProperty(exports, "__esModule", { value: true });
18437
+ exports.ProxyTracerProvider = undefined;
18438
+ var ProxyTracer_1 = require_ProxyTracer();
18439
+ var NoopTracerProvider_1 = require_NoopTracerProvider();
18440
+ var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
18441
+
18442
+ class ProxyTracerProvider {
18443
+ getTracer(name, version2, options) {
18444
+ var _a3;
18445
+ return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
18446
+ }
18447
+ getDelegate() {
18448
+ var _a3;
18449
+ return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
18450
+ }
18451
+ setDelegate(delegate) {
18452
+ this._delegate = delegate;
18453
+ }
18454
+ getDelegateTracer(name, version2, options) {
18455
+ var _a3;
18456
+ return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
18457
+ }
18458
+ }
18459
+ exports.ProxyTracerProvider = ProxyTracerProvider;
18460
+ });
18461
+
18462
+ // ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
18463
+ var require_SamplingResult = __commonJS((exports) => {
18464
+ Object.defineProperty(exports, "__esModule", { value: true });
18465
+ exports.SamplingDecision = undefined;
18466
+ var SamplingDecision;
18467
+ (function(SamplingDecision2) {
18468
+ SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
18469
+ SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
18470
+ SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
18471
+ })(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
18472
+ });
18473
+
18474
+ // ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
18475
+ var require_span_kind = __commonJS((exports) => {
18476
+ Object.defineProperty(exports, "__esModule", { value: true });
18477
+ exports.SpanKind = undefined;
18478
+ var SpanKind;
18479
+ (function(SpanKind2) {
18480
+ SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
18481
+ SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
18482
+ SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
18483
+ SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
18484
+ SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
18485
+ })(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
18486
+ });
18487
+
18488
+ // ../../node_modules/@opentelemetry/api/build/src/trace/status.js
18489
+ var require_status = __commonJS((exports) => {
18490
+ Object.defineProperty(exports, "__esModule", { value: true });
18491
+ exports.SpanStatusCode = undefined;
18492
+ var SpanStatusCode;
18493
+ (function(SpanStatusCode2) {
18494
+ SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
18495
+ SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
18496
+ SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
18497
+ })(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
18498
+ });
18499
+
18500
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
18501
+ var require_tracestate_validators = __commonJS((exports) => {
18502
+ Object.defineProperty(exports, "__esModule", { value: true });
18503
+ exports.validateValue = exports.validateKey = undefined;
18504
+ var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
18505
+ var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
18506
+ var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
18507
+ var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
18508
+ var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
18509
+ var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
18510
+ function validateKey(key) {
18511
+ return VALID_KEY_REGEX.test(key);
18512
+ }
18513
+ exports.validateKey = validateKey;
18514
+ function validateValue(value) {
18515
+ return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
18516
+ }
18517
+ exports.validateValue = validateValue;
18518
+ });
18519
+
18520
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
18521
+ var require_tracestate_impl = __commonJS((exports) => {
18522
+ Object.defineProperty(exports, "__esModule", { value: true });
18523
+ exports.TraceStateImpl = undefined;
18524
+ var tracestate_validators_1 = require_tracestate_validators();
18525
+ var MAX_TRACE_STATE_ITEMS = 32;
18526
+ var MAX_TRACE_STATE_LEN = 512;
18527
+ var LIST_MEMBERS_SEPARATOR = ",";
18528
+ var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
18529
+
18530
+ class TraceStateImpl {
18531
+ constructor(rawTraceState) {
18532
+ this._internalState = new Map;
18533
+ if (rawTraceState)
18534
+ this._parse(rawTraceState);
18535
+ }
18536
+ set(key, value) {
18537
+ const traceState = this._clone();
18538
+ if (traceState._internalState.has(key)) {
18539
+ traceState._internalState.delete(key);
18540
+ }
18541
+ traceState._internalState.set(key, value);
18542
+ return traceState;
18543
+ }
18544
+ unset(key) {
18545
+ const traceState = this._clone();
18546
+ traceState._internalState.delete(key);
18547
+ return traceState;
18548
+ }
18549
+ get(key) {
18550
+ return this._internalState.get(key);
18551
+ }
18552
+ serialize() {
18553
+ return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
18554
+ agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
18555
+ return agg;
18556
+ }, []).join(LIST_MEMBERS_SEPARATOR);
18557
+ }
18558
+ _parse(rawTraceState) {
18559
+ if (rawTraceState.length > MAX_TRACE_STATE_LEN)
18560
+ return;
18561
+ this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
18562
+ const listMember = part.trim();
18563
+ const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
18564
+ if (i !== -1) {
18565
+ const key = listMember.slice(0, i);
18566
+ const value = listMember.slice(i + 1, part.length);
18567
+ if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
18568
+ agg.set(key, value);
18569
+ }
18570
+ }
18571
+ return agg;
18572
+ }, new Map);
18573
+ if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
18574
+ this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
18575
+ }
18576
+ }
18577
+ _keys() {
18578
+ return Array.from(this._internalState.keys()).reverse();
18579
+ }
18580
+ _clone() {
18581
+ const traceState = new TraceStateImpl;
18582
+ traceState._internalState = new Map(this._internalState);
18583
+ return traceState;
18584
+ }
18585
+ }
18586
+ exports.TraceStateImpl = TraceStateImpl;
18587
+ });
18588
+
18589
+ // ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
18590
+ var require_utils2 = __commonJS((exports) => {
18591
+ Object.defineProperty(exports, "__esModule", { value: true });
18592
+ exports.createTraceState = undefined;
18593
+ var tracestate_impl_1 = require_tracestate_impl();
18594
+ function createTraceState(rawTraceState) {
18595
+ return new tracestate_impl_1.TraceStateImpl(rawTraceState);
18596
+ }
18597
+ exports.createTraceState = createTraceState;
18598
+ });
18599
+
18600
+ // ../../node_modules/@opentelemetry/api/build/src/context-api.js
18601
+ var require_context_api = __commonJS((exports) => {
18602
+ Object.defineProperty(exports, "__esModule", { value: true });
18603
+ exports.context = undefined;
18604
+ var context_1 = require_context2();
18605
+ exports.context = context_1.ContextAPI.getInstance();
18606
+ });
18607
+
18608
+ // ../../node_modules/@opentelemetry/api/build/src/diag-api.js
18609
+ var require_diag_api = __commonJS((exports) => {
18610
+ Object.defineProperty(exports, "__esModule", { value: true });
18611
+ exports.diag = undefined;
18612
+ var diag_1 = require_diag();
18613
+ exports.diag = diag_1.DiagAPI.instance();
18614
+ });
18615
+
18616
+ // ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
18617
+ var require_NoopMeterProvider = __commonJS((exports) => {
18618
+ Object.defineProperty(exports, "__esModule", { value: true });
18619
+ exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
18620
+ var NoopMeter_1 = require_NoopMeter();
18621
+
18622
+ class NoopMeterProvider {
18623
+ getMeter(_name, _version, _options) {
18624
+ return NoopMeter_1.NOOP_METER;
18625
+ }
18626
+ }
18627
+ exports.NoopMeterProvider = NoopMeterProvider;
18628
+ exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
18629
+ });
18630
+
18631
+ // ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
18632
+ var require_metrics = __commonJS((exports) => {
18633
+ Object.defineProperty(exports, "__esModule", { value: true });
18634
+ exports.MetricsAPI = undefined;
18635
+ var NoopMeterProvider_1 = require_NoopMeterProvider();
18636
+ var global_utils_1 = require_global_utils();
18637
+ var diag_1 = require_diag();
18638
+ var API_NAME = "metrics";
18639
+
18640
+ class MetricsAPI {
18641
+ constructor() {}
18642
+ static getInstance() {
18643
+ if (!this._instance) {
18644
+ this._instance = new MetricsAPI;
18645
+ }
18646
+ return this._instance;
18647
+ }
18648
+ setGlobalMeterProvider(provider) {
18649
+ return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
18650
+ }
18651
+ getMeterProvider() {
18652
+ return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
18653
+ }
18654
+ getMeter(name, version2, options) {
18655
+ return this.getMeterProvider().getMeter(name, version2, options);
18656
+ }
18657
+ disable() {
18658
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18659
+ }
18660
+ }
18661
+ exports.MetricsAPI = MetricsAPI;
18662
+ });
18663
+
18664
+ // ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
18665
+ var require_metrics_api = __commonJS((exports) => {
18666
+ Object.defineProperty(exports, "__esModule", { value: true });
18667
+ exports.metrics = undefined;
18668
+ var metrics_1 = require_metrics();
18669
+ exports.metrics = metrics_1.MetricsAPI.getInstance();
18670
+ });
18671
+
18672
+ // ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
18673
+ var require_NoopTextMapPropagator = __commonJS((exports) => {
18674
+ Object.defineProperty(exports, "__esModule", { value: true });
18675
+ exports.NoopTextMapPropagator = undefined;
18676
+
18677
+ class NoopTextMapPropagator {
18678
+ inject(_context, _carrier) {}
18679
+ extract(context, _carrier) {
18680
+ return context;
18681
+ }
18682
+ fields() {
18683
+ return [];
18684
+ }
18685
+ }
18686
+ exports.NoopTextMapPropagator = NoopTextMapPropagator;
18687
+ });
18688
+
18689
+ // ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
18690
+ var require_context_helpers = __commonJS((exports) => {
18691
+ Object.defineProperty(exports, "__esModule", { value: true });
18692
+ exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
18693
+ var context_1 = require_context2();
18694
+ var context_2 = require_context();
18695
+ var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
18696
+ function getBaggage(context) {
18697
+ return context.getValue(BAGGAGE_KEY) || undefined;
18698
+ }
18699
+ exports.getBaggage = getBaggage;
18700
+ function getActiveBaggage() {
18701
+ return getBaggage(context_1.ContextAPI.getInstance().active());
18702
+ }
18703
+ exports.getActiveBaggage = getActiveBaggage;
18704
+ function setBaggage(context, baggage) {
18705
+ return context.setValue(BAGGAGE_KEY, baggage);
18706
+ }
18707
+ exports.setBaggage = setBaggage;
18708
+ function deleteBaggage(context) {
18709
+ return context.deleteValue(BAGGAGE_KEY);
18710
+ }
18711
+ exports.deleteBaggage = deleteBaggage;
18712
+ });
18713
+
18714
+ // ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
18715
+ var require_propagation = __commonJS((exports) => {
18716
+ Object.defineProperty(exports, "__esModule", { value: true });
18717
+ exports.PropagationAPI = undefined;
18718
+ var global_utils_1 = require_global_utils();
18719
+ var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
18720
+ var TextMapPropagator_1 = require_TextMapPropagator();
18721
+ var context_helpers_1 = require_context_helpers();
18722
+ var utils_1 = require_utils();
18723
+ var diag_1 = require_diag();
18724
+ var API_NAME = "propagation";
18725
+ var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
18726
+
18727
+ class PropagationAPI {
18728
+ constructor() {
18729
+ this.createBaggage = utils_1.createBaggage;
18730
+ this.getBaggage = context_helpers_1.getBaggage;
18731
+ this.getActiveBaggage = context_helpers_1.getActiveBaggage;
18732
+ this.setBaggage = context_helpers_1.setBaggage;
18733
+ this.deleteBaggage = context_helpers_1.deleteBaggage;
18734
+ }
18735
+ static getInstance() {
18736
+ if (!this._instance) {
18737
+ this._instance = new PropagationAPI;
18738
+ }
18739
+ return this._instance;
18740
+ }
18741
+ setGlobalPropagator(propagator) {
18742
+ return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
18743
+ }
18744
+ inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
18745
+ return this._getGlobalPropagator().inject(context, carrier, setter);
18746
+ }
18747
+ extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
18748
+ return this._getGlobalPropagator().extract(context, carrier, getter);
18749
+ }
18750
+ fields() {
18751
+ return this._getGlobalPropagator().fields();
18752
+ }
18753
+ disable() {
18754
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18755
+ }
18756
+ _getGlobalPropagator() {
18757
+ return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
18758
+ }
18759
+ }
18760
+ exports.PropagationAPI = PropagationAPI;
18761
+ });
18762
+
18763
+ // ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
18764
+ var require_propagation_api = __commonJS((exports) => {
18765
+ Object.defineProperty(exports, "__esModule", { value: true });
18766
+ exports.propagation = undefined;
18767
+ var propagation_1 = require_propagation();
18768
+ exports.propagation = propagation_1.PropagationAPI.getInstance();
18769
+ });
18770
+
18771
+ // ../../node_modules/@opentelemetry/api/build/src/api/trace.js
18772
+ var require_trace = __commonJS((exports) => {
18773
+ Object.defineProperty(exports, "__esModule", { value: true });
18774
+ exports.TraceAPI = undefined;
18775
+ var global_utils_1 = require_global_utils();
18776
+ var ProxyTracerProvider_1 = require_ProxyTracerProvider();
18777
+ var spancontext_utils_1 = require_spancontext_utils();
18778
+ var context_utils_1 = require_context_utils();
18779
+ var diag_1 = require_diag();
18780
+ var API_NAME = "trace";
18781
+
18782
+ class TraceAPI {
18783
+ constructor() {
18784
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
18785
+ this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
18786
+ this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
18787
+ this.deleteSpan = context_utils_1.deleteSpan;
18788
+ this.getSpan = context_utils_1.getSpan;
18789
+ this.getActiveSpan = context_utils_1.getActiveSpan;
18790
+ this.getSpanContext = context_utils_1.getSpanContext;
18791
+ this.setSpan = context_utils_1.setSpan;
18792
+ this.setSpanContext = context_utils_1.setSpanContext;
18793
+ }
18794
+ static getInstance() {
18795
+ if (!this._instance) {
18796
+ this._instance = new TraceAPI;
18797
+ }
18798
+ return this._instance;
18799
+ }
18800
+ setGlobalTracerProvider(provider) {
18801
+ const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
18802
+ if (success3) {
18803
+ this._proxyTracerProvider.setDelegate(provider);
18804
+ }
18805
+ return success3;
18806
+ }
18807
+ getTracerProvider() {
18808
+ return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
18809
+ }
18810
+ getTracer(name, version2) {
18811
+ return this.getTracerProvider().getTracer(name, version2);
18812
+ }
18813
+ disable() {
18814
+ (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
18815
+ this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
18816
+ }
18817
+ }
18818
+ exports.TraceAPI = TraceAPI;
18819
+ });
18820
+
18821
+ // ../../node_modules/@opentelemetry/api/build/src/trace-api.js
18822
+ var require_trace_api = __commonJS((exports) => {
18823
+ Object.defineProperty(exports, "__esModule", { value: true });
18824
+ exports.trace = undefined;
18825
+ var trace_1 = require_trace();
18826
+ exports.trace = trace_1.TraceAPI.getInstance();
18827
+ });
18828
+
18829
+ // ../../node_modules/@opentelemetry/api/build/src/index.js
18830
+ var require_src = __commonJS((exports) => {
18831
+ Object.defineProperty(exports, "__esModule", { value: true });
18832
+ 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;
18833
+ var utils_1 = require_utils();
18834
+ Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
18835
+ return utils_1.baggageEntryMetadataFromString;
18836
+ } });
18837
+ var context_1 = require_context();
18838
+ Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
18839
+ return context_1.createContextKey;
18840
+ } });
18841
+ Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
18842
+ return context_1.ROOT_CONTEXT;
18843
+ } });
18844
+ var consoleLogger_1 = require_consoleLogger();
18845
+ Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
18846
+ return consoleLogger_1.DiagConsoleLogger;
18847
+ } });
18848
+ var types_1 = require_types();
18849
+ Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
18850
+ return types_1.DiagLogLevel;
18851
+ } });
18852
+ var NoopMeter_1 = require_NoopMeter();
18853
+ Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
18854
+ return NoopMeter_1.createNoopMeter;
18855
+ } });
18856
+ var Metric_1 = require_Metric();
18857
+ Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
18858
+ return Metric_1.ValueType;
18859
+ } });
18860
+ var TextMapPropagator_1 = require_TextMapPropagator();
18861
+ Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
18862
+ return TextMapPropagator_1.defaultTextMapGetter;
18863
+ } });
18864
+ Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
18865
+ return TextMapPropagator_1.defaultTextMapSetter;
18866
+ } });
18867
+ var ProxyTracer_1 = require_ProxyTracer();
18868
+ Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
18869
+ return ProxyTracer_1.ProxyTracer;
18870
+ } });
18871
+ var ProxyTracerProvider_1 = require_ProxyTracerProvider();
18872
+ Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
18873
+ return ProxyTracerProvider_1.ProxyTracerProvider;
18874
+ } });
18875
+ var SamplingResult_1 = require_SamplingResult();
18876
+ Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
18877
+ return SamplingResult_1.SamplingDecision;
18878
+ } });
18879
+ var span_kind_1 = require_span_kind();
18880
+ Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
18881
+ return span_kind_1.SpanKind;
18882
+ } });
18883
+ var status_1 = require_status();
18884
+ Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
18885
+ return status_1.SpanStatusCode;
18886
+ } });
18887
+ var trace_flags_1 = require_trace_flags();
18888
+ Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
18889
+ return trace_flags_1.TraceFlags;
18890
+ } });
18891
+ var utils_2 = require_utils2();
18892
+ Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
18893
+ return utils_2.createTraceState;
18894
+ } });
18895
+ var spancontext_utils_1 = require_spancontext_utils();
18896
+ Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
18897
+ return spancontext_utils_1.isSpanContextValid;
18898
+ } });
18899
+ Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
18900
+ return spancontext_utils_1.isValidTraceId;
18901
+ } });
18902
+ Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
18903
+ return spancontext_utils_1.isValidSpanId;
18904
+ } });
18905
+ var invalid_span_constants_1 = require_invalid_span_constants();
18906
+ Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
18907
+ return invalid_span_constants_1.INVALID_SPANID;
18908
+ } });
18909
+ Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
18910
+ return invalid_span_constants_1.INVALID_TRACEID;
18911
+ } });
18912
+ Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
18913
+ return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
18914
+ } });
18915
+ var context_api_1 = require_context_api();
18916
+ Object.defineProperty(exports, "context", { enumerable: true, get: function() {
18917
+ return context_api_1.context;
18918
+ } });
18919
+ var diag_api_1 = require_diag_api();
18920
+ Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
18921
+ return diag_api_1.diag;
18922
+ } });
18923
+ var metrics_api_1 = require_metrics_api();
18924
+ Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
18925
+ return metrics_api_1.metrics;
18926
+ } });
18927
+ var propagation_api_1 = require_propagation_api();
18928
+ Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
18929
+ return propagation_api_1.propagation;
18930
+ } });
18931
+ var trace_api_1 = require_trace_api();
18932
+ Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
18933
+ return trace_api_1.trace;
18934
+ } });
18935
+ exports.default = {
18936
+ context: context_api_1.context,
18937
+ diag: diag_api_1.diag,
18938
+ metrics: metrics_api_1.metrics,
18939
+ propagation: propagation_api_1.propagation,
18940
+ trace: trace_api_1.trace
18941
+ };
18942
+ });
18943
+
18944
+ // ../types/src/processor/processor.ts
18945
+ var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
18946
+ var init_processor = __esm(() => {
18947
+ init_zod();
18948
+ init_common();
18949
+ import_api = __toESM(require_src(), 1);
18950
+ noopTracingContext = {
18951
+ traceId: "",
18952
+ getActiveSpan() {
18953
+ return;
18954
+ },
18955
+ async withSpan(_name, _options, fn) {
18956
+ const noopSpan = {
18957
+ spanContext: () => ({
18958
+ traceId: "",
18959
+ spanId: "",
18960
+ traceFlags: 0
18961
+ }),
18962
+ setAttribute: () => noopSpan,
18963
+ setAttributes: () => noopSpan,
18964
+ addEvent: () => noopSpan,
18965
+ addLink: () => noopSpan,
18966
+ addLinks: () => noopSpan,
18967
+ setStatus: () => noopSpan,
18968
+ updateName: () => noopSpan,
18969
+ end: () => {},
18970
+ isRecording: () => false,
18971
+ recordException: () => {}
18972
+ };
18973
+ return fn(noopSpan);
18974
+ }
18975
+ };
18976
+ ProcessorPortSchema = exports_external.object({
18977
+ name: exports_external.string(),
18978
+ schema: JsonSchemaSchema,
18979
+ required: exports_external.boolean().default(true)
18980
+ });
18981
+ ProcessorDefinitionSchema = exports_external.object({
18982
+ id: exports_external.string(),
18983
+ name: exports_external.string(),
18984
+ description: exports_external.string().optional(),
18985
+ inputSchema: JsonSchemaSchema,
18986
+ outputSchema: JsonSchemaSchema,
18987
+ configSchema: JsonSchemaSchema.optional(),
18988
+ inputPorts: exports_external.array(ProcessorPortSchema).optional(),
18989
+ outputPorts: exports_external.array(ProcessorPortSchema).optional(),
18990
+ isBuiltin: exports_external.boolean().default(true),
18991
+ pluginName: exports_external.string().optional()
18992
+ });
18993
+ ProcessorExecutionContextSchema = exports_external.object({
18994
+ jobId: exports_external.string(),
18995
+ stepId: exports_external.string(),
18996
+ tenantId: exports_external.string(),
18997
+ automationId: exports_external.string().optional(),
18998
+ workflowId: exports_external.string(),
18999
+ workerId: exports_external.string().optional()
19000
+ });
19001
+ ((TraceStatus2) => {
19002
+ TraceStatus2["PENDING"] = "pending";
19003
+ TraceStatus2["RUNNING"] = "running";
19004
+ TraceStatus2["COMPLETED"] = "completed";
19005
+ TraceStatus2["FAILED"] = "failed";
19006
+ })(TraceStatus ||= {});
19007
+ });
19008
+
19009
+ // ../types/src/processor/execution.ts
19010
+ function asTuple(values) {
19011
+ return values;
19012
+ }
19013
+ var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
19014
+ var init_execution = __esm(() => {
19015
+ init_zod();
19016
+ WorkflowExecutionStatusValue = {
19017
+ CREATED: "created",
19018
+ PENDING: "pending",
19019
+ RUNNING: "running",
19020
+ WAITING: "waiting",
19021
+ COMPLETED: "completed",
19022
+ FAILED: "failed",
19023
+ CANCELLED: "cancelled"
19024
+ };
19025
+ WorkflowExecutionStatusSchema = exports_external.enum([
19026
+ WorkflowExecutionStatusValue.CREATED,
19027
+ WorkflowExecutionStatusValue.PENDING,
19028
+ WorkflowExecutionStatusValue.RUNNING,
19029
+ WorkflowExecutionStatusValue.WAITING,
19030
+ WorkflowExecutionStatusValue.COMPLETED,
19031
+ WorkflowExecutionStatusValue.FAILED,
19032
+ WorkflowExecutionStatusValue.CANCELLED
19033
+ ]);
19034
+ StepExecutionStatusValue = {
19035
+ PENDING: "pending",
19036
+ RUNNING: "running",
19037
+ SUCCESS: "success",
19038
+ FAILURE: "failure",
19039
+ WAITING: "waiting",
19040
+ SKIPPED: "skipped"
19041
+ };
19042
+ StepExecutionStatusSchema = exports_external.enum([
19043
+ StepExecutionStatusValue.PENDING,
19044
+ StepExecutionStatusValue.RUNNING,
19045
+ StepExecutionStatusValue.SUCCESS,
19046
+ StepExecutionStatusValue.FAILURE,
19047
+ StepExecutionStatusValue.WAITING,
19048
+ StepExecutionStatusValue.SKIPPED
19049
+ ]);
19050
+ TriggerTypeValue = {
19051
+ MANUAL: "manual",
19052
+ API: "api",
19053
+ WEBHOOK: "webhook",
19054
+ SCHEDULE: "schedule",
19055
+ EMAIL: "email",
19056
+ EVAL: "eval",
19057
+ CLI: "cli"
19058
+ };
19059
+ TriggerTypeSchema = exports_external.enum([
19060
+ TriggerTypeValue.MANUAL,
19061
+ TriggerTypeValue.API,
19062
+ TriggerTypeValue.WEBHOOK,
19063
+ TriggerTypeValue.SCHEDULE,
19064
+ TriggerTypeValue.EMAIL,
19065
+ TriggerTypeValue.EVAL,
19066
+ TriggerTypeValue.CLI
19067
+ ]);
19068
+ ExecutionTypeValue = {
19069
+ PROD: "prod",
19070
+ EVAL: "eval",
19071
+ PLAYGROUND: "playground"
19072
+ };
19073
+ ExecutionTypeSchema = exports_external.enum([
19074
+ ExecutionTypeValue.PROD,
19075
+ ExecutionTypeValue.EVAL,
19076
+ ExecutionTypeValue.PLAYGROUND
19077
+ ]);
19078
+ WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
19079
+ STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
19080
+ TRIGGER_TYPES = TriggerTypeSchema.options;
19081
+ EXECUTION_TYPES = ExecutionTypeSchema.options;
19082
+ });
19083
+
19084
+ // ../types/src/processor/configs/classify.ts
19085
+ var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
19086
+ var init_classify = __esm(() => {
19087
+ init_zod();
19088
+ ClassifyInputSchema = exports_external.object({
19089
+ content: exports_external.string().optional().describe("Text content to classify"),
19090
+ text: exports_external.string().optional().describe("Text content (alternative to content)")
19091
+ }).refine((data) => !!(data.content || data.text), {
19092
+ message: "Either content or text must be provided"
19093
+ });
19094
+ ClassifyLabelSchema = exports_external.object({
19095
+ name: exports_external.string().min(1).describe("Label value returned in output.label"),
19096
+ description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
19097
+ });
19098
+ ClassifyConfigSchema = exports_external.object({
19099
+ labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
19100
+ 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."),
19101
+ provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
19102
+ model: exports_external.string().optional().describe("Model override"),
19103
+ maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
19104
+ });
19105
+ ClassifyOutputSchema = exports_external.object({
19106
+ label: exports_external.string().describe("The selected label name"),
19107
+ confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
19108
+ reason: exports_external.string().describe("Short justification for the chosen label")
19109
+ });
19110
+ });
19111
+
19112
+ // ../types/src/parser/parser.ts
19113
+ function resolveEffectiveMimeType(filename, declaredMimeType) {
19114
+ const ext = filename.split(".").pop()?.toLowerCase();
19115
+ if (!ext)
19116
+ return declaredMimeType;
19117
+ const extensionMime = EXTENSION_TO_MIME[ext];
19118
+ return extensionMime ?? declaredMimeType;
19119
+ }
19120
+ function mimeTypeForExtension(extension) {
19121
+ return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
19122
+ }
19123
+ function extensionForMimeType(mimeType) {
19124
+ const base = mimeType.split(";")[0]?.trim().toLowerCase();
19125
+ return base ? MIME_TO_EXTENSION[base] : undefined;
19126
+ }
19127
+ function getParserCategory(mimeType) {
19128
+ const normalized = mimeType.toLowerCase().trim();
19129
+ if (ParserCategory.PLAINTEXT.includes(normalized)) {
19130
+ return "plaintext";
19131
+ }
19132
+ if (ParserCategory.OFFICE.includes(normalized)) {
19133
+ return "office";
19134
+ }
19135
+ if (ParserCategory.DOCUMENT.includes(normalized)) {
19136
+ return "document";
19137
+ }
19138
+ return null;
19139
+ }
19140
+ function requiresSpecializedParser(mimeType) {
19141
+ return getParserCategory(mimeType) === "document";
19142
+ }
19143
+ function getAllSupportedMimeTypes() {
19144
+ return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
19145
+ }
19146
+ function getSupportedFormatsLabel() {
19147
+ const allMimes = getAllSupportedMimeTypes();
19148
+ const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
19149
+ return labels.join(", ");
19150
+ }
19151
+ var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_EXTENSION, MIME_TO_LABEL;
19152
+ var init_parser = __esm(() => {
19153
+ init_zod();
19154
+ OFFICE_MIME_TYPES = [
19155
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
19156
+ "application/msword",
19157
+ "application/vnd.oasis.opendocument.text",
19158
+ "application/rtf",
19159
+ "text/rtf",
19160
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19161
+ "application/vnd.ms-excel",
19162
+ "application/vnd.ms-excel.sheet.macroenabled.12",
19163
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12",
19164
+ "application/vnd.oasis.opendocument.spreadsheet",
19165
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
19166
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
19167
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12",
19168
+ "application/vnd.ms-powerpoint",
19169
+ "application/vnd.oasis.opendocument.presentation",
19170
+ "message/rfc822",
19171
+ "application/vnd.ms-outlook",
19172
+ "application/epub+zip"
19173
+ ];
19174
+ ParserCategory = {
19175
+ PLAINTEXT: [
19176
+ "text/plain",
19177
+ "text/markdown",
19178
+ "text/csv",
19179
+ "text/tab-separated-values",
19180
+ "text/html",
19181
+ "text/xml",
19182
+ "application/json",
19183
+ "application/x-yaml",
19184
+ "application/toml",
19185
+ "image/svg+xml",
19186
+ "text/x-rst",
19187
+ "text/x-org",
19188
+ "application/x-latex",
19189
+ "application/x-ipynb+json",
19190
+ "application/x-bibtex",
19191
+ "application/docbook+xml",
19192
+ "application/x-fictionbook+xml"
19193
+ ],
19194
+ OFFICE: [...OFFICE_MIME_TYPES],
19195
+ DOCUMENT: [
19196
+ "application/pdf",
19197
+ "image/png",
19198
+ "image/jpeg",
19199
+ "image/webp",
19200
+ "image/tiff",
19201
+ "image/gif",
19202
+ "image/bmp"
19203
+ ]
19204
+ };
19205
+ ParserTypeSchema = exports_external.enum([
19206
+ "plaintext",
19207
+ "office",
19208
+ "llm-vision",
19209
+ "ocr"
19210
+ ]);
19211
+ DocumentMetadataSchema = exports_external.object({
19212
+ filename: exports_external.string(),
19213
+ mimeType: exports_external.string(),
19214
+ size: exports_external.number().describe("File size in bytes"),
19215
+ storageRef: exports_external.string().optional().describe("Storage reference for the original file")
19216
+ });
19217
+ ParseUsageSchema = exports_external.object({
19218
+ pageCount: exports_external.number(),
19219
+ processingTimeMs: exports_external.number().optional()
19220
+ });
19221
+ CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
19222
+ PointSchema = exports_external.object({
19223
+ x: exports_external.number(),
19224
+ y: exports_external.number()
19225
+ });
19226
+ BoundingRegionSchema = exports_external.object({
19227
+ polygon: exports_external.array(PointSchema).min(3),
19228
+ unit: CoordinateUnitSchema,
19229
+ pageIndex: exports_external.number()
19230
+ });
19231
+ PositionedTextSchema = exports_external.object({
19232
+ text: exports_external.string(),
19233
+ confidence: exports_external.number().min(0).max(1).optional(),
19234
+ boundingRegion: BoundingRegionSchema.optional()
19235
+ });
19236
+ TableCellSchema = exports_external.object({
19237
+ content: exports_external.string(),
19238
+ rowIndex: exports_external.number(),
19239
+ columnIndex: exports_external.number(),
19240
+ rowSpan: exports_external.number().default(1),
19241
+ columnSpan: exports_external.number().default(1),
19242
+ boundingRegion: BoundingRegionSchema.optional()
19243
+ });
19244
+ ExtractedTableSchema = exports_external.object({
19245
+ cells: exports_external.array(TableCellSchema),
19246
+ rowCount: exports_external.number(),
19247
+ columnCount: exports_external.number(),
19248
+ boundingRegion: BoundingRegionSchema.optional()
19249
+ });
19250
+ LayoutElementTypeSchema = exports_external.enum([
19251
+ "paragraph",
19252
+ "title",
19253
+ "sectionHeading",
19254
+ "pageHeader",
19255
+ "pageFooter",
19256
+ "pageNumber",
19257
+ "footnote",
19258
+ "table",
19259
+ "figure",
19260
+ "formulaBlock"
19261
+ ]);
19262
+ LayoutElementSchema = exports_external.object({
19263
+ type: LayoutElementTypeSchema,
19264
+ content: exports_external.string(),
19265
+ table: ExtractedTableSchema.optional(),
19266
+ caption: exports_external.string().optional(),
19267
+ figureId: exports_external.string().optional(),
19268
+ boundingRegion: BoundingRegionSchema.optional()
19269
+ });
19270
+ PageResultSchema = exports_external.object({
19271
+ pageIndex: exports_external.number().describe("0-based page index"),
19272
+ text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
19273
+ pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
19274
+ layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
19275
+ words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
19276
+ lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
19277
+ tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
19278
+ width: exports_external.number().optional().describe("Page width"),
19279
+ height: exports_external.number().optional().describe("Page height"),
19280
+ unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
19281
+ confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
19282
+ });
19283
+ ParseResultSchema = exports_external.object({
19284
+ document: DocumentMetadataSchema,
19285
+ usage: ParseUsageSchema,
19286
+ pages: exports_external.array(PageResultSchema),
19287
+ text: exports_external.string().describe("Combined text from all pages"),
19288
+ parserType: ParserTypeSchema,
19289
+ parserVersion: exports_external.string().optional(),
19290
+ model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
19291
+ rawResponse: exports_external.unknown().optional()
19292
+ });
19293
+ ParseOptionsSchema = exports_external.object({
19294
+ outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
19295
+ ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
19296
+ includeWordPositions: exports_external.boolean().default(false),
19297
+ includeLinePositions: exports_external.boolean().default(false),
19298
+ extractTables: exports_external.boolean().default(true),
19299
+ provider: exports_external.string().optional().describe("LLM provider ID to use"),
19300
+ model: exports_external.string().optional(),
19301
+ maxConcurrency: exports_external.number().min(1).max(30).default(3),
19302
+ pagesPerBatch: exports_external.number().min(1).max(20).default(5),
19303
+ prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
19304
+ languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
19305
+ tenantId: exports_external.string().optional()
19306
+ });
19307
+ ParserInputSchema = exports_external.object({
19308
+ data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
19309
+ filename: exports_external.string(),
19310
+ mimeType: exports_external.string(),
19311
+ options: ParseOptionsSchema.optional()
19312
+ });
19313
+ EXTENSION_TO_MIME = {
19314
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
19315
+ doc: "application/msword",
19316
+ odt: "application/vnd.oasis.opendocument.text",
19317
+ rtf: "application/rtf",
19318
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
19319
+ xls: "application/vnd.ms-excel",
19320
+ xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
19321
+ xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
19322
+ ods: "application/vnd.oasis.opendocument.spreadsheet",
19323
+ pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
19324
+ ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
19325
+ pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
19326
+ ppt: "application/vnd.ms-powerpoint",
19327
+ odp: "application/vnd.oasis.opendocument.presentation",
19328
+ eml: "message/rfc822",
19329
+ msg: "application/vnd.ms-outlook",
19330
+ epub: "application/epub+zip",
19331
+ pdf: "application/pdf",
19332
+ png: "image/png",
19333
+ jpg: "image/jpeg",
19334
+ jpeg: "image/jpeg",
19335
+ webp: "image/webp",
19336
+ tiff: "image/tiff",
19337
+ tif: "image/tiff",
19338
+ gif: "image/gif",
19339
+ bmp: "image/bmp",
19340
+ svg: "image/svg+xml",
19341
+ txt: "text/plain",
19342
+ md: "text/markdown",
19343
+ markdown: "text/markdown",
19344
+ csv: "text/csv",
19345
+ tsv: "text/tab-separated-values",
19346
+ html: "text/html",
19347
+ htm: "text/html",
19348
+ xml: "text/xml",
19349
+ json: "application/json",
19350
+ yaml: "application/x-yaml",
19351
+ yml: "application/x-yaml",
19352
+ toml: "application/toml",
19353
+ rst: "text/x-rst",
19354
+ org: "text/x-org",
19355
+ tex: "application/x-latex",
19356
+ latex: "application/x-latex",
19357
+ ipynb: "application/x-ipynb+json",
19358
+ bib: "application/x-bibtex",
19359
+ dbk: "application/docbook+xml",
19360
+ docbook: "application/docbook+xml",
19361
+ fb2: "application/x-fictionbook+xml"
19362
+ };
19363
+ MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
19364
+ if (!(mime in acc))
19365
+ acc[mime] = ext;
19366
+ return acc;
19367
+ }, {});
19368
+ MIME_TO_LABEL = {
19369
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
19370
+ "application/msword": "DOC",
19371
+ "application/vnd.oasis.opendocument.text": "ODT",
19372
+ "application/rtf": "RTF",
19373
+ "text/rtf": "RTF",
19374
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
19375
+ "application/vnd.ms-excel": "XLS",
19376
+ "application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
19377
+ "application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
19378
+ "application/vnd.oasis.opendocument.spreadsheet": "ODS",
19379
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
19380
+ "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
19381
+ "application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
19382
+ "application/vnd.ms-powerpoint": "PPT",
19383
+ "application/vnd.oasis.opendocument.presentation": "ODP",
19384
+ "message/rfc822": "EML",
19385
+ "application/vnd.ms-outlook": "MSG",
19386
+ "application/epub+zip": "EPUB",
19387
+ "application/pdf": "PDF",
19388
+ "image/png": "PNG",
19389
+ "image/jpeg": "JPEG",
19390
+ "image/webp": "WebP",
19391
+ "image/tiff": "TIFF",
19392
+ "image/gif": "GIF",
19393
+ "image/bmp": "BMP",
19394
+ "image/svg+xml": "SVG",
19395
+ "text/plain": "TXT",
19396
+ "text/markdown": "Markdown",
19397
+ "text/csv": "CSV",
19398
+ "text/tab-separated-values": "TSV",
19399
+ "text/html": "HTML",
19400
+ "text/xml": "XML",
19401
+ "application/json": "JSON",
19402
+ "application/x-yaml": "YAML",
19403
+ "application/toml": "TOML",
19404
+ "text/x-rst": "RST",
19405
+ "text/x-org": "Org",
19406
+ "application/x-latex": "LaTeX",
19407
+ "application/x-ipynb+json": "Jupyter",
19408
+ "application/x-bibtex": "BibTeX",
19409
+ "application/docbook+xml": "DocBook",
19410
+ "application/x-fictionbook+xml": "FB2"
19411
+ };
19412
+ });
19413
+
19414
+ // ../types/src/processor/configs/document-parser.ts
19415
+ var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
19416
+ var init_document_parser = __esm(() => {
19417
+ init_zod();
19418
+ init_runtime_file_ref();
19419
+ init_parser();
19420
+ DocumentParserInputSchema = ResolvedProcessorFileSchema;
19421
+ DocumentParserOutputSchema = ParseResultSchema;
19422
+ DocumentParserConfigSchema = exports_external.object({
19423
+ ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
19424
+ llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
19425
+ maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
19426
+ pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
19427
+ prompt: exports_external.string().optional().describe("Custom extraction prompt"),
19428
+ nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
19429
+ languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
19430
+ 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.")
19431
+ }).prefault({});
19432
+ });
19433
+
19434
+ // ../types/src/processor/configs/extract.ts
19435
+ var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
19436
+ var init_extract = __esm(() => {
19437
+ init_zod();
19438
+ ExtractInputSchema = exports_external.object({
19439
+ content: exports_external.string().optional().describe("Text content to extract from"),
19440
+ text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
19441
+ contentType: exports_external.enum(["text", "image"]).default("text"),
19442
+ imageData: exports_external.string().optional(),
19443
+ imageMimeType: exports_external.string().optional()
19444
+ }).refine((data) => data.content || data.text, {
19445
+ message: "Either content or text must be provided"
19446
+ });
19447
+ ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
19448
+ ExtractConfigSchema = exports_external.object({
19449
+ schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
19450
+ prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
19451
+ provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
19452
+ model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
19453
+ maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit.")
19454
+ });
19455
+ });
19456
+
19457
+ // ../types/src/processor/configs/merge.ts
19458
+ var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
19459
+ var init_merge = __esm(() => {
19460
+ init_zod();
19461
+ MergeConfigSchema = exports_external.object({
19462
+ preservePortNames: exports_external.boolean().default(true),
19463
+ outputKey: exports_external.string().optional()
19464
+ });
19465
+ MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
19466
+ MergeOutputSchema = exports_external.object({
19467
+ items: exports_external.array(exports_external.unknown()),
19468
+ count: exports_external.number(),
19469
+ merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
19470
+ });
19471
+ });
19472
+
19473
+ // ../types/src/processor/configs/pdf-embedder.ts
19474
+ var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
19475
+ var init_pdf_embedder = __esm(() => {
19476
+ init_zod();
19477
+ init_runtime_file_ref();
19478
+ init_parser();
19479
+ PdfEmbedderInputSchema = exports_external.object({
19480
+ file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
19481
+ parseResult: exports_external.object({
19482
+ pages: exports_external.array(PageResultSchema),
19483
+ text: exports_external.string().optional()
19484
+ }).describe("Parse result from ai.parse step (must include word positions)")
19485
+ });
19486
+ PdfEmbedderOutputSchema = exports_external.object({
19487
+ fileId: exports_external.string().describe("File ID from files table"),
19488
+ pageCount: exports_external.number().describe("Number of pages in the output PDF"),
19489
+ wordCount: exports_external.number().describe("Number of words embedded"),
19490
+ text: exports_external.string().describe("Extracted text (from parse step)")
19491
+ });
19492
+ PdfEmbedderConfigSchema = exports_external.object({
19493
+ outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
19494
+ 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")
19495
+ }).prefault({});
19496
+ });
19497
+
19498
+ // ../types/src/processor/configs/split.ts
19499
+ var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema, SplitOutputSchema;
19500
+ var init_split = __esm(() => {
19501
+ init_zod();
19502
+ SplitInputSchema = exports_external.object({
19503
+ pages: exports_external.array(exports_external.object({
19504
+ pageIndex: exports_external.number().describe("0-based page index"),
19505
+ text: exports_external.string().describe("Extracted text for this page"),
19506
+ pageName: exports_external.string().optional()
19507
+ })).min(1).describe("Per-page parsed content from a document parser")
19508
+ }).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
19509
+ SplitConfigSchema = exports_external.object({
19510
+ sections: exports_external.array(exports_external.object({
19511
+ name: exports_external.string().min(1).describe("Stable id for the section"),
19512
+ 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."),
19513
+ 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").'),
19514
+ 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.')
19515
+ })).min(1),
19516
+ rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
19517
+ 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.'),
19518
+ 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.")
19519
+ });
19520
+ 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.");
19521
+ SplitOutputSchema = exports_external.object({
19522
+ splits: exports_external.array(exports_external.object({
19523
+ name: exports_external.string(),
19524
+ page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
19525
+ confidence: ConfidenceLevelSchema.describe("LLM confidence at the start anchor: low | medium | high."),
19526
+ notes: exports_external.string(),
19527
+ evidence: exports_external.object({
19528
+ start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
19529
+ start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
19530
+ }).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
19531
+ end_evidence: exports_external.object({
19532
+ end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
19533
+ confidence: ConfidenceLevelSchema,
19534
+ 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.")
19535
+ }).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)."),
19536
+ text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
19537
+ pages: exports_external.array(exports_external.object({
19538
+ pageIndex: exports_external.number().int(),
19539
+ text: exports_external.string(),
19540
+ pageName: exports_external.string().optional(),
19541
+ source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
19542
+ })).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."),
19543
+ pages_anchored: exports_external.array(exports_external.number().int()),
19544
+ pages_inferred: exports_external.array(exports_external.number().int())
19545
+ }))
19546
+ });
19547
+ });
19548
+
19549
+ // ../types/src/processor/configs/template.ts
19550
+ var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
19551
+ var init_template = __esm(() => {
19552
+ init_zod();
19553
+ TemplateInputSchema = exports_external.object({
19554
+ data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
19555
+ });
19556
+ TemplateOutputSchema = exports_external.object({
19557
+ fileId: exports_external.string().describe("File ID from files table")
19558
+ });
19559
+ TemplateConfigSchema = exports_external.object({
19560
+ templateId: exports_external.string().describe("ID of the template from templates table"),
19561
+ outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
19562
+ highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
19563
+ notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
19564
+ });
19565
+ });
19566
+
19567
+ // ../types/src/processor/configs/xlsx-to-json.ts
19568
+ var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
19569
+ var init_xlsx_to_json = __esm(() => {
19570
+ init_zod();
19571
+ init_runtime_file_ref();
19572
+ XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
19573
+ XlsxToJsonOutputSchema = exports_external.object({
19574
+ rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
19575
+ fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
19576
+ });
19577
+ XlsxToJsonConfigSchema = exports_external.object({
19578
+ sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
19579
+ outputCsv: exports_external.boolean().default(false).optional(),
19580
+ outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
19581
+ });
19582
+ });
19583
+
19584
+ // ../types/src/processor/configs/react-hook-form.ts
19585
+ function extractFieldMetadata(schema) {
19586
+ const fields = [];
19587
+ let inner = schema;
19588
+ while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
19589
+ inner = inner.unwrap();
19590
+ }
19591
+ if (inner instanceof exports_external.ZodObject) {
19592
+ for (const [name, fieldSchema] of Object.entries(inner.shape)) {
19593
+ fields.push(extractSingleFieldMetadata(name, fieldSchema));
19594
+ }
19595
+ }
19596
+ return fields;
19597
+ }
19598
+ function extractSingleFieldMetadata(name, schema) {
19599
+ let current = schema;
19600
+ let required2 = true;
19601
+ let defaultValue = undefined;
19602
+ let description = current.description;
19603
+ while (true) {
19604
+ if (current instanceof exports_external.ZodOptional) {
19605
+ required2 = false;
19606
+ current = current.unwrap();
19607
+ } else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
19608
+ defaultValue = current._def.defaultValue;
19609
+ current = current.unwrap();
19610
+ } else {
19611
+ break;
19612
+ }
19613
+ description ??= current.description;
19614
+ }
19615
+ const base = { name, type: "unknown", required: required2, description, defaultValue };
19616
+ if (current instanceof exports_external.ZodString)
19617
+ return { ...base, type: "string" };
19618
+ if (current instanceof exports_external.ZodNumber) {
19619
+ let min;
19620
+ let max;
19621
+ for (const c of current._def.checks ?? []) {
19622
+ const def = c._zod.def;
19623
+ if (def.check === "greater_than")
19624
+ min = def.value;
19625
+ if (def.check === "less_than")
19626
+ max = def.value;
19627
+ }
19628
+ return { ...base, type: "number", min, max };
19629
+ }
19630
+ if (current instanceof exports_external.ZodBoolean)
19631
+ return { ...base, type: "boolean" };
19632
+ if (current instanceof exports_external.ZodEnum) {
19633
+ return { ...base, type: "enum", enumValues: current.options };
19634
+ }
19635
+ if (current instanceof exports_external.ZodArray)
19636
+ return { ...base, type: "array" };
19637
+ if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
19638
+ return { ...base, type: "object" };
19639
+ }
19640
+ return base;
19641
+ }
19642
+ function getConfigFieldMetadata(processorId) {
19643
+ const schema = getConfigSchema(processorId);
19644
+ if (!schema)
19645
+ return;
19646
+ return extractFieldMetadata(schema);
19647
+ }
19648
+ function getConfigDefaults(processorId) {
19649
+ const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
19650
+ if (!schema)
19651
+ return {};
19652
+ try {
19653
+ const result = schema.safeParse({});
19654
+ if (result.success) {
19655
+ return result.data;
19656
+ }
19657
+ } catch {}
19658
+ const fields = extractFieldMetadata(schema);
19659
+ const defaults = {};
19660
+ for (const field of fields) {
19661
+ if (field.defaultValue !== undefined) {
19662
+ defaults[field.name] = field.defaultValue;
19663
+ }
19664
+ }
19665
+ return defaults;
19666
+ }
19667
+ function validateConfig(processorId, config2) {
19668
+ const schema = getConfigSchema(processorId);
19669
+ if (!schema) {
19670
+ return { valid: true, errors: {} };
19671
+ }
19672
+ const result = schema.safeParse(config2);
19673
+ if (result.success) {
19674
+ return { valid: true, errors: {} };
19675
+ }
19676
+ const errors3 = {};
19677
+ for (const issue2 of result.error.issues) {
19678
+ const path = issue2.path.join(".");
19679
+ errors3[path] = issue2.message;
19680
+ }
19681
+ return { valid: false, errors: errors3 };
19682
+ }
19683
+ var init_react_hook_form = __esm(() => {
19684
+ init_zod();
19685
+ init_configs();
19686
+ });
19687
+
19688
+ // ../types/src/processor/configs/index.ts
19689
+ function getProcessorSchemas(processorId) {
19690
+ return PROCESSOR_SCHEMAS[processorId];
19691
+ }
19692
+ function getConfigSchema(processorId) {
19693
+ return PROCESSOR_SCHEMAS[processorId]?.configSchema;
19694
+ }
19695
+ function getAllProcessorJsonSchemas() {
19696
+ return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
19697
+ id: p.id,
19698
+ inputSchema: toJsonSchema(p.inputSchema),
19699
+ outputSchema: toJsonSchema(p.outputSchema),
19700
+ configSchema: toJsonSchema(p.configSchema)
19701
+ }));
19702
+ }
19703
+ function listProcessorIds() {
19704
+ return Object.keys(PROCESSOR_SCHEMAS);
19705
+ }
19706
+ var PROCESSOR_SCHEMAS;
19707
+ var init_configs = __esm(() => {
19708
+ init_common();
19709
+ init_ids();
19710
+ init_classify();
19711
+ init_document_parser();
19712
+ init_extract();
19713
+ init_merge();
19714
+ init_pdf_embedder();
19715
+ init_split();
19716
+ init_template();
19717
+ init_xlsx_to_json();
19718
+ init_react_hook_form();
19719
+ init_classify();
19720
+ init_document_parser();
19721
+ init_extract();
19722
+ init_merge();
19723
+ init_pdf_embedder();
19724
+ init_split();
19725
+ init_template();
19726
+ init_xlsx_to_json();
19727
+ PROCESSOR_SCHEMAS = {
19728
+ [PROCESSOR_IDS.EXTRACT]: {
19729
+ id: PROCESSOR_IDS.EXTRACT,
19730
+ inputSchema: ExtractInputSchema,
19731
+ outputSchema: ExtractOutputSchema,
19732
+ configSchema: ExtractConfigSchema
19733
+ },
19734
+ [PROCESSOR_IDS.DOCUMENT_PARSER]: {
19735
+ id: PROCESSOR_IDS.DOCUMENT_PARSER,
19736
+ inputSchema: DocumentParserInputSchema,
19737
+ outputSchema: DocumentParserOutputSchema,
19738
+ configSchema: DocumentParserConfigSchema
19739
+ },
19740
+ [PROCESSOR_IDS.MERGE]: {
19741
+ id: PROCESSOR_IDS.MERGE,
19742
+ inputSchema: MergeInputSchema,
19743
+ outputSchema: MergeOutputSchema,
19744
+ configSchema: MergeConfigSchema
19745
+ },
19746
+ [PROCESSOR_IDS.TEMPLATE]: {
19747
+ id: PROCESSOR_IDS.TEMPLATE,
19748
+ inputSchema: TemplateInputSchema,
19749
+ outputSchema: TemplateOutputSchema,
19750
+ configSchema: TemplateConfigSchema
19751
+ },
19752
+ [PROCESSOR_IDS.PDF_EMBEDDER]: {
19753
+ id: PROCESSOR_IDS.PDF_EMBEDDER,
19754
+ inputSchema: PdfEmbedderInputSchema,
19755
+ outputSchema: PdfEmbedderOutputSchema,
19756
+ configSchema: PdfEmbedderConfigSchema
19757
+ },
19758
+ [PROCESSOR_IDS.SPLIT]: {
19759
+ id: PROCESSOR_IDS.SPLIT,
19760
+ inputSchema: SplitInputSchema,
19761
+ outputSchema: SplitOutputSchema,
19762
+ configSchema: SplitConfigSchema
19763
+ },
19764
+ [PROCESSOR_IDS.CLASSIFY]: {
19765
+ id: PROCESSOR_IDS.CLASSIFY,
19766
+ inputSchema: ClassifyInputSchema,
19767
+ outputSchema: ClassifyOutputSchema,
19768
+ configSchema: ClassifyConfigSchema
19769
+ },
19770
+ [PROCESSOR_IDS.XLSX_TO_JSON]: {
19771
+ id: PROCESSOR_IDS.XLSX_TO_JSON,
19772
+ inputSchema: XlsxToJsonInputSchema,
19773
+ outputSchema: XlsxToJsonOutputSchema,
19774
+ configSchema: XlsxToJsonConfigSchema
19775
+ }
19776
+ };
19777
+ });
17085
19778
 
17086
19779
  // ../types/src/processor/index.ts
17087
- var init_processor = () => {};
19780
+ var init_processor2 = __esm(() => {
19781
+ init_processor();
19782
+ init_execution();
19783
+ init_configs();
19784
+ });
17088
19785
 
17089
19786
  // ../types/src/parser/index.ts
17090
- var init_parser = () => {};
19787
+ var init_parser2 = __esm(() => {
19788
+ init_parser();
19789
+ });
17091
19790
 
17092
19791
  // ../types/src/otel/semantic-conventions.ts
17093
19792
  function mapLLMAttributes(attrs) {
@@ -20407,7 +23106,7 @@ var require_data = __commonJS((exports, module) => {
20407
23106
  });
20408
23107
 
20409
23108
  // ../../node_modules/fast-uri/lib/utils.js
20410
- var require_utils = __commonJS((exports, module) => {
23109
+ var require_utils3 = __commonJS((exports, module) => {
20411
23110
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
20412
23111
  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
23112
  function stringArrayToHexStripped(input) {
@@ -20663,7 +23362,7 @@ var require_utils = __commonJS((exports, module) => {
20663
23362
 
20664
23363
  // ../../node_modules/fast-uri/lib/schemes.js
20665
23364
  var require_schemes = __commonJS((exports, module) => {
20666
- var { isUUID } = require_utils();
23365
+ var { isUUID } = require_utils3();
20667
23366
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
20668
23367
  var supportedSchemeNames = [
20669
23368
  "http",
@@ -20837,7 +23536,7 @@ var require_schemes = __commonJS((exports, module) => {
20837
23536
 
20838
23537
  // ../../node_modules/fast-uri/index.js
20839
23538
  var require_fast_uri = __commonJS((exports, module) => {
20840
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
23539
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
20841
23540
  var { SCHEMES, getSchemeHandler } = require_schemes();
20842
23541
  function normalize(uri, options) {
20843
23542
  if (typeof uri === "string") {
@@ -23247,7 +25946,7 @@ var require_draft7 = __commonJS((exports) => {
23247
25946
  });
23248
25947
 
23249
25948
  // ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
23250
- var require_types = __commonJS((exports) => {
25949
+ var require_types2 = __commonJS((exports) => {
23251
25950
  Object.defineProperty(exports, "__esModule", { value: true });
23252
25951
  exports.DiscrError = undefined;
23253
25952
  var DiscrError;
@@ -23261,7 +25960,7 @@ var require_types = __commonJS((exports) => {
23261
25960
  var require_discriminator = __commonJS((exports) => {
23262
25961
  Object.defineProperty(exports, "__esModule", { value: true });
23263
25962
  var codegen_1 = require_codegen();
23264
- var types_1 = require_types();
25963
+ var types_1 = require_types2();
23265
25964
  var compile_1 = require_compile();
23266
25965
  var ref_error_1 = require_ref_error();
23267
25966
  var util_1 = require_util();
@@ -23915,7 +26614,7 @@ function workflowInputTypeToJsonSchema(def) {
23915
26614
  case "boolean":
23916
26615
  return { type: "boolean" };
23917
26616
  case "file":
23918
- return { ...FILE_REF_SCHEMA };
26617
+ return { ...WORKFLOW_FILE_REF_JSON_SCHEMA };
23919
26618
  case "array":
23920
26619
  return { type: "array", items: itemsToJsonSchema(def.items) };
23921
26620
  case "object":
@@ -23928,7 +26627,7 @@ function itemsToJsonSchema(items) {
23928
26627
  if (!items)
23929
26628
  return {};
23930
26629
  if (items.type === "file")
23931
- return { ...FILE_REF_SCHEMA };
26630
+ return { ...WORKFLOW_FILE_REF_JSON_SCHEMA };
23932
26631
  if (items.type === "enum" && items.values && items.values.length > 0) {
23933
26632
  return { type: "string", enum: items.values };
23934
26633
  }
@@ -24032,9 +26731,7 @@ function withPendingFileRefs(input, files) {
24032
26731
  const refsByField = {};
24033
26732
  for (const f of files) {
24034
26733
  (refsByField[f.fieldName] ??= []).push({
24035
- fileId: PENDING_FILE_REF,
24036
- filename: f.filename,
24037
- mimeType: f.mimeType
26734
+ $file: `input/${f.fieldName}/${PENDING_FILE_REF}-${f.filename}`
24038
26735
  });
24039
26736
  }
24040
26737
  const merged = { ...input };
@@ -24089,8 +26786,9 @@ function coerceScalar(value, type) {
24089
26786
  }
24090
26787
  return;
24091
26788
  }
24092
- var INPUT_VALIDATION_CODES, FILE_REF_SCHEMA, PENDING_FILE_REF = "__pending_upload__";
26789
+ var INPUT_VALIDATION_CODES, PENDING_FILE_REF = "__pending_upload__";
24093
26790
  var init_input = __esm(() => {
26791
+ init_runtime_file_ref();
24094
26792
  init_ajv();
24095
26793
  INPUT_VALIDATION_CODES = [
24096
26794
  "missing_required",
@@ -24100,16 +26798,6 @@ var init_input = __esm(() => {
24100
26798
  "array_length",
24101
26799
  "invalid_value"
24102
26800
  ];
24103
- FILE_REF_SCHEMA = {
24104
- type: "object",
24105
- required: ["fileId"],
24106
- "x-eigenpal-type": "file",
24107
- properties: {
24108
- fileId: { type: "string" },
24109
- filename: { type: "string" },
24110
- mimeType: { type: "string" }
24111
- }
24112
- };
24113
26801
  });
24114
26802
 
24115
26803
  // ../types/src/validation/output.ts
@@ -24200,24 +26888,6 @@ var init_validation = __esm(() => {
24200
26888
  init_workspace_schema();
24201
26889
  });
24202
26890
 
24203
- // ../types/src/core/common.ts
24204
- function toJsonSchema2(schema) {
24205
- return exports_external.toJSONSchema(schema, { target: "draft-7" });
24206
- }
24207
- var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
24208
- var init_common = __esm(() => {
24209
- init_zod();
24210
- TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
24211
- return typeof val === "string" ? new Date(val) : val;
24212
- });
24213
- JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
24214
- BaseEntitySchema2 = exports_external.object({
24215
- id: exports_external.string(),
24216
- createdAt: TimestampSchema2.optional(),
24217
- updatedAt: TimestampSchema2.optional()
24218
- });
24219
- });
24220
-
24221
26891
  // ../../node_modules/@babel/parser/lib/index.js
24222
26892
  var require_lib = __commonJS((exports) => {
24223
26893
  Object.defineProperty(exports, "__esModule", {
@@ -24631,12 +27301,12 @@ var require_lib = __commonJS((exports) => {
24631
27301
  }
24632
27302
  const ParseErrorConstructors = {};
24633
27303
  for (const reasonCode of Object.keys(argument)) {
24634
- const template = argument[reasonCode];
24635
- const _ref = typeof template === "string" ? {
24636
- message: () => template
24637
- } : typeof template === "function" ? {
24638
- message: template
24639
- } : template, {
27304
+ const template2 = argument[reasonCode];
27305
+ const _ref = typeof template2 === "string" ? {
27306
+ message: () => template2
27307
+ } : typeof template2 === "function" ? {
27308
+ message: template2
27309
+ } : template2, {
24640
27310
  message
24641
27311
  } = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
24642
27312
  const toMessage = typeof message === "string" ? () => message : message;
@@ -39109,7 +41779,7 @@ var require_keywords = __commonJS((exports) => {
39109
41779
  });
39110
41780
 
39111
41781
  // ../../node_modules/sucrase/dist/parser/tokenizer/types.js
39112
- var require_types2 = __commonJS((exports) => {
41782
+ var require_types3 = __commonJS((exports) => {
39113
41783
  Object.defineProperty(exports, "__esModule", { value: true });
39114
41784
  var TokenType;
39115
41785
  (function(TokenType2) {
@@ -39173,8 +41843,8 @@ var require_types2 = __commonJS((exports) => {
39173
41843
  TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
39174
41844
  const arrow = 22528;
39175
41845
  TokenType2[TokenType2["arrow"] = arrow] = "arrow";
39176
- const template = 23552;
39177
- TokenType2[TokenType2["template"] = template] = "template";
41846
+ const template2 = 23552;
41847
+ TokenType2[TokenType2["template"] = template2] = "template";
39178
41848
  const ellipsis = 24576;
39179
41849
  TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
39180
41850
  const backQuote = 25600;
@@ -39593,7 +42263,7 @@ var require_types2 = __commonJS((exports) => {
39593
42263
  var require_state = __commonJS((exports) => {
39594
42264
  Object.defineProperty(exports, "__esModule", { value: true });
39595
42265
  var _keywords = require_keywords();
39596
- var _types = require_types2();
42266
+ var _types = require_types3();
39597
42267
 
39598
42268
  class Scope {
39599
42269
  constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
@@ -39979,7 +42649,7 @@ var require_base = __commonJS((exports) => {
39979
42649
  var require_util2 = __commonJS((exports) => {
39980
42650
  Object.defineProperty(exports, "__esModule", { value: true });
39981
42651
  var _index = require_tokenizer();
39982
- var _types = require_types2();
42652
+ var _types = require_types3();
39983
42653
  var _charcodes = require_charcodes();
39984
42654
  var _base = require_base();
39985
42655
  function isContextual(contextualKeyword) {
@@ -40141,7 +42811,7 @@ var require_identifier = __commonJS((exports) => {
40141
42811
  var require_readWordTree = __commonJS((exports) => {
40142
42812
  Object.defineProperty(exports, "__esModule", { value: true });
40143
42813
  var _keywords = require_keywords();
40144
- var _types = require_types2();
42814
+ var _types = require_types3();
40145
42815
  var READ_WORD_TREE = new Int32Array([
40146
42816
  -1,
40147
42817
  27,
@@ -49119,7 +51789,7 @@ var require_readWord = __commonJS((exports) => {
49119
51789
  var _identifier = require_identifier();
49120
51790
  var _index = require_tokenizer();
49121
51791
  var _readWordTree = require_readWordTree();
49122
- var _types = require_types2();
51792
+ var _types = require_types3();
49123
51793
  function readWord() {
49124
51794
  let treePos = 0;
49125
51795
  let code = 0;
@@ -49185,7 +51855,7 @@ var require_tokenizer = __commonJS((exports) => {
49185
51855
  var _keywords = require_keywords();
49186
51856
  var _readWord = require_readWord();
49187
51857
  var _readWord2 = _interopRequireDefault(_readWord);
49188
- var _types = require_types2();
51858
+ var _types = require_types3();
49189
51859
  var IdentifierRole;
49190
51860
  (function(IdentifierRole2) {
49191
51861
  const Access = 0;
@@ -49902,7 +52572,7 @@ var require_tokenizer = __commonJS((exports) => {
49902
52572
  // ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
49903
52573
  var require_getImportExportSpecifierInfo = __commonJS((exports) => {
49904
52574
  Object.defineProperty(exports, "__esModule", { value: true });
49905
- var _types = require_types2();
52575
+ var _types = require_types3();
49906
52576
  function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
49907
52577
  let endIndex = index + 1;
49908
52578
  if (isSpecifierEnd(tokens, endIndex)) {
@@ -50255,7 +52925,7 @@ var require_JSXTransformer = __commonJS((exports) => {
50255
52925
  var _xhtml = require_xhtml();
50256
52926
  var _xhtml2 = _interopRequireDefault(_xhtml);
50257
52927
  var _tokenizer = require_tokenizer();
50258
- var _types = require_types2();
52928
+ var _types = require_types3();
50259
52929
  var _charcodes = require_charcodes();
50260
52930
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
50261
52931
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -50759,7 +53429,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
50759
53429
  return obj && obj.__esModule ? obj : { default: obj };
50760
53430
  }
50761
53431
  var _tokenizer = require_tokenizer();
50762
- var _types = require_types2();
53432
+ var _types = require_types3();
50763
53433
  var _JSXTransformer = require_JSXTransformer();
50764
53434
  var _getJSXPragmaInfo = require_getJSXPragmaInfo();
50765
53435
  var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
@@ -50798,7 +53468,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
50798
53468
  }
50799
53469
  var _tokenizer = require_tokenizer();
50800
53470
  var _keywords = require_keywords();
50801
- var _types = require_types2();
53471
+ var _types = require_types3();
50802
53472
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
50803
53473
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
50804
53474
  var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
@@ -52833,7 +55503,7 @@ var require_HelperManager = __commonJS((exports) => {
52833
55503
  var require_identifyShadowedGlobals = __commonJS((exports) => {
52834
55504
  Object.defineProperty(exports, "__esModule", { value: true });
52835
55505
  var _tokenizer = require_tokenizer();
52836
- var _types = require_types2();
55506
+ var _types = require_types3();
52837
55507
  function identifyShadowedGlobals(tokens, scopes, globalNames) {
52838
55508
  if (!hasShadowedGlobals(tokens, globalNames)) {
52839
55509
  return;
@@ -52898,7 +55568,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
52898
55568
  // ../../node_modules/sucrase/dist/util/getIdentifierNames.js
52899
55569
  var require_getIdentifierNames = __commonJS((exports) => {
52900
55570
  Object.defineProperty(exports, "__esModule", { value: true });
52901
- var _types = require_types2();
55571
+ var _types = require_types3();
52902
55572
  function getIdentifierNames(code, tokens) {
52903
55573
  const names = [];
52904
55574
  for (const token of tokens) {
@@ -53074,7 +55744,7 @@ var require_util3 = __commonJS((exports) => {
53074
55744
  });
53075
55745
 
53076
55746
  // ../../node_modules/ts-interface-checker/dist/types.js
53077
- var require_types3 = __commonJS((exports) => {
55747
+ var require_types4 = __commonJS((exports) => {
53078
55748
  var __extends = exports && exports.__extends || function() {
53079
55749
  var extendStatics = function(d, b) {
53080
55750
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
@@ -53674,9 +56344,9 @@ var require_dist2 = __commonJS((exports) => {
53674
56344
  };
53675
56345
  Object.defineProperty(exports, "__esModule", { value: true });
53676
56346
  exports.Checker = exports.createCheckers = undefined;
53677
- var types_1 = require_types3();
56347
+ var types_1 = require_types4();
53678
56348
  var util_1 = require_util3();
53679
- var types_2 = require_types3();
56349
+ var types_2 = require_types4();
53680
56350
  Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
53681
56351
  return types_2.TArray;
53682
56352
  } });
@@ -53958,7 +56628,7 @@ var require_lval = __commonJS((exports) => {
53958
56628
  var _typescript = require_typescript();
53959
56629
  var _index = require_tokenizer();
53960
56630
  var _keywords = require_keywords();
53961
- var _types = require_types2();
56631
+ var _types = require_types3();
53962
56632
  var _base = require_base();
53963
56633
  var _expression = require_expression();
53964
56634
  var _util = require_util2();
@@ -54090,7 +56760,7 @@ var require_typescript = __commonJS((exports) => {
54090
56760
  Object.defineProperty(exports, "__esModule", { value: true });
54091
56761
  var _index = require_tokenizer();
54092
56762
  var _keywords = require_keywords();
54093
- var _types = require_types2();
56763
+ var _types = require_types3();
54094
56764
  var _base = require_base();
54095
56765
  var _expression = require_expression();
54096
56766
  var _lval = require_lval();
@@ -55352,7 +58022,7 @@ var require_typescript = __commonJS((exports) => {
55352
58022
  var require_jsx = __commonJS((exports) => {
55353
58023
  Object.defineProperty(exports, "__esModule", { value: true });
55354
58024
  var _index = require_tokenizer();
55355
- var _types = require_types2();
58025
+ var _types = require_types3();
55356
58026
  var _base = require_base();
55357
58027
  var _expression = require_expression();
55358
58028
  var _util = require_util2();
@@ -55615,10 +58285,10 @@ var require_jsx = __commonJS((exports) => {
55615
58285
  });
55616
58286
 
55617
58287
  // ../../node_modules/sucrase/dist/parser/plugins/types.js
55618
- var require_types4 = __commonJS((exports) => {
58288
+ var require_types5 = __commonJS((exports) => {
55619
58289
  Object.defineProperty(exports, "__esModule", { value: true });
55620
58290
  var _index = require_tokenizer();
55621
- var _types = require_types2();
58291
+ var _types = require_types3();
55622
58292
  var _base = require_base();
55623
58293
  var _expression = require_expression();
55624
58294
  var _flow = require_flow();
@@ -55651,12 +58321,12 @@ var require_expression = __commonJS((exports) => {
55651
58321
  Object.defineProperty(exports, "__esModule", { value: true });
55652
58322
  var _flow = require_flow();
55653
58323
  var _index = require_jsx();
55654
- var _types = require_types4();
58324
+ var _types = require_types5();
55655
58325
  var _typescript = require_typescript();
55656
58326
  var _index3 = require_tokenizer();
55657
58327
  var _keywords = require_keywords();
55658
58328
  var _state = require_state();
55659
- var _types3 = require_types2();
58329
+ var _types3 = require_types3();
55660
58330
  var _charcodes = require_charcodes();
55661
58331
  var _identifier = require_identifier();
55662
58332
  var _base = require_base();
@@ -56372,7 +59042,7 @@ var require_flow = __commonJS((exports) => {
56372
59042
  Object.defineProperty(exports, "__esModule", { value: true });
56373
59043
  var _index = require_tokenizer();
56374
59044
  var _keywords = require_keywords();
56375
- var _types = require_types2();
59045
+ var _types = require_types3();
56376
59046
  var _base = require_base();
56377
59047
  var _expression = require_expression();
56378
59048
  var _statement = require_statement();
@@ -57247,7 +59917,7 @@ var require_statement = __commonJS((exports) => {
57247
59917
  var _tokenizer = require_tokenizer();
57248
59918
  var _keywords = require_keywords();
57249
59919
  var _state = require_state();
57250
- var _types = require_types2();
59920
+ var _types = require_types3();
57251
59921
  var _charcodes = require_charcodes();
57252
59922
  var _base = require_base();
57253
59923
  var _expression = require_expression();
@@ -58282,7 +60952,7 @@ var require_TokenProcessor = __commonJS((exports) => {
58282
60952
  function _interopRequireDefault(obj) {
58283
60953
  return obj && obj.__esModule ? obj : { default: obj };
58284
60954
  }
58285
- var _types = require_types2();
60955
+ var _types = require_types3();
58286
60956
  var _isAsyncOperation = require_isAsyncOperation();
58287
60957
  var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
58288
60958
 
@@ -58540,7 +61210,7 @@ var require_TokenProcessor = __commonJS((exports) => {
58540
61210
  var require_getClassInfo = __commonJS((exports) => {
58541
61211
  Object.defineProperty(exports, "__esModule", { value: true });
58542
61212
  var _keywords = require_keywords();
58543
- var _types = require_types2();
61213
+ var _types = require_types3();
58544
61214
  function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
58545
61215
  const snapshot = tokens.snapshot();
58546
61216
  const headerInfo = processClassHeader(tokens);
@@ -58778,7 +61448,7 @@ var require_getClassInfo = __commonJS((exports) => {
58778
61448
  // ../../node_modules/sucrase/dist/util/elideImportEquals.js
58779
61449
  var require_elideImportEquals = __commonJS((exports) => {
58780
61450
  Object.defineProperty(exports, "__esModule", { value: true });
58781
- var _types = require_types2();
61451
+ var _types = require_types3();
58782
61452
  function elideImportEquals(tokens) {
58783
61453
  tokens.removeInitialToken();
58784
61454
  tokens.removeToken();
@@ -58802,7 +61472,7 @@ var require_elideImportEquals = __commonJS((exports) => {
58802
61472
  var require_getDeclarationInfo = __commonJS((exports) => {
58803
61473
  Object.defineProperty(exports, "__esModule", { value: true });
58804
61474
  var _tokenizer = require_tokenizer();
58805
- var _types = require_types2();
61475
+ var _types = require_types3();
58806
61476
  var EMPTY_DECLARATION_INFO = {
58807
61477
  typeDeclarations: new Set,
58808
61478
  valueDeclarations: new Set
@@ -58830,7 +61500,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
58830
61500
  var require_isExportFrom = __commonJS((exports) => {
58831
61501
  Object.defineProperty(exports, "__esModule", { value: true });
58832
61502
  var _keywords = require_keywords();
58833
- var _types = require_types2();
61503
+ var _types = require_types3();
58834
61504
  function isExportFrom(tokens) {
58835
61505
  let closeBraceIndex = tokens.currentIndex();
58836
61506
  while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
@@ -58845,7 +61515,7 @@ var require_isExportFrom = __commonJS((exports) => {
58845
61515
  var require_removeMaybeImportAttributes = __commonJS((exports) => {
58846
61516
  Object.defineProperty(exports, "__esModule", { value: true });
58847
61517
  var _keywords = require_keywords();
58848
- var _types = require_types2();
61518
+ var _types = require_types3();
58849
61519
  function removeMaybeImportAttributes(tokens) {
58850
61520
  if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
58851
61521
  tokens.removeToken();
@@ -58860,7 +61530,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
58860
61530
  // ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
58861
61531
  var require_shouldElideDefaultExport = __commonJS((exports) => {
58862
61532
  Object.defineProperty(exports, "__esModule", { value: true });
58863
- var _types = require_types2();
61533
+ var _types = require_types3();
58864
61534
  function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
58865
61535
  if (!isTypeScriptTransformEnabled || keepUnusedImports) {
58866
61536
  return false;
@@ -58891,7 +61561,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
58891
61561
  }
58892
61562
  var _tokenizer = require_tokenizer();
58893
61563
  var _keywords = require_keywords();
58894
- var _types = require_types2();
61564
+ var _types = require_types3();
58895
61565
  var _elideImportEquals = require_elideImportEquals();
58896
61566
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
58897
61567
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -59533,7 +62203,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
59533
62203
  return obj && obj.__esModule ? obj : { default: obj };
59534
62204
  }
59535
62205
  var _keywords = require_keywords();
59536
- var _types = require_types2();
62206
+ var _types = require_types3();
59537
62207
  var _elideImportEquals = require_elideImportEquals();
59538
62208
  var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
59539
62209
  var _getDeclarationInfo = require_getDeclarationInfo();
@@ -59803,7 +62473,7 @@ var require_FlowTransformer = __commonJS((exports) => {
59803
62473
  return obj && obj.__esModule ? obj : { default: obj };
59804
62474
  }
59805
62475
  var _keywords = require_keywords();
59806
- var _types = require_types2();
62476
+ var _types = require_types3();
59807
62477
  var _Transformer = require_Transformer();
59808
62478
  var _Transformer2 = _interopRequireDefault(_Transformer);
59809
62479
 
@@ -59923,7 +62593,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
59923
62593
  }
59924
62594
  return value;
59925
62595
  }
59926
- var _types = require_types2();
62596
+ var _types = require_types3();
59927
62597
  var _Transformer = require_Transformer();
59928
62598
  var _Transformer2 = _interopRequireDefault(_Transformer);
59929
62599
  var JEST_GLOBAL_NAME = "jest";
@@ -59997,7 +62667,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
59997
62667
  function _interopRequireDefault(obj) {
59998
62668
  return obj && obj.__esModule ? obj : { default: obj };
59999
62669
  }
60000
- var _types = require_types2();
62670
+ var _types = require_types3();
60001
62671
  var _Transformer = require_Transformer();
60002
62672
  var _Transformer2 = _interopRequireDefault(_Transformer);
60003
62673
 
@@ -60026,7 +62696,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
60026
62696
  function _interopRequireDefault(obj) {
60027
62697
  return obj && obj.__esModule ? obj : { default: obj };
60028
62698
  }
60029
- var _types = require_types2();
62699
+ var _types = require_types3();
60030
62700
  var _Transformer = require_Transformer();
60031
62701
  var _Transformer2 = _interopRequireDefault(_Transformer);
60032
62702
 
@@ -60054,7 +62724,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
60054
62724
  function _interopRequireDefault(obj) {
60055
62725
  return obj && obj.__esModule ? obj : { default: obj };
60056
62726
  }
60057
- var _types = require_types2();
62727
+ var _types = require_types3();
60058
62728
  var _Transformer = require_Transformer();
60059
62729
  var _Transformer2 = _interopRequireDefault(_Transformer);
60060
62730
 
@@ -60170,7 +62840,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
60170
62840
  return obj && obj.__esModule ? obj : { default: obj };
60171
62841
  }
60172
62842
  var _tokenizer = require_tokenizer();
60173
- var _types = require_types2();
62843
+ var _types = require_types3();
60174
62844
  var _Transformer = require_Transformer();
60175
62845
  var _Transformer2 = _interopRequireDefault(_Transformer);
60176
62846
 
@@ -60421,7 +63091,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
60421
63091
  function _interopRequireDefault(obj) {
60422
63092
  return obj && obj.__esModule ? obj : { default: obj };
60423
63093
  }
60424
- var _types = require_types2();
63094
+ var _types = require_types3();
60425
63095
  var _isIdentifier = require_isIdentifier();
60426
63096
  var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
60427
63097
  var _Transformer = require_Transformer();
@@ -60567,7 +63237,7 @@ var require_RootTransformer = __commonJS((exports) => {
60567
63237
  return obj && obj.__esModule ? obj : { default: obj };
60568
63238
  }
60569
63239
  var _keywords = require_keywords();
60570
- var _types = require_types2();
63240
+ var _types = require_types3();
60571
63241
  var _getClassInfo = require_getClassInfo();
60572
63242
  var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
60573
63243
  var _CJSImportTransformer = require_CJSImportTransformer();
@@ -60966,7 +63636,7 @@ var require_formatTokens = __commonJS((exports) => {
60966
63636
  }
60967
63637
  var _linesandcolumns = require_build();
60968
63638
  var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
60969
- var _types = require_types2();
63639
+ var _types = require_types3();
60970
63640
  function formatTokens(code, tokens) {
60971
63641
  if (tokens.length === 0) {
60972
63642
  return "";
@@ -61031,7 +63701,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
61031
63701
  function _interopRequireDefault(obj) {
61032
63702
  return obj && obj.__esModule ? obj : { default: obj };
61033
63703
  }
61034
- var _types = require_types2();
63704
+ var _types = require_types3();
61035
63705
  var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
61036
63706
  var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
61037
63707
  function getTSImportedNames(tokens) {
@@ -61416,7 +64086,7 @@ function describeUnsupportedType(nodeType) {
61416
64086
  function compileTypedScript(opts) {
61417
64087
  let ast;
61418
64088
  try {
61419
- ast = import_parser2.parse(opts.source, {
64089
+ ast = import_parser4.parse(opts.source, {
61420
64090
  sourceType: "script",
61421
64091
  plugins: ["typescript"],
61422
64092
  ranges: true
@@ -61668,9 +64338,9 @@ function stripCommentsAndStrings(s) {
61668
64338
  out = out.replace(/`(\\.|[^`\\])*`/g, "``");
61669
64339
  return out;
61670
64340
  }
61671
- var import_parser2, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
64341
+ var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
61672
64342
  var init_compile = __esm(() => {
61673
- import_parser2 = __toESM(require_lib(), 1);
64343
+ import_parser4 = __toESM(require_lib(), 1);
61674
64344
  import_sucrase = __toESM(require_dist3(), 1);
61675
64345
  EVALUATOR_PARAM_NAMES = ["expected", "actual"];
61676
64346
  });
@@ -61884,8 +64554,8 @@ function getAllStepJsonSchemas() {
61884
64554
  category: def.category,
61885
64555
  name: def.name,
61886
64556
  description: def.description,
61887
- configSchema: toJsonSchema2(def.configSchema),
61888
- outputSchema: toJsonSchema2(def.outputSchema),
64557
+ configSchema: toJsonSchema(def.configSchema),
64558
+ outputSchema: toJsonSchema(def.outputSchema),
61889
64559
  configInWith: def.configInWith
61890
64560
  }));
61891
64561
  }
@@ -62096,7 +64766,7 @@ var init_step_configs = __esm(() => {
62096
64766
  text: exports_external.string().describe("Extracted text from the document")
62097
64767
  });
62098
64768
  TransformXlsxToJsonConfigSchema = exports_external.object({
62099
- input: exports_external.string().min(1, "Input is required").describe("File input - template expression e.g. {{input.document}} resolving to fileId or file path descriptor"),
64769
+ input: exports_external.string().min(1, "Input is required").describe("File input - template expression e.g. {{input.document}} resolving to a scoped $file artifact at runtime"),
62100
64770
  sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name. Omit for first sheet."),
62101
64771
  outputCsv: exports_external.boolean().default(false).describe("If true, also write CSV to storage and include fileId in output"),
62102
64772
  outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true - supports LiquidJS e.g. {{filename}}.csv")
@@ -62221,12 +64891,12 @@ var init_step_configs = __esm(() => {
62221
64891
  });
62222
64892
  ActionInvokeWorkflowConfigSchema = exports_external.object({
62223
64893
  workflowId: exports_external.string().min(1, "Workflow ID is required").describe("ID of workflow to invoke"),
62224
- input: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Input to pass to workflow"),
62225
- wait: exports_external.boolean().optional().describe("If true, wait for the invoked workflow to complete (default: false)"),
62226
- timeout: exports_external.number().optional().describe("Max wait time in ms when wait=true (default: 300000)"),
62227
- pollInterval: exports_external.number().optional().describe("How often to poll status in ms when wait=true (default: 1000)")
64894
+ input: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Input record keyed by the invoked workflow's declared inputs"),
64895
+ wait: exports_external.boolean().optional().describe("Wait for the invoked workflow to complete and return its output (default: true). Set false for fire-and-forget."),
64896
+ timeout: exports_external.number().optional().describe("Max wait time in ms when waiting (default: 300000)"),
64897
+ pollInterval: exports_external.number().optional().describe("How often to poll status in ms when waiting (default: 1000)")
62228
64898
  });
62229
- ActionInvokeWorkflowOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Output from invoked workflow");
64899
+ ActionInvokeWorkflowOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("When wait is true, the invoked workflow's declared output fields are flattened to the top level alongside a `files` array — reference them as {{ steps.<invoke>.output.<field> }} (there is no `.data` or `.result` wrapper). When wait is false, execution metadata. Call get_workflow_output_schema to see the exact resolved fields.");
62230
64900
  ActionWebsiteReaderConfigSchema = exports_external.object({
62231
64901
  url: exports_external.string().min(1, "URL is required").describe("Website URL to fetch (supports template expressions)"),
62232
64902
  timeout: exports_external.number().positive().default(30000).optional().describe("Timeout in milliseconds"),
@@ -62531,81 +65201,6 @@ var init_actions = __esm(() => {
62531
65201
  ACTION_TYPES = ActionTypeSchema.options;
62532
65202
  });
62533
65203
 
62534
- // ../types/src/processor/execution.ts
62535
- function asTuple(values) {
62536
- return values;
62537
- }
62538
- var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
62539
- var init_execution = __esm(() => {
62540
- init_zod();
62541
- WorkflowExecutionStatusValue2 = {
62542
- CREATED: "created",
62543
- PENDING: "pending",
62544
- RUNNING: "running",
62545
- WAITING: "waiting",
62546
- COMPLETED: "completed",
62547
- FAILED: "failed",
62548
- CANCELLED: "cancelled"
62549
- };
62550
- WorkflowExecutionStatusSchema2 = exports_external.enum([
62551
- WorkflowExecutionStatusValue2.CREATED,
62552
- WorkflowExecutionStatusValue2.PENDING,
62553
- WorkflowExecutionStatusValue2.RUNNING,
62554
- WorkflowExecutionStatusValue2.WAITING,
62555
- WorkflowExecutionStatusValue2.COMPLETED,
62556
- WorkflowExecutionStatusValue2.FAILED,
62557
- WorkflowExecutionStatusValue2.CANCELLED
62558
- ]);
62559
- StepExecutionStatusValue2 = {
62560
- PENDING: "pending",
62561
- RUNNING: "running",
62562
- SUCCESS: "success",
62563
- FAILURE: "failure",
62564
- WAITING: "waiting",
62565
- SKIPPED: "skipped"
62566
- };
62567
- StepExecutionStatusSchema2 = exports_external.enum([
62568
- StepExecutionStatusValue2.PENDING,
62569
- StepExecutionStatusValue2.RUNNING,
62570
- StepExecutionStatusValue2.SUCCESS,
62571
- StepExecutionStatusValue2.FAILURE,
62572
- StepExecutionStatusValue2.WAITING,
62573
- StepExecutionStatusValue2.SKIPPED
62574
- ]);
62575
- TriggerTypeValue2 = {
62576
- MANUAL: "manual",
62577
- API: "api",
62578
- WEBHOOK: "webhook",
62579
- SCHEDULE: "schedule",
62580
- EMAIL: "email",
62581
- EVAL: "eval",
62582
- CLI: "cli"
62583
- };
62584
- TriggerTypeSchema2 = exports_external.enum([
62585
- TriggerTypeValue2.MANUAL,
62586
- TriggerTypeValue2.API,
62587
- TriggerTypeValue2.WEBHOOK,
62588
- TriggerTypeValue2.SCHEDULE,
62589
- TriggerTypeValue2.EMAIL,
62590
- TriggerTypeValue2.EVAL,
62591
- TriggerTypeValue2.CLI
62592
- ]);
62593
- ExecutionTypeValue2 = {
62594
- PROD: "prod",
62595
- EVAL: "eval",
62596
- PLAYGROUND: "playground"
62597
- };
62598
- ExecutionTypeSchema2 = exports_external.enum([
62599
- ExecutionTypeValue2.PROD,
62600
- ExecutionTypeValue2.EVAL,
62601
- ExecutionTypeValue2.PLAYGROUND
62602
- ]);
62603
- WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
62604
- STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
62605
- TRIGGER_TYPES2 = TriggerTypeSchema2.options;
62606
- EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
62607
- });
62608
-
62609
65204
  // ../types/src/workflow/workflow.ts
62610
65205
  function suggestWorkflowName(raw) {
62611
65206
  return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
@@ -62686,11 +65281,11 @@ var init_workflow = __esm(() => {
62686
65281
  ManualTriggerMethodSchema = exports_external.object({
62687
65282
  type: exports_external.literal("manual"),
62688
65283
  enabled: exports_external.boolean().optional(),
62689
- inputSchema: JsonSchemaSchema2.optional()
65284
+ inputSchema: JsonSchemaSchema.optional()
62690
65285
  });
62691
65286
  ApiTriggerMethodSchema = exports_external.object({
62692
65287
  type: exports_external.literal("api"),
62693
- inputSchema: JsonSchemaSchema2.optional()
65288
+ inputSchema: JsonSchemaSchema.optional()
62694
65289
  });
62695
65290
  EmailTriggerMethodSchema = exports_external.object({
62696
65291
  type: exports_external.literal("email"),
@@ -62719,7 +65314,7 @@ var init_workflow = __esm(() => {
62719
65314
  triggerMethods: exports_external.array(TriggerMethodSchema).default([{ type: "manual" }]),
62720
65315
  inputs: exports_external.array(WorkflowInputDefSchema).optional(),
62721
65316
  steps: exports_external.array(StepSchema),
62722
- output: exports_external.record(exports_external.string(), exports_external.string()).optional(),
65317
+ output: exports_external.union([exports_external.record(exports_external.string(), exports_external.string()), exports_external.string()]).optional(),
62723
65318
  settings: WorkflowSettingsSchema.optional(),
62724
65319
  defaultModel: exports_external.string().optional()
62725
65320
  });
@@ -62729,8 +65324,8 @@ var init_workflow = __esm(() => {
62729
65324
  yamlContent: exports_external.string(),
62730
65325
  definition: WorkflowDefinitionSchema,
62731
65326
  isCurrent: exports_external.boolean().default(true),
62732
- createdAt: TimestampSchema2,
62733
- updatedAt: TimestampSchema2.optional(),
65327
+ createdAt: TimestampSchema,
65328
+ updatedAt: TimestampSchema.optional(),
62734
65329
  createdBy: exports_external.string()
62735
65330
  });
62736
65331
  CreateWorkflowDefinitionSchema = exports_external.object({
@@ -62912,14 +65507,14 @@ function isFileOutput(value) {
62912
65507
  function isWorkflowResult(value) {
62913
65508
  return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
62914
65509
  }
62915
- var WorkflowExecutionStatusSchema3, StepExecutionStatusSchema3, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
65510
+ var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
62916
65511
  var init_execution2 = __esm(() => {
62917
65512
  init_zod();
62918
65513
  init_common();
62919
65514
  init_execution();
62920
65515
  init_workflow();
62921
- WorkflowExecutionStatusSchema3 = WorkflowExecutionStatusSchema2;
62922
- StepExecutionStatusSchema3 = StepExecutionStatusSchema2;
65516
+ WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
65517
+ StepExecutionStatusSchema2 = StepExecutionStatusSchema;
62923
65518
  ScopeEntryTypeSchema = exports_external.enum([
62924
65519
  "root",
62925
65520
  "if-then",
@@ -62941,7 +65536,7 @@ var init_execution2 = __esm(() => {
62941
65536
  ScopeStackSchema = exports_external.array(ScopeEntrySchema);
62942
65537
  StepResultSchema = exports_external.object({
62943
65538
  output: exports_external.unknown(),
62944
- status: StepExecutionStatusSchema3
65539
+ status: StepExecutionStatusSchema2
62945
65540
  });
62946
65541
  ExecutionContextSchema = exports_external.object({
62947
65542
  input: exports_external.record(exports_external.string(), exports_external.unknown()),
@@ -62969,7 +65564,7 @@ var init_execution2 = __esm(() => {
62969
65564
  triggerType: exports_external.string(),
62970
65565
  triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
62971
65566
  overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
62972
- status: WorkflowExecutionStatusSchema3,
65567
+ status: WorkflowExecutionStatusSchema2,
62973
65568
  scopeStack: ScopeStackSchema,
62974
65569
  currentStepIndex: exports_external.number(),
62975
65570
  stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
@@ -62977,15 +65572,15 @@ var init_execution2 = __esm(() => {
62977
65572
  error: exports_external.string().nullable(),
62978
65573
  priority: exports_external.number().default(50),
62979
65574
  leaseId: exports_external.string().nullable(),
62980
- leaseExpiresAt: TimestampSchema2.nullable(),
65575
+ leaseExpiresAt: TimestampSchema.nullable(),
62981
65576
  workerId: exports_external.string().nullable(),
62982
65577
  maxRetries: exports_external.number().default(0),
62983
65578
  originalExecutionId: exports_external.string().nullable().optional(),
62984
65579
  previousExecutionId: exports_external.string().nullable().optional(),
62985
65580
  retryNumber: exports_external.number().default(0),
62986
- createdAt: TimestampSchema2,
62987
- startedAt: TimestampSchema2.nullable(),
62988
- completedAt: TimestampSchema2.nullable(),
65581
+ createdAt: TimestampSchema,
65582
+ startedAt: TimestampSchema.nullable(),
65583
+ completedAt: TimestampSchema.nullable(),
62989
65584
  createdBy: exports_external.string().nullable()
62990
65585
  });
62991
65586
  StepExecutionSchema = exports_external.object({
@@ -63002,12 +65597,12 @@ var init_execution2 = __esm(() => {
63002
65597
  stepAttempt: exports_external.number().default(0),
63003
65598
  inputData: exports_external.unknown().nullable(),
63004
65599
  outputData: exports_external.unknown().nullable(),
63005
- status: StepExecutionStatusSchema3,
65600
+ status: StepExecutionStatusSchema2,
63006
65601
  error: exports_external.string().nullable(),
63007
65602
  overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
63008
65603
  durationMs: exports_external.number().nullable(),
63009
- startedAt: TimestampSchema2.nullable(),
63010
- completedAt: TimestampSchema2.nullable()
65604
+ startedAt: TimestampSchema.nullable(),
65605
+ completedAt: TimestampSchema.nullable()
63011
65606
  });
63012
65607
  ConnectorSchema = exports_external.object({
63013
65608
  id: exports_external.string(),
@@ -63018,8 +65613,8 @@ var init_execution2 = __esm(() => {
63018
65613
  config: exports_external.record(exports_external.string(), exports_external.unknown()),
63019
65614
  inputSchema: exports_external.unknown().optional(),
63020
65615
  outputSchema: exports_external.unknown().optional(),
63021
- createdAt: TimestampSchema2,
63022
- updatedAt: TimestampSchema2.optional(),
65616
+ createdAt: TimestampSchema,
65617
+ updatedAt: TimestampSchema.optional(),
63023
65618
  createdBy: exports_external.string()
63024
65619
  });
63025
65620
  WorkflowFileOutputSchema = exports_external.object({
@@ -63032,6 +65627,117 @@ var init_execution2 = __esm(() => {
63032
65627
  });
63033
65628
  });
63034
65629
 
65630
+ // ../types/src/workflow/invoke-workflow-contract.ts
65631
+ function inputToJsonSchema(input) {
65632
+ switch (input.type) {
65633
+ case "string":
65634
+ return { type: "string" };
65635
+ case "number":
65636
+ return { type: "number" };
65637
+ case "integer":
65638
+ return { type: "integer" };
65639
+ case "boolean":
65640
+ return { type: "boolean" };
65641
+ case "object":
65642
+ return { type: "object" };
65643
+ case "enum":
65644
+ return input.values && input.values.length > 0 ? { type: "string", enum: input.values } : { type: "string" };
65645
+ case "array": {
65646
+ const itemType = input.items?.type;
65647
+ if (itemType === "enum" && input.items?.values?.length) {
65648
+ return { type: "array", items: { type: "string", enum: input.items.values } };
65649
+ }
65650
+ return itemType ? { type: "array", items: { type: itemType } } : { type: "array" };
65651
+ }
65652
+ case "file":
65653
+ return {};
65654
+ default:
65655
+ return {};
65656
+ }
65657
+ }
65658
+ function buildWorkflowInputsJsonSchema(inputs) {
65659
+ const properties = {};
65660
+ const required2 = [];
65661
+ for (const input of inputs ?? []) {
65662
+ properties[input.name] = inputToJsonSchema(input);
65663
+ if (input.required !== false)
65664
+ required2.push(input.name);
65665
+ }
65666
+ return { type: "object", additionalProperties: false, required: required2, properties };
65667
+ }
65668
+ function workflowInputAcceptsType(inputType, resolvedType) {
65669
+ if (resolvedType === "unknown" || resolvedType === "null")
65670
+ return true;
65671
+ switch (inputType) {
65672
+ case "string":
65673
+ case "enum":
65674
+ return resolvedType === "string";
65675
+ case "number":
65676
+ case "integer":
65677
+ return resolvedType === "number" || resolvedType === "integer";
65678
+ case "boolean":
65679
+ return resolvedType === "boolean";
65680
+ case "array":
65681
+ return resolvedType === "array";
65682
+ case "file":
65683
+ return resolvedType === "file" || resolvedType === "object" || resolvedType === "array";
65684
+ case "object":
65685
+ default:
65686
+ return true;
65687
+ }
65688
+ }
65689
+ function buildWorkflowOutputContractSchema(output) {
65690
+ if (typeof output === "string")
65691
+ return;
65692
+ const keys = Object.keys(output ?? {});
65693
+ if (keys.length === 0)
65694
+ return;
65695
+ const properties = {};
65696
+ for (const key of keys)
65697
+ properties[key] = {};
65698
+ return { type: "object", additionalProperties: false, required: keys, properties };
65699
+ }
65700
+ function hasDeclaredOutput(output) {
65701
+ if (typeof output === "string")
65702
+ return output.trim().length > 0;
65703
+ return !!output && Object.keys(output).length > 0;
65704
+ }
65705
+ function* iterateSteps(steps) {
65706
+ if (!Array.isArray(steps))
65707
+ return;
65708
+ for (const raw of steps) {
65709
+ if (!raw || typeof raw !== "object")
65710
+ continue;
65711
+ const step = raw;
65712
+ yield step;
65713
+ for (const value of Object.values(step)) {
65714
+ if (!Array.isArray(value))
65715
+ continue;
65716
+ for (const item of value) {
65717
+ if (!item || typeof item !== "object")
65718
+ continue;
65719
+ const obj = item;
65720
+ if ("type" in obj) {
65721
+ yield* iterateSteps([obj]);
65722
+ } else if (Array.isArray(obj.steps)) {
65723
+ yield* iterateSteps(obj.steps);
65724
+ }
65725
+ }
65726
+ }
65727
+ }
65728
+ }
65729
+ function collectInvokeWorkflowTargetIds(definition) {
65730
+ const ids = new Set;
65731
+ for (const step of iterateSteps(definition?.steps)) {
65732
+ if (step.type === "action.invoke-workflow") {
65733
+ const id = step.with?.workflowId;
65734
+ if (typeof id === "string" && id.length > 0)
65735
+ ids.add(id);
65736
+ }
65737
+ }
65738
+ return [...ids];
65739
+ }
65740
+
63035
65741
  // ../types/src/workflow/index.ts
63036
65742
  var init_workflow2 = __esm(() => {
63037
65743
  init_step_configs();
@@ -64791,7 +67497,7 @@ function fromBig(n, le = false) {
64791
67497
  return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
64792
67498
  return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
64793
67499
  }
64794
- function split(lst, le = false) {
67500
+ function split2(lst, le = false) {
64795
67501
  const len = lst.length;
64796
67502
  let Ah = new Uint32Array(len);
64797
67503
  let Al = new Uint32Array(len);
@@ -64971,7 +67677,7 @@ var init_sha2 = __esm(() => {
64971
67677
  super(28);
64972
67678
  }
64973
67679
  };
64974
- K512 = /* @__PURE__ */ (() => split([
67680
+ K512 = /* @__PURE__ */ (() => split2([
64975
67681
  "0x428a2f98d728ae22",
64976
67682
  "0x7137449123ef65cd",
64977
67683
  "0xb5c0fbcfec4d3b2f",
@@ -65360,11 +68066,11 @@ function walkGrammar(node, parts) {
65360
68066
  }
65361
68067
  return current;
65362
68068
  }
65363
- function normalizeTemplate(template) {
65364
- return template.endsWith("/") ? template.slice(0, -1) : template;
68069
+ function normalizeTemplate(template2) {
68070
+ return template2.endsWith("/") ? template2.slice(0, -1) : template2;
65365
68071
  }
65366
- function renderTemplate(template, params) {
65367
- return normalizeTemplate(template).split("/").flatMap((part) => {
68072
+ function renderTemplate(template2, params) {
68073
+ return normalizeTemplate(template2).split("/").flatMap((part) => {
65368
68074
  if (!part.startsWith(":")) {
65369
68075
  return [part];
65370
68076
  }
@@ -65379,31 +68085,31 @@ function renderTemplate(template, params) {
65379
68085
  return [assertSegment(String(name), value)];
65380
68086
  });
65381
68087
  }
65382
- function buildS3Path(tenantId, template, params) {
68088
+ function buildS3Path(tenantId, template2, params) {
65383
68089
  const tenant = assertSegment("tenantId", tenantId);
65384
- const parts = renderTemplate(template, params);
68090
+ const parts = renderTemplate(template2, params);
65385
68091
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
65386
- if (template.endsWith("/") && node === PATH_LEAF) {
65387
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
68092
+ if (template2.endsWith("/") && node === PATH_LEAF) {
68093
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65388
68094
  }
65389
68095
  const path = ["tenants", tenant, ...parts].join("/");
65390
- return template.endsWith("/") ? `${path}/` : path;
68096
+ return template2.endsWith("/") ? `${path}/` : path;
65391
68097
  }
65392
- function buildS3PathSuffix(template, params) {
65393
- const parts = renderTemplate(template, params);
68098
+ function buildS3PathSuffix(template2, params) {
68099
+ const parts = renderTemplate(template2, params);
65394
68100
  const node = walkGrammar(S3_PATH_GRAMMAR, parts);
65395
- if (template.endsWith("/") && node === PATH_LEAF) {
65396
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
68101
+ if (template2.endsWith("/") && node === PATH_LEAF) {
68102
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65397
68103
  }
65398
68104
  const path = parts.join("/");
65399
- return template.endsWith("/") ? `${path}/` : path;
68105
+ return template2.endsWith("/") ? `${path}/` : path;
65400
68106
  }
65401
68107
  function stripTenantPrefix(key) {
65402
68108
  return key.replace(TENANT_PREFIX_RX, "");
65403
68109
  }
65404
- function matchS3Path(template, key) {
68110
+ function matchS3Path(template2, key) {
65405
68111
  const keyParts = stripTenantPrefix(key).split("/");
65406
- const templateParts = normalizeTemplate(template).split("/");
68112
+ const templateParts = normalizeTemplate(template2).split("/");
65407
68113
  const params = {};
65408
68114
  let keyIndex = 0;
65409
68115
  for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
@@ -65456,23 +68162,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
65456
68162
  }
65457
68163
  return assertSegment("tenantId", tenantId);
65458
68164
  };
65459
- const build = (template, params) => {
68165
+ const build = (template2, params) => {
65460
68166
  const tenant = resolveTenantId(params);
65461
- const parts = renderTemplate(template, params ?? {});
68167
+ const parts = renderTemplate(template2, params ?? {});
65462
68168
  const node = walkGrammar(grammarNode, parts);
65463
- if (template.endsWith("/") && node === PATH_LEAF) {
65464
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
68169
+ if (template2.endsWith("/") && node === PATH_LEAF) {
68170
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65465
68171
  }
65466
68172
  const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
65467
- return template.endsWith("/") ? `${path}/` : path;
68173
+ return template2.endsWith("/") ? `${path}/` : path;
65468
68174
  };
65469
68175
  const builder = build;
65470
- builder.at = (template, params) => {
68176
+ builder.at = (template2, params) => {
65471
68177
  const tenant = resolveTenantId(params);
65472
- const parts = renderTemplate(template, params ?? {});
68178
+ const parts = renderTemplate(template2, params ?? {});
65473
68179
  const nextNode = walkGrammar(grammarNode, parts);
65474
- if (template.endsWith("/") && nextNode === PATH_LEAF) {
65475
- throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
68180
+ if (template2.endsWith("/") && nextNode === PATH_LEAF) {
68181
+ throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
65476
68182
  }
65477
68183
  return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
65478
68184
  };
@@ -65643,11 +68349,14 @@ __export(exports_src, {
65643
68349
  workspaceDependencyNameToPackagePath: () => workspaceDependencyNameToPackagePath,
65644
68350
  workflowTriggerConfigSchema: () => workflowTriggerConfigSchema,
65645
68351
  workflowInputsToJsonSchema: () => workflowInputsToJsonSchema,
68352
+ workflowInputAcceptsType: () => workflowInputAcceptsType,
65646
68353
  withPendingFileRefs: () => withPendingFileRefs,
68354
+ walkFileReferenceSentinels: () => walkFileReferenceSentinels,
65647
68355
  valuesMatch: () => valuesMatch,
65648
68356
  validateWorkspaceSchema: () => validateWorkspaceSchema,
65649
68357
  validateStepConfig: () => validateStepConfig,
65650
68358
  validateSourcePackageRequiredFiles: () => validateSourcePackageRequiredFiles,
68359
+ validateScopedArtifactPath: () => validateScopedArtifactPath,
65651
68360
  validateOutput: () => validateOutput,
65652
68361
  validateInput: () => validateInput,
65653
68362
  validateFileSourceConfig: () => validateFileSourceConfig,
@@ -65690,11 +68399,13 @@ __export(exports_src, {
65690
68399
  parseFailureEnvelope: () => parseFailureEnvelope,
65691
68400
  parseAutomationTarget: () => parseAutomationTarget,
65692
68401
  parseAgentRerunVersion: () => parseAgentRerunVersion,
68402
+ normalizeLegacyFileIdInput: () => normalizeLegacyFileIdInput,
65693
68403
  noopTracingContext: () => noopTracingContext,
65694
68404
  mimeTypeForExtension: () => mimeTypeForExtension,
65695
68405
  matchS3Path: () => matchS3Path,
65696
68406
  mapOCRAttributes: () => mapOCRAttributes,
65697
68407
  mapLLMAttributes: () => mapLLMAttributes,
68408
+ mapFileReferenceSentinels: () => mapFileReferenceSentinels,
65698
68409
  listStepTypesByCategory: () => listStepTypesByCategory,
65699
68410
  listStepTypes: () => listStepTypes,
65700
68411
  listProcessorIds: () => listProcessorIds,
@@ -65703,19 +68414,27 @@ __export(exports_src, {
65703
68414
  isWorkflowResult: () => isWorkflowResult,
65704
68415
  isTerminalExecutionStatus: () => isTerminalExecutionStatus,
65705
68416
  isStepCategory: () => isStepCategory,
68417
+ isScopedFileRef: () => isScopedFileRef,
65706
68418
  isSchemaFile: () => isSchemaFile,
68419
+ isRuntimeFileRef: () => isRuntimeFileRef,
65707
68420
  isRunInSampleRank: () => isRunInSampleRank,
65708
68421
  isRunExpandSection: () => isRunExpandSection,
68422
+ isResolvedProcessorFile: () => isResolvedProcessorFile,
65709
68423
  isOutputSchemaUnknown: () => isOutputSchemaUnknown,
65710
68424
  isNonSuccessTerminalExecutionStatus: () => isNonSuccessTerminalExecutionStatus,
65711
68425
  isManualTriggerEnabled: () => isManualTriggerEnabled,
65712
68426
  isLocalAgentResourcePath: () => isLocalAgentResourcePath,
68427
+ isInlineFileIngressRef: () => isInlineFileIngressRef,
68428
+ isFileReferenceSentinel: () => isFileReferenceSentinel,
65713
68429
  isFilePathDescriptor: () => isFilePathDescriptor,
65714
68430
  isFileOutput: () => isFileOutput,
68431
+ isFileIngressRef: () => isFileIngressRef,
68432
+ isFileIdIngressRef: () => isFileIdIngressRef,
65715
68433
  isAutomationTriggerEnabled: () => isAutomationTriggerEnabled,
65716
68434
  isAgentEmailExplicitlyDisabled: () => isAgentEmailExplicitlyDisabled,
65717
68435
  inputsWithSource: () => inputsWithSource,
65718
68436
  hasTriggerMethod: () => hasTriggerMethod,
68437
+ hasDeclaredOutput: () => hasDeclaredOutput,
65719
68438
  goldenFileSatisfiedInResult: () => goldenFileSatisfiedInResult,
65720
68439
  getTriggerMethods: () => getTriggerMethods,
65721
68440
  getSupportedFormatsLabel: () => getSupportedFormatsLabel,
@@ -65739,6 +68458,7 @@ __export(exports_src, {
65739
68458
  formatReleaseTag: () => formatReleaseTag,
65740
68459
  formatHostedSourceExportPath: () => formatHostedSourceExportPath,
65741
68460
  formatDiffValue: () => formatDiffValue,
68461
+ fileReferenceKind: () => fileReferenceKind,
65742
68462
  fileFieldNamesFromJsonSchema: () => fileFieldNamesFromJsonSchema,
65743
68463
  fieldStemFromGoldenName: () => fieldStemFromGoldenName,
65744
68464
  extractFieldMetadata: () => extractFieldMetadata,
@@ -65759,7 +68479,11 @@ __export(exports_src, {
65759
68479
  compareExpectedValues: () => compareExpectedValues,
65760
68480
  compareExpectedError: () => compareExpectedError,
65761
68481
  combineEvalScores: () => combineEvalScores,
68482
+ collectInvokeWorkflowTargetIds: () => collectInvokeWorkflowTargetIds,
68483
+ collectFileReferenceSentinels: () => collectFileReferenceSentinels,
65762
68484
  coerceInput: () => coerceInput,
68485
+ buildWorkflowOutputContractSchema: () => buildWorkflowOutputContractSchema,
68486
+ buildWorkflowInputsJsonSchema: () => buildWorkflowInputsJsonSchema,
65763
68487
  buildS3PathSuffix: () => buildS3PathSuffix,
65764
68488
  buildS3Path: () => buildS3Path,
65765
68489
  buildDiscreteJudgeSystemPrompt: () => buildDiscreteJudgeSystemPrompt,
@@ -65788,6 +68512,7 @@ __export(exports_src, {
65788
68512
  WaitStepSchema: () => WaitStepSchema,
65789
68513
  WORKFLOW_TOOL_METADATA: () => WORKFLOW_TOOL_METADATA,
65790
68514
  WORKFLOW_NAME_PATTERN: () => WORKFLOW_NAME_PATTERN,
68515
+ WORKFLOW_FILE_REF_JSON_SCHEMA: () => WORKFLOW_FILE_REF_JSON_SCHEMA,
65791
68516
  WORKFLOW_EXECUTION_STATUSES: () => WORKFLOW_EXECUTION_STATUSES,
65792
68517
  UNSUPPORTED_SOURCE_MANIFEST_FILENAME: () => UNSUPPORTED_SOURCE_MANIFEST_FILENAME,
65793
68518
  TriggerTypeValue: () => TriggerTypeValue,
@@ -65836,7 +68561,7 @@ __export(exports_src, {
65836
68561
  SplitConfigSchema: () => SplitConfigSchema,
65837
68562
  SpanTypes: () => SpanTypes,
65838
68563
  SpanKindMap: () => SpanKindMap,
65839
- SpanKind: () => SpanKind,
68564
+ SpanKind: () => import_api.SpanKind,
65840
68565
  SourceVersionRefSchema: () => SourceVersionRefSchema,
65841
68566
  SourceSecretsFileSchema: () => SourceSecretsFileSchema,
65842
68567
  SourcePackageTypeSchema: () => SourcePackageTypeSchema,
@@ -65851,6 +68576,7 @@ __export(exports_src, {
65851
68576
  SharedEvaluatorReferenceSchema: () => SharedEvaluatorReferenceSchema,
65852
68577
  SharedEvaluatorCompositionItemSchema: () => SharedEvaluatorCompositionItemSchema,
65853
68578
  SecretNameSchema: () => SecretNameSchema,
68579
+ ScopedFileRefSchema: () => ScopedFileRefSchema,
65854
68580
  ScopeStackSchema: () => ScopeStackSchema,
65855
68581
  ScopeEntryTypeSchema: () => ScopeEntryTypeSchema,
65856
68582
  ScopeEntrySchema: () => ScopeEntrySchema,
@@ -65865,10 +68591,14 @@ __export(exports_src, {
65865
68591
  SOURCE_COMMIT_SHA_PATTERN: () => SOURCE_COMMIT_SHA_PATTERN,
65866
68592
  SCRIPT_FN_MAX_BYTES: () => SCRIPT_FN_MAX_BYTES,
65867
68593
  S3_PATH_GRAMMAR: () => S3_PATH_GRAMMAR,
68594
+ S3FileRefSchema: () => S3FileRefSchema,
68595
+ RuntimeFileRefSchema: () => RuntimeFileRefSchema,
68596
+ RuntimeFilePathDescriptorSchema: () => FilePathDescriptorSchema,
65868
68597
  RunTargetStringSchema: () => RunTargetStringSchema,
65869
68598
  RunTargetSchema: () => RunTargetSchema,
65870
68599
  RunTargetObjectSchema: () => RunTargetObjectSchema,
65871
68600
  RootSourceManifestSchema: () => RootSourceManifestSchema,
68601
+ ResolvedProcessorFileSchema: () => ResolvedProcessorFileSchema,
65872
68602
  ReleaseTagSchema: () => ReleaseTagSchema,
65873
68603
  RUN_TARGET_SEGMENT_PATTERN: () => RUN_TARGET_SEGMENT_PATTERN,
65874
68604
  RUN_EXPAND_SECTIONS: () => RUN_EXPAND_SECTIONS,
@@ -65907,16 +68637,22 @@ __export(exports_src, {
65907
68637
  MergeConfigSchema: () => MergeConfigSchema,
65908
68638
  ManualTriggerMethodSchema: () => ManualTriggerMethodSchema,
65909
68639
  MAX_PAGE_SIZE: () => MAX_PAGE_SIZE,
68640
+ LocalFileRefSchema: () => LocalFileRefSchema,
65910
68641
  LocalEvaluatorReferenceSchema: () => LocalEvaluatorReferenceSchema,
65911
68642
  LocalEvaluatorCompositionItemSchema: () => LocalEvaluatorCompositionItemSchema,
65912
68643
  LocalAgentResourceDirectorySchema: () => LocalAgentResourceDirectorySchema,
65913
68644
  LlmJudgeConfigSchema: () => LlmJudgeConfigSchema,
68645
+ LegacyFileIdInputSchema: () => LegacyFileIdInputSchema,
65914
68646
  LayoutElementTypeSchema: () => LayoutElementTypeSchema,
65915
68647
  LayoutElementSchema: () => LayoutElementSchema,
65916
68648
  LLM_JUDGE_PROMPT_MIN_LENGTH: () => LLM_JUDGE_PROMPT_MIN_LENGTH,
65917
68649
  LEGACY_RUN_EXPAND_MIGRATION: () => LEGACY_RUN_EXPAND_MIGRATION,
68650
+ LEGACY_FILE_REF_COMPATIBILITY: () => LEGACY_FILE_REF_COMPATIBILITY,
65918
68651
  JudgeModeSchema: () => JudgeModeSchema,
65919
68652
  JsonSchemaSchema: () => JsonSchemaSchema,
68653
+ InlineFileRefSchema: () => InlineFileRefSchema,
68654
+ InlineFileIngressRefSchema: () => InlineFileIngressRefSchema,
68655
+ InlineFileIngressPayloadSchema: () => InlineFileIngressPayloadSchema,
65920
68656
  IfStepSchema: () => IfStepSchema,
65921
68657
  INPUT_VALIDATION_CODES: () => INPUT_VALIDATION_CODES,
65922
68658
  INPUT_KINDS: () => INPUT_KINDS,
@@ -65926,7 +68662,10 @@ __export(exports_src, {
65926
68662
  GPFS_FILE_SOURCE_NAME: () => GPFS_FILE_SOURCE_NAME,
65927
68663
  GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
65928
68664
  ForeachStepSchema: () => ForeachStepSchema,
68665
+ FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
65929
68666
  FilePathDescriptorSchema: () => FilePathDescriptorSchema,
68667
+ FileIngressRefSchema: () => FileIngressRefSchema,
68668
+ FileIdIngressRefSchema: () => FileIdIngressRefSchema,
65930
68669
  FailStepSchema: () => FailStepSchema,
65931
68670
  ExtractedTableSchema: () => ExtractedTableSchema,
65932
68671
  ExtractOutputSchema: () => ExtractOutputSchema,
@@ -65983,6 +68722,7 @@ __export(exports_src, {
65983
68722
  DocumentParserInputSchema: () => DocumentParserInputSchema,
65984
68723
  DocumentParserConfigSchema: () => DocumentParserConfigSchema,
65985
68724
  DocumentMetadataSchema: () => DocumentMetadataSchema,
68725
+ DbFileRefSchema: () => DbFileRefSchema,
65986
68726
  DatasetNameSchema: () => DatasetNameSchema,
65987
68727
  DatasetMetaSchema: () => DatasetMetaSchema,
65988
68728
  DatasetImportRequestSchema: () => DatasetImportRequestSchema,
@@ -66041,8 +68781,11 @@ __export(exports_src, {
66041
68781
  });
66042
68782
  var init_src = __esm(() => {
66043
68783
  init_core3();
66044
- init_processor();
66045
- init_parser();
68784
+ init_legacy_boundary();
68785
+ init_runtime_file_ref();
68786
+ init_scoped_file_ref();
68787
+ init_processor2();
68788
+ init_parser2();
66046
68789
  init_otel();
66047
68790
  init_execution_row();
66048
68791
  init_run_expand();
@@ -66955,7 +69698,7 @@ var require_foldFlowLines = __commonJS((exports) => {
66955
69698
  else
66956
69699
  end = lineWidth - indentAtStart;
66957
69700
  }
66958
- let split2 = undefined;
69701
+ let split3 = undefined;
66959
69702
  let prev = undefined;
66960
69703
  let overflow = false;
66961
69704
  let i = -1;
@@ -66989,20 +69732,20 @@ var require_foldFlowLines = __commonJS((exports) => {
66989
69732
  if (mode === FOLD_BLOCK)
66990
69733
  i = consumeMoreIndentedLines(text, i, indent.length);
66991
69734
  end = i + indent.length + endStep;
66992
- split2 = undefined;
69735
+ split3 = undefined;
66993
69736
  } else {
66994
69737
  if (ch === " " && prev && prev !== " " && prev !== `
66995
69738
  ` && prev !== "\t") {
66996
69739
  const next = text[i + 1];
66997
69740
  if (next && next !== " " && next !== `
66998
69741
  ` && next !== "\t")
66999
- split2 = i;
69742
+ split3 = i;
67000
69743
  }
67001
69744
  if (i >= end) {
67002
- if (split2) {
67003
- folds.push(split2);
67004
- end = split2 + endStep;
67005
- split2 = undefined;
69745
+ if (split3) {
69746
+ folds.push(split3);
69747
+ end = split3 + endStep;
69748
+ split3 = undefined;
67006
69749
  } else if (mode === FOLD_QUOTED) {
67007
69750
  while (prev === " " || prev === "\t") {
67008
69751
  prev = ch;
@@ -67015,7 +69758,7 @@ var require_foldFlowLines = __commonJS((exports) => {
67015
69758
  folds.push(j);
67016
69759
  escapedFolds[j] = true;
67017
69760
  end = j + endStep;
67018
- split2 = undefined;
69761
+ split3 = undefined;
67019
69762
  } else {
67020
69763
  overflow = true;
67021
69764
  }
@@ -67649,7 +70392,7 @@ var require_merge = __commonJS((exports) => {
67649
70392
  var identity = require_identity();
67650
70393
  var Scalar = require_Scalar();
67651
70394
  var MERGE_KEY = "<<";
67652
- var merge2 = {
70395
+ var merge3 = {
67653
70396
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
67654
70397
  default: "key",
67655
70398
  tag: "tag:yaml.org,2002:merge",
@@ -67659,7 +70402,7 @@ var require_merge = __commonJS((exports) => {
67659
70402
  }),
67660
70403
  stringify: () => MERGE_KEY
67661
70404
  };
67662
- 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);
70405
+ 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);
67663
70406
  function addMergeToJSMap(ctx, map2, value) {
67664
70407
  const source = resolveAliasValue(ctx, value);
67665
70408
  if (identity.isSeq(source))
@@ -67698,21 +70441,21 @@ var require_merge = __commonJS((exports) => {
67698
70441
  }
67699
70442
  exports.addMergeToJSMap = addMergeToJSMap;
67700
70443
  exports.isMergeKey = isMergeKey;
67701
- exports.merge = merge2;
70444
+ exports.merge = merge3;
67702
70445
  });
67703
70446
 
67704
70447
  // node_modules/yaml/dist/nodes/addPairToJSMap.js
67705
70448
  var require_addPairToJSMap = __commonJS((exports) => {
67706
70449
  var log = require_log();
67707
- var merge2 = require_merge();
70450
+ var merge3 = require_merge();
67708
70451
  var stringify = require_stringify();
67709
70452
  var identity = require_identity();
67710
70453
  var toJS = require_toJS();
67711
70454
  function addPairToJSMap(ctx, map2, { key, value }) {
67712
70455
  if (identity.isNode(key) && key.addToJSMap)
67713
70456
  key.addToJSMap(ctx, map2, value);
67714
- else if (merge2.isMergeKey(ctx, key))
67715
- merge2.addMergeToJSMap(ctx, map2, value);
70457
+ else if (merge3.isMergeKey(ctx, key))
70458
+ merge3.addMergeToJSMap(ctx, map2, value);
67716
70459
  else {
67717
70460
  const jsKey = toJS.toJS(key, "", ctx);
67718
70461
  if (map2 instanceof Map) {
@@ -68988,7 +71731,7 @@ var require_schema3 = __commonJS((exports) => {
68988
71731
  var bool = require_bool2();
68989
71732
  var float = require_float2();
68990
71733
  var int2 = require_int2();
68991
- var merge2 = require_merge();
71734
+ var merge3 = require_merge();
68992
71735
  var omap = require_omap();
68993
71736
  var pairs = require_pairs();
68994
71737
  var set2 = require_set();
@@ -69008,7 +71751,7 @@ var require_schema3 = __commonJS((exports) => {
69008
71751
  float.floatExp,
69009
71752
  float.float,
69010
71753
  binary.binary,
69011
- merge2.merge,
71754
+ merge3.merge,
69012
71755
  omap.omap,
69013
71756
  pairs.pairs,
69014
71757
  set2.set,
@@ -69031,7 +71774,7 @@ var require_tags = __commonJS((exports) => {
69031
71774
  var schema = require_schema();
69032
71775
  var schema$1 = require_schema2();
69033
71776
  var binary = require_binary();
69034
- var merge2 = require_merge();
71777
+ var merge3 = require_merge();
69035
71778
  var omap = require_omap();
69036
71779
  var pairs = require_pairs();
69037
71780
  var schema$2 = require_schema3();
@@ -69056,7 +71799,7 @@ var require_tags = __commonJS((exports) => {
69056
71799
  intOct: int2.intOct,
69057
71800
  intTime: timestamp.intTime,
69058
71801
  map: map2.map,
69059
- merge: merge2.merge,
71802
+ merge: merge3.merge,
69060
71803
  null: _null4.nullTag,
69061
71804
  omap: omap.omap,
69062
71805
  pairs: pairs.pairs,
@@ -69066,7 +71809,7 @@ var require_tags = __commonJS((exports) => {
69066
71809
  };
69067
71810
  var coreKnownTags = {
69068
71811
  "tag:yaml.org,2002:binary": binary.binary,
69069
- "tag:yaml.org,2002:merge": merge2.merge,
71812
+ "tag:yaml.org,2002:merge": merge3.merge,
69070
71813
  "tag:yaml.org,2002:omap": omap.omap,
69071
71814
  "tag:yaml.org,2002:pairs": pairs.pairs,
69072
71815
  "tag:yaml.org,2002:set": set2.set,
@@ -69075,7 +71818,7 @@ var require_tags = __commonJS((exports) => {
69075
71818
  function getTags(customTags, schemaName, addMergeTag) {
69076
71819
  const schemaTags = schemas3.get(schemaName);
69077
71820
  if (schemaTags && !customTags) {
69078
- return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
71821
+ return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
69079
71822
  }
69080
71823
  let tags = schemaTags;
69081
71824
  if (!tags) {
@@ -69093,7 +71836,7 @@ var require_tags = __commonJS((exports) => {
69093
71836
  tags = customTags(tags.slice());
69094
71837
  }
69095
71838
  if (addMergeTag)
69096
- tags = tags.concat(merge2.merge);
71839
+ tags = tags.concat(merge3.merge);
69097
71840
  return tags.reduce((tags2, tag) => {
69098
71841
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
69099
71842
  if (!tagObj) {
@@ -69120,11 +71863,11 @@ var require_Schema = __commonJS((exports) => {
69120
71863
  var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
69121
71864
 
69122
71865
  class Schema {
69123
- constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
71866
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
69124
71867
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
69125
71868
  this.name = typeof schema === "string" && schema || "core";
69126
71869
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
69127
- this.tags = tags.getTags(customTags, this.name, merge2);
71870
+ this.tags = tags.getTags(customTags, this.name, merge3);
69128
71871
  this.toStringOptions = toStringDefaults ?? null;
69129
71872
  Object.defineProperty(this, identity.MAP, { value: map2.map });
69130
71873
  Object.defineProperty(this, identity.SCALAR, { value: string4.string });
@@ -70347,13 +73090,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
70347
73090
  return { mode, indent, chomp, comment, length };
70348
73091
  }
70349
73092
  function splitLines(source) {
70350
- const split2 = source.split(/\n( *)/);
70351
- const first = split2[0];
73093
+ const split3 = source.split(/\n( *)/);
73094
+ const first = split3[0];
70352
73095
  const m = first.match(/^( *)/);
70353
73096
  const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
70354
73097
  const lines = [line0];
70355
- for (let i = 1;i < split2.length; i += 2)
70356
- lines.push([split2[i], split2[i + 1]]);
73098
+ for (let i = 1;i < split3.length; i += 2)
73099
+ lines.push([split3[i], split3[i + 1]]);
70357
73100
  return lines;
70358
73101
  }
70359
73102
  exports.resolveBlockScalar = resolveBlockScalar;
@@ -73367,7 +76110,7 @@ var init_main = __esm(() => {
73367
76110
  });
73368
76111
 
73369
76112
  // ../../node_modules/sisteransi/src/index.js
73370
- var require_src = __commonJS((exports, module) => {
76113
+ var require_src2 = __commonJS((exports, module) => {
73371
76114
  var ESC2 = "\x1B";
73372
76115
  var CSI2 = `${ESC2}[`;
73373
76116
  var beep = "\x07";
@@ -73710,7 +76453,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
73710
76453
  }, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
73711
76454
  var init_dist3 = __esm(() => {
73712
76455
  init_main();
73713
- import_sisteransi = __toESM(require_src(), 1);
76456
+ import_sisteransi = __toESM(require_src2(), 1);
73714
76457
  G = ["up", "down", "left", "right", "space", "enter", "cancel"];
73715
76458
  K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
73716
76459
  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)}` } } };
@@ -75053,7 +77796,7 @@ var init_dist4 = __esm(() => {
75053
77796
  init_dist3();
75054
77797
  init_main();
75055
77798
  init_dist2();
75056
- import_sisteransi2 = __toESM(require_src(), 1);
77799
+ import_sisteransi2 = __toESM(require_src2(), 1);
75057
77800
  tt2 = te();
75058
77801
  _t = w2("◆", "*");
75059
77802
  ot2 = w2("■", "x");
@@ -168545,7 +171288,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
168545
171288
  __defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
168546
171289
  }
168547
171290
  return to5;
168548
- }, __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 {
171291
+ }, __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 {
168549
171292
  diff(oldStr, newStr, options8 = {}) {
168550
171293
  let callback;
168551
171294
  if (typeof options8 === "function") {
@@ -169567,7 +172310,7 @@ var init_prettier = __esm(() => {
169567
172310
  };
169568
172311
  }
169569
172312
  });
169570
- require_utils2 = __commonJS2({
172313
+ require_utils4 = __commonJS2({
169571
172314
  "node_modules/braces/lib/utils.js"(exports) {
169572
172315
  exports.isInteger = (num) => {
169573
172316
  if (typeof num === "number") {
@@ -169656,7 +172399,7 @@ var init_prettier = __esm(() => {
169656
172399
  });
169657
172400
  require_stringify2 = __commonJS2({
169658
172401
  "node_modules/braces/lib/stringify.js"(exports, module) {
169659
- var utils2 = require_utils2();
172402
+ var utils2 = require_utils4();
169660
172403
  module.exports = (ast, options8 = {}) => {
169661
172404
  const stringify2 = (node, parent = {}) => {
169662
172405
  const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
@@ -170110,7 +172853,7 @@ var init_prettier = __esm(() => {
170110
172853
  require_compile2 = __commonJS2({
170111
172854
  "node_modules/braces/lib/compile.js"(exports, module) {
170112
172855
  var fill2 = require_fill_range();
170113
- var utils2 = require_utils2();
172856
+ var utils2 = require_utils4();
170114
172857
  var compile = (ast, options8 = {}) => {
170115
172858
  const walk2 = (node, parent = {}) => {
170116
172859
  const invalidBlock = utils2.isInvalidBrace(parent);
@@ -170160,7 +172903,7 @@ var init_prettier = __esm(() => {
170160
172903
  "node_modules/braces/lib/expand.js"(exports, module) {
170161
172904
  var fill2 = require_fill_range();
170162
172905
  var stringify2 = require_stringify2();
170163
- var utils2 = require_utils2();
172906
+ var utils2 = require_utils4();
170164
172907
  var append = (queue = "", stash = "", enclose = false) => {
170165
172908
  const result = [];
170166
172909
  queue = [].concat(queue);
@@ -172359,8 +175102,8 @@ var init_prettier = __esm(() => {
172359
175102
  var Stream = __require2("stream");
172360
175103
  var PassThrough = Stream.PassThrough;
172361
175104
  var slice = Array.prototype.slice;
172362
- module.exports = merge2;
172363
- function merge2() {
175105
+ module.exports = merge22;
175106
+ function merge22() {
172364
175107
  const streamsQueue = [];
172365
175108
  const args = slice.call(arguments);
172366
175109
  let merging = false;
@@ -172474,9 +175217,9 @@ var init_prettier = __esm(() => {
172474
175217
  "node_modules/fast-glob/out/utils/stream.js"(exports) {
172475
175218
  Object.defineProperty(exports, "__esModule", { value: true });
172476
175219
  exports.merge = undefined;
172477
- var merge2 = require_merge2();
175220
+ var merge22 = require_merge2();
172478
175221
  function merge3(streams) {
172479
- const mergedStream = merge2(streams);
175222
+ const mergedStream = merge22(streams);
172480
175223
  streams.forEach((stream) => {
172481
175224
  stream.once("error", (error52) => mergedStream.emit("error", error52));
172482
175225
  });
@@ -172504,7 +175247,7 @@ var init_prettier = __esm(() => {
172504
175247
  exports.isEmpty = isEmpty;
172505
175248
  }
172506
175249
  });
172507
- require_utils3 = __commonJS2({
175250
+ require_utils32 = __commonJS2({
172508
175251
  "node_modules/fast-glob/out/utils/index.js"(exports) {
172509
175252
  Object.defineProperty(exports, "__esModule", { value: true });
172510
175253
  exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
@@ -172528,7 +175271,7 @@ var init_prettier = __esm(() => {
172528
175271
  "node_modules/fast-glob/out/managers/tasks.js"(exports) {
172529
175272
  Object.defineProperty(exports, "__esModule", { value: true });
172530
175273
  exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
172531
- var utils2 = require_utils3();
175274
+ var utils2 = require_utils32();
172532
175275
  function generate(input, settings) {
172533
175276
  const patterns = processPatterns(input, settings);
172534
175277
  const ignore = processPatterns(settings.ignore, settings);
@@ -172837,7 +175580,7 @@ var init_prettier = __esm(() => {
172837
175580
  exports.createDirentFromStats = createDirentFromStats;
172838
175581
  }
172839
175582
  });
172840
- require_utils4 = __commonJS2({
175583
+ require_utils42 = __commonJS2({
172841
175584
  "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
172842
175585
  Object.defineProperty(exports, "__esModule", { value: true });
172843
175586
  exports.fs = undefined;
@@ -172865,7 +175608,7 @@ var init_prettier = __esm(() => {
172865
175608
  var fsStat = require_out();
172866
175609
  var rpl = require_run_parallel();
172867
175610
  var constants_1 = require_constants3();
172868
- var utils2 = require_utils4();
175611
+ var utils2 = require_utils42();
172869
175612
  var common = require_common();
172870
175613
  function read3(directory, settings, callback) {
172871
175614
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -172971,7 +175714,7 @@ var init_prettier = __esm(() => {
172971
175714
  exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
172972
175715
  var fsStat = require_out();
172973
175716
  var constants_1 = require_constants3();
172974
- var utils2 = require_utils4();
175717
+ var utils2 = require_utils42();
172975
175718
  var common = require_common();
172976
175719
  function read3(directory, settings) {
172977
175720
  if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
@@ -173751,7 +176494,7 @@ var init_prettier = __esm(() => {
173751
176494
  Object.defineProperty(exports, "__esModule", { value: true });
173752
176495
  var path15 = __require2("path");
173753
176496
  var fsStat = require_out();
173754
- var utils2 = require_utils3();
176497
+ var utils2 = require_utils32();
173755
176498
  var Reader = class {
173756
176499
  constructor(_settings) {
173757
176500
  this._settings = _settings;
@@ -173875,7 +176618,7 @@ var init_prettier = __esm(() => {
173875
176618
  require_matcher = __commonJS2({
173876
176619
  "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
173877
176620
  Object.defineProperty(exports, "__esModule", { value: true });
173878
- var utils2 = require_utils3();
176621
+ var utils2 = require_utils32();
173879
176622
  var Matcher = class {
173880
176623
  constructor(_patterns, _settings, _micromatchOptions) {
173881
176624
  this._patterns = _patterns;
@@ -173957,7 +176700,7 @@ var init_prettier = __esm(() => {
173957
176700
  require_deep = __commonJS2({
173958
176701
  "node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
173959
176702
  Object.defineProperty(exports, "__esModule", { value: true });
173960
- var utils2 = require_utils3();
176703
+ var utils2 = require_utils32();
173961
176704
  var partial_1 = require_partial();
173962
176705
  var DeepFilter = class {
173963
176706
  constructor(_settings, _micromatchOptions) {
@@ -174019,7 +176762,7 @@ var init_prettier = __esm(() => {
174019
176762
  require_entry = __commonJS2({
174020
176763
  "node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
174021
176764
  Object.defineProperty(exports, "__esModule", { value: true });
174022
- var utils2 = require_utils3();
176765
+ var utils2 = require_utils32();
174023
176766
  var EntryFilter = class {
174024
176767
  constructor(_settings, _micromatchOptions) {
174025
176768
  this._settings = _settings;
@@ -174104,7 +176847,7 @@ var init_prettier = __esm(() => {
174104
176847
  require_error2 = __commonJS2({
174105
176848
  "node_modules/fast-glob/out/providers/filters/error.js"(exports) {
174106
176849
  Object.defineProperty(exports, "__esModule", { value: true });
174107
- var utils2 = require_utils3();
176850
+ var utils2 = require_utils32();
174108
176851
  var ErrorFilter = class {
174109
176852
  constructor(_settings) {
174110
176853
  this._settings = _settings;
@@ -174122,7 +176865,7 @@ var init_prettier = __esm(() => {
174122
176865
  require_entry2 = __commonJS2({
174123
176866
  "node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
174124
176867
  Object.defineProperty(exports, "__esModule", { value: true });
174125
- var utils2 = require_utils3();
176868
+ var utils2 = require_utils32();
174126
176869
  var EntryTransformer = class {
174127
176870
  constructor(_settings) {
174128
176871
  this._settings = _settings;
@@ -174390,7 +177133,7 @@ var init_prettier = __esm(() => {
174390
177133
  var stream_1 = require_stream4();
174391
177134
  var sync_1 = require_sync6();
174392
177135
  var settings_1 = require_settings4();
174393
- var utils2 = require_utils3();
177136
+ var utils2 = require_utils32();
174394
177137
  async function FastGlob(source2, options8) {
174395
177138
  assertPatternsInput(source2);
174396
177139
  const works = getWorks(source2, async_1.default, options8);
@@ -174708,7 +177451,7 @@ var init_prettier = __esm(() => {
174708
177451
  };
174709
177452
  }
174710
177453
  });
174711
- require_semver = __commonJS2({
177454
+ require_semver2 = __commonJS2({
174712
177455
  "node_modules/semver/classes/semver.js"(exports, module) {
174713
177456
  var debug = require_debug();
174714
177457
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
@@ -174978,7 +177721,7 @@ var init_prettier = __esm(() => {
174978
177721
  });
174979
177722
  require_compare = __commonJS2({
174980
177723
  "node_modules/semver/functions/compare.js"(exports, module) {
174981
- var SemVer = require_semver();
177724
+ var SemVer = require_semver2();
174982
177725
  var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
174983
177726
  module.exports = compare;
174984
177727
  }
@@ -176711,7 +179454,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
176711
179454
  };
176712
179455
  }
176713
179456
  });
176714
- require_src2 = __commonJS2({
179457
+ require_src3 = __commonJS2({
176715
179458
  "node_modules/editorconfig/src/index.js"(exports) {
176716
179459
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
176717
179460
  return new (P9 || (P9 = Promise))(function(resolve32, reject) {
@@ -178174,7 +180917,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
178174
180917
  mockable_default = mockable.mocked;
178175
180918
  import_micromatch = __toESM2(require_micromatch(), 1);
178176
180919
  partition_default = partition2;
178177
- import_editorconfig = __toESM2(require_src2(), 1);
180920
+ import_editorconfig = __toESM2(require_src3(), 1);
178178
180921
  iterate_directory_up_default = iterateDirectoryUp;
178179
180922
  FileSearcher = class extends Searcher {
178180
180923
  findInDirectory = findFile;
@@ -181645,7 +184388,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
181645
184388
  else
181646
184389
  end = lineWidth - indentAtStart;
181647
184390
  }
181648
- let split2 = undefined;
184391
+ let split3 = undefined;
181649
184392
  let prev = undefined;
181650
184393
  let overflow = false;
181651
184394
  let i5 = -1;
@@ -181679,20 +184422,20 @@ var require_foldFlowLines2 = __commonJS((exports) => {
181679
184422
  if (mode === FOLD_BLOCK)
181680
184423
  i5 = consumeMoreIndentedLines(text, i5, indent3.length);
181681
184424
  end = i5 + indent3.length + endStep;
181682
- split2 = undefined;
184425
+ split3 = undefined;
181683
184426
  } else {
181684
184427
  if (ch2 === " " && prev && prev !== " " && prev !== `
181685
184428
  ` && prev !== "\t") {
181686
184429
  const next = text[i5 + 1];
181687
184430
  if (next && next !== " " && next !== `
181688
184431
  ` && next !== "\t")
181689
- split2 = i5;
184432
+ split3 = i5;
181690
184433
  }
181691
184434
  if (i5 >= end) {
181692
- if (split2) {
181693
- folds.push(split2);
181694
- end = split2 + endStep;
181695
- split2 = undefined;
184435
+ if (split3) {
184436
+ folds.push(split3);
184437
+ end = split3 + endStep;
184438
+ split3 = undefined;
181696
184439
  } else if (mode === FOLD_QUOTED) {
181697
184440
  while (prev === " " || prev === "\t") {
181698
184441
  prev = ch2;
@@ -181705,7 +184448,7 @@ var require_foldFlowLines2 = __commonJS((exports) => {
181705
184448
  folds.push(j11);
181706
184449
  escapedFolds[j11] = true;
181707
184450
  end = j11 + endStep;
181708
- split2 = undefined;
184451
+ split3 = undefined;
181709
184452
  } else {
181710
184453
  overflow = true;
181711
184454
  }
@@ -182339,7 +185082,7 @@ var require_merge3 = __commonJS((exports) => {
182339
185082
  var identity = require_identity2();
182340
185083
  var Scalar = require_Scalar2();
182341
185084
  var MERGE_KEY = "<<";
182342
- var merge2 = {
185085
+ var merge3 = {
182343
185086
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
182344
185087
  default: "key",
182345
185088
  tag: "tag:yaml.org,2002:merge",
@@ -182349,7 +185092,7 @@ var require_merge3 = __commonJS((exports) => {
182349
185092
  }),
182350
185093
  stringify: () => MERGE_KEY
182351
185094
  };
182352
- 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);
185095
+ 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);
182353
185096
  function addMergeToJSMap(ctx, map2, value) {
182354
185097
  const source2 = resolveAliasValue(ctx, value);
182355
185098
  if (identity.isSeq(source2))
@@ -182388,21 +185131,21 @@ var require_merge3 = __commonJS((exports) => {
182388
185131
  }
182389
185132
  exports.addMergeToJSMap = addMergeToJSMap;
182390
185133
  exports.isMergeKey = isMergeKey;
182391
- exports.merge = merge2;
185134
+ exports.merge = merge3;
182392
185135
  });
182393
185136
 
182394
185137
  // ../workflow-yaml/node_modules/yaml/dist/nodes/addPairToJSMap.js
182395
185138
  var require_addPairToJSMap2 = __commonJS((exports) => {
182396
185139
  var log = require_log2();
182397
- var merge2 = require_merge3();
185140
+ var merge3 = require_merge3();
182398
185141
  var stringify = require_stringify3();
182399
185142
  var identity = require_identity2();
182400
185143
  var toJS = require_toJS2();
182401
185144
  function addPairToJSMap(ctx, map2, { key: key2, value }) {
182402
185145
  if (identity.isNode(key2) && key2.addToJSMap)
182403
185146
  key2.addToJSMap(ctx, map2, value);
182404
- else if (merge2.isMergeKey(ctx, key2))
182405
- merge2.addMergeToJSMap(ctx, map2, value);
185147
+ else if (merge3.isMergeKey(ctx, key2))
185148
+ merge3.addMergeToJSMap(ctx, map2, value);
182406
185149
  else {
182407
185150
  const jsKey = toJS.toJS(key2, "", ctx);
182408
185151
  if (map2 instanceof Map) {
@@ -183678,7 +186421,7 @@ var require_schema6 = __commonJS((exports) => {
183678
186421
  var bool = require_bool4();
183679
186422
  var float = require_float4();
183680
186423
  var int2 = require_int4();
183681
- var merge2 = require_merge3();
186424
+ var merge3 = require_merge3();
183682
186425
  var omap = require_omap2();
183683
186426
  var pairs = require_pairs2();
183684
186427
  var set2 = require_set2();
@@ -183698,7 +186441,7 @@ var require_schema6 = __commonJS((exports) => {
183698
186441
  float.floatExp,
183699
186442
  float.float,
183700
186443
  binary.binary,
183701
- merge2.merge,
186444
+ merge3.merge,
183702
186445
  omap.omap,
183703
186446
  pairs.pairs,
183704
186447
  set2.set,
@@ -183721,7 +186464,7 @@ var require_tags2 = __commonJS((exports) => {
183721
186464
  var schema = require_schema4();
183722
186465
  var schema$1 = require_schema5();
183723
186466
  var binary = require_binary2();
183724
- var merge2 = require_merge3();
186467
+ var merge3 = require_merge3();
183725
186468
  var omap = require_omap2();
183726
186469
  var pairs = require_pairs2();
183727
186470
  var schema$2 = require_schema6();
@@ -183746,7 +186489,7 @@ var require_tags2 = __commonJS((exports) => {
183746
186489
  intOct: int2.intOct,
183747
186490
  intTime: timestamp.intTime,
183748
186491
  map: map2.map,
183749
- merge: merge2.merge,
186492
+ merge: merge3.merge,
183750
186493
  null: _null4.nullTag,
183751
186494
  omap: omap.omap,
183752
186495
  pairs: pairs.pairs,
@@ -183756,7 +186499,7 @@ var require_tags2 = __commonJS((exports) => {
183756
186499
  };
183757
186500
  var coreKnownTags = {
183758
186501
  "tag:yaml.org,2002:binary": binary.binary,
183759
- "tag:yaml.org,2002:merge": merge2.merge,
186502
+ "tag:yaml.org,2002:merge": merge3.merge,
183760
186503
  "tag:yaml.org,2002:omap": omap.omap,
183761
186504
  "tag:yaml.org,2002:pairs": pairs.pairs,
183762
186505
  "tag:yaml.org,2002:set": set2.set,
@@ -183765,7 +186508,7 @@ var require_tags2 = __commonJS((exports) => {
183765
186508
  function getTags(customTags, schemaName, addMergeTag) {
183766
186509
  const schemaTags = schemas3.get(schemaName);
183767
186510
  if (schemaTags && !customTags) {
183768
- return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
186511
+ return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
183769
186512
  }
183770
186513
  let tags = schemaTags;
183771
186514
  if (!tags) {
@@ -183783,7 +186526,7 @@ var require_tags2 = __commonJS((exports) => {
183783
186526
  tags = customTags(tags.slice());
183784
186527
  }
183785
186528
  if (addMergeTag)
183786
- tags = tags.concat(merge2.merge);
186529
+ tags = tags.concat(merge3.merge);
183787
186530
  return tags.reduce((tags2, tag) => {
183788
186531
  const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
183789
186532
  if (!tagObj) {
@@ -183810,11 +186553,11 @@ var require_Schema2 = __commonJS((exports) => {
183810
186553
  var sortMapEntriesByKey = (a5, b8) => a5.key < b8.key ? -1 : a5.key > b8.key ? 1 : 0;
183811
186554
 
183812
186555
  class Schema2 {
183813
- constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
186556
+ constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
183814
186557
  this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
183815
186558
  this.name = typeof schema === "string" && schema || "core";
183816
186559
  this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
183817
- this.tags = tags.getTags(customTags, this.name, merge2);
186560
+ this.tags = tags.getTags(customTags, this.name, merge3);
183818
186561
  this.toStringOptions = toStringDefaults ?? null;
183819
186562
  Object.defineProperty(this, identity.MAP, { value: map2.map });
183820
186563
  Object.defineProperty(this, identity.SCALAR, { value: string4.string });
@@ -185037,13 +187780,13 @@ var require_resolve_block_scalar2 = __commonJS((exports) => {
185037
187780
  return { mode, indent: indent3, chomp, comment, length };
185038
187781
  }
185039
187782
  function splitLines2(source2) {
185040
- const split2 = source2.split(/\n( *)/);
185041
- const first = split2[0];
187783
+ const split3 = source2.split(/\n( *)/);
187784
+ const first = split3[0];
185042
187785
  const m7 = first.match(/^( *)/);
185043
187786
  const line0 = m7?.[1] ? [m7[1], first.slice(m7[1].length)] : ["", first];
185044
187787
  const lines = [line0];
185045
- for (let i5 = 1;i5 < split2.length; i5 += 2)
185046
- lines.push([split2[i5], split2[i5 + 1]]);
187788
+ for (let i5 = 1;i5 < split3.length; i5 += 2)
187789
+ lines.push([split3[i5], split3[i5 + 1]]);
185047
187790
  return lines;
185048
187791
  }
185049
187792
  exports.resolveBlockScalar = resolveBlockScalar;
@@ -187691,7 +190434,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
187691
190434
  // package.json
187692
190435
  var package_default = {
187693
190436
  name: "@eigenpal/cli",
187694
- version: "0.10.4",
190437
+ version: "0.10.5",
187695
190438
  description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
187696
190439
  keywords: [
187697
190440
  "eigenpal",
@@ -189208,7 +191951,7 @@ async function pushCurrentBranch(input) {
189208
191951
  function slugifyPackageSegment(value) {
189209
191952
  return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
189210
191953
  }
189211
- function packagePathForTemplate(template, name) {
191954
+ function packagePathForTemplate(template2, name) {
189212
191955
  const slug = slugifyPackageSegment(name);
189213
191956
  if (!slug)
189214
191957
  throw new Error("Package name must include at least one letter or number.");
@@ -189220,7 +191963,7 @@ function packagePathForTemplate(template, name) {
189220
191963
  knowledge: "resources/knowledge",
189221
191964
  evaluator: "evaluators"
189222
191965
  };
189223
- const root = rootByTemplate[template];
191966
+ const root = rootByTemplate[template2];
189224
191967
  if (!root)
189225
191968
  throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
189226
191969
  return SourcePackagePathSchema.parse(`${root}/${slug}`);
@@ -189629,12 +192372,12 @@ function archivePackage(input) {
189629
192372
  runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
189630
192373
  cwd: input.gitRoot
189631
192374
  });
189632
- const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
192375
+ const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
189633
192376
  cwd: input.outDir,
189634
192377
  encoding: "utf8"
189635
192378
  });
189636
- if (extract.status !== 0)
189637
- throw new Error(extract.stderr.trim() || "tar extraction failed");
192379
+ if (extract2.status !== 0)
192380
+ throw new Error(extract2.stderr.trim() || "tar extraction failed");
189638
192381
  } finally {
189639
192382
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
189640
192383
  }
@@ -189663,12 +192406,12 @@ async function tryHostedArchive(input) {
189663
192406
  const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
189664
192407
  try {
189665
192408
  writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
189666
- const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
192409
+ const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
189667
192410
  cwd: input.outDir,
189668
192411
  encoding: "utf8"
189669
192412
  });
189670
- if (extract.status !== 0)
189671
- throw new Error(extract.stderr.trim() || "tar extraction failed");
192413
+ if (extract2.status !== 0)
192414
+ throw new Error(extract2.stderr.trim() || "tar extraction failed");
189672
192415
  return true;
189673
192416
  } finally {
189674
192417
  rmSync(path5.dirname(tarPath), { recursive: true, force: true });
@@ -194023,18 +196766,18 @@ async function init(name, opts) {
194023
196766
  if (existsSync11(target) && readdirSync2(target).length > 0) {
194024
196767
  throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
194025
196768
  }
194026
- let template;
196769
+ let template2;
194027
196770
  if (opts.template) {
194028
196771
  if (!isTemplateName(opts.template)) {
194029
196772
  throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
194030
196773
  }
194031
- template = opts.template;
196774
+ template2 = opts.template;
194032
196775
  } else if (opts.yes || !process.stdin.isTTY) {
194033
- template = "blank";
196776
+ template2 = "blank";
194034
196777
  } else {
194035
- template = await promptForTemplate();
196778
+ template2 = await promptForTemplate();
194036
196779
  }
194037
- const sourceRoot = join2(resolveTemplatesRoot(), template);
196780
+ const sourceRoot = join2(resolveTemplatesRoot(), template2);
194038
196781
  if (!existsSync11(sourceRoot)) {
194039
196782
  throw new Error(`Template directory missing on disk: ${sourceRoot}`);
194040
196783
  }
@@ -194388,6 +197131,7 @@ async function writeExecutionArtifacts(client, exampleDir, payload) {
194388
197131
  }
194389
197132
 
194390
197133
  // src/lib/payload.ts
197134
+ init_src();
194391
197135
  import { existsSync as existsSync14, readdirSync as readdirSync4, readFileSync as readFileSync13, statSync as statSync4 } from "fs";
194392
197136
  import { join as join8 } from "path";
194393
197137
  var DATASET_EXAMPLES_DIR = ["dataset", "examples"];
@@ -194423,16 +197167,17 @@ function readCanonicalInput(exampleDir, inputPath) {
194423
197167
  for (const [key2, value] of Object.entries(raw)) {
194424
197168
  const refs = topLevelFileRefs(value);
194425
197169
  if (refs.length === 0) {
194426
- scalars[key2] = value;
197170
+ scalars[key2] = materializeNestedFileRefs(exampleDir, inputPath, value);
194427
197171
  continue;
194428
197172
  }
194429
197173
  for (const ref of refs) {
194430
- const relative3 = parseDatasetInputFileRef(ref);
194431
- if (!relative3) {
197174
+ const validation2 = validateScopedArtifactPath(ref, { allowedRoots: ["input"] });
197175
+ if (!validation2.ok) {
194432
197176
  throw new Error(`${inputPath}: ${key2} must reference files under input/ without path traversal.`);
194433
197177
  }
194434
- const filePath = join8(exampleDir, "input", relative3);
194435
- const filename = relative3.split("/").at(-1) ?? relative3;
197178
+ const relative3 = validation2.value.segments.slice(1).join("/");
197179
+ const filePath = join8(exampleDir, validation2.value.path);
197180
+ const filename = validation2.value.segments.at(-1) ?? relative3;
194436
197181
  files.push({
194437
197182
  argument: key2,
194438
197183
  filename,
@@ -194443,29 +197188,55 @@ function readCanonicalInput(exampleDir, inputPath) {
194443
197188
  }
194444
197189
  return { scalars, files };
194445
197190
  }
197191
+ function materializeNestedFileRefs(exampleDir, inputPath, value) {
197192
+ if (isScopedFileRef2(value)) {
197193
+ const validation2 = validateScopedArtifactPath(value.$file, { allowedRoots: ["input"] });
197194
+ if (!validation2.ok) {
197195
+ throw new Error(`${inputPath}: $file refs must reference files under input/.`);
197196
+ }
197197
+ const filename = validation2.value.segments.at(-1) ?? "file";
197198
+ const filePath = join8(exampleDir, validation2.value.path);
197199
+ return {
197200
+ $inline: {
197201
+ filename,
197202
+ mimeType: guessMimeType(filename) ?? "application/octet-stream",
197203
+ base64: readFileSync13(filePath).toString("base64")
197204
+ }
197205
+ };
197206
+ }
197207
+ if (Array.isArray(value)) {
197208
+ return value.map((item) => materializeNestedFileRefs(exampleDir, inputPath, item));
197209
+ }
197210
+ if (value && typeof value === "object") {
197211
+ if (hasFileKey(value)) {
197212
+ throw new Error('file refs must be exact { "$file": "input/..." } objects.');
197213
+ }
197214
+ const out = {};
197215
+ for (const [key2, item] of Object.entries(value)) {
197216
+ out[key2] = materializeNestedFileRefs(exampleDir, inputPath, item);
197217
+ }
197218
+ return out;
197219
+ }
197220
+ return value;
197221
+ }
194446
197222
  function topLevelFileRefs(value) {
194447
- if (isFileRef(value))
197223
+ if (isScopedFileRef2(value))
194448
197224
  return [value.$file];
194449
- if (Array.isArray(value) && value.every(isFileRef))
197225
+ if (hasFileKey(value)) {
197226
+ throw new Error('file refs must be exact { "$file": "input/..." } objects.');
197227
+ }
197228
+ if (Array.isArray(value) && value.every(isScopedFileRef2))
194450
197229
  return value.map((item) => item.$file);
194451
- if (Array.isArray(value) && value.some(isFileRef)) {
194452
- throw new Error('file arrays must contain only { "$file": "input/..." } entries.');
197230
+ if (Array.isArray(value) && value.some(hasFileKey)) {
197231
+ throw new Error('file arrays must contain only exact { "$file": "input/..." } entries.');
194453
197232
  }
194454
197233
  return [];
194455
197234
  }
194456
- function isFileRef(value) {
194457
- return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.$file === "string";
197235
+ function isScopedFileRef2(value) {
197236
+ return value !== null && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 1 && typeof value.$file === "string";
194458
197237
  }
194459
- function parseDatasetInputFileRef(path15) {
194460
- if (!path15.startsWith("input/"))
194461
- return null;
194462
- if (path15.startsWith("/") || path15.includes("\\") || path15.includes("\x00"))
194463
- return null;
194464
- const relative3 = path15.slice("input/".length);
194465
- const parts = relative3.split("/");
194466
- if (parts.some((part) => !part || part === "." || part === ".."))
194467
- return null;
194468
- return parts.join("/");
197238
+ function hasFileKey(value) {
197239
+ return value !== null && typeof value === "object" && !Array.isArray(value) && "$file" in value;
194469
197240
  }
194470
197241
  function readOverrides(exampleDir) {
194471
197242
  const metaPath = join8(exampleDir, "meta.json");
@@ -196336,14 +199107,14 @@ function printIssues(label2, path15, issues) {
196336
199107
  console.error("");
196337
199108
  return false;
196338
199109
  }
196339
- function isFileRef2(value) {
199110
+ function isFileRef(value) {
196340
199111
  return value !== null && typeof value === "object" && !Array.isArray(value) && typeof value.$file === "string";
196341
199112
  }
196342
199113
  function isExpectedErrorRef(value) {
196343
199114
  return value !== null && typeof value === "object" && !Array.isArray(value) && Object.keys(value).length === 1 && Object.prototype.hasOwnProperty.call(value, "$error");
196344
199115
  }
196345
199116
  function collectDatasetFileRefs(value, jsonPath = "<root>") {
196346
- if (isFileRef2(value))
199117
+ if (isFileRef(value))
196347
199118
  return [{ path: value.$file, jsonPath }];
196348
199119
  if (Array.isArray(value)) {
196349
199120
  return value.flatMap((item, index) => collectDatasetFileRefs(item, `${jsonPath}.${index}`));
@@ -196387,29 +199158,50 @@ function parseDatasetFileRef(path15, root2) {
196387
199158
  function rootDir(opts) {
196388
199159
  return resolve6(opts.dir ?? process.cwd());
196389
199160
  }
199161
+ async function onlineInvokeIssues(yamlText, opts) {
199162
+ const config2 = resolveConfig(opts);
199163
+ requireApiKey(config2);
199164
+ const client = new ApiClient(config2);
199165
+ const res = await client.post("/api/workflows/validate", { yaml: yamlText });
199166
+ return res.issues ?? [];
199167
+ }
196390
199168
  function registerAllValidateCommand(parent) {
196391
- parent.command("validate [path]").description("Local-only validation. Without [path]: runs the templated three-way check (./workflow.yaml + ./evaluators.yaml + ./dataset/). With [path] pointing at a YAML file: validates that workflow.yaml. For per-noun targeting use `evaluators validate` or `dataset validate`.").option("--dir <path>", "Project root (defaults to cwd; resolves the three default paths from here)").action((path15, opts) => {
199169
+ const cmd = parent.command("validate [path]").description("Local-only validation. Without [path]: runs the templated three-way check (./workflow.yaml + ./evaluators.yaml + ./dataset/). With [path] pointing at a YAML file: validates that workflow.yaml. For per-noun targeting use `evaluators validate` or `dataset validate`.").option("--dir <path>", "Project root (defaults to cwd; resolves the three default paths from here)").option("--online", "Also validate cross-workflow action.invoke-workflow references against the server (needs auth). Catches target-not-found, input type mismatches, missing/unknown input keys, undeclared output, and invoke cycles that local validation cannot see.").addHelpText("after", `
199170
+ Note
199171
+ ` + ` Local validation cannot resolve action.invoke-workflow targets (they live
199172
+ ` + ` in the server DB), so invoke reference/type/cycle errors only surface at
199173
+ ` + " push — or run `validate --online` to check them before pushing.\n");
199174
+ withBaseUrl(cmd).action(action(async (path15, opts) => {
196392
199175
  if (path15) {
196393
199176
  const target = resolve6(path15);
196394
199177
  const wfResult2 = validateWorkflowYaml(target);
196395
199178
  const wfOk2 = printIssues("workflow.yaml", target, wfResult2.issues);
196396
199179
  if (wfOk2)
196397
199180
  printSchemaQualityWarnings(target, wfResult2.warnings);
196398
- if (!wfOk2)
199181
+ let onlineOk2 = true;
199182
+ if (wfOk2 && opts.online) {
199183
+ onlineOk2 = printIssues("invoke refs (server)", target, await onlineInvokeIssues(readFileSync15(target, "utf-8"), opts));
199184
+ }
199185
+ if (!wfOk2 || !onlineOk2)
196399
199186
  process.exit(1);
196400
199187
  return;
196401
199188
  }
196402
199189
  const root2 = rootDir(opts);
196403
- const wfResult = validateWorkflowYaml(join13(root2, "workflow.yaml"));
196404
- const wfPath = relPath(root2, join13(root2, "workflow.yaml"));
199190
+ const wfFile = join13(root2, "workflow.yaml");
199191
+ const wfResult = validateWorkflowYaml(wfFile);
199192
+ const wfPath = relPath(root2, wfFile);
196405
199193
  const wfOk = printIssues("workflow.yaml", wfPath, wfResult.issues);
196406
199194
  if (wfOk)
196407
199195
  printSchemaQualityWarnings(wfPath, wfResult.warnings);
196408
199196
  const evOk = printIssues("evaluators.yaml", relPath(root2, join13(root2, "evaluators.yaml")), validateEvaluatorsYaml(join13(root2, "evaluators.yaml")));
196409
199197
  const dsOk = printIssues("dataset/", relPath(root2, join13(root2, "dataset")), validateDatasetFolder(join13(root2, "dataset")));
196410
- if (!wfOk || !evOk || !dsOk)
199198
+ let onlineOk = true;
199199
+ if (wfOk && opts.online && existsSync17(wfFile)) {
199200
+ onlineOk = printIssues("invoke refs (server)", wfPath, await onlineInvokeIssues(readFileSync15(wfFile, "utf-8"), opts));
199201
+ }
199202
+ if (!wfOk || !evOk || !dsOk || !onlineOk)
196411
199203
  process.exit(1);
196412
- });
199204
+ }));
196413
199205
  }
196414
199206
  function registerEvaluatorsValidateCommand(parent) {
196415
199207
  parent.command("validate [path]").description("Validate an evaluators YAML file against the EvalConfig schema. Defaults to ./evaluators.yaml.").action((path15) => {
@@ -196588,6 +199380,23 @@ function registerWorkflowCoreCommands(parent) {
196588
199380
  }
196589
199381
  await writeOrPrint(opts.out, result.yamlContent);
196590
199382
  }));
199383
+ const schemaCmd = parent.command("schema <workflow-id>").description("Show the inferred output schema for a workflow (what it returns).").option("--format <format>", "json | typescript | python", "json").option("--out <path>", "Write to file instead of stdout").addHelpText("after", `
199384
+ Examples
199385
+ ` + ` eigenpal workflow schema income-assessment
199386
+ ` + ` eigenpal workflow schema wf_123 --format typescript
199387
+ ` + ` eigenpal workflow schema wf_123 --format python --out Output.py
199388
+ `);
199389
+ withBaseUrl(schemaCmd).action(action(async (workflow2, opts) => {
199390
+ const { client, workflowId } = await buildClientForWorkflow(workflow2, opts);
199391
+ const format3 = opts.format ?? "json";
199392
+ const result = await client.get(`/api/workflows/${workflowId}/output-schema`, { format: format3 });
199393
+ if (format3 === "json") {
199394
+ await writeOrPrint(opts.out, JSON.stringify(result, null, 2));
199395
+ } else {
199396
+ const text = result instanceof Response ? await result.text() : String(result);
199397
+ await writeOrPrint(opts.out, text);
199398
+ }
199399
+ }));
196591
199400
  const pushCmd = parent.command("push").description(descriptionFor("workflow_set_definition")).option("--file <yaml>", "Path to YAML file").option("--workflow-id <id>", "Update existing workflow (default: create new)").option("--bump <level>", "Auto-bump from the server's current version: patch | minor | major. Mutually exclusive with `--version` and with a top-level `version:` in the YAML.").option("--set-version <semver>", "Push at this exact semver (e.g. 1.4.0). Mutually exclusive with `--bump` and with a top-level `version:` in the YAML. (Named `--set-version` to avoid the global `-v, --version` flag.)").addHelpText("after", `
196592
199401
  Examples:
196593
199402
  $ eigenpal workflow push --file workflow.yaml
@@ -196967,8 +199776,9 @@ Examples:
196967
199776
  $ cat expected.json | eigenpal workflow dataset example create wf_abc123 --name piped --input-json '{}' --expected-file -
196968
199777
 
196969
199778
  \`--input-json\` and \`--input-file\` (same for \`--expected-*\`) are mutually
196970
- exclusive. File uploads still require a full \`dataset push\`; CRUD only
196971
- handles JSON input + \`expected.json\`-style outputs.
199779
+ exclusive. To attach files without a dataset folder, pass ingress refs in JSON:
199780
+ \`{"document":{"$fileId":"file_..."}}\` or
199781
+ \`{"document":{"$inline":{"filename":"doc.pdf","mimeType":"application/pdf","base64":"..."}}}\`.
196972
199782
  `);
196973
199783
  addJsonFlag(withBaseUrl(createCmd)).action(action(async (workflow2, opts) => {
196974
199784
  const triggerInput = await readJsonInput(opts.inputJson, opts.inputFile, "input");