@eigenpal/cli 0.10.19 → 0.10.20
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/CHANGELOG.md +6 -0
- package/dist/cli.js +543 -2762
- package/dist/skill/reference/step-types.md +53 -1
- package/dist/skill/reference/workflow-yaml.md +38 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17080,139 +17080,8 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
17080
17080
|
module.exports.createColors = createColors;
|
|
17081
17081
|
});
|
|
17082
17082
|
|
|
17083
|
-
// ../../node_modules/nanoid/url-alphabet/index.js
|
|
17084
|
-
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
17085
|
-
|
|
17086
|
-
// ../../node_modules/nanoid/index.js
|
|
17087
|
-
import { webcrypto as crypto } from "node:crypto";
|
|
17088
|
-
function fillPool(bytes) {
|
|
17089
|
-
if (!pool || pool.length < bytes) {
|
|
17090
|
-
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
17091
|
-
crypto.getRandomValues(pool);
|
|
17092
|
-
poolOffset = 0;
|
|
17093
|
-
} else if (poolOffset + bytes > pool.length) {
|
|
17094
|
-
crypto.getRandomValues(pool);
|
|
17095
|
-
poolOffset = 0;
|
|
17096
|
-
}
|
|
17097
|
-
poolOffset += bytes;
|
|
17098
|
-
}
|
|
17099
|
-
function nanoid3(size = 21) {
|
|
17100
|
-
fillPool(size |= 0);
|
|
17101
|
-
let id = "";
|
|
17102
|
-
for (let i = poolOffset - size;i < poolOffset; i++) {
|
|
17103
|
-
id += urlAlphabet[pool[i] & 63];
|
|
17104
|
-
}
|
|
17105
|
-
return id;
|
|
17106
|
-
}
|
|
17107
|
-
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
|
|
17108
|
-
var init_nanoid = () => {};
|
|
17109
|
-
|
|
17110
|
-
// ../types/src/core/common.ts
|
|
17111
|
-
function generateId(prefix) {
|
|
17112
|
-
const id = nanoid3();
|
|
17113
|
-
return prefix ? `${prefix}_${id}` : id;
|
|
17114
|
-
}
|
|
17115
|
-
function toJsonSchema(schema) {
|
|
17116
|
-
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
17117
|
-
}
|
|
17118
|
-
var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
|
|
17119
|
-
var init_common = __esm(() => {
|
|
17120
|
-
init_nanoid();
|
|
17121
|
-
init_zod();
|
|
17122
|
-
ID_PREFIXES = {
|
|
17123
|
-
WORKFLOW: "wf",
|
|
17124
|
-
WORKFLOW_VERSION: "wfv",
|
|
17125
|
-
WORKFLOW_HISTORY: "wfh",
|
|
17126
|
-
JOB: "job",
|
|
17127
|
-
EXECUTION: "exec",
|
|
17128
|
-
STEP_EXECUTION: "step",
|
|
17129
|
-
FILE: "file",
|
|
17130
|
-
TEMPLATE: "tmpl",
|
|
17131
|
-
USER: "user",
|
|
17132
|
-
TENANT: "org",
|
|
17133
|
-
TENANT_INVITE: "inv",
|
|
17134
|
-
API_KEY: "eig",
|
|
17135
|
-
PROCESSOR: "proc",
|
|
17136
|
-
AI_PROVIDER: "aip",
|
|
17137
|
-
ACCOUNT: "acct",
|
|
17138
|
-
SESSION: "sess",
|
|
17139
|
-
VERIFICATION: "vrf",
|
|
17140
|
-
DATASET: "ds",
|
|
17141
|
-
DATASET_EXAMPLE: "dex",
|
|
17142
|
-
EXPERIMENT: "exp",
|
|
17143
|
-
EXPERIMENT_RUN: "exr",
|
|
17144
|
-
EXPERIMENT_EVALUATION: "evl",
|
|
17145
|
-
EVAL_EXAMPLE: "evx",
|
|
17146
|
-
EVAL_RESULT: "evr",
|
|
17147
|
-
EVAL_BATCH: "evb",
|
|
17148
|
-
RUN_REVIEW: "rev",
|
|
17149
|
-
RUN_REVIEW_CORRECTION: "rvc",
|
|
17150
|
-
TABLE_ROW: "row",
|
|
17151
|
-
FOLDER: "fldr",
|
|
17152
|
-
AGENT_WORKFLOW: "awf",
|
|
17153
|
-
AGENT_EXECUTION: "aex",
|
|
17154
|
-
AGENT_EXAMPLE: "aeg",
|
|
17155
|
-
AGENT_VERSION: "avr",
|
|
17156
|
-
AGENT_TRAINING_SESSION: "ats",
|
|
17157
|
-
AGENT_EXPERIMENT: "aexp",
|
|
17158
|
-
AGENT_EMAIL_ALIAS: "aea",
|
|
17159
|
-
AGENT_EMAIL_INVOCATION: "aei",
|
|
17160
|
-
AUTOMATION_TRIGGER: "atr",
|
|
17161
|
-
FILE_SOURCE_CONFIG: "fsc",
|
|
17162
|
-
SANDBOX_WS_TOKEN: "sws"
|
|
17163
|
-
};
|
|
17164
|
-
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
17165
|
-
return typeof val === "string" ? new Date(val) : val;
|
|
17166
|
-
});
|
|
17167
|
-
JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
17168
|
-
BaseEntitySchema = exports_external.object({
|
|
17169
|
-
id: exports_external.string(),
|
|
17170
|
-
createdAt: TimestampSchema.optional(),
|
|
17171
|
-
updatedAt: TimestampSchema.optional()
|
|
17172
|
-
});
|
|
17173
|
-
});
|
|
17174
|
-
|
|
17175
|
-
// ../types/src/core/ids.ts
|
|
17176
|
-
var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
|
|
17177
|
-
var init_ids = __esm(() => {
|
|
17178
|
-
PROCESSOR_IDS = {
|
|
17179
|
-
MERGE: "builtin/merge",
|
|
17180
|
-
DOCUMENT_PARSER: "builtin/parser",
|
|
17181
|
-
EXTRACT: "builtin/extract",
|
|
17182
|
-
SPLIT: "builtin/split",
|
|
17183
|
-
SEGMENT: "builtin/segment",
|
|
17184
|
-
CLASSIFY: "builtin/classify",
|
|
17185
|
-
TEMPLATE: "builtin/template",
|
|
17186
|
-
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
17187
|
-
XLSX_TO_JSON: "builtin/xlsx-to-json"
|
|
17188
|
-
};
|
|
17189
|
-
PARSER_IDS = {
|
|
17190
|
-
KREUZBERG: "builtin/kreuzberg",
|
|
17191
|
-
OCR: "builtin/ocr",
|
|
17192
|
-
LLM_VISION: "builtin/llm-vision"
|
|
17193
|
-
};
|
|
17194
|
-
INPUT_KINDS = {
|
|
17195
|
-
DOCUMENT: "document",
|
|
17196
|
-
PAYLOAD: "payload"
|
|
17197
|
-
};
|
|
17198
|
-
});
|
|
17199
|
-
|
|
17200
|
-
// ../types/src/core/pagination.ts
|
|
17201
|
-
var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
|
|
17202
|
-
var init_pagination = __esm(() => {
|
|
17203
|
-
init_zod();
|
|
17204
|
-
PaginationParamsSchema = exports_external.object({
|
|
17205
|
-
limit: exports_external.coerce.number().int().min(1).max(100).default(50),
|
|
17206
|
-
offset: exports_external.coerce.number().int().min(0).default(0)
|
|
17207
|
-
});
|
|
17208
|
-
});
|
|
17209
|
-
|
|
17210
17083
|
// ../types/src/core/index.ts
|
|
17211
|
-
var init_core3 =
|
|
17212
|
-
init_common();
|
|
17213
|
-
init_ids();
|
|
17214
|
-
init_pagination();
|
|
17215
|
-
});
|
|
17084
|
+
var init_core3 = () => {};
|
|
17216
17085
|
|
|
17217
17086
|
// ../types/src/files/legacy-boundary.ts
|
|
17218
17087
|
var LEGACY_FILE_REF_COMPATIBILITY;
|
|
@@ -17237,9 +17106,6 @@ var init_legacy_boundary = __esm(() => {
|
|
|
17237
17106
|
function isRuntimeFileRef(input) {
|
|
17238
17107
|
return RuntimeFileRefSchema.safeParse(input).success;
|
|
17239
17108
|
}
|
|
17240
|
-
function isFilePathDescriptor(input) {
|
|
17241
|
-
return FilePathDescriptorSchema.safeParse(input).success;
|
|
17242
|
-
}
|
|
17243
17109
|
function isResolvedProcessorFile(input) {
|
|
17244
17110
|
return ResolvedProcessorFileSchema.safeParse(input).success;
|
|
17245
17111
|
}
|
|
@@ -17462,2411 +17328,11 @@ var init_scoped_file_ref = __esm(() => {
|
|
|
17462
17328
|
]);
|
|
17463
17329
|
});
|
|
17464
17330
|
|
|
17465
|
-
// ../../node_modules/@opentelemetry/api/build/src/version.js
|
|
17466
|
-
var require_version = __commonJS((exports) => {
|
|
17467
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17468
|
-
exports.VERSION = undefined;
|
|
17469
|
-
exports.VERSION = "1.9.1";
|
|
17470
|
-
});
|
|
17471
|
-
|
|
17472
|
-
// ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
17473
|
-
var require_semver = __commonJS((exports) => {
|
|
17474
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17475
|
-
exports.isCompatible = exports._makeCompatibilityCheck = undefined;
|
|
17476
|
-
var version_1 = require_version();
|
|
17477
|
-
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17478
|
-
function _makeCompatibilityCheck(ownVersion) {
|
|
17479
|
-
const acceptedVersions = new Set([ownVersion]);
|
|
17480
|
-
const rejectedVersions = new Set;
|
|
17481
|
-
const myVersionMatch = ownVersion.match(re);
|
|
17482
|
-
if (!myVersionMatch) {
|
|
17483
|
-
return () => false;
|
|
17484
|
-
}
|
|
17485
|
-
const ownVersionParsed = {
|
|
17486
|
-
major: +myVersionMatch[1],
|
|
17487
|
-
minor: +myVersionMatch[2],
|
|
17488
|
-
patch: +myVersionMatch[3],
|
|
17489
|
-
prerelease: myVersionMatch[4]
|
|
17490
|
-
};
|
|
17491
|
-
if (ownVersionParsed.prerelease != null) {
|
|
17492
|
-
return function isExactmatch(globalVersion) {
|
|
17493
|
-
return globalVersion === ownVersion;
|
|
17494
|
-
};
|
|
17495
|
-
}
|
|
17496
|
-
function _reject(v) {
|
|
17497
|
-
rejectedVersions.add(v);
|
|
17498
|
-
return false;
|
|
17499
|
-
}
|
|
17500
|
-
function _accept(v) {
|
|
17501
|
-
acceptedVersions.add(v);
|
|
17502
|
-
return true;
|
|
17503
|
-
}
|
|
17504
|
-
return function isCompatible(globalVersion) {
|
|
17505
|
-
if (acceptedVersions.has(globalVersion)) {
|
|
17506
|
-
return true;
|
|
17507
|
-
}
|
|
17508
|
-
if (rejectedVersions.has(globalVersion)) {
|
|
17509
|
-
return false;
|
|
17510
|
-
}
|
|
17511
|
-
const globalVersionMatch = globalVersion.match(re);
|
|
17512
|
-
if (!globalVersionMatch) {
|
|
17513
|
-
return _reject(globalVersion);
|
|
17514
|
-
}
|
|
17515
|
-
const globalVersionParsed = {
|
|
17516
|
-
major: +globalVersionMatch[1],
|
|
17517
|
-
minor: +globalVersionMatch[2],
|
|
17518
|
-
patch: +globalVersionMatch[3],
|
|
17519
|
-
prerelease: globalVersionMatch[4]
|
|
17520
|
-
};
|
|
17521
|
-
if (globalVersionParsed.prerelease != null) {
|
|
17522
|
-
return _reject(globalVersion);
|
|
17523
|
-
}
|
|
17524
|
-
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
17525
|
-
return _reject(globalVersion);
|
|
17526
|
-
}
|
|
17527
|
-
if (ownVersionParsed.major === 0) {
|
|
17528
|
-
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
17529
|
-
return _accept(globalVersion);
|
|
17530
|
-
}
|
|
17531
|
-
return _reject(globalVersion);
|
|
17532
|
-
}
|
|
17533
|
-
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
17534
|
-
return _accept(globalVersion);
|
|
17535
|
-
}
|
|
17536
|
-
return _reject(globalVersion);
|
|
17537
|
-
};
|
|
17538
|
-
}
|
|
17539
|
-
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
|
|
17540
|
-
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
|
|
17541
|
-
});
|
|
17542
|
-
|
|
17543
|
-
// ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
|
|
17544
|
-
var require_global_utils = __commonJS((exports) => {
|
|
17545
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17546
|
-
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
|
|
17547
|
-
var version_1 = require_version();
|
|
17548
|
-
var semver_1 = require_semver();
|
|
17549
|
-
var major = version_1.VERSION.split(".")[0];
|
|
17550
|
-
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17551
|
-
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17552
|
-
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
17553
|
-
var _a3;
|
|
17554
|
-
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
|
|
17555
|
-
version: version_1.VERSION
|
|
17556
|
-
};
|
|
17557
|
-
if (!allowOverride && api2[type]) {
|
|
17558
|
-
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17559
|
-
diag.error(err.stack || err.message);
|
|
17560
|
-
return false;
|
|
17561
|
-
}
|
|
17562
|
-
if (api2.version !== version_1.VERSION) {
|
|
17563
|
-
const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
|
|
17564
|
-
diag.error(err.stack || err.message);
|
|
17565
|
-
return false;
|
|
17566
|
-
}
|
|
17567
|
-
api2[type] = instance;
|
|
17568
|
-
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
|
|
17569
|
-
return true;
|
|
17570
|
-
}
|
|
17571
|
-
exports.registerGlobal = registerGlobal;
|
|
17572
|
-
function getGlobal(type) {
|
|
17573
|
-
var _a3, _b;
|
|
17574
|
-
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
|
|
17575
|
-
if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
|
|
17576
|
-
return;
|
|
17577
|
-
}
|
|
17578
|
-
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
|
|
17579
|
-
}
|
|
17580
|
-
exports.getGlobal = getGlobal;
|
|
17581
|
-
function unregisterGlobal(type, diag) {
|
|
17582
|
-
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
|
|
17583
|
-
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17584
|
-
if (api2) {
|
|
17585
|
-
delete api2[type];
|
|
17586
|
-
}
|
|
17587
|
-
}
|
|
17588
|
-
exports.unregisterGlobal = unregisterGlobal;
|
|
17589
|
-
});
|
|
17590
|
-
|
|
17591
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
|
|
17592
|
-
var require_ComponentLogger = __commonJS((exports) => {
|
|
17593
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17594
|
-
exports.DiagComponentLogger = undefined;
|
|
17595
|
-
var global_utils_1 = require_global_utils();
|
|
17596
|
-
|
|
17597
|
-
class DiagComponentLogger {
|
|
17598
|
-
constructor(props) {
|
|
17599
|
-
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17600
|
-
}
|
|
17601
|
-
debug(...args) {
|
|
17602
|
-
return logProxy("debug", this._namespace, args);
|
|
17603
|
-
}
|
|
17604
|
-
error(...args) {
|
|
17605
|
-
return logProxy("error", this._namespace, args);
|
|
17606
|
-
}
|
|
17607
|
-
info(...args) {
|
|
17608
|
-
return logProxy("info", this._namespace, args);
|
|
17609
|
-
}
|
|
17610
|
-
warn(...args) {
|
|
17611
|
-
return logProxy("warn", this._namespace, args);
|
|
17612
|
-
}
|
|
17613
|
-
verbose(...args) {
|
|
17614
|
-
return logProxy("verbose", this._namespace, args);
|
|
17615
|
-
}
|
|
17616
|
-
}
|
|
17617
|
-
exports.DiagComponentLogger = DiagComponentLogger;
|
|
17618
|
-
function logProxy(funcName, namespace, args) {
|
|
17619
|
-
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17620
|
-
if (!logger) {
|
|
17621
|
-
return;
|
|
17622
|
-
}
|
|
17623
|
-
return logger[funcName](namespace, ...args);
|
|
17624
|
-
}
|
|
17625
|
-
});
|
|
17626
|
-
|
|
17627
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag/types.js
|
|
17628
|
-
var require_types = __commonJS((exports) => {
|
|
17629
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17630
|
-
exports.DiagLogLevel = undefined;
|
|
17631
|
-
var DiagLogLevel;
|
|
17632
|
-
(function(DiagLogLevel2) {
|
|
17633
|
-
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17634
|
-
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
17635
|
-
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
17636
|
-
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
17637
|
-
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
17638
|
-
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
17639
|
-
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
17640
|
-
})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
|
|
17641
|
-
});
|
|
17642
|
-
|
|
17643
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
|
|
17644
|
-
var require_logLevelLogger = __commonJS((exports) => {
|
|
17645
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17646
|
-
exports.createLogLevelDiagLogger = undefined;
|
|
17647
|
-
var types_1 = require_types();
|
|
17648
|
-
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17649
|
-
if (maxLevel < types_1.DiagLogLevel.NONE) {
|
|
17650
|
-
maxLevel = types_1.DiagLogLevel.NONE;
|
|
17651
|
-
} else if (maxLevel > types_1.DiagLogLevel.ALL) {
|
|
17652
|
-
maxLevel = types_1.DiagLogLevel.ALL;
|
|
17653
|
-
}
|
|
17654
|
-
logger = logger || {};
|
|
17655
|
-
function _filterFunc(funcName, theLevel) {
|
|
17656
|
-
const theFunc = logger[funcName];
|
|
17657
|
-
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17658
|
-
return theFunc.bind(logger);
|
|
17659
|
-
}
|
|
17660
|
-
return function() {};
|
|
17661
|
-
}
|
|
17662
|
-
return {
|
|
17663
|
-
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
17664
|
-
warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
|
|
17665
|
-
info: _filterFunc("info", types_1.DiagLogLevel.INFO),
|
|
17666
|
-
debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
|
|
17667
|
-
verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
|
|
17668
|
-
};
|
|
17669
|
-
}
|
|
17670
|
-
exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
|
|
17671
|
-
});
|
|
17672
|
-
|
|
17673
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/diag.js
|
|
17674
|
-
var require_diag = __commonJS((exports) => {
|
|
17675
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17676
|
-
exports.DiagAPI = undefined;
|
|
17677
|
-
var ComponentLogger_1 = require_ComponentLogger();
|
|
17678
|
-
var logLevelLogger_1 = require_logLevelLogger();
|
|
17679
|
-
var types_1 = require_types();
|
|
17680
|
-
var global_utils_1 = require_global_utils();
|
|
17681
|
-
var API_NAME = "diag";
|
|
17682
|
-
|
|
17683
|
-
class DiagAPI {
|
|
17684
|
-
static instance() {
|
|
17685
|
-
if (!this._instance) {
|
|
17686
|
-
this._instance = new DiagAPI;
|
|
17687
|
-
}
|
|
17688
|
-
return this._instance;
|
|
17689
|
-
}
|
|
17690
|
-
constructor() {
|
|
17691
|
-
function _logProxy(funcName) {
|
|
17692
|
-
return function(...args) {
|
|
17693
|
-
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17694
|
-
if (!logger)
|
|
17695
|
-
return;
|
|
17696
|
-
return logger[funcName](...args);
|
|
17697
|
-
};
|
|
17698
|
-
}
|
|
17699
|
-
const self2 = this;
|
|
17700
|
-
const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
|
|
17701
|
-
var _a3, _b, _c;
|
|
17702
|
-
if (logger === self2) {
|
|
17703
|
-
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17704
|
-
self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
|
|
17705
|
-
return false;
|
|
17706
|
-
}
|
|
17707
|
-
if (typeof optionsOrLogLevel === "number") {
|
|
17708
|
-
optionsOrLogLevel = {
|
|
17709
|
-
logLevel: optionsOrLogLevel
|
|
17710
|
-
};
|
|
17711
|
-
}
|
|
17712
|
-
const oldLogger = (0, global_utils_1.getGlobal)("diag");
|
|
17713
|
-
const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
|
|
17714
|
-
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17715
|
-
const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
|
|
17716
|
-
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17717
|
-
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17718
|
-
}
|
|
17719
|
-
return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
|
|
17720
|
-
};
|
|
17721
|
-
self2.setLogger = setLogger;
|
|
17722
|
-
self2.disable = () => {
|
|
17723
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, self2);
|
|
17724
|
-
};
|
|
17725
|
-
self2.createComponentLogger = (options) => {
|
|
17726
|
-
return new ComponentLogger_1.DiagComponentLogger(options);
|
|
17727
|
-
};
|
|
17728
|
-
self2.verbose = _logProxy("verbose");
|
|
17729
|
-
self2.debug = _logProxy("debug");
|
|
17730
|
-
self2.info = _logProxy("info");
|
|
17731
|
-
self2.warn = _logProxy("warn");
|
|
17732
|
-
self2.error = _logProxy("error");
|
|
17733
|
-
}
|
|
17734
|
-
}
|
|
17735
|
-
exports.DiagAPI = DiagAPI;
|
|
17736
|
-
});
|
|
17737
|
-
|
|
17738
|
-
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
|
|
17739
|
-
var require_baggage_impl = __commonJS((exports) => {
|
|
17740
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17741
|
-
exports.BaggageImpl = undefined;
|
|
17742
|
-
|
|
17743
|
-
class BaggageImpl {
|
|
17744
|
-
constructor(entries) {
|
|
17745
|
-
this._entries = entries ? new Map(entries) : new Map;
|
|
17746
|
-
}
|
|
17747
|
-
getEntry(key) {
|
|
17748
|
-
const entry = this._entries.get(key);
|
|
17749
|
-
if (!entry) {
|
|
17750
|
-
return;
|
|
17751
|
-
}
|
|
17752
|
-
return Object.assign({}, entry);
|
|
17753
|
-
}
|
|
17754
|
-
getAllEntries() {
|
|
17755
|
-
return Array.from(this._entries.entries());
|
|
17756
|
-
}
|
|
17757
|
-
setEntry(key, entry) {
|
|
17758
|
-
const newBaggage = new BaggageImpl(this._entries);
|
|
17759
|
-
newBaggage._entries.set(key, entry);
|
|
17760
|
-
return newBaggage;
|
|
17761
|
-
}
|
|
17762
|
-
removeEntry(key) {
|
|
17763
|
-
const newBaggage = new BaggageImpl(this._entries);
|
|
17764
|
-
newBaggage._entries.delete(key);
|
|
17765
|
-
return newBaggage;
|
|
17766
|
-
}
|
|
17767
|
-
removeEntries(...keys) {
|
|
17768
|
-
const newBaggage = new BaggageImpl(this._entries);
|
|
17769
|
-
for (const key of keys) {
|
|
17770
|
-
newBaggage._entries.delete(key);
|
|
17771
|
-
}
|
|
17772
|
-
return newBaggage;
|
|
17773
|
-
}
|
|
17774
|
-
clear() {
|
|
17775
|
-
return new BaggageImpl;
|
|
17776
|
-
}
|
|
17777
|
-
}
|
|
17778
|
-
exports.BaggageImpl = BaggageImpl;
|
|
17779
|
-
});
|
|
17780
|
-
|
|
17781
|
-
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
|
|
17782
|
-
var require_symbol = __commonJS((exports) => {
|
|
17783
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17784
|
-
exports.baggageEntryMetadataSymbol = undefined;
|
|
17785
|
-
exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
|
|
17786
|
-
});
|
|
17787
|
-
|
|
17788
|
-
// ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
|
|
17789
|
-
var require_utils = __commonJS((exports) => {
|
|
17790
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17791
|
-
exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
|
|
17792
|
-
var diag_1 = require_diag();
|
|
17793
|
-
var baggage_impl_1 = require_baggage_impl();
|
|
17794
|
-
var symbol_1 = require_symbol();
|
|
17795
|
-
var diag = diag_1.DiagAPI.instance();
|
|
17796
|
-
function createBaggage(entries = {}) {
|
|
17797
|
-
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
|
|
17798
|
-
}
|
|
17799
|
-
exports.createBaggage = createBaggage;
|
|
17800
|
-
function baggageEntryMetadataFromString(str) {
|
|
17801
|
-
if (typeof str !== "string") {
|
|
17802
|
-
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17803
|
-
str = "";
|
|
17804
|
-
}
|
|
17805
|
-
return {
|
|
17806
|
-
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
|
|
17807
|
-
toString() {
|
|
17808
|
-
return str;
|
|
17809
|
-
}
|
|
17810
|
-
};
|
|
17811
|
-
}
|
|
17812
|
-
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
|
|
17813
|
-
});
|
|
17814
|
-
|
|
17815
|
-
// ../../node_modules/@opentelemetry/api/build/src/context/context.js
|
|
17816
|
-
var require_context = __commonJS((exports) => {
|
|
17817
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17818
|
-
exports.ROOT_CONTEXT = exports.createContextKey = undefined;
|
|
17819
|
-
function createContextKey(description) {
|
|
17820
|
-
return Symbol.for(description);
|
|
17821
|
-
}
|
|
17822
|
-
exports.createContextKey = createContextKey;
|
|
17823
|
-
|
|
17824
|
-
class BaseContext {
|
|
17825
|
-
constructor(parentContext) {
|
|
17826
|
-
const self2 = this;
|
|
17827
|
-
self2._currentContext = parentContext ? new Map(parentContext) : new Map;
|
|
17828
|
-
self2.getValue = (key) => self2._currentContext.get(key);
|
|
17829
|
-
self2.setValue = (key, value) => {
|
|
17830
|
-
const context = new BaseContext(self2._currentContext);
|
|
17831
|
-
context._currentContext.set(key, value);
|
|
17832
|
-
return context;
|
|
17833
|
-
};
|
|
17834
|
-
self2.deleteValue = (key) => {
|
|
17835
|
-
const context = new BaseContext(self2._currentContext);
|
|
17836
|
-
context._currentContext.delete(key);
|
|
17837
|
-
return context;
|
|
17838
|
-
};
|
|
17839
|
-
}
|
|
17840
|
-
}
|
|
17841
|
-
exports.ROOT_CONTEXT = new BaseContext;
|
|
17842
|
-
});
|
|
17843
|
-
|
|
17844
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
|
|
17845
|
-
var require_consoleLogger = __commonJS((exports) => {
|
|
17846
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17847
|
-
exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
|
|
17848
|
-
var consoleMap = [
|
|
17849
|
-
{ n: "error", c: "error" },
|
|
17850
|
-
{ n: "warn", c: "warn" },
|
|
17851
|
-
{ n: "info", c: "info" },
|
|
17852
|
-
{ n: "debug", c: "debug" },
|
|
17853
|
-
{ n: "verbose", c: "trace" }
|
|
17854
|
-
];
|
|
17855
|
-
exports._originalConsoleMethods = {};
|
|
17856
|
-
if (typeof console !== "undefined") {
|
|
17857
|
-
const keys = [
|
|
17858
|
-
"error",
|
|
17859
|
-
"warn",
|
|
17860
|
-
"info",
|
|
17861
|
-
"debug",
|
|
17862
|
-
"trace",
|
|
17863
|
-
"log"
|
|
17864
|
-
];
|
|
17865
|
-
for (const key of keys) {
|
|
17866
|
-
if (typeof console[key] === "function") {
|
|
17867
|
-
exports._originalConsoleMethods[key] = console[key];
|
|
17868
|
-
}
|
|
17869
|
-
}
|
|
17870
|
-
}
|
|
17871
|
-
|
|
17872
|
-
class DiagConsoleLogger {
|
|
17873
|
-
constructor() {
|
|
17874
|
-
function _consoleFunc(funcName) {
|
|
17875
|
-
return function(...args) {
|
|
17876
|
-
let theFunc = exports._originalConsoleMethods[funcName];
|
|
17877
|
-
if (typeof theFunc !== "function") {
|
|
17878
|
-
theFunc = exports._originalConsoleMethods["log"];
|
|
17879
|
-
}
|
|
17880
|
-
if (typeof theFunc !== "function" && console) {
|
|
17881
|
-
theFunc = console[funcName];
|
|
17882
|
-
if (typeof theFunc !== "function") {
|
|
17883
|
-
theFunc = console.log;
|
|
17884
|
-
}
|
|
17885
|
-
}
|
|
17886
|
-
if (typeof theFunc === "function") {
|
|
17887
|
-
return theFunc.apply(console, args);
|
|
17888
|
-
}
|
|
17889
|
-
};
|
|
17890
|
-
}
|
|
17891
|
-
for (let i = 0;i < consoleMap.length; i++) {
|
|
17892
|
-
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
17893
|
-
}
|
|
17894
|
-
}
|
|
17895
|
-
}
|
|
17896
|
-
exports.DiagConsoleLogger = DiagConsoleLogger;
|
|
17897
|
-
});
|
|
17898
|
-
|
|
17899
|
-
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
|
|
17900
|
-
var require_NoopMeter = __commonJS((exports) => {
|
|
17901
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17902
|
-
exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = undefined;
|
|
17903
|
-
|
|
17904
|
-
class NoopMeter {
|
|
17905
|
-
constructor() {}
|
|
17906
|
-
createGauge(_name, _options) {
|
|
17907
|
-
return exports.NOOP_GAUGE_METRIC;
|
|
17908
|
-
}
|
|
17909
|
-
createHistogram(_name, _options) {
|
|
17910
|
-
return exports.NOOP_HISTOGRAM_METRIC;
|
|
17911
|
-
}
|
|
17912
|
-
createCounter(_name, _options) {
|
|
17913
|
-
return exports.NOOP_COUNTER_METRIC;
|
|
17914
|
-
}
|
|
17915
|
-
createUpDownCounter(_name, _options) {
|
|
17916
|
-
return exports.NOOP_UP_DOWN_COUNTER_METRIC;
|
|
17917
|
-
}
|
|
17918
|
-
createObservableGauge(_name, _options) {
|
|
17919
|
-
return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
17920
|
-
}
|
|
17921
|
-
createObservableCounter(_name, _options) {
|
|
17922
|
-
return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
17923
|
-
}
|
|
17924
|
-
createObservableUpDownCounter(_name, _options) {
|
|
17925
|
-
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
17926
|
-
}
|
|
17927
|
-
addBatchObservableCallback(_callback, _observables) {}
|
|
17928
|
-
removeBatchObservableCallback(_callback) {}
|
|
17929
|
-
}
|
|
17930
|
-
exports.NoopMeter = NoopMeter;
|
|
17931
|
-
|
|
17932
|
-
class NoopMetric {
|
|
17933
|
-
}
|
|
17934
|
-
exports.NoopMetric = NoopMetric;
|
|
17935
|
-
|
|
17936
|
-
class NoopCounterMetric extends NoopMetric {
|
|
17937
|
-
add(_value, _attributes) {}
|
|
17938
|
-
}
|
|
17939
|
-
exports.NoopCounterMetric = NoopCounterMetric;
|
|
17940
|
-
|
|
17941
|
-
class NoopUpDownCounterMetric extends NoopMetric {
|
|
17942
|
-
add(_value, _attributes) {}
|
|
17943
|
-
}
|
|
17944
|
-
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
17945
|
-
|
|
17946
|
-
class NoopGaugeMetric extends NoopMetric {
|
|
17947
|
-
record(_value, _attributes) {}
|
|
17948
|
-
}
|
|
17949
|
-
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
17950
|
-
|
|
17951
|
-
class NoopHistogramMetric extends NoopMetric {
|
|
17952
|
-
record(_value, _attributes) {}
|
|
17953
|
-
}
|
|
17954
|
-
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
17955
|
-
|
|
17956
|
-
class NoopObservableMetric {
|
|
17957
|
-
addCallback(_callback) {}
|
|
17958
|
-
removeCallback(_callback) {}
|
|
17959
|
-
}
|
|
17960
|
-
exports.NoopObservableMetric = NoopObservableMetric;
|
|
17961
|
-
|
|
17962
|
-
class NoopObservableCounterMetric extends NoopObservableMetric {
|
|
17963
|
-
}
|
|
17964
|
-
exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
|
|
17965
|
-
|
|
17966
|
-
class NoopObservableGaugeMetric extends NoopObservableMetric {
|
|
17967
|
-
}
|
|
17968
|
-
exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
|
|
17969
|
-
|
|
17970
|
-
class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
|
|
17971
|
-
}
|
|
17972
|
-
exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
|
|
17973
|
-
exports.NOOP_METER = new NoopMeter;
|
|
17974
|
-
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
|
|
17975
|
-
exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
|
|
17976
|
-
exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
|
|
17977
|
-
exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
|
|
17978
|
-
exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
|
|
17979
|
-
exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
|
|
17980
|
-
exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
|
|
17981
|
-
function createNoopMeter() {
|
|
17982
|
-
return exports.NOOP_METER;
|
|
17983
|
-
}
|
|
17984
|
-
exports.createNoopMeter = createNoopMeter;
|
|
17985
|
-
});
|
|
17986
|
-
|
|
17987
|
-
// ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
|
|
17988
|
-
var require_Metric = __commonJS((exports) => {
|
|
17989
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17990
|
-
exports.ValueType = undefined;
|
|
17991
|
-
var ValueType;
|
|
17992
|
-
(function(ValueType2) {
|
|
17993
|
-
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
17994
|
-
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
17995
|
-
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
17996
|
-
});
|
|
17997
|
-
|
|
17998
|
-
// ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
|
|
17999
|
-
var require_TextMapPropagator = __commonJS((exports) => {
|
|
18000
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18001
|
-
exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
|
|
18002
|
-
exports.defaultTextMapGetter = {
|
|
18003
|
-
get(carrier, key) {
|
|
18004
|
-
if (carrier == null) {
|
|
18005
|
-
return;
|
|
18006
|
-
}
|
|
18007
|
-
return carrier[key];
|
|
18008
|
-
},
|
|
18009
|
-
keys(carrier) {
|
|
18010
|
-
if (carrier == null) {
|
|
18011
|
-
return [];
|
|
18012
|
-
}
|
|
18013
|
-
return Object.keys(carrier);
|
|
18014
|
-
}
|
|
18015
|
-
};
|
|
18016
|
-
exports.defaultTextMapSetter = {
|
|
18017
|
-
set(carrier, key, value) {
|
|
18018
|
-
if (carrier == null) {
|
|
18019
|
-
return;
|
|
18020
|
-
}
|
|
18021
|
-
carrier[key] = value;
|
|
18022
|
-
}
|
|
18023
|
-
};
|
|
18024
|
-
});
|
|
18025
|
-
|
|
18026
|
-
// ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
|
|
18027
|
-
var require_NoopContextManager = __commonJS((exports) => {
|
|
18028
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18029
|
-
exports.NoopContextManager = undefined;
|
|
18030
|
-
var context_1 = require_context();
|
|
18031
|
-
|
|
18032
|
-
class NoopContextManager {
|
|
18033
|
-
active() {
|
|
18034
|
-
return context_1.ROOT_CONTEXT;
|
|
18035
|
-
}
|
|
18036
|
-
with(_context, fn, thisArg, ...args) {
|
|
18037
|
-
return fn.call(thisArg, ...args);
|
|
18038
|
-
}
|
|
18039
|
-
bind(_context, target) {
|
|
18040
|
-
return target;
|
|
18041
|
-
}
|
|
18042
|
-
enable() {
|
|
18043
|
-
return this;
|
|
18044
|
-
}
|
|
18045
|
-
disable() {
|
|
18046
|
-
return this;
|
|
18047
|
-
}
|
|
18048
|
-
}
|
|
18049
|
-
exports.NoopContextManager = NoopContextManager;
|
|
18050
|
-
});
|
|
18051
|
-
|
|
18052
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/context.js
|
|
18053
|
-
var require_context2 = __commonJS((exports) => {
|
|
18054
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18055
|
-
exports.ContextAPI = undefined;
|
|
18056
|
-
var NoopContextManager_1 = require_NoopContextManager();
|
|
18057
|
-
var global_utils_1 = require_global_utils();
|
|
18058
|
-
var diag_1 = require_diag();
|
|
18059
|
-
var API_NAME = "context";
|
|
18060
|
-
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
18061
|
-
|
|
18062
|
-
class ContextAPI {
|
|
18063
|
-
constructor() {}
|
|
18064
|
-
static getInstance() {
|
|
18065
|
-
if (!this._instance) {
|
|
18066
|
-
this._instance = new ContextAPI;
|
|
18067
|
-
}
|
|
18068
|
-
return this._instance;
|
|
18069
|
-
}
|
|
18070
|
-
setGlobalContextManager(contextManager) {
|
|
18071
|
-
return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
|
|
18072
|
-
}
|
|
18073
|
-
active() {
|
|
18074
|
-
return this._getContextManager().active();
|
|
18075
|
-
}
|
|
18076
|
-
with(context, fn, thisArg, ...args) {
|
|
18077
|
-
return this._getContextManager().with(context, fn, thisArg, ...args);
|
|
18078
|
-
}
|
|
18079
|
-
bind(context, target) {
|
|
18080
|
-
return this._getContextManager().bind(context, target);
|
|
18081
|
-
}
|
|
18082
|
-
_getContextManager() {
|
|
18083
|
-
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
|
|
18084
|
-
}
|
|
18085
|
-
disable() {
|
|
18086
|
-
this._getContextManager().disable();
|
|
18087
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18088
|
-
}
|
|
18089
|
-
}
|
|
18090
|
-
exports.ContextAPI = ContextAPI;
|
|
18091
|
-
});
|
|
18092
|
-
|
|
18093
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
|
|
18094
|
-
var require_trace_flags = __commonJS((exports) => {
|
|
18095
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18096
|
-
exports.TraceFlags = undefined;
|
|
18097
|
-
var TraceFlags;
|
|
18098
|
-
(function(TraceFlags2) {
|
|
18099
|
-
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
18100
|
-
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
18101
|
-
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
|
|
18102
|
-
});
|
|
18103
|
-
|
|
18104
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
|
|
18105
|
-
var require_invalid_span_constants = __commonJS((exports) => {
|
|
18106
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18107
|
-
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
|
|
18108
|
-
var trace_flags_1 = require_trace_flags();
|
|
18109
|
-
exports.INVALID_SPANID = "0000000000000000";
|
|
18110
|
-
exports.INVALID_TRACEID = "00000000000000000000000000000000";
|
|
18111
|
-
exports.INVALID_SPAN_CONTEXT = {
|
|
18112
|
-
traceId: exports.INVALID_TRACEID,
|
|
18113
|
-
spanId: exports.INVALID_SPANID,
|
|
18114
|
-
traceFlags: trace_flags_1.TraceFlags.NONE
|
|
18115
|
-
};
|
|
18116
|
-
});
|
|
18117
|
-
|
|
18118
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
|
|
18119
|
-
var require_NonRecordingSpan = __commonJS((exports) => {
|
|
18120
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18121
|
-
exports.NonRecordingSpan = undefined;
|
|
18122
|
-
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18123
|
-
|
|
18124
|
-
class NonRecordingSpan {
|
|
18125
|
-
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
18126
|
-
this._spanContext = spanContext;
|
|
18127
|
-
}
|
|
18128
|
-
spanContext() {
|
|
18129
|
-
return this._spanContext;
|
|
18130
|
-
}
|
|
18131
|
-
setAttribute(_key, _value) {
|
|
18132
|
-
return this;
|
|
18133
|
-
}
|
|
18134
|
-
setAttributes(_attributes) {
|
|
18135
|
-
return this;
|
|
18136
|
-
}
|
|
18137
|
-
addEvent(_name, _attributes) {
|
|
18138
|
-
return this;
|
|
18139
|
-
}
|
|
18140
|
-
addLink(_link) {
|
|
18141
|
-
return this;
|
|
18142
|
-
}
|
|
18143
|
-
addLinks(_links) {
|
|
18144
|
-
return this;
|
|
18145
|
-
}
|
|
18146
|
-
setStatus(_status) {
|
|
18147
|
-
return this;
|
|
18148
|
-
}
|
|
18149
|
-
updateName(_name) {
|
|
18150
|
-
return this;
|
|
18151
|
-
}
|
|
18152
|
-
end(_endTime) {}
|
|
18153
|
-
isRecording() {
|
|
18154
|
-
return false;
|
|
18155
|
-
}
|
|
18156
|
-
recordException(_exception, _time) {}
|
|
18157
|
-
}
|
|
18158
|
-
exports.NonRecordingSpan = NonRecordingSpan;
|
|
18159
|
-
});
|
|
18160
|
-
|
|
18161
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
|
|
18162
|
-
var require_context_utils = __commonJS((exports) => {
|
|
18163
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18164
|
-
exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
|
|
18165
|
-
var context_1 = require_context();
|
|
18166
|
-
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18167
|
-
var context_2 = require_context2();
|
|
18168
|
-
var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
|
|
18169
|
-
function getSpan(context) {
|
|
18170
|
-
return context.getValue(SPAN_KEY) || undefined;
|
|
18171
|
-
}
|
|
18172
|
-
exports.getSpan = getSpan;
|
|
18173
|
-
function getActiveSpan() {
|
|
18174
|
-
return getSpan(context_2.ContextAPI.getInstance().active());
|
|
18175
|
-
}
|
|
18176
|
-
exports.getActiveSpan = getActiveSpan;
|
|
18177
|
-
function setSpan(context, span) {
|
|
18178
|
-
return context.setValue(SPAN_KEY, span);
|
|
18179
|
-
}
|
|
18180
|
-
exports.setSpan = setSpan;
|
|
18181
|
-
function deleteSpan(context) {
|
|
18182
|
-
return context.deleteValue(SPAN_KEY);
|
|
18183
|
-
}
|
|
18184
|
-
exports.deleteSpan = deleteSpan;
|
|
18185
|
-
function setSpanContext(context, spanContext) {
|
|
18186
|
-
return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
|
|
18187
|
-
}
|
|
18188
|
-
exports.setSpanContext = setSpanContext;
|
|
18189
|
-
function getSpanContext(context) {
|
|
18190
|
-
var _a3;
|
|
18191
|
-
return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
|
|
18192
|
-
}
|
|
18193
|
-
exports.getSpanContext = getSpanContext;
|
|
18194
|
-
});
|
|
18195
|
-
|
|
18196
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
|
|
18197
|
-
var require_spancontext_utils = __commonJS((exports) => {
|
|
18198
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18199
|
-
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
|
|
18200
|
-
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18201
|
-
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18202
|
-
var isHex = new Uint8Array([
|
|
18203
|
-
0,
|
|
18204
|
-
0,
|
|
18205
|
-
0,
|
|
18206
|
-
0,
|
|
18207
|
-
0,
|
|
18208
|
-
0,
|
|
18209
|
-
0,
|
|
18210
|
-
0,
|
|
18211
|
-
0,
|
|
18212
|
-
0,
|
|
18213
|
-
0,
|
|
18214
|
-
0,
|
|
18215
|
-
0,
|
|
18216
|
-
0,
|
|
18217
|
-
0,
|
|
18218
|
-
0,
|
|
18219
|
-
0,
|
|
18220
|
-
0,
|
|
18221
|
-
0,
|
|
18222
|
-
0,
|
|
18223
|
-
0,
|
|
18224
|
-
0,
|
|
18225
|
-
0,
|
|
18226
|
-
0,
|
|
18227
|
-
0,
|
|
18228
|
-
0,
|
|
18229
|
-
0,
|
|
18230
|
-
0,
|
|
18231
|
-
0,
|
|
18232
|
-
0,
|
|
18233
|
-
0,
|
|
18234
|
-
0,
|
|
18235
|
-
0,
|
|
18236
|
-
0,
|
|
18237
|
-
0,
|
|
18238
|
-
0,
|
|
18239
|
-
0,
|
|
18240
|
-
0,
|
|
18241
|
-
0,
|
|
18242
|
-
0,
|
|
18243
|
-
0,
|
|
18244
|
-
0,
|
|
18245
|
-
0,
|
|
18246
|
-
0,
|
|
18247
|
-
0,
|
|
18248
|
-
0,
|
|
18249
|
-
0,
|
|
18250
|
-
0,
|
|
18251
|
-
1,
|
|
18252
|
-
1,
|
|
18253
|
-
1,
|
|
18254
|
-
1,
|
|
18255
|
-
1,
|
|
18256
|
-
1,
|
|
18257
|
-
1,
|
|
18258
|
-
1,
|
|
18259
|
-
1,
|
|
18260
|
-
1,
|
|
18261
|
-
0,
|
|
18262
|
-
0,
|
|
18263
|
-
0,
|
|
18264
|
-
0,
|
|
18265
|
-
0,
|
|
18266
|
-
0,
|
|
18267
|
-
0,
|
|
18268
|
-
1,
|
|
18269
|
-
1,
|
|
18270
|
-
1,
|
|
18271
|
-
1,
|
|
18272
|
-
1,
|
|
18273
|
-
1,
|
|
18274
|
-
0,
|
|
18275
|
-
0,
|
|
18276
|
-
0,
|
|
18277
|
-
0,
|
|
18278
|
-
0,
|
|
18279
|
-
0,
|
|
18280
|
-
0,
|
|
18281
|
-
0,
|
|
18282
|
-
0,
|
|
18283
|
-
0,
|
|
18284
|
-
0,
|
|
18285
|
-
0,
|
|
18286
|
-
0,
|
|
18287
|
-
0,
|
|
18288
|
-
0,
|
|
18289
|
-
0,
|
|
18290
|
-
0,
|
|
18291
|
-
0,
|
|
18292
|
-
0,
|
|
18293
|
-
0,
|
|
18294
|
-
0,
|
|
18295
|
-
0,
|
|
18296
|
-
0,
|
|
18297
|
-
0,
|
|
18298
|
-
0,
|
|
18299
|
-
0,
|
|
18300
|
-
1,
|
|
18301
|
-
1,
|
|
18302
|
-
1,
|
|
18303
|
-
1,
|
|
18304
|
-
1,
|
|
18305
|
-
1
|
|
18306
|
-
]);
|
|
18307
|
-
function isValidHex(id, length) {
|
|
18308
|
-
if (typeof id !== "string" || id.length !== length)
|
|
18309
|
-
return false;
|
|
18310
|
-
let r = 0;
|
|
18311
|
-
for (let i = 0;i < id.length; i += 4) {
|
|
18312
|
-
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
18313
|
-
}
|
|
18314
|
-
return r === length;
|
|
18315
|
-
}
|
|
18316
|
-
function isValidTraceId(traceId) {
|
|
18317
|
-
return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
18318
|
-
}
|
|
18319
|
-
exports.isValidTraceId = isValidTraceId;
|
|
18320
|
-
function isValidSpanId(spanId) {
|
|
18321
|
-
return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
18322
|
-
}
|
|
18323
|
-
exports.isValidSpanId = isValidSpanId;
|
|
18324
|
-
function isSpanContextValid(spanContext) {
|
|
18325
|
-
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
18326
|
-
}
|
|
18327
|
-
exports.isSpanContextValid = isSpanContextValid;
|
|
18328
|
-
function wrapSpanContext(spanContext) {
|
|
18329
|
-
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
|
|
18330
|
-
}
|
|
18331
|
-
exports.wrapSpanContext = wrapSpanContext;
|
|
18332
|
-
});
|
|
18333
|
-
|
|
18334
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
|
|
18335
|
-
var require_NoopTracer = __commonJS((exports) => {
|
|
18336
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18337
|
-
exports.NoopTracer = undefined;
|
|
18338
|
-
var context_1 = require_context2();
|
|
18339
|
-
var context_utils_1 = require_context_utils();
|
|
18340
|
-
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18341
|
-
var spancontext_utils_1 = require_spancontext_utils();
|
|
18342
|
-
var contextApi = context_1.ContextAPI.getInstance();
|
|
18343
|
-
|
|
18344
|
-
class NoopTracer {
|
|
18345
|
-
startSpan(name, options, context = contextApi.active()) {
|
|
18346
|
-
const root = Boolean(options === null || options === undefined ? undefined : options.root);
|
|
18347
|
-
if (root) {
|
|
18348
|
-
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18349
|
-
}
|
|
18350
|
-
const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
|
|
18351
|
-
if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
|
|
18352
|
-
return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
|
|
18353
|
-
} else {
|
|
18354
|
-
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18355
|
-
}
|
|
18356
|
-
}
|
|
18357
|
-
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18358
|
-
let opts;
|
|
18359
|
-
let ctx;
|
|
18360
|
-
let fn;
|
|
18361
|
-
if (arguments.length < 2) {
|
|
18362
|
-
return;
|
|
18363
|
-
} else if (arguments.length === 2) {
|
|
18364
|
-
fn = arg2;
|
|
18365
|
-
} else if (arguments.length === 3) {
|
|
18366
|
-
opts = arg2;
|
|
18367
|
-
fn = arg3;
|
|
18368
|
-
} else {
|
|
18369
|
-
opts = arg2;
|
|
18370
|
-
ctx = arg3;
|
|
18371
|
-
fn = arg4;
|
|
18372
|
-
}
|
|
18373
|
-
const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
|
|
18374
|
-
const span = this.startSpan(name, opts, parentContext);
|
|
18375
|
-
const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
|
|
18376
|
-
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
18377
|
-
}
|
|
18378
|
-
}
|
|
18379
|
-
exports.NoopTracer = NoopTracer;
|
|
18380
|
-
function isSpanContext(spanContext) {
|
|
18381
|
-
return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
|
|
18382
|
-
}
|
|
18383
|
-
});
|
|
18384
|
-
|
|
18385
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
|
|
18386
|
-
var require_ProxyTracer = __commonJS((exports) => {
|
|
18387
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18388
|
-
exports.ProxyTracer = undefined;
|
|
18389
|
-
var NoopTracer_1 = require_NoopTracer();
|
|
18390
|
-
var NOOP_TRACER = new NoopTracer_1.NoopTracer;
|
|
18391
|
-
|
|
18392
|
-
class ProxyTracer {
|
|
18393
|
-
constructor(provider, name, version2, options) {
|
|
18394
|
-
this._provider = provider;
|
|
18395
|
-
this.name = name;
|
|
18396
|
-
this.version = version2;
|
|
18397
|
-
this.options = options;
|
|
18398
|
-
}
|
|
18399
|
-
startSpan(name, options, context) {
|
|
18400
|
-
return this._getTracer().startSpan(name, options, context);
|
|
18401
|
-
}
|
|
18402
|
-
startActiveSpan(_name, _options, _context, _fn) {
|
|
18403
|
-
const tracer = this._getTracer();
|
|
18404
|
-
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18405
|
-
}
|
|
18406
|
-
_getTracer() {
|
|
18407
|
-
if (this._delegate) {
|
|
18408
|
-
return this._delegate;
|
|
18409
|
-
}
|
|
18410
|
-
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18411
|
-
if (!tracer) {
|
|
18412
|
-
return NOOP_TRACER;
|
|
18413
|
-
}
|
|
18414
|
-
this._delegate = tracer;
|
|
18415
|
-
return this._delegate;
|
|
18416
|
-
}
|
|
18417
|
-
}
|
|
18418
|
-
exports.ProxyTracer = ProxyTracer;
|
|
18419
|
-
});
|
|
18420
|
-
|
|
18421
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
|
|
18422
|
-
var require_NoopTracerProvider = __commonJS((exports) => {
|
|
18423
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18424
|
-
exports.NoopTracerProvider = undefined;
|
|
18425
|
-
var NoopTracer_1 = require_NoopTracer();
|
|
18426
|
-
|
|
18427
|
-
class NoopTracerProvider {
|
|
18428
|
-
getTracer(_name, _version, _options) {
|
|
18429
|
-
return new NoopTracer_1.NoopTracer;
|
|
18430
|
-
}
|
|
18431
|
-
}
|
|
18432
|
-
exports.NoopTracerProvider = NoopTracerProvider;
|
|
18433
|
-
});
|
|
18434
|
-
|
|
18435
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
|
|
18436
|
-
var require_ProxyTracerProvider = __commonJS((exports) => {
|
|
18437
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18438
|
-
exports.ProxyTracerProvider = undefined;
|
|
18439
|
-
var ProxyTracer_1 = require_ProxyTracer();
|
|
18440
|
-
var NoopTracerProvider_1 = require_NoopTracerProvider();
|
|
18441
|
-
var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
|
|
18442
|
-
|
|
18443
|
-
class ProxyTracerProvider {
|
|
18444
|
-
getTracer(name, version2, options) {
|
|
18445
|
-
var _a3;
|
|
18446
|
-
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
|
|
18447
|
-
}
|
|
18448
|
-
getDelegate() {
|
|
18449
|
-
var _a3;
|
|
18450
|
-
return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18451
|
-
}
|
|
18452
|
-
setDelegate(delegate) {
|
|
18453
|
-
this._delegate = delegate;
|
|
18454
|
-
}
|
|
18455
|
-
getDelegateTracer(name, version2, options) {
|
|
18456
|
-
var _a3;
|
|
18457
|
-
return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
|
|
18458
|
-
}
|
|
18459
|
-
}
|
|
18460
|
-
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
18461
|
-
});
|
|
18462
|
-
|
|
18463
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
|
|
18464
|
-
var require_SamplingResult = __commonJS((exports) => {
|
|
18465
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18466
|
-
exports.SamplingDecision = undefined;
|
|
18467
|
-
var SamplingDecision;
|
|
18468
|
-
(function(SamplingDecision2) {
|
|
18469
|
-
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18470
|
-
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
18471
|
-
SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
18472
|
-
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
18473
|
-
});
|
|
18474
|
-
|
|
18475
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
|
|
18476
|
-
var require_span_kind = __commonJS((exports) => {
|
|
18477
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18478
|
-
exports.SpanKind = undefined;
|
|
18479
|
-
var SpanKind;
|
|
18480
|
-
(function(SpanKind2) {
|
|
18481
|
-
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18482
|
-
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
18483
|
-
SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
|
|
18484
|
-
SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
|
|
18485
|
-
SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
|
|
18486
|
-
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
|
18487
|
-
});
|
|
18488
|
-
|
|
18489
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/status.js
|
|
18490
|
-
var require_status = __commonJS((exports) => {
|
|
18491
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18492
|
-
exports.SpanStatusCode = undefined;
|
|
18493
|
-
var SpanStatusCode;
|
|
18494
|
-
(function(SpanStatusCode2) {
|
|
18495
|
-
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18496
|
-
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
18497
|
-
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
18498
|
-
})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
|
|
18499
|
-
});
|
|
18500
|
-
|
|
18501
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
|
|
18502
|
-
var require_tracestate_validators = __commonJS((exports) => {
|
|
18503
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18504
|
-
exports.validateValue = exports.validateKey = undefined;
|
|
18505
|
-
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18506
|
-
var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18507
|
-
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18508
|
-
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18509
|
-
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18510
|
-
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18511
|
-
function validateKey(key) {
|
|
18512
|
-
return VALID_KEY_REGEX.test(key);
|
|
18513
|
-
}
|
|
18514
|
-
exports.validateKey = validateKey;
|
|
18515
|
-
function validateValue(value) {
|
|
18516
|
-
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
18517
|
-
}
|
|
18518
|
-
exports.validateValue = validateValue;
|
|
18519
|
-
});
|
|
18520
|
-
|
|
18521
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
|
|
18522
|
-
var require_tracestate_impl = __commonJS((exports) => {
|
|
18523
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18524
|
-
exports.TraceStateImpl = undefined;
|
|
18525
|
-
var tracestate_validators_1 = require_tracestate_validators();
|
|
18526
|
-
var MAX_TRACE_STATE_ITEMS = 32;
|
|
18527
|
-
var MAX_TRACE_STATE_LEN = 512;
|
|
18528
|
-
var LIST_MEMBERS_SEPARATOR = ",";
|
|
18529
|
-
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18530
|
-
|
|
18531
|
-
class TraceStateImpl {
|
|
18532
|
-
constructor(rawTraceState) {
|
|
18533
|
-
this._internalState = new Map;
|
|
18534
|
-
if (rawTraceState)
|
|
18535
|
-
this._parse(rawTraceState);
|
|
18536
|
-
}
|
|
18537
|
-
set(key, value) {
|
|
18538
|
-
const traceState = this._clone();
|
|
18539
|
-
if (traceState._internalState.has(key)) {
|
|
18540
|
-
traceState._internalState.delete(key);
|
|
18541
|
-
}
|
|
18542
|
-
traceState._internalState.set(key, value);
|
|
18543
|
-
return traceState;
|
|
18544
|
-
}
|
|
18545
|
-
unset(key) {
|
|
18546
|
-
const traceState = this._clone();
|
|
18547
|
-
traceState._internalState.delete(key);
|
|
18548
|
-
return traceState;
|
|
18549
|
-
}
|
|
18550
|
-
get(key) {
|
|
18551
|
-
return this._internalState.get(key);
|
|
18552
|
-
}
|
|
18553
|
-
serialize() {
|
|
18554
|
-
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18555
|
-
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18556
|
-
return agg;
|
|
18557
|
-
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18558
|
-
}
|
|
18559
|
-
_parse(rawTraceState) {
|
|
18560
|
-
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18561
|
-
return;
|
|
18562
|
-
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18563
|
-
const listMember = part.trim();
|
|
18564
|
-
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18565
|
-
if (i !== -1) {
|
|
18566
|
-
const key = listMember.slice(0, i);
|
|
18567
|
-
const value = listMember.slice(i + 1, part.length);
|
|
18568
|
-
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
18569
|
-
agg.set(key, value);
|
|
18570
|
-
}
|
|
18571
|
-
}
|
|
18572
|
-
return agg;
|
|
18573
|
-
}, new Map);
|
|
18574
|
-
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18575
|
-
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18576
|
-
}
|
|
18577
|
-
}
|
|
18578
|
-
_keys() {
|
|
18579
|
-
return Array.from(this._internalState.keys()).reverse();
|
|
18580
|
-
}
|
|
18581
|
-
_clone() {
|
|
18582
|
-
const traceState = new TraceStateImpl;
|
|
18583
|
-
traceState._internalState = new Map(this._internalState);
|
|
18584
|
-
return traceState;
|
|
18585
|
-
}
|
|
18586
|
-
}
|
|
18587
|
-
exports.TraceStateImpl = TraceStateImpl;
|
|
18588
|
-
});
|
|
18589
|
-
|
|
18590
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
|
|
18591
|
-
var require_utils2 = __commonJS((exports) => {
|
|
18592
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18593
|
-
exports.createTraceState = undefined;
|
|
18594
|
-
var tracestate_impl_1 = require_tracestate_impl();
|
|
18595
|
-
function createTraceState(rawTraceState) {
|
|
18596
|
-
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
18597
|
-
}
|
|
18598
|
-
exports.createTraceState = createTraceState;
|
|
18599
|
-
});
|
|
18600
|
-
|
|
18601
|
-
// ../../node_modules/@opentelemetry/api/build/src/context-api.js
|
|
18602
|
-
var require_context_api = __commonJS((exports) => {
|
|
18603
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18604
|
-
exports.context = undefined;
|
|
18605
|
-
var context_1 = require_context2();
|
|
18606
|
-
exports.context = context_1.ContextAPI.getInstance();
|
|
18607
|
-
});
|
|
18608
|
-
|
|
18609
|
-
// ../../node_modules/@opentelemetry/api/build/src/diag-api.js
|
|
18610
|
-
var require_diag_api = __commonJS((exports) => {
|
|
18611
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18612
|
-
exports.diag = undefined;
|
|
18613
|
-
var diag_1 = require_diag();
|
|
18614
|
-
exports.diag = diag_1.DiagAPI.instance();
|
|
18615
|
-
});
|
|
18616
|
-
|
|
18617
|
-
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
|
|
18618
|
-
var require_NoopMeterProvider = __commonJS((exports) => {
|
|
18619
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18620
|
-
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
|
|
18621
|
-
var NoopMeter_1 = require_NoopMeter();
|
|
18622
|
-
|
|
18623
|
-
class NoopMeterProvider {
|
|
18624
|
-
getMeter(_name, _version, _options) {
|
|
18625
|
-
return NoopMeter_1.NOOP_METER;
|
|
18626
|
-
}
|
|
18627
|
-
}
|
|
18628
|
-
exports.NoopMeterProvider = NoopMeterProvider;
|
|
18629
|
-
exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
|
|
18630
|
-
});
|
|
18631
|
-
|
|
18632
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
|
|
18633
|
-
var require_metrics = __commonJS((exports) => {
|
|
18634
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18635
|
-
exports.MetricsAPI = undefined;
|
|
18636
|
-
var NoopMeterProvider_1 = require_NoopMeterProvider();
|
|
18637
|
-
var global_utils_1 = require_global_utils();
|
|
18638
|
-
var diag_1 = require_diag();
|
|
18639
|
-
var API_NAME = "metrics";
|
|
18640
|
-
|
|
18641
|
-
class MetricsAPI {
|
|
18642
|
-
constructor() {}
|
|
18643
|
-
static getInstance() {
|
|
18644
|
-
if (!this._instance) {
|
|
18645
|
-
this._instance = new MetricsAPI;
|
|
18646
|
-
}
|
|
18647
|
-
return this._instance;
|
|
18648
|
-
}
|
|
18649
|
-
setGlobalMeterProvider(provider) {
|
|
18650
|
-
return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
|
|
18651
|
-
}
|
|
18652
|
-
getMeterProvider() {
|
|
18653
|
-
return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
|
|
18654
|
-
}
|
|
18655
|
-
getMeter(name, version2, options) {
|
|
18656
|
-
return this.getMeterProvider().getMeter(name, version2, options);
|
|
18657
|
-
}
|
|
18658
|
-
disable() {
|
|
18659
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18660
|
-
}
|
|
18661
|
-
}
|
|
18662
|
-
exports.MetricsAPI = MetricsAPI;
|
|
18663
|
-
});
|
|
18664
|
-
|
|
18665
|
-
// ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
|
|
18666
|
-
var require_metrics_api = __commonJS((exports) => {
|
|
18667
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18668
|
-
exports.metrics = undefined;
|
|
18669
|
-
var metrics_1 = require_metrics();
|
|
18670
|
-
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
18671
|
-
});
|
|
18672
|
-
|
|
18673
|
-
// ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
|
|
18674
|
-
var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
18675
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18676
|
-
exports.NoopTextMapPropagator = undefined;
|
|
18677
|
-
|
|
18678
|
-
class NoopTextMapPropagator {
|
|
18679
|
-
inject(_context, _carrier) {}
|
|
18680
|
-
extract(context, _carrier) {
|
|
18681
|
-
return context;
|
|
18682
|
-
}
|
|
18683
|
-
fields() {
|
|
18684
|
-
return [];
|
|
18685
|
-
}
|
|
18686
|
-
}
|
|
18687
|
-
exports.NoopTextMapPropagator = NoopTextMapPropagator;
|
|
18688
|
-
});
|
|
18689
|
-
|
|
18690
|
-
// ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
|
|
18691
|
-
var require_context_helpers = __commonJS((exports) => {
|
|
18692
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18693
|
-
exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
|
|
18694
|
-
var context_1 = require_context2();
|
|
18695
|
-
var context_2 = require_context();
|
|
18696
|
-
var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
|
|
18697
|
-
function getBaggage(context) {
|
|
18698
|
-
return context.getValue(BAGGAGE_KEY) || undefined;
|
|
18699
|
-
}
|
|
18700
|
-
exports.getBaggage = getBaggage;
|
|
18701
|
-
function getActiveBaggage() {
|
|
18702
|
-
return getBaggage(context_1.ContextAPI.getInstance().active());
|
|
18703
|
-
}
|
|
18704
|
-
exports.getActiveBaggage = getActiveBaggage;
|
|
18705
|
-
function setBaggage(context, baggage) {
|
|
18706
|
-
return context.setValue(BAGGAGE_KEY, baggage);
|
|
18707
|
-
}
|
|
18708
|
-
exports.setBaggage = setBaggage;
|
|
18709
|
-
function deleteBaggage(context) {
|
|
18710
|
-
return context.deleteValue(BAGGAGE_KEY);
|
|
18711
|
-
}
|
|
18712
|
-
exports.deleteBaggage = deleteBaggage;
|
|
18713
|
-
});
|
|
18714
|
-
|
|
18715
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
|
|
18716
|
-
var require_propagation = __commonJS((exports) => {
|
|
18717
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18718
|
-
exports.PropagationAPI = undefined;
|
|
18719
|
-
var global_utils_1 = require_global_utils();
|
|
18720
|
-
var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
|
|
18721
|
-
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18722
|
-
var context_helpers_1 = require_context_helpers();
|
|
18723
|
-
var utils_1 = require_utils();
|
|
18724
|
-
var diag_1 = require_diag();
|
|
18725
|
-
var API_NAME = "propagation";
|
|
18726
|
-
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
|
|
18727
|
-
|
|
18728
|
-
class PropagationAPI {
|
|
18729
|
-
constructor() {
|
|
18730
|
-
this.createBaggage = utils_1.createBaggage;
|
|
18731
|
-
this.getBaggage = context_helpers_1.getBaggage;
|
|
18732
|
-
this.getActiveBaggage = context_helpers_1.getActiveBaggage;
|
|
18733
|
-
this.setBaggage = context_helpers_1.setBaggage;
|
|
18734
|
-
this.deleteBaggage = context_helpers_1.deleteBaggage;
|
|
18735
|
-
}
|
|
18736
|
-
static getInstance() {
|
|
18737
|
-
if (!this._instance) {
|
|
18738
|
-
this._instance = new PropagationAPI;
|
|
18739
|
-
}
|
|
18740
|
-
return this._instance;
|
|
18741
|
-
}
|
|
18742
|
-
setGlobalPropagator(propagator) {
|
|
18743
|
-
return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
|
|
18744
|
-
}
|
|
18745
|
-
inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
|
|
18746
|
-
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
18747
|
-
}
|
|
18748
|
-
extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
|
|
18749
|
-
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
18750
|
-
}
|
|
18751
|
-
fields() {
|
|
18752
|
-
return this._getGlobalPropagator().fields();
|
|
18753
|
-
}
|
|
18754
|
-
disable() {
|
|
18755
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18756
|
-
}
|
|
18757
|
-
_getGlobalPropagator() {
|
|
18758
|
-
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18759
|
-
}
|
|
18760
|
-
}
|
|
18761
|
-
exports.PropagationAPI = PropagationAPI;
|
|
18762
|
-
});
|
|
18763
|
-
|
|
18764
|
-
// ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
|
|
18765
|
-
var require_propagation_api = __commonJS((exports) => {
|
|
18766
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18767
|
-
exports.propagation = undefined;
|
|
18768
|
-
var propagation_1 = require_propagation();
|
|
18769
|
-
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
18770
|
-
});
|
|
18771
|
-
|
|
18772
|
-
// ../../node_modules/@opentelemetry/api/build/src/api/trace.js
|
|
18773
|
-
var require_trace = __commonJS((exports) => {
|
|
18774
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18775
|
-
exports.TraceAPI = undefined;
|
|
18776
|
-
var global_utils_1 = require_global_utils();
|
|
18777
|
-
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18778
|
-
var spancontext_utils_1 = require_spancontext_utils();
|
|
18779
|
-
var context_utils_1 = require_context_utils();
|
|
18780
|
-
var diag_1 = require_diag();
|
|
18781
|
-
var API_NAME = "trace";
|
|
18782
|
-
|
|
18783
|
-
class TraceAPI {
|
|
18784
|
-
constructor() {
|
|
18785
|
-
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18786
|
-
this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
|
|
18787
|
-
this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
|
|
18788
|
-
this.deleteSpan = context_utils_1.deleteSpan;
|
|
18789
|
-
this.getSpan = context_utils_1.getSpan;
|
|
18790
|
-
this.getActiveSpan = context_utils_1.getActiveSpan;
|
|
18791
|
-
this.getSpanContext = context_utils_1.getSpanContext;
|
|
18792
|
-
this.setSpan = context_utils_1.setSpan;
|
|
18793
|
-
this.setSpanContext = context_utils_1.setSpanContext;
|
|
18794
|
-
}
|
|
18795
|
-
static getInstance() {
|
|
18796
|
-
if (!this._instance) {
|
|
18797
|
-
this._instance = new TraceAPI;
|
|
18798
|
-
}
|
|
18799
|
-
return this._instance;
|
|
18800
|
-
}
|
|
18801
|
-
setGlobalTracerProvider(provider) {
|
|
18802
|
-
const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
|
|
18803
|
-
if (success3) {
|
|
18804
|
-
this._proxyTracerProvider.setDelegate(provider);
|
|
18805
|
-
}
|
|
18806
|
-
return success3;
|
|
18807
|
-
}
|
|
18808
|
-
getTracerProvider() {
|
|
18809
|
-
return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
|
|
18810
|
-
}
|
|
18811
|
-
getTracer(name, version2) {
|
|
18812
|
-
return this.getTracerProvider().getTracer(name, version2);
|
|
18813
|
-
}
|
|
18814
|
-
disable() {
|
|
18815
|
-
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18816
|
-
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18817
|
-
}
|
|
18818
|
-
}
|
|
18819
|
-
exports.TraceAPI = TraceAPI;
|
|
18820
|
-
});
|
|
18821
|
-
|
|
18822
|
-
// ../../node_modules/@opentelemetry/api/build/src/trace-api.js
|
|
18823
|
-
var require_trace_api = __commonJS((exports) => {
|
|
18824
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18825
|
-
exports.trace = undefined;
|
|
18826
|
-
var trace_1 = require_trace();
|
|
18827
|
-
exports.trace = trace_1.TraceAPI.getInstance();
|
|
18828
|
-
});
|
|
18829
|
-
|
|
18830
|
-
// ../../node_modules/@opentelemetry/api/build/src/index.js
|
|
18831
|
-
var require_src = __commonJS((exports) => {
|
|
18832
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18833
|
-
exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = undefined;
|
|
18834
|
-
var utils_1 = require_utils();
|
|
18835
|
-
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
|
|
18836
|
-
return utils_1.baggageEntryMetadataFromString;
|
|
18837
|
-
} });
|
|
18838
|
-
var context_1 = require_context();
|
|
18839
|
-
Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
|
|
18840
|
-
return context_1.createContextKey;
|
|
18841
|
-
} });
|
|
18842
|
-
Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
|
|
18843
|
-
return context_1.ROOT_CONTEXT;
|
|
18844
|
-
} });
|
|
18845
|
-
var consoleLogger_1 = require_consoleLogger();
|
|
18846
|
-
Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
|
|
18847
|
-
return consoleLogger_1.DiagConsoleLogger;
|
|
18848
|
-
} });
|
|
18849
|
-
var types_1 = require_types();
|
|
18850
|
-
Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
|
|
18851
|
-
return types_1.DiagLogLevel;
|
|
18852
|
-
} });
|
|
18853
|
-
var NoopMeter_1 = require_NoopMeter();
|
|
18854
|
-
Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
|
|
18855
|
-
return NoopMeter_1.createNoopMeter;
|
|
18856
|
-
} });
|
|
18857
|
-
var Metric_1 = require_Metric();
|
|
18858
|
-
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
|
|
18859
|
-
return Metric_1.ValueType;
|
|
18860
|
-
} });
|
|
18861
|
-
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18862
|
-
Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
|
|
18863
|
-
return TextMapPropagator_1.defaultTextMapGetter;
|
|
18864
|
-
} });
|
|
18865
|
-
Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
|
|
18866
|
-
return TextMapPropagator_1.defaultTextMapSetter;
|
|
18867
|
-
} });
|
|
18868
|
-
var ProxyTracer_1 = require_ProxyTracer();
|
|
18869
|
-
Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
|
|
18870
|
-
return ProxyTracer_1.ProxyTracer;
|
|
18871
|
-
} });
|
|
18872
|
-
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18873
|
-
Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
|
|
18874
|
-
return ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18875
|
-
} });
|
|
18876
|
-
var SamplingResult_1 = require_SamplingResult();
|
|
18877
|
-
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
18878
|
-
return SamplingResult_1.SamplingDecision;
|
|
18879
|
-
} });
|
|
18880
|
-
var span_kind_1 = require_span_kind();
|
|
18881
|
-
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
|
|
18882
|
-
return span_kind_1.SpanKind;
|
|
18883
|
-
} });
|
|
18884
|
-
var status_1 = require_status();
|
|
18885
|
-
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
|
|
18886
|
-
return status_1.SpanStatusCode;
|
|
18887
|
-
} });
|
|
18888
|
-
var trace_flags_1 = require_trace_flags();
|
|
18889
|
-
Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
|
|
18890
|
-
return trace_flags_1.TraceFlags;
|
|
18891
|
-
} });
|
|
18892
|
-
var utils_2 = require_utils2();
|
|
18893
|
-
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
|
|
18894
|
-
return utils_2.createTraceState;
|
|
18895
|
-
} });
|
|
18896
|
-
var spancontext_utils_1 = require_spancontext_utils();
|
|
18897
|
-
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
|
|
18898
|
-
return spancontext_utils_1.isSpanContextValid;
|
|
18899
|
-
} });
|
|
18900
|
-
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
|
|
18901
|
-
return spancontext_utils_1.isValidTraceId;
|
|
18902
|
-
} });
|
|
18903
|
-
Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
|
|
18904
|
-
return spancontext_utils_1.isValidSpanId;
|
|
18905
|
-
} });
|
|
18906
|
-
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18907
|
-
Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
|
|
18908
|
-
return invalid_span_constants_1.INVALID_SPANID;
|
|
18909
|
-
} });
|
|
18910
|
-
Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
|
|
18911
|
-
return invalid_span_constants_1.INVALID_TRACEID;
|
|
18912
|
-
} });
|
|
18913
|
-
Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
|
|
18914
|
-
return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
|
|
18915
|
-
} });
|
|
18916
|
-
var context_api_1 = require_context_api();
|
|
18917
|
-
Object.defineProperty(exports, "context", { enumerable: true, get: function() {
|
|
18918
|
-
return context_api_1.context;
|
|
18919
|
-
} });
|
|
18920
|
-
var diag_api_1 = require_diag_api();
|
|
18921
|
-
Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
|
|
18922
|
-
return diag_api_1.diag;
|
|
18923
|
-
} });
|
|
18924
|
-
var metrics_api_1 = require_metrics_api();
|
|
18925
|
-
Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
|
|
18926
|
-
return metrics_api_1.metrics;
|
|
18927
|
-
} });
|
|
18928
|
-
var propagation_api_1 = require_propagation_api();
|
|
18929
|
-
Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
|
|
18930
|
-
return propagation_api_1.propagation;
|
|
18931
|
-
} });
|
|
18932
|
-
var trace_api_1 = require_trace_api();
|
|
18933
|
-
Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
|
|
18934
|
-
return trace_api_1.trace;
|
|
18935
|
-
} });
|
|
18936
|
-
exports.default = {
|
|
18937
|
-
context: context_api_1.context,
|
|
18938
|
-
diag: diag_api_1.diag,
|
|
18939
|
-
metrics: metrics_api_1.metrics,
|
|
18940
|
-
propagation: propagation_api_1.propagation,
|
|
18941
|
-
trace: trace_api_1.trace
|
|
18942
|
-
};
|
|
18943
|
-
});
|
|
18944
|
-
|
|
18945
|
-
// ../types/src/processor/processor.ts
|
|
18946
|
-
var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
|
|
18947
|
-
var init_processor = __esm(() => {
|
|
18948
|
-
init_zod();
|
|
18949
|
-
init_common();
|
|
18950
|
-
import_api = __toESM(require_src(), 1);
|
|
18951
|
-
noopTracingContext = {
|
|
18952
|
-
traceId: "",
|
|
18953
|
-
getActiveSpan() {
|
|
18954
|
-
return;
|
|
18955
|
-
},
|
|
18956
|
-
async withSpan(_name, _options, fn) {
|
|
18957
|
-
const noopSpan = {
|
|
18958
|
-
spanContext: () => ({
|
|
18959
|
-
traceId: "",
|
|
18960
|
-
spanId: "",
|
|
18961
|
-
traceFlags: 0
|
|
18962
|
-
}),
|
|
18963
|
-
setAttribute: () => noopSpan,
|
|
18964
|
-
setAttributes: () => noopSpan,
|
|
18965
|
-
addEvent: () => noopSpan,
|
|
18966
|
-
addLink: () => noopSpan,
|
|
18967
|
-
addLinks: () => noopSpan,
|
|
18968
|
-
setStatus: () => noopSpan,
|
|
18969
|
-
updateName: () => noopSpan,
|
|
18970
|
-
end: () => {},
|
|
18971
|
-
isRecording: () => false,
|
|
18972
|
-
recordException: () => {}
|
|
18973
|
-
};
|
|
18974
|
-
return fn(noopSpan);
|
|
18975
|
-
}
|
|
18976
|
-
};
|
|
18977
|
-
ProcessorPortSchema = exports_external.object({
|
|
18978
|
-
name: exports_external.string(),
|
|
18979
|
-
schema: JsonSchemaSchema,
|
|
18980
|
-
required: exports_external.boolean().default(true)
|
|
18981
|
-
});
|
|
18982
|
-
ProcessorDefinitionSchema = exports_external.object({
|
|
18983
|
-
id: exports_external.string(),
|
|
18984
|
-
name: exports_external.string(),
|
|
18985
|
-
description: exports_external.string().optional(),
|
|
18986
|
-
inputSchema: JsonSchemaSchema,
|
|
18987
|
-
outputSchema: JsonSchemaSchema,
|
|
18988
|
-
configSchema: JsonSchemaSchema.optional(),
|
|
18989
|
-
inputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18990
|
-
outputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18991
|
-
isBuiltin: exports_external.boolean().default(true),
|
|
18992
|
-
pluginName: exports_external.string().optional()
|
|
18993
|
-
});
|
|
18994
|
-
ProcessorExecutionContextSchema = exports_external.object({
|
|
18995
|
-
jobId: exports_external.string(),
|
|
18996
|
-
stepId: exports_external.string(),
|
|
18997
|
-
tenantId: exports_external.string(),
|
|
18998
|
-
automationId: exports_external.string().optional(),
|
|
18999
|
-
workflowId: exports_external.string(),
|
|
19000
|
-
workerId: exports_external.string().optional()
|
|
19001
|
-
});
|
|
19002
|
-
((TraceStatus2) => {
|
|
19003
|
-
TraceStatus2["PENDING"] = "pending";
|
|
19004
|
-
TraceStatus2["RUNNING"] = "running";
|
|
19005
|
-
TraceStatus2["COMPLETED"] = "completed";
|
|
19006
|
-
TraceStatus2["FAILED"] = "failed";
|
|
19007
|
-
})(TraceStatus ||= {});
|
|
19008
|
-
});
|
|
19009
|
-
|
|
19010
|
-
// ../types/src/processor/execution.ts
|
|
19011
|
-
function asTuple(values) {
|
|
19012
|
-
return values;
|
|
19013
|
-
}
|
|
19014
|
-
var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
|
|
19015
|
-
var init_execution = __esm(() => {
|
|
19016
|
-
init_zod();
|
|
19017
|
-
WorkflowExecutionStatusValue = {
|
|
19018
|
-
CREATED: "created",
|
|
19019
|
-
PENDING: "pending",
|
|
19020
|
-
RUNNING: "running",
|
|
19021
|
-
WAITING: "waiting",
|
|
19022
|
-
COMPLETED: "completed",
|
|
19023
|
-
FAILED: "failed",
|
|
19024
|
-
CANCELLED: "cancelled"
|
|
19025
|
-
};
|
|
19026
|
-
WorkflowExecutionStatusSchema = exports_external.enum([
|
|
19027
|
-
WorkflowExecutionStatusValue.CREATED,
|
|
19028
|
-
WorkflowExecutionStatusValue.PENDING,
|
|
19029
|
-
WorkflowExecutionStatusValue.RUNNING,
|
|
19030
|
-
WorkflowExecutionStatusValue.WAITING,
|
|
19031
|
-
WorkflowExecutionStatusValue.COMPLETED,
|
|
19032
|
-
WorkflowExecutionStatusValue.FAILED,
|
|
19033
|
-
WorkflowExecutionStatusValue.CANCELLED
|
|
19034
|
-
]);
|
|
19035
|
-
StepExecutionStatusValue = {
|
|
19036
|
-
PENDING: "pending",
|
|
19037
|
-
RUNNING: "running",
|
|
19038
|
-
SUCCESS: "success",
|
|
19039
|
-
FAILURE: "failure",
|
|
19040
|
-
WAITING: "waiting",
|
|
19041
|
-
SKIPPED: "skipped"
|
|
19042
|
-
};
|
|
19043
|
-
StepExecutionStatusSchema = exports_external.enum([
|
|
19044
|
-
StepExecutionStatusValue.PENDING,
|
|
19045
|
-
StepExecutionStatusValue.RUNNING,
|
|
19046
|
-
StepExecutionStatusValue.SUCCESS,
|
|
19047
|
-
StepExecutionStatusValue.FAILURE,
|
|
19048
|
-
StepExecutionStatusValue.WAITING,
|
|
19049
|
-
StepExecutionStatusValue.SKIPPED
|
|
19050
|
-
]);
|
|
19051
|
-
TriggerTypeValue = {
|
|
19052
|
-
MANUAL: "manual",
|
|
19053
|
-
API: "api",
|
|
19054
|
-
WEBHOOK: "webhook",
|
|
19055
|
-
SCHEDULE: "schedule",
|
|
19056
|
-
EMAIL: "email",
|
|
19057
|
-
EVAL: "eval",
|
|
19058
|
-
CLI: "cli"
|
|
19059
|
-
};
|
|
19060
|
-
TriggerTypeSchema = exports_external.enum([
|
|
19061
|
-
TriggerTypeValue.MANUAL,
|
|
19062
|
-
TriggerTypeValue.API,
|
|
19063
|
-
TriggerTypeValue.WEBHOOK,
|
|
19064
|
-
TriggerTypeValue.SCHEDULE,
|
|
19065
|
-
TriggerTypeValue.EMAIL,
|
|
19066
|
-
TriggerTypeValue.EVAL,
|
|
19067
|
-
TriggerTypeValue.CLI
|
|
19068
|
-
]);
|
|
19069
|
-
ExecutionTypeValue = {
|
|
19070
|
-
PROD: "prod",
|
|
19071
|
-
EVAL: "eval",
|
|
19072
|
-
PLAYGROUND: "playground"
|
|
19073
|
-
};
|
|
19074
|
-
ExecutionTypeSchema = exports_external.enum([
|
|
19075
|
-
ExecutionTypeValue.PROD,
|
|
19076
|
-
ExecutionTypeValue.EVAL,
|
|
19077
|
-
ExecutionTypeValue.PLAYGROUND
|
|
19078
|
-
]);
|
|
19079
|
-
WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
|
|
19080
|
-
STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
|
|
19081
|
-
TRIGGER_TYPES = TriggerTypeSchema.options;
|
|
19082
|
-
EXECUTION_TYPES = ExecutionTypeSchema.options;
|
|
19083
|
-
});
|
|
19084
|
-
|
|
19085
|
-
// ../types/src/processor/configs/classify.ts
|
|
19086
|
-
var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
|
|
19087
|
-
var init_classify = __esm(() => {
|
|
19088
|
-
init_zod();
|
|
19089
|
-
ClassifyInputSchema = exports_external.object({
|
|
19090
|
-
content: exports_external.string().optional().describe("Text content to classify"),
|
|
19091
|
-
text: exports_external.string().optional().describe("Text content (alternative to content)")
|
|
19092
|
-
}).refine((data) => !!(data.content || data.text), {
|
|
19093
|
-
message: "Either content or text must be provided"
|
|
19094
|
-
});
|
|
19095
|
-
ClassifyLabelSchema = exports_external.object({
|
|
19096
|
-
name: exports_external.string().min(1).describe("Label value returned in output.label"),
|
|
19097
|
-
description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
|
|
19098
|
-
});
|
|
19099
|
-
ClassifyConfigSchema = exports_external.object({
|
|
19100
|
-
labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
|
|
19101
|
-
prompt: exports_external.string().optional().describe("Optional classification instructions appended to the system prompt. Use to clarify edge cases or emphasize evidence the model should weigh."),
|
|
19102
|
-
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
|
|
19103
|
-
model: exports_external.string().optional().describe("Model override"),
|
|
19104
|
-
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
|
|
19105
|
-
});
|
|
19106
|
-
ClassifyOutputSchema = exports_external.object({
|
|
19107
|
-
label: exports_external.string().describe("The selected label name"),
|
|
19108
|
-
confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
|
|
19109
|
-
reason: exports_external.string().describe("Short justification for the chosen label")
|
|
19110
|
-
});
|
|
19111
|
-
});
|
|
19112
|
-
|
|
19113
|
-
// ../types/src/parser/parser.ts
|
|
19114
|
-
function resolveEffectiveMimeType(filename, declaredMimeType) {
|
|
19115
|
-
const ext = filename.split(".").pop()?.toLowerCase();
|
|
19116
|
-
if (!ext)
|
|
19117
|
-
return declaredMimeType;
|
|
19118
|
-
const extensionMime = EXTENSION_TO_MIME[ext];
|
|
19119
|
-
return extensionMime ?? declaredMimeType;
|
|
19120
|
-
}
|
|
19121
|
-
function mimeTypeForExtension(extension) {
|
|
19122
|
-
return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
|
|
19123
|
-
}
|
|
19124
|
-
function extensionForMimeType(mimeType) {
|
|
19125
|
-
const base = mimeType.split(";")[0]?.trim().toLowerCase();
|
|
19126
|
-
return base ? MIME_TO_EXTENSION[base] : undefined;
|
|
19127
|
-
}
|
|
19128
|
-
function getParserCategory(mimeType) {
|
|
19129
|
-
const normalized = mimeType.toLowerCase().trim();
|
|
19130
|
-
if (ParserCategory.PLAINTEXT.includes(normalized)) {
|
|
19131
|
-
return "plaintext";
|
|
19132
|
-
}
|
|
19133
|
-
if (ParserCategory.OFFICE.includes(normalized)) {
|
|
19134
|
-
return "office";
|
|
19135
|
-
}
|
|
19136
|
-
if (ParserCategory.DOCUMENT.includes(normalized)) {
|
|
19137
|
-
return "document";
|
|
19138
|
-
}
|
|
19139
|
-
return null;
|
|
19140
|
-
}
|
|
19141
|
-
function requiresSpecializedParser(mimeType) {
|
|
19142
|
-
return getParserCategory(mimeType) === "document";
|
|
19143
|
-
}
|
|
19144
|
-
function getAllSupportedMimeTypes() {
|
|
19145
|
-
return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
|
|
19146
|
-
}
|
|
19147
|
-
function getSupportedFormatsLabel() {
|
|
19148
|
-
const allMimes = getAllSupportedMimeTypes();
|
|
19149
|
-
const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
|
|
19150
|
-
return labels.join(", ");
|
|
19151
|
-
}
|
|
19152
|
-
var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_EXTENSION, MIME_TO_LABEL;
|
|
19153
|
-
var init_parser = __esm(() => {
|
|
19154
|
-
init_zod();
|
|
19155
|
-
OFFICE_MIME_TYPES = [
|
|
19156
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19157
|
-
"application/msword",
|
|
19158
|
-
"application/vnd.oasis.opendocument.text",
|
|
19159
|
-
"application/rtf",
|
|
19160
|
-
"text/rtf",
|
|
19161
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19162
|
-
"application/vnd.ms-excel",
|
|
19163
|
-
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19164
|
-
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19165
|
-
"application/vnd.oasis.opendocument.spreadsheet",
|
|
19166
|
-
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19167
|
-
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19168
|
-
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19169
|
-
"application/vnd.ms-powerpoint",
|
|
19170
|
-
"application/vnd.oasis.opendocument.presentation",
|
|
19171
|
-
"message/rfc822",
|
|
19172
|
-
"application/vnd.ms-outlook",
|
|
19173
|
-
"application/epub+zip"
|
|
19174
|
-
];
|
|
19175
|
-
ParserCategory = {
|
|
19176
|
-
PLAINTEXT: [
|
|
19177
|
-
"text/plain",
|
|
19178
|
-
"text/markdown",
|
|
19179
|
-
"text/csv",
|
|
19180
|
-
"text/tab-separated-values",
|
|
19181
|
-
"text/html",
|
|
19182
|
-
"text/xml",
|
|
19183
|
-
"application/json",
|
|
19184
|
-
"application/x-yaml",
|
|
19185
|
-
"application/toml",
|
|
19186
|
-
"image/svg+xml",
|
|
19187
|
-
"text/x-rst",
|
|
19188
|
-
"text/x-org",
|
|
19189
|
-
"application/x-latex",
|
|
19190
|
-
"application/x-ipynb+json",
|
|
19191
|
-
"application/x-bibtex",
|
|
19192
|
-
"application/docbook+xml",
|
|
19193
|
-
"application/x-fictionbook+xml"
|
|
19194
|
-
],
|
|
19195
|
-
OFFICE: [...OFFICE_MIME_TYPES],
|
|
19196
|
-
DOCUMENT: [
|
|
19197
|
-
"application/pdf",
|
|
19198
|
-
"image/png",
|
|
19199
|
-
"image/jpeg",
|
|
19200
|
-
"image/webp",
|
|
19201
|
-
"image/tiff",
|
|
19202
|
-
"image/gif",
|
|
19203
|
-
"image/bmp"
|
|
19204
|
-
]
|
|
19205
|
-
};
|
|
19206
|
-
ParserTypeSchema = exports_external.enum([
|
|
19207
|
-
"plaintext",
|
|
19208
|
-
"office",
|
|
19209
|
-
"llm-vision",
|
|
19210
|
-
"ocr"
|
|
19211
|
-
]);
|
|
19212
|
-
DocumentMetadataSchema = exports_external.object({
|
|
19213
|
-
filename: exports_external.string(),
|
|
19214
|
-
mimeType: exports_external.string(),
|
|
19215
|
-
size: exports_external.number().describe("File size in bytes"),
|
|
19216
|
-
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
19217
|
-
});
|
|
19218
|
-
ParseUsageSchema = exports_external.object({
|
|
19219
|
-
pageCount: exports_external.number(),
|
|
19220
|
-
processingTimeMs: exports_external.number().optional()
|
|
19221
|
-
});
|
|
19222
|
-
CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
19223
|
-
PointSchema = exports_external.object({
|
|
19224
|
-
x: exports_external.number(),
|
|
19225
|
-
y: exports_external.number()
|
|
19226
|
-
});
|
|
19227
|
-
BoundingRegionSchema = exports_external.object({
|
|
19228
|
-
polygon: exports_external.array(PointSchema).min(3),
|
|
19229
|
-
unit: CoordinateUnitSchema,
|
|
19230
|
-
pageIndex: exports_external.number()
|
|
19231
|
-
});
|
|
19232
|
-
PositionedTextSchema = exports_external.object({
|
|
19233
|
-
text: exports_external.string(),
|
|
19234
|
-
confidence: exports_external.number().min(0).max(1).optional(),
|
|
19235
|
-
boundingRegion: BoundingRegionSchema.optional()
|
|
19236
|
-
});
|
|
19237
|
-
TableCellSchema = exports_external.object({
|
|
19238
|
-
content: exports_external.string(),
|
|
19239
|
-
rowIndex: exports_external.number(),
|
|
19240
|
-
columnIndex: exports_external.number(),
|
|
19241
|
-
rowSpan: exports_external.number().default(1),
|
|
19242
|
-
columnSpan: exports_external.number().default(1),
|
|
19243
|
-
boundingRegion: BoundingRegionSchema.optional()
|
|
19244
|
-
});
|
|
19245
|
-
ExtractedTableSchema = exports_external.object({
|
|
19246
|
-
cells: exports_external.array(TableCellSchema),
|
|
19247
|
-
rowCount: exports_external.number(),
|
|
19248
|
-
columnCount: exports_external.number(),
|
|
19249
|
-
boundingRegion: BoundingRegionSchema.optional()
|
|
19250
|
-
});
|
|
19251
|
-
LayoutElementTypeSchema = exports_external.enum([
|
|
19252
|
-
"paragraph",
|
|
19253
|
-
"title",
|
|
19254
|
-
"sectionHeading",
|
|
19255
|
-
"pageHeader",
|
|
19256
|
-
"pageFooter",
|
|
19257
|
-
"pageNumber",
|
|
19258
|
-
"footnote",
|
|
19259
|
-
"table",
|
|
19260
|
-
"figure",
|
|
19261
|
-
"formulaBlock"
|
|
19262
|
-
]);
|
|
19263
|
-
LayoutElementSchema = exports_external.object({
|
|
19264
|
-
type: LayoutElementTypeSchema,
|
|
19265
|
-
content: exports_external.string(),
|
|
19266
|
-
table: ExtractedTableSchema.optional(),
|
|
19267
|
-
caption: exports_external.string().optional(),
|
|
19268
|
-
figureId: exports_external.string().optional(),
|
|
19269
|
-
boundingRegion: BoundingRegionSchema.optional()
|
|
19270
|
-
});
|
|
19271
|
-
PageResultSchema = exports_external.object({
|
|
19272
|
-
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19273
|
-
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
19274
|
-
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
19275
|
-
layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
|
|
19276
|
-
words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
|
|
19277
|
-
lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
|
|
19278
|
-
tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
|
|
19279
|
-
width: exports_external.number().optional().describe("Page width"),
|
|
19280
|
-
height: exports_external.number().optional().describe("Page height"),
|
|
19281
|
-
unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
|
|
19282
|
-
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
19283
|
-
});
|
|
19284
|
-
ParseResultSchema = exports_external.object({
|
|
19285
|
-
document: DocumentMetadataSchema,
|
|
19286
|
-
usage: ParseUsageSchema,
|
|
19287
|
-
pages: exports_external.array(PageResultSchema),
|
|
19288
|
-
text: exports_external.string().describe("Combined text from all pages"),
|
|
19289
|
-
parserType: ParserTypeSchema,
|
|
19290
|
-
parserVersion: exports_external.string().optional(),
|
|
19291
|
-
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
19292
|
-
rawResponse: exports_external.unknown().optional()
|
|
19293
|
-
});
|
|
19294
|
-
ParseOptionsSchema = exports_external.object({
|
|
19295
|
-
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
19296
|
-
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
19297
|
-
includeWordPositions: exports_external.boolean().default(false),
|
|
19298
|
-
includeLinePositions: exports_external.boolean().default(false),
|
|
19299
|
-
extractTables: exports_external.boolean().default(true),
|
|
19300
|
-
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
19301
|
-
model: exports_external.string().optional(),
|
|
19302
|
-
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
19303
|
-
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
19304
|
-
pdfRenderScale: exports_external.number().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19305
|
-
imageQuality: exports_external.number().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19306
|
-
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
19307
|
-
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
19308
|
-
tenantId: exports_external.string().optional()
|
|
19309
|
-
});
|
|
19310
|
-
ParserInputSchema = exports_external.object({
|
|
19311
|
-
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
19312
|
-
filename: exports_external.string(),
|
|
19313
|
-
mimeType: exports_external.string(),
|
|
19314
|
-
options: ParseOptionsSchema.optional()
|
|
19315
|
-
});
|
|
19316
|
-
EXTENSION_TO_MIME = {
|
|
19317
|
-
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19318
|
-
doc: "application/msword",
|
|
19319
|
-
odt: "application/vnd.oasis.opendocument.text",
|
|
19320
|
-
rtf: "application/rtf",
|
|
19321
|
-
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19322
|
-
xls: "application/vnd.ms-excel",
|
|
19323
|
-
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19324
|
-
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19325
|
-
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
19326
|
-
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19327
|
-
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19328
|
-
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19329
|
-
ppt: "application/vnd.ms-powerpoint",
|
|
19330
|
-
odp: "application/vnd.oasis.opendocument.presentation",
|
|
19331
|
-
eml: "message/rfc822",
|
|
19332
|
-
msg: "application/vnd.ms-outlook",
|
|
19333
|
-
epub: "application/epub+zip",
|
|
19334
|
-
pdf: "application/pdf",
|
|
19335
|
-
png: "image/png",
|
|
19336
|
-
jpg: "image/jpeg",
|
|
19337
|
-
jpeg: "image/jpeg",
|
|
19338
|
-
webp: "image/webp",
|
|
19339
|
-
tiff: "image/tiff",
|
|
19340
|
-
tif: "image/tiff",
|
|
19341
|
-
gif: "image/gif",
|
|
19342
|
-
bmp: "image/bmp",
|
|
19343
|
-
svg: "image/svg+xml",
|
|
19344
|
-
txt: "text/plain",
|
|
19345
|
-
md: "text/markdown",
|
|
19346
|
-
markdown: "text/markdown",
|
|
19347
|
-
csv: "text/csv",
|
|
19348
|
-
tsv: "text/tab-separated-values",
|
|
19349
|
-
html: "text/html",
|
|
19350
|
-
htm: "text/html",
|
|
19351
|
-
xml: "text/xml",
|
|
19352
|
-
json: "application/json",
|
|
19353
|
-
yaml: "application/x-yaml",
|
|
19354
|
-
yml: "application/x-yaml",
|
|
19355
|
-
toml: "application/toml",
|
|
19356
|
-
rst: "text/x-rst",
|
|
19357
|
-
org: "text/x-org",
|
|
19358
|
-
tex: "application/x-latex",
|
|
19359
|
-
latex: "application/x-latex",
|
|
19360
|
-
ipynb: "application/x-ipynb+json",
|
|
19361
|
-
bib: "application/x-bibtex",
|
|
19362
|
-
dbk: "application/docbook+xml",
|
|
19363
|
-
docbook: "application/docbook+xml",
|
|
19364
|
-
fb2: "application/x-fictionbook+xml"
|
|
19365
|
-
};
|
|
19366
|
-
MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
|
|
19367
|
-
if (!(mime in acc))
|
|
19368
|
-
acc[mime] = ext;
|
|
19369
|
-
return acc;
|
|
19370
|
-
}, {});
|
|
19371
|
-
MIME_TO_LABEL = {
|
|
19372
|
-
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
19373
|
-
"application/msword": "DOC",
|
|
19374
|
-
"application/vnd.oasis.opendocument.text": "ODT",
|
|
19375
|
-
"application/rtf": "RTF",
|
|
19376
|
-
"text/rtf": "RTF",
|
|
19377
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
19378
|
-
"application/vnd.ms-excel": "XLS",
|
|
19379
|
-
"application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
|
|
19380
|
-
"application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
|
|
19381
|
-
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
|
|
19382
|
-
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
|
|
19383
|
-
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
|
|
19384
|
-
"application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
|
|
19385
|
-
"application/vnd.ms-powerpoint": "PPT",
|
|
19386
|
-
"application/vnd.oasis.opendocument.presentation": "ODP",
|
|
19387
|
-
"message/rfc822": "EML",
|
|
19388
|
-
"application/vnd.ms-outlook": "MSG",
|
|
19389
|
-
"application/epub+zip": "EPUB",
|
|
19390
|
-
"application/pdf": "PDF",
|
|
19391
|
-
"image/png": "PNG",
|
|
19392
|
-
"image/jpeg": "JPEG",
|
|
19393
|
-
"image/webp": "WebP",
|
|
19394
|
-
"image/tiff": "TIFF",
|
|
19395
|
-
"image/gif": "GIF",
|
|
19396
|
-
"image/bmp": "BMP",
|
|
19397
|
-
"image/svg+xml": "SVG",
|
|
19398
|
-
"text/plain": "TXT",
|
|
19399
|
-
"text/markdown": "Markdown",
|
|
19400
|
-
"text/csv": "CSV",
|
|
19401
|
-
"text/tab-separated-values": "TSV",
|
|
19402
|
-
"text/html": "HTML",
|
|
19403
|
-
"text/xml": "XML",
|
|
19404
|
-
"application/json": "JSON",
|
|
19405
|
-
"application/x-yaml": "YAML",
|
|
19406
|
-
"application/toml": "TOML",
|
|
19407
|
-
"text/x-rst": "RST",
|
|
19408
|
-
"text/x-org": "Org",
|
|
19409
|
-
"application/x-latex": "LaTeX",
|
|
19410
|
-
"application/x-ipynb+json": "Jupyter",
|
|
19411
|
-
"application/x-bibtex": "BibTeX",
|
|
19412
|
-
"application/docbook+xml": "DocBook",
|
|
19413
|
-
"application/x-fictionbook+xml": "FB2"
|
|
19414
|
-
};
|
|
19415
|
-
});
|
|
19416
|
-
|
|
19417
|
-
// ../types/src/processor/configs/document-parser.ts
|
|
19418
|
-
var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
|
|
19419
|
-
var init_document_parser = __esm(() => {
|
|
19420
|
-
init_zod();
|
|
19421
|
-
init_runtime_file_ref();
|
|
19422
|
-
init_parser();
|
|
19423
|
-
DocumentParserInputSchema = ResolvedProcessorFileSchema;
|
|
19424
|
-
DocumentParserOutputSchema = ParseResultSchema;
|
|
19425
|
-
DocumentParserConfigSchema = exports_external.object({
|
|
19426
|
-
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
19427
|
-
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
19428
|
-
maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
|
|
19429
|
-
pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
|
|
19430
|
-
pdfRenderScale: exports_external.number().min(1).max(4).default(1).optional().describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19431
|
-
imageQuality: exports_external.number().int().min(1).max(100).default(85).optional().describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19432
|
-
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
19433
|
-
nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
|
|
19434
|
-
languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
19435
|
-
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown").optional().describe("Format for extracted text. Only the native (Kreuzberg) parser uses this — OCR/VLM always emit markdown.")
|
|
19436
|
-
}).prefault({});
|
|
19437
|
-
});
|
|
19438
|
-
|
|
19439
|
-
// ../types/src/processor/configs/extract.ts
|
|
19440
|
-
var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
|
|
19441
|
-
var init_extract = __esm(() => {
|
|
19442
|
-
init_zod();
|
|
19443
|
-
ExtractInputSchema = exports_external.object({
|
|
19444
|
-
content: exports_external.string().optional().describe("Text content to extract from"),
|
|
19445
|
-
text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
|
|
19446
|
-
contentType: exports_external.enum(["text", "image"]).default("text"),
|
|
19447
|
-
imageData: exports_external.string().optional(),
|
|
19448
|
-
imageMimeType: exports_external.string().optional()
|
|
19449
|
-
}).refine((data) => data.content || data.text, {
|
|
19450
|
-
message: "Either content or text must be provided"
|
|
19451
|
-
});
|
|
19452
|
-
ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
|
|
19453
|
-
ExtractConfigSchema = exports_external.object({
|
|
19454
|
-
schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
|
|
19455
|
-
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
19456
|
-
provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
|
|
19457
|
-
model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
|
|
19458
|
-
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
|
|
19459
|
-
grounded: exports_external.boolean().optional().describe("When true, run a grounding pass over the schema fields and attach per-field source spans + confidence under a `_grounding` key, flagging ungrounded/fuzzy fields for human review. Grounding always calls OpenAI directly (independent of the extract provider) and requires OPENAI_API_KEY."),
|
|
19460
|
-
groundingModel: exports_external.string().optional().describe("Provider/model for the grounding pass. Defaults to the workspace default LLM; grounding runs against OpenAI, so pick an OpenAI-compatible model."),
|
|
19461
|
-
groundingExamples: exports_external.array(exports_external.object({
|
|
19462
|
-
text: exports_external.string(),
|
|
19463
|
-
extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
|
|
19464
|
-
})).optional().describe("Few-shot examples for grounding (verbatim source text per field). Optional."),
|
|
19465
|
-
reviewOn: exports_external.enum(["medium_or_low", "low_only"]).optional().describe("Which grounding confidences flag a field for review. Default: medium_or_low.")
|
|
19466
|
-
});
|
|
19467
|
-
});
|
|
19468
|
-
|
|
19469
|
-
// ../types/src/processor/configs/merge.ts
|
|
19470
|
-
var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
|
|
19471
|
-
var init_merge = __esm(() => {
|
|
19472
|
-
init_zod();
|
|
19473
|
-
MergeConfigSchema = exports_external.object({
|
|
19474
|
-
preservePortNames: exports_external.boolean().default(true),
|
|
19475
|
-
outputKey: exports_external.string().optional()
|
|
19476
|
-
});
|
|
19477
|
-
MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
19478
|
-
MergeOutputSchema = exports_external.object({
|
|
19479
|
-
items: exports_external.array(exports_external.unknown()),
|
|
19480
|
-
count: exports_external.number(),
|
|
19481
|
-
merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
19482
|
-
});
|
|
19483
|
-
});
|
|
19484
|
-
|
|
19485
|
-
// ../types/src/processor/configs/pdf-embedder.ts
|
|
19486
|
-
var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
|
|
19487
|
-
var init_pdf_embedder = __esm(() => {
|
|
19488
|
-
init_zod();
|
|
19489
|
-
init_runtime_file_ref();
|
|
19490
|
-
init_parser();
|
|
19491
|
-
PdfEmbedderInputSchema = exports_external.object({
|
|
19492
|
-
file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
|
|
19493
|
-
parseResult: exports_external.object({
|
|
19494
|
-
pages: exports_external.array(PageResultSchema),
|
|
19495
|
-
text: exports_external.string().optional()
|
|
19496
|
-
}).describe("Parse result from ai.parse step (must include word positions)")
|
|
19497
|
-
});
|
|
19498
|
-
PdfEmbedderOutputSchema = exports_external.object({
|
|
19499
|
-
fileId: exports_external.string().describe("File ID from files table"),
|
|
19500
|
-
pageCount: exports_external.number().describe("Number of pages in the output PDF"),
|
|
19501
|
-
wordCount: exports_external.number().describe("Number of words embedded"),
|
|
19502
|
-
text: exports_external.string().describe("Extracted text (from parse step)")
|
|
19503
|
-
});
|
|
19504
|
-
PdfEmbedderConfigSchema = exports_external.object({
|
|
19505
|
-
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
|
|
19506
|
-
confidenceThreshold: exports_external.number().min(0).max(1).default(0.7).describe("Minimum OCR confidence (0-1) to include a word. Lower = more words but more errors")
|
|
19507
|
-
}).prefault({});
|
|
19508
|
-
});
|
|
19509
|
-
|
|
19510
|
-
// ../types/src/processor/configs/segment.ts
|
|
19511
|
-
var SegmentInputSchema, SEGMENT_UNKNOWN_TYPE = "unknown", SegmentConfigSchema, ConfidenceLevelSchema, SegmentSummarySchema, SegmentOutputSchema;
|
|
19512
|
-
var init_segment = __esm(() => {
|
|
19513
|
-
init_zod();
|
|
19514
|
-
SegmentInputSchema = exports_external.object({
|
|
19515
|
-
pages: exports_external.array(exports_external.object({
|
|
19516
|
-
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19517
|
-
text: exports_external.string().describe("Extracted text for this page"),
|
|
19518
|
-
pageName: exports_external.string().optional()
|
|
19519
|
-
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19520
|
-
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19521
|
-
SegmentConfigSchema = exports_external.object({
|
|
19522
|
-
documentTypes: exports_external.array(exports_external.object({
|
|
19523
|
-
name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo").'),
|
|
19524
|
-
description: exports_external.string().optional().describe("What this document type looks like — headings, layout, vocabulary, and the visual cues that mark its FIRST page. Fed to the LLM as guidance for both boundary detection and typing.")
|
|
19525
|
-
})).min(1).describe('The document-type taxonomy. The LLM tags each detected document with one of these names, or the reserved "unknown" type when none fit.'),
|
|
19526
|
-
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19527
|
-
provider: exports_external.string().optional().describe('Provider ID from eigenpal.config.yaml (e.g. "openai-gpt5.4-mini"). Falls back to the tenant default LLM provider when omitted.'),
|
|
19528
|
-
windowTokenBudget: exports_external.number().int().positive().optional().describe("Per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000. Smaller windows give sharper boundaries on dense batches; larger windows when documents routinely exceed the per-window page count.")
|
|
19529
|
-
});
|
|
19530
|
-
ConfidenceLevelSchema = exports_external.enum(["low", "medium", "high"]).describe("LLM confidence as a coarse enum. Numeric (0..1) confidences cluster at 0.85–0.95 and gradations are noise; low/medium/high is reliable.");
|
|
19531
|
-
SegmentSummarySchema = exports_external.object({
|
|
19532
|
-
total: exports_external.number().int().describe("Total documents discovered in the batch."),
|
|
19533
|
-
labelled: exports_external.number().int().describe('Documents assigned a known taxonomy type (type !== "unknown").'),
|
|
19534
|
-
unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type === "unknown") — escalate to a human.'),
|
|
19535
|
-
lowConfidence: exports_external.number().int().describe('Documents whose boundary/type confidence is "low" — also worth human review.'),
|
|
19536
|
-
byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe('Per-type document counts, keyed by type name (includes "unknown").'),
|
|
19537
|
-
needsReview: exports_external.array(exports_external.object({
|
|
19538
|
-
index: exports_external.number().int(),
|
|
19539
|
-
type: exports_external.string(),
|
|
19540
|
-
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19541
|
-
reason: exports_external.enum(["unlabelled", "low_confidence"]).describe("Why this document should be escalated to a human operator."),
|
|
19542
|
-
notes: exports_external.string()
|
|
19543
|
-
})).describe("The exact documents to escalate to a human operator, with the reason for each.")
|
|
19544
|
-
});
|
|
19545
|
-
SegmentOutputSchema = exports_external.object({
|
|
19546
|
-
summary: SegmentSummarySchema.describe("Batch-level escalation summary: labelled vs unlabelled counts and the documents needing human review."),
|
|
19547
|
-
documents: exports_external.array(exports_external.object({
|
|
19548
|
-
index: exports_external.number().int().describe("0-based position of this document in the batch, in page order."),
|
|
19549
|
-
type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown" when none fit.'),
|
|
19550
|
-
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("Inclusive [startPage, endPage], 0-based, matching input pageIndex."),
|
|
19551
|
-
confidence: ConfidenceLevelSchema.describe("LLM confidence at the document boundary + type: low | medium | high."),
|
|
19552
|
-
notes: exports_external.string().describe("Short prose citing what marked this page as a new document."),
|
|
19553
|
-
evidence: exports_external.object({
|
|
19554
|
-
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
|
|
19555
|
-
start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
|
|
19556
|
-
}).optional().describe("Structured start evidence — for downstream parsing without regex over `notes`."),
|
|
19557
|
-
text: exports_external.string().describe("Joined per-page text for this document, ready for ai.extract"),
|
|
19558
|
-
pages: exports_external.array(exports_external.object({
|
|
19559
|
-
pageIndex: exports_external.number().int(),
|
|
19560
|
-
text: exports_external.string(),
|
|
19561
|
-
pageName: exports_external.string().optional(),
|
|
19562
|
-
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM boundary (direct evidence) or filled in by continuity")
|
|
19563
|
-
})).describe("Raw per-page records covered by this document, in page order."),
|
|
19564
|
-
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19565
|
-
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19566
|
-
}))
|
|
19567
|
-
});
|
|
19568
|
-
});
|
|
19569
|
-
|
|
19570
|
-
// ../types/src/processor/configs/split.ts
|
|
19571
|
-
var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema2, SplitOutputSchema;
|
|
19572
|
-
var init_split = __esm(() => {
|
|
19573
|
-
init_zod();
|
|
19574
|
-
SplitInputSchema = exports_external.object({
|
|
19575
|
-
pages: exports_external.array(exports_external.object({
|
|
19576
|
-
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19577
|
-
text: exports_external.string().describe("Extracted text for this page"),
|
|
19578
|
-
pageName: exports_external.string().optional()
|
|
19579
|
-
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19580
|
-
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19581
|
-
SplitConfigSchema = exports_external.object({
|
|
19582
|
-
sections: exports_external.array(exports_external.object({
|
|
19583
|
-
name: exports_external.string().min(1).describe("Stable id for the section"),
|
|
19584
|
-
description: exports_external.string().min(1).describe("What this section looks like in the document. Use the document's own terminology (e.g. 'Príloha 2 / Anlage 2') and visual cues."),
|
|
19585
|
-
required: exports_external.boolean().optional().describe('If true, log a warn when this section is not found, and lean the LLM toward expecting it. Default: false (Reducto-style "may be absent").'),
|
|
19586
|
-
endHints: exports_external.array(exports_external.string()).optional().describe('Natural-language hints fed to the LLM about what marks the END of this section (e.g. ["PRÍPAD PORUŠENIA ZMLUVY", "*Koniec prílohy*", "the next chapter heading"]). The LLM uses these as guidance — not a regex match — so casing variants, missing diacritics, and multilingual phrasings still close the section correctly. The LLM emits a structured end_anchor per section it judges closed; deterministic merge applies it.')
|
|
19587
|
-
})).min(1),
|
|
19588
|
-
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19589
|
-
provider: exports_external.string().optional().describe('Provider ID from eigenpal.config.yaml (e.g. "openai-gpt5.4-mini"). Falls back to the tenant default LLM provider when omitted.'),
|
|
19590
|
-
windowTokenBudget: exports_external.number().int().positive().optional().describe("Per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000. Smaller windows give sharper anchors on contract-style documents (less competing context for the LLM to mis-anchor on); 50k–100k when sections routinely exceed per-window page count.")
|
|
19591
|
-
});
|
|
19592
|
-
ConfidenceLevelSchema2 = exports_external.enum(["low", "medium", "high"]).describe("LLM confidence as a coarse enum. Numeric (0..1) confidences cluster at 0.85–0.95 and gradations are noise; low/medium/high is reliable.");
|
|
19593
|
-
SplitOutputSchema = exports_external.object({
|
|
19594
|
-
splits: exports_external.array(exports_external.object({
|
|
19595
|
-
name: exports_external.string(),
|
|
19596
|
-
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19597
|
-
confidence: ConfidenceLevelSchema2.describe("LLM confidence at the start anchor: low | medium | high."),
|
|
19598
|
-
notes: exports_external.string(),
|
|
19599
|
-
evidence: exports_external.object({
|
|
19600
|
-
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
|
|
19601
|
-
start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
|
|
19602
|
-
}).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
|
|
19603
|
-
end_evidence: exports_external.object({
|
|
19604
|
-
end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
|
|
19605
|
-
confidence: ConfidenceLevelSchema2,
|
|
19606
|
-
notes: exports_external.string().describe("LLM justification for the end. Pairs with start-anchor `notes` so a reconciliation pass can judge whether the section is correctly bounded.")
|
|
19607
|
-
}).optional().describe("Set when the LLM flagged a section close (matched against `endHints` or detected end-of-section markers). Absent when the section was closed by deterministic continuity-fill (next section start - 1)."),
|
|
19608
|
-
text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
|
|
19609
|
-
pages: exports_external.array(exports_external.object({
|
|
19610
|
-
pageIndex: exports_external.number().int(),
|
|
19611
|
-
text: exports_external.string(),
|
|
19612
|
-
pageName: exports_external.string().optional(),
|
|
19613
|
-
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
|
|
19614
|
-
})).describe("Raw per-page records covered by this split (in page order). Use when downstream needs to iterate page-by-page rather than treating the section as one blob."),
|
|
19615
|
-
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19616
|
-
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19617
|
-
}))
|
|
19618
|
-
});
|
|
19619
|
-
});
|
|
19620
|
-
|
|
19621
|
-
// ../types/src/processor/configs/template.ts
|
|
19622
|
-
var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
|
|
19623
|
-
var init_template = __esm(() => {
|
|
19624
|
-
init_zod();
|
|
19625
|
-
TemplateInputSchema = exports_external.object({
|
|
19626
|
-
data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
|
|
19627
|
-
});
|
|
19628
|
-
TemplateOutputSchema = exports_external.object({
|
|
19629
|
-
fileId: exports_external.string().describe("File ID from files table")
|
|
19630
|
-
});
|
|
19631
|
-
TemplateConfigSchema = exports_external.object({
|
|
19632
|
-
templateId: exports_external.string().describe("ID of the template from templates table"),
|
|
19633
|
-
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
|
|
19634
|
-
highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
|
|
19635
|
-
notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
|
|
19636
|
-
});
|
|
19637
|
-
});
|
|
19638
|
-
|
|
19639
|
-
// ../types/src/processor/configs/xlsx-to-json.ts
|
|
19640
|
-
var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
|
|
19641
|
-
var init_xlsx_to_json = __esm(() => {
|
|
19642
|
-
init_zod();
|
|
19643
|
-
init_runtime_file_ref();
|
|
19644
|
-
XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
|
|
19645
|
-
XlsxToJsonOutputSchema = exports_external.object({
|
|
19646
|
-
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
|
|
19647
|
-
fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
|
|
19648
|
-
});
|
|
19649
|
-
XlsxToJsonConfigSchema = exports_external.object({
|
|
19650
|
-
sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
|
|
19651
|
-
outputCsv: exports_external.boolean().default(false).optional(),
|
|
19652
|
-
outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
|
|
19653
|
-
});
|
|
19654
|
-
});
|
|
19655
|
-
|
|
19656
|
-
// ../types/src/processor/configs/react-hook-form.ts
|
|
19657
|
-
function extractFieldMetadata(schema) {
|
|
19658
|
-
const fields = [];
|
|
19659
|
-
let inner = schema;
|
|
19660
|
-
while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
|
|
19661
|
-
inner = inner.unwrap();
|
|
19662
|
-
}
|
|
19663
|
-
if (inner instanceof exports_external.ZodObject) {
|
|
19664
|
-
for (const [name, fieldSchema] of Object.entries(inner.shape)) {
|
|
19665
|
-
fields.push(extractSingleFieldMetadata(name, fieldSchema));
|
|
19666
|
-
}
|
|
19667
|
-
}
|
|
19668
|
-
return fields;
|
|
19669
|
-
}
|
|
19670
|
-
function extractSingleFieldMetadata(name, schema) {
|
|
19671
|
-
let current = schema;
|
|
19672
|
-
let required2 = true;
|
|
19673
|
-
let defaultValue = undefined;
|
|
19674
|
-
let description = current.description;
|
|
19675
|
-
while (true) {
|
|
19676
|
-
if (current instanceof exports_external.ZodOptional) {
|
|
19677
|
-
required2 = false;
|
|
19678
|
-
current = current.unwrap();
|
|
19679
|
-
} else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
|
|
19680
|
-
defaultValue = current._def.defaultValue;
|
|
19681
|
-
current = current.unwrap();
|
|
19682
|
-
} else {
|
|
19683
|
-
break;
|
|
19684
|
-
}
|
|
19685
|
-
description ??= current.description;
|
|
19686
|
-
}
|
|
19687
|
-
const base = { name, type: "unknown", required: required2, description, defaultValue };
|
|
19688
|
-
if (current instanceof exports_external.ZodString)
|
|
19689
|
-
return { ...base, type: "string" };
|
|
19690
|
-
if (current instanceof exports_external.ZodNumber) {
|
|
19691
|
-
let min;
|
|
19692
|
-
let max;
|
|
19693
|
-
for (const c of current._def.checks ?? []) {
|
|
19694
|
-
const def = c._zod.def;
|
|
19695
|
-
if (def.check === "greater_than")
|
|
19696
|
-
min = def.value;
|
|
19697
|
-
if (def.check === "less_than")
|
|
19698
|
-
max = def.value;
|
|
19699
|
-
}
|
|
19700
|
-
return { ...base, type: "number", min, max };
|
|
19701
|
-
}
|
|
19702
|
-
if (current instanceof exports_external.ZodBoolean)
|
|
19703
|
-
return { ...base, type: "boolean" };
|
|
19704
|
-
if (current instanceof exports_external.ZodEnum) {
|
|
19705
|
-
return { ...base, type: "enum", enumValues: current.options };
|
|
19706
|
-
}
|
|
19707
|
-
if (current instanceof exports_external.ZodArray)
|
|
19708
|
-
return { ...base, type: "array" };
|
|
19709
|
-
if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
|
|
19710
|
-
return { ...base, type: "object" };
|
|
19711
|
-
}
|
|
19712
|
-
return base;
|
|
19713
|
-
}
|
|
19714
|
-
function getConfigFieldMetadata(processorId) {
|
|
19715
|
-
const schema = getConfigSchema(processorId);
|
|
19716
|
-
if (!schema)
|
|
19717
|
-
return;
|
|
19718
|
-
return extractFieldMetadata(schema);
|
|
19719
|
-
}
|
|
19720
|
-
function getConfigDefaults(processorId) {
|
|
19721
|
-
const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19722
|
-
if (!schema)
|
|
19723
|
-
return {};
|
|
19724
|
-
try {
|
|
19725
|
-
const result = schema.safeParse({});
|
|
19726
|
-
if (result.success) {
|
|
19727
|
-
return result.data;
|
|
19728
|
-
}
|
|
19729
|
-
} catch {}
|
|
19730
|
-
const fields = extractFieldMetadata(schema);
|
|
19731
|
-
const defaults = {};
|
|
19732
|
-
for (const field of fields) {
|
|
19733
|
-
if (field.defaultValue !== undefined) {
|
|
19734
|
-
defaults[field.name] = field.defaultValue;
|
|
19735
|
-
}
|
|
19736
|
-
}
|
|
19737
|
-
return defaults;
|
|
19738
|
-
}
|
|
19739
|
-
function validateConfig(processorId, config2) {
|
|
19740
|
-
const schema = getConfigSchema(processorId);
|
|
19741
|
-
if (!schema) {
|
|
19742
|
-
return { valid: true, errors: {} };
|
|
19743
|
-
}
|
|
19744
|
-
const result = schema.safeParse(config2);
|
|
19745
|
-
if (result.success) {
|
|
19746
|
-
return { valid: true, errors: {} };
|
|
19747
|
-
}
|
|
19748
|
-
const errors3 = {};
|
|
19749
|
-
for (const issue2 of result.error.issues) {
|
|
19750
|
-
const path = issue2.path.join(".");
|
|
19751
|
-
errors3[path] = issue2.message;
|
|
19752
|
-
}
|
|
19753
|
-
return { valid: false, errors: errors3 };
|
|
19754
|
-
}
|
|
19755
|
-
var init_react_hook_form = __esm(() => {
|
|
19756
|
-
init_zod();
|
|
19757
|
-
init_configs();
|
|
19758
|
-
});
|
|
19759
|
-
|
|
19760
|
-
// ../types/src/processor/configs/index.ts
|
|
19761
|
-
function getProcessorSchemas(processorId) {
|
|
19762
|
-
return PROCESSOR_SCHEMAS[processorId];
|
|
19763
|
-
}
|
|
19764
|
-
function getConfigSchema(processorId) {
|
|
19765
|
-
return PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19766
|
-
}
|
|
19767
|
-
function getAllProcessorJsonSchemas() {
|
|
19768
|
-
return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
|
|
19769
|
-
id: p.id,
|
|
19770
|
-
inputSchema: toJsonSchema(p.inputSchema),
|
|
19771
|
-
outputSchema: toJsonSchema(p.outputSchema),
|
|
19772
|
-
configSchema: toJsonSchema(p.configSchema)
|
|
19773
|
-
}));
|
|
19774
|
-
}
|
|
19775
|
-
function listProcessorIds() {
|
|
19776
|
-
return Object.keys(PROCESSOR_SCHEMAS);
|
|
19777
|
-
}
|
|
19778
|
-
var PROCESSOR_SCHEMAS;
|
|
19779
|
-
var init_configs = __esm(() => {
|
|
19780
|
-
init_common();
|
|
19781
|
-
init_ids();
|
|
19782
|
-
init_classify();
|
|
19783
|
-
init_document_parser();
|
|
19784
|
-
init_extract();
|
|
19785
|
-
init_merge();
|
|
19786
|
-
init_pdf_embedder();
|
|
19787
|
-
init_segment();
|
|
19788
|
-
init_split();
|
|
19789
|
-
init_template();
|
|
19790
|
-
init_xlsx_to_json();
|
|
19791
|
-
init_react_hook_form();
|
|
19792
|
-
init_classify();
|
|
19793
|
-
init_document_parser();
|
|
19794
|
-
init_extract();
|
|
19795
|
-
init_merge();
|
|
19796
|
-
init_pdf_embedder();
|
|
19797
|
-
init_segment();
|
|
19798
|
-
init_split();
|
|
19799
|
-
init_template();
|
|
19800
|
-
init_xlsx_to_json();
|
|
19801
|
-
PROCESSOR_SCHEMAS = {
|
|
19802
|
-
[PROCESSOR_IDS.EXTRACT]: {
|
|
19803
|
-
id: PROCESSOR_IDS.EXTRACT,
|
|
19804
|
-
inputSchema: ExtractInputSchema,
|
|
19805
|
-
outputSchema: ExtractOutputSchema,
|
|
19806
|
-
configSchema: ExtractConfigSchema
|
|
19807
|
-
},
|
|
19808
|
-
[PROCESSOR_IDS.DOCUMENT_PARSER]: {
|
|
19809
|
-
id: PROCESSOR_IDS.DOCUMENT_PARSER,
|
|
19810
|
-
inputSchema: DocumentParserInputSchema,
|
|
19811
|
-
outputSchema: DocumentParserOutputSchema,
|
|
19812
|
-
configSchema: DocumentParserConfigSchema
|
|
19813
|
-
},
|
|
19814
|
-
[PROCESSOR_IDS.MERGE]: {
|
|
19815
|
-
id: PROCESSOR_IDS.MERGE,
|
|
19816
|
-
inputSchema: MergeInputSchema,
|
|
19817
|
-
outputSchema: MergeOutputSchema,
|
|
19818
|
-
configSchema: MergeConfigSchema
|
|
19819
|
-
},
|
|
19820
|
-
[PROCESSOR_IDS.TEMPLATE]: {
|
|
19821
|
-
id: PROCESSOR_IDS.TEMPLATE,
|
|
19822
|
-
inputSchema: TemplateInputSchema,
|
|
19823
|
-
outputSchema: TemplateOutputSchema,
|
|
19824
|
-
configSchema: TemplateConfigSchema
|
|
19825
|
-
},
|
|
19826
|
-
[PROCESSOR_IDS.PDF_EMBEDDER]: {
|
|
19827
|
-
id: PROCESSOR_IDS.PDF_EMBEDDER,
|
|
19828
|
-
inputSchema: PdfEmbedderInputSchema,
|
|
19829
|
-
outputSchema: PdfEmbedderOutputSchema,
|
|
19830
|
-
configSchema: PdfEmbedderConfigSchema
|
|
19831
|
-
},
|
|
19832
|
-
[PROCESSOR_IDS.SPLIT]: {
|
|
19833
|
-
id: PROCESSOR_IDS.SPLIT,
|
|
19834
|
-
inputSchema: SplitInputSchema,
|
|
19835
|
-
outputSchema: SplitOutputSchema,
|
|
19836
|
-
configSchema: SplitConfigSchema
|
|
19837
|
-
},
|
|
19838
|
-
[PROCESSOR_IDS.SEGMENT]: {
|
|
19839
|
-
id: PROCESSOR_IDS.SEGMENT,
|
|
19840
|
-
inputSchema: SegmentInputSchema,
|
|
19841
|
-
outputSchema: SegmentOutputSchema,
|
|
19842
|
-
configSchema: SegmentConfigSchema
|
|
19843
|
-
},
|
|
19844
|
-
[PROCESSOR_IDS.CLASSIFY]: {
|
|
19845
|
-
id: PROCESSOR_IDS.CLASSIFY,
|
|
19846
|
-
inputSchema: ClassifyInputSchema,
|
|
19847
|
-
outputSchema: ClassifyOutputSchema,
|
|
19848
|
-
configSchema: ClassifyConfigSchema
|
|
19849
|
-
},
|
|
19850
|
-
[PROCESSOR_IDS.XLSX_TO_JSON]: {
|
|
19851
|
-
id: PROCESSOR_IDS.XLSX_TO_JSON,
|
|
19852
|
-
inputSchema: XlsxToJsonInputSchema,
|
|
19853
|
-
outputSchema: XlsxToJsonOutputSchema,
|
|
19854
|
-
configSchema: XlsxToJsonConfigSchema
|
|
19855
|
-
}
|
|
19856
|
-
};
|
|
19857
|
-
});
|
|
19858
|
-
|
|
19859
17331
|
// ../types/src/processor/index.ts
|
|
19860
|
-
var
|
|
19861
|
-
init_processor();
|
|
19862
|
-
init_execution();
|
|
19863
|
-
init_configs();
|
|
19864
|
-
});
|
|
17332
|
+
var init_processor = () => {};
|
|
19865
17333
|
|
|
19866
17334
|
// ../types/src/parser/index.ts
|
|
19867
|
-
var
|
|
19868
|
-
init_parser();
|
|
19869
|
-
});
|
|
17335
|
+
var init_parser = () => {};
|
|
19870
17336
|
|
|
19871
17337
|
// ../types/src/otel/semantic-conventions.ts
|
|
19872
17338
|
function mapLLMAttributes(attrs) {
|
|
@@ -22904,9 +20370,9 @@ var require_validate = __commonJS((exports) => {
|
|
|
22904
20370
|
}
|
|
22905
20371
|
let expr = data;
|
|
22906
20372
|
const segments = jsonPointer.split("/");
|
|
22907
|
-
for (const
|
|
22908
|
-
if (
|
|
22909
|
-
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(
|
|
20373
|
+
for (const segment of segments) {
|
|
20374
|
+
if (segment) {
|
|
20375
|
+
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
|
|
22910
20376
|
expr = (0, codegen_1._)`${expr} && ${data}`;
|
|
22911
20377
|
}
|
|
22912
20378
|
}
|
|
@@ -23186,7 +20652,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
23186
20652
|
});
|
|
23187
20653
|
|
|
23188
20654
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
23189
|
-
var
|
|
20655
|
+
var require_utils = __commonJS((exports, module) => {
|
|
23190
20656
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
23191
20657
|
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);
|
|
23192
20658
|
function stringArrayToHexStripped(input) {
|
|
@@ -23442,7 +20908,7 @@ var require_utils3 = __commonJS((exports, module) => {
|
|
|
23442
20908
|
|
|
23443
20909
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
23444
20910
|
var require_schemes = __commonJS((exports, module) => {
|
|
23445
|
-
var { isUUID } =
|
|
20911
|
+
var { isUUID } = require_utils();
|
|
23446
20912
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
23447
20913
|
var supportedSchemeNames = [
|
|
23448
20914
|
"http",
|
|
@@ -23616,7 +21082,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
23616
21082
|
|
|
23617
21083
|
// ../../node_modules/fast-uri/index.js
|
|
23618
21084
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
23619
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
21085
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
|
|
23620
21086
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
23621
21087
|
function normalize(uri, options) {
|
|
23622
21088
|
if (typeof uri === "string") {
|
|
@@ -26026,7 +23492,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
26026
23492
|
});
|
|
26027
23493
|
|
|
26028
23494
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
26029
|
-
var
|
|
23495
|
+
var require_types = __commonJS((exports) => {
|
|
26030
23496
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26031
23497
|
exports.DiscrError = undefined;
|
|
26032
23498
|
var DiscrError;
|
|
@@ -26040,7 +23506,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
26040
23506
|
var require_discriminator = __commonJS((exports) => {
|
|
26041
23507
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26042
23508
|
var codegen_1 = require_codegen();
|
|
26043
|
-
var types_1 =
|
|
23509
|
+
var types_1 = require_types();
|
|
26044
23510
|
var compile_1 = require_compile();
|
|
26045
23511
|
var ref_error_1 = require_ref_error();
|
|
26046
23512
|
var util_1 = require_util();
|
|
@@ -26968,6 +24434,24 @@ var init_validation = __esm(() => {
|
|
|
26968
24434
|
init_workspace_schema();
|
|
26969
24435
|
});
|
|
26970
24436
|
|
|
24437
|
+
// ../types/src/core/common.ts
|
|
24438
|
+
function toJsonSchema2(schema) {
|
|
24439
|
+
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
24440
|
+
}
|
|
24441
|
+
var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
|
|
24442
|
+
var init_common = __esm(() => {
|
|
24443
|
+
init_zod();
|
|
24444
|
+
TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
24445
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
24446
|
+
});
|
|
24447
|
+
JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24448
|
+
BaseEntitySchema2 = exports_external.object({
|
|
24449
|
+
id: exports_external.string(),
|
|
24450
|
+
createdAt: TimestampSchema2.optional(),
|
|
24451
|
+
updatedAt: TimestampSchema2.optional()
|
|
24452
|
+
});
|
|
24453
|
+
});
|
|
24454
|
+
|
|
26971
24455
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
26972
24456
|
var require_lib = __commonJS((exports) => {
|
|
26973
24457
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -27381,12 +24865,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
27381
24865
|
}
|
|
27382
24866
|
const ParseErrorConstructors = {};
|
|
27383
24867
|
for (const reasonCode of Object.keys(argument)) {
|
|
27384
|
-
const
|
|
27385
|
-
const _ref = typeof
|
|
27386
|
-
message: () =>
|
|
27387
|
-
} : typeof
|
|
27388
|
-
message:
|
|
27389
|
-
} :
|
|
24868
|
+
const template = argument[reasonCode];
|
|
24869
|
+
const _ref = typeof template === "string" ? {
|
|
24870
|
+
message: () => template
|
|
24871
|
+
} : typeof template === "function" ? {
|
|
24872
|
+
message: template
|
|
24873
|
+
} : template, {
|
|
27390
24874
|
message
|
|
27391
24875
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
27392
24876
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -41859,7 +39343,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
41859
39343
|
});
|
|
41860
39344
|
|
|
41861
39345
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
41862
|
-
var
|
|
39346
|
+
var require_types2 = __commonJS((exports) => {
|
|
41863
39347
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41864
39348
|
var TokenType;
|
|
41865
39349
|
(function(TokenType2) {
|
|
@@ -41923,8 +39407,8 @@ var require_types3 = __commonJS((exports) => {
|
|
|
41923
39407
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
41924
39408
|
const arrow = 22528;
|
|
41925
39409
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
41926
|
-
const
|
|
41927
|
-
TokenType2[TokenType2["template"] =
|
|
39410
|
+
const template = 23552;
|
|
39411
|
+
TokenType2[TokenType2["template"] = template] = "template";
|
|
41928
39412
|
const ellipsis = 24576;
|
|
41929
39413
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
41930
39414
|
const backQuote = 25600;
|
|
@@ -42343,7 +39827,7 @@ var require_types3 = __commonJS((exports) => {
|
|
|
42343
39827
|
var require_state = __commonJS((exports) => {
|
|
42344
39828
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42345
39829
|
var _keywords = require_keywords();
|
|
42346
|
-
var _types =
|
|
39830
|
+
var _types = require_types2();
|
|
42347
39831
|
|
|
42348
39832
|
class Scope {
|
|
42349
39833
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -42729,7 +40213,7 @@ var require_base = __commonJS((exports) => {
|
|
|
42729
40213
|
var require_util2 = __commonJS((exports) => {
|
|
42730
40214
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42731
40215
|
var _index = require_tokenizer();
|
|
42732
|
-
var _types =
|
|
40216
|
+
var _types = require_types2();
|
|
42733
40217
|
var _charcodes = require_charcodes();
|
|
42734
40218
|
var _base = require_base();
|
|
42735
40219
|
function isContextual(contextualKeyword) {
|
|
@@ -42891,7 +40375,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
42891
40375
|
var require_readWordTree = __commonJS((exports) => {
|
|
42892
40376
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42893
40377
|
var _keywords = require_keywords();
|
|
42894
|
-
var _types =
|
|
40378
|
+
var _types = require_types2();
|
|
42895
40379
|
var READ_WORD_TREE = new Int32Array([
|
|
42896
40380
|
-1,
|
|
42897
40381
|
27,
|
|
@@ -51869,7 +49353,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
51869
49353
|
var _identifier = require_identifier();
|
|
51870
49354
|
var _index = require_tokenizer();
|
|
51871
49355
|
var _readWordTree = require_readWordTree();
|
|
51872
|
-
var _types =
|
|
49356
|
+
var _types = require_types2();
|
|
51873
49357
|
function readWord() {
|
|
51874
49358
|
let treePos = 0;
|
|
51875
49359
|
let code = 0;
|
|
@@ -51935,7 +49419,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
51935
49419
|
var _keywords = require_keywords();
|
|
51936
49420
|
var _readWord = require_readWord();
|
|
51937
49421
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
51938
|
-
var _types =
|
|
49422
|
+
var _types = require_types2();
|
|
51939
49423
|
var IdentifierRole;
|
|
51940
49424
|
(function(IdentifierRole2) {
|
|
51941
49425
|
const Access = 0;
|
|
@@ -52652,7 +50136,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
52652
50136
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
52653
50137
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
52654
50138
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52655
|
-
var _types =
|
|
50139
|
+
var _types = require_types2();
|
|
52656
50140
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
52657
50141
|
let endIndex = index + 1;
|
|
52658
50142
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -53005,7 +50489,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
53005
50489
|
var _xhtml = require_xhtml();
|
|
53006
50490
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
53007
50491
|
var _tokenizer = require_tokenizer();
|
|
53008
|
-
var _types =
|
|
50492
|
+
var _types = require_types2();
|
|
53009
50493
|
var _charcodes = require_charcodes();
|
|
53010
50494
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
53011
50495
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -53509,7 +50993,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
53509
50993
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
53510
50994
|
}
|
|
53511
50995
|
var _tokenizer = require_tokenizer();
|
|
53512
|
-
var _types =
|
|
50996
|
+
var _types = require_types2();
|
|
53513
50997
|
var _JSXTransformer = require_JSXTransformer();
|
|
53514
50998
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
53515
50999
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -53548,7 +51032,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
53548
51032
|
}
|
|
53549
51033
|
var _tokenizer = require_tokenizer();
|
|
53550
51034
|
var _keywords = require_keywords();
|
|
53551
|
-
var _types =
|
|
51035
|
+
var _types = require_types2();
|
|
53552
51036
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
53553
51037
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
53554
51038
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -54319,18 +51803,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
|
|
|
54319
51803
|
continue;
|
|
54320
51804
|
let genColumn = 0;
|
|
54321
51805
|
for (let j = 0;j < line.length; j++) {
|
|
54322
|
-
const
|
|
51806
|
+
const segment = line[j];
|
|
54323
51807
|
if (j > 0)
|
|
54324
51808
|
writer.write(comma);
|
|
54325
|
-
genColumn = encodeInteger(writer,
|
|
54326
|
-
if (
|
|
51809
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
51810
|
+
if (segment.length === 1)
|
|
54327
51811
|
continue;
|
|
54328
|
-
sourcesIndex = encodeInteger(writer,
|
|
54329
|
-
sourceLine = encodeInteger(writer,
|
|
54330
|
-
sourceColumn = encodeInteger(writer,
|
|
54331
|
-
if (
|
|
51812
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
51813
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
51814
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
51815
|
+
if (segment.length === 4)
|
|
54332
51816
|
continue;
|
|
54333
|
-
namesIndex = encodeInteger(writer,
|
|
51817
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
54334
51818
|
}
|
|
54335
51819
|
}
|
|
54336
51820
|
return writer.flush();
|
|
@@ -54885,11 +52369,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
54885
52369
|
const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
54886
52370
|
if (index === -1)
|
|
54887
52371
|
return OMapping(null, null, null, null);
|
|
54888
|
-
const
|
|
54889
|
-
if (
|
|
52372
|
+
const segment = segments[index];
|
|
52373
|
+
if (segment.length === 1)
|
|
54890
52374
|
return OMapping(null, null, null, null);
|
|
54891
52375
|
const { names, resolvedSources } = map2;
|
|
54892
|
-
return OMapping(resolvedSources[
|
|
52376
|
+
return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
|
|
54893
52377
|
}
|
|
54894
52378
|
function generatedPositionFor(map2, needle) {
|
|
54895
52379
|
const { source, line, column, bias } = needle;
|
|
@@ -55002,8 +52486,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
55002
52486
|
const max = upperBound(segments, matchedColumn, min);
|
|
55003
52487
|
const result = [];
|
|
55004
52488
|
for (;min <= max; min++) {
|
|
55005
|
-
const
|
|
55006
|
-
result.push(GMapping(
|
|
52489
|
+
const segment = segments[min];
|
|
52490
|
+
result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
|
|
55007
52491
|
}
|
|
55008
52492
|
return result;
|
|
55009
52493
|
}
|
|
@@ -55031,8 +52515,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
55031
52515
|
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
55032
52516
|
if (index === -1)
|
|
55033
52517
|
return GMapping(null, null);
|
|
55034
|
-
const
|
|
55035
|
-
return GMapping(
|
|
52518
|
+
const segment = segments[index];
|
|
52519
|
+
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
|
|
55036
52520
|
}
|
|
55037
52521
|
});
|
|
55038
52522
|
});
|
|
@@ -55583,7 +53067,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
55583
53067
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
55584
53068
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55585
53069
|
var _tokenizer = require_tokenizer();
|
|
55586
|
-
var _types =
|
|
53070
|
+
var _types = require_types2();
|
|
55587
53071
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
55588
53072
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
55589
53073
|
return;
|
|
@@ -55648,7 +53132,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
55648
53132
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
55649
53133
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
55650
53134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55651
|
-
var _types =
|
|
53135
|
+
var _types = require_types2();
|
|
55652
53136
|
function getIdentifierNames(code, tokens) {
|
|
55653
53137
|
const names = [];
|
|
55654
53138
|
for (const token of tokens) {
|
|
@@ -55824,7 +53308,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
55824
53308
|
});
|
|
55825
53309
|
|
|
55826
53310
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
55827
|
-
var
|
|
53311
|
+
var require_types3 = __commonJS((exports) => {
|
|
55828
53312
|
var __extends = exports && exports.__extends || function() {
|
|
55829
53313
|
var extendStatics = function(d, b) {
|
|
55830
53314
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -56424,9 +53908,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
56424
53908
|
};
|
|
56425
53909
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56426
53910
|
exports.Checker = exports.createCheckers = undefined;
|
|
56427
|
-
var types_1 =
|
|
53911
|
+
var types_1 = require_types3();
|
|
56428
53912
|
var util_1 = require_util3();
|
|
56429
|
-
var types_2 =
|
|
53913
|
+
var types_2 = require_types3();
|
|
56430
53914
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
56431
53915
|
return types_2.TArray;
|
|
56432
53916
|
} });
|
|
@@ -56708,7 +54192,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
56708
54192
|
var _typescript = require_typescript();
|
|
56709
54193
|
var _index = require_tokenizer();
|
|
56710
54194
|
var _keywords = require_keywords();
|
|
56711
|
-
var _types =
|
|
54195
|
+
var _types = require_types2();
|
|
56712
54196
|
var _base = require_base();
|
|
56713
54197
|
var _expression = require_expression();
|
|
56714
54198
|
var _util = require_util2();
|
|
@@ -56840,7 +54324,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
56840
54324
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56841
54325
|
var _index = require_tokenizer();
|
|
56842
54326
|
var _keywords = require_keywords();
|
|
56843
|
-
var _types =
|
|
54327
|
+
var _types = require_types2();
|
|
56844
54328
|
var _base = require_base();
|
|
56845
54329
|
var _expression = require_expression();
|
|
56846
54330
|
var _lval = require_lval();
|
|
@@ -58102,7 +55586,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
58102
55586
|
var require_jsx = __commonJS((exports) => {
|
|
58103
55587
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58104
55588
|
var _index = require_tokenizer();
|
|
58105
|
-
var _types =
|
|
55589
|
+
var _types = require_types2();
|
|
58106
55590
|
var _base = require_base();
|
|
58107
55591
|
var _expression = require_expression();
|
|
58108
55592
|
var _util = require_util2();
|
|
@@ -58365,10 +55849,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
58365
55849
|
});
|
|
58366
55850
|
|
|
58367
55851
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
58368
|
-
var
|
|
55852
|
+
var require_types4 = __commonJS((exports) => {
|
|
58369
55853
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58370
55854
|
var _index = require_tokenizer();
|
|
58371
|
-
var _types =
|
|
55855
|
+
var _types = require_types2();
|
|
58372
55856
|
var _base = require_base();
|
|
58373
55857
|
var _expression = require_expression();
|
|
58374
55858
|
var _flow = require_flow();
|
|
@@ -58401,12 +55885,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
58401
55885
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58402
55886
|
var _flow = require_flow();
|
|
58403
55887
|
var _index = require_jsx();
|
|
58404
|
-
var _types =
|
|
55888
|
+
var _types = require_types4();
|
|
58405
55889
|
var _typescript = require_typescript();
|
|
58406
55890
|
var _index3 = require_tokenizer();
|
|
58407
55891
|
var _keywords = require_keywords();
|
|
58408
55892
|
var _state = require_state();
|
|
58409
|
-
var _types3 =
|
|
55893
|
+
var _types3 = require_types2();
|
|
58410
55894
|
var _charcodes = require_charcodes();
|
|
58411
55895
|
var _identifier = require_identifier();
|
|
58412
55896
|
var _base = require_base();
|
|
@@ -59122,7 +56606,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
59122
56606
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59123
56607
|
var _index = require_tokenizer();
|
|
59124
56608
|
var _keywords = require_keywords();
|
|
59125
|
-
var _types =
|
|
56609
|
+
var _types = require_types2();
|
|
59126
56610
|
var _base = require_base();
|
|
59127
56611
|
var _expression = require_expression();
|
|
59128
56612
|
var _statement = require_statement();
|
|
@@ -59997,7 +57481,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
59997
57481
|
var _tokenizer = require_tokenizer();
|
|
59998
57482
|
var _keywords = require_keywords();
|
|
59999
57483
|
var _state = require_state();
|
|
60000
|
-
var _types =
|
|
57484
|
+
var _types = require_types2();
|
|
60001
57485
|
var _charcodes = require_charcodes();
|
|
60002
57486
|
var _base = require_base();
|
|
60003
57487
|
var _expression = require_expression();
|
|
@@ -61032,7 +58516,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
61032
58516
|
function _interopRequireDefault(obj) {
|
|
61033
58517
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61034
58518
|
}
|
|
61035
|
-
var _types =
|
|
58519
|
+
var _types = require_types2();
|
|
61036
58520
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
61037
58521
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
61038
58522
|
|
|
@@ -61290,7 +58774,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
61290
58774
|
var require_getClassInfo = __commonJS((exports) => {
|
|
61291
58775
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61292
58776
|
var _keywords = require_keywords();
|
|
61293
|
-
var _types =
|
|
58777
|
+
var _types = require_types2();
|
|
61294
58778
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
61295
58779
|
const snapshot = tokens.snapshot();
|
|
61296
58780
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -61528,7 +59012,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
61528
59012
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
61529
59013
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
61530
59014
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61531
|
-
var _types =
|
|
59015
|
+
var _types = require_types2();
|
|
61532
59016
|
function elideImportEquals(tokens) {
|
|
61533
59017
|
tokens.removeInitialToken();
|
|
61534
59018
|
tokens.removeToken();
|
|
@@ -61552,7 +59036,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
61552
59036
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
61553
59037
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61554
59038
|
var _tokenizer = require_tokenizer();
|
|
61555
|
-
var _types =
|
|
59039
|
+
var _types = require_types2();
|
|
61556
59040
|
var EMPTY_DECLARATION_INFO = {
|
|
61557
59041
|
typeDeclarations: new Set,
|
|
61558
59042
|
valueDeclarations: new Set
|
|
@@ -61580,7 +59064,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
61580
59064
|
var require_isExportFrom = __commonJS((exports) => {
|
|
61581
59065
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61582
59066
|
var _keywords = require_keywords();
|
|
61583
|
-
var _types =
|
|
59067
|
+
var _types = require_types2();
|
|
61584
59068
|
function isExportFrom(tokens) {
|
|
61585
59069
|
let closeBraceIndex = tokens.currentIndex();
|
|
61586
59070
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -61595,7 +59079,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
61595
59079
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
61596
59080
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61597
59081
|
var _keywords = require_keywords();
|
|
61598
|
-
var _types =
|
|
59082
|
+
var _types = require_types2();
|
|
61599
59083
|
function removeMaybeImportAttributes(tokens) {
|
|
61600
59084
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
61601
59085
|
tokens.removeToken();
|
|
@@ -61610,7 +59094,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
61610
59094
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
61611
59095
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
61612
59096
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61613
|
-
var _types =
|
|
59097
|
+
var _types = require_types2();
|
|
61614
59098
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
61615
59099
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
61616
59100
|
return false;
|
|
@@ -61641,7 +59125,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
61641
59125
|
}
|
|
61642
59126
|
var _tokenizer = require_tokenizer();
|
|
61643
59127
|
var _keywords = require_keywords();
|
|
61644
|
-
var _types =
|
|
59128
|
+
var _types = require_types2();
|
|
61645
59129
|
var _elideImportEquals = require_elideImportEquals();
|
|
61646
59130
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
61647
59131
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -62283,7 +59767,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
62283
59767
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62284
59768
|
}
|
|
62285
59769
|
var _keywords = require_keywords();
|
|
62286
|
-
var _types =
|
|
59770
|
+
var _types = require_types2();
|
|
62287
59771
|
var _elideImportEquals = require_elideImportEquals();
|
|
62288
59772
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
62289
59773
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -62553,7 +60037,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
62553
60037
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62554
60038
|
}
|
|
62555
60039
|
var _keywords = require_keywords();
|
|
62556
|
-
var _types =
|
|
60040
|
+
var _types = require_types2();
|
|
62557
60041
|
var _Transformer = require_Transformer();
|
|
62558
60042
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62559
60043
|
|
|
@@ -62673,7 +60157,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
62673
60157
|
}
|
|
62674
60158
|
return value;
|
|
62675
60159
|
}
|
|
62676
|
-
var _types =
|
|
60160
|
+
var _types = require_types2();
|
|
62677
60161
|
var _Transformer = require_Transformer();
|
|
62678
60162
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62679
60163
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -62747,7 +60231,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
62747
60231
|
function _interopRequireDefault(obj) {
|
|
62748
60232
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62749
60233
|
}
|
|
62750
|
-
var _types =
|
|
60234
|
+
var _types = require_types2();
|
|
62751
60235
|
var _Transformer = require_Transformer();
|
|
62752
60236
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62753
60237
|
|
|
@@ -62776,7 +60260,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
62776
60260
|
function _interopRequireDefault(obj) {
|
|
62777
60261
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62778
60262
|
}
|
|
62779
|
-
var _types =
|
|
60263
|
+
var _types = require_types2();
|
|
62780
60264
|
var _Transformer = require_Transformer();
|
|
62781
60265
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62782
60266
|
|
|
@@ -62804,7 +60288,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
62804
60288
|
function _interopRequireDefault(obj) {
|
|
62805
60289
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62806
60290
|
}
|
|
62807
|
-
var _types =
|
|
60291
|
+
var _types = require_types2();
|
|
62808
60292
|
var _Transformer = require_Transformer();
|
|
62809
60293
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62810
60294
|
|
|
@@ -62920,7 +60404,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
62920
60404
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62921
60405
|
}
|
|
62922
60406
|
var _tokenizer = require_tokenizer();
|
|
62923
|
-
var _types =
|
|
60407
|
+
var _types = require_types2();
|
|
62924
60408
|
var _Transformer = require_Transformer();
|
|
62925
60409
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62926
60410
|
|
|
@@ -63171,7 +60655,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
63171
60655
|
function _interopRequireDefault(obj) {
|
|
63172
60656
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63173
60657
|
}
|
|
63174
|
-
var _types =
|
|
60658
|
+
var _types = require_types2();
|
|
63175
60659
|
var _isIdentifier = require_isIdentifier();
|
|
63176
60660
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
63177
60661
|
var _Transformer = require_Transformer();
|
|
@@ -63317,7 +60801,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
63317
60801
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63318
60802
|
}
|
|
63319
60803
|
var _keywords = require_keywords();
|
|
63320
|
-
var _types =
|
|
60804
|
+
var _types = require_types2();
|
|
63321
60805
|
var _getClassInfo = require_getClassInfo();
|
|
63322
60806
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
63323
60807
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -63716,7 +61200,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
63716
61200
|
}
|
|
63717
61201
|
var _linesandcolumns = require_build();
|
|
63718
61202
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
63719
|
-
var _types =
|
|
61203
|
+
var _types = require_types2();
|
|
63720
61204
|
function formatTokens(code, tokens) {
|
|
63721
61205
|
if (tokens.length === 0) {
|
|
63722
61206
|
return "";
|
|
@@ -63781,7 +61265,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
63781
61265
|
function _interopRequireDefault(obj) {
|
|
63782
61266
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63783
61267
|
}
|
|
63784
|
-
var _types =
|
|
61268
|
+
var _types = require_types2();
|
|
63785
61269
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
63786
61270
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
63787
61271
|
function getTSImportedNames(tokens) {
|
|
@@ -64166,7 +61650,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
64166
61650
|
function compileTypedScript(opts) {
|
|
64167
61651
|
let ast;
|
|
64168
61652
|
try {
|
|
64169
|
-
ast =
|
|
61653
|
+
ast = import_parser2.parse(opts.source, {
|
|
64170
61654
|
sourceType: "script",
|
|
64171
61655
|
plugins: ["typescript"],
|
|
64172
61656
|
ranges: true
|
|
@@ -64418,9 +61902,9 @@ function stripCommentsAndStrings(s) {
|
|
|
64418
61902
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
64419
61903
|
return out;
|
|
64420
61904
|
}
|
|
64421
|
-
var
|
|
61905
|
+
var import_parser2, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
64422
61906
|
var init_compile = __esm(() => {
|
|
64423
|
-
|
|
61907
|
+
import_parser2 = __toESM(require_lib(), 1);
|
|
64424
61908
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
64425
61909
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
64426
61910
|
});
|
|
@@ -64455,6 +61939,123 @@ function script(${typedParams}): StepOutput {
|
|
|
64455
61939
|
}
|
|
64456
61940
|
var SCRIPT_FN_MAX_BYTES = 50000;
|
|
64457
61941
|
|
|
61942
|
+
// ../types/src/workflow/retry.ts
|
|
61943
|
+
function normalizePolicy(policy) {
|
|
61944
|
+
if (policy === undefined || policy === "inherit")
|
|
61945
|
+
return policy;
|
|
61946
|
+
if (policy === "automatic")
|
|
61947
|
+
return { mode: "automatic" };
|
|
61948
|
+
if (policy === "never")
|
|
61949
|
+
return { mode: "never" };
|
|
61950
|
+
return policy;
|
|
61951
|
+
}
|
|
61952
|
+
function resolveRetryPolicy(args) {
|
|
61953
|
+
const step = normalizePolicy(args.step);
|
|
61954
|
+
const workflow = normalizePolicy(args.workflow);
|
|
61955
|
+
let policy;
|
|
61956
|
+
let source;
|
|
61957
|
+
if (step && step !== "inherit") {
|
|
61958
|
+
policy = policyForCapability(step, args.capability);
|
|
61959
|
+
source = "step";
|
|
61960
|
+
} else if (workflow && workflow !== "inherit") {
|
|
61961
|
+
policy = policyForCapability(workflow, args.capability);
|
|
61962
|
+
source = "workflow";
|
|
61963
|
+
} else {
|
|
61964
|
+
policy = { mode: "never" };
|
|
61965
|
+
source = "step_type";
|
|
61966
|
+
}
|
|
61967
|
+
const ceilings = args.ceilings ?? { maxAttempts: 10, maxElapsedMs: 86400000 };
|
|
61968
|
+
if (policy.mode === "never")
|
|
61969
|
+
return { policy, source, capped: false };
|
|
61970
|
+
const maxAttempts = Math.min(policy.maxAttempts ?? 3, ceilings.maxAttempts);
|
|
61971
|
+
const capped = maxAttempts !== (policy.maxAttempts ?? 3);
|
|
61972
|
+
return {
|
|
61973
|
+
policy: { ...policy, maxAttempts },
|
|
61974
|
+
source: capped ? "tenant_ceiling" : source,
|
|
61975
|
+
capped
|
|
61976
|
+
};
|
|
61977
|
+
}
|
|
61978
|
+
function policyForCapability(policy, capability) {
|
|
61979
|
+
if (policy.mode === "never")
|
|
61980
|
+
return policy;
|
|
61981
|
+
if (capability.replaySafety === "never")
|
|
61982
|
+
return { mode: "never" };
|
|
61983
|
+
if (capability.hasProviderRequestRetries || capability.automaticCategories.length === 0 || capability.replaySafety === "requires-idempotency") {
|
|
61984
|
+
return { mode: "automatic", maxAttempts: 1 };
|
|
61985
|
+
}
|
|
61986
|
+
return policy;
|
|
61987
|
+
}
|
|
61988
|
+
var RetryCategorySchema, AutomaticRetryPolicySchema, NeverRetryPolicySchema, ResolvedRetryPolicySchema, StepRetryPolicySchema, WorkflowRetryPolicySchema, RetryPolicySourceSchema, RetryTerminalReasonSchema, ExecutionFailureSchema, RetryDecisionSchema, StepRetryCapabilitySchema;
|
|
61989
|
+
var init_retry = __esm(() => {
|
|
61990
|
+
init_zod();
|
|
61991
|
+
RetryCategorySchema = exports_external.enum([
|
|
61992
|
+
"timeout",
|
|
61993
|
+
"rate_limited",
|
|
61994
|
+
"temporarily_unavailable",
|
|
61995
|
+
"invalid_provider_output",
|
|
61996
|
+
"validation",
|
|
61997
|
+
"authentication",
|
|
61998
|
+
"authorization",
|
|
61999
|
+
"not_found",
|
|
62000
|
+
"business",
|
|
62001
|
+
"cancelled",
|
|
62002
|
+
"unknown"
|
|
62003
|
+
]);
|
|
62004
|
+
AutomaticRetryPolicySchema = exports_external.object({
|
|
62005
|
+
mode: exports_external.literal("automatic"),
|
|
62006
|
+
maxAttempts: exports_external.number().int().min(1).max(10).optional()
|
|
62007
|
+
});
|
|
62008
|
+
NeverRetryPolicySchema = exports_external.object({
|
|
62009
|
+
mode: exports_external.literal("never")
|
|
62010
|
+
});
|
|
62011
|
+
ResolvedRetryPolicySchema = exports_external.discriminatedUnion("mode", [
|
|
62012
|
+
AutomaticRetryPolicySchema,
|
|
62013
|
+
NeverRetryPolicySchema
|
|
62014
|
+
]);
|
|
62015
|
+
StepRetryPolicySchema = exports_external.union([
|
|
62016
|
+
exports_external.literal("inherit"),
|
|
62017
|
+
exports_external.literal("automatic"),
|
|
62018
|
+
exports_external.literal("never"),
|
|
62019
|
+
ResolvedRetryPolicySchema
|
|
62020
|
+
]);
|
|
62021
|
+
WorkflowRetryPolicySchema = exports_external.union([
|
|
62022
|
+
exports_external.literal("automatic"),
|
|
62023
|
+
exports_external.literal("never"),
|
|
62024
|
+
ResolvedRetryPolicySchema
|
|
62025
|
+
]);
|
|
62026
|
+
RetryPolicySourceSchema = exports_external.enum(["step", "workflow", "step_type", "tenant_ceiling"]);
|
|
62027
|
+
RetryTerminalReasonSchema = exports_external.enum([
|
|
62028
|
+
"non_retryable",
|
|
62029
|
+
"unsafe_to_replay",
|
|
62030
|
+
"cancelled",
|
|
62031
|
+
"attempts_exhausted",
|
|
62032
|
+
"elapsed_time_exhausted",
|
|
62033
|
+
"retry_after_exceeds_budget",
|
|
62034
|
+
"operator_ceiling"
|
|
62035
|
+
]);
|
|
62036
|
+
ExecutionFailureSchema = exports_external.object({
|
|
62037
|
+
code: exports_external.string().min(1),
|
|
62038
|
+
category: RetryCategorySchema,
|
|
62039
|
+
message: exports_external.string(),
|
|
62040
|
+
transient: exports_external.boolean(),
|
|
62041
|
+
retryAfterMs: exports_external.number().int().nonnegative().optional(),
|
|
62042
|
+
httpStatus: exports_external.number().int().min(100).max(599).optional(),
|
|
62043
|
+
provider: exports_external.string().optional()
|
|
62044
|
+
});
|
|
62045
|
+
RetryDecisionSchema = exports_external.object({
|
|
62046
|
+
retry: exports_external.boolean(),
|
|
62047
|
+
delayMs: exports_external.number().int().nonnegative().optional(),
|
|
62048
|
+
nextAttemptAt: exports_external.coerce.date().optional(),
|
|
62049
|
+
policySource: RetryPolicySourceSchema,
|
|
62050
|
+
terminalReason: RetryTerminalReasonSchema.optional()
|
|
62051
|
+
});
|
|
62052
|
+
StepRetryCapabilitySchema = exports_external.object({
|
|
62053
|
+
replaySafety: exports_external.enum(["safe", "requires-idempotency", "never"]),
|
|
62054
|
+
automaticCategories: exports_external.array(RetryCategorySchema),
|
|
62055
|
+
hasProviderRequestRetries: exports_external.boolean().optional()
|
|
62056
|
+
});
|
|
62057
|
+
});
|
|
62058
|
+
|
|
64458
62059
|
// ../types/src/workflow/steps.ts
|
|
64459
62060
|
function parseStepType(type) {
|
|
64460
62061
|
const [category, operation] = type.split(".");
|
|
@@ -64463,9 +62064,10 @@ function parseStepType(type) {
|
|
|
64463
62064
|
function isStepCategory(type, category) {
|
|
64464
62065
|
return type.startsWith(`${category}.`);
|
|
64465
62066
|
}
|
|
64466
|
-
var AI_STEP_TYPES, TRANSFORM_STEP_TYPES, ACTION_STEP_TYPES, CONTROL_STEP_TYPES, STEP_TYPES, StepTypeValue, StepTypeSchema, BaseStepSchema, AIStepSchema, TransformStepSchema, HttpMethodSchema, ActionStepSchema, WaitStepSchema, FailStepSchema, LegacyBlockStepSchemaInner, IfStepSchemaInner, SwitchCaseSchemaInner, SwitchStepSchemaInner, ParallelBranchSchemaInner, ParallelStepSchemaInner, ForeachStepSchemaInner, ParallelMapStepSchemaInner, StepSchema, LegacyBlockStepSchema, IfStepSchema, SwitchStepSchema, ParallelBranchSchema, ParallelStepSchema, ForeachStepSchema, ParallelMapStepSchema;
|
|
62067
|
+
var AI_STEP_TYPES, TRANSFORM_STEP_TYPES, ACTION_STEP_TYPES, CONTROL_STEP_TYPES, STEP_TYPES, StepTypeValue, StepTypeSchema, BaseStepSchema, ControlContainerBaseStepSchema, AIStepSchema, TransformStepSchema, HttpMethodSchema, ActionStepSchema, WaitStepSchema, FailStepSchema, LegacyBlockStepSchemaInner, IfStepSchemaInner, SwitchCaseSchemaInner, SwitchStepSchemaInner, ParallelBranchSchemaInner, ParallelStepSchemaInner, ForeachStepSchemaInner, ParallelMapStepSchemaInner, StepSchema, LegacyBlockStepSchema, IfStepSchema, SwitchStepSchema, ParallelBranchSchema, ParallelStepSchema, ForeachStepSchema, ParallelMapStepSchema;
|
|
64467
62068
|
var init_steps = __esm(() => {
|
|
64468
62069
|
init_zod();
|
|
62070
|
+
init_retry();
|
|
64469
62071
|
AI_STEP_TYPES = [
|
|
64470
62072
|
"ai.parse",
|
|
64471
62073
|
"ai.extract",
|
|
@@ -64541,17 +62143,19 @@ var init_steps = __esm(() => {
|
|
|
64541
62143
|
description: exports_external.string().optional(),
|
|
64542
62144
|
if: exports_external.string().optional(),
|
|
64543
62145
|
timeout: exports_external.number().positive().optional(),
|
|
62146
|
+
retry: StepRetryPolicySchema.optional(),
|
|
64544
62147
|
retries: exports_external.number().int().min(0).optional(),
|
|
64545
62148
|
retryDelay: exports_external.number().positive().optional(),
|
|
64546
62149
|
with: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
64547
|
-
});
|
|
62150
|
+
}).strict();
|
|
62151
|
+
ControlContainerBaseStepSchema = BaseStepSchema.omit({ retry: true });
|
|
64548
62152
|
AIStepSchema = BaseStepSchema.extend({
|
|
64549
62153
|
type: exports_external.enum(AI_STEP_TYPES)
|
|
64550
62154
|
});
|
|
64551
62155
|
TransformStepSchema = BaseStepSchema.extend({
|
|
64552
62156
|
type: exports_external.enum(TRANSFORM_STEP_TYPES)
|
|
64553
62157
|
});
|
|
64554
|
-
HttpMethodSchema = exports_external.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
62158
|
+
HttpMethodSchema = exports_external.enum(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"]);
|
|
64555
62159
|
ActionStepSchema = BaseStepSchema.extend({
|
|
64556
62160
|
type: exports_external.enum(ACTION_STEP_TYPES)
|
|
64557
62161
|
});
|
|
@@ -64567,10 +62171,12 @@ var init_steps = __esm(() => {
|
|
|
64567
62171
|
});
|
|
64568
62172
|
LegacyBlockStepSchemaInner = BaseStepSchema.extend({
|
|
64569
62173
|
type: exports_external.literal("control.block"),
|
|
62174
|
+
retries: exports_external.number().int().min(0).optional(),
|
|
62175
|
+
retryDelay: exports_external.number().positive().optional(),
|
|
64570
62176
|
blockName: exports_external.string().min(1),
|
|
64571
62177
|
inputs: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
64572
62178
|
});
|
|
64573
|
-
IfStepSchemaInner =
|
|
62179
|
+
IfStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64574
62180
|
type: exports_external.literal("control.if"),
|
|
64575
62181
|
condition: exports_external.string(),
|
|
64576
62182
|
then: exports_external.lazy(() => exports_external.array(StepSchema)),
|
|
@@ -64580,7 +62186,7 @@ var init_steps = __esm(() => {
|
|
|
64580
62186
|
when: exports_external.union([exports_external.string(), exports_external.number(), exports_external.boolean()]),
|
|
64581
62187
|
steps: exports_external.lazy(() => exports_external.array(StepSchema))
|
|
64582
62188
|
});
|
|
64583
|
-
SwitchStepSchemaInner =
|
|
62189
|
+
SwitchStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64584
62190
|
type: exports_external.literal("control.switch"),
|
|
64585
62191
|
on: exports_external.string(),
|
|
64586
62192
|
cases: exports_external.array(SwitchCaseSchemaInner),
|
|
@@ -64590,18 +62196,18 @@ var init_steps = __esm(() => {
|
|
|
64590
62196
|
name: exports_external.string().min(1),
|
|
64591
62197
|
steps: exports_external.lazy(() => exports_external.array(StepSchema))
|
|
64592
62198
|
});
|
|
64593
|
-
ParallelStepSchemaInner =
|
|
62199
|
+
ParallelStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64594
62200
|
type: exports_external.literal("control.parallel"),
|
|
64595
62201
|
branches: exports_external.array(ParallelBranchSchemaInner)
|
|
64596
62202
|
});
|
|
64597
|
-
ForeachStepSchemaInner =
|
|
62203
|
+
ForeachStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64598
62204
|
type: exports_external.literal("control.foreach"),
|
|
64599
62205
|
items: exports_external.string(),
|
|
64600
62206
|
as: exports_external.string(),
|
|
64601
62207
|
indexAs: exports_external.string().optional(),
|
|
64602
62208
|
steps: exports_external.lazy(() => exports_external.array(StepSchema))
|
|
64603
62209
|
});
|
|
64604
|
-
ParallelMapStepSchemaInner =
|
|
62210
|
+
ParallelMapStepSchemaInner = ControlContainerBaseStepSchema.extend({
|
|
64605
62211
|
type: exports_external.literal("control.parallel_map"),
|
|
64606
62212
|
items: exports_external.string(),
|
|
64607
62213
|
as: exports_external.string(),
|
|
@@ -64632,6 +62238,9 @@ var init_steps = __esm(() => {
|
|
|
64632
62238
|
});
|
|
64633
62239
|
|
|
64634
62240
|
// ../types/src/workflow/step-configs.ts
|
|
62241
|
+
function getStepRetryCapability(stepType) {
|
|
62242
|
+
return STEP_RETRY_CAPABILITIES[stepType];
|
|
62243
|
+
}
|
|
64635
62244
|
function getStepSchema(stepType) {
|
|
64636
62245
|
return STEP_SCHEMAS[stepType];
|
|
64637
62246
|
}
|
|
@@ -64653,8 +62262,8 @@ function getAllStepJsonSchemas() {
|
|
|
64653
62262
|
category: def.category,
|
|
64654
62263
|
name: def.name,
|
|
64655
62264
|
description: def.description,
|
|
64656
|
-
configSchema:
|
|
64657
|
-
outputSchema:
|
|
62265
|
+
configSchema: toJsonSchema2(def.configSchema),
|
|
62266
|
+
outputSchema: toJsonSchema2(def.outputSchema),
|
|
64658
62267
|
configInWith: def.configInWith
|
|
64659
62268
|
}));
|
|
64660
62269
|
}
|
|
@@ -64704,7 +62313,7 @@ function isOutputSchemaUnknown(stepType) {
|
|
|
64704
62313
|
const def = schema._def;
|
|
64705
62314
|
return def?.typeName === "ZodUnknown";
|
|
64706
62315
|
}
|
|
64707
|
-
var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, AiSplitConfigSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, STEP_SCHEMAS;
|
|
62316
|
+
var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, AiSplitConfigSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, AI_RETRY_CAPABILITY, DETERMINISTIC_RETRY_CAPABILITY, CONTROL_RETRY_CAPABILITY, FILE_OUTPUT_RETRY_CAPABILITY, STEP_RETRY_CAPABILITIES, STEP_SCHEMAS;
|
|
64708
62317
|
var init_step_configs = __esm(() => {
|
|
64709
62318
|
init_zod();
|
|
64710
62319
|
init_common();
|
|
@@ -65030,7 +62639,7 @@ var init_step_configs = __esm(() => {
|
|
|
65030
62639
|
TransformRegexExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Field name → extracted value (or default), plus `_evidence: { [field]: { pageIndex, matchOffset, raw } }` and `_unmatched: string[]`.");
|
|
65031
62640
|
ActionHttpConfigSchema = exports_external.object({
|
|
65032
62641
|
url: exports_external.string().min(1, "URL is required").describe("Request URL (supports template expressions)"),
|
|
65033
|
-
method: exports_external.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]).default("GET").optional(),
|
|
62642
|
+
method: exports_external.enum(["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE"]).default("GET").optional(),
|
|
65034
62643
|
headers: exports_external.record(exports_external.string(), exports_external.string()).optional().describe("HTTP headers"),
|
|
65035
62644
|
body: exports_external.unknown().optional().describe("Request body (JSON or string)"),
|
|
65036
62645
|
timeout: exports_external.number().positive().default(30000).optional().describe("Timeout in milliseconds"),
|
|
@@ -65162,6 +62771,65 @@ var init_step_configs = __esm(() => {
|
|
|
65162
62771
|
message: exports_external.string().min(1).describe('Human-readable failure message. Supports template expressions, e.g. "Document classified as {{ steps.classify.output.label }}".')
|
|
65163
62772
|
});
|
|
65164
62773
|
ControlFailOutputSchema = exports_external.never().describe("control.fail never produces output — it terminates the workflow when triggered.");
|
|
62774
|
+
AI_RETRY_CAPABILITY = {
|
|
62775
|
+
replaySafety: "safe",
|
|
62776
|
+
automaticCategories: [
|
|
62777
|
+
"timeout",
|
|
62778
|
+
"rate_limited",
|
|
62779
|
+
"temporarily_unavailable",
|
|
62780
|
+
"invalid_provider_output"
|
|
62781
|
+
],
|
|
62782
|
+
hasProviderRequestRetries: true
|
|
62783
|
+
};
|
|
62784
|
+
DETERMINISTIC_RETRY_CAPABILITY = {
|
|
62785
|
+
replaySafety: "safe",
|
|
62786
|
+
automaticCategories: []
|
|
62787
|
+
};
|
|
62788
|
+
CONTROL_RETRY_CAPABILITY = {
|
|
62789
|
+
replaySafety: "never",
|
|
62790
|
+
automaticCategories: []
|
|
62791
|
+
};
|
|
62792
|
+
FILE_OUTPUT_RETRY_CAPABILITY = {
|
|
62793
|
+
replaySafety: "never",
|
|
62794
|
+
automaticCategories: []
|
|
62795
|
+
};
|
|
62796
|
+
STEP_RETRY_CAPABILITIES = {
|
|
62797
|
+
"ai.parse": AI_RETRY_CAPABILITY,
|
|
62798
|
+
"ai.extract": AI_RETRY_CAPABILITY,
|
|
62799
|
+
"ai.split": AI_RETRY_CAPABILITY,
|
|
62800
|
+
"ai.segment": AI_RETRY_CAPABILITY,
|
|
62801
|
+
"ai.classify": AI_RETRY_CAPABILITY,
|
|
62802
|
+
"transform.set": DETERMINISTIC_RETRY_CAPABILITY,
|
|
62803
|
+
"transform.remove": DETERMINISTIC_RETRY_CAPABILITY,
|
|
62804
|
+
"transform.combine": DETERMINISTIC_RETRY_CAPABILITY,
|
|
62805
|
+
"transform.split": DETERMINISTIC_RETRY_CAPABILITY,
|
|
62806
|
+
"transform.merge": DETERMINISTIC_RETRY_CAPABILITY,
|
|
62807
|
+
"transform.template": FILE_OUTPUT_RETRY_CAPABILITY,
|
|
62808
|
+
"transform.pdf-embed": FILE_OUTPUT_RETRY_CAPABILITY,
|
|
62809
|
+
"transform.xlsx-to-json": FILE_OUTPUT_RETRY_CAPABILITY,
|
|
62810
|
+
"transform.script": DETERMINISTIC_RETRY_CAPABILITY,
|
|
62811
|
+
"transform.text-chunker": DETERMINISTIC_RETRY_CAPABILITY,
|
|
62812
|
+
"transform.regex-extract": DETERMINISTIC_RETRY_CAPABILITY,
|
|
62813
|
+
"action.http": {
|
|
62814
|
+
replaySafety: "requires-idempotency",
|
|
62815
|
+
automaticCategories: ["timeout", "rate_limited", "temporarily_unavailable"]
|
|
62816
|
+
},
|
|
62817
|
+
"action.invoke-workflow": {
|
|
62818
|
+
replaySafety: "requires-idempotency",
|
|
62819
|
+
automaticCategories: ["timeout", "temporarily_unavailable"]
|
|
62820
|
+
},
|
|
62821
|
+
"action.website-reader": {
|
|
62822
|
+
replaySafety: "safe",
|
|
62823
|
+
automaticCategories: ["timeout", "rate_limited", "temporarily_unavailable"]
|
|
62824
|
+
},
|
|
62825
|
+
"control.if": CONTROL_RETRY_CAPABILITY,
|
|
62826
|
+
"control.switch": CONTROL_RETRY_CAPABILITY,
|
|
62827
|
+
"control.foreach": CONTROL_RETRY_CAPABILITY,
|
|
62828
|
+
"control.parallel": CONTROL_RETRY_CAPABILITY,
|
|
62829
|
+
"control.parallel_map": CONTROL_RETRY_CAPABILITY,
|
|
62830
|
+
"control.wait": CONTROL_RETRY_CAPABILITY,
|
|
62831
|
+
"control.fail": CONTROL_RETRY_CAPABILITY
|
|
62832
|
+
};
|
|
65165
62833
|
STEP_SCHEMAS = {
|
|
65166
62834
|
"ai.parse": {
|
|
65167
62835
|
type: "ai.parse",
|
|
@@ -65413,6 +63081,81 @@ var init_actions = __esm(() => {
|
|
|
65413
63081
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
65414
63082
|
});
|
|
65415
63083
|
|
|
63084
|
+
// ../types/src/processor/execution.ts
|
|
63085
|
+
function asTuple(values) {
|
|
63086
|
+
return values;
|
|
63087
|
+
}
|
|
63088
|
+
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
63089
|
+
var init_execution = __esm(() => {
|
|
63090
|
+
init_zod();
|
|
63091
|
+
WorkflowExecutionStatusValue2 = {
|
|
63092
|
+
CREATED: "created",
|
|
63093
|
+
PENDING: "pending",
|
|
63094
|
+
RUNNING: "running",
|
|
63095
|
+
WAITING: "waiting",
|
|
63096
|
+
COMPLETED: "completed",
|
|
63097
|
+
FAILED: "failed",
|
|
63098
|
+
CANCELLED: "cancelled"
|
|
63099
|
+
};
|
|
63100
|
+
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
63101
|
+
WorkflowExecutionStatusValue2.CREATED,
|
|
63102
|
+
WorkflowExecutionStatusValue2.PENDING,
|
|
63103
|
+
WorkflowExecutionStatusValue2.RUNNING,
|
|
63104
|
+
WorkflowExecutionStatusValue2.WAITING,
|
|
63105
|
+
WorkflowExecutionStatusValue2.COMPLETED,
|
|
63106
|
+
WorkflowExecutionStatusValue2.FAILED,
|
|
63107
|
+
WorkflowExecutionStatusValue2.CANCELLED
|
|
63108
|
+
]);
|
|
63109
|
+
StepExecutionStatusValue2 = {
|
|
63110
|
+
PENDING: "pending",
|
|
63111
|
+
RUNNING: "running",
|
|
63112
|
+
SUCCESS: "success",
|
|
63113
|
+
FAILURE: "failure",
|
|
63114
|
+
WAITING: "waiting",
|
|
63115
|
+
SKIPPED: "skipped"
|
|
63116
|
+
};
|
|
63117
|
+
StepExecutionStatusSchema2 = exports_external.enum([
|
|
63118
|
+
StepExecutionStatusValue2.PENDING,
|
|
63119
|
+
StepExecutionStatusValue2.RUNNING,
|
|
63120
|
+
StepExecutionStatusValue2.SUCCESS,
|
|
63121
|
+
StepExecutionStatusValue2.FAILURE,
|
|
63122
|
+
StepExecutionStatusValue2.WAITING,
|
|
63123
|
+
StepExecutionStatusValue2.SKIPPED
|
|
63124
|
+
]);
|
|
63125
|
+
TriggerTypeValue2 = {
|
|
63126
|
+
MANUAL: "manual",
|
|
63127
|
+
API: "api",
|
|
63128
|
+
WEBHOOK: "webhook",
|
|
63129
|
+
SCHEDULE: "schedule",
|
|
63130
|
+
EMAIL: "email",
|
|
63131
|
+
EVAL: "eval",
|
|
63132
|
+
CLI: "cli"
|
|
63133
|
+
};
|
|
63134
|
+
TriggerTypeSchema2 = exports_external.enum([
|
|
63135
|
+
TriggerTypeValue2.MANUAL,
|
|
63136
|
+
TriggerTypeValue2.API,
|
|
63137
|
+
TriggerTypeValue2.WEBHOOK,
|
|
63138
|
+
TriggerTypeValue2.SCHEDULE,
|
|
63139
|
+
TriggerTypeValue2.EMAIL,
|
|
63140
|
+
TriggerTypeValue2.EVAL,
|
|
63141
|
+
TriggerTypeValue2.CLI
|
|
63142
|
+
]);
|
|
63143
|
+
ExecutionTypeValue2 = {
|
|
63144
|
+
PROD: "prod",
|
|
63145
|
+
EVAL: "eval",
|
|
63146
|
+
PLAYGROUND: "playground"
|
|
63147
|
+
};
|
|
63148
|
+
ExecutionTypeSchema2 = exports_external.enum([
|
|
63149
|
+
ExecutionTypeValue2.PROD,
|
|
63150
|
+
ExecutionTypeValue2.EVAL,
|
|
63151
|
+
ExecutionTypeValue2.PLAYGROUND
|
|
63152
|
+
]);
|
|
63153
|
+
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
63154
|
+
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
63155
|
+
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
63156
|
+
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
63157
|
+
});
|
|
63158
|
+
|
|
65416
63159
|
// ../types/src/workflow/workflow.ts
|
|
65417
63160
|
function suggestWorkflowName(raw) {
|
|
65418
63161
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -65435,6 +63178,7 @@ var WORKFLOW_NAME_PATTERN, WorkflowNameSchema, WorkflowInputDefSchema, ManualTri
|
|
|
65435
63178
|
var init_workflow = __esm(() => {
|
|
65436
63179
|
init_zod();
|
|
65437
63180
|
init_common();
|
|
63181
|
+
init_retry();
|
|
65438
63182
|
init_steps();
|
|
65439
63183
|
WORKFLOW_NAME_PATTERN = /^[a-z0-9][a-z0-9_-]*$/;
|
|
65440
63184
|
WorkflowNameSchema = exports_external.string().min(1).max(64).regex(WORKFLOW_NAME_PATTERN, 'Workflow name must start with a lowercase letter or digit and contain only lowercase letters, digits, "_" or "-".');
|
|
@@ -65493,11 +63237,11 @@ var init_workflow = __esm(() => {
|
|
|
65493
63237
|
ManualTriggerMethodSchema = exports_external.object({
|
|
65494
63238
|
type: exports_external.literal("manual"),
|
|
65495
63239
|
enabled: exports_external.boolean().optional(),
|
|
65496
|
-
inputSchema:
|
|
63240
|
+
inputSchema: JsonSchemaSchema2.optional()
|
|
65497
63241
|
});
|
|
65498
63242
|
ApiTriggerMethodSchema = exports_external.object({
|
|
65499
63243
|
type: exports_external.literal("api"),
|
|
65500
|
-
inputSchema:
|
|
63244
|
+
inputSchema: JsonSchemaSchema2.optional()
|
|
65501
63245
|
});
|
|
65502
63246
|
EmailTriggerMethodSchema = exports_external.object({
|
|
65503
63247
|
type: exports_external.literal("email"),
|
|
@@ -65514,9 +63258,10 @@ var init_workflow = __esm(() => {
|
|
|
65514
63258
|
TriggerMethodsSchema = exports_external.array(TriggerMethodSchema).default([{ type: "manual" }]);
|
|
65515
63259
|
WorkflowSettingsSchema = exports_external.object({
|
|
65516
63260
|
timeout: exports_external.number().positive().optional(),
|
|
63261
|
+
retry: WorkflowRetryPolicySchema.optional(),
|
|
65517
63262
|
retries: exports_external.number().int().min(0).optional(),
|
|
65518
63263
|
retryDelay: exports_external.number().positive().optional()
|
|
65519
|
-
});
|
|
63264
|
+
}).strict();
|
|
65520
63265
|
WorkflowDefinitionSchema = exports_external.object({
|
|
65521
63266
|
name: WorkflowNameSchema,
|
|
65522
63267
|
kind: exports_external.enum(["workflow"]).default("workflow").optional(),
|
|
@@ -65536,8 +63281,8 @@ var init_workflow = __esm(() => {
|
|
|
65536
63281
|
yamlContent: exports_external.string(),
|
|
65537
63282
|
definition: WorkflowDefinitionSchema,
|
|
65538
63283
|
isCurrent: exports_external.boolean().default(true),
|
|
65539
|
-
createdAt:
|
|
65540
|
-
updatedAt:
|
|
63284
|
+
createdAt: TimestampSchema2,
|
|
63285
|
+
updatedAt: TimestampSchema2.optional(),
|
|
65541
63286
|
createdBy: exports_external.string()
|
|
65542
63287
|
});
|
|
65543
63288
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -65719,14 +63464,15 @@ function isFileOutput(value) {
|
|
|
65719
63464
|
function isWorkflowResult(value) {
|
|
65720
63465
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
65721
63466
|
}
|
|
65722
|
-
var
|
|
63467
|
+
var WorkflowExecutionStatusSchema3, StepExecutionStatusSchema3, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, StepExecutionAttemptSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
65723
63468
|
var init_execution2 = __esm(() => {
|
|
65724
63469
|
init_zod();
|
|
65725
63470
|
init_common();
|
|
65726
63471
|
init_execution();
|
|
63472
|
+
init_retry();
|
|
65727
63473
|
init_workflow();
|
|
65728
|
-
|
|
65729
|
-
|
|
63474
|
+
WorkflowExecutionStatusSchema3 = WorkflowExecutionStatusSchema2;
|
|
63475
|
+
StepExecutionStatusSchema3 = StepExecutionStatusSchema2;
|
|
65730
63476
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
65731
63477
|
"root",
|
|
65732
63478
|
"if-then",
|
|
@@ -65749,7 +63495,7 @@ var init_execution2 = __esm(() => {
|
|
|
65749
63495
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
65750
63496
|
StepResultSchema = exports_external.object({
|
|
65751
63497
|
output: exports_external.unknown(),
|
|
65752
|
-
status:
|
|
63498
|
+
status: StepExecutionStatusSchema3
|
|
65753
63499
|
});
|
|
65754
63500
|
ExecutionContextSchema = exports_external.object({
|
|
65755
63501
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -65777,23 +63523,24 @@ var init_execution2 = __esm(() => {
|
|
|
65777
63523
|
triggerType: exports_external.string(),
|
|
65778
63524
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
65779
63525
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
65780
|
-
status:
|
|
63526
|
+
status: WorkflowExecutionStatusSchema3,
|
|
65781
63527
|
scopeStack: ScopeStackSchema,
|
|
65782
63528
|
currentStepIndex: exports_external.number(),
|
|
65783
63529
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
65784
63530
|
result: exports_external.unknown().nullable(),
|
|
65785
63531
|
error: exports_external.string().nullable(),
|
|
65786
63532
|
priority: exports_external.number().default(50),
|
|
63533
|
+
availableAt: TimestampSchema2,
|
|
65787
63534
|
leaseId: exports_external.string().nullable(),
|
|
65788
|
-
leaseExpiresAt:
|
|
63535
|
+
leaseExpiresAt: TimestampSchema2.nullable(),
|
|
65789
63536
|
workerId: exports_external.string().nullable(),
|
|
65790
63537
|
maxRetries: exports_external.number().default(0),
|
|
65791
63538
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
65792
63539
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
65793
63540
|
retryNumber: exports_external.number().default(0),
|
|
65794
|
-
createdAt:
|
|
65795
|
-
startedAt:
|
|
65796
|
-
completedAt:
|
|
63541
|
+
createdAt: TimestampSchema2,
|
|
63542
|
+
startedAt: TimestampSchema2.nullable(),
|
|
63543
|
+
completedAt: TimestampSchema2.nullable(),
|
|
65797
63544
|
createdBy: exports_external.string().nullable()
|
|
65798
63545
|
});
|
|
65799
63546
|
StepExecutionSchema = exports_external.object({
|
|
@@ -65808,14 +63555,34 @@ var init_execution2 = __esm(() => {
|
|
|
65808
63555
|
scopeHash: exports_external.string(),
|
|
65809
63556
|
executionOrder: exports_external.number(),
|
|
65810
63557
|
stepAttempt: exports_external.number().default(0),
|
|
63558
|
+
stepPath: exports_external.string().nullable().optional(),
|
|
63559
|
+
effectiveRetryPolicy: ResolvedRetryPolicySchema.nullable().optional(),
|
|
63560
|
+
retryPolicySource: RetryPolicySourceSchema.nullable().optional(),
|
|
63561
|
+
latestAttempt: exports_external.number().default(0),
|
|
63562
|
+
nextAttemptAt: TimestampSchema2.nullable().optional(),
|
|
65811
63563
|
inputData: exports_external.unknown().nullable(),
|
|
65812
63564
|
outputData: exports_external.unknown().nullable(),
|
|
65813
|
-
status:
|
|
63565
|
+
status: StepExecutionStatusSchema3,
|
|
65814
63566
|
error: exports_external.string().nullable(),
|
|
65815
63567
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
65816
63568
|
durationMs: exports_external.number().nullable(),
|
|
65817
|
-
startedAt:
|
|
65818
|
-
completedAt:
|
|
63569
|
+
startedAt: TimestampSchema2.nullable(),
|
|
63570
|
+
completedAt: TimestampSchema2.nullable()
|
|
63571
|
+
});
|
|
63572
|
+
StepExecutionAttemptSchema = exports_external.object({
|
|
63573
|
+
id: exports_external.string(),
|
|
63574
|
+
stepExecutionId: exports_external.string(),
|
|
63575
|
+
executionId: exports_external.string(),
|
|
63576
|
+
tenantId: exports_external.string(),
|
|
63577
|
+
attemptNumber: exports_external.number().int().min(1),
|
|
63578
|
+
status: exports_external.enum(["running", "success", "failure", "cancelled"]),
|
|
63579
|
+
resolvedConfig: exports_external.unknown().nullable(),
|
|
63580
|
+
failure: ExecutionFailureSchema.nullable(),
|
|
63581
|
+
retryDecision: RetryDecisionSchema.nullable(),
|
|
63582
|
+
replaySafe: exports_external.boolean().nullable(),
|
|
63583
|
+
startedAt: TimestampSchema2,
|
|
63584
|
+
completedAt: TimestampSchema2.nullable(),
|
|
63585
|
+
durationMs: exports_external.number().nullable()
|
|
65819
63586
|
});
|
|
65820
63587
|
ConnectorSchema = exports_external.object({
|
|
65821
63588
|
id: exports_external.string(),
|
|
@@ -65826,8 +63593,8 @@ var init_execution2 = __esm(() => {
|
|
|
65826
63593
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
65827
63594
|
inputSchema: exports_external.unknown().optional(),
|
|
65828
63595
|
outputSchema: exports_external.unknown().optional(),
|
|
65829
|
-
createdAt:
|
|
65830
|
-
updatedAt:
|
|
63596
|
+
createdAt: TimestampSchema2,
|
|
63597
|
+
updatedAt: TimestampSchema2.optional(),
|
|
65831
63598
|
createdBy: exports_external.string()
|
|
65832
63599
|
});
|
|
65833
63600
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -66000,6 +63767,7 @@ var init_workflow2 = __esm(() => {
|
|
|
66000
63767
|
init_step_configs();
|
|
66001
63768
|
init_actions();
|
|
66002
63769
|
init_steps();
|
|
63770
|
+
init_retry();
|
|
66003
63771
|
init_workflow();
|
|
66004
63772
|
init_expected_output();
|
|
66005
63773
|
init_local_meta();
|
|
@@ -66792,8 +64560,8 @@ function parseRunTarget(target) {
|
|
|
66792
64560
|
if (root !== "agents") {
|
|
66793
64561
|
throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
|
|
66794
64562
|
}
|
|
66795
|
-
for (const
|
|
66796
|
-
RunTargetSegmentSchema.parse(
|
|
64563
|
+
for (const segment of segments) {
|
|
64564
|
+
RunTargetSegmentSchema.parse(segment);
|
|
66797
64565
|
}
|
|
66798
64566
|
const packagePath = packageName.split(".").join("/");
|
|
66799
64567
|
const [, ...slugParts] = packagePath.split("/");
|
|
@@ -66906,9 +64674,9 @@ var init_grammar = __esm(() => {
|
|
|
66906
64674
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
66907
64675
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
66908
64676
|
}
|
|
66909
|
-
for (const
|
|
66910
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
66911
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
64677
|
+
for (const segment of parts.slice(1)) {
|
|
64678
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
64679
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
66912
64680
|
}
|
|
66913
64681
|
}
|
|
66914
64682
|
});
|
|
@@ -66924,9 +64692,9 @@ var init_grammar = __esm(() => {
|
|
|
66924
64692
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
66925
64693
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
66926
64694
|
}
|
|
66927
|
-
for (const
|
|
66928
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
66929
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
64695
|
+
for (const segment of parts.slice(1)) {
|
|
64696
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
64697
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
66930
64698
|
}
|
|
66931
64699
|
}
|
|
66932
64700
|
});
|
|
@@ -67020,9 +64788,9 @@ var init_grammar = __esm(() => {
|
|
|
67020
64788
|
});
|
|
67021
64789
|
return;
|
|
67022
64790
|
}
|
|
67023
|
-
for (const
|
|
67024
|
-
if (!RunTargetSegmentSchema.safeParse(
|
|
67025
|
-
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${
|
|
64791
|
+
for (const segment of parts.slice(1)) {
|
|
64792
|
+
if (!RunTargetSegmentSchema.safeParse(segment).success) {
|
|
64793
|
+
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment}` });
|
|
67026
64794
|
}
|
|
67027
64795
|
}
|
|
67028
64796
|
if (ref) {
|
|
@@ -67772,7 +65540,7 @@ function fromBig(n, le = false) {
|
|
|
67772
65540
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
67773
65541
|
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
67774
65542
|
}
|
|
67775
|
-
function
|
|
65543
|
+
function split(lst, le = false) {
|
|
67776
65544
|
const len = lst.length;
|
|
67777
65545
|
let Ah = new Uint32Array(len);
|
|
67778
65546
|
let Al = new Uint32Array(len);
|
|
@@ -67952,7 +65720,7 @@ var init_sha2 = __esm(() => {
|
|
|
67952
65720
|
super(28);
|
|
67953
65721
|
}
|
|
67954
65722
|
};
|
|
67955
|
-
K512 = /* @__PURE__ */ (() =>
|
|
65723
|
+
K512 = /* @__PURE__ */ (() => split([
|
|
67956
65724
|
"0x428a2f98d728ae22",
|
|
67957
65725
|
"0x7137449123ef65cd",
|
|
67958
65726
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -68341,11 +66109,11 @@ function walkGrammar(node, parts) {
|
|
|
68341
66109
|
}
|
|
68342
66110
|
return current;
|
|
68343
66111
|
}
|
|
68344
|
-
function normalizeTemplate(
|
|
68345
|
-
return
|
|
66112
|
+
function normalizeTemplate(template) {
|
|
66113
|
+
return template.endsWith("/") ? template.slice(0, -1) : template;
|
|
68346
66114
|
}
|
|
68347
|
-
function renderTemplate(
|
|
68348
|
-
return normalizeTemplate(
|
|
66115
|
+
function renderTemplate(template, params) {
|
|
66116
|
+
return normalizeTemplate(template).split("/").flatMap((part) => {
|
|
68349
66117
|
if (!part.startsWith(":")) {
|
|
68350
66118
|
return [part];
|
|
68351
66119
|
}
|
|
@@ -68355,36 +66123,36 @@ function renderTemplate(template2, params) {
|
|
|
68355
66123
|
throw new Error(`Missing S3 path parameter: ${part}`);
|
|
68356
66124
|
}
|
|
68357
66125
|
if (name === "path") {
|
|
68358
|
-
return value.split("/").map((
|
|
66126
|
+
return value.split("/").map((segment) => assertSegment("path", segment));
|
|
68359
66127
|
}
|
|
68360
66128
|
return [assertSegment(String(name), value)];
|
|
68361
66129
|
});
|
|
68362
66130
|
}
|
|
68363
|
-
function buildS3Path(tenantId,
|
|
66131
|
+
function buildS3Path(tenantId, template, params) {
|
|
68364
66132
|
const tenant = assertSegment("tenantId", tenantId);
|
|
68365
|
-
const parts = renderTemplate(
|
|
66133
|
+
const parts = renderTemplate(template, params);
|
|
68366
66134
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68367
|
-
if (
|
|
68368
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66135
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
66136
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68369
66137
|
}
|
|
68370
66138
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
68371
|
-
return
|
|
66139
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
68372
66140
|
}
|
|
68373
|
-
function buildS3PathSuffix(
|
|
68374
|
-
const parts = renderTemplate(
|
|
66141
|
+
function buildS3PathSuffix(template, params) {
|
|
66142
|
+
const parts = renderTemplate(template, params);
|
|
68375
66143
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68376
|
-
if (
|
|
68377
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66144
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
66145
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68378
66146
|
}
|
|
68379
66147
|
const path = parts.join("/");
|
|
68380
|
-
return
|
|
66148
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
68381
66149
|
}
|
|
68382
66150
|
function stripTenantPrefix(key) {
|
|
68383
66151
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
68384
66152
|
}
|
|
68385
|
-
function matchS3Path(
|
|
66153
|
+
function matchS3Path(template, key) {
|
|
68386
66154
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
68387
|
-
const templateParts = normalizeTemplate(
|
|
66155
|
+
const templateParts = normalizeTemplate(template).split("/");
|
|
68388
66156
|
const params = {};
|
|
68389
66157
|
let keyIndex = 0;
|
|
68390
66158
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -68403,7 +66171,7 @@ function matchS3Path(template2, key) {
|
|
|
68403
66171
|
if (rest.length === 0)
|
|
68404
66172
|
return null;
|
|
68405
66173
|
try {
|
|
68406
|
-
params.path = rest.map((
|
|
66174
|
+
params.path = rest.map((segment) => assertSegment("path", segment)).join("/");
|
|
68407
66175
|
walkGrammar(S3_PATH_GRAMMAR, keyParts);
|
|
68408
66176
|
} catch {
|
|
68409
66177
|
return null;
|
|
@@ -68437,23 +66205,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
68437
66205
|
}
|
|
68438
66206
|
return assertSegment("tenantId", tenantId);
|
|
68439
66207
|
};
|
|
68440
|
-
const build = (
|
|
66208
|
+
const build = (template, params) => {
|
|
68441
66209
|
const tenant = resolveTenantId(params);
|
|
68442
|
-
const parts = renderTemplate(
|
|
66210
|
+
const parts = renderTemplate(template, params ?? {});
|
|
68443
66211
|
const node = walkGrammar(grammarNode, parts);
|
|
68444
|
-
if (
|
|
68445
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66212
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
66213
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68446
66214
|
}
|
|
68447
66215
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
68448
|
-
return
|
|
66216
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
68449
66217
|
};
|
|
68450
66218
|
const builder = build;
|
|
68451
|
-
builder.at = (
|
|
66219
|
+
builder.at = (template, params) => {
|
|
68452
66220
|
const tenant = resolveTenantId(params);
|
|
68453
|
-
const parts = renderTemplate(
|
|
66221
|
+
const parts = renderTemplate(template, params ?? {});
|
|
68454
66222
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
68455
|
-
if (
|
|
68456
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66223
|
+
if (template.endsWith("/") && nextNode === PATH_LEAF) {
|
|
66224
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68457
66225
|
}
|
|
68458
66226
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
68459
66227
|
};
|
|
@@ -68658,6 +66426,7 @@ __export(exports_src, {
|
|
|
68658
66426
|
runExpandErrorMessage: () => runExpandErrorMessage,
|
|
68659
66427
|
rootS3Path: () => rootS3Path,
|
|
68660
66428
|
resolveWorkflowPassThreshold: () => resolveWorkflowPassThreshold,
|
|
66429
|
+
resolveRetryPolicy: () => resolveRetryPolicy,
|
|
68661
66430
|
resolveEffectiveMimeType: () => resolveEffectiveMimeType,
|
|
68662
66431
|
resolveAgentOriginalSourceRef: () => resolveAgentOriginalSourceRef,
|
|
68663
66432
|
requiresSpecializedParser: () => requiresSpecializedParser,
|
|
@@ -68716,6 +66485,7 @@ __export(exports_src, {
|
|
|
68716
66485
|
getTriggerMethods: () => getTriggerMethods,
|
|
68717
66486
|
getSupportedFormatsLabel: () => getSupportedFormatsLabel,
|
|
68718
66487
|
getStepSchema: () => getStepSchema,
|
|
66488
|
+
getStepRetryCapability: () => getStepRetryCapability,
|
|
68719
66489
|
getStepOutputSchema: () => getStepOutputSchema,
|
|
68720
66490
|
getStepConfigSchema: () => getStepConfigSchema,
|
|
68721
66491
|
getRequiredOutputKeys: () => getRequiredOutputKeys,
|
|
@@ -68780,6 +66550,7 @@ __export(exports_src, {
|
|
|
68780
66550
|
WorkspaceDependencySchema: () => WorkspaceDependencySchema,
|
|
68781
66551
|
WorkspaceDependencyNameSchema: () => WorkspaceDependencyNameSchema,
|
|
68782
66552
|
WorkflowSettingsSchema: () => WorkflowSettingsSchema,
|
|
66553
|
+
WorkflowRetryPolicySchema: () => WorkflowRetryPolicySchema,
|
|
68783
66554
|
WorkflowResultSchema: () => WorkflowResultSchema,
|
|
68784
66555
|
WorkflowPackageManifestSchema: () => WorkflowPackageManifestSchema,
|
|
68785
66556
|
WorkflowNameSchema: () => WorkflowNameSchema,
|
|
@@ -68833,17 +66604,20 @@ __export(exports_src, {
|
|
|
68833
66604
|
StepTypeValue: () => StepTypeValue,
|
|
68834
66605
|
StepTypeSchema: () => StepTypeSchema,
|
|
68835
66606
|
StepSchema: () => StepSchema,
|
|
66607
|
+
StepRetryPolicySchema: () => StepRetryPolicySchema,
|
|
66608
|
+
StepRetryCapabilitySchema: () => StepRetryCapabilitySchema,
|
|
68836
66609
|
StepResultSchema: () => StepResultSchema,
|
|
68837
66610
|
StepInputReferenceSchema: () => StepInputReferenceSchema,
|
|
68838
66611
|
StepExecutionStatusValue: () => StepExecutionStatusValue,
|
|
68839
66612
|
StepExecutionStatusSchema: () => StepExecutionStatusSchema,
|
|
68840
66613
|
StepExecutionSchema: () => StepExecutionSchema,
|
|
66614
|
+
StepExecutionAttemptSchema: () => StepExecutionAttemptSchema,
|
|
68841
66615
|
SplitOutputSchema: () => SplitOutputSchema,
|
|
68842
66616
|
SplitInputSchema: () => SplitInputSchema,
|
|
68843
66617
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
68844
66618
|
SpanTypes: () => SpanTypes,
|
|
68845
66619
|
SpanKindMap: () => SpanKindMap,
|
|
68846
|
-
SpanKind: () =>
|
|
66620
|
+
SpanKind: () => SpanKind,
|
|
68847
66621
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
68848
66622
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
68849
66623
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -68867,6 +66641,7 @@ __export(exports_src, {
|
|
|
68867
66641
|
ScopeEntrySchema: () => ScopeEntrySchema,
|
|
68868
66642
|
STEP_TYPES: () => STEP_TYPES,
|
|
68869
66643
|
STEP_SCHEMAS: () => STEP_SCHEMAS,
|
|
66644
|
+
STEP_RETRY_CAPABILITIES: () => STEP_RETRY_CAPABILITIES,
|
|
68870
66645
|
STEP_EXECUTION_STATUSES: () => STEP_EXECUTION_STATUSES,
|
|
68871
66646
|
SOURCE_VERSION_RANGE_PATTERN: () => SOURCE_VERSION_RANGE_PATTERN,
|
|
68872
66647
|
SOURCE_SEMVER_PATTERN: () => SOURCE_SEMVER_PATTERN,
|
|
@@ -68884,6 +66659,11 @@ __export(exports_src, {
|
|
|
68884
66659
|
RunTargetSchema: () => RunTargetSchema,
|
|
68885
66660
|
RunTargetObjectSchema: () => RunTargetObjectSchema,
|
|
68886
66661
|
RootSourceManifestSchema: () => RootSourceManifestSchema,
|
|
66662
|
+
RetryTerminalReasonSchema: () => RetryTerminalReasonSchema,
|
|
66663
|
+
RetryPolicySourceSchema: () => RetryPolicySourceSchema,
|
|
66664
|
+
RetryDecisionSchema: () => RetryDecisionSchema,
|
|
66665
|
+
RetryCategorySchema: () => RetryCategorySchema,
|
|
66666
|
+
ResolvedRetryPolicySchema: () => ResolvedRetryPolicySchema,
|
|
68887
66667
|
ResolvedProcessorFileSchema: () => ResolvedProcessorFileSchema,
|
|
68888
66668
|
ReleaseTagSchema: () => ReleaseTagSchema,
|
|
68889
66669
|
RUN_TARGET_SEGMENT_PATTERN: () => RUN_TARGET_SEGMENT_PATTERN,
|
|
@@ -68950,7 +66730,7 @@ __export(exports_src, {
|
|
|
68950
66730
|
GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
|
|
68951
66731
|
ForeachStepSchema: () => ForeachStepSchema,
|
|
68952
66732
|
FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
|
|
68953
|
-
FilePathDescriptorSchema: () =>
|
|
66733
|
+
FilePathDescriptorSchema: () => FilePathDescriptorSchema2,
|
|
68954
66734
|
FileIngressRefSchema: () => FileIngressRefSchema,
|
|
68955
66735
|
FileIdIngressRefSchema: () => FileIdIngressRefSchema,
|
|
68956
66736
|
FailStepSchema: () => FailStepSchema,
|
|
@@ -68967,6 +66747,7 @@ __export(exports_src, {
|
|
|
68967
66747
|
ExpectedDocumentRefSchema: () => ExpectedDocumentRefSchema,
|
|
68968
66748
|
ExecutionTypeValue: () => ExecutionTypeValue,
|
|
68969
66749
|
ExecutionTypeSchema: () => ExecutionTypeSchema,
|
|
66750
|
+
ExecutionFailureSchema: () => ExecutionFailureSchema,
|
|
68970
66751
|
ExecutionContextSchema: () => ExecutionContextSchema,
|
|
68971
66752
|
ExactDiffConfigSchema: () => ExactDiffConfigSchema,
|
|
68972
66753
|
EvaluatorsImportRequestSchema: () => EvaluatorsImportRequestSchema,
|
|
@@ -69070,8 +66851,8 @@ var init_src = __esm(() => {
|
|
|
69070
66851
|
init_legacy_boundary();
|
|
69071
66852
|
init_runtime_file_ref();
|
|
69072
66853
|
init_scoped_file_ref();
|
|
69073
|
-
|
|
69074
|
-
|
|
66854
|
+
init_processor();
|
|
66855
|
+
init_parser();
|
|
69075
66856
|
init_otel();
|
|
69076
66857
|
init_execution_row();
|
|
69077
66858
|
init_run_expand();
|
|
@@ -69984,7 +67765,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
69984
67765
|
else
|
|
69985
67766
|
end = lineWidth - indentAtStart;
|
|
69986
67767
|
}
|
|
69987
|
-
let
|
|
67768
|
+
let split2 = undefined;
|
|
69988
67769
|
let prev = undefined;
|
|
69989
67770
|
let overflow = false;
|
|
69990
67771
|
let i = -1;
|
|
@@ -70018,20 +67799,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
70018
67799
|
if (mode === FOLD_BLOCK)
|
|
70019
67800
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
70020
67801
|
end = i + indent.length + endStep;
|
|
70021
|
-
|
|
67802
|
+
split2 = undefined;
|
|
70022
67803
|
} else {
|
|
70023
67804
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
70024
67805
|
` && prev !== "\t") {
|
|
70025
67806
|
const next = text[i + 1];
|
|
70026
67807
|
if (next && next !== " " && next !== `
|
|
70027
67808
|
` && next !== "\t")
|
|
70028
|
-
|
|
67809
|
+
split2 = i;
|
|
70029
67810
|
}
|
|
70030
67811
|
if (i >= end) {
|
|
70031
|
-
if (
|
|
70032
|
-
folds.push(
|
|
70033
|
-
end =
|
|
70034
|
-
|
|
67812
|
+
if (split2) {
|
|
67813
|
+
folds.push(split2);
|
|
67814
|
+
end = split2 + endStep;
|
|
67815
|
+
split2 = undefined;
|
|
70035
67816
|
} else if (mode === FOLD_QUOTED) {
|
|
70036
67817
|
while (prev === " " || prev === "\t") {
|
|
70037
67818
|
prev = ch;
|
|
@@ -70044,7 +67825,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
70044
67825
|
folds.push(j);
|
|
70045
67826
|
escapedFolds[j] = true;
|
|
70046
67827
|
end = j + endStep;
|
|
70047
|
-
|
|
67828
|
+
split2 = undefined;
|
|
70048
67829
|
} else {
|
|
70049
67830
|
overflow = true;
|
|
70050
67831
|
}
|
|
@@ -70678,7 +68459,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
70678
68459
|
var identity = require_identity();
|
|
70679
68460
|
var Scalar = require_Scalar();
|
|
70680
68461
|
var MERGE_KEY = "<<";
|
|
70681
|
-
var
|
|
68462
|
+
var merge2 = {
|
|
70682
68463
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
70683
68464
|
default: "key",
|
|
70684
68465
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -70688,7 +68469,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
70688
68469
|
}),
|
|
70689
68470
|
stringify: () => MERGE_KEY
|
|
70690
68471
|
};
|
|
70691
|
-
var isMergeKey = (ctx, key) => (
|
|
68472
|
+
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);
|
|
70692
68473
|
function addMergeToJSMap(ctx, map2, value) {
|
|
70693
68474
|
const source = resolveAliasValue(ctx, value);
|
|
70694
68475
|
if (identity.isSeq(source))
|
|
@@ -70727,21 +68508,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
70727
68508
|
}
|
|
70728
68509
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
70729
68510
|
exports.isMergeKey = isMergeKey;
|
|
70730
|
-
exports.merge =
|
|
68511
|
+
exports.merge = merge2;
|
|
70731
68512
|
});
|
|
70732
68513
|
|
|
70733
68514
|
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
70734
68515
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
70735
68516
|
var log = require_log();
|
|
70736
|
-
var
|
|
68517
|
+
var merge2 = require_merge();
|
|
70737
68518
|
var stringify = require_stringify();
|
|
70738
68519
|
var identity = require_identity();
|
|
70739
68520
|
var toJS = require_toJS();
|
|
70740
68521
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
70741
68522
|
if (identity.isNode(key) && key.addToJSMap)
|
|
70742
68523
|
key.addToJSMap(ctx, map2, value);
|
|
70743
|
-
else if (
|
|
70744
|
-
|
|
68524
|
+
else if (merge2.isMergeKey(ctx, key))
|
|
68525
|
+
merge2.addMergeToJSMap(ctx, map2, value);
|
|
70745
68526
|
else {
|
|
70746
68527
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
70747
68528
|
if (map2 instanceof Map) {
|
|
@@ -72017,7 +69798,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
72017
69798
|
var bool = require_bool2();
|
|
72018
69799
|
var float = require_float2();
|
|
72019
69800
|
var int2 = require_int2();
|
|
72020
|
-
var
|
|
69801
|
+
var merge2 = require_merge();
|
|
72021
69802
|
var omap = require_omap();
|
|
72022
69803
|
var pairs = require_pairs();
|
|
72023
69804
|
var set2 = require_set();
|
|
@@ -72037,7 +69818,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
72037
69818
|
float.floatExp,
|
|
72038
69819
|
float.float,
|
|
72039
69820
|
binary.binary,
|
|
72040
|
-
|
|
69821
|
+
merge2.merge,
|
|
72041
69822
|
omap.omap,
|
|
72042
69823
|
pairs.pairs,
|
|
72043
69824
|
set2.set,
|
|
@@ -72060,7 +69841,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72060
69841
|
var schema = require_schema();
|
|
72061
69842
|
var schema$1 = require_schema2();
|
|
72062
69843
|
var binary = require_binary();
|
|
72063
|
-
var
|
|
69844
|
+
var merge2 = require_merge();
|
|
72064
69845
|
var omap = require_omap();
|
|
72065
69846
|
var pairs = require_pairs();
|
|
72066
69847
|
var schema$2 = require_schema3();
|
|
@@ -72085,7 +69866,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72085
69866
|
intOct: int2.intOct,
|
|
72086
69867
|
intTime: timestamp.intTime,
|
|
72087
69868
|
map: map2.map,
|
|
72088
|
-
merge:
|
|
69869
|
+
merge: merge2.merge,
|
|
72089
69870
|
null: _null4.nullTag,
|
|
72090
69871
|
omap: omap.omap,
|
|
72091
69872
|
pairs: pairs.pairs,
|
|
@@ -72095,7 +69876,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72095
69876
|
};
|
|
72096
69877
|
var coreKnownTags = {
|
|
72097
69878
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
72098
|
-
"tag:yaml.org,2002:merge":
|
|
69879
|
+
"tag:yaml.org,2002:merge": merge2.merge,
|
|
72099
69880
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
72100
69881
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
72101
69882
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -72104,7 +69885,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72104
69885
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
72105
69886
|
const schemaTags = schemas3.get(schemaName);
|
|
72106
69887
|
if (schemaTags && !customTags) {
|
|
72107
|
-
return addMergeTag && !schemaTags.includes(
|
|
69888
|
+
return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
|
|
72108
69889
|
}
|
|
72109
69890
|
let tags = schemaTags;
|
|
72110
69891
|
if (!tags) {
|
|
@@ -72122,7 +69903,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72122
69903
|
tags = customTags(tags.slice());
|
|
72123
69904
|
}
|
|
72124
69905
|
if (addMergeTag)
|
|
72125
|
-
tags = tags.concat(
|
|
69906
|
+
tags = tags.concat(merge2.merge);
|
|
72126
69907
|
return tags.reduce((tags2, tag) => {
|
|
72127
69908
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
72128
69909
|
if (!tagObj) {
|
|
@@ -72149,11 +69930,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
72149
69930
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
72150
69931
|
|
|
72151
69932
|
class Schema {
|
|
72152
|
-
constructor({ compat: compat2, customTags, merge:
|
|
69933
|
+
constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
72153
69934
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
72154
69935
|
this.name = typeof schema === "string" && schema || "core";
|
|
72155
69936
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
72156
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
69937
|
+
this.tags = tags.getTags(customTags, this.name, merge2);
|
|
72157
69938
|
this.toStringOptions = toStringDefaults ?? null;
|
|
72158
69939
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
72159
69940
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -73376,13 +71157,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
73376
71157
|
return { mode, indent, chomp, comment, length };
|
|
73377
71158
|
}
|
|
73378
71159
|
function splitLines(source) {
|
|
73379
|
-
const
|
|
73380
|
-
const first =
|
|
71160
|
+
const split2 = source.split(/\n( *)/);
|
|
71161
|
+
const first = split2[0];
|
|
73381
71162
|
const m = first.match(/^( *)/);
|
|
73382
71163
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
73383
71164
|
const lines = [line0];
|
|
73384
|
-
for (let i = 1;i <
|
|
73385
|
-
lines.push([
|
|
71165
|
+
for (let i = 1;i < split2.length; i += 2)
|
|
71166
|
+
lines.push([split2[i], split2[i + 1]]);
|
|
73386
71167
|
return lines;
|
|
73387
71168
|
}
|
|
73388
71169
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -76396,7 +74177,7 @@ var init_main = __esm(() => {
|
|
|
76396
74177
|
});
|
|
76397
74178
|
|
|
76398
74179
|
// ../../node_modules/sisteransi/src/index.js
|
|
76399
|
-
var
|
|
74180
|
+
var require_src = __commonJS((exports, module) => {
|
|
76400
74181
|
var ESC2 = "\x1B";
|
|
76401
74182
|
var CSI2 = `${ESC2}[`;
|
|
76402
74183
|
var beep = "\x07";
|
|
@@ -76739,7 +74520,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
76739
74520
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
76740
74521
|
var init_dist3 = __esm(() => {
|
|
76741
74522
|
init_main();
|
|
76742
|
-
import_sisteransi = __toESM(
|
|
74523
|
+
import_sisteransi = __toESM(require_src(), 1);
|
|
76743
74524
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
76744
74525
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
76745
74526
|
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)}` } } };
|
|
@@ -78082,7 +75863,7 @@ var init_dist4 = __esm(() => {
|
|
|
78082
75863
|
init_dist3();
|
|
78083
75864
|
init_main();
|
|
78084
75865
|
init_dist2();
|
|
78085
|
-
import_sisteransi2 = __toESM(
|
|
75866
|
+
import_sisteransi2 = __toESM(require_src(), 1);
|
|
78086
75867
|
tt2 = te();
|
|
78087
75868
|
_t = w2("◆", "*");
|
|
78088
75869
|
ot2 = w2("■", "x");
|
|
@@ -171574,7 +169355,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
171574
169355
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
171575
169356
|
}
|
|
171576
169357
|
return to5;
|
|
171577
|
-
}, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), require_array, require_errno, require_fs, require_path, require_is_extglob, require_is_glob, require_glob_parent,
|
|
169358
|
+
}, __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 {
|
|
171578
169359
|
diff(oldStr, newStr, options8 = {}) {
|
|
171579
169360
|
let callback;
|
|
171580
169361
|
if (typeof options8 === "function") {
|
|
@@ -172596,7 +170377,7 @@ var init_prettier = __esm(() => {
|
|
|
172596
170377
|
};
|
|
172597
170378
|
}
|
|
172598
170379
|
});
|
|
172599
|
-
|
|
170380
|
+
require_utils2 = __commonJS2({
|
|
172600
170381
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
172601
170382
|
exports.isInteger = (num) => {
|
|
172602
170383
|
if (typeof num === "number") {
|
|
@@ -172685,7 +170466,7 @@ var init_prettier = __esm(() => {
|
|
|
172685
170466
|
});
|
|
172686
170467
|
require_stringify2 = __commonJS2({
|
|
172687
170468
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
172688
|
-
var utils2 =
|
|
170469
|
+
var utils2 = require_utils2();
|
|
172689
170470
|
module.exports = (ast, options8 = {}) => {
|
|
172690
170471
|
const stringify2 = (node, parent = {}) => {
|
|
172691
170472
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -173139,7 +170920,7 @@ var init_prettier = __esm(() => {
|
|
|
173139
170920
|
require_compile2 = __commonJS2({
|
|
173140
170921
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
173141
170922
|
var fill2 = require_fill_range();
|
|
173142
|
-
var utils2 =
|
|
170923
|
+
var utils2 = require_utils2();
|
|
173143
170924
|
var compile = (ast, options8 = {}) => {
|
|
173144
170925
|
const walk2 = (node, parent = {}) => {
|
|
173145
170926
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -173189,7 +170970,7 @@ var init_prettier = __esm(() => {
|
|
|
173189
170970
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
173190
170971
|
var fill2 = require_fill_range();
|
|
173191
170972
|
var stringify2 = require_stringify2();
|
|
173192
|
-
var utils2 =
|
|
170973
|
+
var utils2 = require_utils2();
|
|
173193
170974
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
173194
170975
|
const result = [];
|
|
173195
170976
|
queue = [].concat(queue);
|
|
@@ -175388,8 +173169,8 @@ var init_prettier = __esm(() => {
|
|
|
175388
173169
|
var Stream = __require2("stream");
|
|
175389
173170
|
var PassThrough = Stream.PassThrough;
|
|
175390
173171
|
var slice = Array.prototype.slice;
|
|
175391
|
-
module.exports =
|
|
175392
|
-
function
|
|
173172
|
+
module.exports = merge2;
|
|
173173
|
+
function merge2() {
|
|
175393
173174
|
const streamsQueue = [];
|
|
175394
173175
|
const args = slice.call(arguments);
|
|
175395
173176
|
let merging = false;
|
|
@@ -175503,9 +173284,9 @@ var init_prettier = __esm(() => {
|
|
|
175503
173284
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
175504
173285
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175505
173286
|
exports.merge = undefined;
|
|
175506
|
-
var
|
|
173287
|
+
var merge2 = require_merge2();
|
|
175507
173288
|
function merge3(streams) {
|
|
175508
|
-
const mergedStream =
|
|
173289
|
+
const mergedStream = merge2(streams);
|
|
175509
173290
|
streams.forEach((stream) => {
|
|
175510
173291
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
175511
173292
|
});
|
|
@@ -175533,7 +173314,7 @@ var init_prettier = __esm(() => {
|
|
|
175533
173314
|
exports.isEmpty = isEmpty;
|
|
175534
173315
|
}
|
|
175535
173316
|
});
|
|
175536
|
-
|
|
173317
|
+
require_utils3 = __commonJS2({
|
|
175537
173318
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
175538
173319
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175539
173320
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -175557,7 +173338,7 @@ var init_prettier = __esm(() => {
|
|
|
175557
173338
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
175558
173339
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175559
173340
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
175560
|
-
var utils2 =
|
|
173341
|
+
var utils2 = require_utils3();
|
|
175561
173342
|
function generate(input, settings) {
|
|
175562
173343
|
const patterns = processPatterns(input, settings);
|
|
175563
173344
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -175866,7 +173647,7 @@ var init_prettier = __esm(() => {
|
|
|
175866
173647
|
exports.createDirentFromStats = createDirentFromStats;
|
|
175867
173648
|
}
|
|
175868
173649
|
});
|
|
175869
|
-
|
|
173650
|
+
require_utils4 = __commonJS2({
|
|
175870
173651
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
175871
173652
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175872
173653
|
exports.fs = undefined;
|
|
@@ -175894,7 +173675,7 @@ var init_prettier = __esm(() => {
|
|
|
175894
173675
|
var fsStat = require_out();
|
|
175895
173676
|
var rpl = require_run_parallel();
|
|
175896
173677
|
var constants_1 = require_constants3();
|
|
175897
|
-
var utils2 =
|
|
173678
|
+
var utils2 = require_utils4();
|
|
175898
173679
|
var common = require_common();
|
|
175899
173680
|
function read3(directory, settings, callback) {
|
|
175900
173681
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -176000,7 +173781,7 @@ var init_prettier = __esm(() => {
|
|
|
176000
173781
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
176001
173782
|
var fsStat = require_out();
|
|
176002
173783
|
var constants_1 = require_constants3();
|
|
176003
|
-
var utils2 =
|
|
173784
|
+
var utils2 = require_utils4();
|
|
176004
173785
|
var common = require_common();
|
|
176005
173786
|
function read3(directory, settings) {
|
|
176006
173787
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -176780,7 +174561,7 @@ var init_prettier = __esm(() => {
|
|
|
176780
174561
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176781
174562
|
var path15 = __require2("path");
|
|
176782
174563
|
var fsStat = require_out();
|
|
176783
|
-
var utils2 =
|
|
174564
|
+
var utils2 = require_utils3();
|
|
176784
174565
|
var Reader = class {
|
|
176785
174566
|
constructor(_settings) {
|
|
176786
174567
|
this._settings = _settings;
|
|
@@ -176904,7 +174685,7 @@ var init_prettier = __esm(() => {
|
|
|
176904
174685
|
require_matcher = __commonJS2({
|
|
176905
174686
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
176906
174687
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176907
|
-
var utils2 =
|
|
174688
|
+
var utils2 = require_utils3();
|
|
176908
174689
|
var Matcher = class {
|
|
176909
174690
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
176910
174691
|
this._patterns = _patterns;
|
|
@@ -176943,7 +174724,7 @@ var init_prettier = __esm(() => {
|
|
|
176943
174724
|
});
|
|
176944
174725
|
}
|
|
176945
174726
|
_splitSegmentsIntoSections(segments) {
|
|
176946
|
-
return utils2.array.splitWhen(segments, (
|
|
174727
|
+
return utils2.array.splitWhen(segments, (segment) => segment.dynamic && utils2.pattern.hasGlobStar(segment.pattern));
|
|
176947
174728
|
}
|
|
176948
174729
|
};
|
|
176949
174730
|
exports.default = Matcher;
|
|
@@ -176964,11 +174745,11 @@ var init_prettier = __esm(() => {
|
|
|
176964
174745
|
return true;
|
|
176965
174746
|
}
|
|
176966
174747
|
const match = parts.every((part, index) => {
|
|
176967
|
-
const
|
|
176968
|
-
if (
|
|
174748
|
+
const segment = pattern.segments[index];
|
|
174749
|
+
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
176969
174750
|
return true;
|
|
176970
174751
|
}
|
|
176971
|
-
if (!
|
|
174752
|
+
if (!segment.dynamic && segment.pattern === part) {
|
|
176972
174753
|
return true;
|
|
176973
174754
|
}
|
|
176974
174755
|
return false;
|
|
@@ -176986,7 +174767,7 @@ var init_prettier = __esm(() => {
|
|
|
176986
174767
|
require_deep = __commonJS2({
|
|
176987
174768
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
176988
174769
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176989
|
-
var utils2 =
|
|
174770
|
+
var utils2 = require_utils3();
|
|
176990
174771
|
var partial_1 = require_partial();
|
|
176991
174772
|
var DeepFilter = class {
|
|
176992
174773
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -177048,7 +174829,7 @@ var init_prettier = __esm(() => {
|
|
|
177048
174829
|
require_entry = __commonJS2({
|
|
177049
174830
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
177050
174831
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177051
|
-
var utils2 =
|
|
174832
|
+
var utils2 = require_utils3();
|
|
177052
174833
|
var EntryFilter = class {
|
|
177053
174834
|
constructor(_settings, _micromatchOptions) {
|
|
177054
174835
|
this._settings = _settings;
|
|
@@ -177133,7 +174914,7 @@ var init_prettier = __esm(() => {
|
|
|
177133
174914
|
require_error2 = __commonJS2({
|
|
177134
174915
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
177135
174916
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177136
|
-
var utils2 =
|
|
174917
|
+
var utils2 = require_utils3();
|
|
177137
174918
|
var ErrorFilter = class {
|
|
177138
174919
|
constructor(_settings) {
|
|
177139
174920
|
this._settings = _settings;
|
|
@@ -177151,7 +174932,7 @@ var init_prettier = __esm(() => {
|
|
|
177151
174932
|
require_entry2 = __commonJS2({
|
|
177152
174933
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
177153
174934
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177154
|
-
var utils2 =
|
|
174935
|
+
var utils2 = require_utils3();
|
|
177155
174936
|
var EntryTransformer = class {
|
|
177156
174937
|
constructor(_settings) {
|
|
177157
174938
|
this._settings = _settings;
|
|
@@ -177419,7 +175200,7 @@ var init_prettier = __esm(() => {
|
|
|
177419
175200
|
var stream_1 = require_stream4();
|
|
177420
175201
|
var sync_1 = require_sync6();
|
|
177421
175202
|
var settings_1 = require_settings4();
|
|
177422
|
-
var utils2 =
|
|
175203
|
+
var utils2 = require_utils3();
|
|
177423
175204
|
async function FastGlob(source2, options8) {
|
|
177424
175205
|
assertPatternsInput(source2);
|
|
177425
175206
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -177737,7 +175518,7 @@ var init_prettier = __esm(() => {
|
|
|
177737
175518
|
};
|
|
177738
175519
|
}
|
|
177739
175520
|
});
|
|
177740
|
-
|
|
175521
|
+
require_semver = __commonJS2({
|
|
177741
175522
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
177742
175523
|
var debug = require_debug();
|
|
177743
175524
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -178007,7 +175788,7 @@ var init_prettier = __esm(() => {
|
|
|
178007
175788
|
});
|
|
178008
175789
|
require_compare = __commonJS2({
|
|
178009
175790
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
178010
|
-
var SemVer =
|
|
175791
|
+
var SemVer = require_semver();
|
|
178011
175792
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
178012
175793
|
module.exports = compare;
|
|
178013
175794
|
}
|
|
@@ -179740,7 +177521,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
179740
177521
|
};
|
|
179741
177522
|
}
|
|
179742
177523
|
});
|
|
179743
|
-
|
|
177524
|
+
require_src2 = __commonJS2({
|
|
179744
177525
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
179745
177526
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
179746
177527
|
return new (P9 || (P9 = Promise))(function(resolve32, reject) {
|
|
@@ -181203,7 +178984,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
181203
178984
|
mockable_default = mockable.mocked;
|
|
181204
178985
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
181205
178986
|
partition_default = partition2;
|
|
181206
|
-
import_editorconfig = __toESM2(
|
|
178987
|
+
import_editorconfig = __toESM2(require_src2(), 1);
|
|
181207
178988
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
181208
178989
|
FileSearcher = class extends Searcher {
|
|
181209
178990
|
findInDirectory = findFile;
|
|
@@ -183799,7 +181580,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
183799
181580
|
// package.json
|
|
183800
181581
|
var package_default = {
|
|
183801
181582
|
name: "@eigenpal/cli",
|
|
183802
|
-
version: "0.10.
|
|
181583
|
+
version: "0.10.20",
|
|
183803
181584
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
183804
181585
|
keywords: [
|
|
183805
181586
|
"eigenpal",
|
|
@@ -185313,7 +183094,7 @@ async function pushCurrentBranch(input) {
|
|
|
185313
183094
|
function slugifyPackageSegment(value) {
|
|
185314
183095
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
185315
183096
|
}
|
|
185316
|
-
function packagePathForTemplate(
|
|
183097
|
+
function packagePathForTemplate(template, name) {
|
|
185317
183098
|
const slug = slugifyPackageSegment(name);
|
|
185318
183099
|
if (!slug)
|
|
185319
183100
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -185325,7 +183106,7 @@ function packagePathForTemplate(template2, name) {
|
|
|
185325
183106
|
knowledge: "resources/knowledge",
|
|
185326
183107
|
evaluator: "evaluators"
|
|
185327
183108
|
};
|
|
185328
|
-
const root = rootByTemplate[
|
|
183109
|
+
const root = rootByTemplate[template];
|
|
185329
183110
|
if (!root)
|
|
185330
183111
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
185331
183112
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -185734,12 +183515,12 @@ function archivePackage(input) {
|
|
|
185734
183515
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
185735
183516
|
cwd: input.gitRoot
|
|
185736
183517
|
});
|
|
185737
|
-
const
|
|
183518
|
+
const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
185738
183519
|
cwd: input.outDir,
|
|
185739
183520
|
encoding: "utf8"
|
|
185740
183521
|
});
|
|
185741
|
-
if (
|
|
185742
|
-
throw new Error(
|
|
183522
|
+
if (extract.status !== 0)
|
|
183523
|
+
throw new Error(extract.stderr.trim() || "tar extraction failed");
|
|
185743
183524
|
} finally {
|
|
185744
183525
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
185745
183526
|
}
|
|
@@ -185768,12 +183549,12 @@ async function tryHostedArchive(input) {
|
|
|
185768
183549
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
185769
183550
|
try {
|
|
185770
183551
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
185771
|
-
const
|
|
183552
|
+
const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
185772
183553
|
cwd: input.outDir,
|
|
185773
183554
|
encoding: "utf8"
|
|
185774
183555
|
});
|
|
185775
|
-
if (
|
|
185776
|
-
throw new Error(
|
|
183556
|
+
if (extract.status !== 0)
|
|
183557
|
+
throw new Error(extract.stderr.trim() || "tar extraction failed");
|
|
185777
183558
|
return true;
|
|
185778
183559
|
} finally {
|
|
185779
183560
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -190128,18 +187909,18 @@ async function init(name, opts) {
|
|
|
190128
187909
|
if (existsSync11(target) && readdirSync2(target).length > 0) {
|
|
190129
187910
|
throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
|
|
190130
187911
|
}
|
|
190131
|
-
let
|
|
187912
|
+
let template;
|
|
190132
187913
|
if (opts.template) {
|
|
190133
187914
|
if (!isTemplateName(opts.template)) {
|
|
190134
187915
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
190135
187916
|
}
|
|
190136
|
-
|
|
187917
|
+
template = opts.template;
|
|
190137
187918
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
190138
|
-
|
|
187919
|
+
template = "blank";
|
|
190139
187920
|
} else {
|
|
190140
|
-
|
|
187921
|
+
template = await promptForTemplate();
|
|
190141
187922
|
}
|
|
190142
|
-
const sourceRoot = join2(resolveTemplatesRoot(),
|
|
187923
|
+
const sourceRoot = join2(resolveTemplatesRoot(), template);
|
|
190143
187924
|
if (!existsSync11(sourceRoot)) {
|
|
190144
187925
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
190145
187926
|
}
|