@eigenpal/cli 0.10.8 → 0.10.9
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 +2886 -314
- package/dist/skill/reference/step-types.md +44 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17080,8 +17080,139 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
17080
17080
|
module.exports.createColors = createColors;
|
|
17081
17081
|
});
|
|
17082
17082
|
|
|
17083
|
+
// ../../node_modules/nanoid/url-alphabet/index.js
|
|
17084
|
+
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
17085
|
+
|
|
17086
|
+
// ../../node_modules/nanoid/index.js
|
|
17087
|
+
import { webcrypto as crypto } from "node:crypto";
|
|
17088
|
+
function fillPool(bytes) {
|
|
17089
|
+
if (!pool || pool.length < bytes) {
|
|
17090
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
17091
|
+
crypto.getRandomValues(pool);
|
|
17092
|
+
poolOffset = 0;
|
|
17093
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
17094
|
+
crypto.getRandomValues(pool);
|
|
17095
|
+
poolOffset = 0;
|
|
17096
|
+
}
|
|
17097
|
+
poolOffset += bytes;
|
|
17098
|
+
}
|
|
17099
|
+
function nanoid3(size = 21) {
|
|
17100
|
+
fillPool(size |= 0);
|
|
17101
|
+
let id = "";
|
|
17102
|
+
for (let i = poolOffset - size;i < poolOffset; i++) {
|
|
17103
|
+
id += urlAlphabet[pool[i] & 63];
|
|
17104
|
+
}
|
|
17105
|
+
return id;
|
|
17106
|
+
}
|
|
17107
|
+
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
|
|
17108
|
+
var init_nanoid = () => {};
|
|
17109
|
+
|
|
17110
|
+
// ../types/src/core/common.ts
|
|
17111
|
+
function generateId(prefix) {
|
|
17112
|
+
const id = nanoid3();
|
|
17113
|
+
return prefix ? `${prefix}_${id}` : id;
|
|
17114
|
+
}
|
|
17115
|
+
function toJsonSchema(schema) {
|
|
17116
|
+
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
17117
|
+
}
|
|
17118
|
+
var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
|
|
17119
|
+
var init_common = __esm(() => {
|
|
17120
|
+
init_nanoid();
|
|
17121
|
+
init_zod();
|
|
17122
|
+
ID_PREFIXES = {
|
|
17123
|
+
WORKFLOW: "wf",
|
|
17124
|
+
WORKFLOW_VERSION: "wfv",
|
|
17125
|
+
WORKFLOW_HISTORY: "wfh",
|
|
17126
|
+
JOB: "job",
|
|
17127
|
+
EXECUTION: "exec",
|
|
17128
|
+
STEP_EXECUTION: "step",
|
|
17129
|
+
FILE: "file",
|
|
17130
|
+
TEMPLATE: "tmpl",
|
|
17131
|
+
USER: "user",
|
|
17132
|
+
TENANT: "org",
|
|
17133
|
+
TENANT_INVITE: "inv",
|
|
17134
|
+
API_KEY: "eig",
|
|
17135
|
+
PROCESSOR: "proc",
|
|
17136
|
+
AI_PROVIDER: "aip",
|
|
17137
|
+
ACCOUNT: "acct",
|
|
17138
|
+
SESSION: "sess",
|
|
17139
|
+
VERIFICATION: "vrf",
|
|
17140
|
+
DATASET: "ds",
|
|
17141
|
+
DATASET_EXAMPLE: "dex",
|
|
17142
|
+
EXPERIMENT: "exp",
|
|
17143
|
+
EXPERIMENT_RUN: "exr",
|
|
17144
|
+
EXPERIMENT_EVALUATION: "evl",
|
|
17145
|
+
EVAL_EXAMPLE: "evx",
|
|
17146
|
+
EVAL_RESULT: "evr",
|
|
17147
|
+
EVAL_BATCH: "evb",
|
|
17148
|
+
RUN_REVIEW: "rev",
|
|
17149
|
+
RUN_REVIEW_CORRECTION: "rvc",
|
|
17150
|
+
TABLE_ROW: "row",
|
|
17151
|
+
FOLDER: "fldr",
|
|
17152
|
+
AGENT_WORKFLOW: "awf",
|
|
17153
|
+
AGENT_EXECUTION: "aex",
|
|
17154
|
+
AGENT_EXAMPLE: "aeg",
|
|
17155
|
+
AGENT_VERSION: "avr",
|
|
17156
|
+
AGENT_TRAINING_SESSION: "ats",
|
|
17157
|
+
AGENT_EXPERIMENT: "aexp",
|
|
17158
|
+
AGENT_EMAIL_ALIAS: "aea",
|
|
17159
|
+
AGENT_EMAIL_INVOCATION: "aei",
|
|
17160
|
+
AUTOMATION_TRIGGER: "atr",
|
|
17161
|
+
FILE_SOURCE_CONFIG: "fsc",
|
|
17162
|
+
SANDBOX_WS_TOKEN: "sws"
|
|
17163
|
+
};
|
|
17164
|
+
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
17165
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
17166
|
+
});
|
|
17167
|
+
JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
17168
|
+
BaseEntitySchema = exports_external.object({
|
|
17169
|
+
id: exports_external.string(),
|
|
17170
|
+
createdAt: TimestampSchema.optional(),
|
|
17171
|
+
updatedAt: TimestampSchema.optional()
|
|
17172
|
+
});
|
|
17173
|
+
});
|
|
17174
|
+
|
|
17175
|
+
// ../types/src/core/ids.ts
|
|
17176
|
+
var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
|
|
17177
|
+
var init_ids = __esm(() => {
|
|
17178
|
+
PROCESSOR_IDS = {
|
|
17179
|
+
MERGE: "builtin/merge",
|
|
17180
|
+
DOCUMENT_PARSER: "builtin/parser",
|
|
17181
|
+
EXTRACT: "builtin/extract",
|
|
17182
|
+
SPLIT: "builtin/split",
|
|
17183
|
+
SEGMENT: "builtin/segment",
|
|
17184
|
+
CLASSIFY: "builtin/classify",
|
|
17185
|
+
TEMPLATE: "builtin/template",
|
|
17186
|
+
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
17187
|
+
XLSX_TO_JSON: "builtin/xlsx-to-json"
|
|
17188
|
+
};
|
|
17189
|
+
PARSER_IDS = {
|
|
17190
|
+
KREUZBERG: "builtin/kreuzberg",
|
|
17191
|
+
OCR: "builtin/ocr",
|
|
17192
|
+
LLM_VISION: "builtin/llm-vision"
|
|
17193
|
+
};
|
|
17194
|
+
INPUT_KINDS = {
|
|
17195
|
+
DOCUMENT: "document",
|
|
17196
|
+
PAYLOAD: "payload"
|
|
17197
|
+
};
|
|
17198
|
+
});
|
|
17199
|
+
|
|
17200
|
+
// ../types/src/core/pagination.ts
|
|
17201
|
+
var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
|
|
17202
|
+
var init_pagination = __esm(() => {
|
|
17203
|
+
init_zod();
|
|
17204
|
+
PaginationParamsSchema = exports_external.object({
|
|
17205
|
+
limit: exports_external.coerce.number().int().min(1).max(100).default(50),
|
|
17206
|
+
offset: exports_external.coerce.number().int().min(0).default(0)
|
|
17207
|
+
});
|
|
17208
|
+
});
|
|
17209
|
+
|
|
17083
17210
|
// ../types/src/core/index.ts
|
|
17084
|
-
var init_core3 = () => {
|
|
17211
|
+
var init_core3 = __esm(() => {
|
|
17212
|
+
init_common();
|
|
17213
|
+
init_ids();
|
|
17214
|
+
init_pagination();
|
|
17215
|
+
});
|
|
17085
17216
|
|
|
17086
17217
|
// ../types/src/files/legacy-boundary.ts
|
|
17087
17218
|
var LEGACY_FILE_REF_COMPATIBILITY;
|
|
@@ -17106,6 +17237,9 @@ var init_legacy_boundary = __esm(() => {
|
|
|
17106
17237
|
function isRuntimeFileRef(input) {
|
|
17107
17238
|
return RuntimeFileRefSchema.safeParse(input).success;
|
|
17108
17239
|
}
|
|
17240
|
+
function isFilePathDescriptor(input) {
|
|
17241
|
+
return FilePathDescriptorSchema.safeParse(input).success;
|
|
17242
|
+
}
|
|
17109
17243
|
function isResolvedProcessorFile(input) {
|
|
17110
17244
|
return ResolvedProcessorFileSchema.safeParse(input).success;
|
|
17111
17245
|
}
|
|
@@ -17328,11 +17462,2407 @@ var init_scoped_file_ref = __esm(() => {
|
|
|
17328
17462
|
]);
|
|
17329
17463
|
});
|
|
17330
17464
|
|
|
17465
|
+
// ../../node_modules/@opentelemetry/api/build/src/version.js
|
|
17466
|
+
var require_version = __commonJS((exports) => {
|
|
17467
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17468
|
+
exports.VERSION = undefined;
|
|
17469
|
+
exports.VERSION = "1.9.1";
|
|
17470
|
+
});
|
|
17471
|
+
|
|
17472
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
17473
|
+
var require_semver = __commonJS((exports) => {
|
|
17474
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17475
|
+
exports.isCompatible = exports._makeCompatibilityCheck = undefined;
|
|
17476
|
+
var version_1 = require_version();
|
|
17477
|
+
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17478
|
+
function _makeCompatibilityCheck(ownVersion) {
|
|
17479
|
+
const acceptedVersions = new Set([ownVersion]);
|
|
17480
|
+
const rejectedVersions = new Set;
|
|
17481
|
+
const myVersionMatch = ownVersion.match(re);
|
|
17482
|
+
if (!myVersionMatch) {
|
|
17483
|
+
return () => false;
|
|
17484
|
+
}
|
|
17485
|
+
const ownVersionParsed = {
|
|
17486
|
+
major: +myVersionMatch[1],
|
|
17487
|
+
minor: +myVersionMatch[2],
|
|
17488
|
+
patch: +myVersionMatch[3],
|
|
17489
|
+
prerelease: myVersionMatch[4]
|
|
17490
|
+
};
|
|
17491
|
+
if (ownVersionParsed.prerelease != null) {
|
|
17492
|
+
return function isExactmatch(globalVersion) {
|
|
17493
|
+
return globalVersion === ownVersion;
|
|
17494
|
+
};
|
|
17495
|
+
}
|
|
17496
|
+
function _reject(v) {
|
|
17497
|
+
rejectedVersions.add(v);
|
|
17498
|
+
return false;
|
|
17499
|
+
}
|
|
17500
|
+
function _accept(v) {
|
|
17501
|
+
acceptedVersions.add(v);
|
|
17502
|
+
return true;
|
|
17503
|
+
}
|
|
17504
|
+
return function isCompatible(globalVersion) {
|
|
17505
|
+
if (acceptedVersions.has(globalVersion)) {
|
|
17506
|
+
return true;
|
|
17507
|
+
}
|
|
17508
|
+
if (rejectedVersions.has(globalVersion)) {
|
|
17509
|
+
return false;
|
|
17510
|
+
}
|
|
17511
|
+
const globalVersionMatch = globalVersion.match(re);
|
|
17512
|
+
if (!globalVersionMatch) {
|
|
17513
|
+
return _reject(globalVersion);
|
|
17514
|
+
}
|
|
17515
|
+
const globalVersionParsed = {
|
|
17516
|
+
major: +globalVersionMatch[1],
|
|
17517
|
+
minor: +globalVersionMatch[2],
|
|
17518
|
+
patch: +globalVersionMatch[3],
|
|
17519
|
+
prerelease: globalVersionMatch[4]
|
|
17520
|
+
};
|
|
17521
|
+
if (globalVersionParsed.prerelease != null) {
|
|
17522
|
+
return _reject(globalVersion);
|
|
17523
|
+
}
|
|
17524
|
+
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
17525
|
+
return _reject(globalVersion);
|
|
17526
|
+
}
|
|
17527
|
+
if (ownVersionParsed.major === 0) {
|
|
17528
|
+
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
17529
|
+
return _accept(globalVersion);
|
|
17530
|
+
}
|
|
17531
|
+
return _reject(globalVersion);
|
|
17532
|
+
}
|
|
17533
|
+
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
17534
|
+
return _accept(globalVersion);
|
|
17535
|
+
}
|
|
17536
|
+
return _reject(globalVersion);
|
|
17537
|
+
};
|
|
17538
|
+
}
|
|
17539
|
+
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
|
|
17540
|
+
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
|
|
17541
|
+
});
|
|
17542
|
+
|
|
17543
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
|
|
17544
|
+
var require_global_utils = __commonJS((exports) => {
|
|
17545
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17546
|
+
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
|
|
17547
|
+
var version_1 = require_version();
|
|
17548
|
+
var semver_1 = require_semver();
|
|
17549
|
+
var major = version_1.VERSION.split(".")[0];
|
|
17550
|
+
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17551
|
+
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17552
|
+
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
17553
|
+
var _a3;
|
|
17554
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
|
|
17555
|
+
version: version_1.VERSION
|
|
17556
|
+
};
|
|
17557
|
+
if (!allowOverride && api2[type]) {
|
|
17558
|
+
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17559
|
+
diag.error(err.stack || err.message);
|
|
17560
|
+
return false;
|
|
17561
|
+
}
|
|
17562
|
+
if (api2.version !== version_1.VERSION) {
|
|
17563
|
+
const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
|
|
17564
|
+
diag.error(err.stack || err.message);
|
|
17565
|
+
return false;
|
|
17566
|
+
}
|
|
17567
|
+
api2[type] = instance;
|
|
17568
|
+
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
|
|
17569
|
+
return true;
|
|
17570
|
+
}
|
|
17571
|
+
exports.registerGlobal = registerGlobal;
|
|
17572
|
+
function getGlobal(type) {
|
|
17573
|
+
var _a3, _b;
|
|
17574
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
|
|
17575
|
+
if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
|
|
17576
|
+
return;
|
|
17577
|
+
}
|
|
17578
|
+
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
|
|
17579
|
+
}
|
|
17580
|
+
exports.getGlobal = getGlobal;
|
|
17581
|
+
function unregisterGlobal(type, diag) {
|
|
17582
|
+
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
|
|
17583
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17584
|
+
if (api2) {
|
|
17585
|
+
delete api2[type];
|
|
17586
|
+
}
|
|
17587
|
+
}
|
|
17588
|
+
exports.unregisterGlobal = unregisterGlobal;
|
|
17589
|
+
});
|
|
17590
|
+
|
|
17591
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
|
|
17592
|
+
var require_ComponentLogger = __commonJS((exports) => {
|
|
17593
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17594
|
+
exports.DiagComponentLogger = undefined;
|
|
17595
|
+
var global_utils_1 = require_global_utils();
|
|
17596
|
+
|
|
17597
|
+
class DiagComponentLogger {
|
|
17598
|
+
constructor(props) {
|
|
17599
|
+
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17600
|
+
}
|
|
17601
|
+
debug(...args) {
|
|
17602
|
+
return logProxy("debug", this._namespace, args);
|
|
17603
|
+
}
|
|
17604
|
+
error(...args) {
|
|
17605
|
+
return logProxy("error", this._namespace, args);
|
|
17606
|
+
}
|
|
17607
|
+
info(...args) {
|
|
17608
|
+
return logProxy("info", this._namespace, args);
|
|
17609
|
+
}
|
|
17610
|
+
warn(...args) {
|
|
17611
|
+
return logProxy("warn", this._namespace, args);
|
|
17612
|
+
}
|
|
17613
|
+
verbose(...args) {
|
|
17614
|
+
return logProxy("verbose", this._namespace, args);
|
|
17615
|
+
}
|
|
17616
|
+
}
|
|
17617
|
+
exports.DiagComponentLogger = DiagComponentLogger;
|
|
17618
|
+
function logProxy(funcName, namespace, args) {
|
|
17619
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17620
|
+
if (!logger) {
|
|
17621
|
+
return;
|
|
17622
|
+
}
|
|
17623
|
+
return logger[funcName](namespace, ...args);
|
|
17624
|
+
}
|
|
17625
|
+
});
|
|
17626
|
+
|
|
17627
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/types.js
|
|
17628
|
+
var require_types = __commonJS((exports) => {
|
|
17629
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17630
|
+
exports.DiagLogLevel = undefined;
|
|
17631
|
+
var DiagLogLevel;
|
|
17632
|
+
(function(DiagLogLevel2) {
|
|
17633
|
+
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17634
|
+
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
17635
|
+
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
17636
|
+
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
17637
|
+
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
17638
|
+
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
17639
|
+
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
17640
|
+
})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
|
|
17641
|
+
});
|
|
17642
|
+
|
|
17643
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
|
|
17644
|
+
var require_logLevelLogger = __commonJS((exports) => {
|
|
17645
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17646
|
+
exports.createLogLevelDiagLogger = undefined;
|
|
17647
|
+
var types_1 = require_types();
|
|
17648
|
+
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17649
|
+
if (maxLevel < types_1.DiagLogLevel.NONE) {
|
|
17650
|
+
maxLevel = types_1.DiagLogLevel.NONE;
|
|
17651
|
+
} else if (maxLevel > types_1.DiagLogLevel.ALL) {
|
|
17652
|
+
maxLevel = types_1.DiagLogLevel.ALL;
|
|
17653
|
+
}
|
|
17654
|
+
logger = logger || {};
|
|
17655
|
+
function _filterFunc(funcName, theLevel) {
|
|
17656
|
+
const theFunc = logger[funcName];
|
|
17657
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17658
|
+
return theFunc.bind(logger);
|
|
17659
|
+
}
|
|
17660
|
+
return function() {};
|
|
17661
|
+
}
|
|
17662
|
+
return {
|
|
17663
|
+
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
17664
|
+
warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
|
|
17665
|
+
info: _filterFunc("info", types_1.DiagLogLevel.INFO),
|
|
17666
|
+
debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
|
|
17667
|
+
verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
|
|
17668
|
+
};
|
|
17669
|
+
}
|
|
17670
|
+
exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
|
|
17671
|
+
});
|
|
17672
|
+
|
|
17673
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/diag.js
|
|
17674
|
+
var require_diag = __commonJS((exports) => {
|
|
17675
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17676
|
+
exports.DiagAPI = undefined;
|
|
17677
|
+
var ComponentLogger_1 = require_ComponentLogger();
|
|
17678
|
+
var logLevelLogger_1 = require_logLevelLogger();
|
|
17679
|
+
var types_1 = require_types();
|
|
17680
|
+
var global_utils_1 = require_global_utils();
|
|
17681
|
+
var API_NAME = "diag";
|
|
17682
|
+
|
|
17683
|
+
class DiagAPI {
|
|
17684
|
+
static instance() {
|
|
17685
|
+
if (!this._instance) {
|
|
17686
|
+
this._instance = new DiagAPI;
|
|
17687
|
+
}
|
|
17688
|
+
return this._instance;
|
|
17689
|
+
}
|
|
17690
|
+
constructor() {
|
|
17691
|
+
function _logProxy(funcName) {
|
|
17692
|
+
return function(...args) {
|
|
17693
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17694
|
+
if (!logger)
|
|
17695
|
+
return;
|
|
17696
|
+
return logger[funcName](...args);
|
|
17697
|
+
};
|
|
17698
|
+
}
|
|
17699
|
+
const self2 = this;
|
|
17700
|
+
const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
|
|
17701
|
+
var _a3, _b, _c;
|
|
17702
|
+
if (logger === self2) {
|
|
17703
|
+
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17704
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
|
|
17705
|
+
return false;
|
|
17706
|
+
}
|
|
17707
|
+
if (typeof optionsOrLogLevel === "number") {
|
|
17708
|
+
optionsOrLogLevel = {
|
|
17709
|
+
logLevel: optionsOrLogLevel
|
|
17710
|
+
};
|
|
17711
|
+
}
|
|
17712
|
+
const oldLogger = (0, global_utils_1.getGlobal)("diag");
|
|
17713
|
+
const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
|
|
17714
|
+
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17715
|
+
const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
|
|
17716
|
+
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17717
|
+
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17718
|
+
}
|
|
17719
|
+
return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
|
|
17720
|
+
};
|
|
17721
|
+
self2.setLogger = setLogger;
|
|
17722
|
+
self2.disable = () => {
|
|
17723
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, self2);
|
|
17724
|
+
};
|
|
17725
|
+
self2.createComponentLogger = (options) => {
|
|
17726
|
+
return new ComponentLogger_1.DiagComponentLogger(options);
|
|
17727
|
+
};
|
|
17728
|
+
self2.verbose = _logProxy("verbose");
|
|
17729
|
+
self2.debug = _logProxy("debug");
|
|
17730
|
+
self2.info = _logProxy("info");
|
|
17731
|
+
self2.warn = _logProxy("warn");
|
|
17732
|
+
self2.error = _logProxy("error");
|
|
17733
|
+
}
|
|
17734
|
+
}
|
|
17735
|
+
exports.DiagAPI = DiagAPI;
|
|
17736
|
+
});
|
|
17737
|
+
|
|
17738
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
|
|
17739
|
+
var require_baggage_impl = __commonJS((exports) => {
|
|
17740
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17741
|
+
exports.BaggageImpl = undefined;
|
|
17742
|
+
|
|
17743
|
+
class BaggageImpl {
|
|
17744
|
+
constructor(entries) {
|
|
17745
|
+
this._entries = entries ? new Map(entries) : new Map;
|
|
17746
|
+
}
|
|
17747
|
+
getEntry(key) {
|
|
17748
|
+
const entry = this._entries.get(key);
|
|
17749
|
+
if (!entry) {
|
|
17750
|
+
return;
|
|
17751
|
+
}
|
|
17752
|
+
return Object.assign({}, entry);
|
|
17753
|
+
}
|
|
17754
|
+
getAllEntries() {
|
|
17755
|
+
return Array.from(this._entries.entries());
|
|
17756
|
+
}
|
|
17757
|
+
setEntry(key, entry) {
|
|
17758
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17759
|
+
newBaggage._entries.set(key, entry);
|
|
17760
|
+
return newBaggage;
|
|
17761
|
+
}
|
|
17762
|
+
removeEntry(key) {
|
|
17763
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17764
|
+
newBaggage._entries.delete(key);
|
|
17765
|
+
return newBaggage;
|
|
17766
|
+
}
|
|
17767
|
+
removeEntries(...keys) {
|
|
17768
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17769
|
+
for (const key of keys) {
|
|
17770
|
+
newBaggage._entries.delete(key);
|
|
17771
|
+
}
|
|
17772
|
+
return newBaggage;
|
|
17773
|
+
}
|
|
17774
|
+
clear() {
|
|
17775
|
+
return new BaggageImpl;
|
|
17776
|
+
}
|
|
17777
|
+
}
|
|
17778
|
+
exports.BaggageImpl = BaggageImpl;
|
|
17779
|
+
});
|
|
17780
|
+
|
|
17781
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
|
|
17782
|
+
var require_symbol = __commonJS((exports) => {
|
|
17783
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17784
|
+
exports.baggageEntryMetadataSymbol = undefined;
|
|
17785
|
+
exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
|
|
17786
|
+
});
|
|
17787
|
+
|
|
17788
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
|
|
17789
|
+
var require_utils = __commonJS((exports) => {
|
|
17790
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17791
|
+
exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
|
|
17792
|
+
var diag_1 = require_diag();
|
|
17793
|
+
var baggage_impl_1 = require_baggage_impl();
|
|
17794
|
+
var symbol_1 = require_symbol();
|
|
17795
|
+
var diag = diag_1.DiagAPI.instance();
|
|
17796
|
+
function createBaggage(entries = {}) {
|
|
17797
|
+
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
|
|
17798
|
+
}
|
|
17799
|
+
exports.createBaggage = createBaggage;
|
|
17800
|
+
function baggageEntryMetadataFromString(str) {
|
|
17801
|
+
if (typeof str !== "string") {
|
|
17802
|
+
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17803
|
+
str = "";
|
|
17804
|
+
}
|
|
17805
|
+
return {
|
|
17806
|
+
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
|
|
17807
|
+
toString() {
|
|
17808
|
+
return str;
|
|
17809
|
+
}
|
|
17810
|
+
};
|
|
17811
|
+
}
|
|
17812
|
+
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
|
|
17813
|
+
});
|
|
17814
|
+
|
|
17815
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/context.js
|
|
17816
|
+
var require_context = __commonJS((exports) => {
|
|
17817
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17818
|
+
exports.ROOT_CONTEXT = exports.createContextKey = undefined;
|
|
17819
|
+
function createContextKey(description) {
|
|
17820
|
+
return Symbol.for(description);
|
|
17821
|
+
}
|
|
17822
|
+
exports.createContextKey = createContextKey;
|
|
17823
|
+
|
|
17824
|
+
class BaseContext {
|
|
17825
|
+
constructor(parentContext) {
|
|
17826
|
+
const self2 = this;
|
|
17827
|
+
self2._currentContext = parentContext ? new Map(parentContext) : new Map;
|
|
17828
|
+
self2.getValue = (key) => self2._currentContext.get(key);
|
|
17829
|
+
self2.setValue = (key, value) => {
|
|
17830
|
+
const context = new BaseContext(self2._currentContext);
|
|
17831
|
+
context._currentContext.set(key, value);
|
|
17832
|
+
return context;
|
|
17833
|
+
};
|
|
17834
|
+
self2.deleteValue = (key) => {
|
|
17835
|
+
const context = new BaseContext(self2._currentContext);
|
|
17836
|
+
context._currentContext.delete(key);
|
|
17837
|
+
return context;
|
|
17838
|
+
};
|
|
17839
|
+
}
|
|
17840
|
+
}
|
|
17841
|
+
exports.ROOT_CONTEXT = new BaseContext;
|
|
17842
|
+
});
|
|
17843
|
+
|
|
17844
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
|
|
17845
|
+
var require_consoleLogger = __commonJS((exports) => {
|
|
17846
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17847
|
+
exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
|
|
17848
|
+
var consoleMap = [
|
|
17849
|
+
{ n: "error", c: "error" },
|
|
17850
|
+
{ n: "warn", c: "warn" },
|
|
17851
|
+
{ n: "info", c: "info" },
|
|
17852
|
+
{ n: "debug", c: "debug" },
|
|
17853
|
+
{ n: "verbose", c: "trace" }
|
|
17854
|
+
];
|
|
17855
|
+
exports._originalConsoleMethods = {};
|
|
17856
|
+
if (typeof console !== "undefined") {
|
|
17857
|
+
const keys = [
|
|
17858
|
+
"error",
|
|
17859
|
+
"warn",
|
|
17860
|
+
"info",
|
|
17861
|
+
"debug",
|
|
17862
|
+
"trace",
|
|
17863
|
+
"log"
|
|
17864
|
+
];
|
|
17865
|
+
for (const key of keys) {
|
|
17866
|
+
if (typeof console[key] === "function") {
|
|
17867
|
+
exports._originalConsoleMethods[key] = console[key];
|
|
17868
|
+
}
|
|
17869
|
+
}
|
|
17870
|
+
}
|
|
17871
|
+
|
|
17872
|
+
class DiagConsoleLogger {
|
|
17873
|
+
constructor() {
|
|
17874
|
+
function _consoleFunc(funcName) {
|
|
17875
|
+
return function(...args) {
|
|
17876
|
+
let theFunc = exports._originalConsoleMethods[funcName];
|
|
17877
|
+
if (typeof theFunc !== "function") {
|
|
17878
|
+
theFunc = exports._originalConsoleMethods["log"];
|
|
17879
|
+
}
|
|
17880
|
+
if (typeof theFunc !== "function" && console) {
|
|
17881
|
+
theFunc = console[funcName];
|
|
17882
|
+
if (typeof theFunc !== "function") {
|
|
17883
|
+
theFunc = console.log;
|
|
17884
|
+
}
|
|
17885
|
+
}
|
|
17886
|
+
if (typeof theFunc === "function") {
|
|
17887
|
+
return theFunc.apply(console, args);
|
|
17888
|
+
}
|
|
17889
|
+
};
|
|
17890
|
+
}
|
|
17891
|
+
for (let i = 0;i < consoleMap.length; i++) {
|
|
17892
|
+
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
17893
|
+
}
|
|
17894
|
+
}
|
|
17895
|
+
}
|
|
17896
|
+
exports.DiagConsoleLogger = DiagConsoleLogger;
|
|
17897
|
+
});
|
|
17898
|
+
|
|
17899
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
|
|
17900
|
+
var require_NoopMeter = __commonJS((exports) => {
|
|
17901
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17902
|
+
exports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_GAUGE_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopGaugeMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = undefined;
|
|
17903
|
+
|
|
17904
|
+
class NoopMeter {
|
|
17905
|
+
constructor() {}
|
|
17906
|
+
createGauge(_name, _options) {
|
|
17907
|
+
return exports.NOOP_GAUGE_METRIC;
|
|
17908
|
+
}
|
|
17909
|
+
createHistogram(_name, _options) {
|
|
17910
|
+
return exports.NOOP_HISTOGRAM_METRIC;
|
|
17911
|
+
}
|
|
17912
|
+
createCounter(_name, _options) {
|
|
17913
|
+
return exports.NOOP_COUNTER_METRIC;
|
|
17914
|
+
}
|
|
17915
|
+
createUpDownCounter(_name, _options) {
|
|
17916
|
+
return exports.NOOP_UP_DOWN_COUNTER_METRIC;
|
|
17917
|
+
}
|
|
17918
|
+
createObservableGauge(_name, _options) {
|
|
17919
|
+
return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
17920
|
+
}
|
|
17921
|
+
createObservableCounter(_name, _options) {
|
|
17922
|
+
return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
17923
|
+
}
|
|
17924
|
+
createObservableUpDownCounter(_name, _options) {
|
|
17925
|
+
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
17926
|
+
}
|
|
17927
|
+
addBatchObservableCallback(_callback, _observables) {}
|
|
17928
|
+
removeBatchObservableCallback(_callback) {}
|
|
17929
|
+
}
|
|
17930
|
+
exports.NoopMeter = NoopMeter;
|
|
17931
|
+
|
|
17932
|
+
class NoopMetric {
|
|
17933
|
+
}
|
|
17934
|
+
exports.NoopMetric = NoopMetric;
|
|
17935
|
+
|
|
17936
|
+
class NoopCounterMetric extends NoopMetric {
|
|
17937
|
+
add(_value, _attributes) {}
|
|
17938
|
+
}
|
|
17939
|
+
exports.NoopCounterMetric = NoopCounterMetric;
|
|
17940
|
+
|
|
17941
|
+
class NoopUpDownCounterMetric extends NoopMetric {
|
|
17942
|
+
add(_value, _attributes) {}
|
|
17943
|
+
}
|
|
17944
|
+
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
17945
|
+
|
|
17946
|
+
class NoopGaugeMetric extends NoopMetric {
|
|
17947
|
+
record(_value, _attributes) {}
|
|
17948
|
+
}
|
|
17949
|
+
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
17950
|
+
|
|
17951
|
+
class NoopHistogramMetric extends NoopMetric {
|
|
17952
|
+
record(_value, _attributes) {}
|
|
17953
|
+
}
|
|
17954
|
+
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
17955
|
+
|
|
17956
|
+
class NoopObservableMetric {
|
|
17957
|
+
addCallback(_callback) {}
|
|
17958
|
+
removeCallback(_callback) {}
|
|
17959
|
+
}
|
|
17960
|
+
exports.NoopObservableMetric = NoopObservableMetric;
|
|
17961
|
+
|
|
17962
|
+
class NoopObservableCounterMetric extends NoopObservableMetric {
|
|
17963
|
+
}
|
|
17964
|
+
exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
|
|
17965
|
+
|
|
17966
|
+
class NoopObservableGaugeMetric extends NoopObservableMetric {
|
|
17967
|
+
}
|
|
17968
|
+
exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
|
|
17969
|
+
|
|
17970
|
+
class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
|
|
17971
|
+
}
|
|
17972
|
+
exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
|
|
17973
|
+
exports.NOOP_METER = new NoopMeter;
|
|
17974
|
+
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
|
|
17975
|
+
exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
|
|
17976
|
+
exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
|
|
17977
|
+
exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
|
|
17978
|
+
exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
|
|
17979
|
+
exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
|
|
17980
|
+
exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
|
|
17981
|
+
function createNoopMeter() {
|
|
17982
|
+
return exports.NOOP_METER;
|
|
17983
|
+
}
|
|
17984
|
+
exports.createNoopMeter = createNoopMeter;
|
|
17985
|
+
});
|
|
17986
|
+
|
|
17987
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
|
|
17988
|
+
var require_Metric = __commonJS((exports) => {
|
|
17989
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17990
|
+
exports.ValueType = undefined;
|
|
17991
|
+
var ValueType;
|
|
17992
|
+
(function(ValueType2) {
|
|
17993
|
+
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
17994
|
+
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
17995
|
+
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
17996
|
+
});
|
|
17997
|
+
|
|
17998
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
|
|
17999
|
+
var require_TextMapPropagator = __commonJS((exports) => {
|
|
18000
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18001
|
+
exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
|
|
18002
|
+
exports.defaultTextMapGetter = {
|
|
18003
|
+
get(carrier, key) {
|
|
18004
|
+
if (carrier == null) {
|
|
18005
|
+
return;
|
|
18006
|
+
}
|
|
18007
|
+
return carrier[key];
|
|
18008
|
+
},
|
|
18009
|
+
keys(carrier) {
|
|
18010
|
+
if (carrier == null) {
|
|
18011
|
+
return [];
|
|
18012
|
+
}
|
|
18013
|
+
return Object.keys(carrier);
|
|
18014
|
+
}
|
|
18015
|
+
};
|
|
18016
|
+
exports.defaultTextMapSetter = {
|
|
18017
|
+
set(carrier, key, value) {
|
|
18018
|
+
if (carrier == null) {
|
|
18019
|
+
return;
|
|
18020
|
+
}
|
|
18021
|
+
carrier[key] = value;
|
|
18022
|
+
}
|
|
18023
|
+
};
|
|
18024
|
+
});
|
|
18025
|
+
|
|
18026
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
|
|
18027
|
+
var require_NoopContextManager = __commonJS((exports) => {
|
|
18028
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18029
|
+
exports.NoopContextManager = undefined;
|
|
18030
|
+
var context_1 = require_context();
|
|
18031
|
+
|
|
18032
|
+
class NoopContextManager {
|
|
18033
|
+
active() {
|
|
18034
|
+
return context_1.ROOT_CONTEXT;
|
|
18035
|
+
}
|
|
18036
|
+
with(_context, fn, thisArg, ...args) {
|
|
18037
|
+
return fn.call(thisArg, ...args);
|
|
18038
|
+
}
|
|
18039
|
+
bind(_context, target) {
|
|
18040
|
+
return target;
|
|
18041
|
+
}
|
|
18042
|
+
enable() {
|
|
18043
|
+
return this;
|
|
18044
|
+
}
|
|
18045
|
+
disable() {
|
|
18046
|
+
return this;
|
|
18047
|
+
}
|
|
18048
|
+
}
|
|
18049
|
+
exports.NoopContextManager = NoopContextManager;
|
|
18050
|
+
});
|
|
18051
|
+
|
|
18052
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/context.js
|
|
18053
|
+
var require_context2 = __commonJS((exports) => {
|
|
18054
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18055
|
+
exports.ContextAPI = undefined;
|
|
18056
|
+
var NoopContextManager_1 = require_NoopContextManager();
|
|
18057
|
+
var global_utils_1 = require_global_utils();
|
|
18058
|
+
var diag_1 = require_diag();
|
|
18059
|
+
var API_NAME = "context";
|
|
18060
|
+
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
18061
|
+
|
|
18062
|
+
class ContextAPI {
|
|
18063
|
+
constructor() {}
|
|
18064
|
+
static getInstance() {
|
|
18065
|
+
if (!this._instance) {
|
|
18066
|
+
this._instance = new ContextAPI;
|
|
18067
|
+
}
|
|
18068
|
+
return this._instance;
|
|
18069
|
+
}
|
|
18070
|
+
setGlobalContextManager(contextManager) {
|
|
18071
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
|
|
18072
|
+
}
|
|
18073
|
+
active() {
|
|
18074
|
+
return this._getContextManager().active();
|
|
18075
|
+
}
|
|
18076
|
+
with(context, fn, thisArg, ...args) {
|
|
18077
|
+
return this._getContextManager().with(context, fn, thisArg, ...args);
|
|
18078
|
+
}
|
|
18079
|
+
bind(context, target) {
|
|
18080
|
+
return this._getContextManager().bind(context, target);
|
|
18081
|
+
}
|
|
18082
|
+
_getContextManager() {
|
|
18083
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
|
|
18084
|
+
}
|
|
18085
|
+
disable() {
|
|
18086
|
+
this._getContextManager().disable();
|
|
18087
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18088
|
+
}
|
|
18089
|
+
}
|
|
18090
|
+
exports.ContextAPI = ContextAPI;
|
|
18091
|
+
});
|
|
18092
|
+
|
|
18093
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
|
|
18094
|
+
var require_trace_flags = __commonJS((exports) => {
|
|
18095
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18096
|
+
exports.TraceFlags = undefined;
|
|
18097
|
+
var TraceFlags;
|
|
18098
|
+
(function(TraceFlags2) {
|
|
18099
|
+
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
18100
|
+
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
18101
|
+
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
|
|
18102
|
+
});
|
|
18103
|
+
|
|
18104
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
|
|
18105
|
+
var require_invalid_span_constants = __commonJS((exports) => {
|
|
18106
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18107
|
+
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
|
|
18108
|
+
var trace_flags_1 = require_trace_flags();
|
|
18109
|
+
exports.INVALID_SPANID = "0000000000000000";
|
|
18110
|
+
exports.INVALID_TRACEID = "00000000000000000000000000000000";
|
|
18111
|
+
exports.INVALID_SPAN_CONTEXT = {
|
|
18112
|
+
traceId: exports.INVALID_TRACEID,
|
|
18113
|
+
spanId: exports.INVALID_SPANID,
|
|
18114
|
+
traceFlags: trace_flags_1.TraceFlags.NONE
|
|
18115
|
+
};
|
|
18116
|
+
});
|
|
18117
|
+
|
|
18118
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
|
|
18119
|
+
var require_NonRecordingSpan = __commonJS((exports) => {
|
|
18120
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18121
|
+
exports.NonRecordingSpan = undefined;
|
|
18122
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18123
|
+
|
|
18124
|
+
class NonRecordingSpan {
|
|
18125
|
+
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
18126
|
+
this._spanContext = spanContext;
|
|
18127
|
+
}
|
|
18128
|
+
spanContext() {
|
|
18129
|
+
return this._spanContext;
|
|
18130
|
+
}
|
|
18131
|
+
setAttribute(_key, _value) {
|
|
18132
|
+
return this;
|
|
18133
|
+
}
|
|
18134
|
+
setAttributes(_attributes) {
|
|
18135
|
+
return this;
|
|
18136
|
+
}
|
|
18137
|
+
addEvent(_name, _attributes) {
|
|
18138
|
+
return this;
|
|
18139
|
+
}
|
|
18140
|
+
addLink(_link) {
|
|
18141
|
+
return this;
|
|
18142
|
+
}
|
|
18143
|
+
addLinks(_links) {
|
|
18144
|
+
return this;
|
|
18145
|
+
}
|
|
18146
|
+
setStatus(_status) {
|
|
18147
|
+
return this;
|
|
18148
|
+
}
|
|
18149
|
+
updateName(_name) {
|
|
18150
|
+
return this;
|
|
18151
|
+
}
|
|
18152
|
+
end(_endTime) {}
|
|
18153
|
+
isRecording() {
|
|
18154
|
+
return false;
|
|
18155
|
+
}
|
|
18156
|
+
recordException(_exception, _time) {}
|
|
18157
|
+
}
|
|
18158
|
+
exports.NonRecordingSpan = NonRecordingSpan;
|
|
18159
|
+
});
|
|
18160
|
+
|
|
18161
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
|
|
18162
|
+
var require_context_utils = __commonJS((exports) => {
|
|
18163
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18164
|
+
exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
|
|
18165
|
+
var context_1 = require_context();
|
|
18166
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18167
|
+
var context_2 = require_context2();
|
|
18168
|
+
var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
|
|
18169
|
+
function getSpan(context) {
|
|
18170
|
+
return context.getValue(SPAN_KEY) || undefined;
|
|
18171
|
+
}
|
|
18172
|
+
exports.getSpan = getSpan;
|
|
18173
|
+
function getActiveSpan() {
|
|
18174
|
+
return getSpan(context_2.ContextAPI.getInstance().active());
|
|
18175
|
+
}
|
|
18176
|
+
exports.getActiveSpan = getActiveSpan;
|
|
18177
|
+
function setSpan(context, span) {
|
|
18178
|
+
return context.setValue(SPAN_KEY, span);
|
|
18179
|
+
}
|
|
18180
|
+
exports.setSpan = setSpan;
|
|
18181
|
+
function deleteSpan(context) {
|
|
18182
|
+
return context.deleteValue(SPAN_KEY);
|
|
18183
|
+
}
|
|
18184
|
+
exports.deleteSpan = deleteSpan;
|
|
18185
|
+
function setSpanContext(context, spanContext) {
|
|
18186
|
+
return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
|
|
18187
|
+
}
|
|
18188
|
+
exports.setSpanContext = setSpanContext;
|
|
18189
|
+
function getSpanContext(context) {
|
|
18190
|
+
var _a3;
|
|
18191
|
+
return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
|
|
18192
|
+
}
|
|
18193
|
+
exports.getSpanContext = getSpanContext;
|
|
18194
|
+
});
|
|
18195
|
+
|
|
18196
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
|
|
18197
|
+
var require_spancontext_utils = __commonJS((exports) => {
|
|
18198
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18199
|
+
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
|
|
18200
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18201
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18202
|
+
var isHex = new Uint8Array([
|
|
18203
|
+
0,
|
|
18204
|
+
0,
|
|
18205
|
+
0,
|
|
18206
|
+
0,
|
|
18207
|
+
0,
|
|
18208
|
+
0,
|
|
18209
|
+
0,
|
|
18210
|
+
0,
|
|
18211
|
+
0,
|
|
18212
|
+
0,
|
|
18213
|
+
0,
|
|
18214
|
+
0,
|
|
18215
|
+
0,
|
|
18216
|
+
0,
|
|
18217
|
+
0,
|
|
18218
|
+
0,
|
|
18219
|
+
0,
|
|
18220
|
+
0,
|
|
18221
|
+
0,
|
|
18222
|
+
0,
|
|
18223
|
+
0,
|
|
18224
|
+
0,
|
|
18225
|
+
0,
|
|
18226
|
+
0,
|
|
18227
|
+
0,
|
|
18228
|
+
0,
|
|
18229
|
+
0,
|
|
18230
|
+
0,
|
|
18231
|
+
0,
|
|
18232
|
+
0,
|
|
18233
|
+
0,
|
|
18234
|
+
0,
|
|
18235
|
+
0,
|
|
18236
|
+
0,
|
|
18237
|
+
0,
|
|
18238
|
+
0,
|
|
18239
|
+
0,
|
|
18240
|
+
0,
|
|
18241
|
+
0,
|
|
18242
|
+
0,
|
|
18243
|
+
0,
|
|
18244
|
+
0,
|
|
18245
|
+
0,
|
|
18246
|
+
0,
|
|
18247
|
+
0,
|
|
18248
|
+
0,
|
|
18249
|
+
0,
|
|
18250
|
+
0,
|
|
18251
|
+
1,
|
|
18252
|
+
1,
|
|
18253
|
+
1,
|
|
18254
|
+
1,
|
|
18255
|
+
1,
|
|
18256
|
+
1,
|
|
18257
|
+
1,
|
|
18258
|
+
1,
|
|
18259
|
+
1,
|
|
18260
|
+
1,
|
|
18261
|
+
0,
|
|
18262
|
+
0,
|
|
18263
|
+
0,
|
|
18264
|
+
0,
|
|
18265
|
+
0,
|
|
18266
|
+
0,
|
|
18267
|
+
0,
|
|
18268
|
+
1,
|
|
18269
|
+
1,
|
|
18270
|
+
1,
|
|
18271
|
+
1,
|
|
18272
|
+
1,
|
|
18273
|
+
1,
|
|
18274
|
+
0,
|
|
18275
|
+
0,
|
|
18276
|
+
0,
|
|
18277
|
+
0,
|
|
18278
|
+
0,
|
|
18279
|
+
0,
|
|
18280
|
+
0,
|
|
18281
|
+
0,
|
|
18282
|
+
0,
|
|
18283
|
+
0,
|
|
18284
|
+
0,
|
|
18285
|
+
0,
|
|
18286
|
+
0,
|
|
18287
|
+
0,
|
|
18288
|
+
0,
|
|
18289
|
+
0,
|
|
18290
|
+
0,
|
|
18291
|
+
0,
|
|
18292
|
+
0,
|
|
18293
|
+
0,
|
|
18294
|
+
0,
|
|
18295
|
+
0,
|
|
18296
|
+
0,
|
|
18297
|
+
0,
|
|
18298
|
+
0,
|
|
18299
|
+
0,
|
|
18300
|
+
1,
|
|
18301
|
+
1,
|
|
18302
|
+
1,
|
|
18303
|
+
1,
|
|
18304
|
+
1,
|
|
18305
|
+
1
|
|
18306
|
+
]);
|
|
18307
|
+
function isValidHex(id, length) {
|
|
18308
|
+
if (typeof id !== "string" || id.length !== length)
|
|
18309
|
+
return false;
|
|
18310
|
+
let r = 0;
|
|
18311
|
+
for (let i = 0;i < id.length; i += 4) {
|
|
18312
|
+
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
18313
|
+
}
|
|
18314
|
+
return r === length;
|
|
18315
|
+
}
|
|
18316
|
+
function isValidTraceId(traceId) {
|
|
18317
|
+
return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
18318
|
+
}
|
|
18319
|
+
exports.isValidTraceId = isValidTraceId;
|
|
18320
|
+
function isValidSpanId(spanId) {
|
|
18321
|
+
return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
18322
|
+
}
|
|
18323
|
+
exports.isValidSpanId = isValidSpanId;
|
|
18324
|
+
function isSpanContextValid(spanContext) {
|
|
18325
|
+
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
18326
|
+
}
|
|
18327
|
+
exports.isSpanContextValid = isSpanContextValid;
|
|
18328
|
+
function wrapSpanContext(spanContext) {
|
|
18329
|
+
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
|
|
18330
|
+
}
|
|
18331
|
+
exports.wrapSpanContext = wrapSpanContext;
|
|
18332
|
+
});
|
|
18333
|
+
|
|
18334
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
|
|
18335
|
+
var require_NoopTracer = __commonJS((exports) => {
|
|
18336
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18337
|
+
exports.NoopTracer = undefined;
|
|
18338
|
+
var context_1 = require_context2();
|
|
18339
|
+
var context_utils_1 = require_context_utils();
|
|
18340
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18341
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18342
|
+
var contextApi = context_1.ContextAPI.getInstance();
|
|
18343
|
+
|
|
18344
|
+
class NoopTracer {
|
|
18345
|
+
startSpan(name, options, context = contextApi.active()) {
|
|
18346
|
+
const root = Boolean(options === null || options === undefined ? undefined : options.root);
|
|
18347
|
+
if (root) {
|
|
18348
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18349
|
+
}
|
|
18350
|
+
const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
|
|
18351
|
+
if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
|
|
18352
|
+
return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
|
|
18353
|
+
} else {
|
|
18354
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18355
|
+
}
|
|
18356
|
+
}
|
|
18357
|
+
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18358
|
+
let opts;
|
|
18359
|
+
let ctx;
|
|
18360
|
+
let fn;
|
|
18361
|
+
if (arguments.length < 2) {
|
|
18362
|
+
return;
|
|
18363
|
+
} else if (arguments.length === 2) {
|
|
18364
|
+
fn = arg2;
|
|
18365
|
+
} else if (arguments.length === 3) {
|
|
18366
|
+
opts = arg2;
|
|
18367
|
+
fn = arg3;
|
|
18368
|
+
} else {
|
|
18369
|
+
opts = arg2;
|
|
18370
|
+
ctx = arg3;
|
|
18371
|
+
fn = arg4;
|
|
18372
|
+
}
|
|
18373
|
+
const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
|
|
18374
|
+
const span = this.startSpan(name, opts, parentContext);
|
|
18375
|
+
const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
|
|
18376
|
+
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
18377
|
+
}
|
|
18378
|
+
}
|
|
18379
|
+
exports.NoopTracer = NoopTracer;
|
|
18380
|
+
function isSpanContext(spanContext) {
|
|
18381
|
+
return spanContext !== null && typeof spanContext === "object" && "spanId" in spanContext && typeof spanContext["spanId"] === "string" && "traceId" in spanContext && typeof spanContext["traceId"] === "string" && "traceFlags" in spanContext && typeof spanContext["traceFlags"] === "number";
|
|
18382
|
+
}
|
|
18383
|
+
});
|
|
18384
|
+
|
|
18385
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
|
|
18386
|
+
var require_ProxyTracer = __commonJS((exports) => {
|
|
18387
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18388
|
+
exports.ProxyTracer = undefined;
|
|
18389
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18390
|
+
var NOOP_TRACER = new NoopTracer_1.NoopTracer;
|
|
18391
|
+
|
|
18392
|
+
class ProxyTracer {
|
|
18393
|
+
constructor(provider, name, version2, options) {
|
|
18394
|
+
this._provider = provider;
|
|
18395
|
+
this.name = name;
|
|
18396
|
+
this.version = version2;
|
|
18397
|
+
this.options = options;
|
|
18398
|
+
}
|
|
18399
|
+
startSpan(name, options, context) {
|
|
18400
|
+
return this._getTracer().startSpan(name, options, context);
|
|
18401
|
+
}
|
|
18402
|
+
startActiveSpan(_name, _options, _context, _fn) {
|
|
18403
|
+
const tracer = this._getTracer();
|
|
18404
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18405
|
+
}
|
|
18406
|
+
_getTracer() {
|
|
18407
|
+
if (this._delegate) {
|
|
18408
|
+
return this._delegate;
|
|
18409
|
+
}
|
|
18410
|
+
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18411
|
+
if (!tracer) {
|
|
18412
|
+
return NOOP_TRACER;
|
|
18413
|
+
}
|
|
18414
|
+
this._delegate = tracer;
|
|
18415
|
+
return this._delegate;
|
|
18416
|
+
}
|
|
18417
|
+
}
|
|
18418
|
+
exports.ProxyTracer = ProxyTracer;
|
|
18419
|
+
});
|
|
18420
|
+
|
|
18421
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
|
|
18422
|
+
var require_NoopTracerProvider = __commonJS((exports) => {
|
|
18423
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18424
|
+
exports.NoopTracerProvider = undefined;
|
|
18425
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18426
|
+
|
|
18427
|
+
class NoopTracerProvider {
|
|
18428
|
+
getTracer(_name, _version, _options) {
|
|
18429
|
+
return new NoopTracer_1.NoopTracer;
|
|
18430
|
+
}
|
|
18431
|
+
}
|
|
18432
|
+
exports.NoopTracerProvider = NoopTracerProvider;
|
|
18433
|
+
});
|
|
18434
|
+
|
|
18435
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
|
|
18436
|
+
var require_ProxyTracerProvider = __commonJS((exports) => {
|
|
18437
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18438
|
+
exports.ProxyTracerProvider = undefined;
|
|
18439
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18440
|
+
var NoopTracerProvider_1 = require_NoopTracerProvider();
|
|
18441
|
+
var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
|
|
18442
|
+
|
|
18443
|
+
class ProxyTracerProvider {
|
|
18444
|
+
getTracer(name, version2, options) {
|
|
18445
|
+
var _a3;
|
|
18446
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
|
|
18447
|
+
}
|
|
18448
|
+
getDelegate() {
|
|
18449
|
+
var _a3;
|
|
18450
|
+
return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18451
|
+
}
|
|
18452
|
+
setDelegate(delegate) {
|
|
18453
|
+
this._delegate = delegate;
|
|
18454
|
+
}
|
|
18455
|
+
getDelegateTracer(name, version2, options) {
|
|
18456
|
+
var _a3;
|
|
18457
|
+
return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
|
|
18458
|
+
}
|
|
18459
|
+
}
|
|
18460
|
+
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
18461
|
+
});
|
|
18462
|
+
|
|
18463
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
|
|
18464
|
+
var require_SamplingResult = __commonJS((exports) => {
|
|
18465
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18466
|
+
exports.SamplingDecision = undefined;
|
|
18467
|
+
var SamplingDecision;
|
|
18468
|
+
(function(SamplingDecision2) {
|
|
18469
|
+
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18470
|
+
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
18471
|
+
SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
18472
|
+
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
18473
|
+
});
|
|
18474
|
+
|
|
18475
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
|
|
18476
|
+
var require_span_kind = __commonJS((exports) => {
|
|
18477
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18478
|
+
exports.SpanKind = undefined;
|
|
18479
|
+
var SpanKind;
|
|
18480
|
+
(function(SpanKind2) {
|
|
18481
|
+
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18482
|
+
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
18483
|
+
SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
|
|
18484
|
+
SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
|
|
18485
|
+
SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
|
|
18486
|
+
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
|
18487
|
+
});
|
|
18488
|
+
|
|
18489
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/status.js
|
|
18490
|
+
var require_status = __commonJS((exports) => {
|
|
18491
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18492
|
+
exports.SpanStatusCode = undefined;
|
|
18493
|
+
var SpanStatusCode;
|
|
18494
|
+
(function(SpanStatusCode2) {
|
|
18495
|
+
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18496
|
+
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
18497
|
+
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
18498
|
+
})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
|
|
18499
|
+
});
|
|
18500
|
+
|
|
18501
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
|
|
18502
|
+
var require_tracestate_validators = __commonJS((exports) => {
|
|
18503
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18504
|
+
exports.validateValue = exports.validateKey = undefined;
|
|
18505
|
+
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18506
|
+
var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18507
|
+
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18508
|
+
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18509
|
+
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18510
|
+
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18511
|
+
function validateKey(key) {
|
|
18512
|
+
return VALID_KEY_REGEX.test(key);
|
|
18513
|
+
}
|
|
18514
|
+
exports.validateKey = validateKey;
|
|
18515
|
+
function validateValue(value) {
|
|
18516
|
+
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
18517
|
+
}
|
|
18518
|
+
exports.validateValue = validateValue;
|
|
18519
|
+
});
|
|
18520
|
+
|
|
18521
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
|
|
18522
|
+
var require_tracestate_impl = __commonJS((exports) => {
|
|
18523
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18524
|
+
exports.TraceStateImpl = undefined;
|
|
18525
|
+
var tracestate_validators_1 = require_tracestate_validators();
|
|
18526
|
+
var MAX_TRACE_STATE_ITEMS = 32;
|
|
18527
|
+
var MAX_TRACE_STATE_LEN = 512;
|
|
18528
|
+
var LIST_MEMBERS_SEPARATOR = ",";
|
|
18529
|
+
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18530
|
+
|
|
18531
|
+
class TraceStateImpl {
|
|
18532
|
+
constructor(rawTraceState) {
|
|
18533
|
+
this._internalState = new Map;
|
|
18534
|
+
if (rawTraceState)
|
|
18535
|
+
this._parse(rawTraceState);
|
|
18536
|
+
}
|
|
18537
|
+
set(key, value) {
|
|
18538
|
+
const traceState = this._clone();
|
|
18539
|
+
if (traceState._internalState.has(key)) {
|
|
18540
|
+
traceState._internalState.delete(key);
|
|
18541
|
+
}
|
|
18542
|
+
traceState._internalState.set(key, value);
|
|
18543
|
+
return traceState;
|
|
18544
|
+
}
|
|
18545
|
+
unset(key) {
|
|
18546
|
+
const traceState = this._clone();
|
|
18547
|
+
traceState._internalState.delete(key);
|
|
18548
|
+
return traceState;
|
|
18549
|
+
}
|
|
18550
|
+
get(key) {
|
|
18551
|
+
return this._internalState.get(key);
|
|
18552
|
+
}
|
|
18553
|
+
serialize() {
|
|
18554
|
+
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18555
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18556
|
+
return agg;
|
|
18557
|
+
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18558
|
+
}
|
|
18559
|
+
_parse(rawTraceState) {
|
|
18560
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18561
|
+
return;
|
|
18562
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18563
|
+
const listMember = part.trim();
|
|
18564
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18565
|
+
if (i !== -1) {
|
|
18566
|
+
const key = listMember.slice(0, i);
|
|
18567
|
+
const value = listMember.slice(i + 1, part.length);
|
|
18568
|
+
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
18569
|
+
agg.set(key, value);
|
|
18570
|
+
}
|
|
18571
|
+
}
|
|
18572
|
+
return agg;
|
|
18573
|
+
}, new Map);
|
|
18574
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18575
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18576
|
+
}
|
|
18577
|
+
}
|
|
18578
|
+
_keys() {
|
|
18579
|
+
return Array.from(this._internalState.keys()).reverse();
|
|
18580
|
+
}
|
|
18581
|
+
_clone() {
|
|
18582
|
+
const traceState = new TraceStateImpl;
|
|
18583
|
+
traceState._internalState = new Map(this._internalState);
|
|
18584
|
+
return traceState;
|
|
18585
|
+
}
|
|
18586
|
+
}
|
|
18587
|
+
exports.TraceStateImpl = TraceStateImpl;
|
|
18588
|
+
});
|
|
18589
|
+
|
|
18590
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
|
|
18591
|
+
var require_utils2 = __commonJS((exports) => {
|
|
18592
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18593
|
+
exports.createTraceState = undefined;
|
|
18594
|
+
var tracestate_impl_1 = require_tracestate_impl();
|
|
18595
|
+
function createTraceState(rawTraceState) {
|
|
18596
|
+
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
18597
|
+
}
|
|
18598
|
+
exports.createTraceState = createTraceState;
|
|
18599
|
+
});
|
|
18600
|
+
|
|
18601
|
+
// ../../node_modules/@opentelemetry/api/build/src/context-api.js
|
|
18602
|
+
var require_context_api = __commonJS((exports) => {
|
|
18603
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18604
|
+
exports.context = undefined;
|
|
18605
|
+
var context_1 = require_context2();
|
|
18606
|
+
exports.context = context_1.ContextAPI.getInstance();
|
|
18607
|
+
});
|
|
18608
|
+
|
|
18609
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag-api.js
|
|
18610
|
+
var require_diag_api = __commonJS((exports) => {
|
|
18611
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18612
|
+
exports.diag = undefined;
|
|
18613
|
+
var diag_1 = require_diag();
|
|
18614
|
+
exports.diag = diag_1.DiagAPI.instance();
|
|
18615
|
+
});
|
|
18616
|
+
|
|
18617
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
|
|
18618
|
+
var require_NoopMeterProvider = __commonJS((exports) => {
|
|
18619
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18620
|
+
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
|
|
18621
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18622
|
+
|
|
18623
|
+
class NoopMeterProvider {
|
|
18624
|
+
getMeter(_name, _version, _options) {
|
|
18625
|
+
return NoopMeter_1.NOOP_METER;
|
|
18626
|
+
}
|
|
18627
|
+
}
|
|
18628
|
+
exports.NoopMeterProvider = NoopMeterProvider;
|
|
18629
|
+
exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
|
|
18630
|
+
});
|
|
18631
|
+
|
|
18632
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
|
|
18633
|
+
var require_metrics = __commonJS((exports) => {
|
|
18634
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18635
|
+
exports.MetricsAPI = undefined;
|
|
18636
|
+
var NoopMeterProvider_1 = require_NoopMeterProvider();
|
|
18637
|
+
var global_utils_1 = require_global_utils();
|
|
18638
|
+
var diag_1 = require_diag();
|
|
18639
|
+
var API_NAME = "metrics";
|
|
18640
|
+
|
|
18641
|
+
class MetricsAPI {
|
|
18642
|
+
constructor() {}
|
|
18643
|
+
static getInstance() {
|
|
18644
|
+
if (!this._instance) {
|
|
18645
|
+
this._instance = new MetricsAPI;
|
|
18646
|
+
}
|
|
18647
|
+
return this._instance;
|
|
18648
|
+
}
|
|
18649
|
+
setGlobalMeterProvider(provider) {
|
|
18650
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
|
|
18651
|
+
}
|
|
18652
|
+
getMeterProvider() {
|
|
18653
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
|
|
18654
|
+
}
|
|
18655
|
+
getMeter(name, version2, options) {
|
|
18656
|
+
return this.getMeterProvider().getMeter(name, version2, options);
|
|
18657
|
+
}
|
|
18658
|
+
disable() {
|
|
18659
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18660
|
+
}
|
|
18661
|
+
}
|
|
18662
|
+
exports.MetricsAPI = MetricsAPI;
|
|
18663
|
+
});
|
|
18664
|
+
|
|
18665
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
|
|
18666
|
+
var require_metrics_api = __commonJS((exports) => {
|
|
18667
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18668
|
+
exports.metrics = undefined;
|
|
18669
|
+
var metrics_1 = require_metrics();
|
|
18670
|
+
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
18671
|
+
});
|
|
18672
|
+
|
|
18673
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
|
|
18674
|
+
var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
18675
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18676
|
+
exports.NoopTextMapPropagator = undefined;
|
|
18677
|
+
|
|
18678
|
+
class NoopTextMapPropagator {
|
|
18679
|
+
inject(_context, _carrier) {}
|
|
18680
|
+
extract(context, _carrier) {
|
|
18681
|
+
return context;
|
|
18682
|
+
}
|
|
18683
|
+
fields() {
|
|
18684
|
+
return [];
|
|
18685
|
+
}
|
|
18686
|
+
}
|
|
18687
|
+
exports.NoopTextMapPropagator = NoopTextMapPropagator;
|
|
18688
|
+
});
|
|
18689
|
+
|
|
18690
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
|
|
18691
|
+
var require_context_helpers = __commonJS((exports) => {
|
|
18692
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18693
|
+
exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
|
|
18694
|
+
var context_1 = require_context2();
|
|
18695
|
+
var context_2 = require_context();
|
|
18696
|
+
var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
|
|
18697
|
+
function getBaggage(context) {
|
|
18698
|
+
return context.getValue(BAGGAGE_KEY) || undefined;
|
|
18699
|
+
}
|
|
18700
|
+
exports.getBaggage = getBaggage;
|
|
18701
|
+
function getActiveBaggage() {
|
|
18702
|
+
return getBaggage(context_1.ContextAPI.getInstance().active());
|
|
18703
|
+
}
|
|
18704
|
+
exports.getActiveBaggage = getActiveBaggage;
|
|
18705
|
+
function setBaggage(context, baggage) {
|
|
18706
|
+
return context.setValue(BAGGAGE_KEY, baggage);
|
|
18707
|
+
}
|
|
18708
|
+
exports.setBaggage = setBaggage;
|
|
18709
|
+
function deleteBaggage(context) {
|
|
18710
|
+
return context.deleteValue(BAGGAGE_KEY);
|
|
18711
|
+
}
|
|
18712
|
+
exports.deleteBaggage = deleteBaggage;
|
|
18713
|
+
});
|
|
18714
|
+
|
|
18715
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
|
|
18716
|
+
var require_propagation = __commonJS((exports) => {
|
|
18717
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18718
|
+
exports.PropagationAPI = undefined;
|
|
18719
|
+
var global_utils_1 = require_global_utils();
|
|
18720
|
+
var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
|
|
18721
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18722
|
+
var context_helpers_1 = require_context_helpers();
|
|
18723
|
+
var utils_1 = require_utils();
|
|
18724
|
+
var diag_1 = require_diag();
|
|
18725
|
+
var API_NAME = "propagation";
|
|
18726
|
+
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
|
|
18727
|
+
|
|
18728
|
+
class PropagationAPI {
|
|
18729
|
+
constructor() {
|
|
18730
|
+
this.createBaggage = utils_1.createBaggage;
|
|
18731
|
+
this.getBaggage = context_helpers_1.getBaggage;
|
|
18732
|
+
this.getActiveBaggage = context_helpers_1.getActiveBaggage;
|
|
18733
|
+
this.setBaggage = context_helpers_1.setBaggage;
|
|
18734
|
+
this.deleteBaggage = context_helpers_1.deleteBaggage;
|
|
18735
|
+
}
|
|
18736
|
+
static getInstance() {
|
|
18737
|
+
if (!this._instance) {
|
|
18738
|
+
this._instance = new PropagationAPI;
|
|
18739
|
+
}
|
|
18740
|
+
return this._instance;
|
|
18741
|
+
}
|
|
18742
|
+
setGlobalPropagator(propagator) {
|
|
18743
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
|
|
18744
|
+
}
|
|
18745
|
+
inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
|
|
18746
|
+
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
18747
|
+
}
|
|
18748
|
+
extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
|
|
18749
|
+
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
18750
|
+
}
|
|
18751
|
+
fields() {
|
|
18752
|
+
return this._getGlobalPropagator().fields();
|
|
18753
|
+
}
|
|
18754
|
+
disable() {
|
|
18755
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18756
|
+
}
|
|
18757
|
+
_getGlobalPropagator() {
|
|
18758
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18759
|
+
}
|
|
18760
|
+
}
|
|
18761
|
+
exports.PropagationAPI = PropagationAPI;
|
|
18762
|
+
});
|
|
18763
|
+
|
|
18764
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
|
|
18765
|
+
var require_propagation_api = __commonJS((exports) => {
|
|
18766
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18767
|
+
exports.propagation = undefined;
|
|
18768
|
+
var propagation_1 = require_propagation();
|
|
18769
|
+
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
18770
|
+
});
|
|
18771
|
+
|
|
18772
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/trace.js
|
|
18773
|
+
var require_trace = __commonJS((exports) => {
|
|
18774
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18775
|
+
exports.TraceAPI = undefined;
|
|
18776
|
+
var global_utils_1 = require_global_utils();
|
|
18777
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18778
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18779
|
+
var context_utils_1 = require_context_utils();
|
|
18780
|
+
var diag_1 = require_diag();
|
|
18781
|
+
var API_NAME = "trace";
|
|
18782
|
+
|
|
18783
|
+
class TraceAPI {
|
|
18784
|
+
constructor() {
|
|
18785
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18786
|
+
this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
|
|
18787
|
+
this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
|
|
18788
|
+
this.deleteSpan = context_utils_1.deleteSpan;
|
|
18789
|
+
this.getSpan = context_utils_1.getSpan;
|
|
18790
|
+
this.getActiveSpan = context_utils_1.getActiveSpan;
|
|
18791
|
+
this.getSpanContext = context_utils_1.getSpanContext;
|
|
18792
|
+
this.setSpan = context_utils_1.setSpan;
|
|
18793
|
+
this.setSpanContext = context_utils_1.setSpanContext;
|
|
18794
|
+
}
|
|
18795
|
+
static getInstance() {
|
|
18796
|
+
if (!this._instance) {
|
|
18797
|
+
this._instance = new TraceAPI;
|
|
18798
|
+
}
|
|
18799
|
+
return this._instance;
|
|
18800
|
+
}
|
|
18801
|
+
setGlobalTracerProvider(provider) {
|
|
18802
|
+
const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
|
|
18803
|
+
if (success3) {
|
|
18804
|
+
this._proxyTracerProvider.setDelegate(provider);
|
|
18805
|
+
}
|
|
18806
|
+
return success3;
|
|
18807
|
+
}
|
|
18808
|
+
getTracerProvider() {
|
|
18809
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
|
|
18810
|
+
}
|
|
18811
|
+
getTracer(name, version2) {
|
|
18812
|
+
return this.getTracerProvider().getTracer(name, version2);
|
|
18813
|
+
}
|
|
18814
|
+
disable() {
|
|
18815
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18816
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18817
|
+
}
|
|
18818
|
+
}
|
|
18819
|
+
exports.TraceAPI = TraceAPI;
|
|
18820
|
+
});
|
|
18821
|
+
|
|
18822
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace-api.js
|
|
18823
|
+
var require_trace_api = __commonJS((exports) => {
|
|
18824
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18825
|
+
exports.trace = undefined;
|
|
18826
|
+
var trace_1 = require_trace();
|
|
18827
|
+
exports.trace = trace_1.TraceAPI.getInstance();
|
|
18828
|
+
});
|
|
18829
|
+
|
|
18830
|
+
// ../../node_modules/@opentelemetry/api/build/src/index.js
|
|
18831
|
+
var require_src = __commonJS((exports) => {
|
|
18832
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18833
|
+
exports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = undefined;
|
|
18834
|
+
var utils_1 = require_utils();
|
|
18835
|
+
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
|
|
18836
|
+
return utils_1.baggageEntryMetadataFromString;
|
|
18837
|
+
} });
|
|
18838
|
+
var context_1 = require_context();
|
|
18839
|
+
Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
|
|
18840
|
+
return context_1.createContextKey;
|
|
18841
|
+
} });
|
|
18842
|
+
Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
|
|
18843
|
+
return context_1.ROOT_CONTEXT;
|
|
18844
|
+
} });
|
|
18845
|
+
var consoleLogger_1 = require_consoleLogger();
|
|
18846
|
+
Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
|
|
18847
|
+
return consoleLogger_1.DiagConsoleLogger;
|
|
18848
|
+
} });
|
|
18849
|
+
var types_1 = require_types();
|
|
18850
|
+
Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
|
|
18851
|
+
return types_1.DiagLogLevel;
|
|
18852
|
+
} });
|
|
18853
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18854
|
+
Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
|
|
18855
|
+
return NoopMeter_1.createNoopMeter;
|
|
18856
|
+
} });
|
|
18857
|
+
var Metric_1 = require_Metric();
|
|
18858
|
+
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
|
|
18859
|
+
return Metric_1.ValueType;
|
|
18860
|
+
} });
|
|
18861
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18862
|
+
Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
|
|
18863
|
+
return TextMapPropagator_1.defaultTextMapGetter;
|
|
18864
|
+
} });
|
|
18865
|
+
Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
|
|
18866
|
+
return TextMapPropagator_1.defaultTextMapSetter;
|
|
18867
|
+
} });
|
|
18868
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18869
|
+
Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
|
|
18870
|
+
return ProxyTracer_1.ProxyTracer;
|
|
18871
|
+
} });
|
|
18872
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18873
|
+
Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
|
|
18874
|
+
return ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18875
|
+
} });
|
|
18876
|
+
var SamplingResult_1 = require_SamplingResult();
|
|
18877
|
+
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
18878
|
+
return SamplingResult_1.SamplingDecision;
|
|
18879
|
+
} });
|
|
18880
|
+
var span_kind_1 = require_span_kind();
|
|
18881
|
+
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
|
|
18882
|
+
return span_kind_1.SpanKind;
|
|
18883
|
+
} });
|
|
18884
|
+
var status_1 = require_status();
|
|
18885
|
+
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
|
|
18886
|
+
return status_1.SpanStatusCode;
|
|
18887
|
+
} });
|
|
18888
|
+
var trace_flags_1 = require_trace_flags();
|
|
18889
|
+
Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
|
|
18890
|
+
return trace_flags_1.TraceFlags;
|
|
18891
|
+
} });
|
|
18892
|
+
var utils_2 = require_utils2();
|
|
18893
|
+
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
|
|
18894
|
+
return utils_2.createTraceState;
|
|
18895
|
+
} });
|
|
18896
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18897
|
+
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
|
|
18898
|
+
return spancontext_utils_1.isSpanContextValid;
|
|
18899
|
+
} });
|
|
18900
|
+
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
|
|
18901
|
+
return spancontext_utils_1.isValidTraceId;
|
|
18902
|
+
} });
|
|
18903
|
+
Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
|
|
18904
|
+
return spancontext_utils_1.isValidSpanId;
|
|
18905
|
+
} });
|
|
18906
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18907
|
+
Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
|
|
18908
|
+
return invalid_span_constants_1.INVALID_SPANID;
|
|
18909
|
+
} });
|
|
18910
|
+
Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
|
|
18911
|
+
return invalid_span_constants_1.INVALID_TRACEID;
|
|
18912
|
+
} });
|
|
18913
|
+
Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
|
|
18914
|
+
return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
|
|
18915
|
+
} });
|
|
18916
|
+
var context_api_1 = require_context_api();
|
|
18917
|
+
Object.defineProperty(exports, "context", { enumerable: true, get: function() {
|
|
18918
|
+
return context_api_1.context;
|
|
18919
|
+
} });
|
|
18920
|
+
var diag_api_1 = require_diag_api();
|
|
18921
|
+
Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
|
|
18922
|
+
return diag_api_1.diag;
|
|
18923
|
+
} });
|
|
18924
|
+
var metrics_api_1 = require_metrics_api();
|
|
18925
|
+
Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
|
|
18926
|
+
return metrics_api_1.metrics;
|
|
18927
|
+
} });
|
|
18928
|
+
var propagation_api_1 = require_propagation_api();
|
|
18929
|
+
Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
|
|
18930
|
+
return propagation_api_1.propagation;
|
|
18931
|
+
} });
|
|
18932
|
+
var trace_api_1 = require_trace_api();
|
|
18933
|
+
Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
|
|
18934
|
+
return trace_api_1.trace;
|
|
18935
|
+
} });
|
|
18936
|
+
exports.default = {
|
|
18937
|
+
context: context_api_1.context,
|
|
18938
|
+
diag: diag_api_1.diag,
|
|
18939
|
+
metrics: metrics_api_1.metrics,
|
|
18940
|
+
propagation: propagation_api_1.propagation,
|
|
18941
|
+
trace: trace_api_1.trace
|
|
18942
|
+
};
|
|
18943
|
+
});
|
|
18944
|
+
|
|
18945
|
+
// ../types/src/processor/processor.ts
|
|
18946
|
+
var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
|
|
18947
|
+
var init_processor = __esm(() => {
|
|
18948
|
+
init_zod();
|
|
18949
|
+
init_common();
|
|
18950
|
+
import_api = __toESM(require_src(), 1);
|
|
18951
|
+
noopTracingContext = {
|
|
18952
|
+
traceId: "",
|
|
18953
|
+
getActiveSpan() {
|
|
18954
|
+
return;
|
|
18955
|
+
},
|
|
18956
|
+
async withSpan(_name, _options, fn) {
|
|
18957
|
+
const noopSpan = {
|
|
18958
|
+
spanContext: () => ({
|
|
18959
|
+
traceId: "",
|
|
18960
|
+
spanId: "",
|
|
18961
|
+
traceFlags: 0
|
|
18962
|
+
}),
|
|
18963
|
+
setAttribute: () => noopSpan,
|
|
18964
|
+
setAttributes: () => noopSpan,
|
|
18965
|
+
addEvent: () => noopSpan,
|
|
18966
|
+
addLink: () => noopSpan,
|
|
18967
|
+
addLinks: () => noopSpan,
|
|
18968
|
+
setStatus: () => noopSpan,
|
|
18969
|
+
updateName: () => noopSpan,
|
|
18970
|
+
end: () => {},
|
|
18971
|
+
isRecording: () => false,
|
|
18972
|
+
recordException: () => {}
|
|
18973
|
+
};
|
|
18974
|
+
return fn(noopSpan);
|
|
18975
|
+
}
|
|
18976
|
+
};
|
|
18977
|
+
ProcessorPortSchema = exports_external.object({
|
|
18978
|
+
name: exports_external.string(),
|
|
18979
|
+
schema: JsonSchemaSchema,
|
|
18980
|
+
required: exports_external.boolean().default(true)
|
|
18981
|
+
});
|
|
18982
|
+
ProcessorDefinitionSchema = exports_external.object({
|
|
18983
|
+
id: exports_external.string(),
|
|
18984
|
+
name: exports_external.string(),
|
|
18985
|
+
description: exports_external.string().optional(),
|
|
18986
|
+
inputSchema: JsonSchemaSchema,
|
|
18987
|
+
outputSchema: JsonSchemaSchema,
|
|
18988
|
+
configSchema: JsonSchemaSchema.optional(),
|
|
18989
|
+
inputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18990
|
+
outputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18991
|
+
isBuiltin: exports_external.boolean().default(true),
|
|
18992
|
+
pluginName: exports_external.string().optional()
|
|
18993
|
+
});
|
|
18994
|
+
ProcessorExecutionContextSchema = exports_external.object({
|
|
18995
|
+
jobId: exports_external.string(),
|
|
18996
|
+
stepId: exports_external.string(),
|
|
18997
|
+
tenantId: exports_external.string(),
|
|
18998
|
+
automationId: exports_external.string().optional(),
|
|
18999
|
+
workflowId: exports_external.string(),
|
|
19000
|
+
workerId: exports_external.string().optional()
|
|
19001
|
+
});
|
|
19002
|
+
((TraceStatus2) => {
|
|
19003
|
+
TraceStatus2["PENDING"] = "pending";
|
|
19004
|
+
TraceStatus2["RUNNING"] = "running";
|
|
19005
|
+
TraceStatus2["COMPLETED"] = "completed";
|
|
19006
|
+
TraceStatus2["FAILED"] = "failed";
|
|
19007
|
+
})(TraceStatus ||= {});
|
|
19008
|
+
});
|
|
19009
|
+
|
|
19010
|
+
// ../types/src/processor/execution.ts
|
|
19011
|
+
function asTuple(values) {
|
|
19012
|
+
return values;
|
|
19013
|
+
}
|
|
19014
|
+
var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
|
|
19015
|
+
var init_execution = __esm(() => {
|
|
19016
|
+
init_zod();
|
|
19017
|
+
WorkflowExecutionStatusValue = {
|
|
19018
|
+
CREATED: "created",
|
|
19019
|
+
PENDING: "pending",
|
|
19020
|
+
RUNNING: "running",
|
|
19021
|
+
WAITING: "waiting",
|
|
19022
|
+
COMPLETED: "completed",
|
|
19023
|
+
FAILED: "failed",
|
|
19024
|
+
CANCELLED: "cancelled"
|
|
19025
|
+
};
|
|
19026
|
+
WorkflowExecutionStatusSchema = exports_external.enum([
|
|
19027
|
+
WorkflowExecutionStatusValue.CREATED,
|
|
19028
|
+
WorkflowExecutionStatusValue.PENDING,
|
|
19029
|
+
WorkflowExecutionStatusValue.RUNNING,
|
|
19030
|
+
WorkflowExecutionStatusValue.WAITING,
|
|
19031
|
+
WorkflowExecutionStatusValue.COMPLETED,
|
|
19032
|
+
WorkflowExecutionStatusValue.FAILED,
|
|
19033
|
+
WorkflowExecutionStatusValue.CANCELLED
|
|
19034
|
+
]);
|
|
19035
|
+
StepExecutionStatusValue = {
|
|
19036
|
+
PENDING: "pending",
|
|
19037
|
+
RUNNING: "running",
|
|
19038
|
+
SUCCESS: "success",
|
|
19039
|
+
FAILURE: "failure",
|
|
19040
|
+
WAITING: "waiting",
|
|
19041
|
+
SKIPPED: "skipped"
|
|
19042
|
+
};
|
|
19043
|
+
StepExecutionStatusSchema = exports_external.enum([
|
|
19044
|
+
StepExecutionStatusValue.PENDING,
|
|
19045
|
+
StepExecutionStatusValue.RUNNING,
|
|
19046
|
+
StepExecutionStatusValue.SUCCESS,
|
|
19047
|
+
StepExecutionStatusValue.FAILURE,
|
|
19048
|
+
StepExecutionStatusValue.WAITING,
|
|
19049
|
+
StepExecutionStatusValue.SKIPPED
|
|
19050
|
+
]);
|
|
19051
|
+
TriggerTypeValue = {
|
|
19052
|
+
MANUAL: "manual",
|
|
19053
|
+
API: "api",
|
|
19054
|
+
WEBHOOK: "webhook",
|
|
19055
|
+
SCHEDULE: "schedule",
|
|
19056
|
+
EMAIL: "email",
|
|
19057
|
+
EVAL: "eval",
|
|
19058
|
+
CLI: "cli"
|
|
19059
|
+
};
|
|
19060
|
+
TriggerTypeSchema = exports_external.enum([
|
|
19061
|
+
TriggerTypeValue.MANUAL,
|
|
19062
|
+
TriggerTypeValue.API,
|
|
19063
|
+
TriggerTypeValue.WEBHOOK,
|
|
19064
|
+
TriggerTypeValue.SCHEDULE,
|
|
19065
|
+
TriggerTypeValue.EMAIL,
|
|
19066
|
+
TriggerTypeValue.EVAL,
|
|
19067
|
+
TriggerTypeValue.CLI
|
|
19068
|
+
]);
|
|
19069
|
+
ExecutionTypeValue = {
|
|
19070
|
+
PROD: "prod",
|
|
19071
|
+
EVAL: "eval",
|
|
19072
|
+
PLAYGROUND: "playground"
|
|
19073
|
+
};
|
|
19074
|
+
ExecutionTypeSchema = exports_external.enum([
|
|
19075
|
+
ExecutionTypeValue.PROD,
|
|
19076
|
+
ExecutionTypeValue.EVAL,
|
|
19077
|
+
ExecutionTypeValue.PLAYGROUND
|
|
19078
|
+
]);
|
|
19079
|
+
WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
|
|
19080
|
+
STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
|
|
19081
|
+
TRIGGER_TYPES = TriggerTypeSchema.options;
|
|
19082
|
+
EXECUTION_TYPES = ExecutionTypeSchema.options;
|
|
19083
|
+
});
|
|
19084
|
+
|
|
19085
|
+
// ../types/src/processor/configs/classify.ts
|
|
19086
|
+
var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
|
|
19087
|
+
var init_classify = __esm(() => {
|
|
19088
|
+
init_zod();
|
|
19089
|
+
ClassifyInputSchema = exports_external.object({
|
|
19090
|
+
content: exports_external.string().optional().describe("Text content to classify"),
|
|
19091
|
+
text: exports_external.string().optional().describe("Text content (alternative to content)")
|
|
19092
|
+
}).refine((data) => !!(data.content || data.text), {
|
|
19093
|
+
message: "Either content or text must be provided"
|
|
19094
|
+
});
|
|
19095
|
+
ClassifyLabelSchema = exports_external.object({
|
|
19096
|
+
name: exports_external.string().min(1).describe("Label value returned in output.label"),
|
|
19097
|
+
description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
|
|
19098
|
+
});
|
|
19099
|
+
ClassifyConfigSchema = exports_external.object({
|
|
19100
|
+
labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
|
|
19101
|
+
prompt: exports_external.string().optional().describe("Optional classification instructions appended to the system prompt. Use to clarify edge cases or emphasize evidence the model should weigh."),
|
|
19102
|
+
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
|
|
19103
|
+
model: exports_external.string().optional().describe("Model override"),
|
|
19104
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
|
|
19105
|
+
});
|
|
19106
|
+
ClassifyOutputSchema = exports_external.object({
|
|
19107
|
+
label: exports_external.string().describe("The selected label name"),
|
|
19108
|
+
confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
|
|
19109
|
+
reason: exports_external.string().describe("Short justification for the chosen label")
|
|
19110
|
+
});
|
|
19111
|
+
});
|
|
19112
|
+
|
|
19113
|
+
// ../types/src/parser/parser.ts
|
|
19114
|
+
function resolveEffectiveMimeType(filename, declaredMimeType) {
|
|
19115
|
+
const ext = filename.split(".").pop()?.toLowerCase();
|
|
19116
|
+
if (!ext)
|
|
19117
|
+
return declaredMimeType;
|
|
19118
|
+
const extensionMime = EXTENSION_TO_MIME[ext];
|
|
19119
|
+
return extensionMime ?? declaredMimeType;
|
|
19120
|
+
}
|
|
19121
|
+
function mimeTypeForExtension(extension) {
|
|
19122
|
+
return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
|
|
19123
|
+
}
|
|
19124
|
+
function extensionForMimeType(mimeType) {
|
|
19125
|
+
const base = mimeType.split(";")[0]?.trim().toLowerCase();
|
|
19126
|
+
return base ? MIME_TO_EXTENSION[base] : undefined;
|
|
19127
|
+
}
|
|
19128
|
+
function getParserCategory(mimeType) {
|
|
19129
|
+
const normalized = mimeType.toLowerCase().trim();
|
|
19130
|
+
if (ParserCategory.PLAINTEXT.includes(normalized)) {
|
|
19131
|
+
return "plaintext";
|
|
19132
|
+
}
|
|
19133
|
+
if (ParserCategory.OFFICE.includes(normalized)) {
|
|
19134
|
+
return "office";
|
|
19135
|
+
}
|
|
19136
|
+
if (ParserCategory.DOCUMENT.includes(normalized)) {
|
|
19137
|
+
return "document";
|
|
19138
|
+
}
|
|
19139
|
+
return null;
|
|
19140
|
+
}
|
|
19141
|
+
function requiresSpecializedParser(mimeType) {
|
|
19142
|
+
return getParserCategory(mimeType) === "document";
|
|
19143
|
+
}
|
|
19144
|
+
function getAllSupportedMimeTypes() {
|
|
19145
|
+
return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
|
|
19146
|
+
}
|
|
19147
|
+
function getSupportedFormatsLabel() {
|
|
19148
|
+
const allMimes = getAllSupportedMimeTypes();
|
|
19149
|
+
const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
|
|
19150
|
+
return labels.join(", ");
|
|
19151
|
+
}
|
|
19152
|
+
var OFFICE_MIME_TYPES, ParserCategory, ParserTypeSchema, DocumentMetadataSchema, ParseUsageSchema, CoordinateUnitSchema, PointSchema, BoundingRegionSchema, PositionedTextSchema, TableCellSchema, ExtractedTableSchema, LayoutElementTypeSchema, LayoutElementSchema, PageResultSchema, ParseResultSchema, ParseOptionsSchema, ParserInputSchema, EXTENSION_TO_MIME, MIME_TO_EXTENSION, MIME_TO_LABEL;
|
|
19153
|
+
var init_parser = __esm(() => {
|
|
19154
|
+
init_zod();
|
|
19155
|
+
OFFICE_MIME_TYPES = [
|
|
19156
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19157
|
+
"application/msword",
|
|
19158
|
+
"application/vnd.oasis.opendocument.text",
|
|
19159
|
+
"application/rtf",
|
|
19160
|
+
"text/rtf",
|
|
19161
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19162
|
+
"application/vnd.ms-excel",
|
|
19163
|
+
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19164
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19165
|
+
"application/vnd.oasis.opendocument.spreadsheet",
|
|
19166
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19167
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19168
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19169
|
+
"application/vnd.ms-powerpoint",
|
|
19170
|
+
"application/vnd.oasis.opendocument.presentation",
|
|
19171
|
+
"message/rfc822",
|
|
19172
|
+
"application/vnd.ms-outlook",
|
|
19173
|
+
"application/epub+zip"
|
|
19174
|
+
];
|
|
19175
|
+
ParserCategory = {
|
|
19176
|
+
PLAINTEXT: [
|
|
19177
|
+
"text/plain",
|
|
19178
|
+
"text/markdown",
|
|
19179
|
+
"text/csv",
|
|
19180
|
+
"text/tab-separated-values",
|
|
19181
|
+
"text/html",
|
|
19182
|
+
"text/xml",
|
|
19183
|
+
"application/json",
|
|
19184
|
+
"application/x-yaml",
|
|
19185
|
+
"application/toml",
|
|
19186
|
+
"image/svg+xml",
|
|
19187
|
+
"text/x-rst",
|
|
19188
|
+
"text/x-org",
|
|
19189
|
+
"application/x-latex",
|
|
19190
|
+
"application/x-ipynb+json",
|
|
19191
|
+
"application/x-bibtex",
|
|
19192
|
+
"application/docbook+xml",
|
|
19193
|
+
"application/x-fictionbook+xml"
|
|
19194
|
+
],
|
|
19195
|
+
OFFICE: [...OFFICE_MIME_TYPES],
|
|
19196
|
+
DOCUMENT: [
|
|
19197
|
+
"application/pdf",
|
|
19198
|
+
"image/png",
|
|
19199
|
+
"image/jpeg",
|
|
19200
|
+
"image/webp",
|
|
19201
|
+
"image/tiff",
|
|
19202
|
+
"image/gif",
|
|
19203
|
+
"image/bmp"
|
|
19204
|
+
]
|
|
19205
|
+
};
|
|
19206
|
+
ParserTypeSchema = exports_external.enum([
|
|
19207
|
+
"plaintext",
|
|
19208
|
+
"office",
|
|
19209
|
+
"llm-vision",
|
|
19210
|
+
"ocr"
|
|
19211
|
+
]);
|
|
19212
|
+
DocumentMetadataSchema = exports_external.object({
|
|
19213
|
+
filename: exports_external.string(),
|
|
19214
|
+
mimeType: exports_external.string(),
|
|
19215
|
+
size: exports_external.number().describe("File size in bytes"),
|
|
19216
|
+
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
19217
|
+
});
|
|
19218
|
+
ParseUsageSchema = exports_external.object({
|
|
19219
|
+
pageCount: exports_external.number(),
|
|
19220
|
+
processingTimeMs: exports_external.number().optional()
|
|
19221
|
+
});
|
|
19222
|
+
CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
19223
|
+
PointSchema = exports_external.object({
|
|
19224
|
+
x: exports_external.number(),
|
|
19225
|
+
y: exports_external.number()
|
|
19226
|
+
});
|
|
19227
|
+
BoundingRegionSchema = exports_external.object({
|
|
19228
|
+
polygon: exports_external.array(PointSchema).min(3),
|
|
19229
|
+
unit: CoordinateUnitSchema,
|
|
19230
|
+
pageIndex: exports_external.number()
|
|
19231
|
+
});
|
|
19232
|
+
PositionedTextSchema = exports_external.object({
|
|
19233
|
+
text: exports_external.string(),
|
|
19234
|
+
confidence: exports_external.number().min(0).max(1).optional(),
|
|
19235
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19236
|
+
});
|
|
19237
|
+
TableCellSchema = exports_external.object({
|
|
19238
|
+
content: exports_external.string(),
|
|
19239
|
+
rowIndex: exports_external.number(),
|
|
19240
|
+
columnIndex: exports_external.number(),
|
|
19241
|
+
rowSpan: exports_external.number().default(1),
|
|
19242
|
+
columnSpan: exports_external.number().default(1),
|
|
19243
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19244
|
+
});
|
|
19245
|
+
ExtractedTableSchema = exports_external.object({
|
|
19246
|
+
cells: exports_external.array(TableCellSchema),
|
|
19247
|
+
rowCount: exports_external.number(),
|
|
19248
|
+
columnCount: exports_external.number(),
|
|
19249
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19250
|
+
});
|
|
19251
|
+
LayoutElementTypeSchema = exports_external.enum([
|
|
19252
|
+
"paragraph",
|
|
19253
|
+
"title",
|
|
19254
|
+
"sectionHeading",
|
|
19255
|
+
"pageHeader",
|
|
19256
|
+
"pageFooter",
|
|
19257
|
+
"pageNumber",
|
|
19258
|
+
"footnote",
|
|
19259
|
+
"table",
|
|
19260
|
+
"figure",
|
|
19261
|
+
"formulaBlock"
|
|
19262
|
+
]);
|
|
19263
|
+
LayoutElementSchema = exports_external.object({
|
|
19264
|
+
type: LayoutElementTypeSchema,
|
|
19265
|
+
content: exports_external.string(),
|
|
19266
|
+
table: ExtractedTableSchema.optional(),
|
|
19267
|
+
caption: exports_external.string().optional(),
|
|
19268
|
+
figureId: exports_external.string().optional(),
|
|
19269
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19270
|
+
});
|
|
19271
|
+
PageResultSchema = exports_external.object({
|
|
19272
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19273
|
+
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
19274
|
+
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
19275
|
+
layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
|
|
19276
|
+
words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
|
|
19277
|
+
lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
|
|
19278
|
+
tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
|
|
19279
|
+
width: exports_external.number().optional().describe("Page width"),
|
|
19280
|
+
height: exports_external.number().optional().describe("Page height"),
|
|
19281
|
+
unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
|
|
19282
|
+
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
19283
|
+
});
|
|
19284
|
+
ParseResultSchema = exports_external.object({
|
|
19285
|
+
document: DocumentMetadataSchema,
|
|
19286
|
+
usage: ParseUsageSchema,
|
|
19287
|
+
pages: exports_external.array(PageResultSchema),
|
|
19288
|
+
text: exports_external.string().describe("Combined text from all pages"),
|
|
19289
|
+
parserType: ParserTypeSchema,
|
|
19290
|
+
parserVersion: exports_external.string().optional(),
|
|
19291
|
+
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
19292
|
+
rawResponse: exports_external.unknown().optional()
|
|
19293
|
+
});
|
|
19294
|
+
ParseOptionsSchema = exports_external.object({
|
|
19295
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
19296
|
+
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
19297
|
+
includeWordPositions: exports_external.boolean().default(false),
|
|
19298
|
+
includeLinePositions: exports_external.boolean().default(false),
|
|
19299
|
+
extractTables: exports_external.boolean().default(true),
|
|
19300
|
+
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
19301
|
+
model: exports_external.string().optional(),
|
|
19302
|
+
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
19303
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
19304
|
+
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
19305
|
+
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
19306
|
+
tenantId: exports_external.string().optional()
|
|
19307
|
+
});
|
|
19308
|
+
ParserInputSchema = exports_external.object({
|
|
19309
|
+
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
19310
|
+
filename: exports_external.string(),
|
|
19311
|
+
mimeType: exports_external.string(),
|
|
19312
|
+
options: ParseOptionsSchema.optional()
|
|
19313
|
+
});
|
|
19314
|
+
EXTENSION_TO_MIME = {
|
|
19315
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19316
|
+
doc: "application/msword",
|
|
19317
|
+
odt: "application/vnd.oasis.opendocument.text",
|
|
19318
|
+
rtf: "application/rtf",
|
|
19319
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19320
|
+
xls: "application/vnd.ms-excel",
|
|
19321
|
+
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19322
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19323
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
19324
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19325
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19326
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19327
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
19328
|
+
odp: "application/vnd.oasis.opendocument.presentation",
|
|
19329
|
+
eml: "message/rfc822",
|
|
19330
|
+
msg: "application/vnd.ms-outlook",
|
|
19331
|
+
epub: "application/epub+zip",
|
|
19332
|
+
pdf: "application/pdf",
|
|
19333
|
+
png: "image/png",
|
|
19334
|
+
jpg: "image/jpeg",
|
|
19335
|
+
jpeg: "image/jpeg",
|
|
19336
|
+
webp: "image/webp",
|
|
19337
|
+
tiff: "image/tiff",
|
|
19338
|
+
tif: "image/tiff",
|
|
19339
|
+
gif: "image/gif",
|
|
19340
|
+
bmp: "image/bmp",
|
|
19341
|
+
svg: "image/svg+xml",
|
|
19342
|
+
txt: "text/plain",
|
|
19343
|
+
md: "text/markdown",
|
|
19344
|
+
markdown: "text/markdown",
|
|
19345
|
+
csv: "text/csv",
|
|
19346
|
+
tsv: "text/tab-separated-values",
|
|
19347
|
+
html: "text/html",
|
|
19348
|
+
htm: "text/html",
|
|
19349
|
+
xml: "text/xml",
|
|
19350
|
+
json: "application/json",
|
|
19351
|
+
yaml: "application/x-yaml",
|
|
19352
|
+
yml: "application/x-yaml",
|
|
19353
|
+
toml: "application/toml",
|
|
19354
|
+
rst: "text/x-rst",
|
|
19355
|
+
org: "text/x-org",
|
|
19356
|
+
tex: "application/x-latex",
|
|
19357
|
+
latex: "application/x-latex",
|
|
19358
|
+
ipynb: "application/x-ipynb+json",
|
|
19359
|
+
bib: "application/x-bibtex",
|
|
19360
|
+
dbk: "application/docbook+xml",
|
|
19361
|
+
docbook: "application/docbook+xml",
|
|
19362
|
+
fb2: "application/x-fictionbook+xml"
|
|
19363
|
+
};
|
|
19364
|
+
MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
|
|
19365
|
+
if (!(mime in acc))
|
|
19366
|
+
acc[mime] = ext;
|
|
19367
|
+
return acc;
|
|
19368
|
+
}, {});
|
|
19369
|
+
MIME_TO_LABEL = {
|
|
19370
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
19371
|
+
"application/msword": "DOC",
|
|
19372
|
+
"application/vnd.oasis.opendocument.text": "ODT",
|
|
19373
|
+
"application/rtf": "RTF",
|
|
19374
|
+
"text/rtf": "RTF",
|
|
19375
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
19376
|
+
"application/vnd.ms-excel": "XLS",
|
|
19377
|
+
"application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
|
|
19378
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
|
|
19379
|
+
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
|
|
19380
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
|
|
19381
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
|
|
19382
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
|
|
19383
|
+
"application/vnd.ms-powerpoint": "PPT",
|
|
19384
|
+
"application/vnd.oasis.opendocument.presentation": "ODP",
|
|
19385
|
+
"message/rfc822": "EML",
|
|
19386
|
+
"application/vnd.ms-outlook": "MSG",
|
|
19387
|
+
"application/epub+zip": "EPUB",
|
|
19388
|
+
"application/pdf": "PDF",
|
|
19389
|
+
"image/png": "PNG",
|
|
19390
|
+
"image/jpeg": "JPEG",
|
|
19391
|
+
"image/webp": "WebP",
|
|
19392
|
+
"image/tiff": "TIFF",
|
|
19393
|
+
"image/gif": "GIF",
|
|
19394
|
+
"image/bmp": "BMP",
|
|
19395
|
+
"image/svg+xml": "SVG",
|
|
19396
|
+
"text/plain": "TXT",
|
|
19397
|
+
"text/markdown": "Markdown",
|
|
19398
|
+
"text/csv": "CSV",
|
|
19399
|
+
"text/tab-separated-values": "TSV",
|
|
19400
|
+
"text/html": "HTML",
|
|
19401
|
+
"text/xml": "XML",
|
|
19402
|
+
"application/json": "JSON",
|
|
19403
|
+
"application/x-yaml": "YAML",
|
|
19404
|
+
"application/toml": "TOML",
|
|
19405
|
+
"text/x-rst": "RST",
|
|
19406
|
+
"text/x-org": "Org",
|
|
19407
|
+
"application/x-latex": "LaTeX",
|
|
19408
|
+
"application/x-ipynb+json": "Jupyter",
|
|
19409
|
+
"application/x-bibtex": "BibTeX",
|
|
19410
|
+
"application/docbook+xml": "DocBook",
|
|
19411
|
+
"application/x-fictionbook+xml": "FB2"
|
|
19412
|
+
};
|
|
19413
|
+
});
|
|
19414
|
+
|
|
19415
|
+
// ../types/src/processor/configs/document-parser.ts
|
|
19416
|
+
var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
|
|
19417
|
+
var init_document_parser = __esm(() => {
|
|
19418
|
+
init_zod();
|
|
19419
|
+
init_runtime_file_ref();
|
|
19420
|
+
init_parser();
|
|
19421
|
+
DocumentParserInputSchema = ResolvedProcessorFileSchema;
|
|
19422
|
+
DocumentParserOutputSchema = ParseResultSchema;
|
|
19423
|
+
DocumentParserConfigSchema = exports_external.object({
|
|
19424
|
+
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
19425
|
+
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
19426
|
+
maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
|
|
19427
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
|
|
19428
|
+
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
19429
|
+
nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
|
|
19430
|
+
languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
19431
|
+
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.")
|
|
19432
|
+
}).prefault({});
|
|
19433
|
+
});
|
|
19434
|
+
|
|
19435
|
+
// ../types/src/processor/configs/extract.ts
|
|
19436
|
+
var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
|
|
19437
|
+
var init_extract = __esm(() => {
|
|
19438
|
+
init_zod();
|
|
19439
|
+
ExtractInputSchema = exports_external.object({
|
|
19440
|
+
content: exports_external.string().optional().describe("Text content to extract from"),
|
|
19441
|
+
text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
|
|
19442
|
+
contentType: exports_external.enum(["text", "image"]).default("text"),
|
|
19443
|
+
imageData: exports_external.string().optional(),
|
|
19444
|
+
imageMimeType: exports_external.string().optional()
|
|
19445
|
+
}).refine((data) => data.content || data.text, {
|
|
19446
|
+
message: "Either content or text must be provided"
|
|
19447
|
+
});
|
|
19448
|
+
ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
|
|
19449
|
+
ExtractConfigSchema = exports_external.object({
|
|
19450
|
+
schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
|
|
19451
|
+
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
19452
|
+
provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
|
|
19453
|
+
model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
|
|
19454
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
|
|
19455
|
+
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."),
|
|
19456
|
+
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."),
|
|
19457
|
+
groundingExamples: exports_external.array(exports_external.object({
|
|
19458
|
+
text: exports_external.string(),
|
|
19459
|
+
extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
|
|
19460
|
+
})).optional().describe("Few-shot examples for grounding (verbatim source text per field). Optional."),
|
|
19461
|
+
reviewOn: exports_external.enum(["medium_or_low", "low_only"]).optional().describe("Which grounding confidences flag a field for review. Default: medium_or_low.")
|
|
19462
|
+
});
|
|
19463
|
+
});
|
|
19464
|
+
|
|
19465
|
+
// ../types/src/processor/configs/merge.ts
|
|
19466
|
+
var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
|
|
19467
|
+
var init_merge = __esm(() => {
|
|
19468
|
+
init_zod();
|
|
19469
|
+
MergeConfigSchema = exports_external.object({
|
|
19470
|
+
preservePortNames: exports_external.boolean().default(true),
|
|
19471
|
+
outputKey: exports_external.string().optional()
|
|
19472
|
+
});
|
|
19473
|
+
MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
19474
|
+
MergeOutputSchema = exports_external.object({
|
|
19475
|
+
items: exports_external.array(exports_external.unknown()),
|
|
19476
|
+
count: exports_external.number(),
|
|
19477
|
+
merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
19478
|
+
});
|
|
19479
|
+
});
|
|
19480
|
+
|
|
19481
|
+
// ../types/src/processor/configs/pdf-embedder.ts
|
|
19482
|
+
var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
|
|
19483
|
+
var init_pdf_embedder = __esm(() => {
|
|
19484
|
+
init_zod();
|
|
19485
|
+
init_runtime_file_ref();
|
|
19486
|
+
init_parser();
|
|
19487
|
+
PdfEmbedderInputSchema = exports_external.object({
|
|
19488
|
+
file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
|
|
19489
|
+
parseResult: exports_external.object({
|
|
19490
|
+
pages: exports_external.array(PageResultSchema),
|
|
19491
|
+
text: exports_external.string().optional()
|
|
19492
|
+
}).describe("Parse result from ai.parse step (must include word positions)")
|
|
19493
|
+
});
|
|
19494
|
+
PdfEmbedderOutputSchema = exports_external.object({
|
|
19495
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19496
|
+
pageCount: exports_external.number().describe("Number of pages in the output PDF"),
|
|
19497
|
+
wordCount: exports_external.number().describe("Number of words embedded"),
|
|
19498
|
+
text: exports_external.string().describe("Extracted text (from parse step)")
|
|
19499
|
+
});
|
|
19500
|
+
PdfEmbedderConfigSchema = exports_external.object({
|
|
19501
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
|
|
19502
|
+
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")
|
|
19503
|
+
}).prefault({});
|
|
19504
|
+
});
|
|
19505
|
+
|
|
19506
|
+
// ../types/src/processor/configs/segment.ts
|
|
19507
|
+
var SegmentInputSchema, SEGMENT_UNKNOWN_TYPE = "unknown", SegmentConfigSchema, ConfidenceLevelSchema, SegmentSummarySchema, SegmentOutputSchema;
|
|
19508
|
+
var init_segment = __esm(() => {
|
|
19509
|
+
init_zod();
|
|
19510
|
+
SegmentInputSchema = exports_external.object({
|
|
19511
|
+
pages: exports_external.array(exports_external.object({
|
|
19512
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19513
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19514
|
+
pageName: exports_external.string().optional()
|
|
19515
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19516
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19517
|
+
SegmentConfigSchema = exports_external.object({
|
|
19518
|
+
documentTypes: exports_external.array(exports_external.object({
|
|
19519
|
+
name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo").'),
|
|
19520
|
+
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.")
|
|
19521
|
+
})).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.'),
|
|
19522
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19523
|
+
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.'),
|
|
19524
|
+
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.")
|
|
19525
|
+
});
|
|
19526
|
+
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.");
|
|
19527
|
+
SegmentSummarySchema = exports_external.object({
|
|
19528
|
+
total: exports_external.number().int().describe("Total documents discovered in the batch."),
|
|
19529
|
+
labelled: exports_external.number().int().describe('Documents assigned a known taxonomy type (type !== "unknown").'),
|
|
19530
|
+
unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type === "unknown") — escalate to a human.'),
|
|
19531
|
+
lowConfidence: exports_external.number().int().describe('Documents whose boundary/type confidence is "low" — also worth human review.'),
|
|
19532
|
+
byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe('Per-type document counts, keyed by type name (includes "unknown").'),
|
|
19533
|
+
needsReview: exports_external.array(exports_external.object({
|
|
19534
|
+
index: exports_external.number().int(),
|
|
19535
|
+
type: exports_external.string(),
|
|
19536
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19537
|
+
reason: exports_external.enum(["unlabelled", "low_confidence"]).describe("Why this document should be escalated to a human operator."),
|
|
19538
|
+
notes: exports_external.string()
|
|
19539
|
+
})).describe("The exact documents to escalate to a human operator, with the reason for each.")
|
|
19540
|
+
});
|
|
19541
|
+
SegmentOutputSchema = exports_external.object({
|
|
19542
|
+
summary: SegmentSummarySchema.describe("Batch-level escalation summary: labelled vs unlabelled counts and the documents needing human review."),
|
|
19543
|
+
documents: exports_external.array(exports_external.object({
|
|
19544
|
+
index: exports_external.number().int().describe("0-based position of this document in the batch, in page order."),
|
|
19545
|
+
type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown" when none fit.'),
|
|
19546
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("Inclusive [startPage, endPage], 0-based, matching input pageIndex."),
|
|
19547
|
+
confidence: ConfidenceLevelSchema.describe("LLM confidence at the document boundary + type: low | medium | high."),
|
|
19548
|
+
notes: exports_external.string().describe("Short prose citing what marked this page as a new document."),
|
|
19549
|
+
evidence: exports_external.object({
|
|
19550
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
|
|
19551
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
|
|
19552
|
+
}).optional().describe("Structured start evidence — for downstream parsing without regex over `notes`."),
|
|
19553
|
+
text: exports_external.string().describe("Joined per-page text for this document, ready for ai.extract"),
|
|
19554
|
+
pages: exports_external.array(exports_external.object({
|
|
19555
|
+
pageIndex: exports_external.number().int(),
|
|
19556
|
+
text: exports_external.string(),
|
|
19557
|
+
pageName: exports_external.string().optional(),
|
|
19558
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM boundary (direct evidence) or filled in by continuity")
|
|
19559
|
+
})).describe("Raw per-page records covered by this document, in page order."),
|
|
19560
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19561
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19562
|
+
}))
|
|
19563
|
+
});
|
|
19564
|
+
});
|
|
19565
|
+
|
|
19566
|
+
// ../types/src/processor/configs/split.ts
|
|
19567
|
+
var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema2, SplitOutputSchema;
|
|
19568
|
+
var init_split = __esm(() => {
|
|
19569
|
+
init_zod();
|
|
19570
|
+
SplitInputSchema = exports_external.object({
|
|
19571
|
+
pages: exports_external.array(exports_external.object({
|
|
19572
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19573
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19574
|
+
pageName: exports_external.string().optional()
|
|
19575
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19576
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19577
|
+
SplitConfigSchema = exports_external.object({
|
|
19578
|
+
sections: exports_external.array(exports_external.object({
|
|
19579
|
+
name: exports_external.string().min(1).describe("Stable id for the section"),
|
|
19580
|
+
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."),
|
|
19581
|
+
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").'),
|
|
19582
|
+
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.')
|
|
19583
|
+
})).min(1),
|
|
19584
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19585
|
+
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.'),
|
|
19586
|
+
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.")
|
|
19587
|
+
});
|
|
19588
|
+
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.");
|
|
19589
|
+
SplitOutputSchema = exports_external.object({
|
|
19590
|
+
splits: exports_external.array(exports_external.object({
|
|
19591
|
+
name: exports_external.string(),
|
|
19592
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19593
|
+
confidence: ConfidenceLevelSchema2.describe("LLM confidence at the start anchor: low | medium | high."),
|
|
19594
|
+
notes: exports_external.string(),
|
|
19595
|
+
evidence: exports_external.object({
|
|
19596
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
|
|
19597
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
|
|
19598
|
+
}).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
|
|
19599
|
+
end_evidence: exports_external.object({
|
|
19600
|
+
end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
|
|
19601
|
+
confidence: ConfidenceLevelSchema2,
|
|
19602
|
+
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.")
|
|
19603
|
+
}).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)."),
|
|
19604
|
+
text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
|
|
19605
|
+
pages: exports_external.array(exports_external.object({
|
|
19606
|
+
pageIndex: exports_external.number().int(),
|
|
19607
|
+
text: exports_external.string(),
|
|
19608
|
+
pageName: exports_external.string().optional(),
|
|
19609
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
|
|
19610
|
+
})).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."),
|
|
19611
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19612
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19613
|
+
}))
|
|
19614
|
+
});
|
|
19615
|
+
});
|
|
19616
|
+
|
|
19617
|
+
// ../types/src/processor/configs/template.ts
|
|
19618
|
+
var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
|
|
19619
|
+
var init_template = __esm(() => {
|
|
19620
|
+
init_zod();
|
|
19621
|
+
TemplateInputSchema = exports_external.object({
|
|
19622
|
+
data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
|
|
19623
|
+
});
|
|
19624
|
+
TemplateOutputSchema = exports_external.object({
|
|
19625
|
+
fileId: exports_external.string().describe("File ID from files table")
|
|
19626
|
+
});
|
|
19627
|
+
TemplateConfigSchema = exports_external.object({
|
|
19628
|
+
templateId: exports_external.string().describe("ID of the template from templates table"),
|
|
19629
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
|
|
19630
|
+
highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
|
|
19631
|
+
notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
|
|
19632
|
+
});
|
|
19633
|
+
});
|
|
19634
|
+
|
|
19635
|
+
// ../types/src/processor/configs/xlsx-to-json.ts
|
|
19636
|
+
var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
|
|
19637
|
+
var init_xlsx_to_json = __esm(() => {
|
|
19638
|
+
init_zod();
|
|
19639
|
+
init_runtime_file_ref();
|
|
19640
|
+
XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
|
|
19641
|
+
XlsxToJsonOutputSchema = exports_external.object({
|
|
19642
|
+
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
|
|
19643
|
+
fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
|
|
19644
|
+
});
|
|
19645
|
+
XlsxToJsonConfigSchema = exports_external.object({
|
|
19646
|
+
sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
|
|
19647
|
+
outputCsv: exports_external.boolean().default(false).optional(),
|
|
19648
|
+
outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
|
|
19649
|
+
});
|
|
19650
|
+
});
|
|
19651
|
+
|
|
19652
|
+
// ../types/src/processor/configs/react-hook-form.ts
|
|
19653
|
+
function extractFieldMetadata(schema) {
|
|
19654
|
+
const fields = [];
|
|
19655
|
+
let inner = schema;
|
|
19656
|
+
while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
|
|
19657
|
+
inner = inner.unwrap();
|
|
19658
|
+
}
|
|
19659
|
+
if (inner instanceof exports_external.ZodObject) {
|
|
19660
|
+
for (const [name, fieldSchema] of Object.entries(inner.shape)) {
|
|
19661
|
+
fields.push(extractSingleFieldMetadata(name, fieldSchema));
|
|
19662
|
+
}
|
|
19663
|
+
}
|
|
19664
|
+
return fields;
|
|
19665
|
+
}
|
|
19666
|
+
function extractSingleFieldMetadata(name, schema) {
|
|
19667
|
+
let current = schema;
|
|
19668
|
+
let required2 = true;
|
|
19669
|
+
let defaultValue = undefined;
|
|
19670
|
+
let description = current.description;
|
|
19671
|
+
while (true) {
|
|
19672
|
+
if (current instanceof exports_external.ZodOptional) {
|
|
19673
|
+
required2 = false;
|
|
19674
|
+
current = current.unwrap();
|
|
19675
|
+
} else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
|
|
19676
|
+
defaultValue = current._def.defaultValue;
|
|
19677
|
+
current = current.unwrap();
|
|
19678
|
+
} else {
|
|
19679
|
+
break;
|
|
19680
|
+
}
|
|
19681
|
+
description ??= current.description;
|
|
19682
|
+
}
|
|
19683
|
+
const base = { name, type: "unknown", required: required2, description, defaultValue };
|
|
19684
|
+
if (current instanceof exports_external.ZodString)
|
|
19685
|
+
return { ...base, type: "string" };
|
|
19686
|
+
if (current instanceof exports_external.ZodNumber) {
|
|
19687
|
+
let min;
|
|
19688
|
+
let max;
|
|
19689
|
+
for (const c of current._def.checks ?? []) {
|
|
19690
|
+
const def = c._zod.def;
|
|
19691
|
+
if (def.check === "greater_than")
|
|
19692
|
+
min = def.value;
|
|
19693
|
+
if (def.check === "less_than")
|
|
19694
|
+
max = def.value;
|
|
19695
|
+
}
|
|
19696
|
+
return { ...base, type: "number", min, max };
|
|
19697
|
+
}
|
|
19698
|
+
if (current instanceof exports_external.ZodBoolean)
|
|
19699
|
+
return { ...base, type: "boolean" };
|
|
19700
|
+
if (current instanceof exports_external.ZodEnum) {
|
|
19701
|
+
return { ...base, type: "enum", enumValues: current.options };
|
|
19702
|
+
}
|
|
19703
|
+
if (current instanceof exports_external.ZodArray)
|
|
19704
|
+
return { ...base, type: "array" };
|
|
19705
|
+
if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
|
|
19706
|
+
return { ...base, type: "object" };
|
|
19707
|
+
}
|
|
19708
|
+
return base;
|
|
19709
|
+
}
|
|
19710
|
+
function getConfigFieldMetadata(processorId) {
|
|
19711
|
+
const schema = getConfigSchema(processorId);
|
|
19712
|
+
if (!schema)
|
|
19713
|
+
return;
|
|
19714
|
+
return extractFieldMetadata(schema);
|
|
19715
|
+
}
|
|
19716
|
+
function getConfigDefaults(processorId) {
|
|
19717
|
+
const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19718
|
+
if (!schema)
|
|
19719
|
+
return {};
|
|
19720
|
+
try {
|
|
19721
|
+
const result = schema.safeParse({});
|
|
19722
|
+
if (result.success) {
|
|
19723
|
+
return result.data;
|
|
19724
|
+
}
|
|
19725
|
+
} catch {}
|
|
19726
|
+
const fields = extractFieldMetadata(schema);
|
|
19727
|
+
const defaults = {};
|
|
19728
|
+
for (const field of fields) {
|
|
19729
|
+
if (field.defaultValue !== undefined) {
|
|
19730
|
+
defaults[field.name] = field.defaultValue;
|
|
19731
|
+
}
|
|
19732
|
+
}
|
|
19733
|
+
return defaults;
|
|
19734
|
+
}
|
|
19735
|
+
function validateConfig(processorId, config2) {
|
|
19736
|
+
const schema = getConfigSchema(processorId);
|
|
19737
|
+
if (!schema) {
|
|
19738
|
+
return { valid: true, errors: {} };
|
|
19739
|
+
}
|
|
19740
|
+
const result = schema.safeParse(config2);
|
|
19741
|
+
if (result.success) {
|
|
19742
|
+
return { valid: true, errors: {} };
|
|
19743
|
+
}
|
|
19744
|
+
const errors3 = {};
|
|
19745
|
+
for (const issue2 of result.error.issues) {
|
|
19746
|
+
const path = issue2.path.join(".");
|
|
19747
|
+
errors3[path] = issue2.message;
|
|
19748
|
+
}
|
|
19749
|
+
return { valid: false, errors: errors3 };
|
|
19750
|
+
}
|
|
19751
|
+
var init_react_hook_form = __esm(() => {
|
|
19752
|
+
init_zod();
|
|
19753
|
+
init_configs();
|
|
19754
|
+
});
|
|
19755
|
+
|
|
19756
|
+
// ../types/src/processor/configs/index.ts
|
|
19757
|
+
function getProcessorSchemas(processorId) {
|
|
19758
|
+
return PROCESSOR_SCHEMAS[processorId];
|
|
19759
|
+
}
|
|
19760
|
+
function getConfigSchema(processorId) {
|
|
19761
|
+
return PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19762
|
+
}
|
|
19763
|
+
function getAllProcessorJsonSchemas() {
|
|
19764
|
+
return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
|
|
19765
|
+
id: p.id,
|
|
19766
|
+
inputSchema: toJsonSchema(p.inputSchema),
|
|
19767
|
+
outputSchema: toJsonSchema(p.outputSchema),
|
|
19768
|
+
configSchema: toJsonSchema(p.configSchema)
|
|
19769
|
+
}));
|
|
19770
|
+
}
|
|
19771
|
+
function listProcessorIds() {
|
|
19772
|
+
return Object.keys(PROCESSOR_SCHEMAS);
|
|
19773
|
+
}
|
|
19774
|
+
var PROCESSOR_SCHEMAS;
|
|
19775
|
+
var init_configs = __esm(() => {
|
|
19776
|
+
init_common();
|
|
19777
|
+
init_ids();
|
|
19778
|
+
init_classify();
|
|
19779
|
+
init_document_parser();
|
|
19780
|
+
init_extract();
|
|
19781
|
+
init_merge();
|
|
19782
|
+
init_pdf_embedder();
|
|
19783
|
+
init_segment();
|
|
19784
|
+
init_split();
|
|
19785
|
+
init_template();
|
|
19786
|
+
init_xlsx_to_json();
|
|
19787
|
+
init_react_hook_form();
|
|
19788
|
+
init_classify();
|
|
19789
|
+
init_document_parser();
|
|
19790
|
+
init_extract();
|
|
19791
|
+
init_merge();
|
|
19792
|
+
init_pdf_embedder();
|
|
19793
|
+
init_segment();
|
|
19794
|
+
init_split();
|
|
19795
|
+
init_template();
|
|
19796
|
+
init_xlsx_to_json();
|
|
19797
|
+
PROCESSOR_SCHEMAS = {
|
|
19798
|
+
[PROCESSOR_IDS.EXTRACT]: {
|
|
19799
|
+
id: PROCESSOR_IDS.EXTRACT,
|
|
19800
|
+
inputSchema: ExtractInputSchema,
|
|
19801
|
+
outputSchema: ExtractOutputSchema,
|
|
19802
|
+
configSchema: ExtractConfigSchema
|
|
19803
|
+
},
|
|
19804
|
+
[PROCESSOR_IDS.DOCUMENT_PARSER]: {
|
|
19805
|
+
id: PROCESSOR_IDS.DOCUMENT_PARSER,
|
|
19806
|
+
inputSchema: DocumentParserInputSchema,
|
|
19807
|
+
outputSchema: DocumentParserOutputSchema,
|
|
19808
|
+
configSchema: DocumentParserConfigSchema
|
|
19809
|
+
},
|
|
19810
|
+
[PROCESSOR_IDS.MERGE]: {
|
|
19811
|
+
id: PROCESSOR_IDS.MERGE,
|
|
19812
|
+
inputSchema: MergeInputSchema,
|
|
19813
|
+
outputSchema: MergeOutputSchema,
|
|
19814
|
+
configSchema: MergeConfigSchema
|
|
19815
|
+
},
|
|
19816
|
+
[PROCESSOR_IDS.TEMPLATE]: {
|
|
19817
|
+
id: PROCESSOR_IDS.TEMPLATE,
|
|
19818
|
+
inputSchema: TemplateInputSchema,
|
|
19819
|
+
outputSchema: TemplateOutputSchema,
|
|
19820
|
+
configSchema: TemplateConfigSchema
|
|
19821
|
+
},
|
|
19822
|
+
[PROCESSOR_IDS.PDF_EMBEDDER]: {
|
|
19823
|
+
id: PROCESSOR_IDS.PDF_EMBEDDER,
|
|
19824
|
+
inputSchema: PdfEmbedderInputSchema,
|
|
19825
|
+
outputSchema: PdfEmbedderOutputSchema,
|
|
19826
|
+
configSchema: PdfEmbedderConfigSchema
|
|
19827
|
+
},
|
|
19828
|
+
[PROCESSOR_IDS.SPLIT]: {
|
|
19829
|
+
id: PROCESSOR_IDS.SPLIT,
|
|
19830
|
+
inputSchema: SplitInputSchema,
|
|
19831
|
+
outputSchema: SplitOutputSchema,
|
|
19832
|
+
configSchema: SplitConfigSchema
|
|
19833
|
+
},
|
|
19834
|
+
[PROCESSOR_IDS.SEGMENT]: {
|
|
19835
|
+
id: PROCESSOR_IDS.SEGMENT,
|
|
19836
|
+
inputSchema: SegmentInputSchema,
|
|
19837
|
+
outputSchema: SegmentOutputSchema,
|
|
19838
|
+
configSchema: SegmentConfigSchema
|
|
19839
|
+
},
|
|
19840
|
+
[PROCESSOR_IDS.CLASSIFY]: {
|
|
19841
|
+
id: PROCESSOR_IDS.CLASSIFY,
|
|
19842
|
+
inputSchema: ClassifyInputSchema,
|
|
19843
|
+
outputSchema: ClassifyOutputSchema,
|
|
19844
|
+
configSchema: ClassifyConfigSchema
|
|
19845
|
+
},
|
|
19846
|
+
[PROCESSOR_IDS.XLSX_TO_JSON]: {
|
|
19847
|
+
id: PROCESSOR_IDS.XLSX_TO_JSON,
|
|
19848
|
+
inputSchema: XlsxToJsonInputSchema,
|
|
19849
|
+
outputSchema: XlsxToJsonOutputSchema,
|
|
19850
|
+
configSchema: XlsxToJsonConfigSchema
|
|
19851
|
+
}
|
|
19852
|
+
};
|
|
19853
|
+
});
|
|
19854
|
+
|
|
17331
19855
|
// ../types/src/processor/index.ts
|
|
17332
|
-
var
|
|
19856
|
+
var init_processor2 = __esm(() => {
|
|
19857
|
+
init_processor();
|
|
19858
|
+
init_execution();
|
|
19859
|
+
init_configs();
|
|
19860
|
+
});
|
|
17333
19861
|
|
|
17334
19862
|
// ../types/src/parser/index.ts
|
|
17335
|
-
var
|
|
19863
|
+
var init_parser2 = __esm(() => {
|
|
19864
|
+
init_parser();
|
|
19865
|
+
});
|
|
17336
19866
|
|
|
17337
19867
|
// ../types/src/otel/semantic-conventions.ts
|
|
17338
19868
|
function mapLLMAttributes(attrs) {
|
|
@@ -20370,9 +22900,9 @@ var require_validate = __commonJS((exports) => {
|
|
|
20370
22900
|
}
|
|
20371
22901
|
let expr = data;
|
|
20372
22902
|
const segments = jsonPointer.split("/");
|
|
20373
|
-
for (const
|
|
20374
|
-
if (
|
|
20375
|
-
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(
|
|
22903
|
+
for (const segment2 of segments) {
|
|
22904
|
+
if (segment2) {
|
|
22905
|
+
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment2))}`;
|
|
20376
22906
|
expr = (0, codegen_1._)`${expr} && ${data}`;
|
|
20377
22907
|
}
|
|
20378
22908
|
}
|
|
@@ -20652,7 +23182,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
20652
23182
|
});
|
|
20653
23183
|
|
|
20654
23184
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
20655
|
-
var
|
|
23185
|
+
var require_utils3 = __commonJS((exports, module) => {
|
|
20656
23186
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
20657
23187
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
20658
23188
|
function stringArrayToHexStripped(input) {
|
|
@@ -20908,7 +23438,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
20908
23438
|
|
|
20909
23439
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
20910
23440
|
var require_schemes = __commonJS((exports, module) => {
|
|
20911
|
-
var { isUUID } =
|
|
23441
|
+
var { isUUID } = require_utils3();
|
|
20912
23442
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
20913
23443
|
var supportedSchemeNames = [
|
|
20914
23444
|
"http",
|
|
@@ -21082,7 +23612,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
21082
23612
|
|
|
21083
23613
|
// ../../node_modules/fast-uri/index.js
|
|
21084
23614
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
21085
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
23615
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
|
|
21086
23616
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
21087
23617
|
function normalize(uri, options) {
|
|
21088
23618
|
if (typeof uri === "string") {
|
|
@@ -23492,7 +26022,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
23492
26022
|
});
|
|
23493
26023
|
|
|
23494
26024
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
23495
|
-
var
|
|
26025
|
+
var require_types2 = __commonJS((exports) => {
|
|
23496
26026
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23497
26027
|
exports.DiscrError = undefined;
|
|
23498
26028
|
var DiscrError;
|
|
@@ -23506,7 +26036,7 @@ var require_types = __commonJS((exports) => {
|
|
|
23506
26036
|
var require_discriminator = __commonJS((exports) => {
|
|
23507
26037
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23508
26038
|
var codegen_1 = require_codegen();
|
|
23509
|
-
var types_1 =
|
|
26039
|
+
var types_1 = require_types2();
|
|
23510
26040
|
var compile_1 = require_compile();
|
|
23511
26041
|
var ref_error_1 = require_ref_error();
|
|
23512
26042
|
var util_1 = require_util();
|
|
@@ -24434,24 +26964,6 @@ var init_validation = __esm(() => {
|
|
|
24434
26964
|
init_workspace_schema();
|
|
24435
26965
|
});
|
|
24436
26966
|
|
|
24437
|
-
// ../types/src/core/common.ts
|
|
24438
|
-
function toJsonSchema2(schema) {
|
|
24439
|
-
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
24440
|
-
}
|
|
24441
|
-
var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
|
|
24442
|
-
var init_common = __esm(() => {
|
|
24443
|
-
init_zod();
|
|
24444
|
-
TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
24445
|
-
return typeof val === "string" ? new Date(val) : val;
|
|
24446
|
-
});
|
|
24447
|
-
JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24448
|
-
BaseEntitySchema2 = exports_external.object({
|
|
24449
|
-
id: exports_external.string(),
|
|
24450
|
-
createdAt: TimestampSchema2.optional(),
|
|
24451
|
-
updatedAt: TimestampSchema2.optional()
|
|
24452
|
-
});
|
|
24453
|
-
});
|
|
24454
|
-
|
|
24455
26967
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
24456
26968
|
var require_lib = __commonJS((exports) => {
|
|
24457
26969
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -24865,12 +27377,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
24865
27377
|
}
|
|
24866
27378
|
const ParseErrorConstructors = {};
|
|
24867
27379
|
for (const reasonCode of Object.keys(argument)) {
|
|
24868
|
-
const
|
|
24869
|
-
const _ref = typeof
|
|
24870
|
-
message: () =>
|
|
24871
|
-
} : typeof
|
|
24872
|
-
message:
|
|
24873
|
-
} :
|
|
27380
|
+
const template2 = argument[reasonCode];
|
|
27381
|
+
const _ref = typeof template2 === "string" ? {
|
|
27382
|
+
message: () => template2
|
|
27383
|
+
} : typeof template2 === "function" ? {
|
|
27384
|
+
message: template2
|
|
27385
|
+
} : template2, {
|
|
24874
27386
|
message
|
|
24875
27387
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24876
27388
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -39343,7 +41855,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
39343
41855
|
});
|
|
39344
41856
|
|
|
39345
41857
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
39346
|
-
var
|
|
41858
|
+
var require_types3 = __commonJS((exports) => {
|
|
39347
41859
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39348
41860
|
var TokenType;
|
|
39349
41861
|
(function(TokenType2) {
|
|
@@ -39407,8 +41919,8 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39407
41919
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
39408
41920
|
const arrow = 22528;
|
|
39409
41921
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
39410
|
-
const
|
|
39411
|
-
TokenType2[TokenType2["template"] =
|
|
41922
|
+
const template2 = 23552;
|
|
41923
|
+
TokenType2[TokenType2["template"] = template2] = "template";
|
|
39412
41924
|
const ellipsis = 24576;
|
|
39413
41925
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
39414
41926
|
const backQuote = 25600;
|
|
@@ -39827,7 +42339,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39827
42339
|
var require_state = __commonJS((exports) => {
|
|
39828
42340
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39829
42341
|
var _keywords = require_keywords();
|
|
39830
|
-
var _types =
|
|
42342
|
+
var _types = require_types3();
|
|
39831
42343
|
|
|
39832
42344
|
class Scope {
|
|
39833
42345
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -40213,7 +42725,7 @@ var require_base = __commonJS((exports) => {
|
|
|
40213
42725
|
var require_util2 = __commonJS((exports) => {
|
|
40214
42726
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40215
42727
|
var _index = require_tokenizer();
|
|
40216
|
-
var _types =
|
|
42728
|
+
var _types = require_types3();
|
|
40217
42729
|
var _charcodes = require_charcodes();
|
|
40218
42730
|
var _base = require_base();
|
|
40219
42731
|
function isContextual(contextualKeyword) {
|
|
@@ -40375,7 +42887,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
40375
42887
|
var require_readWordTree = __commonJS((exports) => {
|
|
40376
42888
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40377
42889
|
var _keywords = require_keywords();
|
|
40378
|
-
var _types =
|
|
42890
|
+
var _types = require_types3();
|
|
40379
42891
|
var READ_WORD_TREE = new Int32Array([
|
|
40380
42892
|
-1,
|
|
40381
42893
|
27,
|
|
@@ -49353,7 +51865,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
49353
51865
|
var _identifier = require_identifier();
|
|
49354
51866
|
var _index = require_tokenizer();
|
|
49355
51867
|
var _readWordTree = require_readWordTree();
|
|
49356
|
-
var _types =
|
|
51868
|
+
var _types = require_types3();
|
|
49357
51869
|
function readWord() {
|
|
49358
51870
|
let treePos = 0;
|
|
49359
51871
|
let code = 0;
|
|
@@ -49419,7 +51931,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
49419
51931
|
var _keywords = require_keywords();
|
|
49420
51932
|
var _readWord = require_readWord();
|
|
49421
51933
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
49422
|
-
var _types =
|
|
51934
|
+
var _types = require_types3();
|
|
49423
51935
|
var IdentifierRole;
|
|
49424
51936
|
(function(IdentifierRole2) {
|
|
49425
51937
|
const Access = 0;
|
|
@@ -50136,7 +52648,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
50136
52648
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
50137
52649
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
50138
52650
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50139
|
-
var _types =
|
|
52651
|
+
var _types = require_types3();
|
|
50140
52652
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
50141
52653
|
let endIndex = index + 1;
|
|
50142
52654
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -50489,7 +53001,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
50489
53001
|
var _xhtml = require_xhtml();
|
|
50490
53002
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
50491
53003
|
var _tokenizer = require_tokenizer();
|
|
50492
|
-
var _types =
|
|
53004
|
+
var _types = require_types3();
|
|
50493
53005
|
var _charcodes = require_charcodes();
|
|
50494
53006
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50495
53007
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -50993,7 +53505,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
50993
53505
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
50994
53506
|
}
|
|
50995
53507
|
var _tokenizer = require_tokenizer();
|
|
50996
|
-
var _types =
|
|
53508
|
+
var _types = require_types3();
|
|
50997
53509
|
var _JSXTransformer = require_JSXTransformer();
|
|
50998
53510
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50999
53511
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -51032,7 +53544,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
51032
53544
|
}
|
|
51033
53545
|
var _tokenizer = require_tokenizer();
|
|
51034
53546
|
var _keywords = require_keywords();
|
|
51035
|
-
var _types =
|
|
53547
|
+
var _types = require_types3();
|
|
51036
53548
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
51037
53549
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
51038
53550
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -51803,18 +54315,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
|
|
|
51803
54315
|
continue;
|
|
51804
54316
|
let genColumn = 0;
|
|
51805
54317
|
for (let j = 0;j < line.length; j++) {
|
|
51806
|
-
const
|
|
54318
|
+
const segment2 = line[j];
|
|
51807
54319
|
if (j > 0)
|
|
51808
54320
|
writer.write(comma);
|
|
51809
|
-
genColumn = encodeInteger(writer,
|
|
51810
|
-
if (
|
|
54321
|
+
genColumn = encodeInteger(writer, segment2[0], genColumn);
|
|
54322
|
+
if (segment2.length === 1)
|
|
51811
54323
|
continue;
|
|
51812
|
-
sourcesIndex = encodeInteger(writer,
|
|
51813
|
-
sourceLine = encodeInteger(writer,
|
|
51814
|
-
sourceColumn = encodeInteger(writer,
|
|
51815
|
-
if (
|
|
54324
|
+
sourcesIndex = encodeInteger(writer, segment2[1], sourcesIndex);
|
|
54325
|
+
sourceLine = encodeInteger(writer, segment2[2], sourceLine);
|
|
54326
|
+
sourceColumn = encodeInteger(writer, segment2[3], sourceColumn);
|
|
54327
|
+
if (segment2.length === 4)
|
|
51816
54328
|
continue;
|
|
51817
|
-
namesIndex = encodeInteger(writer,
|
|
54329
|
+
namesIndex = encodeInteger(writer, segment2[4], namesIndex);
|
|
51818
54330
|
}
|
|
51819
54331
|
}
|
|
51820
54332
|
return writer.flush();
|
|
@@ -52369,11 +54881,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52369
54881
|
const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
52370
54882
|
if (index === -1)
|
|
52371
54883
|
return OMapping(null, null, null, null);
|
|
52372
|
-
const
|
|
52373
|
-
if (
|
|
54884
|
+
const segment2 = segments[index];
|
|
54885
|
+
if (segment2.length === 1)
|
|
52374
54886
|
return OMapping(null, null, null, null);
|
|
52375
54887
|
const { names, resolvedSources } = map2;
|
|
52376
|
-
return OMapping(resolvedSources[
|
|
54888
|
+
return OMapping(resolvedSources[segment2[SOURCES_INDEX]], segment2[SOURCE_LINE] + 1, segment2[SOURCE_COLUMN], segment2.length === 5 ? names[segment2[NAMES_INDEX]] : null);
|
|
52377
54889
|
}
|
|
52378
54890
|
function generatedPositionFor(map2, needle) {
|
|
52379
54891
|
const { source, line, column, bias } = needle;
|
|
@@ -52486,8 +54998,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52486
54998
|
const max = upperBound(segments, matchedColumn, min);
|
|
52487
54999
|
const result = [];
|
|
52488
55000
|
for (;min <= max; min++) {
|
|
52489
|
-
const
|
|
52490
|
-
result.push(GMapping(
|
|
55001
|
+
const segment2 = segments[min];
|
|
55002
|
+
result.push(GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]));
|
|
52491
55003
|
}
|
|
52492
55004
|
return result;
|
|
52493
55005
|
}
|
|
@@ -52515,8 +55027,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52515
55027
|
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
52516
55028
|
if (index === -1)
|
|
52517
55029
|
return GMapping(null, null);
|
|
52518
|
-
const
|
|
52519
|
-
return GMapping(
|
|
55030
|
+
const segment2 = segments[index];
|
|
55031
|
+
return GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]);
|
|
52520
55032
|
}
|
|
52521
55033
|
});
|
|
52522
55034
|
});
|
|
@@ -53067,7 +55579,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
53067
55579
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
53068
55580
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53069
55581
|
var _tokenizer = require_tokenizer();
|
|
53070
|
-
var _types =
|
|
55582
|
+
var _types = require_types3();
|
|
53071
55583
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
53072
55584
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
53073
55585
|
return;
|
|
@@ -53132,7 +55644,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
53132
55644
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
53133
55645
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
53134
55646
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53135
|
-
var _types =
|
|
55647
|
+
var _types = require_types3();
|
|
53136
55648
|
function getIdentifierNames(code, tokens) {
|
|
53137
55649
|
const names = [];
|
|
53138
55650
|
for (const token of tokens) {
|
|
@@ -53308,7 +55820,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
53308
55820
|
});
|
|
53309
55821
|
|
|
53310
55822
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
53311
|
-
var
|
|
55823
|
+
var require_types4 = __commonJS((exports) => {
|
|
53312
55824
|
var __extends = exports && exports.__extends || function() {
|
|
53313
55825
|
var extendStatics = function(d, b) {
|
|
53314
55826
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -53908,9 +56420,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
53908
56420
|
};
|
|
53909
56421
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53910
56422
|
exports.Checker = exports.createCheckers = undefined;
|
|
53911
|
-
var types_1 =
|
|
56423
|
+
var types_1 = require_types4();
|
|
53912
56424
|
var util_1 = require_util3();
|
|
53913
|
-
var types_2 =
|
|
56425
|
+
var types_2 = require_types4();
|
|
53914
56426
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
53915
56427
|
return types_2.TArray;
|
|
53916
56428
|
} });
|
|
@@ -54192,7 +56704,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
54192
56704
|
var _typescript = require_typescript();
|
|
54193
56705
|
var _index = require_tokenizer();
|
|
54194
56706
|
var _keywords = require_keywords();
|
|
54195
|
-
var _types =
|
|
56707
|
+
var _types = require_types3();
|
|
54196
56708
|
var _base = require_base();
|
|
54197
56709
|
var _expression = require_expression();
|
|
54198
56710
|
var _util = require_util2();
|
|
@@ -54324,7 +56836,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
54324
56836
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54325
56837
|
var _index = require_tokenizer();
|
|
54326
56838
|
var _keywords = require_keywords();
|
|
54327
|
-
var _types =
|
|
56839
|
+
var _types = require_types3();
|
|
54328
56840
|
var _base = require_base();
|
|
54329
56841
|
var _expression = require_expression();
|
|
54330
56842
|
var _lval = require_lval();
|
|
@@ -55586,7 +58098,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
55586
58098
|
var require_jsx = __commonJS((exports) => {
|
|
55587
58099
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55588
58100
|
var _index = require_tokenizer();
|
|
55589
|
-
var _types =
|
|
58101
|
+
var _types = require_types3();
|
|
55590
58102
|
var _base = require_base();
|
|
55591
58103
|
var _expression = require_expression();
|
|
55592
58104
|
var _util = require_util2();
|
|
@@ -55849,10 +58361,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
55849
58361
|
});
|
|
55850
58362
|
|
|
55851
58363
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
55852
|
-
var
|
|
58364
|
+
var require_types5 = __commonJS((exports) => {
|
|
55853
58365
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55854
58366
|
var _index = require_tokenizer();
|
|
55855
|
-
var _types =
|
|
58367
|
+
var _types = require_types3();
|
|
55856
58368
|
var _base = require_base();
|
|
55857
58369
|
var _expression = require_expression();
|
|
55858
58370
|
var _flow = require_flow();
|
|
@@ -55885,12 +58397,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
55885
58397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55886
58398
|
var _flow = require_flow();
|
|
55887
58399
|
var _index = require_jsx();
|
|
55888
|
-
var _types =
|
|
58400
|
+
var _types = require_types5();
|
|
55889
58401
|
var _typescript = require_typescript();
|
|
55890
58402
|
var _index3 = require_tokenizer();
|
|
55891
58403
|
var _keywords = require_keywords();
|
|
55892
58404
|
var _state = require_state();
|
|
55893
|
-
var _types3 =
|
|
58405
|
+
var _types3 = require_types3();
|
|
55894
58406
|
var _charcodes = require_charcodes();
|
|
55895
58407
|
var _identifier = require_identifier();
|
|
55896
58408
|
var _base = require_base();
|
|
@@ -56606,7 +59118,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
56606
59118
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56607
59119
|
var _index = require_tokenizer();
|
|
56608
59120
|
var _keywords = require_keywords();
|
|
56609
|
-
var _types =
|
|
59121
|
+
var _types = require_types3();
|
|
56610
59122
|
var _base = require_base();
|
|
56611
59123
|
var _expression = require_expression();
|
|
56612
59124
|
var _statement = require_statement();
|
|
@@ -57481,7 +59993,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
57481
59993
|
var _tokenizer = require_tokenizer();
|
|
57482
59994
|
var _keywords = require_keywords();
|
|
57483
59995
|
var _state = require_state();
|
|
57484
|
-
var _types =
|
|
59996
|
+
var _types = require_types3();
|
|
57485
59997
|
var _charcodes = require_charcodes();
|
|
57486
59998
|
var _base = require_base();
|
|
57487
59999
|
var _expression = require_expression();
|
|
@@ -58516,7 +61028,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58516
61028
|
function _interopRequireDefault(obj) {
|
|
58517
61029
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
58518
61030
|
}
|
|
58519
|
-
var _types =
|
|
61031
|
+
var _types = require_types3();
|
|
58520
61032
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
58521
61033
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
58522
61034
|
|
|
@@ -58774,7 +61286,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58774
61286
|
var require_getClassInfo = __commonJS((exports) => {
|
|
58775
61287
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58776
61288
|
var _keywords = require_keywords();
|
|
58777
|
-
var _types =
|
|
61289
|
+
var _types = require_types3();
|
|
58778
61290
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
58779
61291
|
const snapshot = tokens.snapshot();
|
|
58780
61292
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -59012,7 +61524,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
59012
61524
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
59013
61525
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
59014
61526
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59015
|
-
var _types =
|
|
61527
|
+
var _types = require_types3();
|
|
59016
61528
|
function elideImportEquals(tokens) {
|
|
59017
61529
|
tokens.removeInitialToken();
|
|
59018
61530
|
tokens.removeToken();
|
|
@@ -59036,7 +61548,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
59036
61548
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
59037
61549
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59038
61550
|
var _tokenizer = require_tokenizer();
|
|
59039
|
-
var _types =
|
|
61551
|
+
var _types = require_types3();
|
|
59040
61552
|
var EMPTY_DECLARATION_INFO = {
|
|
59041
61553
|
typeDeclarations: new Set,
|
|
59042
61554
|
valueDeclarations: new Set
|
|
@@ -59064,7 +61576,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
59064
61576
|
var require_isExportFrom = __commonJS((exports) => {
|
|
59065
61577
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59066
61578
|
var _keywords = require_keywords();
|
|
59067
|
-
var _types =
|
|
61579
|
+
var _types = require_types3();
|
|
59068
61580
|
function isExportFrom(tokens) {
|
|
59069
61581
|
let closeBraceIndex = tokens.currentIndex();
|
|
59070
61582
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -59079,7 +61591,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
59079
61591
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
59080
61592
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59081
61593
|
var _keywords = require_keywords();
|
|
59082
|
-
var _types =
|
|
61594
|
+
var _types = require_types3();
|
|
59083
61595
|
function removeMaybeImportAttributes(tokens) {
|
|
59084
61596
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
59085
61597
|
tokens.removeToken();
|
|
@@ -59094,7 +61606,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
59094
61606
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
59095
61607
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
59096
61608
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59097
|
-
var _types =
|
|
61609
|
+
var _types = require_types3();
|
|
59098
61610
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
59099
61611
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
59100
61612
|
return false;
|
|
@@ -59125,7 +61637,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
59125
61637
|
}
|
|
59126
61638
|
var _tokenizer = require_tokenizer();
|
|
59127
61639
|
var _keywords = require_keywords();
|
|
59128
|
-
var _types =
|
|
61640
|
+
var _types = require_types3();
|
|
59129
61641
|
var _elideImportEquals = require_elideImportEquals();
|
|
59130
61642
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59131
61643
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -59767,7 +62279,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
59767
62279
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59768
62280
|
}
|
|
59769
62281
|
var _keywords = require_keywords();
|
|
59770
|
-
var _types =
|
|
62282
|
+
var _types = require_types3();
|
|
59771
62283
|
var _elideImportEquals = require_elideImportEquals();
|
|
59772
62284
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59773
62285
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -60037,7 +62549,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
60037
62549
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60038
62550
|
}
|
|
60039
62551
|
var _keywords = require_keywords();
|
|
60040
|
-
var _types =
|
|
62552
|
+
var _types = require_types3();
|
|
60041
62553
|
var _Transformer = require_Transformer();
|
|
60042
62554
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60043
62555
|
|
|
@@ -60157,7 +62669,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
60157
62669
|
}
|
|
60158
62670
|
return value;
|
|
60159
62671
|
}
|
|
60160
|
-
var _types =
|
|
62672
|
+
var _types = require_types3();
|
|
60161
62673
|
var _Transformer = require_Transformer();
|
|
60162
62674
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60163
62675
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -60231,7 +62743,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
60231
62743
|
function _interopRequireDefault(obj) {
|
|
60232
62744
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60233
62745
|
}
|
|
60234
|
-
var _types =
|
|
62746
|
+
var _types = require_types3();
|
|
60235
62747
|
var _Transformer = require_Transformer();
|
|
60236
62748
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60237
62749
|
|
|
@@ -60260,7 +62772,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
60260
62772
|
function _interopRequireDefault(obj) {
|
|
60261
62773
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60262
62774
|
}
|
|
60263
|
-
var _types =
|
|
62775
|
+
var _types = require_types3();
|
|
60264
62776
|
var _Transformer = require_Transformer();
|
|
60265
62777
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60266
62778
|
|
|
@@ -60288,7 +62800,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
60288
62800
|
function _interopRequireDefault(obj) {
|
|
60289
62801
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60290
62802
|
}
|
|
60291
|
-
var _types =
|
|
62803
|
+
var _types = require_types3();
|
|
60292
62804
|
var _Transformer = require_Transformer();
|
|
60293
62805
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60294
62806
|
|
|
@@ -60404,7 +62916,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
60404
62916
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60405
62917
|
}
|
|
60406
62918
|
var _tokenizer = require_tokenizer();
|
|
60407
|
-
var _types =
|
|
62919
|
+
var _types = require_types3();
|
|
60408
62920
|
var _Transformer = require_Transformer();
|
|
60409
62921
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60410
62922
|
|
|
@@ -60655,7 +63167,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
60655
63167
|
function _interopRequireDefault(obj) {
|
|
60656
63168
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60657
63169
|
}
|
|
60658
|
-
var _types =
|
|
63170
|
+
var _types = require_types3();
|
|
60659
63171
|
var _isIdentifier = require_isIdentifier();
|
|
60660
63172
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
60661
63173
|
var _Transformer = require_Transformer();
|
|
@@ -60801,7 +63313,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
60801
63313
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60802
63314
|
}
|
|
60803
63315
|
var _keywords = require_keywords();
|
|
60804
|
-
var _types =
|
|
63316
|
+
var _types = require_types3();
|
|
60805
63317
|
var _getClassInfo = require_getClassInfo();
|
|
60806
63318
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
60807
63319
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -61200,7 +63712,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
61200
63712
|
}
|
|
61201
63713
|
var _linesandcolumns = require_build();
|
|
61202
63714
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
61203
|
-
var _types =
|
|
63715
|
+
var _types = require_types3();
|
|
61204
63716
|
function formatTokens(code, tokens) {
|
|
61205
63717
|
if (tokens.length === 0) {
|
|
61206
63718
|
return "";
|
|
@@ -61265,7 +63777,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
61265
63777
|
function _interopRequireDefault(obj) {
|
|
61266
63778
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61267
63779
|
}
|
|
61268
|
-
var _types =
|
|
63780
|
+
var _types = require_types3();
|
|
61269
63781
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
61270
63782
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
61271
63783
|
function getTSImportedNames(tokens) {
|
|
@@ -61650,7 +64162,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
61650
64162
|
function compileTypedScript(opts) {
|
|
61651
64163
|
let ast;
|
|
61652
64164
|
try {
|
|
61653
|
-
ast =
|
|
64165
|
+
ast = import_parser4.parse(opts.source, {
|
|
61654
64166
|
sourceType: "script",
|
|
61655
64167
|
plugins: ["typescript"],
|
|
61656
64168
|
ranges: true
|
|
@@ -61902,9 +64414,9 @@ function stripCommentsAndStrings(s) {
|
|
|
61902
64414
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
61903
64415
|
return out;
|
|
61904
64416
|
}
|
|
61905
|
-
var
|
|
64417
|
+
var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
61906
64418
|
var init_compile = __esm(() => {
|
|
61907
|
-
|
|
64419
|
+
import_parser4 = __toESM(require_lib(), 1);
|
|
61908
64420
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
61909
64421
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
61910
64422
|
});
|
|
@@ -61947,10 +64459,16 @@ function parseStepType(type) {
|
|
|
61947
64459
|
function isStepCategory(type, category) {
|
|
61948
64460
|
return type.startsWith(`${category}.`);
|
|
61949
64461
|
}
|
|
61950
|
-
var AI_STEP_TYPES, TRANSFORM_STEP_TYPES, ACTION_STEP_TYPES, CONTROL_STEP_TYPES, STEP_TYPES, StepTypeValue, StepTypeSchema, BaseStepSchema, AIStepSchema, TransformStepSchema, HttpMethodSchema, ActionStepSchema, WaitStepSchema, FailStepSchema, BlockStepSchemaInner, IfStepSchemaInner, ParallelBranchSchemaInner, ParallelStepSchemaInner, ForeachStepSchemaInner, ParallelMapStepSchemaInner, StepSchema, BlockStepSchema, IfStepSchema, ParallelBranchSchema, ParallelStepSchema, ForeachStepSchema, ParallelMapStepSchema;
|
|
64462
|
+
var AI_STEP_TYPES, TRANSFORM_STEP_TYPES, ACTION_STEP_TYPES, CONTROL_STEP_TYPES, STEP_TYPES, StepTypeValue, StepTypeSchema, BaseStepSchema, AIStepSchema, TransformStepSchema, HttpMethodSchema, ActionStepSchema, WaitStepSchema, FailStepSchema, BlockStepSchemaInner, IfStepSchemaInner, SwitchCaseSchemaInner, SwitchStepSchemaInner, ParallelBranchSchemaInner, ParallelStepSchemaInner, ForeachStepSchemaInner, ParallelMapStepSchemaInner, StepSchema, BlockStepSchema, IfStepSchema, SwitchStepSchema, ParallelBranchSchema, ParallelStepSchema, ForeachStepSchema, ParallelMapStepSchema;
|
|
61951
64463
|
var init_steps = __esm(() => {
|
|
61952
64464
|
init_zod();
|
|
61953
|
-
AI_STEP_TYPES = [
|
|
64465
|
+
AI_STEP_TYPES = [
|
|
64466
|
+
"ai.parse",
|
|
64467
|
+
"ai.extract",
|
|
64468
|
+
"ai.split",
|
|
64469
|
+
"ai.segment",
|
|
64470
|
+
"ai.classify"
|
|
64471
|
+
];
|
|
61954
64472
|
TRANSFORM_STEP_TYPES = [
|
|
61955
64473
|
"transform.set",
|
|
61956
64474
|
"transform.remove",
|
|
@@ -61971,6 +64489,7 @@ var init_steps = __esm(() => {
|
|
|
61971
64489
|
];
|
|
61972
64490
|
CONTROL_STEP_TYPES = [
|
|
61973
64491
|
"control.if",
|
|
64492
|
+
"control.switch",
|
|
61974
64493
|
"control.foreach",
|
|
61975
64494
|
"control.parallel",
|
|
61976
64495
|
"control.parallel_map",
|
|
@@ -61988,6 +64507,7 @@ var init_steps = __esm(() => {
|
|
|
61988
64507
|
AI_PARSE: "ai.parse",
|
|
61989
64508
|
AI_EXTRACT: "ai.extract",
|
|
61990
64509
|
AI_SPLIT: "ai.split",
|
|
64510
|
+
AI_SEGMENT: "ai.segment",
|
|
61991
64511
|
AI_CLASSIFY: "ai.classify",
|
|
61992
64512
|
TRANSFORM_SET: "transform.set",
|
|
61993
64513
|
TRANSFORM_REMOVE: "transform.remove",
|
|
@@ -62004,6 +64524,7 @@ var init_steps = __esm(() => {
|
|
|
62004
64524
|
ACTION_INVOKE_WORKFLOW: "action.invoke-workflow",
|
|
62005
64525
|
ACTION_WEBSITE_READER: "action.website-reader",
|
|
62006
64526
|
CONTROL_IF: "control.if",
|
|
64527
|
+
CONTROL_SWITCH: "control.switch",
|
|
62007
64528
|
CONTROL_FOREACH: "control.foreach",
|
|
62008
64529
|
CONTROL_PARALLEL: "control.parallel",
|
|
62009
64530
|
CONTROL_PARALLEL_MAP: "control.parallel_map",
|
|
@@ -62053,6 +64574,16 @@ var init_steps = __esm(() => {
|
|
|
62053
64574
|
then: exports_external.lazy(() => exports_external.array(StepSchema)),
|
|
62054
64575
|
else: exports_external.lazy(() => exports_external.array(StepSchema)).optional()
|
|
62055
64576
|
});
|
|
64577
|
+
SwitchCaseSchemaInner = exports_external.object({
|
|
64578
|
+
when: exports_external.union([exports_external.string(), exports_external.number(), exports_external.boolean()]),
|
|
64579
|
+
steps: exports_external.lazy(() => exports_external.array(StepSchema))
|
|
64580
|
+
});
|
|
64581
|
+
SwitchStepSchemaInner = BaseStepSchema.extend({
|
|
64582
|
+
type: exports_external.literal("control.switch"),
|
|
64583
|
+
on: exports_external.string(),
|
|
64584
|
+
cases: exports_external.array(SwitchCaseSchemaInner),
|
|
64585
|
+
default: exports_external.lazy(() => exports_external.array(StepSchema)).optional()
|
|
64586
|
+
});
|
|
62056
64587
|
ParallelBranchSchemaInner = exports_external.object({
|
|
62057
64588
|
name: exports_external.string().min(1),
|
|
62058
64589
|
steps: exports_external.lazy(() => exports_external.array(StepSchema))
|
|
@@ -62084,12 +64615,14 @@ var init_steps = __esm(() => {
|
|
|
62084
64615
|
FailStepSchema,
|
|
62085
64616
|
BlockStepSchemaInner,
|
|
62086
64617
|
IfStepSchemaInner,
|
|
64618
|
+
SwitchStepSchemaInner,
|
|
62087
64619
|
ParallelStepSchemaInner,
|
|
62088
64620
|
ForeachStepSchemaInner,
|
|
62089
64621
|
ParallelMapStepSchemaInner
|
|
62090
64622
|
]));
|
|
62091
64623
|
BlockStepSchema = BlockStepSchemaInner;
|
|
62092
64624
|
IfStepSchema = IfStepSchemaInner;
|
|
64625
|
+
SwitchStepSchema = SwitchStepSchemaInner;
|
|
62093
64626
|
ParallelBranchSchema = ParallelBranchSchemaInner;
|
|
62094
64627
|
ParallelStepSchema = ParallelStepSchemaInner;
|
|
62095
64628
|
ForeachStepSchema = ForeachStepSchemaInner;
|
|
@@ -62118,8 +64651,8 @@ function getAllStepJsonSchemas() {
|
|
|
62118
64651
|
category: def.category,
|
|
62119
64652
|
name: def.name,
|
|
62120
64653
|
description: def.description,
|
|
62121
|
-
configSchema:
|
|
62122
|
-
outputSchema:
|
|
64654
|
+
configSchema: toJsonSchema(def.configSchema),
|
|
64655
|
+
outputSchema: toJsonSchema(def.outputSchema),
|
|
62123
64656
|
configInWith: def.configInWith
|
|
62124
64657
|
}));
|
|
62125
64658
|
}
|
|
@@ -62169,7 +64702,7 @@ function isOutputSchemaUnknown(stepType) {
|
|
|
62169
64702
|
const def = schema._def;
|
|
62170
64703
|
return def?.typeName === "ZodUnknown";
|
|
62171
64704
|
}
|
|
62172
|
-
var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, AiSplitConfigSchema, AiSplitOutputSchema, 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, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlBlockConfigSchema, ControlBlockOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, STEP_SCHEMAS;
|
|
64705
|
+
var AiParseConfigSchema, AiParseOutputSchema, AiExtractConfigSchema, AiExtractOutputSchema, AiSplitConfigSchema, AiSplitOutputSchema, AiSegmentConfigSchema, AiSegmentOutputSchema, AiClassifyConfigSchema, AiClassifyOutputSchema, TransformSetConfigSchema, TransformSetOutputSchema, TransformRemoveConfigSchema, TransformRemoveOutputSchema, TransformCombineConfigSchema, TransformCombineOutputSchema, TransformSplitConfigSchema, TransformSplitOutputSchema, TransformMergeConfigSchema, TransformMergeOutputSchema, TransformTemplateConfigSchema, TransformTemplateOutputSchema, TransformPdfEmbedConfigSchema, TransformPdfEmbedOutputSchema, TransformXlsxToJsonConfigSchema, TransformXlsxToJsonOutputSchema, TransformScriptConfigSchema, TransformScriptOutputSchema, ParsedDocPageSchema, TransformTextChunkerConfigSchema, TransformTextChunkerOutputSchema, RegexNormalizerSchema, RegexFormatSchema, REGEX_FLAGS, RegexFieldSchema, TransformRegexExtractConfigSchema, TransformRegexExtractOutputSchema, ActionHttpConfigSchema, ActionHttpOutputSchema, ActionInvokeWorkflowConfigSchema, ActionInvokeWorkflowOutputSchema, ActionWebsiteReaderConfigSchema, ActionWebsiteReaderOutputSchema, ControlIfConfigSchema, ControlIfOutputSchema, ControlSwitchConfigSchema, ControlSwitchOutputSchema, ControlForeachConfigSchema, ControlForeachOutputSchema, ControlParallelMapConfigSchema, ControlParallelMapOutputSchema, ControlParallelConfigSchema, ControlParallelOutputSchema, ControlWaitConfigSchema, ControlWaitOutputSchema, ControlBlockConfigSchema, ControlBlockOutputSchema, ControlFailConfigSchema, ControlFailOutputSchema, STEP_SCHEMAS;
|
|
62173
64706
|
var init_step_configs = __esm(() => {
|
|
62174
64707
|
init_zod();
|
|
62175
64708
|
init_common();
|
|
@@ -62208,7 +64741,14 @@ var init_step_configs = __esm(() => {
|
|
|
62208
64741
|
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
62209
64742
|
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o")'),
|
|
62210
64743
|
model: exports_external.string().optional().describe("Model override"),
|
|
62211
|
-
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit.")
|
|
64744
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
|
|
64745
|
+
grounded: exports_external.boolean().optional().describe("Optional. When true, adds a grounding pass: each schema field gets a source span + confidence (high=verbatim, medium=fuzzy, low=ungrounded) under a `_grounding` key, and ungrounded/fuzzy fields are flagged for human review. Grounding always calls OpenAI directly (independent of the extract provider) and requires OPENAI_API_KEY. Values stay the reliable schema-typed ones."),
|
|
64746
|
+
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."),
|
|
64747
|
+
groundingExamples: exports_external.array(exports_external.object({
|
|
64748
|
+
text: exports_external.string(),
|
|
64749
|
+
extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
|
|
64750
|
+
})).optional().describe("Optional few-shot examples pinning grounding to verbatim source text per field."),
|
|
64751
|
+
reviewOn: exports_external.enum(["medium_or_low", "low_only"]).optional().describe("Which grounding confidences flag a field for review. Default: medium_or_low.")
|
|
62212
64752
|
});
|
|
62213
64753
|
AiExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
|
|
62214
64754
|
AiSplitConfigSchema = exports_external.object({
|
|
@@ -62249,6 +64789,52 @@ var init_step_configs = __esm(() => {
|
|
|
62249
64789
|
pages_inferred: exports_external.array(exports_external.number().int()).describe("Pages assigned by deterministic continuity fill")
|
|
62250
64790
|
})).describe("Sections found in the document, in page order. Absent sections are omitted.")
|
|
62251
64791
|
});
|
|
64792
|
+
AiSegmentConfigSchema = exports_external.object({
|
|
64793
|
+
input: exports_external.string().describe('Template expression resolving to ai.parse output, e.g. "{{ steps.parse.output }}"'),
|
|
64794
|
+
documentTypes: exports_external.array(exports_external.object({
|
|
64795
|
+
name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo")'),
|
|
64796
|
+
description: exports_external.string().optional().describe("What this document type looks like — headings, layout, vocabulary, and the cues that mark its FIRST page. Fed to the LLM for both boundary detection and typing.")
|
|
64797
|
+
})).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.'),
|
|
64798
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt."),
|
|
64799
|
+
provider: exports_external.string().optional().describe("Provider ID from eigenpal.config.yaml. Falls back to the tenant default LLM provider when omitted."),
|
|
64800
|
+
windowTokenBudget: exports_external.number().int().positive().optional().describe("Override the per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000.")
|
|
64801
|
+
});
|
|
64802
|
+
AiSegmentOutputSchema = exports_external.object({
|
|
64803
|
+
summary: exports_external.object({
|
|
64804
|
+
total: exports_external.number().int().describe("Total documents discovered."),
|
|
64805
|
+
labelled: exports_external.number().int().describe("Documents assigned a known taxonomy type."),
|
|
64806
|
+
unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type "unknown") — escalate to a human.'),
|
|
64807
|
+
lowConfidence: exports_external.number().int().describe("Documents with low boundary/type confidence."),
|
|
64808
|
+
byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe("Per-type document counts."),
|
|
64809
|
+
needsReview: exports_external.array(exports_external.object({
|
|
64810
|
+
index: exports_external.number().int(),
|
|
64811
|
+
type: exports_external.string(),
|
|
64812
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
64813
|
+
reason: exports_external.enum(["unlabelled", "low_confidence"]),
|
|
64814
|
+
notes: exports_external.string()
|
|
64815
|
+
})).describe("Documents to escalate to a human operator, with the reason for each.")
|
|
64816
|
+
}).describe("Batch-level escalation summary: labelled vs unlabelled counts + docs needing review."),
|
|
64817
|
+
documents: exports_external.array(exports_external.object({
|
|
64818
|
+
index: exports_external.number().int().describe("0-based position of this document in the batch"),
|
|
64819
|
+
type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown"'),
|
|
64820
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("[startIndex, endIndex] inclusive, 0-based page indices"),
|
|
64821
|
+
confidence: exports_external.enum(["low", "medium", "high"]).describe("LLM confidence at the boundary + type. Coarse enum (low | medium | high)."),
|
|
64822
|
+
notes: exports_external.string().describe("LLM justification for the boundary — useful for debugging"),
|
|
64823
|
+
evidence: exports_external.object({
|
|
64824
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
|
|
64825
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
|
|
64826
|
+
}).optional().describe("Structured start evidence — parse this instead of regexing over `notes`."),
|
|
64827
|
+
text: exports_external.string().describe("Joined per-page content for this document, ready for downstream ai.extract"),
|
|
64828
|
+
pages: exports_external.array(exports_external.object({
|
|
64829
|
+
pageIndex: exports_external.number().int(),
|
|
64830
|
+
text: exports_external.string(),
|
|
64831
|
+
pageName: exports_external.string().optional(),
|
|
64832
|
+
source: exports_external.enum(["anchored", "inferred"])
|
|
64833
|
+
})).describe("Raw per-page records covered by this document, in page order."),
|
|
64834
|
+
pages_anchored: exports_external.array(exports_external.number().int()).describe("Pages with direct LLM boundary evidence"),
|
|
64835
|
+
pages_inferred: exports_external.array(exports_external.number().int()).describe("Pages assigned by deterministic continuity fill")
|
|
64836
|
+
})).describe("Documents discovered in the batch, in page order. The full batch is covered.")
|
|
64837
|
+
});
|
|
62252
64838
|
AiClassifyConfigSchema = exports_external.object({
|
|
62253
64839
|
input: exports_external.string().describe('Template expression for the text to classify. Typically the output of ai.parse, e.g. "{{ steps.parse.output.text }}".'),
|
|
62254
64840
|
labels: exports_external.array(exports_external.object({
|
|
@@ -62483,6 +65069,17 @@ var init_step_configs = __esm(() => {
|
|
|
62483
65069
|
branch: exports_external.enum(["then", "else"]).describe("Which branch was executed"),
|
|
62484
65070
|
result: exports_external.unknown().describe("Output from executed branch")
|
|
62485
65071
|
});
|
|
65072
|
+
ControlSwitchConfigSchema = exports_external.object({
|
|
65073
|
+
on: exports_external.string().min(1, "Switch `on` expression is required").describe('Template expression whose resolved value selects the case, e.g. "{{ doc.type }}".'),
|
|
65074
|
+
cases: exports_external.array(exports_external.object({
|
|
65075
|
+
when: exports_external.union([exports_external.string(), exports_external.number(), exports_external.boolean()]).describe("Value matched (string-compared) against the resolved `on` value.")
|
|
65076
|
+
})).min(1).describe("Ordered cases; the first whose `when` matches runs. Each case has its own `steps`.")
|
|
65077
|
+
});
|
|
65078
|
+
ControlSwitchOutputSchema = exports_external.object({
|
|
65079
|
+
matched: exports_external.union([exports_external.string(), exports_external.number(), exports_external.boolean()]).nullable().describe("The `when` value that matched, or null when the default (or no) branch ran."),
|
|
65080
|
+
branch: exports_external.enum(["case", "default", "none"]).describe("Which branch executed."),
|
|
65081
|
+
result: exports_external.unknown().describe("Output from the executed branch (its last step).")
|
|
65082
|
+
});
|
|
62486
65083
|
ControlForeachConfigSchema = exports_external.object({
|
|
62487
65084
|
items: exports_external.string().min(1, "Items expression is required").describe("Expression resolving to array"),
|
|
62488
65085
|
as: exports_external.string().min(1, "Variable name is required").describe("Variable name for current item"),
|
|
@@ -62551,6 +65148,15 @@ var init_step_configs = __esm(() => {
|
|
|
62551
65148
|
outputSchema: AiSplitOutputSchema,
|
|
62552
65149
|
configInWith: true
|
|
62553
65150
|
},
|
|
65151
|
+
"ai.segment": {
|
|
65152
|
+
type: "ai.segment",
|
|
65153
|
+
category: "ai",
|
|
65154
|
+
name: "Separate Documents",
|
|
65155
|
+
description: "Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.",
|
|
65156
|
+
configSchema: AiSegmentConfigSchema,
|
|
65157
|
+
outputSchema: AiSegmentOutputSchema,
|
|
65158
|
+
configInWith: true
|
|
65159
|
+
},
|
|
62554
65160
|
"ai.classify": {
|
|
62555
65161
|
type: "ai.classify",
|
|
62556
65162
|
category: "ai",
|
|
@@ -62695,6 +65301,15 @@ var init_step_configs = __esm(() => {
|
|
|
62695
65301
|
outputSchema: ControlIfOutputSchema,
|
|
62696
65302
|
configInWith: false
|
|
62697
65303
|
},
|
|
65304
|
+
"control.switch": {
|
|
65305
|
+
type: "control.switch",
|
|
65306
|
+
category: "control",
|
|
65307
|
+
name: "Switch",
|
|
65308
|
+
description: "Multi-way routing: resolve an expression and run the first case whose value matches (else default). Cleaner than a nested control.if chain for routing an item to one of N pipelines by a discriminator field like a document type.",
|
|
65309
|
+
configSchema: ControlSwitchConfigSchema,
|
|
65310
|
+
outputSchema: ControlSwitchOutputSchema,
|
|
65311
|
+
configInWith: false
|
|
65312
|
+
},
|
|
62698
65313
|
"control.foreach": {
|
|
62699
65314
|
type: "control.foreach",
|
|
62700
65315
|
category: "control",
|
|
@@ -62765,81 +65380,6 @@ var init_actions = __esm(() => {
|
|
|
62765
65380
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
62766
65381
|
});
|
|
62767
65382
|
|
|
62768
|
-
// ../types/src/processor/execution.ts
|
|
62769
|
-
function asTuple(values) {
|
|
62770
|
-
return values;
|
|
62771
|
-
}
|
|
62772
|
-
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
62773
|
-
var init_execution = __esm(() => {
|
|
62774
|
-
init_zod();
|
|
62775
|
-
WorkflowExecutionStatusValue2 = {
|
|
62776
|
-
CREATED: "created",
|
|
62777
|
-
PENDING: "pending",
|
|
62778
|
-
RUNNING: "running",
|
|
62779
|
-
WAITING: "waiting",
|
|
62780
|
-
COMPLETED: "completed",
|
|
62781
|
-
FAILED: "failed",
|
|
62782
|
-
CANCELLED: "cancelled"
|
|
62783
|
-
};
|
|
62784
|
-
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
62785
|
-
WorkflowExecutionStatusValue2.CREATED,
|
|
62786
|
-
WorkflowExecutionStatusValue2.PENDING,
|
|
62787
|
-
WorkflowExecutionStatusValue2.RUNNING,
|
|
62788
|
-
WorkflowExecutionStatusValue2.WAITING,
|
|
62789
|
-
WorkflowExecutionStatusValue2.COMPLETED,
|
|
62790
|
-
WorkflowExecutionStatusValue2.FAILED,
|
|
62791
|
-
WorkflowExecutionStatusValue2.CANCELLED
|
|
62792
|
-
]);
|
|
62793
|
-
StepExecutionStatusValue2 = {
|
|
62794
|
-
PENDING: "pending",
|
|
62795
|
-
RUNNING: "running",
|
|
62796
|
-
SUCCESS: "success",
|
|
62797
|
-
FAILURE: "failure",
|
|
62798
|
-
WAITING: "waiting",
|
|
62799
|
-
SKIPPED: "skipped"
|
|
62800
|
-
};
|
|
62801
|
-
StepExecutionStatusSchema2 = exports_external.enum([
|
|
62802
|
-
StepExecutionStatusValue2.PENDING,
|
|
62803
|
-
StepExecutionStatusValue2.RUNNING,
|
|
62804
|
-
StepExecutionStatusValue2.SUCCESS,
|
|
62805
|
-
StepExecutionStatusValue2.FAILURE,
|
|
62806
|
-
StepExecutionStatusValue2.WAITING,
|
|
62807
|
-
StepExecutionStatusValue2.SKIPPED
|
|
62808
|
-
]);
|
|
62809
|
-
TriggerTypeValue2 = {
|
|
62810
|
-
MANUAL: "manual",
|
|
62811
|
-
API: "api",
|
|
62812
|
-
WEBHOOK: "webhook",
|
|
62813
|
-
SCHEDULE: "schedule",
|
|
62814
|
-
EMAIL: "email",
|
|
62815
|
-
EVAL: "eval",
|
|
62816
|
-
CLI: "cli"
|
|
62817
|
-
};
|
|
62818
|
-
TriggerTypeSchema2 = exports_external.enum([
|
|
62819
|
-
TriggerTypeValue2.MANUAL,
|
|
62820
|
-
TriggerTypeValue2.API,
|
|
62821
|
-
TriggerTypeValue2.WEBHOOK,
|
|
62822
|
-
TriggerTypeValue2.SCHEDULE,
|
|
62823
|
-
TriggerTypeValue2.EMAIL,
|
|
62824
|
-
TriggerTypeValue2.EVAL,
|
|
62825
|
-
TriggerTypeValue2.CLI
|
|
62826
|
-
]);
|
|
62827
|
-
ExecutionTypeValue2 = {
|
|
62828
|
-
PROD: "prod",
|
|
62829
|
-
EVAL: "eval",
|
|
62830
|
-
PLAYGROUND: "playground"
|
|
62831
|
-
};
|
|
62832
|
-
ExecutionTypeSchema2 = exports_external.enum([
|
|
62833
|
-
ExecutionTypeValue2.PROD,
|
|
62834
|
-
ExecutionTypeValue2.EVAL,
|
|
62835
|
-
ExecutionTypeValue2.PLAYGROUND
|
|
62836
|
-
]);
|
|
62837
|
-
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
62838
|
-
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
62839
|
-
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
62840
|
-
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
62841
|
-
});
|
|
62842
|
-
|
|
62843
65383
|
// ../types/src/workflow/workflow.ts
|
|
62844
65384
|
function suggestWorkflowName(raw) {
|
|
62845
65385
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -62920,11 +65460,11 @@ var init_workflow = __esm(() => {
|
|
|
62920
65460
|
ManualTriggerMethodSchema = exports_external.object({
|
|
62921
65461
|
type: exports_external.literal("manual"),
|
|
62922
65462
|
enabled: exports_external.boolean().optional(),
|
|
62923
|
-
inputSchema:
|
|
65463
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
62924
65464
|
});
|
|
62925
65465
|
ApiTriggerMethodSchema = exports_external.object({
|
|
62926
65466
|
type: exports_external.literal("api"),
|
|
62927
|
-
inputSchema:
|
|
65467
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
62928
65468
|
});
|
|
62929
65469
|
EmailTriggerMethodSchema = exports_external.object({
|
|
62930
65470
|
type: exports_external.literal("email"),
|
|
@@ -62963,8 +65503,8 @@ var init_workflow = __esm(() => {
|
|
|
62963
65503
|
yamlContent: exports_external.string(),
|
|
62964
65504
|
definition: WorkflowDefinitionSchema,
|
|
62965
65505
|
isCurrent: exports_external.boolean().default(true),
|
|
62966
|
-
createdAt:
|
|
62967
|
-
updatedAt:
|
|
65506
|
+
createdAt: TimestampSchema,
|
|
65507
|
+
updatedAt: TimestampSchema.optional(),
|
|
62968
65508
|
createdBy: exports_external.string()
|
|
62969
65509
|
});
|
|
62970
65510
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -63146,14 +65686,14 @@ function isFileOutput(value) {
|
|
|
63146
65686
|
function isWorkflowResult(value) {
|
|
63147
65687
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
63148
65688
|
}
|
|
63149
|
-
var
|
|
65689
|
+
var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
63150
65690
|
var init_execution2 = __esm(() => {
|
|
63151
65691
|
init_zod();
|
|
63152
65692
|
init_common();
|
|
63153
65693
|
init_execution();
|
|
63154
65694
|
init_workflow();
|
|
63155
|
-
|
|
63156
|
-
|
|
65695
|
+
WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
|
|
65696
|
+
StepExecutionStatusSchema2 = StepExecutionStatusSchema;
|
|
63157
65697
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
63158
65698
|
"root",
|
|
63159
65699
|
"if-then",
|
|
@@ -63175,7 +65715,7 @@ var init_execution2 = __esm(() => {
|
|
|
63175
65715
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
63176
65716
|
StepResultSchema = exports_external.object({
|
|
63177
65717
|
output: exports_external.unknown(),
|
|
63178
|
-
status:
|
|
65718
|
+
status: StepExecutionStatusSchema2
|
|
63179
65719
|
});
|
|
63180
65720
|
ExecutionContextSchema = exports_external.object({
|
|
63181
65721
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -63203,7 +65743,7 @@ var init_execution2 = __esm(() => {
|
|
|
63203
65743
|
triggerType: exports_external.string(),
|
|
63204
65744
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
63205
65745
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
63206
|
-
status:
|
|
65746
|
+
status: WorkflowExecutionStatusSchema2,
|
|
63207
65747
|
scopeStack: ScopeStackSchema,
|
|
63208
65748
|
currentStepIndex: exports_external.number(),
|
|
63209
65749
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
@@ -63211,15 +65751,15 @@ var init_execution2 = __esm(() => {
|
|
|
63211
65751
|
error: exports_external.string().nullable(),
|
|
63212
65752
|
priority: exports_external.number().default(50),
|
|
63213
65753
|
leaseId: exports_external.string().nullable(),
|
|
63214
|
-
leaseExpiresAt:
|
|
65754
|
+
leaseExpiresAt: TimestampSchema.nullable(),
|
|
63215
65755
|
workerId: exports_external.string().nullable(),
|
|
63216
65756
|
maxRetries: exports_external.number().default(0),
|
|
63217
65757
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
63218
65758
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
63219
65759
|
retryNumber: exports_external.number().default(0),
|
|
63220
|
-
createdAt:
|
|
63221
|
-
startedAt:
|
|
63222
|
-
completedAt:
|
|
65760
|
+
createdAt: TimestampSchema,
|
|
65761
|
+
startedAt: TimestampSchema.nullable(),
|
|
65762
|
+
completedAt: TimestampSchema.nullable(),
|
|
63223
65763
|
createdBy: exports_external.string().nullable()
|
|
63224
65764
|
});
|
|
63225
65765
|
StepExecutionSchema = exports_external.object({
|
|
@@ -63236,12 +65776,12 @@ var init_execution2 = __esm(() => {
|
|
|
63236
65776
|
stepAttempt: exports_external.number().default(0),
|
|
63237
65777
|
inputData: exports_external.unknown().nullable(),
|
|
63238
65778
|
outputData: exports_external.unknown().nullable(),
|
|
63239
|
-
status:
|
|
65779
|
+
status: StepExecutionStatusSchema2,
|
|
63240
65780
|
error: exports_external.string().nullable(),
|
|
63241
65781
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
63242
65782
|
durationMs: exports_external.number().nullable(),
|
|
63243
|
-
startedAt:
|
|
63244
|
-
completedAt:
|
|
65783
|
+
startedAt: TimestampSchema.nullable(),
|
|
65784
|
+
completedAt: TimestampSchema.nullable()
|
|
63245
65785
|
});
|
|
63246
65786
|
ConnectorSchema = exports_external.object({
|
|
63247
65787
|
id: exports_external.string(),
|
|
@@ -63252,8 +65792,8 @@ var init_execution2 = __esm(() => {
|
|
|
63252
65792
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
63253
65793
|
inputSchema: exports_external.unknown().optional(),
|
|
63254
65794
|
outputSchema: exports_external.unknown().optional(),
|
|
63255
|
-
createdAt:
|
|
63256
|
-
updatedAt:
|
|
65795
|
+
createdAt: TimestampSchema,
|
|
65796
|
+
updatedAt: TimestampSchema.optional(),
|
|
63257
65797
|
createdBy: exports_external.string()
|
|
63258
65798
|
});
|
|
63259
65799
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -64171,8 +66711,8 @@ function parseRunTarget(target) {
|
|
|
64171
66711
|
if (root !== "agents") {
|
|
64172
66712
|
throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
|
|
64173
66713
|
}
|
|
64174
|
-
for (const
|
|
64175
|
-
RunTargetSegmentSchema.parse(
|
|
66714
|
+
for (const segment2 of segments) {
|
|
66715
|
+
RunTargetSegmentSchema.parse(segment2);
|
|
64176
66716
|
}
|
|
64177
66717
|
const packagePath = packageName.split(".").join("/");
|
|
64178
66718
|
const [, ...slugParts] = packagePath.split("/");
|
|
@@ -64285,9 +66825,9 @@ var init_grammar = __esm(() => {
|
|
|
64285
66825
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64286
66826
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64287
66827
|
}
|
|
64288
|
-
for (const
|
|
64289
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64290
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
66828
|
+
for (const segment2 of parts.slice(1)) {
|
|
66829
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
66830
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64291
66831
|
}
|
|
64292
66832
|
}
|
|
64293
66833
|
});
|
|
@@ -64303,9 +66843,9 @@ var init_grammar = __esm(() => {
|
|
|
64303
66843
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64304
66844
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64305
66845
|
}
|
|
64306
|
-
for (const
|
|
64307
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64308
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
66846
|
+
for (const segment2 of parts.slice(1)) {
|
|
66847
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
66848
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64309
66849
|
}
|
|
64310
66850
|
}
|
|
64311
66851
|
});
|
|
@@ -64399,9 +66939,9 @@ var init_grammar = __esm(() => {
|
|
|
64399
66939
|
});
|
|
64400
66940
|
return;
|
|
64401
66941
|
}
|
|
64402
|
-
for (const
|
|
64403
|
-
if (!RunTargetSegmentSchema.safeParse(
|
|
64404
|
-
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${
|
|
66942
|
+
for (const segment2 of parts.slice(1)) {
|
|
66943
|
+
if (!RunTargetSegmentSchema.safeParse(segment2).success) {
|
|
66944
|
+
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment2}` });
|
|
64405
66945
|
}
|
|
64406
66946
|
}
|
|
64407
66947
|
if (ref) {
|
|
@@ -65153,7 +67693,7 @@ function fromBig(n, le = false) {
|
|
|
65153
67693
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
65154
67694
|
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
65155
67695
|
}
|
|
65156
|
-
function
|
|
67696
|
+
function split2(lst, le = false) {
|
|
65157
67697
|
const len = lst.length;
|
|
65158
67698
|
let Ah = new Uint32Array(len);
|
|
65159
67699
|
let Al = new Uint32Array(len);
|
|
@@ -65333,7 +67873,7 @@ var init_sha2 = __esm(() => {
|
|
|
65333
67873
|
super(28);
|
|
65334
67874
|
}
|
|
65335
67875
|
};
|
|
65336
|
-
K512 = /* @__PURE__ */ (() =>
|
|
67876
|
+
K512 = /* @__PURE__ */ (() => split2([
|
|
65337
67877
|
"0x428a2f98d728ae22",
|
|
65338
67878
|
"0x7137449123ef65cd",
|
|
65339
67879
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -65722,11 +68262,11 @@ function walkGrammar(node, parts) {
|
|
|
65722
68262
|
}
|
|
65723
68263
|
return current;
|
|
65724
68264
|
}
|
|
65725
|
-
function normalizeTemplate(
|
|
65726
|
-
return
|
|
68265
|
+
function normalizeTemplate(template2) {
|
|
68266
|
+
return template2.endsWith("/") ? template2.slice(0, -1) : template2;
|
|
65727
68267
|
}
|
|
65728
|
-
function renderTemplate(
|
|
65729
|
-
return normalizeTemplate(
|
|
68268
|
+
function renderTemplate(template2, params) {
|
|
68269
|
+
return normalizeTemplate(template2).split("/").flatMap((part) => {
|
|
65730
68270
|
if (!part.startsWith(":")) {
|
|
65731
68271
|
return [part];
|
|
65732
68272
|
}
|
|
@@ -65736,36 +68276,36 @@ function renderTemplate(template, params) {
|
|
|
65736
68276
|
throw new Error(`Missing S3 path parameter: ${part}`);
|
|
65737
68277
|
}
|
|
65738
68278
|
if (name === "path") {
|
|
65739
|
-
return value.split("/").map((
|
|
68279
|
+
return value.split("/").map((segment2) => assertSegment("path", segment2));
|
|
65740
68280
|
}
|
|
65741
68281
|
return [assertSegment(String(name), value)];
|
|
65742
68282
|
});
|
|
65743
68283
|
}
|
|
65744
|
-
function buildS3Path(tenantId,
|
|
68284
|
+
function buildS3Path(tenantId, template2, params) {
|
|
65745
68285
|
const tenant = assertSegment("tenantId", tenantId);
|
|
65746
|
-
const parts = renderTemplate(
|
|
68286
|
+
const parts = renderTemplate(template2, params);
|
|
65747
68287
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
65748
|
-
if (
|
|
65749
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68288
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
68289
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
65750
68290
|
}
|
|
65751
68291
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
65752
|
-
return
|
|
68292
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
65753
68293
|
}
|
|
65754
|
-
function buildS3PathSuffix(
|
|
65755
|
-
const parts = renderTemplate(
|
|
68294
|
+
function buildS3PathSuffix(template2, params) {
|
|
68295
|
+
const parts = renderTemplate(template2, params);
|
|
65756
68296
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
65757
|
-
if (
|
|
65758
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68297
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
68298
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
65759
68299
|
}
|
|
65760
68300
|
const path = parts.join("/");
|
|
65761
|
-
return
|
|
68301
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
65762
68302
|
}
|
|
65763
68303
|
function stripTenantPrefix(key) {
|
|
65764
68304
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
65765
68305
|
}
|
|
65766
|
-
function matchS3Path(
|
|
68306
|
+
function matchS3Path(template2, key) {
|
|
65767
68307
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
65768
|
-
const templateParts = normalizeTemplate(
|
|
68308
|
+
const templateParts = normalizeTemplate(template2).split("/");
|
|
65769
68309
|
const params = {};
|
|
65770
68310
|
let keyIndex = 0;
|
|
65771
68311
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -65784,7 +68324,7 @@ function matchS3Path(template, key) {
|
|
|
65784
68324
|
if (rest.length === 0)
|
|
65785
68325
|
return null;
|
|
65786
68326
|
try {
|
|
65787
|
-
params.path = rest.map((
|
|
68327
|
+
params.path = rest.map((segment2) => assertSegment("path", segment2)).join("/");
|
|
65788
68328
|
walkGrammar(S3_PATH_GRAMMAR, keyParts);
|
|
65789
68329
|
} catch {
|
|
65790
68330
|
return null;
|
|
@@ -65818,23 +68358,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
65818
68358
|
}
|
|
65819
68359
|
return assertSegment("tenantId", tenantId);
|
|
65820
68360
|
};
|
|
65821
|
-
const build = (
|
|
68361
|
+
const build = (template2, params) => {
|
|
65822
68362
|
const tenant = resolveTenantId(params);
|
|
65823
|
-
const parts = renderTemplate(
|
|
68363
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
65824
68364
|
const node = walkGrammar(grammarNode, parts);
|
|
65825
|
-
if (
|
|
65826
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68365
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
68366
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
65827
68367
|
}
|
|
65828
68368
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
65829
|
-
return
|
|
68369
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
65830
68370
|
};
|
|
65831
68371
|
const builder = build;
|
|
65832
|
-
builder.at = (
|
|
68372
|
+
builder.at = (template2, params) => {
|
|
65833
68373
|
const tenant = resolveTenantId(params);
|
|
65834
|
-
const parts = renderTemplate(
|
|
68374
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
65835
68375
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
65836
|
-
if (
|
|
65837
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68376
|
+
if (template2.endsWith("/") && nextNode === PATH_LEAF) {
|
|
68377
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
65838
68378
|
}
|
|
65839
68379
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
65840
68380
|
};
|
|
@@ -66204,6 +68744,7 @@ __export(exports_src, {
|
|
|
66204
68744
|
TableCellSchema: () => TableCellSchema,
|
|
66205
68745
|
TRIGGER_TYPES: () => TRIGGER_TYPES,
|
|
66206
68746
|
TERMINAL_EXECUTION_STATUSES: () => TERMINAL_EXECUTION_STATUSES,
|
|
68747
|
+
SwitchStepSchema: () => SwitchStepSchema,
|
|
66207
68748
|
StoredWorkflowDefinitionSchema: () => StoredWorkflowDefinitionSchema,
|
|
66208
68749
|
StepTypeValue: () => StepTypeValue,
|
|
66209
68750
|
StepTypeSchema: () => StepTypeSchema,
|
|
@@ -66218,7 +68759,7 @@ __export(exports_src, {
|
|
|
66218
68759
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
66219
68760
|
SpanTypes: () => SpanTypes,
|
|
66220
68761
|
SpanKindMap: () => SpanKindMap,
|
|
66221
|
-
SpanKind: () => SpanKind,
|
|
68762
|
+
SpanKind: () => import_api.SpanKind,
|
|
66222
68763
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
66223
68764
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
66224
68765
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -66232,6 +68773,9 @@ __export(exports_src, {
|
|
|
66232
68773
|
SharedResourcePackageManifestSchema: () => SharedResourcePackageManifestSchema,
|
|
66233
68774
|
SharedEvaluatorReferenceSchema: () => SharedEvaluatorReferenceSchema,
|
|
66234
68775
|
SharedEvaluatorCompositionItemSchema: () => SharedEvaluatorCompositionItemSchema,
|
|
68776
|
+
SegmentOutputSchema: () => SegmentOutputSchema,
|
|
68777
|
+
SegmentInputSchema: () => SegmentInputSchema,
|
|
68778
|
+
SegmentConfigSchema: () => SegmentConfigSchema,
|
|
66235
68779
|
SecretNameSchema: () => SecretNameSchema,
|
|
66236
68780
|
ScopedFileRefSchema: () => ScopedFileRefSchema,
|
|
66237
68781
|
ScopeStackSchema: () => ScopeStackSchema,
|
|
@@ -66246,6 +68790,7 @@ __export(exports_src, {
|
|
|
66246
68790
|
SOURCE_PACKAGE_SEGMENT_PATTERN: () => SOURCE_PACKAGE_SEGMENT_PATTERN,
|
|
66247
68791
|
SOURCE_MANIFEST_FILENAME: () => SOURCE_MANIFEST_FILENAME,
|
|
66248
68792
|
SOURCE_COMMIT_SHA_PATTERN: () => SOURCE_COMMIT_SHA_PATTERN,
|
|
68793
|
+
SEGMENT_UNKNOWN_TYPE: () => SEGMENT_UNKNOWN_TYPE,
|
|
66249
68794
|
SCRIPT_FN_MAX_BYTES: () => SCRIPT_FN_MAX_BYTES,
|
|
66250
68795
|
S3_PATH_GRAMMAR: () => S3_PATH_GRAMMAR,
|
|
66251
68796
|
S3FileRefSchema: () => S3FileRefSchema,
|
|
@@ -66320,7 +68865,7 @@ __export(exports_src, {
|
|
|
66320
68865
|
GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
|
|
66321
68866
|
ForeachStepSchema: () => ForeachStepSchema,
|
|
66322
68867
|
FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
|
|
66323
|
-
FilePathDescriptorSchema: () =>
|
|
68868
|
+
FilePathDescriptorSchema: () => FilePathDescriptorSchema,
|
|
66324
68869
|
FileIngressRefSchema: () => FileIngressRefSchema,
|
|
66325
68870
|
FileIdIngressRefSchema: () => FileIdIngressRefSchema,
|
|
66326
68871
|
FailStepSchema: () => FailStepSchema,
|
|
@@ -66442,8 +68987,8 @@ var init_src = __esm(() => {
|
|
|
66442
68987
|
init_legacy_boundary();
|
|
66443
68988
|
init_runtime_file_ref();
|
|
66444
68989
|
init_scoped_file_ref();
|
|
66445
|
-
|
|
66446
|
-
|
|
68990
|
+
init_processor2();
|
|
68991
|
+
init_parser2();
|
|
66447
68992
|
init_otel();
|
|
66448
68993
|
init_execution_row();
|
|
66449
68994
|
init_run_expand();
|
|
@@ -67356,7 +69901,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
67356
69901
|
else
|
|
67357
69902
|
end = lineWidth - indentAtStart;
|
|
67358
69903
|
}
|
|
67359
|
-
let
|
|
69904
|
+
let split3 = undefined;
|
|
67360
69905
|
let prev = undefined;
|
|
67361
69906
|
let overflow = false;
|
|
67362
69907
|
let i = -1;
|
|
@@ -67390,20 +69935,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
67390
69935
|
if (mode === FOLD_BLOCK)
|
|
67391
69936
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
67392
69937
|
end = i + indent.length + endStep;
|
|
67393
|
-
|
|
69938
|
+
split3 = undefined;
|
|
67394
69939
|
} else {
|
|
67395
69940
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
67396
69941
|
` && prev !== "\t") {
|
|
67397
69942
|
const next = text[i + 1];
|
|
67398
69943
|
if (next && next !== " " && next !== `
|
|
67399
69944
|
` && next !== "\t")
|
|
67400
|
-
|
|
69945
|
+
split3 = i;
|
|
67401
69946
|
}
|
|
67402
69947
|
if (i >= end) {
|
|
67403
|
-
if (
|
|
67404
|
-
folds.push(
|
|
67405
|
-
end =
|
|
67406
|
-
|
|
69948
|
+
if (split3) {
|
|
69949
|
+
folds.push(split3);
|
|
69950
|
+
end = split3 + endStep;
|
|
69951
|
+
split3 = undefined;
|
|
67407
69952
|
} else if (mode === FOLD_QUOTED) {
|
|
67408
69953
|
while (prev === " " || prev === "\t") {
|
|
67409
69954
|
prev = ch;
|
|
@@ -67416,7 +69961,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
67416
69961
|
folds.push(j);
|
|
67417
69962
|
escapedFolds[j] = true;
|
|
67418
69963
|
end = j + endStep;
|
|
67419
|
-
|
|
69964
|
+
split3 = undefined;
|
|
67420
69965
|
} else {
|
|
67421
69966
|
overflow = true;
|
|
67422
69967
|
}
|
|
@@ -68050,7 +70595,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
68050
70595
|
var identity = require_identity();
|
|
68051
70596
|
var Scalar = require_Scalar();
|
|
68052
70597
|
var MERGE_KEY = "<<";
|
|
68053
|
-
var
|
|
70598
|
+
var merge3 = {
|
|
68054
70599
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
68055
70600
|
default: "key",
|
|
68056
70601
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -68060,7 +70605,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
68060
70605
|
}),
|
|
68061
70606
|
stringify: () => MERGE_KEY
|
|
68062
70607
|
};
|
|
68063
|
-
var isMergeKey = (ctx, key) => (
|
|
70608
|
+
var isMergeKey = (ctx, key) => (merge3.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge3.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge3.tag && tag.default);
|
|
68064
70609
|
function addMergeToJSMap(ctx, map2, value) {
|
|
68065
70610
|
const source = resolveAliasValue(ctx, value);
|
|
68066
70611
|
if (identity.isSeq(source))
|
|
@@ -68099,21 +70644,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
68099
70644
|
}
|
|
68100
70645
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
68101
70646
|
exports.isMergeKey = isMergeKey;
|
|
68102
|
-
exports.merge =
|
|
70647
|
+
exports.merge = merge3;
|
|
68103
70648
|
});
|
|
68104
70649
|
|
|
68105
70650
|
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
68106
70651
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
68107
70652
|
var log = require_log();
|
|
68108
|
-
var
|
|
70653
|
+
var merge3 = require_merge();
|
|
68109
70654
|
var stringify = require_stringify();
|
|
68110
70655
|
var identity = require_identity();
|
|
68111
70656
|
var toJS = require_toJS();
|
|
68112
70657
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
68113
70658
|
if (identity.isNode(key) && key.addToJSMap)
|
|
68114
70659
|
key.addToJSMap(ctx, map2, value);
|
|
68115
|
-
else if (
|
|
68116
|
-
|
|
70660
|
+
else if (merge3.isMergeKey(ctx, key))
|
|
70661
|
+
merge3.addMergeToJSMap(ctx, map2, value);
|
|
68117
70662
|
else {
|
|
68118
70663
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
68119
70664
|
if (map2 instanceof Map) {
|
|
@@ -69389,7 +71934,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
69389
71934
|
var bool = require_bool2();
|
|
69390
71935
|
var float = require_float2();
|
|
69391
71936
|
var int2 = require_int2();
|
|
69392
|
-
var
|
|
71937
|
+
var merge3 = require_merge();
|
|
69393
71938
|
var omap = require_omap();
|
|
69394
71939
|
var pairs = require_pairs();
|
|
69395
71940
|
var set2 = require_set();
|
|
@@ -69409,7 +71954,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
69409
71954
|
float.floatExp,
|
|
69410
71955
|
float.float,
|
|
69411
71956
|
binary.binary,
|
|
69412
|
-
|
|
71957
|
+
merge3.merge,
|
|
69413
71958
|
omap.omap,
|
|
69414
71959
|
pairs.pairs,
|
|
69415
71960
|
set2.set,
|
|
@@ -69432,7 +71977,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69432
71977
|
var schema = require_schema();
|
|
69433
71978
|
var schema$1 = require_schema2();
|
|
69434
71979
|
var binary = require_binary();
|
|
69435
|
-
var
|
|
71980
|
+
var merge3 = require_merge();
|
|
69436
71981
|
var omap = require_omap();
|
|
69437
71982
|
var pairs = require_pairs();
|
|
69438
71983
|
var schema$2 = require_schema3();
|
|
@@ -69457,7 +72002,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69457
72002
|
intOct: int2.intOct,
|
|
69458
72003
|
intTime: timestamp.intTime,
|
|
69459
72004
|
map: map2.map,
|
|
69460
|
-
merge:
|
|
72005
|
+
merge: merge3.merge,
|
|
69461
72006
|
null: _null4.nullTag,
|
|
69462
72007
|
omap: omap.omap,
|
|
69463
72008
|
pairs: pairs.pairs,
|
|
@@ -69467,7 +72012,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69467
72012
|
};
|
|
69468
72013
|
var coreKnownTags = {
|
|
69469
72014
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
69470
|
-
"tag:yaml.org,2002:merge":
|
|
72015
|
+
"tag:yaml.org,2002:merge": merge3.merge,
|
|
69471
72016
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
69472
72017
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
69473
72018
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -69476,7 +72021,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69476
72021
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
69477
72022
|
const schemaTags = schemas3.get(schemaName);
|
|
69478
72023
|
if (schemaTags && !customTags) {
|
|
69479
|
-
return addMergeTag && !schemaTags.includes(
|
|
72024
|
+
return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
|
|
69480
72025
|
}
|
|
69481
72026
|
let tags = schemaTags;
|
|
69482
72027
|
if (!tags) {
|
|
@@ -69494,7 +72039,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
69494
72039
|
tags = customTags(tags.slice());
|
|
69495
72040
|
}
|
|
69496
72041
|
if (addMergeTag)
|
|
69497
|
-
tags = tags.concat(
|
|
72042
|
+
tags = tags.concat(merge3.merge);
|
|
69498
72043
|
return tags.reduce((tags2, tag) => {
|
|
69499
72044
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
69500
72045
|
if (!tagObj) {
|
|
@@ -69521,11 +72066,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
69521
72066
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
69522
72067
|
|
|
69523
72068
|
class Schema {
|
|
69524
|
-
constructor({ compat: compat2, customTags, merge:
|
|
72069
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
69525
72070
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
69526
72071
|
this.name = typeof schema === "string" && schema || "core";
|
|
69527
72072
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
69528
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
72073
|
+
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
69529
72074
|
this.toStringOptions = toStringDefaults ?? null;
|
|
69530
72075
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
69531
72076
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -70748,13 +73293,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
70748
73293
|
return { mode, indent, chomp, comment, length };
|
|
70749
73294
|
}
|
|
70750
73295
|
function splitLines(source) {
|
|
70751
|
-
const
|
|
70752
|
-
const first =
|
|
73296
|
+
const split3 = source.split(/\n( *)/);
|
|
73297
|
+
const first = split3[0];
|
|
70753
73298
|
const m = first.match(/^( *)/);
|
|
70754
73299
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
70755
73300
|
const lines = [line0];
|
|
70756
|
-
for (let i = 1;i <
|
|
70757
|
-
lines.push([
|
|
73301
|
+
for (let i = 1;i < split3.length; i += 2)
|
|
73302
|
+
lines.push([split3[i], split3[i + 1]]);
|
|
70758
73303
|
return lines;
|
|
70759
73304
|
}
|
|
70760
73305
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -73768,7 +76313,7 @@ var init_main = __esm(() => {
|
|
|
73768
76313
|
});
|
|
73769
76314
|
|
|
73770
76315
|
// ../../node_modules/sisteransi/src/index.js
|
|
73771
|
-
var
|
|
76316
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
73772
76317
|
var ESC2 = "\x1B";
|
|
73773
76318
|
var CSI2 = `${ESC2}[`;
|
|
73774
76319
|
var beep = "\x07";
|
|
@@ -74111,7 +76656,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
74111
76656
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
74112
76657
|
var init_dist3 = __esm(() => {
|
|
74113
76658
|
init_main();
|
|
74114
|
-
import_sisteransi = __toESM(
|
|
76659
|
+
import_sisteransi = __toESM(require_src2(), 1);
|
|
74115
76660
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
74116
76661
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
74117
76662
|
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)}` } } };
|
|
@@ -75454,7 +77999,7 @@ var init_dist4 = __esm(() => {
|
|
|
75454
77999
|
init_dist3();
|
|
75455
78000
|
init_main();
|
|
75456
78001
|
init_dist2();
|
|
75457
|
-
import_sisteransi2 = __toESM(
|
|
78002
|
+
import_sisteransi2 = __toESM(require_src2(), 1);
|
|
75458
78003
|
tt2 = te();
|
|
75459
78004
|
_t = w2("◆", "*");
|
|
75460
78005
|
ot2 = w2("■", "x");
|
|
@@ -168946,7 +171491,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
168946
171491
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
168947
171492
|
}
|
|
168948
171493
|
return to5;
|
|
168949
|
-
}, __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,
|
|
171494
|
+
}, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp3(target, "default", { value: mod, enumerable: true }) : target, mod)), require_array, require_errno, require_fs, require_path, require_is_extglob, require_is_glob, require_glob_parent, require_utils4, require_stringify2, require_is_number, require_to_regex_range, require_fill_range, require_compile2, require_expand, require_constants, require_parse, require_braces, require_constants2, require_utils22, require_scan, require_parse2, require_picomatch, require_picomatch2, require_micromatch, require_pattern2, require_merge2, require_stream, require_string2, require_utils32, require_tasks, require_async, require_sync, require_fs2, require_settings, require_out, require_queue_microtask, require_run_parallel, require_constants3, require_fs3, require_utils42, require_common, require_async2, require_sync2, require_fs4, require_settings2, require_out2, require_reusify, require_queue, require_common2, require_reader, require_async3, require_async4, require_stream2, require_sync3, require_sync4, require_settings3, require_out3, require_reader2, require_stream3, require_async5, require_matcher, require_partial, require_deep, require_entry, require_error2, require_entry2, require_provider, require_async6, require_stream4, require_sync5, require_sync6, require_settings4, require_out4, require_picocolors2, require_debug, require_constants4, require_re, require_parse_options, require_identifiers, require_semver2, require_compare, require_gte, require_pseudomap, require_map2, require_yallist, require_lru_cache, require_sigmund, require_fnmatch, require_ini, require_package, require_src3, require_js_tokens, require_readlines, require_ignore, index_exports, Diff = class {
|
|
168950
171495
|
diff(oldStr, newStr, options8 = {}) {
|
|
168951
171496
|
let callback;
|
|
168952
171497
|
if (typeof options8 === "function") {
|
|
@@ -169968,7 +172513,7 @@ var init_prettier = __esm(() => {
|
|
|
169968
172513
|
};
|
|
169969
172514
|
}
|
|
169970
172515
|
});
|
|
169971
|
-
|
|
172516
|
+
require_utils4 = __commonJS2({
|
|
169972
172517
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
169973
172518
|
exports.isInteger = (num) => {
|
|
169974
172519
|
if (typeof num === "number") {
|
|
@@ -170057,7 +172602,7 @@ var init_prettier = __esm(() => {
|
|
|
170057
172602
|
});
|
|
170058
172603
|
require_stringify2 = __commonJS2({
|
|
170059
172604
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
170060
|
-
var utils2 =
|
|
172605
|
+
var utils2 = require_utils4();
|
|
170061
172606
|
module.exports = (ast, options8 = {}) => {
|
|
170062
172607
|
const stringify2 = (node, parent = {}) => {
|
|
170063
172608
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -170511,7 +173056,7 @@ var init_prettier = __esm(() => {
|
|
|
170511
173056
|
require_compile2 = __commonJS2({
|
|
170512
173057
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
170513
173058
|
var fill2 = require_fill_range();
|
|
170514
|
-
var utils2 =
|
|
173059
|
+
var utils2 = require_utils4();
|
|
170515
173060
|
var compile = (ast, options8 = {}) => {
|
|
170516
173061
|
const walk2 = (node, parent = {}) => {
|
|
170517
173062
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -170561,7 +173106,7 @@ var init_prettier = __esm(() => {
|
|
|
170561
173106
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
170562
173107
|
var fill2 = require_fill_range();
|
|
170563
173108
|
var stringify2 = require_stringify2();
|
|
170564
|
-
var utils2 =
|
|
173109
|
+
var utils2 = require_utils4();
|
|
170565
173110
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
170566
173111
|
const result = [];
|
|
170567
173112
|
queue = [].concat(queue);
|
|
@@ -172760,8 +175305,8 @@ var init_prettier = __esm(() => {
|
|
|
172760
175305
|
var Stream = __require2("stream");
|
|
172761
175306
|
var PassThrough = Stream.PassThrough;
|
|
172762
175307
|
var slice = Array.prototype.slice;
|
|
172763
|
-
module.exports =
|
|
172764
|
-
function
|
|
175308
|
+
module.exports = merge22;
|
|
175309
|
+
function merge22() {
|
|
172765
175310
|
const streamsQueue = [];
|
|
172766
175311
|
const args = slice.call(arguments);
|
|
172767
175312
|
let merging = false;
|
|
@@ -172875,9 +175420,9 @@ var init_prettier = __esm(() => {
|
|
|
172875
175420
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
172876
175421
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172877
175422
|
exports.merge = undefined;
|
|
172878
|
-
var
|
|
175423
|
+
var merge22 = require_merge2();
|
|
172879
175424
|
function merge3(streams) {
|
|
172880
|
-
const mergedStream =
|
|
175425
|
+
const mergedStream = merge22(streams);
|
|
172881
175426
|
streams.forEach((stream) => {
|
|
172882
175427
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
172883
175428
|
});
|
|
@@ -172905,7 +175450,7 @@ var init_prettier = __esm(() => {
|
|
|
172905
175450
|
exports.isEmpty = isEmpty;
|
|
172906
175451
|
}
|
|
172907
175452
|
});
|
|
172908
|
-
|
|
175453
|
+
require_utils32 = __commonJS2({
|
|
172909
175454
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
172910
175455
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172911
175456
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -172929,7 +175474,7 @@ var init_prettier = __esm(() => {
|
|
|
172929
175474
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
172930
175475
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
172931
175476
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
172932
|
-
var utils2 =
|
|
175477
|
+
var utils2 = require_utils32();
|
|
172933
175478
|
function generate(input, settings) {
|
|
172934
175479
|
const patterns = processPatterns(input, settings);
|
|
172935
175480
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -173238,7 +175783,7 @@ var init_prettier = __esm(() => {
|
|
|
173238
175783
|
exports.createDirentFromStats = createDirentFromStats;
|
|
173239
175784
|
}
|
|
173240
175785
|
});
|
|
173241
|
-
|
|
175786
|
+
require_utils42 = __commonJS2({
|
|
173242
175787
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
173243
175788
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173244
175789
|
exports.fs = undefined;
|
|
@@ -173266,7 +175811,7 @@ var init_prettier = __esm(() => {
|
|
|
173266
175811
|
var fsStat = require_out();
|
|
173267
175812
|
var rpl = require_run_parallel();
|
|
173268
175813
|
var constants_1 = require_constants3();
|
|
173269
|
-
var utils2 =
|
|
175814
|
+
var utils2 = require_utils42();
|
|
173270
175815
|
var common = require_common();
|
|
173271
175816
|
function read3(directory, settings, callback) {
|
|
173272
175817
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -173372,7 +175917,7 @@ var init_prettier = __esm(() => {
|
|
|
173372
175917
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
173373
175918
|
var fsStat = require_out();
|
|
173374
175919
|
var constants_1 = require_constants3();
|
|
173375
|
-
var utils2 =
|
|
175920
|
+
var utils2 = require_utils42();
|
|
173376
175921
|
var common = require_common();
|
|
173377
175922
|
function read3(directory, settings) {
|
|
173378
175923
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -174152,7 +176697,7 @@ var init_prettier = __esm(() => {
|
|
|
174152
176697
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174153
176698
|
var path15 = __require2("path");
|
|
174154
176699
|
var fsStat = require_out();
|
|
174155
|
-
var utils2 =
|
|
176700
|
+
var utils2 = require_utils32();
|
|
174156
176701
|
var Reader = class {
|
|
174157
176702
|
constructor(_settings) {
|
|
174158
176703
|
this._settings = _settings;
|
|
@@ -174276,7 +176821,7 @@ var init_prettier = __esm(() => {
|
|
|
174276
176821
|
require_matcher = __commonJS2({
|
|
174277
176822
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
174278
176823
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174279
|
-
var utils2 =
|
|
176824
|
+
var utils2 = require_utils32();
|
|
174280
176825
|
var Matcher = class {
|
|
174281
176826
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
174282
176827
|
this._patterns = _patterns;
|
|
@@ -174315,7 +176860,7 @@ var init_prettier = __esm(() => {
|
|
|
174315
176860
|
});
|
|
174316
176861
|
}
|
|
174317
176862
|
_splitSegmentsIntoSections(segments) {
|
|
174318
|
-
return utils2.array.splitWhen(segments, (
|
|
176863
|
+
return utils2.array.splitWhen(segments, (segment2) => segment2.dynamic && utils2.pattern.hasGlobStar(segment2.pattern));
|
|
174319
176864
|
}
|
|
174320
176865
|
};
|
|
174321
176866
|
exports.default = Matcher;
|
|
@@ -174336,11 +176881,11 @@ var init_prettier = __esm(() => {
|
|
|
174336
176881
|
return true;
|
|
174337
176882
|
}
|
|
174338
176883
|
const match = parts.every((part, index) => {
|
|
174339
|
-
const
|
|
174340
|
-
if (
|
|
176884
|
+
const segment2 = pattern.segments[index];
|
|
176885
|
+
if (segment2.dynamic && segment2.patternRe.test(part)) {
|
|
174341
176886
|
return true;
|
|
174342
176887
|
}
|
|
174343
|
-
if (!
|
|
176888
|
+
if (!segment2.dynamic && segment2.pattern === part) {
|
|
174344
176889
|
return true;
|
|
174345
176890
|
}
|
|
174346
176891
|
return false;
|
|
@@ -174358,7 +176903,7 @@ var init_prettier = __esm(() => {
|
|
|
174358
176903
|
require_deep = __commonJS2({
|
|
174359
176904
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
174360
176905
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174361
|
-
var utils2 =
|
|
176906
|
+
var utils2 = require_utils32();
|
|
174362
176907
|
var partial_1 = require_partial();
|
|
174363
176908
|
var DeepFilter = class {
|
|
174364
176909
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -174420,7 +176965,7 @@ var init_prettier = __esm(() => {
|
|
|
174420
176965
|
require_entry = __commonJS2({
|
|
174421
176966
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
174422
176967
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174423
|
-
var utils2 =
|
|
176968
|
+
var utils2 = require_utils32();
|
|
174424
176969
|
var EntryFilter = class {
|
|
174425
176970
|
constructor(_settings, _micromatchOptions) {
|
|
174426
176971
|
this._settings = _settings;
|
|
@@ -174505,7 +177050,7 @@ var init_prettier = __esm(() => {
|
|
|
174505
177050
|
require_error2 = __commonJS2({
|
|
174506
177051
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
174507
177052
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174508
|
-
var utils2 =
|
|
177053
|
+
var utils2 = require_utils32();
|
|
174509
177054
|
var ErrorFilter = class {
|
|
174510
177055
|
constructor(_settings) {
|
|
174511
177056
|
this._settings = _settings;
|
|
@@ -174523,7 +177068,7 @@ var init_prettier = __esm(() => {
|
|
|
174523
177068
|
require_entry2 = __commonJS2({
|
|
174524
177069
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
174525
177070
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174526
|
-
var utils2 =
|
|
177071
|
+
var utils2 = require_utils32();
|
|
174527
177072
|
var EntryTransformer = class {
|
|
174528
177073
|
constructor(_settings) {
|
|
174529
177074
|
this._settings = _settings;
|
|
@@ -174791,7 +177336,7 @@ var init_prettier = __esm(() => {
|
|
|
174791
177336
|
var stream_1 = require_stream4();
|
|
174792
177337
|
var sync_1 = require_sync6();
|
|
174793
177338
|
var settings_1 = require_settings4();
|
|
174794
|
-
var utils2 =
|
|
177339
|
+
var utils2 = require_utils32();
|
|
174795
177340
|
async function FastGlob(source2, options8) {
|
|
174796
177341
|
assertPatternsInput(source2);
|
|
174797
177342
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -175109,7 +177654,7 @@ var init_prettier = __esm(() => {
|
|
|
175109
177654
|
};
|
|
175110
177655
|
}
|
|
175111
177656
|
});
|
|
175112
|
-
|
|
177657
|
+
require_semver2 = __commonJS2({
|
|
175113
177658
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
175114
177659
|
var debug = require_debug();
|
|
175115
177660
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -175379,7 +177924,7 @@ var init_prettier = __esm(() => {
|
|
|
175379
177924
|
});
|
|
175380
177925
|
require_compare = __commonJS2({
|
|
175381
177926
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
175382
|
-
var SemVer =
|
|
177927
|
+
var SemVer = require_semver2();
|
|
175383
177928
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
175384
177929
|
module.exports = compare;
|
|
175385
177930
|
}
|
|
@@ -177112,7 +179657,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
177112
179657
|
};
|
|
177113
179658
|
}
|
|
177114
179659
|
});
|
|
177115
|
-
|
|
179660
|
+
require_src3 = __commonJS2({
|
|
177116
179661
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
177117
179662
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
177118
179663
|
return new (P9 || (P9 = Promise))(function(resolve32, reject) {
|
|
@@ -178575,7 +181120,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
178575
181120
|
mockable_default = mockable.mocked;
|
|
178576
181121
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
178577
181122
|
partition_default = partition2;
|
|
178578
|
-
import_editorconfig = __toESM2(
|
|
181123
|
+
import_editorconfig = __toESM2(require_src3(), 1);
|
|
178579
181124
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
178580
181125
|
FileSearcher = class extends Searcher {
|
|
178581
181126
|
findInDirectory = findFile;
|
|
@@ -181171,7 +183716,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
181171
183716
|
// package.json
|
|
181172
183717
|
var package_default = {
|
|
181173
183718
|
name: "@eigenpal/cli",
|
|
181174
|
-
version: "0.10.
|
|
183719
|
+
version: "0.10.9",
|
|
181175
183720
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
181176
183721
|
keywords: [
|
|
181177
183722
|
"eigenpal",
|
|
@@ -182688,7 +185233,7 @@ async function pushCurrentBranch(input) {
|
|
|
182688
185233
|
function slugifyPackageSegment(value) {
|
|
182689
185234
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
182690
185235
|
}
|
|
182691
|
-
function packagePathForTemplate(
|
|
185236
|
+
function packagePathForTemplate(template2, name) {
|
|
182692
185237
|
const slug = slugifyPackageSegment(name);
|
|
182693
185238
|
if (!slug)
|
|
182694
185239
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -182700,7 +185245,7 @@ function packagePathForTemplate(template, name) {
|
|
|
182700
185245
|
knowledge: "resources/knowledge",
|
|
182701
185246
|
evaluator: "evaluators"
|
|
182702
185247
|
};
|
|
182703
|
-
const root = rootByTemplate[
|
|
185248
|
+
const root = rootByTemplate[template2];
|
|
182704
185249
|
if (!root)
|
|
182705
185250
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
182706
185251
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -183109,12 +185654,12 @@ function archivePackage(input) {
|
|
|
183109
185654
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
183110
185655
|
cwd: input.gitRoot
|
|
183111
185656
|
});
|
|
183112
|
-
const
|
|
185657
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
183113
185658
|
cwd: input.outDir,
|
|
183114
185659
|
encoding: "utf8"
|
|
183115
185660
|
});
|
|
183116
|
-
if (
|
|
183117
|
-
throw new Error(
|
|
185661
|
+
if (extract2.status !== 0)
|
|
185662
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
183118
185663
|
} finally {
|
|
183119
185664
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
183120
185665
|
}
|
|
@@ -183143,12 +185688,12 @@ async function tryHostedArchive(input) {
|
|
|
183143
185688
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
183144
185689
|
try {
|
|
183145
185690
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
183146
|
-
const
|
|
185691
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
183147
185692
|
cwd: input.outDir,
|
|
183148
185693
|
encoding: "utf8"
|
|
183149
185694
|
});
|
|
183150
|
-
if (
|
|
183151
|
-
throw new Error(
|
|
185695
|
+
if (extract2.status !== 0)
|
|
185696
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
183152
185697
|
return true;
|
|
183153
185698
|
} finally {
|
|
183154
185699
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -187503,18 +190048,18 @@ async function init(name, opts) {
|
|
|
187503
190048
|
if (existsSync11(target) && readdirSync2(target).length > 0) {
|
|
187504
190049
|
throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
|
|
187505
190050
|
}
|
|
187506
|
-
let
|
|
190051
|
+
let template2;
|
|
187507
190052
|
if (opts.template) {
|
|
187508
190053
|
if (!isTemplateName(opts.template)) {
|
|
187509
190054
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
187510
190055
|
}
|
|
187511
|
-
|
|
190056
|
+
template2 = opts.template;
|
|
187512
190057
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
187513
|
-
|
|
190058
|
+
template2 = "blank";
|
|
187514
190059
|
} else {
|
|
187515
|
-
|
|
190060
|
+
template2 = await promptForTemplate();
|
|
187516
190061
|
}
|
|
187517
|
-
const sourceRoot = join2(resolveTemplatesRoot(),
|
|
190062
|
+
const sourceRoot = join2(resolveTemplatesRoot(), template2);
|
|
187518
190063
|
if (!existsSync11(sourceRoot)) {
|
|
187519
190064
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
187520
190065
|
}
|
|
@@ -189314,6 +191859,19 @@ function validateStepConfigsRecursive(steps, pathPrefix) {
|
|
|
189314
191859
|
if (Array.isArray(anyStep.steps)) {
|
|
189315
191860
|
issues.push(...validateStepConfigsRecursive(anyStep.steps, [...stepPath, "steps"]));
|
|
189316
191861
|
}
|
|
191862
|
+
if (Array.isArray(anyStep.default)) {
|
|
191863
|
+
issues.push(...validateStepConfigsRecursive(anyStep.default, [...stepPath, "default"]));
|
|
191864
|
+
}
|
|
191865
|
+
if (Array.isArray(anyStep.cases)) {
|
|
191866
|
+
for (let j11 = 0;j11 < anyStep.cases.length; j11++) {
|
|
191867
|
+
issues.push(...validateStepConfigsRecursive(anyStep.cases[j11].steps, [
|
|
191868
|
+
...stepPath,
|
|
191869
|
+
"cases",
|
|
191870
|
+
j11,
|
|
191871
|
+
"steps"
|
|
191872
|
+
]));
|
|
191873
|
+
}
|
|
191874
|
+
}
|
|
189317
191875
|
if (Array.isArray(anyStep.branches)) {
|
|
189318
191876
|
for (let j11 = 0;j11 < anyStep.branches.length; j11++) {
|
|
189319
191877
|
issues.push(...validateStepConfigsRecursive(anyStep.branches[j11].steps, [
|
|
@@ -189408,6 +191966,20 @@ function descendNestedContainers(step, stepPath, ancestorsInScope, out) {
|
|
|
189408
191966
|
if (Array.isArray(ifStep.else)) {
|
|
189409
191967
|
walkContainer(ifStep.else, ancestorsInScope, `${stepPath}.else`, out);
|
|
189410
191968
|
}
|
|
191969
|
+
return;
|
|
191970
|
+
}
|
|
191971
|
+
if (step.type === "control.switch") {
|
|
191972
|
+
const switchStep = step;
|
|
191973
|
+
const cases = switchStep.cases ?? [];
|
|
191974
|
+
for (let c7 = 0;c7 < cases.length; c7++) {
|
|
191975
|
+
const caseSteps = cases[c7]?.steps;
|
|
191976
|
+
if (Array.isArray(caseSteps)) {
|
|
191977
|
+
walkContainer(caseSteps, ancestorsInScope, `${stepPath}.cases.${c7}.steps`, out);
|
|
191978
|
+
}
|
|
191979
|
+
}
|
|
191980
|
+
if (Array.isArray(switchStep.default)) {
|
|
191981
|
+
walkContainer(switchStep.default, ancestorsInScope, `${stepPath}.default`, out);
|
|
191982
|
+
}
|
|
189411
191983
|
}
|
|
189412
191984
|
}
|
|
189413
191985
|
function validateStepRefs(step, stepPath, inScope, out) {
|