@eigenpal/cli 0.10.22 → 0.10.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2759 -314
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17080,8 +17080,143 @@ 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
|
+
WEBHOOK_ENDPOINT: "whep",
|
|
17163
|
+
WEBHOOK_EVENT: "whev",
|
|
17164
|
+
WEBHOOK_DELIVERY: "whdl",
|
|
17165
|
+
WEBHOOK_ATTEMPT: "what",
|
|
17166
|
+
SANDBOX_WS_TOKEN: "sws"
|
|
17167
|
+
};
|
|
17168
|
+
TimestampSchema = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
17169
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
17170
|
+
});
|
|
17171
|
+
JsonSchemaSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
17172
|
+
BaseEntitySchema = exports_external.object({
|
|
17173
|
+
id: exports_external.string(),
|
|
17174
|
+
createdAt: TimestampSchema.optional(),
|
|
17175
|
+
updatedAt: TimestampSchema.optional()
|
|
17176
|
+
});
|
|
17177
|
+
});
|
|
17178
|
+
|
|
17179
|
+
// ../types/src/core/ids.ts
|
|
17180
|
+
var PROCESSOR_IDS, PARSER_IDS, INPUT_KINDS;
|
|
17181
|
+
var init_ids = __esm(() => {
|
|
17182
|
+
PROCESSOR_IDS = {
|
|
17183
|
+
MERGE: "builtin/merge",
|
|
17184
|
+
DOCUMENT_PARSER: "builtin/parser",
|
|
17185
|
+
EXTRACT: "builtin/extract",
|
|
17186
|
+
SPLIT: "builtin/split",
|
|
17187
|
+
SEGMENT: "builtin/segment",
|
|
17188
|
+
CLASSIFY: "builtin/classify",
|
|
17189
|
+
TEMPLATE: "builtin/template",
|
|
17190
|
+
PDF_EMBEDDER: "builtin/pdf-embedder",
|
|
17191
|
+
XLSX_TO_JSON: "builtin/xlsx-to-json"
|
|
17192
|
+
};
|
|
17193
|
+
PARSER_IDS = {
|
|
17194
|
+
KREUZBERG: "builtin/kreuzberg",
|
|
17195
|
+
OCR: "builtin/ocr",
|
|
17196
|
+
LLM_VISION: "builtin/llm-vision"
|
|
17197
|
+
};
|
|
17198
|
+
INPUT_KINDS = {
|
|
17199
|
+
DOCUMENT: "document",
|
|
17200
|
+
PAYLOAD: "payload"
|
|
17201
|
+
};
|
|
17202
|
+
});
|
|
17203
|
+
|
|
17204
|
+
// ../types/src/core/pagination.ts
|
|
17205
|
+
var PaginationParamsSchema, DEFAULT_PAGE_SIZE = 50, MAX_PAGE_SIZE = 100;
|
|
17206
|
+
var init_pagination = __esm(() => {
|
|
17207
|
+
init_zod();
|
|
17208
|
+
PaginationParamsSchema = exports_external.object({
|
|
17209
|
+
limit: exports_external.coerce.number().int().min(1).max(100).default(50),
|
|
17210
|
+
offset: exports_external.coerce.number().int().min(0).default(0)
|
|
17211
|
+
});
|
|
17212
|
+
});
|
|
17213
|
+
|
|
17083
17214
|
// ../types/src/core/index.ts
|
|
17084
|
-
var init_core3 = () => {
|
|
17215
|
+
var init_core3 = __esm(() => {
|
|
17216
|
+
init_common();
|
|
17217
|
+
init_ids();
|
|
17218
|
+
init_pagination();
|
|
17219
|
+
});
|
|
17085
17220
|
|
|
17086
17221
|
// ../types/src/files/legacy-boundary.ts
|
|
17087
17222
|
var LEGACY_FILE_REF_COMPATIBILITY;
|
|
@@ -17106,6 +17241,9 @@ var init_legacy_boundary = __esm(() => {
|
|
|
17106
17241
|
function isRuntimeFileRef(input) {
|
|
17107
17242
|
return RuntimeFileRefSchema.safeParse(input).success;
|
|
17108
17243
|
}
|
|
17244
|
+
function isFilePathDescriptor(input) {
|
|
17245
|
+
return FilePathDescriptorSchema.safeParse(input).success;
|
|
17246
|
+
}
|
|
17109
17247
|
function isResolvedProcessorFile(input) {
|
|
17110
17248
|
return ResolvedProcessorFileSchema.safeParse(input).success;
|
|
17111
17249
|
}
|
|
@@ -17328,11 +17466,2411 @@ var init_scoped_file_ref = __esm(() => {
|
|
|
17328
17466
|
]);
|
|
17329
17467
|
});
|
|
17330
17468
|
|
|
17469
|
+
// ../../node_modules/@opentelemetry/api/build/src/version.js
|
|
17470
|
+
var require_version = __commonJS((exports) => {
|
|
17471
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17472
|
+
exports.VERSION = undefined;
|
|
17473
|
+
exports.VERSION = "1.9.1";
|
|
17474
|
+
});
|
|
17475
|
+
|
|
17476
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/semver.js
|
|
17477
|
+
var require_semver = __commonJS((exports) => {
|
|
17478
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17479
|
+
exports.isCompatible = exports._makeCompatibilityCheck = undefined;
|
|
17480
|
+
var version_1 = require_version();
|
|
17481
|
+
var re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
17482
|
+
function _makeCompatibilityCheck(ownVersion) {
|
|
17483
|
+
const acceptedVersions = new Set([ownVersion]);
|
|
17484
|
+
const rejectedVersions = new Set;
|
|
17485
|
+
const myVersionMatch = ownVersion.match(re);
|
|
17486
|
+
if (!myVersionMatch) {
|
|
17487
|
+
return () => false;
|
|
17488
|
+
}
|
|
17489
|
+
const ownVersionParsed = {
|
|
17490
|
+
major: +myVersionMatch[1],
|
|
17491
|
+
minor: +myVersionMatch[2],
|
|
17492
|
+
patch: +myVersionMatch[3],
|
|
17493
|
+
prerelease: myVersionMatch[4]
|
|
17494
|
+
};
|
|
17495
|
+
if (ownVersionParsed.prerelease != null) {
|
|
17496
|
+
return function isExactmatch(globalVersion) {
|
|
17497
|
+
return globalVersion === ownVersion;
|
|
17498
|
+
};
|
|
17499
|
+
}
|
|
17500
|
+
function _reject(v) {
|
|
17501
|
+
rejectedVersions.add(v);
|
|
17502
|
+
return false;
|
|
17503
|
+
}
|
|
17504
|
+
function _accept(v) {
|
|
17505
|
+
acceptedVersions.add(v);
|
|
17506
|
+
return true;
|
|
17507
|
+
}
|
|
17508
|
+
return function isCompatible(globalVersion) {
|
|
17509
|
+
if (acceptedVersions.has(globalVersion)) {
|
|
17510
|
+
return true;
|
|
17511
|
+
}
|
|
17512
|
+
if (rejectedVersions.has(globalVersion)) {
|
|
17513
|
+
return false;
|
|
17514
|
+
}
|
|
17515
|
+
const globalVersionMatch = globalVersion.match(re);
|
|
17516
|
+
if (!globalVersionMatch) {
|
|
17517
|
+
return _reject(globalVersion);
|
|
17518
|
+
}
|
|
17519
|
+
const globalVersionParsed = {
|
|
17520
|
+
major: +globalVersionMatch[1],
|
|
17521
|
+
minor: +globalVersionMatch[2],
|
|
17522
|
+
patch: +globalVersionMatch[3],
|
|
17523
|
+
prerelease: globalVersionMatch[4]
|
|
17524
|
+
};
|
|
17525
|
+
if (globalVersionParsed.prerelease != null) {
|
|
17526
|
+
return _reject(globalVersion);
|
|
17527
|
+
}
|
|
17528
|
+
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
17529
|
+
return _reject(globalVersion);
|
|
17530
|
+
}
|
|
17531
|
+
if (ownVersionParsed.major === 0) {
|
|
17532
|
+
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
17533
|
+
return _accept(globalVersion);
|
|
17534
|
+
}
|
|
17535
|
+
return _reject(globalVersion);
|
|
17536
|
+
}
|
|
17537
|
+
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
17538
|
+
return _accept(globalVersion);
|
|
17539
|
+
}
|
|
17540
|
+
return _reject(globalVersion);
|
|
17541
|
+
};
|
|
17542
|
+
}
|
|
17543
|
+
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
|
|
17544
|
+
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
|
|
17545
|
+
});
|
|
17546
|
+
|
|
17547
|
+
// ../../node_modules/@opentelemetry/api/build/src/internal/global-utils.js
|
|
17548
|
+
var require_global_utils = __commonJS((exports) => {
|
|
17549
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17550
|
+
exports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = undefined;
|
|
17551
|
+
var version_1 = require_version();
|
|
17552
|
+
var semver_1 = require_semver();
|
|
17553
|
+
var major = version_1.VERSION.split(".")[0];
|
|
17554
|
+
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);
|
|
17555
|
+
var _global = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
17556
|
+
function registerGlobal(type, instance, diag, allowOverride = false) {
|
|
17557
|
+
var _a3;
|
|
17558
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a3 !== undefined ? _a3 : {
|
|
17559
|
+
version: version_1.VERSION
|
|
17560
|
+
};
|
|
17561
|
+
if (!allowOverride && api2[type]) {
|
|
17562
|
+
const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);
|
|
17563
|
+
diag.error(err.stack || err.message);
|
|
17564
|
+
return false;
|
|
17565
|
+
}
|
|
17566
|
+
if (api2.version !== version_1.VERSION) {
|
|
17567
|
+
const err = new Error(`@opentelemetry/api: Registration of version v${api2.version} for ${type} does not match previously registered API v${version_1.VERSION}`);
|
|
17568
|
+
diag.error(err.stack || err.message);
|
|
17569
|
+
return false;
|
|
17570
|
+
}
|
|
17571
|
+
api2[type] = instance;
|
|
17572
|
+
diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);
|
|
17573
|
+
return true;
|
|
17574
|
+
}
|
|
17575
|
+
exports.registerGlobal = registerGlobal;
|
|
17576
|
+
function getGlobal(type) {
|
|
17577
|
+
var _a3, _b;
|
|
17578
|
+
const globalVersion = (_a3 = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a3 === undefined ? undefined : _a3.version;
|
|
17579
|
+
if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {
|
|
17580
|
+
return;
|
|
17581
|
+
}
|
|
17582
|
+
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === undefined ? undefined : _b[type];
|
|
17583
|
+
}
|
|
17584
|
+
exports.getGlobal = getGlobal;
|
|
17585
|
+
function unregisterGlobal(type, diag) {
|
|
17586
|
+
diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);
|
|
17587
|
+
const api2 = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
17588
|
+
if (api2) {
|
|
17589
|
+
delete api2[type];
|
|
17590
|
+
}
|
|
17591
|
+
}
|
|
17592
|
+
exports.unregisterGlobal = unregisterGlobal;
|
|
17593
|
+
});
|
|
17594
|
+
|
|
17595
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/ComponentLogger.js
|
|
17596
|
+
var require_ComponentLogger = __commonJS((exports) => {
|
|
17597
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17598
|
+
exports.DiagComponentLogger = undefined;
|
|
17599
|
+
var global_utils_1 = require_global_utils();
|
|
17600
|
+
|
|
17601
|
+
class DiagComponentLogger {
|
|
17602
|
+
constructor(props) {
|
|
17603
|
+
this._namespace = props.namespace || "DiagComponentLogger";
|
|
17604
|
+
}
|
|
17605
|
+
debug(...args) {
|
|
17606
|
+
return logProxy("debug", this._namespace, args);
|
|
17607
|
+
}
|
|
17608
|
+
error(...args) {
|
|
17609
|
+
return logProxy("error", this._namespace, args);
|
|
17610
|
+
}
|
|
17611
|
+
info(...args) {
|
|
17612
|
+
return logProxy("info", this._namespace, args);
|
|
17613
|
+
}
|
|
17614
|
+
warn(...args) {
|
|
17615
|
+
return logProxy("warn", this._namespace, args);
|
|
17616
|
+
}
|
|
17617
|
+
verbose(...args) {
|
|
17618
|
+
return logProxy("verbose", this._namespace, args);
|
|
17619
|
+
}
|
|
17620
|
+
}
|
|
17621
|
+
exports.DiagComponentLogger = DiagComponentLogger;
|
|
17622
|
+
function logProxy(funcName, namespace, args) {
|
|
17623
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17624
|
+
if (!logger) {
|
|
17625
|
+
return;
|
|
17626
|
+
}
|
|
17627
|
+
return logger[funcName](namespace, ...args);
|
|
17628
|
+
}
|
|
17629
|
+
});
|
|
17630
|
+
|
|
17631
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/types.js
|
|
17632
|
+
var require_types = __commonJS((exports) => {
|
|
17633
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17634
|
+
exports.DiagLogLevel = undefined;
|
|
17635
|
+
var DiagLogLevel;
|
|
17636
|
+
(function(DiagLogLevel2) {
|
|
17637
|
+
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
17638
|
+
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
17639
|
+
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
17640
|
+
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
17641
|
+
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
17642
|
+
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
17643
|
+
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
17644
|
+
})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));
|
|
17645
|
+
});
|
|
17646
|
+
|
|
17647
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/internal/logLevelLogger.js
|
|
17648
|
+
var require_logLevelLogger = __commonJS((exports) => {
|
|
17649
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17650
|
+
exports.createLogLevelDiagLogger = undefined;
|
|
17651
|
+
var types_1 = require_types();
|
|
17652
|
+
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
17653
|
+
if (maxLevel < types_1.DiagLogLevel.NONE) {
|
|
17654
|
+
maxLevel = types_1.DiagLogLevel.NONE;
|
|
17655
|
+
} else if (maxLevel > types_1.DiagLogLevel.ALL) {
|
|
17656
|
+
maxLevel = types_1.DiagLogLevel.ALL;
|
|
17657
|
+
}
|
|
17658
|
+
logger = logger || {};
|
|
17659
|
+
function _filterFunc(funcName, theLevel) {
|
|
17660
|
+
const theFunc = logger[funcName];
|
|
17661
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
17662
|
+
return theFunc.bind(logger);
|
|
17663
|
+
}
|
|
17664
|
+
return function() {};
|
|
17665
|
+
}
|
|
17666
|
+
return {
|
|
17667
|
+
error: _filterFunc("error", types_1.DiagLogLevel.ERROR),
|
|
17668
|
+
warn: _filterFunc("warn", types_1.DiagLogLevel.WARN),
|
|
17669
|
+
info: _filterFunc("info", types_1.DiagLogLevel.INFO),
|
|
17670
|
+
debug: _filterFunc("debug", types_1.DiagLogLevel.DEBUG),
|
|
17671
|
+
verbose: _filterFunc("verbose", types_1.DiagLogLevel.VERBOSE)
|
|
17672
|
+
};
|
|
17673
|
+
}
|
|
17674
|
+
exports.createLogLevelDiagLogger = createLogLevelDiagLogger;
|
|
17675
|
+
});
|
|
17676
|
+
|
|
17677
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/diag.js
|
|
17678
|
+
var require_diag = __commonJS((exports) => {
|
|
17679
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17680
|
+
exports.DiagAPI = undefined;
|
|
17681
|
+
var ComponentLogger_1 = require_ComponentLogger();
|
|
17682
|
+
var logLevelLogger_1 = require_logLevelLogger();
|
|
17683
|
+
var types_1 = require_types();
|
|
17684
|
+
var global_utils_1 = require_global_utils();
|
|
17685
|
+
var API_NAME = "diag";
|
|
17686
|
+
|
|
17687
|
+
class DiagAPI {
|
|
17688
|
+
static instance() {
|
|
17689
|
+
if (!this._instance) {
|
|
17690
|
+
this._instance = new DiagAPI;
|
|
17691
|
+
}
|
|
17692
|
+
return this._instance;
|
|
17693
|
+
}
|
|
17694
|
+
constructor() {
|
|
17695
|
+
function _logProxy(funcName) {
|
|
17696
|
+
return function(...args) {
|
|
17697
|
+
const logger = (0, global_utils_1.getGlobal)("diag");
|
|
17698
|
+
if (!logger)
|
|
17699
|
+
return;
|
|
17700
|
+
return logger[funcName](...args);
|
|
17701
|
+
};
|
|
17702
|
+
}
|
|
17703
|
+
const self2 = this;
|
|
17704
|
+
const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {
|
|
17705
|
+
var _a3, _b, _c;
|
|
17706
|
+
if (logger === self2) {
|
|
17707
|
+
const err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
17708
|
+
self2.error((_a3 = err.stack) !== null && _a3 !== undefined ? _a3 : err.message);
|
|
17709
|
+
return false;
|
|
17710
|
+
}
|
|
17711
|
+
if (typeof optionsOrLogLevel === "number") {
|
|
17712
|
+
optionsOrLogLevel = {
|
|
17713
|
+
logLevel: optionsOrLogLevel
|
|
17714
|
+
};
|
|
17715
|
+
}
|
|
17716
|
+
const oldLogger = (0, global_utils_1.getGlobal)("diag");
|
|
17717
|
+
const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== undefined ? _b : types_1.DiagLogLevel.INFO, logger);
|
|
17718
|
+
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
17719
|
+
const stack = (_c = new Error().stack) !== null && _c !== undefined ? _c : "<failed to generate stacktrace>";
|
|
17720
|
+
oldLogger.warn(`Current logger will be overwritten from ${stack}`);
|
|
17721
|
+
newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);
|
|
17722
|
+
}
|
|
17723
|
+
return (0, global_utils_1.registerGlobal)("diag", newLogger, self2, true);
|
|
17724
|
+
};
|
|
17725
|
+
self2.setLogger = setLogger;
|
|
17726
|
+
self2.disable = () => {
|
|
17727
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, self2);
|
|
17728
|
+
};
|
|
17729
|
+
self2.createComponentLogger = (options) => {
|
|
17730
|
+
return new ComponentLogger_1.DiagComponentLogger(options);
|
|
17731
|
+
};
|
|
17732
|
+
self2.verbose = _logProxy("verbose");
|
|
17733
|
+
self2.debug = _logProxy("debug");
|
|
17734
|
+
self2.info = _logProxy("info");
|
|
17735
|
+
self2.warn = _logProxy("warn");
|
|
17736
|
+
self2.error = _logProxy("error");
|
|
17737
|
+
}
|
|
17738
|
+
}
|
|
17739
|
+
exports.DiagAPI = DiagAPI;
|
|
17740
|
+
});
|
|
17741
|
+
|
|
17742
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/baggage-impl.js
|
|
17743
|
+
var require_baggage_impl = __commonJS((exports) => {
|
|
17744
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17745
|
+
exports.BaggageImpl = undefined;
|
|
17746
|
+
|
|
17747
|
+
class BaggageImpl {
|
|
17748
|
+
constructor(entries) {
|
|
17749
|
+
this._entries = entries ? new Map(entries) : new Map;
|
|
17750
|
+
}
|
|
17751
|
+
getEntry(key) {
|
|
17752
|
+
const entry = this._entries.get(key);
|
|
17753
|
+
if (!entry) {
|
|
17754
|
+
return;
|
|
17755
|
+
}
|
|
17756
|
+
return Object.assign({}, entry);
|
|
17757
|
+
}
|
|
17758
|
+
getAllEntries() {
|
|
17759
|
+
return Array.from(this._entries.entries());
|
|
17760
|
+
}
|
|
17761
|
+
setEntry(key, entry) {
|
|
17762
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17763
|
+
newBaggage._entries.set(key, entry);
|
|
17764
|
+
return newBaggage;
|
|
17765
|
+
}
|
|
17766
|
+
removeEntry(key) {
|
|
17767
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17768
|
+
newBaggage._entries.delete(key);
|
|
17769
|
+
return newBaggage;
|
|
17770
|
+
}
|
|
17771
|
+
removeEntries(...keys) {
|
|
17772
|
+
const newBaggage = new BaggageImpl(this._entries);
|
|
17773
|
+
for (const key of keys) {
|
|
17774
|
+
newBaggage._entries.delete(key);
|
|
17775
|
+
}
|
|
17776
|
+
return newBaggage;
|
|
17777
|
+
}
|
|
17778
|
+
clear() {
|
|
17779
|
+
return new BaggageImpl;
|
|
17780
|
+
}
|
|
17781
|
+
}
|
|
17782
|
+
exports.BaggageImpl = BaggageImpl;
|
|
17783
|
+
});
|
|
17784
|
+
|
|
17785
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/internal/symbol.js
|
|
17786
|
+
var require_symbol = __commonJS((exports) => {
|
|
17787
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17788
|
+
exports.baggageEntryMetadataSymbol = undefined;
|
|
17789
|
+
exports.baggageEntryMetadataSymbol = Symbol("BaggageEntryMetadata");
|
|
17790
|
+
});
|
|
17791
|
+
|
|
17792
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/utils.js
|
|
17793
|
+
var require_utils = __commonJS((exports) => {
|
|
17794
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17795
|
+
exports.baggageEntryMetadataFromString = exports.createBaggage = undefined;
|
|
17796
|
+
var diag_1 = require_diag();
|
|
17797
|
+
var baggage_impl_1 = require_baggage_impl();
|
|
17798
|
+
var symbol_1 = require_symbol();
|
|
17799
|
+
var diag = diag_1.DiagAPI.instance();
|
|
17800
|
+
function createBaggage(entries = {}) {
|
|
17801
|
+
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
|
|
17802
|
+
}
|
|
17803
|
+
exports.createBaggage = createBaggage;
|
|
17804
|
+
function baggageEntryMetadataFromString(str) {
|
|
17805
|
+
if (typeof str !== "string") {
|
|
17806
|
+
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
|
|
17807
|
+
str = "";
|
|
17808
|
+
}
|
|
17809
|
+
return {
|
|
17810
|
+
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
|
|
17811
|
+
toString() {
|
|
17812
|
+
return str;
|
|
17813
|
+
}
|
|
17814
|
+
};
|
|
17815
|
+
}
|
|
17816
|
+
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
|
|
17817
|
+
});
|
|
17818
|
+
|
|
17819
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/context.js
|
|
17820
|
+
var require_context = __commonJS((exports) => {
|
|
17821
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17822
|
+
exports.ROOT_CONTEXT = exports.createContextKey = undefined;
|
|
17823
|
+
function createContextKey(description) {
|
|
17824
|
+
return Symbol.for(description);
|
|
17825
|
+
}
|
|
17826
|
+
exports.createContextKey = createContextKey;
|
|
17827
|
+
|
|
17828
|
+
class BaseContext {
|
|
17829
|
+
constructor(parentContext) {
|
|
17830
|
+
const self2 = this;
|
|
17831
|
+
self2._currentContext = parentContext ? new Map(parentContext) : new Map;
|
|
17832
|
+
self2.getValue = (key) => self2._currentContext.get(key);
|
|
17833
|
+
self2.setValue = (key, value) => {
|
|
17834
|
+
const context = new BaseContext(self2._currentContext);
|
|
17835
|
+
context._currentContext.set(key, value);
|
|
17836
|
+
return context;
|
|
17837
|
+
};
|
|
17838
|
+
self2.deleteValue = (key) => {
|
|
17839
|
+
const context = new BaseContext(self2._currentContext);
|
|
17840
|
+
context._currentContext.delete(key);
|
|
17841
|
+
return context;
|
|
17842
|
+
};
|
|
17843
|
+
}
|
|
17844
|
+
}
|
|
17845
|
+
exports.ROOT_CONTEXT = new BaseContext;
|
|
17846
|
+
});
|
|
17847
|
+
|
|
17848
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag/consoleLogger.js
|
|
17849
|
+
var require_consoleLogger = __commonJS((exports) => {
|
|
17850
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17851
|
+
exports.DiagConsoleLogger = exports._originalConsoleMethods = undefined;
|
|
17852
|
+
var consoleMap = [
|
|
17853
|
+
{ n: "error", c: "error" },
|
|
17854
|
+
{ n: "warn", c: "warn" },
|
|
17855
|
+
{ n: "info", c: "info" },
|
|
17856
|
+
{ n: "debug", c: "debug" },
|
|
17857
|
+
{ n: "verbose", c: "trace" }
|
|
17858
|
+
];
|
|
17859
|
+
exports._originalConsoleMethods = {};
|
|
17860
|
+
if (typeof console !== "undefined") {
|
|
17861
|
+
const keys = [
|
|
17862
|
+
"error",
|
|
17863
|
+
"warn",
|
|
17864
|
+
"info",
|
|
17865
|
+
"debug",
|
|
17866
|
+
"trace",
|
|
17867
|
+
"log"
|
|
17868
|
+
];
|
|
17869
|
+
for (const key of keys) {
|
|
17870
|
+
if (typeof console[key] === "function") {
|
|
17871
|
+
exports._originalConsoleMethods[key] = console[key];
|
|
17872
|
+
}
|
|
17873
|
+
}
|
|
17874
|
+
}
|
|
17875
|
+
|
|
17876
|
+
class DiagConsoleLogger {
|
|
17877
|
+
constructor() {
|
|
17878
|
+
function _consoleFunc(funcName) {
|
|
17879
|
+
return function(...args) {
|
|
17880
|
+
let theFunc = exports._originalConsoleMethods[funcName];
|
|
17881
|
+
if (typeof theFunc !== "function") {
|
|
17882
|
+
theFunc = exports._originalConsoleMethods["log"];
|
|
17883
|
+
}
|
|
17884
|
+
if (typeof theFunc !== "function" && console) {
|
|
17885
|
+
theFunc = console[funcName];
|
|
17886
|
+
if (typeof theFunc !== "function") {
|
|
17887
|
+
theFunc = console.log;
|
|
17888
|
+
}
|
|
17889
|
+
}
|
|
17890
|
+
if (typeof theFunc === "function") {
|
|
17891
|
+
return theFunc.apply(console, args);
|
|
17892
|
+
}
|
|
17893
|
+
};
|
|
17894
|
+
}
|
|
17895
|
+
for (let i = 0;i < consoleMap.length; i++) {
|
|
17896
|
+
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
|
|
17897
|
+
}
|
|
17898
|
+
}
|
|
17899
|
+
}
|
|
17900
|
+
exports.DiagConsoleLogger = DiagConsoleLogger;
|
|
17901
|
+
});
|
|
17902
|
+
|
|
17903
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeter.js
|
|
17904
|
+
var require_NoopMeter = __commonJS((exports) => {
|
|
17905
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17906
|
+
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;
|
|
17907
|
+
|
|
17908
|
+
class NoopMeter {
|
|
17909
|
+
constructor() {}
|
|
17910
|
+
createGauge(_name, _options) {
|
|
17911
|
+
return exports.NOOP_GAUGE_METRIC;
|
|
17912
|
+
}
|
|
17913
|
+
createHistogram(_name, _options) {
|
|
17914
|
+
return exports.NOOP_HISTOGRAM_METRIC;
|
|
17915
|
+
}
|
|
17916
|
+
createCounter(_name, _options) {
|
|
17917
|
+
return exports.NOOP_COUNTER_METRIC;
|
|
17918
|
+
}
|
|
17919
|
+
createUpDownCounter(_name, _options) {
|
|
17920
|
+
return exports.NOOP_UP_DOWN_COUNTER_METRIC;
|
|
17921
|
+
}
|
|
17922
|
+
createObservableGauge(_name, _options) {
|
|
17923
|
+
return exports.NOOP_OBSERVABLE_GAUGE_METRIC;
|
|
17924
|
+
}
|
|
17925
|
+
createObservableCounter(_name, _options) {
|
|
17926
|
+
return exports.NOOP_OBSERVABLE_COUNTER_METRIC;
|
|
17927
|
+
}
|
|
17928
|
+
createObservableUpDownCounter(_name, _options) {
|
|
17929
|
+
return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;
|
|
17930
|
+
}
|
|
17931
|
+
addBatchObservableCallback(_callback, _observables) {}
|
|
17932
|
+
removeBatchObservableCallback(_callback) {}
|
|
17933
|
+
}
|
|
17934
|
+
exports.NoopMeter = NoopMeter;
|
|
17935
|
+
|
|
17936
|
+
class NoopMetric {
|
|
17937
|
+
}
|
|
17938
|
+
exports.NoopMetric = NoopMetric;
|
|
17939
|
+
|
|
17940
|
+
class NoopCounterMetric extends NoopMetric {
|
|
17941
|
+
add(_value, _attributes) {}
|
|
17942
|
+
}
|
|
17943
|
+
exports.NoopCounterMetric = NoopCounterMetric;
|
|
17944
|
+
|
|
17945
|
+
class NoopUpDownCounterMetric extends NoopMetric {
|
|
17946
|
+
add(_value, _attributes) {}
|
|
17947
|
+
}
|
|
17948
|
+
exports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;
|
|
17949
|
+
|
|
17950
|
+
class NoopGaugeMetric extends NoopMetric {
|
|
17951
|
+
record(_value, _attributes) {}
|
|
17952
|
+
}
|
|
17953
|
+
exports.NoopGaugeMetric = NoopGaugeMetric;
|
|
17954
|
+
|
|
17955
|
+
class NoopHistogramMetric extends NoopMetric {
|
|
17956
|
+
record(_value, _attributes) {}
|
|
17957
|
+
}
|
|
17958
|
+
exports.NoopHistogramMetric = NoopHistogramMetric;
|
|
17959
|
+
|
|
17960
|
+
class NoopObservableMetric {
|
|
17961
|
+
addCallback(_callback) {}
|
|
17962
|
+
removeCallback(_callback) {}
|
|
17963
|
+
}
|
|
17964
|
+
exports.NoopObservableMetric = NoopObservableMetric;
|
|
17965
|
+
|
|
17966
|
+
class NoopObservableCounterMetric extends NoopObservableMetric {
|
|
17967
|
+
}
|
|
17968
|
+
exports.NoopObservableCounterMetric = NoopObservableCounterMetric;
|
|
17969
|
+
|
|
17970
|
+
class NoopObservableGaugeMetric extends NoopObservableMetric {
|
|
17971
|
+
}
|
|
17972
|
+
exports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;
|
|
17973
|
+
|
|
17974
|
+
class NoopObservableUpDownCounterMetric extends NoopObservableMetric {
|
|
17975
|
+
}
|
|
17976
|
+
exports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;
|
|
17977
|
+
exports.NOOP_METER = new NoopMeter;
|
|
17978
|
+
exports.NOOP_COUNTER_METRIC = new NoopCounterMetric;
|
|
17979
|
+
exports.NOOP_GAUGE_METRIC = new NoopGaugeMetric;
|
|
17980
|
+
exports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric;
|
|
17981
|
+
exports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric;
|
|
17982
|
+
exports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric;
|
|
17983
|
+
exports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric;
|
|
17984
|
+
exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric;
|
|
17985
|
+
function createNoopMeter() {
|
|
17986
|
+
return exports.NOOP_METER;
|
|
17987
|
+
}
|
|
17988
|
+
exports.createNoopMeter = createNoopMeter;
|
|
17989
|
+
});
|
|
17990
|
+
|
|
17991
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/Metric.js
|
|
17992
|
+
var require_Metric = __commonJS((exports) => {
|
|
17993
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17994
|
+
exports.ValueType = undefined;
|
|
17995
|
+
var ValueType;
|
|
17996
|
+
(function(ValueType2) {
|
|
17997
|
+
ValueType2[ValueType2["INT"] = 0] = "INT";
|
|
17998
|
+
ValueType2[ValueType2["DOUBLE"] = 1] = "DOUBLE";
|
|
17999
|
+
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
18000
|
+
});
|
|
18001
|
+
|
|
18002
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/TextMapPropagator.js
|
|
18003
|
+
var require_TextMapPropagator = __commonJS((exports) => {
|
|
18004
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18005
|
+
exports.defaultTextMapSetter = exports.defaultTextMapGetter = undefined;
|
|
18006
|
+
exports.defaultTextMapGetter = {
|
|
18007
|
+
get(carrier, key) {
|
|
18008
|
+
if (carrier == null) {
|
|
18009
|
+
return;
|
|
18010
|
+
}
|
|
18011
|
+
return carrier[key];
|
|
18012
|
+
},
|
|
18013
|
+
keys(carrier) {
|
|
18014
|
+
if (carrier == null) {
|
|
18015
|
+
return [];
|
|
18016
|
+
}
|
|
18017
|
+
return Object.keys(carrier);
|
|
18018
|
+
}
|
|
18019
|
+
};
|
|
18020
|
+
exports.defaultTextMapSetter = {
|
|
18021
|
+
set(carrier, key, value) {
|
|
18022
|
+
if (carrier == null) {
|
|
18023
|
+
return;
|
|
18024
|
+
}
|
|
18025
|
+
carrier[key] = value;
|
|
18026
|
+
}
|
|
18027
|
+
};
|
|
18028
|
+
});
|
|
18029
|
+
|
|
18030
|
+
// ../../node_modules/@opentelemetry/api/build/src/context/NoopContextManager.js
|
|
18031
|
+
var require_NoopContextManager = __commonJS((exports) => {
|
|
18032
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18033
|
+
exports.NoopContextManager = undefined;
|
|
18034
|
+
var context_1 = require_context();
|
|
18035
|
+
|
|
18036
|
+
class NoopContextManager {
|
|
18037
|
+
active() {
|
|
18038
|
+
return context_1.ROOT_CONTEXT;
|
|
18039
|
+
}
|
|
18040
|
+
with(_context, fn, thisArg, ...args) {
|
|
18041
|
+
return fn.call(thisArg, ...args);
|
|
18042
|
+
}
|
|
18043
|
+
bind(_context, target) {
|
|
18044
|
+
return target;
|
|
18045
|
+
}
|
|
18046
|
+
enable() {
|
|
18047
|
+
return this;
|
|
18048
|
+
}
|
|
18049
|
+
disable() {
|
|
18050
|
+
return this;
|
|
18051
|
+
}
|
|
18052
|
+
}
|
|
18053
|
+
exports.NoopContextManager = NoopContextManager;
|
|
18054
|
+
});
|
|
18055
|
+
|
|
18056
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/context.js
|
|
18057
|
+
var require_context2 = __commonJS((exports) => {
|
|
18058
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18059
|
+
exports.ContextAPI = undefined;
|
|
18060
|
+
var NoopContextManager_1 = require_NoopContextManager();
|
|
18061
|
+
var global_utils_1 = require_global_utils();
|
|
18062
|
+
var diag_1 = require_diag();
|
|
18063
|
+
var API_NAME = "context";
|
|
18064
|
+
var NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager;
|
|
18065
|
+
|
|
18066
|
+
class ContextAPI {
|
|
18067
|
+
constructor() {}
|
|
18068
|
+
static getInstance() {
|
|
18069
|
+
if (!this._instance) {
|
|
18070
|
+
this._instance = new ContextAPI;
|
|
18071
|
+
}
|
|
18072
|
+
return this._instance;
|
|
18073
|
+
}
|
|
18074
|
+
setGlobalContextManager(contextManager) {
|
|
18075
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());
|
|
18076
|
+
}
|
|
18077
|
+
active() {
|
|
18078
|
+
return this._getContextManager().active();
|
|
18079
|
+
}
|
|
18080
|
+
with(context, fn, thisArg, ...args) {
|
|
18081
|
+
return this._getContextManager().with(context, fn, thisArg, ...args);
|
|
18082
|
+
}
|
|
18083
|
+
bind(context, target) {
|
|
18084
|
+
return this._getContextManager().bind(context, target);
|
|
18085
|
+
}
|
|
18086
|
+
_getContextManager() {
|
|
18087
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;
|
|
18088
|
+
}
|
|
18089
|
+
disable() {
|
|
18090
|
+
this._getContextManager().disable();
|
|
18091
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18092
|
+
}
|
|
18093
|
+
}
|
|
18094
|
+
exports.ContextAPI = ContextAPI;
|
|
18095
|
+
});
|
|
18096
|
+
|
|
18097
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/trace_flags.js
|
|
18098
|
+
var require_trace_flags = __commonJS((exports) => {
|
|
18099
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18100
|
+
exports.TraceFlags = undefined;
|
|
18101
|
+
var TraceFlags;
|
|
18102
|
+
(function(TraceFlags2) {
|
|
18103
|
+
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
18104
|
+
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
18105
|
+
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
|
|
18106
|
+
});
|
|
18107
|
+
|
|
18108
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/invalid-span-constants.js
|
|
18109
|
+
var require_invalid_span_constants = __commonJS((exports) => {
|
|
18110
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18111
|
+
exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = undefined;
|
|
18112
|
+
var trace_flags_1 = require_trace_flags();
|
|
18113
|
+
exports.INVALID_SPANID = "0000000000000000";
|
|
18114
|
+
exports.INVALID_TRACEID = "00000000000000000000000000000000";
|
|
18115
|
+
exports.INVALID_SPAN_CONTEXT = {
|
|
18116
|
+
traceId: exports.INVALID_TRACEID,
|
|
18117
|
+
spanId: exports.INVALID_SPANID,
|
|
18118
|
+
traceFlags: trace_flags_1.TraceFlags.NONE
|
|
18119
|
+
};
|
|
18120
|
+
});
|
|
18121
|
+
|
|
18122
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NonRecordingSpan.js
|
|
18123
|
+
var require_NonRecordingSpan = __commonJS((exports) => {
|
|
18124
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18125
|
+
exports.NonRecordingSpan = undefined;
|
|
18126
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18127
|
+
|
|
18128
|
+
class NonRecordingSpan {
|
|
18129
|
+
constructor(spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
|
|
18130
|
+
this._spanContext = spanContext;
|
|
18131
|
+
}
|
|
18132
|
+
spanContext() {
|
|
18133
|
+
return this._spanContext;
|
|
18134
|
+
}
|
|
18135
|
+
setAttribute(_key, _value) {
|
|
18136
|
+
return this;
|
|
18137
|
+
}
|
|
18138
|
+
setAttributes(_attributes) {
|
|
18139
|
+
return this;
|
|
18140
|
+
}
|
|
18141
|
+
addEvent(_name, _attributes) {
|
|
18142
|
+
return this;
|
|
18143
|
+
}
|
|
18144
|
+
addLink(_link) {
|
|
18145
|
+
return this;
|
|
18146
|
+
}
|
|
18147
|
+
addLinks(_links) {
|
|
18148
|
+
return this;
|
|
18149
|
+
}
|
|
18150
|
+
setStatus(_status) {
|
|
18151
|
+
return this;
|
|
18152
|
+
}
|
|
18153
|
+
updateName(_name) {
|
|
18154
|
+
return this;
|
|
18155
|
+
}
|
|
18156
|
+
end(_endTime) {}
|
|
18157
|
+
isRecording() {
|
|
18158
|
+
return false;
|
|
18159
|
+
}
|
|
18160
|
+
recordException(_exception, _time) {}
|
|
18161
|
+
}
|
|
18162
|
+
exports.NonRecordingSpan = NonRecordingSpan;
|
|
18163
|
+
});
|
|
18164
|
+
|
|
18165
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/context-utils.js
|
|
18166
|
+
var require_context_utils = __commonJS((exports) => {
|
|
18167
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18168
|
+
exports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = undefined;
|
|
18169
|
+
var context_1 = require_context();
|
|
18170
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18171
|
+
var context_2 = require_context2();
|
|
18172
|
+
var SPAN_KEY = (0, context_1.createContextKey)("OpenTelemetry Context Key SPAN");
|
|
18173
|
+
function getSpan(context) {
|
|
18174
|
+
return context.getValue(SPAN_KEY) || undefined;
|
|
18175
|
+
}
|
|
18176
|
+
exports.getSpan = getSpan;
|
|
18177
|
+
function getActiveSpan() {
|
|
18178
|
+
return getSpan(context_2.ContextAPI.getInstance().active());
|
|
18179
|
+
}
|
|
18180
|
+
exports.getActiveSpan = getActiveSpan;
|
|
18181
|
+
function setSpan(context, span) {
|
|
18182
|
+
return context.setValue(SPAN_KEY, span);
|
|
18183
|
+
}
|
|
18184
|
+
exports.setSpan = setSpan;
|
|
18185
|
+
function deleteSpan(context) {
|
|
18186
|
+
return context.deleteValue(SPAN_KEY);
|
|
18187
|
+
}
|
|
18188
|
+
exports.deleteSpan = deleteSpan;
|
|
18189
|
+
function setSpanContext(context, spanContext) {
|
|
18190
|
+
return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));
|
|
18191
|
+
}
|
|
18192
|
+
exports.setSpanContext = setSpanContext;
|
|
18193
|
+
function getSpanContext(context) {
|
|
18194
|
+
var _a3;
|
|
18195
|
+
return (_a3 = getSpan(context)) === null || _a3 === undefined ? undefined : _a3.spanContext();
|
|
18196
|
+
}
|
|
18197
|
+
exports.getSpanContext = getSpanContext;
|
|
18198
|
+
});
|
|
18199
|
+
|
|
18200
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/spancontext-utils.js
|
|
18201
|
+
var require_spancontext_utils = __commonJS((exports) => {
|
|
18202
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18203
|
+
exports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = undefined;
|
|
18204
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18205
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18206
|
+
var isHex = new Uint8Array([
|
|
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
|
+
0,
|
|
18252
|
+
0,
|
|
18253
|
+
0,
|
|
18254
|
+
0,
|
|
18255
|
+
1,
|
|
18256
|
+
1,
|
|
18257
|
+
1,
|
|
18258
|
+
1,
|
|
18259
|
+
1,
|
|
18260
|
+
1,
|
|
18261
|
+
1,
|
|
18262
|
+
1,
|
|
18263
|
+
1,
|
|
18264
|
+
1,
|
|
18265
|
+
0,
|
|
18266
|
+
0,
|
|
18267
|
+
0,
|
|
18268
|
+
0,
|
|
18269
|
+
0,
|
|
18270
|
+
0,
|
|
18271
|
+
0,
|
|
18272
|
+
1,
|
|
18273
|
+
1,
|
|
18274
|
+
1,
|
|
18275
|
+
1,
|
|
18276
|
+
1,
|
|
18277
|
+
1,
|
|
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
|
+
0,
|
|
18301
|
+
0,
|
|
18302
|
+
0,
|
|
18303
|
+
0,
|
|
18304
|
+
1,
|
|
18305
|
+
1,
|
|
18306
|
+
1,
|
|
18307
|
+
1,
|
|
18308
|
+
1,
|
|
18309
|
+
1
|
|
18310
|
+
]);
|
|
18311
|
+
function isValidHex(id, length) {
|
|
18312
|
+
if (typeof id !== "string" || id.length !== length)
|
|
18313
|
+
return false;
|
|
18314
|
+
let r = 0;
|
|
18315
|
+
for (let i = 0;i < id.length; i += 4) {
|
|
18316
|
+
r += (isHex[id.charCodeAt(i)] | 0) + (isHex[id.charCodeAt(i + 1)] | 0) + (isHex[id.charCodeAt(i + 2)] | 0) + (isHex[id.charCodeAt(i + 3)] | 0);
|
|
18317
|
+
}
|
|
18318
|
+
return r === length;
|
|
18319
|
+
}
|
|
18320
|
+
function isValidTraceId(traceId) {
|
|
18321
|
+
return isValidHex(traceId, 32) && traceId !== invalid_span_constants_1.INVALID_TRACEID;
|
|
18322
|
+
}
|
|
18323
|
+
exports.isValidTraceId = isValidTraceId;
|
|
18324
|
+
function isValidSpanId(spanId) {
|
|
18325
|
+
return isValidHex(spanId, 16) && spanId !== invalid_span_constants_1.INVALID_SPANID;
|
|
18326
|
+
}
|
|
18327
|
+
exports.isValidSpanId = isValidSpanId;
|
|
18328
|
+
function isSpanContextValid(spanContext) {
|
|
18329
|
+
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
18330
|
+
}
|
|
18331
|
+
exports.isSpanContextValid = isSpanContextValid;
|
|
18332
|
+
function wrapSpanContext(spanContext) {
|
|
18333
|
+
return new NonRecordingSpan_1.NonRecordingSpan(spanContext);
|
|
18334
|
+
}
|
|
18335
|
+
exports.wrapSpanContext = wrapSpanContext;
|
|
18336
|
+
});
|
|
18337
|
+
|
|
18338
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracer.js
|
|
18339
|
+
var require_NoopTracer = __commonJS((exports) => {
|
|
18340
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18341
|
+
exports.NoopTracer = undefined;
|
|
18342
|
+
var context_1 = require_context2();
|
|
18343
|
+
var context_utils_1 = require_context_utils();
|
|
18344
|
+
var NonRecordingSpan_1 = require_NonRecordingSpan();
|
|
18345
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18346
|
+
var contextApi = context_1.ContextAPI.getInstance();
|
|
18347
|
+
|
|
18348
|
+
class NoopTracer {
|
|
18349
|
+
startSpan(name, options, context = contextApi.active()) {
|
|
18350
|
+
const root = Boolean(options === null || options === undefined ? undefined : options.root);
|
|
18351
|
+
if (root) {
|
|
18352
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18353
|
+
}
|
|
18354
|
+
const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);
|
|
18355
|
+
if (isSpanContext(parentFromContext) && (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {
|
|
18356
|
+
return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);
|
|
18357
|
+
} else {
|
|
18358
|
+
return new NonRecordingSpan_1.NonRecordingSpan;
|
|
18359
|
+
}
|
|
18360
|
+
}
|
|
18361
|
+
startActiveSpan(name, arg2, arg3, arg4) {
|
|
18362
|
+
let opts;
|
|
18363
|
+
let ctx;
|
|
18364
|
+
let fn;
|
|
18365
|
+
if (arguments.length < 2) {
|
|
18366
|
+
return;
|
|
18367
|
+
} else if (arguments.length === 2) {
|
|
18368
|
+
fn = arg2;
|
|
18369
|
+
} else if (arguments.length === 3) {
|
|
18370
|
+
opts = arg2;
|
|
18371
|
+
fn = arg3;
|
|
18372
|
+
} else {
|
|
18373
|
+
opts = arg2;
|
|
18374
|
+
ctx = arg3;
|
|
18375
|
+
fn = arg4;
|
|
18376
|
+
}
|
|
18377
|
+
const parentContext = ctx !== null && ctx !== undefined ? ctx : contextApi.active();
|
|
18378
|
+
const span = this.startSpan(name, opts, parentContext);
|
|
18379
|
+
const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);
|
|
18380
|
+
return contextApi.with(contextWithSpanSet, fn, undefined, span);
|
|
18381
|
+
}
|
|
18382
|
+
}
|
|
18383
|
+
exports.NoopTracer = NoopTracer;
|
|
18384
|
+
function isSpanContext(spanContext) {
|
|
18385
|
+
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";
|
|
18386
|
+
}
|
|
18387
|
+
});
|
|
18388
|
+
|
|
18389
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracer.js
|
|
18390
|
+
var require_ProxyTracer = __commonJS((exports) => {
|
|
18391
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18392
|
+
exports.ProxyTracer = undefined;
|
|
18393
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18394
|
+
var NOOP_TRACER = new NoopTracer_1.NoopTracer;
|
|
18395
|
+
|
|
18396
|
+
class ProxyTracer {
|
|
18397
|
+
constructor(provider, name, version2, options) {
|
|
18398
|
+
this._provider = provider;
|
|
18399
|
+
this.name = name;
|
|
18400
|
+
this.version = version2;
|
|
18401
|
+
this.options = options;
|
|
18402
|
+
}
|
|
18403
|
+
startSpan(name, options, context) {
|
|
18404
|
+
return this._getTracer().startSpan(name, options, context);
|
|
18405
|
+
}
|
|
18406
|
+
startActiveSpan(_name, _options, _context, _fn) {
|
|
18407
|
+
const tracer = this._getTracer();
|
|
18408
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
18409
|
+
}
|
|
18410
|
+
_getTracer() {
|
|
18411
|
+
if (this._delegate) {
|
|
18412
|
+
return this._delegate;
|
|
18413
|
+
}
|
|
18414
|
+
const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
18415
|
+
if (!tracer) {
|
|
18416
|
+
return NOOP_TRACER;
|
|
18417
|
+
}
|
|
18418
|
+
this._delegate = tracer;
|
|
18419
|
+
return this._delegate;
|
|
18420
|
+
}
|
|
18421
|
+
}
|
|
18422
|
+
exports.ProxyTracer = ProxyTracer;
|
|
18423
|
+
});
|
|
18424
|
+
|
|
18425
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/NoopTracerProvider.js
|
|
18426
|
+
var require_NoopTracerProvider = __commonJS((exports) => {
|
|
18427
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18428
|
+
exports.NoopTracerProvider = undefined;
|
|
18429
|
+
var NoopTracer_1 = require_NoopTracer();
|
|
18430
|
+
|
|
18431
|
+
class NoopTracerProvider {
|
|
18432
|
+
getTracer(_name, _version, _options) {
|
|
18433
|
+
return new NoopTracer_1.NoopTracer;
|
|
18434
|
+
}
|
|
18435
|
+
}
|
|
18436
|
+
exports.NoopTracerProvider = NoopTracerProvider;
|
|
18437
|
+
});
|
|
18438
|
+
|
|
18439
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/ProxyTracerProvider.js
|
|
18440
|
+
var require_ProxyTracerProvider = __commonJS((exports) => {
|
|
18441
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18442
|
+
exports.ProxyTracerProvider = undefined;
|
|
18443
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18444
|
+
var NoopTracerProvider_1 = require_NoopTracerProvider();
|
|
18445
|
+
var NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider;
|
|
18446
|
+
|
|
18447
|
+
class ProxyTracerProvider {
|
|
18448
|
+
getTracer(name, version2, options) {
|
|
18449
|
+
var _a3;
|
|
18450
|
+
return (_a3 = this.getDelegateTracer(name, version2, options)) !== null && _a3 !== undefined ? _a3 : new ProxyTracer_1.ProxyTracer(this, name, version2, options);
|
|
18451
|
+
}
|
|
18452
|
+
getDelegate() {
|
|
18453
|
+
var _a3;
|
|
18454
|
+
return (_a3 = this._delegate) !== null && _a3 !== undefined ? _a3 : NOOP_TRACER_PROVIDER;
|
|
18455
|
+
}
|
|
18456
|
+
setDelegate(delegate) {
|
|
18457
|
+
this._delegate = delegate;
|
|
18458
|
+
}
|
|
18459
|
+
getDelegateTracer(name, version2, options) {
|
|
18460
|
+
var _a3;
|
|
18461
|
+
return (_a3 = this._delegate) === null || _a3 === undefined ? undefined : _a3.getTracer(name, version2, options);
|
|
18462
|
+
}
|
|
18463
|
+
}
|
|
18464
|
+
exports.ProxyTracerProvider = ProxyTracerProvider;
|
|
18465
|
+
});
|
|
18466
|
+
|
|
18467
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/SamplingResult.js
|
|
18468
|
+
var require_SamplingResult = __commonJS((exports) => {
|
|
18469
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18470
|
+
exports.SamplingDecision = undefined;
|
|
18471
|
+
var SamplingDecision;
|
|
18472
|
+
(function(SamplingDecision2) {
|
|
18473
|
+
SamplingDecision2[SamplingDecision2["NOT_RECORD"] = 0] = "NOT_RECORD";
|
|
18474
|
+
SamplingDecision2[SamplingDecision2["RECORD"] = 1] = "RECORD";
|
|
18475
|
+
SamplingDecision2[SamplingDecision2["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
|
|
18476
|
+
})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));
|
|
18477
|
+
});
|
|
18478
|
+
|
|
18479
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/span_kind.js
|
|
18480
|
+
var require_span_kind = __commonJS((exports) => {
|
|
18481
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18482
|
+
exports.SpanKind = undefined;
|
|
18483
|
+
var SpanKind;
|
|
18484
|
+
(function(SpanKind2) {
|
|
18485
|
+
SpanKind2[SpanKind2["INTERNAL"] = 0] = "INTERNAL";
|
|
18486
|
+
SpanKind2[SpanKind2["SERVER"] = 1] = "SERVER";
|
|
18487
|
+
SpanKind2[SpanKind2["CLIENT"] = 2] = "CLIENT";
|
|
18488
|
+
SpanKind2[SpanKind2["PRODUCER"] = 3] = "PRODUCER";
|
|
18489
|
+
SpanKind2[SpanKind2["CONSUMER"] = 4] = "CONSUMER";
|
|
18490
|
+
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
|
|
18491
|
+
});
|
|
18492
|
+
|
|
18493
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/status.js
|
|
18494
|
+
var require_status = __commonJS((exports) => {
|
|
18495
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18496
|
+
exports.SpanStatusCode = undefined;
|
|
18497
|
+
var SpanStatusCode;
|
|
18498
|
+
(function(SpanStatusCode2) {
|
|
18499
|
+
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
18500
|
+
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
18501
|
+
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
18502
|
+
})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));
|
|
18503
|
+
});
|
|
18504
|
+
|
|
18505
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-validators.js
|
|
18506
|
+
var require_tracestate_validators = __commonJS((exports) => {
|
|
18507
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18508
|
+
exports.validateValue = exports.validateKey = undefined;
|
|
18509
|
+
var VALID_KEY_CHAR_RANGE = "[_0-9a-z-*/]";
|
|
18510
|
+
var VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;
|
|
18511
|
+
var VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;
|
|
18512
|
+
var VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);
|
|
18513
|
+
var VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;
|
|
18514
|
+
var INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;
|
|
18515
|
+
function validateKey(key) {
|
|
18516
|
+
return VALID_KEY_REGEX.test(key);
|
|
18517
|
+
}
|
|
18518
|
+
exports.validateKey = validateKey;
|
|
18519
|
+
function validateValue(value) {
|
|
18520
|
+
return VALID_VALUE_BASE_REGEX.test(value) && !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value);
|
|
18521
|
+
}
|
|
18522
|
+
exports.validateValue = validateValue;
|
|
18523
|
+
});
|
|
18524
|
+
|
|
18525
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/tracestate-impl.js
|
|
18526
|
+
var require_tracestate_impl = __commonJS((exports) => {
|
|
18527
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18528
|
+
exports.TraceStateImpl = undefined;
|
|
18529
|
+
var tracestate_validators_1 = require_tracestate_validators();
|
|
18530
|
+
var MAX_TRACE_STATE_ITEMS = 32;
|
|
18531
|
+
var MAX_TRACE_STATE_LEN = 512;
|
|
18532
|
+
var LIST_MEMBERS_SEPARATOR = ",";
|
|
18533
|
+
var LIST_MEMBER_KEY_VALUE_SPLITTER = "=";
|
|
18534
|
+
|
|
18535
|
+
class TraceStateImpl {
|
|
18536
|
+
constructor(rawTraceState) {
|
|
18537
|
+
this._internalState = new Map;
|
|
18538
|
+
if (rawTraceState)
|
|
18539
|
+
this._parse(rawTraceState);
|
|
18540
|
+
}
|
|
18541
|
+
set(key, value) {
|
|
18542
|
+
const traceState = this._clone();
|
|
18543
|
+
if (traceState._internalState.has(key)) {
|
|
18544
|
+
traceState._internalState.delete(key);
|
|
18545
|
+
}
|
|
18546
|
+
traceState._internalState.set(key, value);
|
|
18547
|
+
return traceState;
|
|
18548
|
+
}
|
|
18549
|
+
unset(key) {
|
|
18550
|
+
const traceState = this._clone();
|
|
18551
|
+
traceState._internalState.delete(key);
|
|
18552
|
+
return traceState;
|
|
18553
|
+
}
|
|
18554
|
+
get(key) {
|
|
18555
|
+
return this._internalState.get(key);
|
|
18556
|
+
}
|
|
18557
|
+
serialize() {
|
|
18558
|
+
return Array.from(this._internalState.keys()).reduceRight((agg, key) => {
|
|
18559
|
+
agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));
|
|
18560
|
+
return agg;
|
|
18561
|
+
}, []).join(LIST_MEMBERS_SEPARATOR);
|
|
18562
|
+
}
|
|
18563
|
+
_parse(rawTraceState) {
|
|
18564
|
+
if (rawTraceState.length > MAX_TRACE_STATE_LEN)
|
|
18565
|
+
return;
|
|
18566
|
+
this._internalState = rawTraceState.split(LIST_MEMBERS_SEPARATOR).reduceRight((agg, part) => {
|
|
18567
|
+
const listMember = part.trim();
|
|
18568
|
+
const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);
|
|
18569
|
+
if (i !== -1) {
|
|
18570
|
+
const key = listMember.slice(0, i);
|
|
18571
|
+
const value = listMember.slice(i + 1, part.length);
|
|
18572
|
+
if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {
|
|
18573
|
+
agg.set(key, value);
|
|
18574
|
+
}
|
|
18575
|
+
}
|
|
18576
|
+
return agg;
|
|
18577
|
+
}, new Map);
|
|
18578
|
+
if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {
|
|
18579
|
+
this._internalState = new Map(Array.from(this._internalState.entries()).reverse().slice(0, MAX_TRACE_STATE_ITEMS));
|
|
18580
|
+
}
|
|
18581
|
+
}
|
|
18582
|
+
_keys() {
|
|
18583
|
+
return Array.from(this._internalState.keys()).reverse();
|
|
18584
|
+
}
|
|
18585
|
+
_clone() {
|
|
18586
|
+
const traceState = new TraceStateImpl;
|
|
18587
|
+
traceState._internalState = new Map(this._internalState);
|
|
18588
|
+
return traceState;
|
|
18589
|
+
}
|
|
18590
|
+
}
|
|
18591
|
+
exports.TraceStateImpl = TraceStateImpl;
|
|
18592
|
+
});
|
|
18593
|
+
|
|
18594
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace/internal/utils.js
|
|
18595
|
+
var require_utils2 = __commonJS((exports) => {
|
|
18596
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18597
|
+
exports.createTraceState = undefined;
|
|
18598
|
+
var tracestate_impl_1 = require_tracestate_impl();
|
|
18599
|
+
function createTraceState(rawTraceState) {
|
|
18600
|
+
return new tracestate_impl_1.TraceStateImpl(rawTraceState);
|
|
18601
|
+
}
|
|
18602
|
+
exports.createTraceState = createTraceState;
|
|
18603
|
+
});
|
|
18604
|
+
|
|
18605
|
+
// ../../node_modules/@opentelemetry/api/build/src/context-api.js
|
|
18606
|
+
var require_context_api = __commonJS((exports) => {
|
|
18607
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18608
|
+
exports.context = undefined;
|
|
18609
|
+
var context_1 = require_context2();
|
|
18610
|
+
exports.context = context_1.ContextAPI.getInstance();
|
|
18611
|
+
});
|
|
18612
|
+
|
|
18613
|
+
// ../../node_modules/@opentelemetry/api/build/src/diag-api.js
|
|
18614
|
+
var require_diag_api = __commonJS((exports) => {
|
|
18615
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18616
|
+
exports.diag = undefined;
|
|
18617
|
+
var diag_1 = require_diag();
|
|
18618
|
+
exports.diag = diag_1.DiagAPI.instance();
|
|
18619
|
+
});
|
|
18620
|
+
|
|
18621
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics/NoopMeterProvider.js
|
|
18622
|
+
var require_NoopMeterProvider = __commonJS((exports) => {
|
|
18623
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18624
|
+
exports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = undefined;
|
|
18625
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18626
|
+
|
|
18627
|
+
class NoopMeterProvider {
|
|
18628
|
+
getMeter(_name, _version, _options) {
|
|
18629
|
+
return NoopMeter_1.NOOP_METER;
|
|
18630
|
+
}
|
|
18631
|
+
}
|
|
18632
|
+
exports.NoopMeterProvider = NoopMeterProvider;
|
|
18633
|
+
exports.NOOP_METER_PROVIDER = new NoopMeterProvider;
|
|
18634
|
+
});
|
|
18635
|
+
|
|
18636
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/metrics.js
|
|
18637
|
+
var require_metrics = __commonJS((exports) => {
|
|
18638
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18639
|
+
exports.MetricsAPI = undefined;
|
|
18640
|
+
var NoopMeterProvider_1 = require_NoopMeterProvider();
|
|
18641
|
+
var global_utils_1 = require_global_utils();
|
|
18642
|
+
var diag_1 = require_diag();
|
|
18643
|
+
var API_NAME = "metrics";
|
|
18644
|
+
|
|
18645
|
+
class MetricsAPI {
|
|
18646
|
+
constructor() {}
|
|
18647
|
+
static getInstance() {
|
|
18648
|
+
if (!this._instance) {
|
|
18649
|
+
this._instance = new MetricsAPI;
|
|
18650
|
+
}
|
|
18651
|
+
return this._instance;
|
|
18652
|
+
}
|
|
18653
|
+
setGlobalMeterProvider(provider) {
|
|
18654
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());
|
|
18655
|
+
}
|
|
18656
|
+
getMeterProvider() {
|
|
18657
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;
|
|
18658
|
+
}
|
|
18659
|
+
getMeter(name, version2, options) {
|
|
18660
|
+
return this.getMeterProvider().getMeter(name, version2, options);
|
|
18661
|
+
}
|
|
18662
|
+
disable() {
|
|
18663
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18664
|
+
}
|
|
18665
|
+
}
|
|
18666
|
+
exports.MetricsAPI = MetricsAPI;
|
|
18667
|
+
});
|
|
18668
|
+
|
|
18669
|
+
// ../../node_modules/@opentelemetry/api/build/src/metrics-api.js
|
|
18670
|
+
var require_metrics_api = __commonJS((exports) => {
|
|
18671
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18672
|
+
exports.metrics = undefined;
|
|
18673
|
+
var metrics_1 = require_metrics();
|
|
18674
|
+
exports.metrics = metrics_1.MetricsAPI.getInstance();
|
|
18675
|
+
});
|
|
18676
|
+
|
|
18677
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation/NoopTextMapPropagator.js
|
|
18678
|
+
var require_NoopTextMapPropagator = __commonJS((exports) => {
|
|
18679
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18680
|
+
exports.NoopTextMapPropagator = undefined;
|
|
18681
|
+
|
|
18682
|
+
class NoopTextMapPropagator {
|
|
18683
|
+
inject(_context, _carrier) {}
|
|
18684
|
+
extract(context, _carrier) {
|
|
18685
|
+
return context;
|
|
18686
|
+
}
|
|
18687
|
+
fields() {
|
|
18688
|
+
return [];
|
|
18689
|
+
}
|
|
18690
|
+
}
|
|
18691
|
+
exports.NoopTextMapPropagator = NoopTextMapPropagator;
|
|
18692
|
+
});
|
|
18693
|
+
|
|
18694
|
+
// ../../node_modules/@opentelemetry/api/build/src/baggage/context-helpers.js
|
|
18695
|
+
var require_context_helpers = __commonJS((exports) => {
|
|
18696
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18697
|
+
exports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = undefined;
|
|
18698
|
+
var context_1 = require_context2();
|
|
18699
|
+
var context_2 = require_context();
|
|
18700
|
+
var BAGGAGE_KEY = (0, context_2.createContextKey)("OpenTelemetry Baggage Key");
|
|
18701
|
+
function getBaggage(context) {
|
|
18702
|
+
return context.getValue(BAGGAGE_KEY) || undefined;
|
|
18703
|
+
}
|
|
18704
|
+
exports.getBaggage = getBaggage;
|
|
18705
|
+
function getActiveBaggage() {
|
|
18706
|
+
return getBaggage(context_1.ContextAPI.getInstance().active());
|
|
18707
|
+
}
|
|
18708
|
+
exports.getActiveBaggage = getActiveBaggage;
|
|
18709
|
+
function setBaggage(context, baggage) {
|
|
18710
|
+
return context.setValue(BAGGAGE_KEY, baggage);
|
|
18711
|
+
}
|
|
18712
|
+
exports.setBaggage = setBaggage;
|
|
18713
|
+
function deleteBaggage(context) {
|
|
18714
|
+
return context.deleteValue(BAGGAGE_KEY);
|
|
18715
|
+
}
|
|
18716
|
+
exports.deleteBaggage = deleteBaggage;
|
|
18717
|
+
});
|
|
18718
|
+
|
|
18719
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/propagation.js
|
|
18720
|
+
var require_propagation = __commonJS((exports) => {
|
|
18721
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18722
|
+
exports.PropagationAPI = undefined;
|
|
18723
|
+
var global_utils_1 = require_global_utils();
|
|
18724
|
+
var NoopTextMapPropagator_1 = require_NoopTextMapPropagator();
|
|
18725
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18726
|
+
var context_helpers_1 = require_context_helpers();
|
|
18727
|
+
var utils_1 = require_utils();
|
|
18728
|
+
var diag_1 = require_diag();
|
|
18729
|
+
var API_NAME = "propagation";
|
|
18730
|
+
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator;
|
|
18731
|
+
|
|
18732
|
+
class PropagationAPI {
|
|
18733
|
+
constructor() {
|
|
18734
|
+
this.createBaggage = utils_1.createBaggage;
|
|
18735
|
+
this.getBaggage = context_helpers_1.getBaggage;
|
|
18736
|
+
this.getActiveBaggage = context_helpers_1.getActiveBaggage;
|
|
18737
|
+
this.setBaggage = context_helpers_1.setBaggage;
|
|
18738
|
+
this.deleteBaggage = context_helpers_1.deleteBaggage;
|
|
18739
|
+
}
|
|
18740
|
+
static getInstance() {
|
|
18741
|
+
if (!this._instance) {
|
|
18742
|
+
this._instance = new PropagationAPI;
|
|
18743
|
+
}
|
|
18744
|
+
return this._instance;
|
|
18745
|
+
}
|
|
18746
|
+
setGlobalPropagator(propagator) {
|
|
18747
|
+
return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());
|
|
18748
|
+
}
|
|
18749
|
+
inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {
|
|
18750
|
+
return this._getGlobalPropagator().inject(context, carrier, setter);
|
|
18751
|
+
}
|
|
18752
|
+
extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {
|
|
18753
|
+
return this._getGlobalPropagator().extract(context, carrier, getter);
|
|
18754
|
+
}
|
|
18755
|
+
fields() {
|
|
18756
|
+
return this._getGlobalPropagator().fields();
|
|
18757
|
+
}
|
|
18758
|
+
disable() {
|
|
18759
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18760
|
+
}
|
|
18761
|
+
_getGlobalPropagator() {
|
|
18762
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
18763
|
+
}
|
|
18764
|
+
}
|
|
18765
|
+
exports.PropagationAPI = PropagationAPI;
|
|
18766
|
+
});
|
|
18767
|
+
|
|
18768
|
+
// ../../node_modules/@opentelemetry/api/build/src/propagation-api.js
|
|
18769
|
+
var require_propagation_api = __commonJS((exports) => {
|
|
18770
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18771
|
+
exports.propagation = undefined;
|
|
18772
|
+
var propagation_1 = require_propagation();
|
|
18773
|
+
exports.propagation = propagation_1.PropagationAPI.getInstance();
|
|
18774
|
+
});
|
|
18775
|
+
|
|
18776
|
+
// ../../node_modules/@opentelemetry/api/build/src/api/trace.js
|
|
18777
|
+
var require_trace = __commonJS((exports) => {
|
|
18778
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18779
|
+
exports.TraceAPI = undefined;
|
|
18780
|
+
var global_utils_1 = require_global_utils();
|
|
18781
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18782
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18783
|
+
var context_utils_1 = require_context_utils();
|
|
18784
|
+
var diag_1 = require_diag();
|
|
18785
|
+
var API_NAME = "trace";
|
|
18786
|
+
|
|
18787
|
+
class TraceAPI {
|
|
18788
|
+
constructor() {
|
|
18789
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18790
|
+
this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;
|
|
18791
|
+
this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;
|
|
18792
|
+
this.deleteSpan = context_utils_1.deleteSpan;
|
|
18793
|
+
this.getSpan = context_utils_1.getSpan;
|
|
18794
|
+
this.getActiveSpan = context_utils_1.getActiveSpan;
|
|
18795
|
+
this.getSpanContext = context_utils_1.getSpanContext;
|
|
18796
|
+
this.setSpan = context_utils_1.setSpan;
|
|
18797
|
+
this.setSpanContext = context_utils_1.setSpanContext;
|
|
18798
|
+
}
|
|
18799
|
+
static getInstance() {
|
|
18800
|
+
if (!this._instance) {
|
|
18801
|
+
this._instance = new TraceAPI;
|
|
18802
|
+
}
|
|
18803
|
+
return this._instance;
|
|
18804
|
+
}
|
|
18805
|
+
setGlobalTracerProvider(provider) {
|
|
18806
|
+
const success3 = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());
|
|
18807
|
+
if (success3) {
|
|
18808
|
+
this._proxyTracerProvider.setDelegate(provider);
|
|
18809
|
+
}
|
|
18810
|
+
return success3;
|
|
18811
|
+
}
|
|
18812
|
+
getTracerProvider() {
|
|
18813
|
+
return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;
|
|
18814
|
+
}
|
|
18815
|
+
getTracer(name, version2) {
|
|
18816
|
+
return this.getTracerProvider().getTracer(name, version2);
|
|
18817
|
+
}
|
|
18818
|
+
disable() {
|
|
18819
|
+
(0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());
|
|
18820
|
+
this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18821
|
+
}
|
|
18822
|
+
}
|
|
18823
|
+
exports.TraceAPI = TraceAPI;
|
|
18824
|
+
});
|
|
18825
|
+
|
|
18826
|
+
// ../../node_modules/@opentelemetry/api/build/src/trace-api.js
|
|
18827
|
+
var require_trace_api = __commonJS((exports) => {
|
|
18828
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18829
|
+
exports.trace = undefined;
|
|
18830
|
+
var trace_1 = require_trace();
|
|
18831
|
+
exports.trace = trace_1.TraceAPI.getInstance();
|
|
18832
|
+
});
|
|
18833
|
+
|
|
18834
|
+
// ../../node_modules/@opentelemetry/api/build/src/index.js
|
|
18835
|
+
var require_src = __commonJS((exports) => {
|
|
18836
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18837
|
+
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;
|
|
18838
|
+
var utils_1 = require_utils();
|
|
18839
|
+
Object.defineProperty(exports, "baggageEntryMetadataFromString", { enumerable: true, get: function() {
|
|
18840
|
+
return utils_1.baggageEntryMetadataFromString;
|
|
18841
|
+
} });
|
|
18842
|
+
var context_1 = require_context();
|
|
18843
|
+
Object.defineProperty(exports, "createContextKey", { enumerable: true, get: function() {
|
|
18844
|
+
return context_1.createContextKey;
|
|
18845
|
+
} });
|
|
18846
|
+
Object.defineProperty(exports, "ROOT_CONTEXT", { enumerable: true, get: function() {
|
|
18847
|
+
return context_1.ROOT_CONTEXT;
|
|
18848
|
+
} });
|
|
18849
|
+
var consoleLogger_1 = require_consoleLogger();
|
|
18850
|
+
Object.defineProperty(exports, "DiagConsoleLogger", { enumerable: true, get: function() {
|
|
18851
|
+
return consoleLogger_1.DiagConsoleLogger;
|
|
18852
|
+
} });
|
|
18853
|
+
var types_1 = require_types();
|
|
18854
|
+
Object.defineProperty(exports, "DiagLogLevel", { enumerable: true, get: function() {
|
|
18855
|
+
return types_1.DiagLogLevel;
|
|
18856
|
+
} });
|
|
18857
|
+
var NoopMeter_1 = require_NoopMeter();
|
|
18858
|
+
Object.defineProperty(exports, "createNoopMeter", { enumerable: true, get: function() {
|
|
18859
|
+
return NoopMeter_1.createNoopMeter;
|
|
18860
|
+
} });
|
|
18861
|
+
var Metric_1 = require_Metric();
|
|
18862
|
+
Object.defineProperty(exports, "ValueType", { enumerable: true, get: function() {
|
|
18863
|
+
return Metric_1.ValueType;
|
|
18864
|
+
} });
|
|
18865
|
+
var TextMapPropagator_1 = require_TextMapPropagator();
|
|
18866
|
+
Object.defineProperty(exports, "defaultTextMapGetter", { enumerable: true, get: function() {
|
|
18867
|
+
return TextMapPropagator_1.defaultTextMapGetter;
|
|
18868
|
+
} });
|
|
18869
|
+
Object.defineProperty(exports, "defaultTextMapSetter", { enumerable: true, get: function() {
|
|
18870
|
+
return TextMapPropagator_1.defaultTextMapSetter;
|
|
18871
|
+
} });
|
|
18872
|
+
var ProxyTracer_1 = require_ProxyTracer();
|
|
18873
|
+
Object.defineProperty(exports, "ProxyTracer", { enumerable: true, get: function() {
|
|
18874
|
+
return ProxyTracer_1.ProxyTracer;
|
|
18875
|
+
} });
|
|
18876
|
+
var ProxyTracerProvider_1 = require_ProxyTracerProvider();
|
|
18877
|
+
Object.defineProperty(exports, "ProxyTracerProvider", { enumerable: true, get: function() {
|
|
18878
|
+
return ProxyTracerProvider_1.ProxyTracerProvider;
|
|
18879
|
+
} });
|
|
18880
|
+
var SamplingResult_1 = require_SamplingResult();
|
|
18881
|
+
Object.defineProperty(exports, "SamplingDecision", { enumerable: true, get: function() {
|
|
18882
|
+
return SamplingResult_1.SamplingDecision;
|
|
18883
|
+
} });
|
|
18884
|
+
var span_kind_1 = require_span_kind();
|
|
18885
|
+
Object.defineProperty(exports, "SpanKind", { enumerable: true, get: function() {
|
|
18886
|
+
return span_kind_1.SpanKind;
|
|
18887
|
+
} });
|
|
18888
|
+
var status_1 = require_status();
|
|
18889
|
+
Object.defineProperty(exports, "SpanStatusCode", { enumerable: true, get: function() {
|
|
18890
|
+
return status_1.SpanStatusCode;
|
|
18891
|
+
} });
|
|
18892
|
+
var trace_flags_1 = require_trace_flags();
|
|
18893
|
+
Object.defineProperty(exports, "TraceFlags", { enumerable: true, get: function() {
|
|
18894
|
+
return trace_flags_1.TraceFlags;
|
|
18895
|
+
} });
|
|
18896
|
+
var utils_2 = require_utils2();
|
|
18897
|
+
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function() {
|
|
18898
|
+
return utils_2.createTraceState;
|
|
18899
|
+
} });
|
|
18900
|
+
var spancontext_utils_1 = require_spancontext_utils();
|
|
18901
|
+
Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function() {
|
|
18902
|
+
return spancontext_utils_1.isSpanContextValid;
|
|
18903
|
+
} });
|
|
18904
|
+
Object.defineProperty(exports, "isValidTraceId", { enumerable: true, get: function() {
|
|
18905
|
+
return spancontext_utils_1.isValidTraceId;
|
|
18906
|
+
} });
|
|
18907
|
+
Object.defineProperty(exports, "isValidSpanId", { enumerable: true, get: function() {
|
|
18908
|
+
return spancontext_utils_1.isValidSpanId;
|
|
18909
|
+
} });
|
|
18910
|
+
var invalid_span_constants_1 = require_invalid_span_constants();
|
|
18911
|
+
Object.defineProperty(exports, "INVALID_SPANID", { enumerable: true, get: function() {
|
|
18912
|
+
return invalid_span_constants_1.INVALID_SPANID;
|
|
18913
|
+
} });
|
|
18914
|
+
Object.defineProperty(exports, "INVALID_TRACEID", { enumerable: true, get: function() {
|
|
18915
|
+
return invalid_span_constants_1.INVALID_TRACEID;
|
|
18916
|
+
} });
|
|
18917
|
+
Object.defineProperty(exports, "INVALID_SPAN_CONTEXT", { enumerable: true, get: function() {
|
|
18918
|
+
return invalid_span_constants_1.INVALID_SPAN_CONTEXT;
|
|
18919
|
+
} });
|
|
18920
|
+
var context_api_1 = require_context_api();
|
|
18921
|
+
Object.defineProperty(exports, "context", { enumerable: true, get: function() {
|
|
18922
|
+
return context_api_1.context;
|
|
18923
|
+
} });
|
|
18924
|
+
var diag_api_1 = require_diag_api();
|
|
18925
|
+
Object.defineProperty(exports, "diag", { enumerable: true, get: function() {
|
|
18926
|
+
return diag_api_1.diag;
|
|
18927
|
+
} });
|
|
18928
|
+
var metrics_api_1 = require_metrics_api();
|
|
18929
|
+
Object.defineProperty(exports, "metrics", { enumerable: true, get: function() {
|
|
18930
|
+
return metrics_api_1.metrics;
|
|
18931
|
+
} });
|
|
18932
|
+
var propagation_api_1 = require_propagation_api();
|
|
18933
|
+
Object.defineProperty(exports, "propagation", { enumerable: true, get: function() {
|
|
18934
|
+
return propagation_api_1.propagation;
|
|
18935
|
+
} });
|
|
18936
|
+
var trace_api_1 = require_trace_api();
|
|
18937
|
+
Object.defineProperty(exports, "trace", { enumerable: true, get: function() {
|
|
18938
|
+
return trace_api_1.trace;
|
|
18939
|
+
} });
|
|
18940
|
+
exports.default = {
|
|
18941
|
+
context: context_api_1.context,
|
|
18942
|
+
diag: diag_api_1.diag,
|
|
18943
|
+
metrics: metrics_api_1.metrics,
|
|
18944
|
+
propagation: propagation_api_1.propagation,
|
|
18945
|
+
trace: trace_api_1.trace
|
|
18946
|
+
};
|
|
18947
|
+
});
|
|
18948
|
+
|
|
18949
|
+
// ../types/src/processor/processor.ts
|
|
18950
|
+
var import_api, noopTracingContext, ProcessorPortSchema, ProcessorDefinitionSchema, ProcessorExecutionContextSchema, TraceStatus;
|
|
18951
|
+
var init_processor = __esm(() => {
|
|
18952
|
+
init_zod();
|
|
18953
|
+
init_common();
|
|
18954
|
+
import_api = __toESM(require_src(), 1);
|
|
18955
|
+
noopTracingContext = {
|
|
18956
|
+
traceId: "",
|
|
18957
|
+
getActiveSpan() {
|
|
18958
|
+
return;
|
|
18959
|
+
},
|
|
18960
|
+
async withSpan(_name, _options, fn) {
|
|
18961
|
+
const noopSpan = {
|
|
18962
|
+
spanContext: () => ({
|
|
18963
|
+
traceId: "",
|
|
18964
|
+
spanId: "",
|
|
18965
|
+
traceFlags: 0
|
|
18966
|
+
}),
|
|
18967
|
+
setAttribute: () => noopSpan,
|
|
18968
|
+
setAttributes: () => noopSpan,
|
|
18969
|
+
addEvent: () => noopSpan,
|
|
18970
|
+
addLink: () => noopSpan,
|
|
18971
|
+
addLinks: () => noopSpan,
|
|
18972
|
+
setStatus: () => noopSpan,
|
|
18973
|
+
updateName: () => noopSpan,
|
|
18974
|
+
end: () => {},
|
|
18975
|
+
isRecording: () => false,
|
|
18976
|
+
recordException: () => {}
|
|
18977
|
+
};
|
|
18978
|
+
return fn(noopSpan);
|
|
18979
|
+
}
|
|
18980
|
+
};
|
|
18981
|
+
ProcessorPortSchema = exports_external.object({
|
|
18982
|
+
name: exports_external.string(),
|
|
18983
|
+
schema: JsonSchemaSchema,
|
|
18984
|
+
required: exports_external.boolean().default(true)
|
|
18985
|
+
});
|
|
18986
|
+
ProcessorDefinitionSchema = exports_external.object({
|
|
18987
|
+
id: exports_external.string(),
|
|
18988
|
+
name: exports_external.string(),
|
|
18989
|
+
description: exports_external.string().optional(),
|
|
18990
|
+
inputSchema: JsonSchemaSchema,
|
|
18991
|
+
outputSchema: JsonSchemaSchema,
|
|
18992
|
+
configSchema: JsonSchemaSchema.optional(),
|
|
18993
|
+
inputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18994
|
+
outputPorts: exports_external.array(ProcessorPortSchema).optional(),
|
|
18995
|
+
isBuiltin: exports_external.boolean().default(true),
|
|
18996
|
+
pluginName: exports_external.string().optional()
|
|
18997
|
+
});
|
|
18998
|
+
ProcessorExecutionContextSchema = exports_external.object({
|
|
18999
|
+
jobId: exports_external.string(),
|
|
19000
|
+
stepId: exports_external.string(),
|
|
19001
|
+
tenantId: exports_external.string(),
|
|
19002
|
+
automationId: exports_external.string().optional(),
|
|
19003
|
+
workflowId: exports_external.string(),
|
|
19004
|
+
workerId: exports_external.string().optional()
|
|
19005
|
+
});
|
|
19006
|
+
((TraceStatus2) => {
|
|
19007
|
+
TraceStatus2["PENDING"] = "pending";
|
|
19008
|
+
TraceStatus2["RUNNING"] = "running";
|
|
19009
|
+
TraceStatus2["COMPLETED"] = "completed";
|
|
19010
|
+
TraceStatus2["FAILED"] = "failed";
|
|
19011
|
+
})(TraceStatus ||= {});
|
|
19012
|
+
});
|
|
19013
|
+
|
|
19014
|
+
// ../types/src/processor/execution.ts
|
|
19015
|
+
function asTuple(values) {
|
|
19016
|
+
return values;
|
|
19017
|
+
}
|
|
19018
|
+
var WorkflowExecutionStatusValue, WorkflowExecutionStatusSchema, StepExecutionStatusValue, StepExecutionStatusSchema, TriggerTypeValue, TriggerTypeSchema, ExecutionTypeValue, ExecutionTypeSchema, WORKFLOW_EXECUTION_STATUSES, STEP_EXECUTION_STATUSES, TRIGGER_TYPES, EXECUTION_TYPES;
|
|
19019
|
+
var init_execution = __esm(() => {
|
|
19020
|
+
init_zod();
|
|
19021
|
+
WorkflowExecutionStatusValue = {
|
|
19022
|
+
CREATED: "created",
|
|
19023
|
+
PENDING: "pending",
|
|
19024
|
+
RUNNING: "running",
|
|
19025
|
+
WAITING: "waiting",
|
|
19026
|
+
COMPLETED: "completed",
|
|
19027
|
+
FAILED: "failed",
|
|
19028
|
+
CANCELLED: "cancelled"
|
|
19029
|
+
};
|
|
19030
|
+
WorkflowExecutionStatusSchema = exports_external.enum([
|
|
19031
|
+
WorkflowExecutionStatusValue.CREATED,
|
|
19032
|
+
WorkflowExecutionStatusValue.PENDING,
|
|
19033
|
+
WorkflowExecutionStatusValue.RUNNING,
|
|
19034
|
+
WorkflowExecutionStatusValue.WAITING,
|
|
19035
|
+
WorkflowExecutionStatusValue.COMPLETED,
|
|
19036
|
+
WorkflowExecutionStatusValue.FAILED,
|
|
19037
|
+
WorkflowExecutionStatusValue.CANCELLED
|
|
19038
|
+
]);
|
|
19039
|
+
StepExecutionStatusValue = {
|
|
19040
|
+
PENDING: "pending",
|
|
19041
|
+
RUNNING: "running",
|
|
19042
|
+
SUCCESS: "success",
|
|
19043
|
+
FAILURE: "failure",
|
|
19044
|
+
WAITING: "waiting",
|
|
19045
|
+
SKIPPED: "skipped"
|
|
19046
|
+
};
|
|
19047
|
+
StepExecutionStatusSchema = exports_external.enum([
|
|
19048
|
+
StepExecutionStatusValue.PENDING,
|
|
19049
|
+
StepExecutionStatusValue.RUNNING,
|
|
19050
|
+
StepExecutionStatusValue.SUCCESS,
|
|
19051
|
+
StepExecutionStatusValue.FAILURE,
|
|
19052
|
+
StepExecutionStatusValue.WAITING,
|
|
19053
|
+
StepExecutionStatusValue.SKIPPED
|
|
19054
|
+
]);
|
|
19055
|
+
TriggerTypeValue = {
|
|
19056
|
+
MANUAL: "manual",
|
|
19057
|
+
API: "api",
|
|
19058
|
+
WEBHOOK: "webhook",
|
|
19059
|
+
SCHEDULE: "schedule",
|
|
19060
|
+
EMAIL: "email",
|
|
19061
|
+
EVAL: "eval",
|
|
19062
|
+
CLI: "cli"
|
|
19063
|
+
};
|
|
19064
|
+
TriggerTypeSchema = exports_external.enum([
|
|
19065
|
+
TriggerTypeValue.MANUAL,
|
|
19066
|
+
TriggerTypeValue.API,
|
|
19067
|
+
TriggerTypeValue.WEBHOOK,
|
|
19068
|
+
TriggerTypeValue.SCHEDULE,
|
|
19069
|
+
TriggerTypeValue.EMAIL,
|
|
19070
|
+
TriggerTypeValue.EVAL,
|
|
19071
|
+
TriggerTypeValue.CLI
|
|
19072
|
+
]);
|
|
19073
|
+
ExecutionTypeValue = {
|
|
19074
|
+
PROD: "prod",
|
|
19075
|
+
EVAL: "eval",
|
|
19076
|
+
PLAYGROUND: "playground"
|
|
19077
|
+
};
|
|
19078
|
+
ExecutionTypeSchema = exports_external.enum([
|
|
19079
|
+
ExecutionTypeValue.PROD,
|
|
19080
|
+
ExecutionTypeValue.EVAL,
|
|
19081
|
+
ExecutionTypeValue.PLAYGROUND
|
|
19082
|
+
]);
|
|
19083
|
+
WORKFLOW_EXECUTION_STATUSES = asTuple(WorkflowExecutionStatusSchema.options);
|
|
19084
|
+
STEP_EXECUTION_STATUSES = asTuple(StepExecutionStatusSchema.options);
|
|
19085
|
+
TRIGGER_TYPES = TriggerTypeSchema.options;
|
|
19086
|
+
EXECUTION_TYPES = ExecutionTypeSchema.options;
|
|
19087
|
+
});
|
|
19088
|
+
|
|
19089
|
+
// ../types/src/processor/configs/classify.ts
|
|
19090
|
+
var ClassifyInputSchema, ClassifyLabelSchema, ClassifyConfigSchema, ClassifyOutputSchema;
|
|
19091
|
+
var init_classify = __esm(() => {
|
|
19092
|
+
init_zod();
|
|
19093
|
+
ClassifyInputSchema = exports_external.object({
|
|
19094
|
+
content: exports_external.string().optional().describe("Text content to classify"),
|
|
19095
|
+
text: exports_external.string().optional().describe("Text content (alternative to content)")
|
|
19096
|
+
}).refine((data) => !!(data.content || data.text), {
|
|
19097
|
+
message: "Either content or text must be provided"
|
|
19098
|
+
});
|
|
19099
|
+
ClassifyLabelSchema = exports_external.object({
|
|
19100
|
+
name: exports_external.string().min(1).describe("Label value returned in output.label"),
|
|
19101
|
+
description: exports_external.string().optional().describe("What documents fall into this label. Fed to the LLM as guidance.")
|
|
19102
|
+
});
|
|
19103
|
+
ClassifyConfigSchema = exports_external.object({
|
|
19104
|
+
labels: exports_external.array(ClassifyLabelSchema).min(2).describe("Allowed labels. The LLM is constrained to pick exactly one of these names."),
|
|
19105
|
+
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."),
|
|
19106
|
+
provider: exports_external.string().optional().describe('Provider ID (e.g., "openai-gpt4o-mini")'),
|
|
19107
|
+
model: exports_external.string().optional().describe("Model override"),
|
|
19108
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text when exceeded. Omit for no limit.")
|
|
19109
|
+
});
|
|
19110
|
+
ClassifyOutputSchema = exports_external.object({
|
|
19111
|
+
label: exports_external.string().describe("The selected label name"),
|
|
19112
|
+
confidence: exports_external.enum(["low", "medium", "high"]).describe("Coarse confidence in the classification"),
|
|
19113
|
+
reason: exports_external.string().describe("Short justification for the chosen label")
|
|
19114
|
+
});
|
|
19115
|
+
});
|
|
19116
|
+
|
|
19117
|
+
// ../types/src/parser/parser.ts
|
|
19118
|
+
function resolveEffectiveMimeType(filename, declaredMimeType) {
|
|
19119
|
+
const ext = filename.split(".").pop()?.toLowerCase();
|
|
19120
|
+
if (!ext)
|
|
19121
|
+
return declaredMimeType;
|
|
19122
|
+
const extensionMime = EXTENSION_TO_MIME[ext];
|
|
19123
|
+
return extensionMime ?? declaredMimeType;
|
|
19124
|
+
}
|
|
19125
|
+
function mimeTypeForExtension(extension) {
|
|
19126
|
+
return EXTENSION_TO_MIME[extension.replace(/^\./, "").toLowerCase()];
|
|
19127
|
+
}
|
|
19128
|
+
function extensionForMimeType(mimeType) {
|
|
19129
|
+
const base = mimeType.split(";")[0]?.trim().toLowerCase();
|
|
19130
|
+
return base ? MIME_TO_EXTENSION[base] : undefined;
|
|
19131
|
+
}
|
|
19132
|
+
function getParserCategory(mimeType) {
|
|
19133
|
+
const normalized = mimeType.toLowerCase().trim();
|
|
19134
|
+
if (ParserCategory.PLAINTEXT.includes(normalized)) {
|
|
19135
|
+
return "plaintext";
|
|
19136
|
+
}
|
|
19137
|
+
if (ParserCategory.OFFICE.includes(normalized)) {
|
|
19138
|
+
return "office";
|
|
19139
|
+
}
|
|
19140
|
+
if (ParserCategory.DOCUMENT.includes(normalized)) {
|
|
19141
|
+
return "document";
|
|
19142
|
+
}
|
|
19143
|
+
return null;
|
|
19144
|
+
}
|
|
19145
|
+
function requiresSpecializedParser(mimeType) {
|
|
19146
|
+
return getParserCategory(mimeType) === "document";
|
|
19147
|
+
}
|
|
19148
|
+
function getAllSupportedMimeTypes() {
|
|
19149
|
+
return [...ParserCategory.PLAINTEXT, ...ParserCategory.OFFICE, ...ParserCategory.DOCUMENT];
|
|
19150
|
+
}
|
|
19151
|
+
function getSupportedFormatsLabel() {
|
|
19152
|
+
const allMimes = getAllSupportedMimeTypes();
|
|
19153
|
+
const labels = [...new Set(allMimes.map((m) => MIME_TO_LABEL[m] ?? m))];
|
|
19154
|
+
return labels.join(", ");
|
|
19155
|
+
}
|
|
19156
|
+
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;
|
|
19157
|
+
var init_parser = __esm(() => {
|
|
19158
|
+
init_zod();
|
|
19159
|
+
OFFICE_MIME_TYPES = [
|
|
19160
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19161
|
+
"application/msword",
|
|
19162
|
+
"application/vnd.oasis.opendocument.text",
|
|
19163
|
+
"application/rtf",
|
|
19164
|
+
"text/rtf",
|
|
19165
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19166
|
+
"application/vnd.ms-excel",
|
|
19167
|
+
"application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19168
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19169
|
+
"application/vnd.oasis.opendocument.spreadsheet",
|
|
19170
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19171
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19172
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19173
|
+
"application/vnd.ms-powerpoint",
|
|
19174
|
+
"application/vnd.oasis.opendocument.presentation",
|
|
19175
|
+
"message/rfc822",
|
|
19176
|
+
"application/vnd.ms-outlook",
|
|
19177
|
+
"application/epub+zip"
|
|
19178
|
+
];
|
|
19179
|
+
ParserCategory = {
|
|
19180
|
+
PLAINTEXT: [
|
|
19181
|
+
"text/plain",
|
|
19182
|
+
"text/markdown",
|
|
19183
|
+
"text/csv",
|
|
19184
|
+
"text/tab-separated-values",
|
|
19185
|
+
"text/html",
|
|
19186
|
+
"text/xml",
|
|
19187
|
+
"application/json",
|
|
19188
|
+
"application/x-yaml",
|
|
19189
|
+
"application/toml",
|
|
19190
|
+
"image/svg+xml",
|
|
19191
|
+
"text/x-rst",
|
|
19192
|
+
"text/x-org",
|
|
19193
|
+
"application/x-latex",
|
|
19194
|
+
"application/x-ipynb+json",
|
|
19195
|
+
"application/x-bibtex",
|
|
19196
|
+
"application/docbook+xml",
|
|
19197
|
+
"application/x-fictionbook+xml"
|
|
19198
|
+
],
|
|
19199
|
+
OFFICE: [...OFFICE_MIME_TYPES],
|
|
19200
|
+
DOCUMENT: [
|
|
19201
|
+
"application/pdf",
|
|
19202
|
+
"image/png",
|
|
19203
|
+
"image/jpeg",
|
|
19204
|
+
"image/webp",
|
|
19205
|
+
"image/tiff",
|
|
19206
|
+
"image/gif",
|
|
19207
|
+
"image/bmp"
|
|
19208
|
+
]
|
|
19209
|
+
};
|
|
19210
|
+
ParserTypeSchema = exports_external.enum([
|
|
19211
|
+
"plaintext",
|
|
19212
|
+
"office",
|
|
19213
|
+
"llm-vision",
|
|
19214
|
+
"ocr"
|
|
19215
|
+
]);
|
|
19216
|
+
DocumentMetadataSchema = exports_external.object({
|
|
19217
|
+
filename: exports_external.string(),
|
|
19218
|
+
mimeType: exports_external.string(),
|
|
19219
|
+
size: exports_external.number().describe("File size in bytes"),
|
|
19220
|
+
storageRef: exports_external.string().optional().describe("Storage reference for the original file")
|
|
19221
|
+
});
|
|
19222
|
+
ParseUsageSchema = exports_external.object({
|
|
19223
|
+
pageCount: exports_external.number(),
|
|
19224
|
+
processingTimeMs: exports_external.number().optional()
|
|
19225
|
+
});
|
|
19226
|
+
CoordinateUnitSchema = exports_external.enum(["pixel", "inch", "point", "normalized"]);
|
|
19227
|
+
PointSchema = exports_external.object({
|
|
19228
|
+
x: exports_external.number(),
|
|
19229
|
+
y: exports_external.number()
|
|
19230
|
+
});
|
|
19231
|
+
BoundingRegionSchema = exports_external.object({
|
|
19232
|
+
polygon: exports_external.array(PointSchema).min(3),
|
|
19233
|
+
unit: CoordinateUnitSchema,
|
|
19234
|
+
pageIndex: exports_external.number()
|
|
19235
|
+
});
|
|
19236
|
+
PositionedTextSchema = exports_external.object({
|
|
19237
|
+
text: exports_external.string(),
|
|
19238
|
+
confidence: exports_external.number().min(0).max(1).optional(),
|
|
19239
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19240
|
+
});
|
|
19241
|
+
TableCellSchema = exports_external.object({
|
|
19242
|
+
content: exports_external.string(),
|
|
19243
|
+
rowIndex: exports_external.number(),
|
|
19244
|
+
columnIndex: exports_external.number(),
|
|
19245
|
+
rowSpan: exports_external.number().default(1),
|
|
19246
|
+
columnSpan: exports_external.number().default(1),
|
|
19247
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19248
|
+
});
|
|
19249
|
+
ExtractedTableSchema = exports_external.object({
|
|
19250
|
+
cells: exports_external.array(TableCellSchema),
|
|
19251
|
+
rowCount: exports_external.number(),
|
|
19252
|
+
columnCount: exports_external.number(),
|
|
19253
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19254
|
+
});
|
|
19255
|
+
LayoutElementTypeSchema = exports_external.enum([
|
|
19256
|
+
"paragraph",
|
|
19257
|
+
"title",
|
|
19258
|
+
"sectionHeading",
|
|
19259
|
+
"pageHeader",
|
|
19260
|
+
"pageFooter",
|
|
19261
|
+
"pageNumber",
|
|
19262
|
+
"footnote",
|
|
19263
|
+
"table",
|
|
19264
|
+
"figure",
|
|
19265
|
+
"formulaBlock"
|
|
19266
|
+
]);
|
|
19267
|
+
LayoutElementSchema = exports_external.object({
|
|
19268
|
+
type: LayoutElementTypeSchema,
|
|
19269
|
+
content: exports_external.string(),
|
|
19270
|
+
table: ExtractedTableSchema.optional(),
|
|
19271
|
+
caption: exports_external.string().optional(),
|
|
19272
|
+
figureId: exports_external.string().optional(),
|
|
19273
|
+
boundingRegion: BoundingRegionSchema.optional()
|
|
19274
|
+
});
|
|
19275
|
+
PageResultSchema = exports_external.object({
|
|
19276
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19277
|
+
text: exports_external.string().describe("Extracted text content (markdown/HTML)"),
|
|
19278
|
+
pageName: exports_external.string().optional().describe("Page/sheet name (e.g., Excel sheet name)"),
|
|
19279
|
+
layoutElements: exports_external.array(LayoutElementSchema).optional().describe("Semantic layout elements in reading order"),
|
|
19280
|
+
words: exports_external.array(PositionedTextSchema).optional().describe("Word-level positions"),
|
|
19281
|
+
lines: exports_external.array(PositionedTextSchema).optional().describe("Line-level positions"),
|
|
19282
|
+
tables: exports_external.array(ExtractedTableSchema).optional().describe("Extracted tables"),
|
|
19283
|
+
width: exports_external.number().optional().describe("Page width"),
|
|
19284
|
+
height: exports_external.number().optional().describe("Page height"),
|
|
19285
|
+
unit: CoordinateUnitSchema.optional().describe("Unit for width/height and bounding regions"),
|
|
19286
|
+
confidence: exports_external.number().min(0).max(1).optional().describe("Overall page confidence")
|
|
19287
|
+
});
|
|
19288
|
+
ParseResultSchema = exports_external.object({
|
|
19289
|
+
document: DocumentMetadataSchema,
|
|
19290
|
+
usage: ParseUsageSchema,
|
|
19291
|
+
pages: exports_external.array(PageResultSchema),
|
|
19292
|
+
text: exports_external.string().describe("Combined text from all pages"),
|
|
19293
|
+
parserType: ParserTypeSchema,
|
|
19294
|
+
parserVersion: exports_external.string().optional(),
|
|
19295
|
+
model: exports_external.string().optional().describe("Model used (for LLM/OCR parsers)"),
|
|
19296
|
+
rawResponse: exports_external.unknown().optional()
|
|
19297
|
+
});
|
|
19298
|
+
ParseOptionsSchema = exports_external.object({
|
|
19299
|
+
outputFormat: exports_external.enum(["plain", "markdown", "djot", "html"]).default("markdown"),
|
|
19300
|
+
ocrProvider: exports_external.string().optional().describe("OCR provider ID to use"),
|
|
19301
|
+
includeWordPositions: exports_external.boolean().default(false),
|
|
19302
|
+
includeLinePositions: exports_external.boolean().default(false),
|
|
19303
|
+
extractTables: exports_external.boolean().default(true),
|
|
19304
|
+
provider: exports_external.string().optional().describe("LLM provider ID to use"),
|
|
19305
|
+
model: exports_external.string().optional(),
|
|
19306
|
+
maxConcurrency: exports_external.number().min(1).max(30).default(3),
|
|
19307
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5),
|
|
19308
|
+
pdfRenderScale: exports_external.number().min(1).max(4).default(1).describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19309
|
+
imageQuality: exports_external.number().int().min(1).max(100).default(85).describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19310
|
+
prompt: exports_external.string().optional().describe("Custom prompt for LLM-based parsing"),
|
|
19311
|
+
languages: exports_external.array(exports_external.string()).optional().describe("OCR language hints"),
|
|
19312
|
+
tenantId: exports_external.string().optional()
|
|
19313
|
+
});
|
|
19314
|
+
ParserInputSchema = exports_external.object({
|
|
19315
|
+
data: exports_external.instanceof(Buffer).or(exports_external.instanceof(Uint8Array)),
|
|
19316
|
+
filename: exports_external.string(),
|
|
19317
|
+
mimeType: exports_external.string(),
|
|
19318
|
+
options: ParseOptionsSchema.optional()
|
|
19319
|
+
});
|
|
19320
|
+
EXTENSION_TO_MIME = {
|
|
19321
|
+
docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19322
|
+
doc: "application/msword",
|
|
19323
|
+
odt: "application/vnd.oasis.opendocument.text",
|
|
19324
|
+
rtf: "application/rtf",
|
|
19325
|
+
xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
19326
|
+
xls: "application/vnd.ms-excel",
|
|
19327
|
+
xlsm: "application/vnd.ms-excel.sheet.macroenabled.12",
|
|
19328
|
+
xlsb: "application/vnd.ms-excel.sheet.binary.macroenabled.12",
|
|
19329
|
+
ods: "application/vnd.oasis.opendocument.spreadsheet",
|
|
19330
|
+
pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
19331
|
+
ppsx: "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
|
|
19332
|
+
pptm: "application/vnd.ms-powerpoint.presentation.macroenabled.12",
|
|
19333
|
+
ppt: "application/vnd.ms-powerpoint",
|
|
19334
|
+
odp: "application/vnd.oasis.opendocument.presentation",
|
|
19335
|
+
eml: "message/rfc822",
|
|
19336
|
+
msg: "application/vnd.ms-outlook",
|
|
19337
|
+
epub: "application/epub+zip",
|
|
19338
|
+
pdf: "application/pdf",
|
|
19339
|
+
png: "image/png",
|
|
19340
|
+
jpg: "image/jpeg",
|
|
19341
|
+
jpeg: "image/jpeg",
|
|
19342
|
+
webp: "image/webp",
|
|
19343
|
+
tiff: "image/tiff",
|
|
19344
|
+
tif: "image/tiff",
|
|
19345
|
+
gif: "image/gif",
|
|
19346
|
+
bmp: "image/bmp",
|
|
19347
|
+
svg: "image/svg+xml",
|
|
19348
|
+
txt: "text/plain",
|
|
19349
|
+
md: "text/markdown",
|
|
19350
|
+
markdown: "text/markdown",
|
|
19351
|
+
csv: "text/csv",
|
|
19352
|
+
tsv: "text/tab-separated-values",
|
|
19353
|
+
html: "text/html",
|
|
19354
|
+
htm: "text/html",
|
|
19355
|
+
xml: "text/xml",
|
|
19356
|
+
json: "application/json",
|
|
19357
|
+
yaml: "application/x-yaml",
|
|
19358
|
+
yml: "application/x-yaml",
|
|
19359
|
+
toml: "application/toml",
|
|
19360
|
+
rst: "text/x-rst",
|
|
19361
|
+
org: "text/x-org",
|
|
19362
|
+
tex: "application/x-latex",
|
|
19363
|
+
latex: "application/x-latex",
|
|
19364
|
+
ipynb: "application/x-ipynb+json",
|
|
19365
|
+
bib: "application/x-bibtex",
|
|
19366
|
+
dbk: "application/docbook+xml",
|
|
19367
|
+
docbook: "application/docbook+xml",
|
|
19368
|
+
fb2: "application/x-fictionbook+xml"
|
|
19369
|
+
};
|
|
19370
|
+
MIME_TO_EXTENSION = Object.entries(EXTENSION_TO_MIME).reduce((acc, [ext, mime]) => {
|
|
19371
|
+
if (!(mime in acc))
|
|
19372
|
+
acc[mime] = ext;
|
|
19373
|
+
return acc;
|
|
19374
|
+
}, {});
|
|
19375
|
+
MIME_TO_LABEL = {
|
|
19376
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
19377
|
+
"application/msword": "DOC",
|
|
19378
|
+
"application/vnd.oasis.opendocument.text": "ODT",
|
|
19379
|
+
"application/rtf": "RTF",
|
|
19380
|
+
"text/rtf": "RTF",
|
|
19381
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
19382
|
+
"application/vnd.ms-excel": "XLS",
|
|
19383
|
+
"application/vnd.ms-excel.sheet.macroenabled.12": "XLSM",
|
|
19384
|
+
"application/vnd.ms-excel.sheet.binary.macroenabled.12": "XLSB",
|
|
19385
|
+
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
|
|
19386
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "PPTX",
|
|
19387
|
+
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "PPSX",
|
|
19388
|
+
"application/vnd.ms-powerpoint.presentation.macroenabled.12": "PPTM",
|
|
19389
|
+
"application/vnd.ms-powerpoint": "PPT",
|
|
19390
|
+
"application/vnd.oasis.opendocument.presentation": "ODP",
|
|
19391
|
+
"message/rfc822": "EML",
|
|
19392
|
+
"application/vnd.ms-outlook": "MSG",
|
|
19393
|
+
"application/epub+zip": "EPUB",
|
|
19394
|
+
"application/pdf": "PDF",
|
|
19395
|
+
"image/png": "PNG",
|
|
19396
|
+
"image/jpeg": "JPEG",
|
|
19397
|
+
"image/webp": "WebP",
|
|
19398
|
+
"image/tiff": "TIFF",
|
|
19399
|
+
"image/gif": "GIF",
|
|
19400
|
+
"image/bmp": "BMP",
|
|
19401
|
+
"image/svg+xml": "SVG",
|
|
19402
|
+
"text/plain": "TXT",
|
|
19403
|
+
"text/markdown": "Markdown",
|
|
19404
|
+
"text/csv": "CSV",
|
|
19405
|
+
"text/tab-separated-values": "TSV",
|
|
19406
|
+
"text/html": "HTML",
|
|
19407
|
+
"text/xml": "XML",
|
|
19408
|
+
"application/json": "JSON",
|
|
19409
|
+
"application/x-yaml": "YAML",
|
|
19410
|
+
"application/toml": "TOML",
|
|
19411
|
+
"text/x-rst": "RST",
|
|
19412
|
+
"text/x-org": "Org",
|
|
19413
|
+
"application/x-latex": "LaTeX",
|
|
19414
|
+
"application/x-ipynb+json": "Jupyter",
|
|
19415
|
+
"application/x-bibtex": "BibTeX",
|
|
19416
|
+
"application/docbook+xml": "DocBook",
|
|
19417
|
+
"application/x-fictionbook+xml": "FB2"
|
|
19418
|
+
};
|
|
19419
|
+
});
|
|
19420
|
+
|
|
19421
|
+
// ../types/src/processor/configs/document-parser.ts
|
|
19422
|
+
var DocumentParserInputSchema, DocumentParserOutputSchema, DocumentParserConfigSchema;
|
|
19423
|
+
var init_document_parser = __esm(() => {
|
|
19424
|
+
init_zod();
|
|
19425
|
+
init_runtime_file_ref();
|
|
19426
|
+
init_parser();
|
|
19427
|
+
DocumentParserInputSchema = ResolvedProcessorFileSchema;
|
|
19428
|
+
DocumentParserOutputSchema = ParseResultSchema;
|
|
19429
|
+
DocumentParserConfigSchema = exports_external.object({
|
|
19430
|
+
ocrModel: exports_external.string().optional().describe("OCR provider ID for PDF/image parsing"),
|
|
19431
|
+
llmModel: exports_external.string().optional().describe("LLM provider ID for vision-based parsing"),
|
|
19432
|
+
maxConcurrency: exports_external.number().min(1).max(10).default(3).describe("Max concurrent VLM batch requests"),
|
|
19433
|
+
pagesPerBatch: exports_external.number().min(1).max(20).default(5).describe("Number of page images per VLM request"),
|
|
19434
|
+
pdfRenderScale: exports_external.number().min(1).max(4).default(1).optional().describe("Scale factor used when rendering PDF pages for VLM parsing"),
|
|
19435
|
+
imageQuality: exports_external.number().int().min(1).max(100).default(85).optional().describe("JPEG quality used for PDF page images sent to VLM parsing"),
|
|
19436
|
+
prompt: exports_external.string().optional().describe("Custom extraction prompt"),
|
|
19437
|
+
nativeText: exports_external.boolean().default(false).optional().describe("Use native text extraction for PDFs with embedded text (no OCR/VLM)"),
|
|
19438
|
+
languages: exports_external.array(exports_external.string()).optional().describe('OCR language hints (e.g., ["en", "de"])'),
|
|
19439
|
+
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.")
|
|
19440
|
+
}).prefault({});
|
|
19441
|
+
});
|
|
19442
|
+
|
|
19443
|
+
// ../types/src/processor/configs/extract.ts
|
|
19444
|
+
var ExtractInputSchema, ExtractOutputSchema, ExtractConfigSchema;
|
|
19445
|
+
var init_extract = __esm(() => {
|
|
19446
|
+
init_zod();
|
|
19447
|
+
ExtractInputSchema = exports_external.object({
|
|
19448
|
+
content: exports_external.string().optional().describe("Text content to extract from"),
|
|
19449
|
+
text: exports_external.string().optional().describe("Text content (alternative to content, e.g., from document parser)"),
|
|
19450
|
+
contentType: exports_external.enum(["text", "image"]).default("text"),
|
|
19451
|
+
imageData: exports_external.string().optional(),
|
|
19452
|
+
imageMimeType: exports_external.string().optional()
|
|
19453
|
+
}).refine((data) => data.content || data.text, {
|
|
19454
|
+
message: "Either content or text must be provided"
|
|
19455
|
+
});
|
|
19456
|
+
ExtractOutputSchema = exports_external.record(exports_external.string(), exports_external.unknown()).describe("Extracted structured data matching the provided schema");
|
|
19457
|
+
ExtractConfigSchema = exports_external.object({
|
|
19458
|
+
schema: exports_external.record(exports_external.string(), exports_external.unknown()).describe("JSON Schema defining the structure to extract"),
|
|
19459
|
+
prompt: exports_external.string().optional().describe("Custom prompt template for extraction"),
|
|
19460
|
+
provider: exports_external.string().optional().describe('Provider ID to use (e.g., "openai-gpt4o", "anthropic-claude")'),
|
|
19461
|
+
model: exports_external.string().optional().describe("Model to use (overrides provider default)"),
|
|
19462
|
+
maxInputTokens: exports_external.number().int().optional().describe("Max input tokens. Truncates input text and logs a warning when exceeded. Omit for no limit."),
|
|
19463
|
+
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."),
|
|
19464
|
+
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."),
|
|
19465
|
+
groundingExamples: exports_external.array(exports_external.object({
|
|
19466
|
+
text: exports_external.string(),
|
|
19467
|
+
extractions: exports_external.array(exports_external.object({ field: exports_external.string(), text: exports_external.string() }))
|
|
19468
|
+
})).optional().describe("Few-shot examples for grounding (verbatim source text per field). Optional."),
|
|
19469
|
+
reviewOn: exports_external.enum(["medium_or_low", "low_only"]).optional().describe("Which grounding confidences flag a field for review. Default: medium_or_low.")
|
|
19470
|
+
});
|
|
19471
|
+
});
|
|
19472
|
+
|
|
19473
|
+
// ../types/src/processor/configs/merge.ts
|
|
19474
|
+
var MergeConfigSchema, MergeInputSchema, MergeOutputSchema;
|
|
19475
|
+
var init_merge = __esm(() => {
|
|
19476
|
+
init_zod();
|
|
19477
|
+
MergeConfigSchema = exports_external.object({
|
|
19478
|
+
preservePortNames: exports_external.boolean().default(true),
|
|
19479
|
+
outputKey: exports_external.string().optional()
|
|
19480
|
+
});
|
|
19481
|
+
MergeInputSchema = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
19482
|
+
MergeOutputSchema = exports_external.object({
|
|
19483
|
+
items: exports_external.array(exports_external.unknown()),
|
|
19484
|
+
count: exports_external.number(),
|
|
19485
|
+
merged: exports_external.record(exports_external.string(), exports_external.unknown()).optional()
|
|
19486
|
+
});
|
|
19487
|
+
});
|
|
19488
|
+
|
|
19489
|
+
// ../types/src/processor/configs/pdf-embedder.ts
|
|
19490
|
+
var PdfEmbedderInputSchema, PdfEmbedderOutputSchema, PdfEmbedderConfigSchema;
|
|
19491
|
+
var init_pdf_embedder = __esm(() => {
|
|
19492
|
+
init_zod();
|
|
19493
|
+
init_runtime_file_ref();
|
|
19494
|
+
init_parser();
|
|
19495
|
+
PdfEmbedderInputSchema = exports_external.object({
|
|
19496
|
+
file: ResolvedProcessorFileSchema.describe("Resolved source file handle"),
|
|
19497
|
+
parseResult: exports_external.object({
|
|
19498
|
+
pages: exports_external.array(PageResultSchema),
|
|
19499
|
+
text: exports_external.string().optional()
|
|
19500
|
+
}).describe("Parse result from ai.parse step (must include word positions)")
|
|
19501
|
+
});
|
|
19502
|
+
PdfEmbedderOutputSchema = exports_external.object({
|
|
19503
|
+
fileId: exports_external.string().describe("File ID from files table"),
|
|
19504
|
+
pageCount: exports_external.number().describe("Number of pages in the output PDF"),
|
|
19505
|
+
wordCount: exports_external.number().describe("Number of words embedded"),
|
|
19506
|
+
text: exports_external.string().describe("Extracted text (from parse step)")
|
|
19507
|
+
});
|
|
19508
|
+
PdfEmbedderConfigSchema = exports_external.object({
|
|
19509
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{filename}}-searchable.pdf"'),
|
|
19510
|
+
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")
|
|
19511
|
+
}).prefault({});
|
|
19512
|
+
});
|
|
19513
|
+
|
|
19514
|
+
// ../types/src/processor/configs/segment.ts
|
|
19515
|
+
var SegmentInputSchema, SEGMENT_UNKNOWN_TYPE = "unknown", SegmentConfigSchema, ConfidenceLevelSchema, SegmentSummarySchema, SegmentOutputSchema;
|
|
19516
|
+
var init_segment = __esm(() => {
|
|
19517
|
+
init_zod();
|
|
19518
|
+
SegmentInputSchema = exports_external.object({
|
|
19519
|
+
pages: exports_external.array(exports_external.object({
|
|
19520
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19521
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19522
|
+
pageName: exports_external.string().optional()
|
|
19523
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19524
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19525
|
+
SegmentConfigSchema = exports_external.object({
|
|
19526
|
+
documentTypes: exports_external.array(exports_external.object({
|
|
19527
|
+
name: exports_external.string().min(1).describe('Type label returned in documents[].type (e.g. "timesheet", "deal-memo").'),
|
|
19528
|
+
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.")
|
|
19529
|
+
})).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.'),
|
|
19530
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19531
|
+
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.'),
|
|
19532
|
+
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.")
|
|
19533
|
+
});
|
|
19534
|
+
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.");
|
|
19535
|
+
SegmentSummarySchema = exports_external.object({
|
|
19536
|
+
total: exports_external.number().int().describe("Total documents discovered in the batch."),
|
|
19537
|
+
labelled: exports_external.number().int().describe('Documents assigned a known taxonomy type (type !== "unknown").'),
|
|
19538
|
+
unlabelled: exports_external.number().int().describe('Documents the segmenter could not label (type === "unknown") — escalate to a human.'),
|
|
19539
|
+
lowConfidence: exports_external.number().int().describe('Documents whose boundary/type confidence is "low" — also worth human review.'),
|
|
19540
|
+
byType: exports_external.record(exports_external.string(), exports_external.number().int()).describe('Per-type document counts, keyed by type name (includes "unknown").'),
|
|
19541
|
+
needsReview: exports_external.array(exports_external.object({
|
|
19542
|
+
index: exports_external.number().int(),
|
|
19543
|
+
type: exports_external.string(),
|
|
19544
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19545
|
+
reason: exports_external.enum(["unlabelled", "low_confidence"]).describe("Why this document should be escalated to a human operator."),
|
|
19546
|
+
notes: exports_external.string()
|
|
19547
|
+
})).describe("The exact documents to escalate to a human operator, with the reason for each.")
|
|
19548
|
+
});
|
|
19549
|
+
SegmentOutputSchema = exports_external.object({
|
|
19550
|
+
summary: SegmentSummarySchema.describe("Batch-level escalation summary: labelled vs unlabelled counts and the documents needing human review."),
|
|
19551
|
+
documents: exports_external.array(exports_external.object({
|
|
19552
|
+
index: exports_external.number().int().describe("0-based position of this document in the batch, in page order."),
|
|
19553
|
+
type: exports_external.string().describe('Chosen type name from the taxonomy, or "unknown" when none fit.'),
|
|
19554
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]).describe("Inclusive [startPage, endPage], 0-based, matching input pageIndex."),
|
|
19555
|
+
confidence: ConfidenceLevelSchema.describe("LLM confidence at the document boundary + type: low | medium | high."),
|
|
19556
|
+
notes: exports_external.string().describe("Short prose citing what marked this page as a new document."),
|
|
19557
|
+
evidence: exports_external.object({
|
|
19558
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading/title text the LLM cited as the document start"),
|
|
19559
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where the start appears")
|
|
19560
|
+
}).optional().describe("Structured start evidence — for downstream parsing without regex over `notes`."),
|
|
19561
|
+
text: exports_external.string().describe("Joined per-page text for this document, ready for ai.extract"),
|
|
19562
|
+
pages: exports_external.array(exports_external.object({
|
|
19563
|
+
pageIndex: exports_external.number().int(),
|
|
19564
|
+
text: exports_external.string(),
|
|
19565
|
+
pageName: exports_external.string().optional(),
|
|
19566
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM boundary (direct evidence) or filled in by continuity")
|
|
19567
|
+
})).describe("Raw per-page records covered by this document, in page order."),
|
|
19568
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19569
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19570
|
+
}))
|
|
19571
|
+
});
|
|
19572
|
+
});
|
|
19573
|
+
|
|
19574
|
+
// ../types/src/processor/configs/split.ts
|
|
19575
|
+
var SplitInputSchema, SplitConfigSchema, ConfidenceLevelSchema2, SplitOutputSchema;
|
|
19576
|
+
var init_split = __esm(() => {
|
|
19577
|
+
init_zod();
|
|
19578
|
+
SplitInputSchema = exports_external.object({
|
|
19579
|
+
pages: exports_external.array(exports_external.object({
|
|
19580
|
+
pageIndex: exports_external.number().describe("0-based page index"),
|
|
19581
|
+
text: exports_external.string().describe("Extracted text for this page"),
|
|
19582
|
+
pageName: exports_external.string().optional()
|
|
19583
|
+
})).min(1).describe("Per-page parsed content from a document parser")
|
|
19584
|
+
}).passthrough().describe("Document-parser-shaped input. Pass {{ steps.parse.output }} directly — extra fields like text/metadata are ignored.");
|
|
19585
|
+
SplitConfigSchema = exports_external.object({
|
|
19586
|
+
sections: exports_external.array(exports_external.object({
|
|
19587
|
+
name: exports_external.string().min(1).describe("Stable id for the section"),
|
|
19588
|
+
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."),
|
|
19589
|
+
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").'),
|
|
19590
|
+
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.')
|
|
19591
|
+
})).min(1),
|
|
19592
|
+
rules: exports_external.string().optional().describe("Optional natural-language rules appended to the system prompt"),
|
|
19593
|
+
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.'),
|
|
19594
|
+
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.")
|
|
19595
|
+
});
|
|
19596
|
+
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.");
|
|
19597
|
+
SplitOutputSchema = exports_external.object({
|
|
19598
|
+
splits: exports_external.array(exports_external.object({
|
|
19599
|
+
name: exports_external.string(),
|
|
19600
|
+
page_range: exports_external.tuple([exports_external.number().int(), exports_external.number().int()]),
|
|
19601
|
+
confidence: ConfidenceLevelSchema2.describe("LLM confidence at the start anchor: low | medium | high."),
|
|
19602
|
+
notes: exports_external.string(),
|
|
19603
|
+
evidence: exports_external.object({
|
|
19604
|
+
start_heading_text: exports_external.string().nullable().optional().describe("Verbatim heading text the LLM cited as the section start"),
|
|
19605
|
+
start_page: exports_external.number().int().nullable().optional().describe("Page where start_heading_text appears")
|
|
19606
|
+
}).optional().describe("Structured start-anchor evidence the LLM cited — for downstream parsing without regex over `notes`."),
|
|
19607
|
+
end_evidence: exports_external.object({
|
|
19608
|
+
end_page: exports_external.number().int().describe("LAST page of the section (inclusive)"),
|
|
19609
|
+
confidence: ConfidenceLevelSchema2,
|
|
19610
|
+
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.")
|
|
19611
|
+
}).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)."),
|
|
19612
|
+
text: exports_external.string().describe("Joined per-page text for this section, ready for ai.extract"),
|
|
19613
|
+
pages: exports_external.array(exports_external.object({
|
|
19614
|
+
pageIndex: exports_external.number().int(),
|
|
19615
|
+
text: exports_external.string(),
|
|
19616
|
+
pageName: exports_external.string().optional(),
|
|
19617
|
+
source: exports_external.enum(["anchored", "inferred"]).describe("Whether this page was the LLM anchor (direct evidence) or filled in by continuity")
|
|
19618
|
+
})).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."),
|
|
19619
|
+
pages_anchored: exports_external.array(exports_external.number().int()),
|
|
19620
|
+
pages_inferred: exports_external.array(exports_external.number().int())
|
|
19621
|
+
}))
|
|
19622
|
+
});
|
|
19623
|
+
});
|
|
19624
|
+
|
|
19625
|
+
// ../types/src/processor/configs/template.ts
|
|
19626
|
+
var TemplateInputSchema, TemplateOutputSchema, TemplateConfigSchema;
|
|
19627
|
+
var init_template = __esm(() => {
|
|
19628
|
+
init_zod();
|
|
19629
|
+
TemplateInputSchema = exports_external.object({
|
|
19630
|
+
data: exports_external.record(exports_external.string(), exports_external.unknown()).describe("Data to merge into the template")
|
|
19631
|
+
});
|
|
19632
|
+
TemplateOutputSchema = exports_external.object({
|
|
19633
|
+
fileId: exports_external.string().describe("File ID from files table")
|
|
19634
|
+
});
|
|
19635
|
+
TemplateConfigSchema = exports_external.object({
|
|
19636
|
+
templateId: exports_external.string().describe("ID of the template from templates table"),
|
|
19637
|
+
outputFilename: exports_external.string().optional().describe('Output filename - supports LiquidJS syntax e.g. "{{invoice_id}}-report.docx"'),
|
|
19638
|
+
highlightNotFound: exports_external.boolean().default(true).optional().describe("Highlight missing variables with red-colored text in the output document"),
|
|
19639
|
+
notFoundText: exports_external.string().default("NOT FOUND").optional().describe("Text to display for missing variables when highlightNotFound is enabled")
|
|
19640
|
+
});
|
|
19641
|
+
});
|
|
19642
|
+
|
|
19643
|
+
// ../types/src/processor/configs/xlsx-to-json.ts
|
|
19644
|
+
var XlsxToJsonInputSchema, XlsxToJsonOutputSchema, XlsxToJsonConfigSchema;
|
|
19645
|
+
var init_xlsx_to_json = __esm(() => {
|
|
19646
|
+
init_zod();
|
|
19647
|
+
init_runtime_file_ref();
|
|
19648
|
+
XlsxToJsonInputSchema = ResolvedProcessorFileSchema;
|
|
19649
|
+
XlsxToJsonOutputSchema = exports_external.object({
|
|
19650
|
+
rows: exports_external.array(exports_external.record(exports_external.string(), exports_external.unknown())).describe("Array of row objects (header row = keys)"),
|
|
19651
|
+
fileId: exports_external.string().optional().describe("File ID of stored CSV when outputCsv is true")
|
|
19652
|
+
});
|
|
19653
|
+
XlsxToJsonConfigSchema = exports_external.object({
|
|
19654
|
+
sheet: exports_external.union([exports_external.number().int().min(0), exports_external.string()]).optional().describe("Sheet to read: 0-based index or sheet name"),
|
|
19655
|
+
outputCsv: exports_external.boolean().default(false).optional(),
|
|
19656
|
+
outputFilename: exports_external.string().optional().describe("Output CSV filename when outputCsv is true")
|
|
19657
|
+
});
|
|
19658
|
+
});
|
|
19659
|
+
|
|
19660
|
+
// ../types/src/processor/configs/react-hook-form.ts
|
|
19661
|
+
function extractFieldMetadata(schema) {
|
|
19662
|
+
const fields = [];
|
|
19663
|
+
let inner = schema;
|
|
19664
|
+
while (inner instanceof exports_external.ZodDefault || inner instanceof exports_external.ZodPrefault) {
|
|
19665
|
+
inner = inner.unwrap();
|
|
19666
|
+
}
|
|
19667
|
+
if (inner instanceof exports_external.ZodObject) {
|
|
19668
|
+
for (const [name, fieldSchema] of Object.entries(inner.shape)) {
|
|
19669
|
+
fields.push(extractSingleFieldMetadata(name, fieldSchema));
|
|
19670
|
+
}
|
|
19671
|
+
}
|
|
19672
|
+
return fields;
|
|
19673
|
+
}
|
|
19674
|
+
function extractSingleFieldMetadata(name, schema) {
|
|
19675
|
+
let current = schema;
|
|
19676
|
+
let required2 = true;
|
|
19677
|
+
let defaultValue = undefined;
|
|
19678
|
+
let description = current.description;
|
|
19679
|
+
while (true) {
|
|
19680
|
+
if (current instanceof exports_external.ZodOptional) {
|
|
19681
|
+
required2 = false;
|
|
19682
|
+
current = current.unwrap();
|
|
19683
|
+
} else if (current instanceof exports_external.ZodDefault || current instanceof exports_external.ZodPrefault) {
|
|
19684
|
+
defaultValue = current._def.defaultValue;
|
|
19685
|
+
current = current.unwrap();
|
|
19686
|
+
} else {
|
|
19687
|
+
break;
|
|
19688
|
+
}
|
|
19689
|
+
description ??= current.description;
|
|
19690
|
+
}
|
|
19691
|
+
const base = { name, type: "unknown", required: required2, description, defaultValue };
|
|
19692
|
+
if (current instanceof exports_external.ZodString)
|
|
19693
|
+
return { ...base, type: "string" };
|
|
19694
|
+
if (current instanceof exports_external.ZodNumber) {
|
|
19695
|
+
let min;
|
|
19696
|
+
let max;
|
|
19697
|
+
for (const c of current._def.checks ?? []) {
|
|
19698
|
+
const def = c._zod.def;
|
|
19699
|
+
if (def.check === "greater_than")
|
|
19700
|
+
min = def.value;
|
|
19701
|
+
if (def.check === "less_than")
|
|
19702
|
+
max = def.value;
|
|
19703
|
+
}
|
|
19704
|
+
return { ...base, type: "number", min, max };
|
|
19705
|
+
}
|
|
19706
|
+
if (current instanceof exports_external.ZodBoolean)
|
|
19707
|
+
return { ...base, type: "boolean" };
|
|
19708
|
+
if (current instanceof exports_external.ZodEnum) {
|
|
19709
|
+
return { ...base, type: "enum", enumValues: current.options };
|
|
19710
|
+
}
|
|
19711
|
+
if (current instanceof exports_external.ZodArray)
|
|
19712
|
+
return { ...base, type: "array" };
|
|
19713
|
+
if (current instanceof exports_external.ZodObject || current instanceof exports_external.ZodRecord) {
|
|
19714
|
+
return { ...base, type: "object" };
|
|
19715
|
+
}
|
|
19716
|
+
return base;
|
|
19717
|
+
}
|
|
19718
|
+
function getConfigFieldMetadata(processorId) {
|
|
19719
|
+
const schema = getConfigSchema(processorId);
|
|
19720
|
+
if (!schema)
|
|
19721
|
+
return;
|
|
19722
|
+
return extractFieldMetadata(schema);
|
|
19723
|
+
}
|
|
19724
|
+
function getConfigDefaults(processorId) {
|
|
19725
|
+
const schema = PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19726
|
+
if (!schema)
|
|
19727
|
+
return {};
|
|
19728
|
+
try {
|
|
19729
|
+
const result = schema.safeParse({});
|
|
19730
|
+
if (result.success) {
|
|
19731
|
+
return result.data;
|
|
19732
|
+
}
|
|
19733
|
+
} catch {}
|
|
19734
|
+
const fields = extractFieldMetadata(schema);
|
|
19735
|
+
const defaults = {};
|
|
19736
|
+
for (const field of fields) {
|
|
19737
|
+
if (field.defaultValue !== undefined) {
|
|
19738
|
+
defaults[field.name] = field.defaultValue;
|
|
19739
|
+
}
|
|
19740
|
+
}
|
|
19741
|
+
return defaults;
|
|
19742
|
+
}
|
|
19743
|
+
function validateConfig(processorId, config2) {
|
|
19744
|
+
const schema = getConfigSchema(processorId);
|
|
19745
|
+
if (!schema) {
|
|
19746
|
+
return { valid: true, errors: {} };
|
|
19747
|
+
}
|
|
19748
|
+
const result = schema.safeParse(config2);
|
|
19749
|
+
if (result.success) {
|
|
19750
|
+
return { valid: true, errors: {} };
|
|
19751
|
+
}
|
|
19752
|
+
const errors3 = {};
|
|
19753
|
+
for (const issue2 of result.error.issues) {
|
|
19754
|
+
const path = issue2.path.join(".");
|
|
19755
|
+
errors3[path] = issue2.message;
|
|
19756
|
+
}
|
|
19757
|
+
return { valid: false, errors: errors3 };
|
|
19758
|
+
}
|
|
19759
|
+
var init_react_hook_form = __esm(() => {
|
|
19760
|
+
init_zod();
|
|
19761
|
+
init_configs();
|
|
19762
|
+
});
|
|
19763
|
+
|
|
19764
|
+
// ../types/src/processor/configs/index.ts
|
|
19765
|
+
function getProcessorSchemas(processorId) {
|
|
19766
|
+
return PROCESSOR_SCHEMAS[processorId];
|
|
19767
|
+
}
|
|
19768
|
+
function getConfigSchema(processorId) {
|
|
19769
|
+
return PROCESSOR_SCHEMAS[processorId]?.configSchema;
|
|
19770
|
+
}
|
|
19771
|
+
function getAllProcessorJsonSchemas() {
|
|
19772
|
+
return Object.values(PROCESSOR_SCHEMAS).map((p) => ({
|
|
19773
|
+
id: p.id,
|
|
19774
|
+
inputSchema: toJsonSchema(p.inputSchema),
|
|
19775
|
+
outputSchema: toJsonSchema(p.outputSchema),
|
|
19776
|
+
configSchema: toJsonSchema(p.configSchema)
|
|
19777
|
+
}));
|
|
19778
|
+
}
|
|
19779
|
+
function listProcessorIds() {
|
|
19780
|
+
return Object.keys(PROCESSOR_SCHEMAS);
|
|
19781
|
+
}
|
|
19782
|
+
var PROCESSOR_SCHEMAS;
|
|
19783
|
+
var init_configs = __esm(() => {
|
|
19784
|
+
init_common();
|
|
19785
|
+
init_ids();
|
|
19786
|
+
init_classify();
|
|
19787
|
+
init_document_parser();
|
|
19788
|
+
init_extract();
|
|
19789
|
+
init_merge();
|
|
19790
|
+
init_pdf_embedder();
|
|
19791
|
+
init_segment();
|
|
19792
|
+
init_split();
|
|
19793
|
+
init_template();
|
|
19794
|
+
init_xlsx_to_json();
|
|
19795
|
+
init_react_hook_form();
|
|
19796
|
+
init_classify();
|
|
19797
|
+
init_document_parser();
|
|
19798
|
+
init_extract();
|
|
19799
|
+
init_merge();
|
|
19800
|
+
init_pdf_embedder();
|
|
19801
|
+
init_segment();
|
|
19802
|
+
init_split();
|
|
19803
|
+
init_template();
|
|
19804
|
+
init_xlsx_to_json();
|
|
19805
|
+
PROCESSOR_SCHEMAS = {
|
|
19806
|
+
[PROCESSOR_IDS.EXTRACT]: {
|
|
19807
|
+
id: PROCESSOR_IDS.EXTRACT,
|
|
19808
|
+
inputSchema: ExtractInputSchema,
|
|
19809
|
+
outputSchema: ExtractOutputSchema,
|
|
19810
|
+
configSchema: ExtractConfigSchema
|
|
19811
|
+
},
|
|
19812
|
+
[PROCESSOR_IDS.DOCUMENT_PARSER]: {
|
|
19813
|
+
id: PROCESSOR_IDS.DOCUMENT_PARSER,
|
|
19814
|
+
inputSchema: DocumentParserInputSchema,
|
|
19815
|
+
outputSchema: DocumentParserOutputSchema,
|
|
19816
|
+
configSchema: DocumentParserConfigSchema
|
|
19817
|
+
},
|
|
19818
|
+
[PROCESSOR_IDS.MERGE]: {
|
|
19819
|
+
id: PROCESSOR_IDS.MERGE,
|
|
19820
|
+
inputSchema: MergeInputSchema,
|
|
19821
|
+
outputSchema: MergeOutputSchema,
|
|
19822
|
+
configSchema: MergeConfigSchema
|
|
19823
|
+
},
|
|
19824
|
+
[PROCESSOR_IDS.TEMPLATE]: {
|
|
19825
|
+
id: PROCESSOR_IDS.TEMPLATE,
|
|
19826
|
+
inputSchema: TemplateInputSchema,
|
|
19827
|
+
outputSchema: TemplateOutputSchema,
|
|
19828
|
+
configSchema: TemplateConfigSchema
|
|
19829
|
+
},
|
|
19830
|
+
[PROCESSOR_IDS.PDF_EMBEDDER]: {
|
|
19831
|
+
id: PROCESSOR_IDS.PDF_EMBEDDER,
|
|
19832
|
+
inputSchema: PdfEmbedderInputSchema,
|
|
19833
|
+
outputSchema: PdfEmbedderOutputSchema,
|
|
19834
|
+
configSchema: PdfEmbedderConfigSchema
|
|
19835
|
+
},
|
|
19836
|
+
[PROCESSOR_IDS.SPLIT]: {
|
|
19837
|
+
id: PROCESSOR_IDS.SPLIT,
|
|
19838
|
+
inputSchema: SplitInputSchema,
|
|
19839
|
+
outputSchema: SplitOutputSchema,
|
|
19840
|
+
configSchema: SplitConfigSchema
|
|
19841
|
+
},
|
|
19842
|
+
[PROCESSOR_IDS.SEGMENT]: {
|
|
19843
|
+
id: PROCESSOR_IDS.SEGMENT,
|
|
19844
|
+
inputSchema: SegmentInputSchema,
|
|
19845
|
+
outputSchema: SegmentOutputSchema,
|
|
19846
|
+
configSchema: SegmentConfigSchema
|
|
19847
|
+
},
|
|
19848
|
+
[PROCESSOR_IDS.CLASSIFY]: {
|
|
19849
|
+
id: PROCESSOR_IDS.CLASSIFY,
|
|
19850
|
+
inputSchema: ClassifyInputSchema,
|
|
19851
|
+
outputSchema: ClassifyOutputSchema,
|
|
19852
|
+
configSchema: ClassifyConfigSchema
|
|
19853
|
+
},
|
|
19854
|
+
[PROCESSOR_IDS.XLSX_TO_JSON]: {
|
|
19855
|
+
id: PROCESSOR_IDS.XLSX_TO_JSON,
|
|
19856
|
+
inputSchema: XlsxToJsonInputSchema,
|
|
19857
|
+
outputSchema: XlsxToJsonOutputSchema,
|
|
19858
|
+
configSchema: XlsxToJsonConfigSchema
|
|
19859
|
+
}
|
|
19860
|
+
};
|
|
19861
|
+
});
|
|
19862
|
+
|
|
17331
19863
|
// ../types/src/processor/index.ts
|
|
17332
|
-
var
|
|
19864
|
+
var init_processor2 = __esm(() => {
|
|
19865
|
+
init_processor();
|
|
19866
|
+
init_execution();
|
|
19867
|
+
init_configs();
|
|
19868
|
+
});
|
|
17333
19869
|
|
|
17334
19870
|
// ../types/src/parser/index.ts
|
|
17335
|
-
var
|
|
19871
|
+
var init_parser2 = __esm(() => {
|
|
19872
|
+
init_parser();
|
|
19873
|
+
});
|
|
17336
19874
|
|
|
17337
19875
|
// ../types/src/otel/semantic-conventions.ts
|
|
17338
19876
|
function mapLLMAttributes(attrs) {
|
|
@@ -20370,9 +22908,9 @@ var require_validate = __commonJS((exports) => {
|
|
|
20370
22908
|
}
|
|
20371
22909
|
let expr = data;
|
|
20372
22910
|
const segments = jsonPointer.split("/");
|
|
20373
|
-
for (const
|
|
20374
|
-
if (
|
|
20375
|
-
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(
|
|
22911
|
+
for (const segment2 of segments) {
|
|
22912
|
+
if (segment2) {
|
|
22913
|
+
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment2))}`;
|
|
20376
22914
|
expr = (0, codegen_1._)`${expr} && ${data}`;
|
|
20377
22915
|
}
|
|
20378
22916
|
}
|
|
@@ -20652,7 +23190,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
20652
23190
|
});
|
|
20653
23191
|
|
|
20654
23192
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
20655
|
-
var
|
|
23193
|
+
var require_utils3 = __commonJS((exports, module) => {
|
|
20656
23194
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
20657
23195
|
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
23196
|
function stringArrayToHexStripped(input) {
|
|
@@ -20908,7 +23446,7 @@ var require_utils = __commonJS((exports, module) => {
|
|
|
20908
23446
|
|
|
20909
23447
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
20910
23448
|
var require_schemes = __commonJS((exports, module) => {
|
|
20911
|
-
var { isUUID } =
|
|
23449
|
+
var { isUUID } = require_utils3();
|
|
20912
23450
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
20913
23451
|
var supportedSchemeNames = [
|
|
20914
23452
|
"http",
|
|
@@ -21082,7 +23620,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
21082
23620
|
|
|
21083
23621
|
// ../../node_modules/fast-uri/index.js
|
|
21084
23622
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
21085
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
23623
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils3();
|
|
21086
23624
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
21087
23625
|
function normalize(uri, options) {
|
|
21088
23626
|
if (typeof uri === "string") {
|
|
@@ -23492,7 +26030,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
23492
26030
|
});
|
|
23493
26031
|
|
|
23494
26032
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
23495
|
-
var
|
|
26033
|
+
var require_types2 = __commonJS((exports) => {
|
|
23496
26034
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23497
26035
|
exports.DiscrError = undefined;
|
|
23498
26036
|
var DiscrError;
|
|
@@ -23506,7 +26044,7 @@ var require_types = __commonJS((exports) => {
|
|
|
23506
26044
|
var require_discriminator = __commonJS((exports) => {
|
|
23507
26045
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23508
26046
|
var codegen_1 = require_codegen();
|
|
23509
|
-
var types_1 =
|
|
26047
|
+
var types_1 = require_types2();
|
|
23510
26048
|
var compile_1 = require_compile();
|
|
23511
26049
|
var ref_error_1 = require_ref_error();
|
|
23512
26050
|
var util_1 = require_util();
|
|
@@ -24434,24 +26972,6 @@ var init_validation = __esm(() => {
|
|
|
24434
26972
|
init_workspace_schema();
|
|
24435
26973
|
});
|
|
24436
26974
|
|
|
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
26975
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
24456
26976
|
var require_lib = __commonJS((exports) => {
|
|
24457
26977
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -24865,12 +27385,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
24865
27385
|
}
|
|
24866
27386
|
const ParseErrorConstructors = {};
|
|
24867
27387
|
for (const reasonCode of Object.keys(argument)) {
|
|
24868
|
-
const
|
|
24869
|
-
const _ref = typeof
|
|
24870
|
-
message: () =>
|
|
24871
|
-
} : typeof
|
|
24872
|
-
message:
|
|
24873
|
-
} :
|
|
27388
|
+
const template2 = argument[reasonCode];
|
|
27389
|
+
const _ref = typeof template2 === "string" ? {
|
|
27390
|
+
message: () => template2
|
|
27391
|
+
} : typeof template2 === "function" ? {
|
|
27392
|
+
message: template2
|
|
27393
|
+
} : template2, {
|
|
24874
27394
|
message
|
|
24875
27395
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24876
27396
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -39343,7 +41863,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
39343
41863
|
});
|
|
39344
41864
|
|
|
39345
41865
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
39346
|
-
var
|
|
41866
|
+
var require_types3 = __commonJS((exports) => {
|
|
39347
41867
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39348
41868
|
var TokenType;
|
|
39349
41869
|
(function(TokenType2) {
|
|
@@ -39407,8 +41927,8 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39407
41927
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
39408
41928
|
const arrow = 22528;
|
|
39409
41929
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
39410
|
-
const
|
|
39411
|
-
TokenType2[TokenType2["template"] =
|
|
41930
|
+
const template2 = 23552;
|
|
41931
|
+
TokenType2[TokenType2["template"] = template2] = "template";
|
|
39412
41932
|
const ellipsis = 24576;
|
|
39413
41933
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
39414
41934
|
const backQuote = 25600;
|
|
@@ -39827,7 +42347,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
39827
42347
|
var require_state = __commonJS((exports) => {
|
|
39828
42348
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39829
42349
|
var _keywords = require_keywords();
|
|
39830
|
-
var _types =
|
|
42350
|
+
var _types = require_types3();
|
|
39831
42351
|
|
|
39832
42352
|
class Scope {
|
|
39833
42353
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -40213,7 +42733,7 @@ var require_base = __commonJS((exports) => {
|
|
|
40213
42733
|
var require_util2 = __commonJS((exports) => {
|
|
40214
42734
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40215
42735
|
var _index = require_tokenizer();
|
|
40216
|
-
var _types =
|
|
42736
|
+
var _types = require_types3();
|
|
40217
42737
|
var _charcodes = require_charcodes();
|
|
40218
42738
|
var _base = require_base();
|
|
40219
42739
|
function isContextual(contextualKeyword) {
|
|
@@ -40375,7 +42895,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
40375
42895
|
var require_readWordTree = __commonJS((exports) => {
|
|
40376
42896
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40377
42897
|
var _keywords = require_keywords();
|
|
40378
|
-
var _types =
|
|
42898
|
+
var _types = require_types3();
|
|
40379
42899
|
var READ_WORD_TREE = new Int32Array([
|
|
40380
42900
|
-1,
|
|
40381
42901
|
27,
|
|
@@ -49353,7 +51873,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
49353
51873
|
var _identifier = require_identifier();
|
|
49354
51874
|
var _index = require_tokenizer();
|
|
49355
51875
|
var _readWordTree = require_readWordTree();
|
|
49356
|
-
var _types =
|
|
51876
|
+
var _types = require_types3();
|
|
49357
51877
|
function readWord() {
|
|
49358
51878
|
let treePos = 0;
|
|
49359
51879
|
let code = 0;
|
|
@@ -49419,7 +51939,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
49419
51939
|
var _keywords = require_keywords();
|
|
49420
51940
|
var _readWord = require_readWord();
|
|
49421
51941
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
49422
|
-
var _types =
|
|
51942
|
+
var _types = require_types3();
|
|
49423
51943
|
var IdentifierRole;
|
|
49424
51944
|
(function(IdentifierRole2) {
|
|
49425
51945
|
const Access = 0;
|
|
@@ -50136,7 +52656,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
50136
52656
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
50137
52657
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
50138
52658
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50139
|
-
var _types =
|
|
52659
|
+
var _types = require_types3();
|
|
50140
52660
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
50141
52661
|
let endIndex = index + 1;
|
|
50142
52662
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -50489,7 +53009,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
50489
53009
|
var _xhtml = require_xhtml();
|
|
50490
53010
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
50491
53011
|
var _tokenizer = require_tokenizer();
|
|
50492
|
-
var _types =
|
|
53012
|
+
var _types = require_types3();
|
|
50493
53013
|
var _charcodes = require_charcodes();
|
|
50494
53014
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50495
53015
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -50993,7 +53513,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
50993
53513
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
50994
53514
|
}
|
|
50995
53515
|
var _tokenizer = require_tokenizer();
|
|
50996
|
-
var _types =
|
|
53516
|
+
var _types = require_types3();
|
|
50997
53517
|
var _JSXTransformer = require_JSXTransformer();
|
|
50998
53518
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
50999
53519
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -51032,7 +53552,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
51032
53552
|
}
|
|
51033
53553
|
var _tokenizer = require_tokenizer();
|
|
51034
53554
|
var _keywords = require_keywords();
|
|
51035
|
-
var _types =
|
|
53555
|
+
var _types = require_types3();
|
|
51036
53556
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
51037
53557
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
51038
53558
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -51803,18 +54323,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
|
|
|
51803
54323
|
continue;
|
|
51804
54324
|
let genColumn = 0;
|
|
51805
54325
|
for (let j = 0;j < line.length; j++) {
|
|
51806
|
-
const
|
|
54326
|
+
const segment2 = line[j];
|
|
51807
54327
|
if (j > 0)
|
|
51808
54328
|
writer.write(comma);
|
|
51809
|
-
genColumn = encodeInteger(writer,
|
|
51810
|
-
if (
|
|
54329
|
+
genColumn = encodeInteger(writer, segment2[0], genColumn);
|
|
54330
|
+
if (segment2.length === 1)
|
|
51811
54331
|
continue;
|
|
51812
|
-
sourcesIndex = encodeInteger(writer,
|
|
51813
|
-
sourceLine = encodeInteger(writer,
|
|
51814
|
-
sourceColumn = encodeInteger(writer,
|
|
51815
|
-
if (
|
|
54332
|
+
sourcesIndex = encodeInteger(writer, segment2[1], sourcesIndex);
|
|
54333
|
+
sourceLine = encodeInteger(writer, segment2[2], sourceLine);
|
|
54334
|
+
sourceColumn = encodeInteger(writer, segment2[3], sourceColumn);
|
|
54335
|
+
if (segment2.length === 4)
|
|
51816
54336
|
continue;
|
|
51817
|
-
namesIndex = encodeInteger(writer,
|
|
54337
|
+
namesIndex = encodeInteger(writer, segment2[4], namesIndex);
|
|
51818
54338
|
}
|
|
51819
54339
|
}
|
|
51820
54340
|
return writer.flush();
|
|
@@ -52369,11 +54889,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52369
54889
|
const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
52370
54890
|
if (index === -1)
|
|
52371
54891
|
return OMapping(null, null, null, null);
|
|
52372
|
-
const
|
|
52373
|
-
if (
|
|
54892
|
+
const segment2 = segments[index];
|
|
54893
|
+
if (segment2.length === 1)
|
|
52374
54894
|
return OMapping(null, null, null, null);
|
|
52375
54895
|
const { names, resolvedSources } = map2;
|
|
52376
|
-
return OMapping(resolvedSources[
|
|
54896
|
+
return OMapping(resolvedSources[segment2[SOURCES_INDEX]], segment2[SOURCE_LINE] + 1, segment2[SOURCE_COLUMN], segment2.length === 5 ? names[segment2[NAMES_INDEX]] : null);
|
|
52377
54897
|
}
|
|
52378
54898
|
function generatedPositionFor(map2, needle) {
|
|
52379
54899
|
const { source, line, column, bias } = needle;
|
|
@@ -52486,8 +55006,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52486
55006
|
const max = upperBound(segments, matchedColumn, min);
|
|
52487
55007
|
const result = [];
|
|
52488
55008
|
for (;min <= max; min++) {
|
|
52489
|
-
const
|
|
52490
|
-
result.push(GMapping(
|
|
55009
|
+
const segment2 = segments[min];
|
|
55010
|
+
result.push(GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]));
|
|
52491
55011
|
}
|
|
52492
55012
|
return result;
|
|
52493
55013
|
}
|
|
@@ -52515,8 +55035,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
52515
55035
|
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
52516
55036
|
if (index === -1)
|
|
52517
55037
|
return GMapping(null, null);
|
|
52518
|
-
const
|
|
52519
|
-
return GMapping(
|
|
55038
|
+
const segment2 = segments[index];
|
|
55039
|
+
return GMapping(segment2[REV_GENERATED_LINE] + 1, segment2[REV_GENERATED_COLUMN]);
|
|
52520
55040
|
}
|
|
52521
55041
|
});
|
|
52522
55042
|
});
|
|
@@ -53067,7 +55587,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
53067
55587
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
53068
55588
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53069
55589
|
var _tokenizer = require_tokenizer();
|
|
53070
|
-
var _types =
|
|
55590
|
+
var _types = require_types3();
|
|
53071
55591
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
53072
55592
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
53073
55593
|
return;
|
|
@@ -53132,7 +55652,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
53132
55652
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
53133
55653
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
53134
55654
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53135
|
-
var _types =
|
|
55655
|
+
var _types = require_types3();
|
|
53136
55656
|
function getIdentifierNames(code, tokens) {
|
|
53137
55657
|
const names = [];
|
|
53138
55658
|
for (const token of tokens) {
|
|
@@ -53308,7 +55828,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
53308
55828
|
});
|
|
53309
55829
|
|
|
53310
55830
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
53311
|
-
var
|
|
55831
|
+
var require_types4 = __commonJS((exports) => {
|
|
53312
55832
|
var __extends = exports && exports.__extends || function() {
|
|
53313
55833
|
var extendStatics = function(d, b) {
|
|
53314
55834
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -53908,9 +56428,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
53908
56428
|
};
|
|
53909
56429
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53910
56430
|
exports.Checker = exports.createCheckers = undefined;
|
|
53911
|
-
var types_1 =
|
|
56431
|
+
var types_1 = require_types4();
|
|
53912
56432
|
var util_1 = require_util3();
|
|
53913
|
-
var types_2 =
|
|
56433
|
+
var types_2 = require_types4();
|
|
53914
56434
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
53915
56435
|
return types_2.TArray;
|
|
53916
56436
|
} });
|
|
@@ -54192,7 +56712,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
54192
56712
|
var _typescript = require_typescript();
|
|
54193
56713
|
var _index = require_tokenizer();
|
|
54194
56714
|
var _keywords = require_keywords();
|
|
54195
|
-
var _types =
|
|
56715
|
+
var _types = require_types3();
|
|
54196
56716
|
var _base = require_base();
|
|
54197
56717
|
var _expression = require_expression();
|
|
54198
56718
|
var _util = require_util2();
|
|
@@ -54324,7 +56844,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
54324
56844
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54325
56845
|
var _index = require_tokenizer();
|
|
54326
56846
|
var _keywords = require_keywords();
|
|
54327
|
-
var _types =
|
|
56847
|
+
var _types = require_types3();
|
|
54328
56848
|
var _base = require_base();
|
|
54329
56849
|
var _expression = require_expression();
|
|
54330
56850
|
var _lval = require_lval();
|
|
@@ -55586,7 +58106,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
55586
58106
|
var require_jsx = __commonJS((exports) => {
|
|
55587
58107
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55588
58108
|
var _index = require_tokenizer();
|
|
55589
|
-
var _types =
|
|
58109
|
+
var _types = require_types3();
|
|
55590
58110
|
var _base = require_base();
|
|
55591
58111
|
var _expression = require_expression();
|
|
55592
58112
|
var _util = require_util2();
|
|
@@ -55849,10 +58369,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
55849
58369
|
});
|
|
55850
58370
|
|
|
55851
58371
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
55852
|
-
var
|
|
58372
|
+
var require_types5 = __commonJS((exports) => {
|
|
55853
58373
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55854
58374
|
var _index = require_tokenizer();
|
|
55855
|
-
var _types =
|
|
58375
|
+
var _types = require_types3();
|
|
55856
58376
|
var _base = require_base();
|
|
55857
58377
|
var _expression = require_expression();
|
|
55858
58378
|
var _flow = require_flow();
|
|
@@ -55885,12 +58405,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
55885
58405
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55886
58406
|
var _flow = require_flow();
|
|
55887
58407
|
var _index = require_jsx();
|
|
55888
|
-
var _types =
|
|
58408
|
+
var _types = require_types5();
|
|
55889
58409
|
var _typescript = require_typescript();
|
|
55890
58410
|
var _index3 = require_tokenizer();
|
|
55891
58411
|
var _keywords = require_keywords();
|
|
55892
58412
|
var _state = require_state();
|
|
55893
|
-
var _types3 =
|
|
58413
|
+
var _types3 = require_types3();
|
|
55894
58414
|
var _charcodes = require_charcodes();
|
|
55895
58415
|
var _identifier = require_identifier();
|
|
55896
58416
|
var _base = require_base();
|
|
@@ -56606,7 +59126,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
56606
59126
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56607
59127
|
var _index = require_tokenizer();
|
|
56608
59128
|
var _keywords = require_keywords();
|
|
56609
|
-
var _types =
|
|
59129
|
+
var _types = require_types3();
|
|
56610
59130
|
var _base = require_base();
|
|
56611
59131
|
var _expression = require_expression();
|
|
56612
59132
|
var _statement = require_statement();
|
|
@@ -57481,7 +60001,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
57481
60001
|
var _tokenizer = require_tokenizer();
|
|
57482
60002
|
var _keywords = require_keywords();
|
|
57483
60003
|
var _state = require_state();
|
|
57484
|
-
var _types =
|
|
60004
|
+
var _types = require_types3();
|
|
57485
60005
|
var _charcodes = require_charcodes();
|
|
57486
60006
|
var _base = require_base();
|
|
57487
60007
|
var _expression = require_expression();
|
|
@@ -58516,7 +61036,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58516
61036
|
function _interopRequireDefault(obj) {
|
|
58517
61037
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
58518
61038
|
}
|
|
58519
|
-
var _types =
|
|
61039
|
+
var _types = require_types3();
|
|
58520
61040
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
58521
61041
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
58522
61042
|
|
|
@@ -58774,7 +61294,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
58774
61294
|
var require_getClassInfo = __commonJS((exports) => {
|
|
58775
61295
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58776
61296
|
var _keywords = require_keywords();
|
|
58777
|
-
var _types =
|
|
61297
|
+
var _types = require_types3();
|
|
58778
61298
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
58779
61299
|
const snapshot = tokens.snapshot();
|
|
58780
61300
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -59012,7 +61532,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
59012
61532
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
59013
61533
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
59014
61534
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59015
|
-
var _types =
|
|
61535
|
+
var _types = require_types3();
|
|
59016
61536
|
function elideImportEquals(tokens) {
|
|
59017
61537
|
tokens.removeInitialToken();
|
|
59018
61538
|
tokens.removeToken();
|
|
@@ -59036,7 +61556,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
59036
61556
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
59037
61557
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59038
61558
|
var _tokenizer = require_tokenizer();
|
|
59039
|
-
var _types =
|
|
61559
|
+
var _types = require_types3();
|
|
59040
61560
|
var EMPTY_DECLARATION_INFO = {
|
|
59041
61561
|
typeDeclarations: new Set,
|
|
59042
61562
|
valueDeclarations: new Set
|
|
@@ -59064,7 +61584,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
59064
61584
|
var require_isExportFrom = __commonJS((exports) => {
|
|
59065
61585
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59066
61586
|
var _keywords = require_keywords();
|
|
59067
|
-
var _types =
|
|
61587
|
+
var _types = require_types3();
|
|
59068
61588
|
function isExportFrom(tokens) {
|
|
59069
61589
|
let closeBraceIndex = tokens.currentIndex();
|
|
59070
61590
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -59079,7 +61599,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
59079
61599
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
59080
61600
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59081
61601
|
var _keywords = require_keywords();
|
|
59082
|
-
var _types =
|
|
61602
|
+
var _types = require_types3();
|
|
59083
61603
|
function removeMaybeImportAttributes(tokens) {
|
|
59084
61604
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
59085
61605
|
tokens.removeToken();
|
|
@@ -59094,7 +61614,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
59094
61614
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
59095
61615
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
59096
61616
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59097
|
-
var _types =
|
|
61617
|
+
var _types = require_types3();
|
|
59098
61618
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
59099
61619
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
59100
61620
|
return false;
|
|
@@ -59125,7 +61645,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
59125
61645
|
}
|
|
59126
61646
|
var _tokenizer = require_tokenizer();
|
|
59127
61647
|
var _keywords = require_keywords();
|
|
59128
|
-
var _types =
|
|
61648
|
+
var _types = require_types3();
|
|
59129
61649
|
var _elideImportEquals = require_elideImportEquals();
|
|
59130
61650
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59131
61651
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -59767,7 +62287,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
59767
62287
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
59768
62288
|
}
|
|
59769
62289
|
var _keywords = require_keywords();
|
|
59770
|
-
var _types =
|
|
62290
|
+
var _types = require_types3();
|
|
59771
62291
|
var _elideImportEquals = require_elideImportEquals();
|
|
59772
62292
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
59773
62293
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -60037,7 +62557,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
60037
62557
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60038
62558
|
}
|
|
60039
62559
|
var _keywords = require_keywords();
|
|
60040
|
-
var _types =
|
|
62560
|
+
var _types = require_types3();
|
|
60041
62561
|
var _Transformer = require_Transformer();
|
|
60042
62562
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60043
62563
|
|
|
@@ -60157,7 +62677,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
60157
62677
|
}
|
|
60158
62678
|
return value;
|
|
60159
62679
|
}
|
|
60160
|
-
var _types =
|
|
62680
|
+
var _types = require_types3();
|
|
60161
62681
|
var _Transformer = require_Transformer();
|
|
60162
62682
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60163
62683
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -60231,7 +62751,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
60231
62751
|
function _interopRequireDefault(obj) {
|
|
60232
62752
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60233
62753
|
}
|
|
60234
|
-
var _types =
|
|
62754
|
+
var _types = require_types3();
|
|
60235
62755
|
var _Transformer = require_Transformer();
|
|
60236
62756
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60237
62757
|
|
|
@@ -60260,7 +62780,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
60260
62780
|
function _interopRequireDefault(obj) {
|
|
60261
62781
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60262
62782
|
}
|
|
60263
|
-
var _types =
|
|
62783
|
+
var _types = require_types3();
|
|
60264
62784
|
var _Transformer = require_Transformer();
|
|
60265
62785
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60266
62786
|
|
|
@@ -60288,7 +62808,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
60288
62808
|
function _interopRequireDefault(obj) {
|
|
60289
62809
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60290
62810
|
}
|
|
60291
|
-
var _types =
|
|
62811
|
+
var _types = require_types3();
|
|
60292
62812
|
var _Transformer = require_Transformer();
|
|
60293
62813
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60294
62814
|
|
|
@@ -60404,7 +62924,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
60404
62924
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60405
62925
|
}
|
|
60406
62926
|
var _tokenizer = require_tokenizer();
|
|
60407
|
-
var _types =
|
|
62927
|
+
var _types = require_types3();
|
|
60408
62928
|
var _Transformer = require_Transformer();
|
|
60409
62929
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
60410
62930
|
|
|
@@ -60655,7 +63175,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
60655
63175
|
function _interopRequireDefault(obj) {
|
|
60656
63176
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60657
63177
|
}
|
|
60658
|
-
var _types =
|
|
63178
|
+
var _types = require_types3();
|
|
60659
63179
|
var _isIdentifier = require_isIdentifier();
|
|
60660
63180
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
60661
63181
|
var _Transformer = require_Transformer();
|
|
@@ -60801,7 +63321,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
60801
63321
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
60802
63322
|
}
|
|
60803
63323
|
var _keywords = require_keywords();
|
|
60804
|
-
var _types =
|
|
63324
|
+
var _types = require_types3();
|
|
60805
63325
|
var _getClassInfo = require_getClassInfo();
|
|
60806
63326
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
60807
63327
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -61200,7 +63720,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
61200
63720
|
}
|
|
61201
63721
|
var _linesandcolumns = require_build();
|
|
61202
63722
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
61203
|
-
var _types =
|
|
63723
|
+
var _types = require_types3();
|
|
61204
63724
|
function formatTokens(code, tokens) {
|
|
61205
63725
|
if (tokens.length === 0) {
|
|
61206
63726
|
return "";
|
|
@@ -61265,7 +63785,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
61265
63785
|
function _interopRequireDefault(obj) {
|
|
61266
63786
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61267
63787
|
}
|
|
61268
|
-
var _types =
|
|
63788
|
+
var _types = require_types3();
|
|
61269
63789
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
61270
63790
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
61271
63791
|
function getTSImportedNames(tokens) {
|
|
@@ -61650,7 +64170,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
61650
64170
|
function compileTypedScript(opts) {
|
|
61651
64171
|
let ast;
|
|
61652
64172
|
try {
|
|
61653
|
-
ast =
|
|
64173
|
+
ast = import_parser4.parse(opts.source, {
|
|
61654
64174
|
sourceType: "script",
|
|
61655
64175
|
plugins: ["typescript"],
|
|
61656
64176
|
ranges: true
|
|
@@ -61902,9 +64422,9 @@ function stripCommentsAndStrings(s) {
|
|
|
61902
64422
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
61903
64423
|
return out;
|
|
61904
64424
|
}
|
|
61905
|
-
var
|
|
64425
|
+
var import_parser4, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
61906
64426
|
var init_compile = __esm(() => {
|
|
61907
|
-
|
|
64427
|
+
import_parser4 = __toESM(require_lib(), 1);
|
|
61908
64428
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
61909
64429
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
61910
64430
|
});
|
|
@@ -62262,8 +64782,8 @@ function getAllStepJsonSchemas() {
|
|
|
62262
64782
|
category: def.category,
|
|
62263
64783
|
name: def.name,
|
|
62264
64784
|
description: def.description,
|
|
62265
|
-
configSchema:
|
|
62266
|
-
outputSchema:
|
|
64785
|
+
configSchema: toJsonSchema(def.configSchema),
|
|
64786
|
+
outputSchema: toJsonSchema(def.outputSchema),
|
|
62267
64787
|
configInWith: def.configInWith
|
|
62268
64788
|
}));
|
|
62269
64789
|
}
|
|
@@ -63081,81 +65601,6 @@ var init_actions = __esm(() => {
|
|
|
63081
65601
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
63082
65602
|
});
|
|
63083
65603
|
|
|
63084
|
-
// ../types/src/processor/execution.ts
|
|
63085
|
-
function asTuple(values) {
|
|
63086
|
-
return values;
|
|
63087
|
-
}
|
|
63088
|
-
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
63089
|
-
var init_execution = __esm(() => {
|
|
63090
|
-
init_zod();
|
|
63091
|
-
WorkflowExecutionStatusValue2 = {
|
|
63092
|
-
CREATED: "created",
|
|
63093
|
-
PENDING: "pending",
|
|
63094
|
-
RUNNING: "running",
|
|
63095
|
-
WAITING: "waiting",
|
|
63096
|
-
COMPLETED: "completed",
|
|
63097
|
-
FAILED: "failed",
|
|
63098
|
-
CANCELLED: "cancelled"
|
|
63099
|
-
};
|
|
63100
|
-
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
63101
|
-
WorkflowExecutionStatusValue2.CREATED,
|
|
63102
|
-
WorkflowExecutionStatusValue2.PENDING,
|
|
63103
|
-
WorkflowExecutionStatusValue2.RUNNING,
|
|
63104
|
-
WorkflowExecutionStatusValue2.WAITING,
|
|
63105
|
-
WorkflowExecutionStatusValue2.COMPLETED,
|
|
63106
|
-
WorkflowExecutionStatusValue2.FAILED,
|
|
63107
|
-
WorkflowExecutionStatusValue2.CANCELLED
|
|
63108
|
-
]);
|
|
63109
|
-
StepExecutionStatusValue2 = {
|
|
63110
|
-
PENDING: "pending",
|
|
63111
|
-
RUNNING: "running",
|
|
63112
|
-
SUCCESS: "success",
|
|
63113
|
-
FAILURE: "failure",
|
|
63114
|
-
WAITING: "waiting",
|
|
63115
|
-
SKIPPED: "skipped"
|
|
63116
|
-
};
|
|
63117
|
-
StepExecutionStatusSchema2 = exports_external.enum([
|
|
63118
|
-
StepExecutionStatusValue2.PENDING,
|
|
63119
|
-
StepExecutionStatusValue2.RUNNING,
|
|
63120
|
-
StepExecutionStatusValue2.SUCCESS,
|
|
63121
|
-
StepExecutionStatusValue2.FAILURE,
|
|
63122
|
-
StepExecutionStatusValue2.WAITING,
|
|
63123
|
-
StepExecutionStatusValue2.SKIPPED
|
|
63124
|
-
]);
|
|
63125
|
-
TriggerTypeValue2 = {
|
|
63126
|
-
MANUAL: "manual",
|
|
63127
|
-
API: "api",
|
|
63128
|
-
WEBHOOK: "webhook",
|
|
63129
|
-
SCHEDULE: "schedule",
|
|
63130
|
-
EMAIL: "email",
|
|
63131
|
-
EVAL: "eval",
|
|
63132
|
-
CLI: "cli"
|
|
63133
|
-
};
|
|
63134
|
-
TriggerTypeSchema2 = exports_external.enum([
|
|
63135
|
-
TriggerTypeValue2.MANUAL,
|
|
63136
|
-
TriggerTypeValue2.API,
|
|
63137
|
-
TriggerTypeValue2.WEBHOOK,
|
|
63138
|
-
TriggerTypeValue2.SCHEDULE,
|
|
63139
|
-
TriggerTypeValue2.EMAIL,
|
|
63140
|
-
TriggerTypeValue2.EVAL,
|
|
63141
|
-
TriggerTypeValue2.CLI
|
|
63142
|
-
]);
|
|
63143
|
-
ExecutionTypeValue2 = {
|
|
63144
|
-
PROD: "prod",
|
|
63145
|
-
EVAL: "eval",
|
|
63146
|
-
PLAYGROUND: "playground"
|
|
63147
|
-
};
|
|
63148
|
-
ExecutionTypeSchema2 = exports_external.enum([
|
|
63149
|
-
ExecutionTypeValue2.PROD,
|
|
63150
|
-
ExecutionTypeValue2.EVAL,
|
|
63151
|
-
ExecutionTypeValue2.PLAYGROUND
|
|
63152
|
-
]);
|
|
63153
|
-
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
63154
|
-
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
63155
|
-
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
63156
|
-
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
63157
|
-
});
|
|
63158
|
-
|
|
63159
65604
|
// ../types/src/workflow/workflow.ts
|
|
63160
65605
|
function suggestWorkflowName(raw) {
|
|
63161
65606
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -63237,11 +65682,11 @@ var init_workflow = __esm(() => {
|
|
|
63237
65682
|
ManualTriggerMethodSchema = exports_external.object({
|
|
63238
65683
|
type: exports_external.literal("manual"),
|
|
63239
65684
|
enabled: exports_external.boolean().optional(),
|
|
63240
|
-
inputSchema:
|
|
65685
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
63241
65686
|
});
|
|
63242
65687
|
ApiTriggerMethodSchema = exports_external.object({
|
|
63243
65688
|
type: exports_external.literal("api"),
|
|
63244
|
-
inputSchema:
|
|
65689
|
+
inputSchema: JsonSchemaSchema.optional()
|
|
63245
65690
|
});
|
|
63246
65691
|
EmailTriggerMethodSchema = exports_external.object({
|
|
63247
65692
|
type: exports_external.literal("email"),
|
|
@@ -63281,8 +65726,8 @@ var init_workflow = __esm(() => {
|
|
|
63281
65726
|
yamlContent: exports_external.string(),
|
|
63282
65727
|
definition: WorkflowDefinitionSchema,
|
|
63283
65728
|
isCurrent: exports_external.boolean().default(true),
|
|
63284
|
-
createdAt:
|
|
63285
|
-
updatedAt:
|
|
65729
|
+
createdAt: TimestampSchema,
|
|
65730
|
+
updatedAt: TimestampSchema.optional(),
|
|
63286
65731
|
createdBy: exports_external.string()
|
|
63287
65732
|
});
|
|
63288
65733
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -63464,15 +65909,15 @@ function isFileOutput(value) {
|
|
|
63464
65909
|
function isWorkflowResult(value) {
|
|
63465
65910
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
63466
65911
|
}
|
|
63467
|
-
var
|
|
65912
|
+
var WorkflowExecutionStatusSchema2, StepExecutionStatusSchema2, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, StepExecutionAttemptSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
63468
65913
|
var init_execution2 = __esm(() => {
|
|
63469
65914
|
init_zod();
|
|
63470
65915
|
init_common();
|
|
63471
65916
|
init_execution();
|
|
63472
65917
|
init_retry();
|
|
63473
65918
|
init_workflow();
|
|
63474
|
-
|
|
63475
|
-
|
|
65919
|
+
WorkflowExecutionStatusSchema2 = WorkflowExecutionStatusSchema;
|
|
65920
|
+
StepExecutionStatusSchema2 = StepExecutionStatusSchema;
|
|
63476
65921
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
63477
65922
|
"root",
|
|
63478
65923
|
"if-then",
|
|
@@ -63495,7 +65940,7 @@ var init_execution2 = __esm(() => {
|
|
|
63495
65940
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
63496
65941
|
StepResultSchema = exports_external.object({
|
|
63497
65942
|
output: exports_external.unknown(),
|
|
63498
|
-
status:
|
|
65943
|
+
status: StepExecutionStatusSchema2
|
|
63499
65944
|
});
|
|
63500
65945
|
ExecutionContextSchema = exports_external.object({
|
|
63501
65946
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -63523,24 +65968,24 @@ var init_execution2 = __esm(() => {
|
|
|
63523
65968
|
triggerType: exports_external.string(),
|
|
63524
65969
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
63525
65970
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
63526
|
-
status:
|
|
65971
|
+
status: WorkflowExecutionStatusSchema2,
|
|
63527
65972
|
scopeStack: ScopeStackSchema,
|
|
63528
65973
|
currentStepIndex: exports_external.number(),
|
|
63529
65974
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
63530
65975
|
result: exports_external.unknown().nullable(),
|
|
63531
65976
|
error: exports_external.string().nullable(),
|
|
63532
65977
|
priority: exports_external.number().default(50),
|
|
63533
|
-
availableAt:
|
|
65978
|
+
availableAt: TimestampSchema,
|
|
63534
65979
|
leaseId: exports_external.string().nullable(),
|
|
63535
|
-
leaseExpiresAt:
|
|
65980
|
+
leaseExpiresAt: TimestampSchema.nullable(),
|
|
63536
65981
|
workerId: exports_external.string().nullable(),
|
|
63537
65982
|
maxRetries: exports_external.number().default(0),
|
|
63538
65983
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
63539
65984
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
63540
65985
|
retryNumber: exports_external.number().default(0),
|
|
63541
|
-
createdAt:
|
|
63542
|
-
startedAt:
|
|
63543
|
-
completedAt:
|
|
65986
|
+
createdAt: TimestampSchema,
|
|
65987
|
+
startedAt: TimestampSchema.nullable(),
|
|
65988
|
+
completedAt: TimestampSchema.nullable(),
|
|
63544
65989
|
createdBy: exports_external.string().nullable()
|
|
63545
65990
|
});
|
|
63546
65991
|
StepExecutionSchema = exports_external.object({
|
|
@@ -63559,15 +66004,15 @@ var init_execution2 = __esm(() => {
|
|
|
63559
66004
|
effectiveRetryPolicy: ResolvedRetryPolicySchema.nullable().optional(),
|
|
63560
66005
|
retryPolicySource: RetryPolicySourceSchema.nullable().optional(),
|
|
63561
66006
|
latestAttempt: exports_external.number().default(0),
|
|
63562
|
-
nextAttemptAt:
|
|
66007
|
+
nextAttemptAt: TimestampSchema.nullable().optional(),
|
|
63563
66008
|
inputData: exports_external.unknown().nullable(),
|
|
63564
66009
|
outputData: exports_external.unknown().nullable(),
|
|
63565
|
-
status:
|
|
66010
|
+
status: StepExecutionStatusSchema2,
|
|
63566
66011
|
error: exports_external.string().nullable(),
|
|
63567
66012
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
63568
66013
|
durationMs: exports_external.number().nullable(),
|
|
63569
|
-
startedAt:
|
|
63570
|
-
completedAt:
|
|
66014
|
+
startedAt: TimestampSchema.nullable(),
|
|
66015
|
+
completedAt: TimestampSchema.nullable()
|
|
63571
66016
|
});
|
|
63572
66017
|
StepExecutionAttemptSchema = exports_external.object({
|
|
63573
66018
|
id: exports_external.string(),
|
|
@@ -63580,8 +66025,8 @@ var init_execution2 = __esm(() => {
|
|
|
63580
66025
|
failure: ExecutionFailureSchema.nullable(),
|
|
63581
66026
|
retryDecision: RetryDecisionSchema.nullable(),
|
|
63582
66027
|
replaySafe: exports_external.boolean().nullable(),
|
|
63583
|
-
startedAt:
|
|
63584
|
-
completedAt:
|
|
66028
|
+
startedAt: TimestampSchema,
|
|
66029
|
+
completedAt: TimestampSchema.nullable(),
|
|
63585
66030
|
durationMs: exports_external.number().nullable()
|
|
63586
66031
|
});
|
|
63587
66032
|
ConnectorSchema = exports_external.object({
|
|
@@ -63593,8 +66038,8 @@ var init_execution2 = __esm(() => {
|
|
|
63593
66038
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
63594
66039
|
inputSchema: exports_external.unknown().optional(),
|
|
63595
66040
|
outputSchema: exports_external.unknown().optional(),
|
|
63596
|
-
createdAt:
|
|
63597
|
-
updatedAt:
|
|
66041
|
+
createdAt: TimestampSchema,
|
|
66042
|
+
updatedAt: TimestampSchema.optional(),
|
|
63598
66043
|
createdBy: exports_external.string()
|
|
63599
66044
|
});
|
|
63600
66045
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -64560,8 +67005,8 @@ function parseRunTarget(target) {
|
|
|
64560
67005
|
if (root !== "agents") {
|
|
64561
67006
|
throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
|
|
64562
67007
|
}
|
|
64563
|
-
for (const
|
|
64564
|
-
RunTargetSegmentSchema.parse(
|
|
67008
|
+
for (const segment2 of segments) {
|
|
67009
|
+
RunTargetSegmentSchema.parse(segment2);
|
|
64565
67010
|
}
|
|
64566
67011
|
const packagePath = packageName.split(".").join("/");
|
|
64567
67012
|
const [, ...slugParts] = packagePath.split("/");
|
|
@@ -64674,9 +67119,9 @@ var init_grammar = __esm(() => {
|
|
|
64674
67119
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64675
67120
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64676
67121
|
}
|
|
64677
|
-
for (const
|
|
64678
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64679
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
67122
|
+
for (const segment2 of parts.slice(1)) {
|
|
67123
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
67124
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64680
67125
|
}
|
|
64681
67126
|
}
|
|
64682
67127
|
});
|
|
@@ -64692,9 +67137,9 @@ var init_grammar = __esm(() => {
|
|
|
64692
67137
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
64693
67138
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
64694
67139
|
}
|
|
64695
|
-
for (const
|
|
64696
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
64697
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
67140
|
+
for (const segment2 of parts.slice(1)) {
|
|
67141
|
+
if (!SourcePackageSegmentSchema.safeParse(segment2).success) {
|
|
67142
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment2}` });
|
|
64698
67143
|
}
|
|
64699
67144
|
}
|
|
64700
67145
|
});
|
|
@@ -64788,9 +67233,9 @@ var init_grammar = __esm(() => {
|
|
|
64788
67233
|
});
|
|
64789
67234
|
return;
|
|
64790
67235
|
}
|
|
64791
|
-
for (const
|
|
64792
|
-
if (!RunTargetSegmentSchema.safeParse(
|
|
64793
|
-
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${
|
|
67236
|
+
for (const segment2 of parts.slice(1)) {
|
|
67237
|
+
if (!RunTargetSegmentSchema.safeParse(segment2).success) {
|
|
67238
|
+
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment2}` });
|
|
64794
67239
|
}
|
|
64795
67240
|
}
|
|
64796
67241
|
if (ref) {
|
|
@@ -65540,7 +67985,7 @@ function fromBig(n, le = false) {
|
|
|
65540
67985
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
65541
67986
|
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
65542
67987
|
}
|
|
65543
|
-
function
|
|
67988
|
+
function split2(lst, le = false) {
|
|
65544
67989
|
const len = lst.length;
|
|
65545
67990
|
let Ah = new Uint32Array(len);
|
|
65546
67991
|
let Al = new Uint32Array(len);
|
|
@@ -65720,7 +68165,7 @@ var init_sha2 = __esm(() => {
|
|
|
65720
68165
|
super(28);
|
|
65721
68166
|
}
|
|
65722
68167
|
};
|
|
65723
|
-
K512 = /* @__PURE__ */ (() =>
|
|
68168
|
+
K512 = /* @__PURE__ */ (() => split2([
|
|
65724
68169
|
"0x428a2f98d728ae22",
|
|
65725
68170
|
"0x7137449123ef65cd",
|
|
65726
68171
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -66319,11 +68764,11 @@ function walkGrammar(node, parts) {
|
|
|
66319
68764
|
}
|
|
66320
68765
|
return current;
|
|
66321
68766
|
}
|
|
66322
|
-
function normalizeTemplate(
|
|
66323
|
-
return
|
|
68767
|
+
function normalizeTemplate(template2) {
|
|
68768
|
+
return template2.endsWith("/") ? template2.slice(0, -1) : template2;
|
|
66324
68769
|
}
|
|
66325
|
-
function renderTemplate(
|
|
66326
|
-
return normalizeTemplate(
|
|
68770
|
+
function renderTemplate(template2, params) {
|
|
68771
|
+
return normalizeTemplate(template2).split("/").flatMap((part) => {
|
|
66327
68772
|
if (!part.startsWith(":")) {
|
|
66328
68773
|
return [part];
|
|
66329
68774
|
}
|
|
@@ -66333,36 +68778,36 @@ function renderTemplate(template, params) {
|
|
|
66333
68778
|
throw new Error(`Missing S3 path parameter: ${part}`);
|
|
66334
68779
|
}
|
|
66335
68780
|
if (name === "path") {
|
|
66336
|
-
return value.split("/").map((
|
|
68781
|
+
return value.split("/").map((segment2) => assertSegment("path", segment2));
|
|
66337
68782
|
}
|
|
66338
68783
|
return [assertSegment(String(name), value)];
|
|
66339
68784
|
});
|
|
66340
68785
|
}
|
|
66341
|
-
function buildS3Path(tenantId,
|
|
68786
|
+
function buildS3Path(tenantId, template2, params) {
|
|
66342
68787
|
const tenant = assertSegment("tenantId", tenantId);
|
|
66343
|
-
const parts = renderTemplate(
|
|
68788
|
+
const parts = renderTemplate(template2, params);
|
|
66344
68789
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
66345
|
-
if (
|
|
66346
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68790
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
68791
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
66347
68792
|
}
|
|
66348
68793
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
66349
|
-
return
|
|
68794
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
66350
68795
|
}
|
|
66351
|
-
function buildS3PathSuffix(
|
|
66352
|
-
const parts = renderTemplate(
|
|
68796
|
+
function buildS3PathSuffix(template2, params) {
|
|
68797
|
+
const parts = renderTemplate(template2, params);
|
|
66353
68798
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
66354
|
-
if (
|
|
66355
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68799
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
68800
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
66356
68801
|
}
|
|
66357
68802
|
const path = parts.join("/");
|
|
66358
|
-
return
|
|
68803
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
66359
68804
|
}
|
|
66360
68805
|
function stripTenantPrefix(key) {
|
|
66361
68806
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
66362
68807
|
}
|
|
66363
|
-
function matchS3Path(
|
|
68808
|
+
function matchS3Path(template2, key) {
|
|
66364
68809
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
66365
|
-
const templateParts = normalizeTemplate(
|
|
68810
|
+
const templateParts = normalizeTemplate(template2).split("/");
|
|
66366
68811
|
const params = {};
|
|
66367
68812
|
let keyIndex = 0;
|
|
66368
68813
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -66381,7 +68826,7 @@ function matchS3Path(template, key) {
|
|
|
66381
68826
|
if (rest.length === 0)
|
|
66382
68827
|
return null;
|
|
66383
68828
|
try {
|
|
66384
|
-
params.path = rest.map((
|
|
68829
|
+
params.path = rest.map((segment2) => assertSegment("path", segment2)).join("/");
|
|
66385
68830
|
walkGrammar(S3_PATH_GRAMMAR, keyParts);
|
|
66386
68831
|
} catch {
|
|
66387
68832
|
return null;
|
|
@@ -66415,23 +68860,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
66415
68860
|
}
|
|
66416
68861
|
return assertSegment("tenantId", tenantId);
|
|
66417
68862
|
};
|
|
66418
|
-
const build = (
|
|
68863
|
+
const build = (template2, params) => {
|
|
66419
68864
|
const tenant = resolveTenantId(params);
|
|
66420
|
-
const parts = renderTemplate(
|
|
68865
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
66421
68866
|
const node = walkGrammar(grammarNode, parts);
|
|
66422
|
-
if (
|
|
66423
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68867
|
+
if (template2.endsWith("/") && node === PATH_LEAF) {
|
|
68868
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
66424
68869
|
}
|
|
66425
68870
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
66426
|
-
return
|
|
68871
|
+
return template2.endsWith("/") ? `${path}/` : path;
|
|
66427
68872
|
};
|
|
66428
68873
|
const builder = build;
|
|
66429
|
-
builder.at = (
|
|
68874
|
+
builder.at = (template2, params) => {
|
|
66430
68875
|
const tenant = resolveTenantId(params);
|
|
66431
|
-
const parts = renderTemplate(
|
|
68876
|
+
const parts = renderTemplate(template2, params ?? {});
|
|
66432
68877
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
66433
|
-
if (
|
|
66434
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
68878
|
+
if (template2.endsWith("/") && nextNode === PATH_LEAF) {
|
|
68879
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template2)}`);
|
|
66435
68880
|
}
|
|
66436
68881
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
66437
68882
|
};
|
|
@@ -66850,7 +69295,7 @@ __export(exports_src, {
|
|
|
66850
69295
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
66851
69296
|
SpanTypes: () => SpanTypes,
|
|
66852
69297
|
SpanKindMap: () => SpanKindMap,
|
|
66853
|
-
SpanKind: () => SpanKind,
|
|
69298
|
+
SpanKind: () => import_api.SpanKind,
|
|
66854
69299
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
66855
69300
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
66856
69301
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -66967,7 +69412,7 @@ __export(exports_src, {
|
|
|
66967
69412
|
GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
|
|
66968
69413
|
ForeachStepSchema: () => ForeachStepSchema,
|
|
66969
69414
|
FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
|
|
66970
|
-
FilePathDescriptorSchema: () =>
|
|
69415
|
+
FilePathDescriptorSchema: () => FilePathDescriptorSchema,
|
|
66971
69416
|
FileIngressRefSchema: () => FileIngressRefSchema,
|
|
66972
69417
|
FileIdIngressRefSchema: () => FileIdIngressRefSchema,
|
|
66973
69418
|
FailStepSchema: () => FailStepSchema,
|
|
@@ -67090,8 +69535,8 @@ var init_src = __esm(() => {
|
|
|
67090
69535
|
init_legacy_boundary();
|
|
67091
69536
|
init_runtime_file_ref();
|
|
67092
69537
|
init_scoped_file_ref();
|
|
67093
|
-
|
|
67094
|
-
|
|
69538
|
+
init_processor2();
|
|
69539
|
+
init_parser2();
|
|
67095
69540
|
init_otel();
|
|
67096
69541
|
init_execution_row();
|
|
67097
69542
|
init_run_expand();
|
|
@@ -68005,7 +70450,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
68005
70450
|
else
|
|
68006
70451
|
end = lineWidth - indentAtStart;
|
|
68007
70452
|
}
|
|
68008
|
-
let
|
|
70453
|
+
let split3 = undefined;
|
|
68009
70454
|
let prev = undefined;
|
|
68010
70455
|
let overflow = false;
|
|
68011
70456
|
let i = -1;
|
|
@@ -68039,20 +70484,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
68039
70484
|
if (mode === FOLD_BLOCK)
|
|
68040
70485
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
68041
70486
|
end = i + indent.length + endStep;
|
|
68042
|
-
|
|
70487
|
+
split3 = undefined;
|
|
68043
70488
|
} else {
|
|
68044
70489
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
68045
70490
|
` && prev !== "\t") {
|
|
68046
70491
|
const next = text[i + 1];
|
|
68047
70492
|
if (next && next !== " " && next !== `
|
|
68048
70493
|
` && next !== "\t")
|
|
68049
|
-
|
|
70494
|
+
split3 = i;
|
|
68050
70495
|
}
|
|
68051
70496
|
if (i >= end) {
|
|
68052
|
-
if (
|
|
68053
|
-
folds.push(
|
|
68054
|
-
end =
|
|
68055
|
-
|
|
70497
|
+
if (split3) {
|
|
70498
|
+
folds.push(split3);
|
|
70499
|
+
end = split3 + endStep;
|
|
70500
|
+
split3 = undefined;
|
|
68056
70501
|
} else if (mode === FOLD_QUOTED) {
|
|
68057
70502
|
while (prev === " " || prev === "\t") {
|
|
68058
70503
|
prev = ch;
|
|
@@ -68065,7 +70510,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
68065
70510
|
folds.push(j);
|
|
68066
70511
|
escapedFolds[j] = true;
|
|
68067
70512
|
end = j + endStep;
|
|
68068
|
-
|
|
70513
|
+
split3 = undefined;
|
|
68069
70514
|
} else {
|
|
68070
70515
|
overflow = true;
|
|
68071
70516
|
}
|
|
@@ -68699,7 +71144,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
68699
71144
|
var identity = require_identity();
|
|
68700
71145
|
var Scalar = require_Scalar();
|
|
68701
71146
|
var MERGE_KEY = "<<";
|
|
68702
|
-
var
|
|
71147
|
+
var merge3 = {
|
|
68703
71148
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
68704
71149
|
default: "key",
|
|
68705
71150
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -68709,7 +71154,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
68709
71154
|
}),
|
|
68710
71155
|
stringify: () => MERGE_KEY
|
|
68711
71156
|
};
|
|
68712
|
-
var isMergeKey = (ctx, key) => (
|
|
71157
|
+
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);
|
|
68713
71158
|
function addMergeToJSMap(ctx, map2, value) {
|
|
68714
71159
|
const source = resolveAliasValue(ctx, value);
|
|
68715
71160
|
if (identity.isSeq(source))
|
|
@@ -68748,21 +71193,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
68748
71193
|
}
|
|
68749
71194
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
68750
71195
|
exports.isMergeKey = isMergeKey;
|
|
68751
|
-
exports.merge =
|
|
71196
|
+
exports.merge = merge3;
|
|
68752
71197
|
});
|
|
68753
71198
|
|
|
68754
71199
|
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
68755
71200
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
68756
71201
|
var log = require_log();
|
|
68757
|
-
var
|
|
71202
|
+
var merge3 = require_merge();
|
|
68758
71203
|
var stringify = require_stringify();
|
|
68759
71204
|
var identity = require_identity();
|
|
68760
71205
|
var toJS = require_toJS();
|
|
68761
71206
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
68762
71207
|
if (identity.isNode(key) && key.addToJSMap)
|
|
68763
71208
|
key.addToJSMap(ctx, map2, value);
|
|
68764
|
-
else if (
|
|
68765
|
-
|
|
71209
|
+
else if (merge3.isMergeKey(ctx, key))
|
|
71210
|
+
merge3.addMergeToJSMap(ctx, map2, value);
|
|
68766
71211
|
else {
|
|
68767
71212
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
68768
71213
|
if (map2 instanceof Map) {
|
|
@@ -70038,7 +72483,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
70038
72483
|
var bool = require_bool2();
|
|
70039
72484
|
var float = require_float2();
|
|
70040
72485
|
var int2 = require_int2();
|
|
70041
|
-
var
|
|
72486
|
+
var merge3 = require_merge();
|
|
70042
72487
|
var omap = require_omap();
|
|
70043
72488
|
var pairs = require_pairs();
|
|
70044
72489
|
var set2 = require_set();
|
|
@@ -70058,7 +72503,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
70058
72503
|
float.floatExp,
|
|
70059
72504
|
float.float,
|
|
70060
72505
|
binary.binary,
|
|
70061
|
-
|
|
72506
|
+
merge3.merge,
|
|
70062
72507
|
omap.omap,
|
|
70063
72508
|
pairs.pairs,
|
|
70064
72509
|
set2.set,
|
|
@@ -70081,7 +72526,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
70081
72526
|
var schema = require_schema();
|
|
70082
72527
|
var schema$1 = require_schema2();
|
|
70083
72528
|
var binary = require_binary();
|
|
70084
|
-
var
|
|
72529
|
+
var merge3 = require_merge();
|
|
70085
72530
|
var omap = require_omap();
|
|
70086
72531
|
var pairs = require_pairs();
|
|
70087
72532
|
var schema$2 = require_schema3();
|
|
@@ -70106,7 +72551,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
70106
72551
|
intOct: int2.intOct,
|
|
70107
72552
|
intTime: timestamp.intTime,
|
|
70108
72553
|
map: map2.map,
|
|
70109
|
-
merge:
|
|
72554
|
+
merge: merge3.merge,
|
|
70110
72555
|
null: _null4.nullTag,
|
|
70111
72556
|
omap: omap.omap,
|
|
70112
72557
|
pairs: pairs.pairs,
|
|
@@ -70116,7 +72561,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
70116
72561
|
};
|
|
70117
72562
|
var coreKnownTags = {
|
|
70118
72563
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
70119
|
-
"tag:yaml.org,2002:merge":
|
|
72564
|
+
"tag:yaml.org,2002:merge": merge3.merge,
|
|
70120
72565
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
70121
72566
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
70122
72567
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -70125,7 +72570,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
70125
72570
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
70126
72571
|
const schemaTags = schemas3.get(schemaName);
|
|
70127
72572
|
if (schemaTags && !customTags) {
|
|
70128
|
-
return addMergeTag && !schemaTags.includes(
|
|
72573
|
+
return addMergeTag && !schemaTags.includes(merge3.merge) ? schemaTags.concat(merge3.merge) : schemaTags.slice();
|
|
70129
72574
|
}
|
|
70130
72575
|
let tags = schemaTags;
|
|
70131
72576
|
if (!tags) {
|
|
@@ -70143,7 +72588,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
70143
72588
|
tags = customTags(tags.slice());
|
|
70144
72589
|
}
|
|
70145
72590
|
if (addMergeTag)
|
|
70146
|
-
tags = tags.concat(
|
|
72591
|
+
tags = tags.concat(merge3.merge);
|
|
70147
72592
|
return tags.reduce((tags2, tag) => {
|
|
70148
72593
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
70149
72594
|
if (!tagObj) {
|
|
@@ -70170,11 +72615,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
70170
72615
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
70171
72616
|
|
|
70172
72617
|
class Schema {
|
|
70173
|
-
constructor({ compat: compat2, customTags, merge:
|
|
72618
|
+
constructor({ compat: compat2, customTags, merge: merge3, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
70174
72619
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
70175
72620
|
this.name = typeof schema === "string" && schema || "core";
|
|
70176
72621
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
70177
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
72622
|
+
this.tags = tags.getTags(customTags, this.name, merge3);
|
|
70178
72623
|
this.toStringOptions = toStringDefaults ?? null;
|
|
70179
72624
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
70180
72625
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -71397,13 +73842,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
71397
73842
|
return { mode, indent, chomp, comment, length };
|
|
71398
73843
|
}
|
|
71399
73844
|
function splitLines(source) {
|
|
71400
|
-
const
|
|
71401
|
-
const first =
|
|
73845
|
+
const split3 = source.split(/\n( *)/);
|
|
73846
|
+
const first = split3[0];
|
|
71402
73847
|
const m = first.match(/^( *)/);
|
|
71403
73848
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
71404
73849
|
const lines = [line0];
|
|
71405
|
-
for (let i = 1;i <
|
|
71406
|
-
lines.push([
|
|
73850
|
+
for (let i = 1;i < split3.length; i += 2)
|
|
73851
|
+
lines.push([split3[i], split3[i + 1]]);
|
|
71407
73852
|
return lines;
|
|
71408
73853
|
}
|
|
71409
73854
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -74417,7 +76862,7 @@ var init_main = __esm(() => {
|
|
|
74417
76862
|
});
|
|
74418
76863
|
|
|
74419
76864
|
// ../../node_modules/sisteransi/src/index.js
|
|
74420
|
-
var
|
|
76865
|
+
var require_src2 = __commonJS((exports, module) => {
|
|
74421
76866
|
var ESC2 = "\x1B";
|
|
74422
76867
|
var CSI2 = `${ESC2}[`;
|
|
74423
76868
|
var beep = "\x07";
|
|
@@ -74760,7 +77205,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
74760
77205
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
74761
77206
|
var init_dist3 = __esm(() => {
|
|
74762
77207
|
init_main();
|
|
74763
|
-
import_sisteransi = __toESM(
|
|
77208
|
+
import_sisteransi = __toESM(require_src2(), 1);
|
|
74764
77209
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
74765
77210
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
74766
77211
|
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)}` } } };
|
|
@@ -76103,7 +78548,7 @@ var init_dist4 = __esm(() => {
|
|
|
76103
78548
|
init_dist3();
|
|
76104
78549
|
init_main();
|
|
76105
78550
|
init_dist2();
|
|
76106
|
-
import_sisteransi2 = __toESM(
|
|
78551
|
+
import_sisteransi2 = __toESM(require_src2(), 1);
|
|
76107
78552
|
tt2 = te();
|
|
76108
78553
|
_t = w2("◆", "*");
|
|
76109
78554
|
ot2 = w2("■", "x");
|
|
@@ -169595,7 +172040,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
169595
172040
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
169596
172041
|
}
|
|
169597
172042
|
return to5;
|
|
169598
|
-
}, __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,
|
|
172043
|
+
}, __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 {
|
|
169599
172044
|
diff(oldStr, newStr, options8 = {}) {
|
|
169600
172045
|
let callback;
|
|
169601
172046
|
if (typeof options8 === "function") {
|
|
@@ -170617,7 +173062,7 @@ var init_prettier = __esm(() => {
|
|
|
170617
173062
|
};
|
|
170618
173063
|
}
|
|
170619
173064
|
});
|
|
170620
|
-
|
|
173065
|
+
require_utils4 = __commonJS2({
|
|
170621
173066
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
170622
173067
|
exports.isInteger = (num) => {
|
|
170623
173068
|
if (typeof num === "number") {
|
|
@@ -170706,7 +173151,7 @@ var init_prettier = __esm(() => {
|
|
|
170706
173151
|
});
|
|
170707
173152
|
require_stringify2 = __commonJS2({
|
|
170708
173153
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
170709
|
-
var utils2 =
|
|
173154
|
+
var utils2 = require_utils4();
|
|
170710
173155
|
module.exports = (ast, options8 = {}) => {
|
|
170711
173156
|
const stringify2 = (node, parent = {}) => {
|
|
170712
173157
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -171160,7 +173605,7 @@ var init_prettier = __esm(() => {
|
|
|
171160
173605
|
require_compile2 = __commonJS2({
|
|
171161
173606
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
171162
173607
|
var fill2 = require_fill_range();
|
|
171163
|
-
var utils2 =
|
|
173608
|
+
var utils2 = require_utils4();
|
|
171164
173609
|
var compile = (ast, options8 = {}) => {
|
|
171165
173610
|
const walk2 = (node, parent = {}) => {
|
|
171166
173611
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -171210,7 +173655,7 @@ var init_prettier = __esm(() => {
|
|
|
171210
173655
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
171211
173656
|
var fill2 = require_fill_range();
|
|
171212
173657
|
var stringify2 = require_stringify2();
|
|
171213
|
-
var utils2 =
|
|
173658
|
+
var utils2 = require_utils4();
|
|
171214
173659
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
171215
173660
|
const result = [];
|
|
171216
173661
|
queue = [].concat(queue);
|
|
@@ -173409,8 +175854,8 @@ var init_prettier = __esm(() => {
|
|
|
173409
175854
|
var Stream = __require2("stream");
|
|
173410
175855
|
var PassThrough = Stream.PassThrough;
|
|
173411
175856
|
var slice = Array.prototype.slice;
|
|
173412
|
-
module.exports =
|
|
173413
|
-
function
|
|
175857
|
+
module.exports = merge22;
|
|
175858
|
+
function merge22() {
|
|
173414
175859
|
const streamsQueue = [];
|
|
173415
175860
|
const args = slice.call(arguments);
|
|
173416
175861
|
let merging = false;
|
|
@@ -173524,9 +175969,9 @@ var init_prettier = __esm(() => {
|
|
|
173524
175969
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
173525
175970
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173526
175971
|
exports.merge = undefined;
|
|
173527
|
-
var
|
|
175972
|
+
var merge22 = require_merge2();
|
|
173528
175973
|
function merge3(streams) {
|
|
173529
|
-
const mergedStream =
|
|
175974
|
+
const mergedStream = merge22(streams);
|
|
173530
175975
|
streams.forEach((stream) => {
|
|
173531
175976
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
173532
175977
|
});
|
|
@@ -173554,7 +175999,7 @@ var init_prettier = __esm(() => {
|
|
|
173554
175999
|
exports.isEmpty = isEmpty;
|
|
173555
176000
|
}
|
|
173556
176001
|
});
|
|
173557
|
-
|
|
176002
|
+
require_utils32 = __commonJS2({
|
|
173558
176003
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
173559
176004
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173560
176005
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -173578,7 +176023,7 @@ var init_prettier = __esm(() => {
|
|
|
173578
176023
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
173579
176024
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173580
176025
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
173581
|
-
var utils2 =
|
|
176026
|
+
var utils2 = require_utils32();
|
|
173582
176027
|
function generate(input, settings) {
|
|
173583
176028
|
const patterns = processPatterns(input, settings);
|
|
173584
176029
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -173887,7 +176332,7 @@ var init_prettier = __esm(() => {
|
|
|
173887
176332
|
exports.createDirentFromStats = createDirentFromStats;
|
|
173888
176333
|
}
|
|
173889
176334
|
});
|
|
173890
|
-
|
|
176335
|
+
require_utils42 = __commonJS2({
|
|
173891
176336
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
173892
176337
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
173893
176338
|
exports.fs = undefined;
|
|
@@ -173915,7 +176360,7 @@ var init_prettier = __esm(() => {
|
|
|
173915
176360
|
var fsStat = require_out();
|
|
173916
176361
|
var rpl = require_run_parallel();
|
|
173917
176362
|
var constants_1 = require_constants3();
|
|
173918
|
-
var utils2 =
|
|
176363
|
+
var utils2 = require_utils42();
|
|
173919
176364
|
var common = require_common();
|
|
173920
176365
|
function read3(directory, settings, callback) {
|
|
173921
176366
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -174021,7 +176466,7 @@ var init_prettier = __esm(() => {
|
|
|
174021
176466
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
174022
176467
|
var fsStat = require_out();
|
|
174023
176468
|
var constants_1 = require_constants3();
|
|
174024
|
-
var utils2 =
|
|
176469
|
+
var utils2 = require_utils42();
|
|
174025
176470
|
var common = require_common();
|
|
174026
176471
|
function read3(directory, settings) {
|
|
174027
176472
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -174801,7 +177246,7 @@ var init_prettier = __esm(() => {
|
|
|
174801
177246
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174802
177247
|
var path15 = __require2("path");
|
|
174803
177248
|
var fsStat = require_out();
|
|
174804
|
-
var utils2 =
|
|
177249
|
+
var utils2 = require_utils32();
|
|
174805
177250
|
var Reader = class {
|
|
174806
177251
|
constructor(_settings) {
|
|
174807
177252
|
this._settings = _settings;
|
|
@@ -174925,7 +177370,7 @@ var init_prettier = __esm(() => {
|
|
|
174925
177370
|
require_matcher = __commonJS2({
|
|
174926
177371
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
174927
177372
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
174928
|
-
var utils2 =
|
|
177373
|
+
var utils2 = require_utils32();
|
|
174929
177374
|
var Matcher = class {
|
|
174930
177375
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
174931
177376
|
this._patterns = _patterns;
|
|
@@ -174964,7 +177409,7 @@ var init_prettier = __esm(() => {
|
|
|
174964
177409
|
});
|
|
174965
177410
|
}
|
|
174966
177411
|
_splitSegmentsIntoSections(segments) {
|
|
174967
|
-
return utils2.array.splitWhen(segments, (
|
|
177412
|
+
return utils2.array.splitWhen(segments, (segment2) => segment2.dynamic && utils2.pattern.hasGlobStar(segment2.pattern));
|
|
174968
177413
|
}
|
|
174969
177414
|
};
|
|
174970
177415
|
exports.default = Matcher;
|
|
@@ -174985,11 +177430,11 @@ var init_prettier = __esm(() => {
|
|
|
174985
177430
|
return true;
|
|
174986
177431
|
}
|
|
174987
177432
|
const match = parts.every((part, index) => {
|
|
174988
|
-
const
|
|
174989
|
-
if (
|
|
177433
|
+
const segment2 = pattern.segments[index];
|
|
177434
|
+
if (segment2.dynamic && segment2.patternRe.test(part)) {
|
|
174990
177435
|
return true;
|
|
174991
177436
|
}
|
|
174992
|
-
if (!
|
|
177437
|
+
if (!segment2.dynamic && segment2.pattern === part) {
|
|
174993
177438
|
return true;
|
|
174994
177439
|
}
|
|
174995
177440
|
return false;
|
|
@@ -175007,7 +177452,7 @@ var init_prettier = __esm(() => {
|
|
|
175007
177452
|
require_deep = __commonJS2({
|
|
175008
177453
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
175009
177454
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175010
|
-
var utils2 =
|
|
177455
|
+
var utils2 = require_utils32();
|
|
175011
177456
|
var partial_1 = require_partial();
|
|
175012
177457
|
var DeepFilter = class {
|
|
175013
177458
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -175069,7 +177514,7 @@ var init_prettier = __esm(() => {
|
|
|
175069
177514
|
require_entry = __commonJS2({
|
|
175070
177515
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
175071
177516
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175072
|
-
var utils2 =
|
|
177517
|
+
var utils2 = require_utils32();
|
|
175073
177518
|
var EntryFilter = class {
|
|
175074
177519
|
constructor(_settings, _micromatchOptions) {
|
|
175075
177520
|
this._settings = _settings;
|
|
@@ -175154,7 +177599,7 @@ var init_prettier = __esm(() => {
|
|
|
175154
177599
|
require_error2 = __commonJS2({
|
|
175155
177600
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
175156
177601
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175157
|
-
var utils2 =
|
|
177602
|
+
var utils2 = require_utils32();
|
|
175158
177603
|
var ErrorFilter = class {
|
|
175159
177604
|
constructor(_settings) {
|
|
175160
177605
|
this._settings = _settings;
|
|
@@ -175172,7 +177617,7 @@ var init_prettier = __esm(() => {
|
|
|
175172
177617
|
require_entry2 = __commonJS2({
|
|
175173
177618
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
175174
177619
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175175
|
-
var utils2 =
|
|
177620
|
+
var utils2 = require_utils32();
|
|
175176
177621
|
var EntryTransformer = class {
|
|
175177
177622
|
constructor(_settings) {
|
|
175178
177623
|
this._settings = _settings;
|
|
@@ -175440,7 +177885,7 @@ var init_prettier = __esm(() => {
|
|
|
175440
177885
|
var stream_1 = require_stream4();
|
|
175441
177886
|
var sync_1 = require_sync6();
|
|
175442
177887
|
var settings_1 = require_settings4();
|
|
175443
|
-
var utils2 =
|
|
177888
|
+
var utils2 = require_utils32();
|
|
175444
177889
|
async function FastGlob(source2, options8) {
|
|
175445
177890
|
assertPatternsInput(source2);
|
|
175446
177891
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -175758,7 +178203,7 @@ var init_prettier = __esm(() => {
|
|
|
175758
178203
|
};
|
|
175759
178204
|
}
|
|
175760
178205
|
});
|
|
175761
|
-
|
|
178206
|
+
require_semver2 = __commonJS2({
|
|
175762
178207
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
175763
178208
|
var debug = require_debug();
|
|
175764
178209
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -176028,7 +178473,7 @@ var init_prettier = __esm(() => {
|
|
|
176028
178473
|
});
|
|
176029
178474
|
require_compare = __commonJS2({
|
|
176030
178475
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
176031
|
-
var SemVer =
|
|
178476
|
+
var SemVer = require_semver2();
|
|
176032
178477
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
176033
178478
|
module.exports = compare;
|
|
176034
178479
|
}
|
|
@@ -177761,7 +180206,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
177761
180206
|
};
|
|
177762
180207
|
}
|
|
177763
180208
|
});
|
|
177764
|
-
|
|
180209
|
+
require_src3 = __commonJS2({
|
|
177765
180210
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
177766
180211
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
177767
180212
|
return new (P9 || (P9 = Promise))(function(resolve32, reject) {
|
|
@@ -179224,7 +181669,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
179224
181669
|
mockable_default = mockable.mocked;
|
|
179225
181670
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
179226
181671
|
partition_default = partition2;
|
|
179227
|
-
import_editorconfig = __toESM2(
|
|
181672
|
+
import_editorconfig = __toESM2(require_src3(), 1);
|
|
179228
181673
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
179229
181674
|
FileSearcher = class extends Searcher {
|
|
179230
181675
|
findInDirectory = findFile;
|
|
@@ -181820,7 +184265,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
181820
184265
|
// package.json
|
|
181821
184266
|
var package_default = {
|
|
181822
184267
|
name: "@eigenpal/cli",
|
|
181823
|
-
version: "0.10.
|
|
184268
|
+
version: "0.10.23",
|
|
181824
184269
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
181825
184270
|
keywords: [
|
|
181826
184271
|
"eigenpal",
|
|
@@ -183334,7 +185779,7 @@ async function pushCurrentBranch(input) {
|
|
|
183334
185779
|
function slugifyPackageSegment(value) {
|
|
183335
185780
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
183336
185781
|
}
|
|
183337
|
-
function packagePathForTemplate(
|
|
185782
|
+
function packagePathForTemplate(template2, name) {
|
|
183338
185783
|
const slug = slugifyPackageSegment(name);
|
|
183339
185784
|
if (!slug)
|
|
183340
185785
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -183346,7 +185791,7 @@ function packagePathForTemplate(template, name) {
|
|
|
183346
185791
|
knowledge: "resources/knowledge",
|
|
183347
185792
|
evaluator: "evaluators"
|
|
183348
185793
|
};
|
|
183349
|
-
const root = rootByTemplate[
|
|
185794
|
+
const root = rootByTemplate[template2];
|
|
183350
185795
|
if (!root)
|
|
183351
185796
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
183352
185797
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -183755,12 +186200,12 @@ function archivePackage(input) {
|
|
|
183755
186200
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
183756
186201
|
cwd: input.gitRoot
|
|
183757
186202
|
});
|
|
183758
|
-
const
|
|
186203
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
183759
186204
|
cwd: input.outDir,
|
|
183760
186205
|
encoding: "utf8"
|
|
183761
186206
|
});
|
|
183762
|
-
if (
|
|
183763
|
-
throw new Error(
|
|
186207
|
+
if (extract2.status !== 0)
|
|
186208
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
183764
186209
|
} finally {
|
|
183765
186210
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
183766
186211
|
}
|
|
@@ -183789,12 +186234,12 @@ async function tryHostedArchive(input) {
|
|
|
183789
186234
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
183790
186235
|
try {
|
|
183791
186236
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
183792
|
-
const
|
|
186237
|
+
const extract2 = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
183793
186238
|
cwd: input.outDir,
|
|
183794
186239
|
encoding: "utf8"
|
|
183795
186240
|
});
|
|
183796
|
-
if (
|
|
183797
|
-
throw new Error(
|
|
186241
|
+
if (extract2.status !== 0)
|
|
186242
|
+
throw new Error(extract2.stderr.trim() || "tar extraction failed");
|
|
183798
186243
|
return true;
|
|
183799
186244
|
} finally {
|
|
183800
186245
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -188149,18 +190594,18 @@ async function init(name, opts) {
|
|
|
188149
190594
|
if (existsSync11(target) && readdirSync2(target).length > 0) {
|
|
188150
190595
|
throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
|
|
188151
190596
|
}
|
|
188152
|
-
let
|
|
190597
|
+
let template2;
|
|
188153
190598
|
if (opts.template) {
|
|
188154
190599
|
if (!isTemplateName(opts.template)) {
|
|
188155
190600
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
188156
190601
|
}
|
|
188157
|
-
|
|
190602
|
+
template2 = opts.template;
|
|
188158
190603
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
188159
|
-
|
|
190604
|
+
template2 = "blank";
|
|
188160
190605
|
} else {
|
|
188161
|
-
|
|
190606
|
+
template2 = await promptForTemplate();
|
|
188162
190607
|
}
|
|
188163
|
-
const sourceRoot = join2(resolveTemplatesRoot(),
|
|
190608
|
+
const sourceRoot = join2(resolveTemplatesRoot(), template2);
|
|
188164
190609
|
if (!existsSync11(sourceRoot)) {
|
|
188165
190610
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
188166
190611
|
}
|