@eigenpal/cli 0.10.21 → 0.10.22
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 +314 -2759
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -17080,143 +17080,8 @@ var require_picocolors = __commonJS((exports, module) => {
|
|
|
17080
17080
|
module.exports.createColors = createColors;
|
|
17081
17081
|
});
|
|
17082
17082
|
|
|
17083
|
-
// ../../node_modules/nanoid/url-alphabet/index.js
|
|
17084
|
-
var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
17085
|
-
|
|
17086
|
-
// ../../node_modules/nanoid/index.js
|
|
17087
|
-
import { webcrypto as crypto } from "node:crypto";
|
|
17088
|
-
function fillPool(bytes) {
|
|
17089
|
-
if (!pool || pool.length < bytes) {
|
|
17090
|
-
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
17091
|
-
crypto.getRandomValues(pool);
|
|
17092
|
-
poolOffset = 0;
|
|
17093
|
-
} else if (poolOffset + bytes > pool.length) {
|
|
17094
|
-
crypto.getRandomValues(pool);
|
|
17095
|
-
poolOffset = 0;
|
|
17096
|
-
}
|
|
17097
|
-
poolOffset += bytes;
|
|
17098
|
-
}
|
|
17099
|
-
function nanoid3(size = 21) {
|
|
17100
|
-
fillPool(size |= 0);
|
|
17101
|
-
let id = "";
|
|
17102
|
-
for (let i = poolOffset - size;i < poolOffset; i++) {
|
|
17103
|
-
id += urlAlphabet[pool[i] & 63];
|
|
17104
|
-
}
|
|
17105
|
-
return id;
|
|
17106
|
-
}
|
|
17107
|
-
var POOL_SIZE_MULTIPLIER = 128, pool, poolOffset;
|
|
17108
|
-
var init_nanoid = () => {};
|
|
17109
|
-
|
|
17110
|
-
// ../types/src/core/common.ts
|
|
17111
|
-
function generateId(prefix) {
|
|
17112
|
-
const id = nanoid3();
|
|
17113
|
-
return prefix ? `${prefix}_${id}` : id;
|
|
17114
|
-
}
|
|
17115
|
-
function toJsonSchema(schema) {
|
|
17116
|
-
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
17117
|
-
}
|
|
17118
|
-
var ID_PREFIXES, TimestampSchema, JsonSchemaSchema, BaseEntitySchema;
|
|
17119
|
-
var init_common = __esm(() => {
|
|
17120
|
-
init_nanoid();
|
|
17121
|
-
init_zod();
|
|
17122
|
-
ID_PREFIXES = {
|
|
17123
|
-
WORKFLOW: "wf",
|
|
17124
|
-
WORKFLOW_VERSION: "wfv",
|
|
17125
|
-
WORKFLOW_HISTORY: "wfh",
|
|
17126
|
-
JOB: "job",
|
|
17127
|
-
EXECUTION: "exec",
|
|
17128
|
-
STEP_EXECUTION: "step",
|
|
17129
|
-
FILE: "file",
|
|
17130
|
-
TEMPLATE: "tmpl",
|
|
17131
|
-
USER: "user",
|
|
17132
|
-
TENANT: "org",
|
|
17133
|
-
TENANT_INVITE: "inv",
|
|
17134
|
-
API_KEY: "eig",
|
|
17135
|
-
PROCESSOR: "proc",
|
|
17136
|
-
AI_PROVIDER: "aip",
|
|
17137
|
-
ACCOUNT: "acct",
|
|
17138
|
-
SESSION: "sess",
|
|
17139
|
-
VERIFICATION: "vrf",
|
|
17140
|
-
DATASET: "ds",
|
|
17141
|
-
DATASET_EXAMPLE: "dex",
|
|
17142
|
-
EXPERIMENT: "exp",
|
|
17143
|
-
EXPERIMENT_RUN: "exr",
|
|
17144
|
-
EXPERIMENT_EVALUATION: "evl",
|
|
17145
|
-
EVAL_EXAMPLE: "evx",
|
|
17146
|
-
EVAL_RESULT: "evr",
|
|
17147
|
-
EVAL_BATCH: "evb",
|
|
17148
|
-
RUN_REVIEW: "rev",
|
|
17149
|
-
RUN_REVIEW_CORRECTION: "rvc",
|
|
17150
|
-
TABLE_ROW: "row",
|
|
17151
|
-
FOLDER: "fldr",
|
|
17152
|
-
AGENT_WORKFLOW: "awf",
|
|
17153
|
-
AGENT_EXECUTION: "aex",
|
|
17154
|
-
AGENT_EXAMPLE: "aeg",
|
|
17155
|
-
AGENT_VERSION: "avr",
|
|
17156
|
-
AGENT_TRAINING_SESSION: "ats",
|
|
17157
|
-
AGENT_EXPERIMENT: "aexp",
|
|
17158
|
-
AGENT_EMAIL_ALIAS: "aea",
|
|
17159
|
-
AGENT_EMAIL_INVOCATION: "aei",
|
|
17160
|
-
AUTOMATION_TRIGGER: "atr",
|
|
17161
|
-
FILE_SOURCE_CONFIG: "fsc",
|
|
17162
|
-
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
|
-
|
|
17214
17083
|
// ../types/src/core/index.ts
|
|
17215
|
-
var init_core3 =
|
|
17216
|
-
init_common();
|
|
17217
|
-
init_ids();
|
|
17218
|
-
init_pagination();
|
|
17219
|
-
});
|
|
17084
|
+
var init_core3 = () => {};
|
|
17220
17085
|
|
|
17221
17086
|
// ../types/src/files/legacy-boundary.ts
|
|
17222
17087
|
var LEGACY_FILE_REF_COMPATIBILITY;
|
|
@@ -17241,9 +17106,6 @@ var init_legacy_boundary = __esm(() => {
|
|
|
17241
17106
|
function isRuntimeFileRef(input) {
|
|
17242
17107
|
return RuntimeFileRefSchema.safeParse(input).success;
|
|
17243
17108
|
}
|
|
17244
|
-
function isFilePathDescriptor(input) {
|
|
17245
|
-
return FilePathDescriptorSchema.safeParse(input).success;
|
|
17246
|
-
}
|
|
17247
17109
|
function isResolvedProcessorFile(input) {
|
|
17248
17110
|
return ResolvedProcessorFileSchema.safeParse(input).success;
|
|
17249
17111
|
}
|
|
@@ -17466,2411 +17328,11 @@ var init_scoped_file_ref = __esm(() => {
|
|
|
17466
17328
|
]);
|
|
17467
17329
|
});
|
|
17468
17330
|
|
|
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
|
-
|
|
19863
17331
|
// ../types/src/processor/index.ts
|
|
19864
|
-
var
|
|
19865
|
-
init_processor();
|
|
19866
|
-
init_execution();
|
|
19867
|
-
init_configs();
|
|
19868
|
-
});
|
|
17332
|
+
var init_processor = () => {};
|
|
19869
17333
|
|
|
19870
17334
|
// ../types/src/parser/index.ts
|
|
19871
|
-
var
|
|
19872
|
-
init_parser();
|
|
19873
|
-
});
|
|
17335
|
+
var init_parser = () => {};
|
|
19874
17336
|
|
|
19875
17337
|
// ../types/src/otel/semantic-conventions.ts
|
|
19876
17338
|
function mapLLMAttributes(attrs) {
|
|
@@ -22908,9 +20370,9 @@ var require_validate = __commonJS((exports) => {
|
|
|
22908
20370
|
}
|
|
22909
20371
|
let expr = data;
|
|
22910
20372
|
const segments = jsonPointer.split("/");
|
|
22911
|
-
for (const
|
|
22912
|
-
if (
|
|
22913
|
-
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(
|
|
20373
|
+
for (const segment of segments) {
|
|
20374
|
+
if (segment) {
|
|
20375
|
+
data = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;
|
|
22914
20376
|
expr = (0, codegen_1._)`${expr} && ${data}`;
|
|
22915
20377
|
}
|
|
22916
20378
|
}
|
|
@@ -23190,7 +20652,7 @@ var require_data = __commonJS((exports, module) => {
|
|
|
23190
20652
|
});
|
|
23191
20653
|
|
|
23192
20654
|
// ../../node_modules/fast-uri/lib/utils.js
|
|
23193
|
-
var
|
|
20655
|
+
var require_utils = __commonJS((exports, module) => {
|
|
23194
20656
|
var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
|
|
23195
20657
|
var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
|
|
23196
20658
|
function stringArrayToHexStripped(input) {
|
|
@@ -23446,7 +20908,7 @@ var require_utils3 = __commonJS((exports, module) => {
|
|
|
23446
20908
|
|
|
23447
20909
|
// ../../node_modules/fast-uri/lib/schemes.js
|
|
23448
20910
|
var require_schemes = __commonJS((exports, module) => {
|
|
23449
|
-
var { isUUID } =
|
|
20911
|
+
var { isUUID } = require_utils();
|
|
23450
20912
|
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
23451
20913
|
var supportedSchemeNames = [
|
|
23452
20914
|
"http",
|
|
@@ -23620,7 +21082,7 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
23620
21082
|
|
|
23621
21083
|
// ../../node_modules/fast-uri/index.js
|
|
23622
21084
|
var require_fast_uri = __commonJS((exports, module) => {
|
|
23623
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } =
|
|
21085
|
+
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
|
|
23624
21086
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
23625
21087
|
function normalize(uri, options) {
|
|
23626
21088
|
if (typeof uri === "string") {
|
|
@@ -26030,7 +23492,7 @@ var require_draft7 = __commonJS((exports) => {
|
|
|
26030
23492
|
});
|
|
26031
23493
|
|
|
26032
23494
|
// ../../node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
26033
|
-
var
|
|
23495
|
+
var require_types = __commonJS((exports) => {
|
|
26034
23496
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26035
23497
|
exports.DiscrError = undefined;
|
|
26036
23498
|
var DiscrError;
|
|
@@ -26044,7 +23506,7 @@ var require_types2 = __commonJS((exports) => {
|
|
|
26044
23506
|
var require_discriminator = __commonJS((exports) => {
|
|
26045
23507
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26046
23508
|
var codegen_1 = require_codegen();
|
|
26047
|
-
var types_1 =
|
|
23509
|
+
var types_1 = require_types();
|
|
26048
23510
|
var compile_1 = require_compile();
|
|
26049
23511
|
var ref_error_1 = require_ref_error();
|
|
26050
23512
|
var util_1 = require_util();
|
|
@@ -26972,6 +24434,24 @@ var init_validation = __esm(() => {
|
|
|
26972
24434
|
init_workspace_schema();
|
|
26973
24435
|
});
|
|
26974
24436
|
|
|
24437
|
+
// ../types/src/core/common.ts
|
|
24438
|
+
function toJsonSchema2(schema) {
|
|
24439
|
+
return exports_external.toJSONSchema(schema, { target: "draft-7" });
|
|
24440
|
+
}
|
|
24441
|
+
var TimestampSchema2, JsonSchemaSchema2, BaseEntitySchema2;
|
|
24442
|
+
var init_common = __esm(() => {
|
|
24443
|
+
init_zod();
|
|
24444
|
+
TimestampSchema2 = exports_external.union([exports_external.date(), exports_external.string().datetime()]).transform((val) => {
|
|
24445
|
+
return typeof val === "string" ? new Date(val) : val;
|
|
24446
|
+
});
|
|
24447
|
+
JsonSchemaSchema2 = exports_external.record(exports_external.string(), exports_external.unknown());
|
|
24448
|
+
BaseEntitySchema2 = exports_external.object({
|
|
24449
|
+
id: exports_external.string(),
|
|
24450
|
+
createdAt: TimestampSchema2.optional(),
|
|
24451
|
+
updatedAt: TimestampSchema2.optional()
|
|
24452
|
+
});
|
|
24453
|
+
});
|
|
24454
|
+
|
|
26975
24455
|
// ../../node_modules/@babel/parser/lib/index.js
|
|
26976
24456
|
var require_lib = __commonJS((exports) => {
|
|
26977
24457
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -27385,12 +24865,12 @@ var require_lib = __commonJS((exports) => {
|
|
|
27385
24865
|
}
|
|
27386
24866
|
const ParseErrorConstructors = {};
|
|
27387
24867
|
for (const reasonCode of Object.keys(argument)) {
|
|
27388
|
-
const
|
|
27389
|
-
const _ref = typeof
|
|
27390
|
-
message: () =>
|
|
27391
|
-
} : typeof
|
|
27392
|
-
message:
|
|
27393
|
-
} :
|
|
24868
|
+
const template = argument[reasonCode];
|
|
24869
|
+
const _ref = typeof template === "string" ? {
|
|
24870
|
+
message: () => template
|
|
24871
|
+
} : typeof template === "function" ? {
|
|
24872
|
+
message: template
|
|
24873
|
+
} : template, {
|
|
27394
24874
|
message
|
|
27395
24875
|
} = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
27396
24876
|
const toMessage = typeof message === "string" ? () => message : message;
|
|
@@ -41863,7 +39343,7 @@ var require_keywords = __commonJS((exports) => {
|
|
|
41863
39343
|
});
|
|
41864
39344
|
|
|
41865
39345
|
// ../../node_modules/sucrase/dist/parser/tokenizer/types.js
|
|
41866
|
-
var
|
|
39346
|
+
var require_types2 = __commonJS((exports) => {
|
|
41867
39347
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41868
39348
|
var TokenType;
|
|
41869
39349
|
(function(TokenType2) {
|
|
@@ -41927,8 +39407,8 @@ var require_types3 = __commonJS((exports) => {
|
|
|
41927
39407
|
TokenType2[TokenType2["questionDot"] = questionDot] = "questionDot";
|
|
41928
39408
|
const arrow = 22528;
|
|
41929
39409
|
TokenType2[TokenType2["arrow"] = arrow] = "arrow";
|
|
41930
|
-
const
|
|
41931
|
-
TokenType2[TokenType2["template"] =
|
|
39410
|
+
const template = 23552;
|
|
39411
|
+
TokenType2[TokenType2["template"] = template] = "template";
|
|
41932
39412
|
const ellipsis = 24576;
|
|
41933
39413
|
TokenType2[TokenType2["ellipsis"] = ellipsis] = "ellipsis";
|
|
41934
39414
|
const backQuote = 25600;
|
|
@@ -42347,7 +39827,7 @@ var require_types3 = __commonJS((exports) => {
|
|
|
42347
39827
|
var require_state = __commonJS((exports) => {
|
|
42348
39828
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42349
39829
|
var _keywords = require_keywords();
|
|
42350
|
-
var _types =
|
|
39830
|
+
var _types = require_types2();
|
|
42351
39831
|
|
|
42352
39832
|
class Scope {
|
|
42353
39833
|
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
|
|
@@ -42733,7 +40213,7 @@ var require_base = __commonJS((exports) => {
|
|
|
42733
40213
|
var require_util2 = __commonJS((exports) => {
|
|
42734
40214
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42735
40215
|
var _index = require_tokenizer();
|
|
42736
|
-
var _types =
|
|
40216
|
+
var _types = require_types2();
|
|
42737
40217
|
var _charcodes = require_charcodes();
|
|
42738
40218
|
var _base = require_base();
|
|
42739
40219
|
function isContextual(contextualKeyword) {
|
|
@@ -42895,7 +40375,7 @@ var require_identifier = __commonJS((exports) => {
|
|
|
42895
40375
|
var require_readWordTree = __commonJS((exports) => {
|
|
42896
40376
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42897
40377
|
var _keywords = require_keywords();
|
|
42898
|
-
var _types =
|
|
40378
|
+
var _types = require_types2();
|
|
42899
40379
|
var READ_WORD_TREE = new Int32Array([
|
|
42900
40380
|
-1,
|
|
42901
40381
|
27,
|
|
@@ -51873,7 +49353,7 @@ var require_readWord = __commonJS((exports) => {
|
|
|
51873
49353
|
var _identifier = require_identifier();
|
|
51874
49354
|
var _index = require_tokenizer();
|
|
51875
49355
|
var _readWordTree = require_readWordTree();
|
|
51876
|
-
var _types =
|
|
49356
|
+
var _types = require_types2();
|
|
51877
49357
|
function readWord() {
|
|
51878
49358
|
let treePos = 0;
|
|
51879
49359
|
let code = 0;
|
|
@@ -51939,7 +49419,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
51939
49419
|
var _keywords = require_keywords();
|
|
51940
49420
|
var _readWord = require_readWord();
|
|
51941
49421
|
var _readWord2 = _interopRequireDefault(_readWord);
|
|
51942
|
-
var _types =
|
|
49422
|
+
var _types = require_types2();
|
|
51943
49423
|
var IdentifierRole;
|
|
51944
49424
|
(function(IdentifierRole2) {
|
|
51945
49425
|
const Access = 0;
|
|
@@ -52656,7 +50136,7 @@ var require_tokenizer = __commonJS((exports) => {
|
|
|
52656
50136
|
// ../../node_modules/sucrase/dist/util/getImportExportSpecifierInfo.js
|
|
52657
50137
|
var require_getImportExportSpecifierInfo = __commonJS((exports) => {
|
|
52658
50138
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52659
|
-
var _types =
|
|
50139
|
+
var _types = require_types2();
|
|
52660
50140
|
function getImportExportSpecifierInfo(tokens, index = tokens.currentIndex()) {
|
|
52661
50141
|
let endIndex = index + 1;
|
|
52662
50142
|
if (isSpecifierEnd(tokens, endIndex)) {
|
|
@@ -53009,7 +50489,7 @@ var require_JSXTransformer = __commonJS((exports) => {
|
|
|
53009
50489
|
var _xhtml = require_xhtml();
|
|
53010
50490
|
var _xhtml2 = _interopRequireDefault(_xhtml);
|
|
53011
50491
|
var _tokenizer = require_tokenizer();
|
|
53012
|
-
var _types =
|
|
50492
|
+
var _types = require_types2();
|
|
53013
50493
|
var _charcodes = require_charcodes();
|
|
53014
50494
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
53015
50495
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -53513,7 +50993,7 @@ var require_getNonTypeIdentifiers = __commonJS((exports) => {
|
|
|
53513
50993
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
53514
50994
|
}
|
|
53515
50995
|
var _tokenizer = require_tokenizer();
|
|
53516
|
-
var _types =
|
|
50996
|
+
var _types = require_types2();
|
|
53517
50997
|
var _JSXTransformer = require_JSXTransformer();
|
|
53518
50998
|
var _getJSXPragmaInfo = require_getJSXPragmaInfo();
|
|
53519
50999
|
var _getJSXPragmaInfo2 = _interopRequireDefault(_getJSXPragmaInfo);
|
|
@@ -53552,7 +51032,7 @@ var require_CJSImportProcessor = __commonJS((exports) => {
|
|
|
53552
51032
|
}
|
|
53553
51033
|
var _tokenizer = require_tokenizer();
|
|
53554
51034
|
var _keywords = require_keywords();
|
|
53555
|
-
var _types =
|
|
51035
|
+
var _types = require_types2();
|
|
53556
51036
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
53557
51037
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
53558
51038
|
var _getNonTypeIdentifiers = require_getNonTypeIdentifiers();
|
|
@@ -54323,18 +51803,18 @@ var require_sourcemap_codec_umd = __commonJS((exports, module) => {
|
|
|
54323
51803
|
continue;
|
|
54324
51804
|
let genColumn = 0;
|
|
54325
51805
|
for (let j = 0;j < line.length; j++) {
|
|
54326
|
-
const
|
|
51806
|
+
const segment = line[j];
|
|
54327
51807
|
if (j > 0)
|
|
54328
51808
|
writer.write(comma);
|
|
54329
|
-
genColumn = encodeInteger(writer,
|
|
54330
|
-
if (
|
|
51809
|
+
genColumn = encodeInteger(writer, segment[0], genColumn);
|
|
51810
|
+
if (segment.length === 1)
|
|
54331
51811
|
continue;
|
|
54332
|
-
sourcesIndex = encodeInteger(writer,
|
|
54333
|
-
sourceLine = encodeInteger(writer,
|
|
54334
|
-
sourceColumn = encodeInteger(writer,
|
|
54335
|
-
if (
|
|
51812
|
+
sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
|
|
51813
|
+
sourceLine = encodeInteger(writer, segment[2], sourceLine);
|
|
51814
|
+
sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
|
|
51815
|
+
if (segment.length === 4)
|
|
54336
51816
|
continue;
|
|
54337
|
-
namesIndex = encodeInteger(writer,
|
|
51817
|
+
namesIndex = encodeInteger(writer, segment[4], namesIndex);
|
|
54338
51818
|
}
|
|
54339
51819
|
}
|
|
54340
51820
|
return writer.flush();
|
|
@@ -54889,11 +52369,11 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
54889
52369
|
const index = traceSegmentInternal(segments, cast(map2)._decodedMemo, line, column, bias || GREATEST_LOWER_BOUND);
|
|
54890
52370
|
if (index === -1)
|
|
54891
52371
|
return OMapping(null, null, null, null);
|
|
54892
|
-
const
|
|
54893
|
-
if (
|
|
52372
|
+
const segment = segments[index];
|
|
52373
|
+
if (segment.length === 1)
|
|
54894
52374
|
return OMapping(null, null, null, null);
|
|
54895
52375
|
const { names, resolvedSources } = map2;
|
|
54896
|
-
return OMapping(resolvedSources[
|
|
52376
|
+
return OMapping(resolvedSources[segment[SOURCES_INDEX]], segment[SOURCE_LINE] + 1, segment[SOURCE_COLUMN], segment.length === 5 ? names[segment[NAMES_INDEX]] : null);
|
|
54897
52377
|
}
|
|
54898
52378
|
function generatedPositionFor(map2, needle) {
|
|
54899
52379
|
const { source, line, column, bias } = needle;
|
|
@@ -55006,8 +52486,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
55006
52486
|
const max = upperBound(segments, matchedColumn, min);
|
|
55007
52487
|
const result = [];
|
|
55008
52488
|
for (;min <= max; min++) {
|
|
55009
|
-
const
|
|
55010
|
-
result.push(GMapping(
|
|
52489
|
+
const segment = segments[min];
|
|
52490
|
+
result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
|
|
55011
52491
|
}
|
|
55012
52492
|
return result;
|
|
55013
52493
|
}
|
|
@@ -55035,8 +52515,8 @@ var require_trace_mapping_umd = __commonJS((exports, module) => {
|
|
|
55035
52515
|
const index = traceSegmentInternal(segments, memo, line, column, bias);
|
|
55036
52516
|
if (index === -1)
|
|
55037
52517
|
return GMapping(null, null);
|
|
55038
|
-
const
|
|
55039
|
-
return GMapping(
|
|
52518
|
+
const segment = segments[index];
|
|
52519
|
+
return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
|
|
55040
52520
|
}
|
|
55041
52521
|
});
|
|
55042
52522
|
});
|
|
@@ -55587,7 +53067,7 @@ var require_HelperManager = __commonJS((exports) => {
|
|
|
55587
53067
|
var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
55588
53068
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55589
53069
|
var _tokenizer = require_tokenizer();
|
|
55590
|
-
var _types =
|
|
53070
|
+
var _types = require_types2();
|
|
55591
53071
|
function identifyShadowedGlobals(tokens, scopes, globalNames) {
|
|
55592
53072
|
if (!hasShadowedGlobals(tokens, globalNames)) {
|
|
55593
53073
|
return;
|
|
@@ -55652,7 +53132,7 @@ var require_identifyShadowedGlobals = __commonJS((exports) => {
|
|
|
55652
53132
|
// ../../node_modules/sucrase/dist/util/getIdentifierNames.js
|
|
55653
53133
|
var require_getIdentifierNames = __commonJS((exports) => {
|
|
55654
53134
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55655
|
-
var _types =
|
|
53135
|
+
var _types = require_types2();
|
|
55656
53136
|
function getIdentifierNames(code, tokens) {
|
|
55657
53137
|
const names = [];
|
|
55658
53138
|
for (const token of tokens) {
|
|
@@ -55828,7 +53308,7 @@ var require_util3 = __commonJS((exports) => {
|
|
|
55828
53308
|
});
|
|
55829
53309
|
|
|
55830
53310
|
// ../../node_modules/ts-interface-checker/dist/types.js
|
|
55831
|
-
var
|
|
53311
|
+
var require_types3 = __commonJS((exports) => {
|
|
55832
53312
|
var __extends = exports && exports.__extends || function() {
|
|
55833
53313
|
var extendStatics = function(d, b) {
|
|
55834
53314
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -56428,9 +53908,9 @@ var require_dist2 = __commonJS((exports) => {
|
|
|
56428
53908
|
};
|
|
56429
53909
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56430
53910
|
exports.Checker = exports.createCheckers = undefined;
|
|
56431
|
-
var types_1 =
|
|
53911
|
+
var types_1 = require_types3();
|
|
56432
53912
|
var util_1 = require_util3();
|
|
56433
|
-
var types_2 =
|
|
53913
|
+
var types_2 = require_types3();
|
|
56434
53914
|
Object.defineProperty(exports, "TArray", { enumerable: true, get: function() {
|
|
56435
53915
|
return types_2.TArray;
|
|
56436
53916
|
} });
|
|
@@ -56712,7 +54192,7 @@ var require_lval = __commonJS((exports) => {
|
|
|
56712
54192
|
var _typescript = require_typescript();
|
|
56713
54193
|
var _index = require_tokenizer();
|
|
56714
54194
|
var _keywords = require_keywords();
|
|
56715
|
-
var _types =
|
|
54195
|
+
var _types = require_types2();
|
|
56716
54196
|
var _base = require_base();
|
|
56717
54197
|
var _expression = require_expression();
|
|
56718
54198
|
var _util = require_util2();
|
|
@@ -56844,7 +54324,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
56844
54324
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
56845
54325
|
var _index = require_tokenizer();
|
|
56846
54326
|
var _keywords = require_keywords();
|
|
56847
|
-
var _types =
|
|
54327
|
+
var _types = require_types2();
|
|
56848
54328
|
var _base = require_base();
|
|
56849
54329
|
var _expression = require_expression();
|
|
56850
54330
|
var _lval = require_lval();
|
|
@@ -58106,7 +55586,7 @@ var require_typescript = __commonJS((exports) => {
|
|
|
58106
55586
|
var require_jsx = __commonJS((exports) => {
|
|
58107
55587
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58108
55588
|
var _index = require_tokenizer();
|
|
58109
|
-
var _types =
|
|
55589
|
+
var _types = require_types2();
|
|
58110
55590
|
var _base = require_base();
|
|
58111
55591
|
var _expression = require_expression();
|
|
58112
55592
|
var _util = require_util2();
|
|
@@ -58369,10 +55849,10 @@ var require_jsx = __commonJS((exports) => {
|
|
|
58369
55849
|
});
|
|
58370
55850
|
|
|
58371
55851
|
// ../../node_modules/sucrase/dist/parser/plugins/types.js
|
|
58372
|
-
var
|
|
55852
|
+
var require_types4 = __commonJS((exports) => {
|
|
58373
55853
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58374
55854
|
var _index = require_tokenizer();
|
|
58375
|
-
var _types =
|
|
55855
|
+
var _types = require_types2();
|
|
58376
55856
|
var _base = require_base();
|
|
58377
55857
|
var _expression = require_expression();
|
|
58378
55858
|
var _flow = require_flow();
|
|
@@ -58405,12 +55885,12 @@ var require_expression = __commonJS((exports) => {
|
|
|
58405
55885
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58406
55886
|
var _flow = require_flow();
|
|
58407
55887
|
var _index = require_jsx();
|
|
58408
|
-
var _types =
|
|
55888
|
+
var _types = require_types4();
|
|
58409
55889
|
var _typescript = require_typescript();
|
|
58410
55890
|
var _index3 = require_tokenizer();
|
|
58411
55891
|
var _keywords = require_keywords();
|
|
58412
55892
|
var _state = require_state();
|
|
58413
|
-
var _types3 =
|
|
55893
|
+
var _types3 = require_types2();
|
|
58414
55894
|
var _charcodes = require_charcodes();
|
|
58415
55895
|
var _identifier = require_identifier();
|
|
58416
55896
|
var _base = require_base();
|
|
@@ -59126,7 +56606,7 @@ var require_flow = __commonJS((exports) => {
|
|
|
59126
56606
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59127
56607
|
var _index = require_tokenizer();
|
|
59128
56608
|
var _keywords = require_keywords();
|
|
59129
|
-
var _types =
|
|
56609
|
+
var _types = require_types2();
|
|
59130
56610
|
var _base = require_base();
|
|
59131
56611
|
var _expression = require_expression();
|
|
59132
56612
|
var _statement = require_statement();
|
|
@@ -60001,7 +57481,7 @@ var require_statement = __commonJS((exports) => {
|
|
|
60001
57481
|
var _tokenizer = require_tokenizer();
|
|
60002
57482
|
var _keywords = require_keywords();
|
|
60003
57483
|
var _state = require_state();
|
|
60004
|
-
var _types =
|
|
57484
|
+
var _types = require_types2();
|
|
60005
57485
|
var _charcodes = require_charcodes();
|
|
60006
57486
|
var _base = require_base();
|
|
60007
57487
|
var _expression = require_expression();
|
|
@@ -61036,7 +58516,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
61036
58516
|
function _interopRequireDefault(obj) {
|
|
61037
58517
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
61038
58518
|
}
|
|
61039
|
-
var _types =
|
|
58519
|
+
var _types = require_types2();
|
|
61040
58520
|
var _isAsyncOperation = require_isAsyncOperation();
|
|
61041
58521
|
var _isAsyncOperation2 = _interopRequireDefault(_isAsyncOperation);
|
|
61042
58522
|
|
|
@@ -61294,7 +58774,7 @@ var require_TokenProcessor = __commonJS((exports) => {
|
|
|
61294
58774
|
var require_getClassInfo = __commonJS((exports) => {
|
|
61295
58775
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61296
58776
|
var _keywords = require_keywords();
|
|
61297
|
-
var _types =
|
|
58777
|
+
var _types = require_types2();
|
|
61298
58778
|
function getClassInfo(rootTransformer, tokens, nameManager, disableESTransforms) {
|
|
61299
58779
|
const snapshot = tokens.snapshot();
|
|
61300
58780
|
const headerInfo = processClassHeader(tokens);
|
|
@@ -61532,7 +59012,7 @@ var require_getClassInfo = __commonJS((exports) => {
|
|
|
61532
59012
|
// ../../node_modules/sucrase/dist/util/elideImportEquals.js
|
|
61533
59013
|
var require_elideImportEquals = __commonJS((exports) => {
|
|
61534
59014
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61535
|
-
var _types =
|
|
59015
|
+
var _types = require_types2();
|
|
61536
59016
|
function elideImportEquals(tokens) {
|
|
61537
59017
|
tokens.removeInitialToken();
|
|
61538
59018
|
tokens.removeToken();
|
|
@@ -61556,7 +59036,7 @@ var require_elideImportEquals = __commonJS((exports) => {
|
|
|
61556
59036
|
var require_getDeclarationInfo = __commonJS((exports) => {
|
|
61557
59037
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61558
59038
|
var _tokenizer = require_tokenizer();
|
|
61559
|
-
var _types =
|
|
59039
|
+
var _types = require_types2();
|
|
61560
59040
|
var EMPTY_DECLARATION_INFO = {
|
|
61561
59041
|
typeDeclarations: new Set,
|
|
61562
59042
|
valueDeclarations: new Set
|
|
@@ -61584,7 +59064,7 @@ var require_getDeclarationInfo = __commonJS((exports) => {
|
|
|
61584
59064
|
var require_isExportFrom = __commonJS((exports) => {
|
|
61585
59065
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61586
59066
|
var _keywords = require_keywords();
|
|
61587
|
-
var _types =
|
|
59067
|
+
var _types = require_types2();
|
|
61588
59068
|
function isExportFrom(tokens) {
|
|
61589
59069
|
let closeBraceIndex = tokens.currentIndex();
|
|
61590
59070
|
while (!tokens.matches1AtIndex(closeBraceIndex, _types.TokenType.braceR)) {
|
|
@@ -61599,7 +59079,7 @@ var require_isExportFrom = __commonJS((exports) => {
|
|
|
61599
59079
|
var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
61600
59080
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61601
59081
|
var _keywords = require_keywords();
|
|
61602
|
-
var _types =
|
|
59082
|
+
var _types = require_types2();
|
|
61603
59083
|
function removeMaybeImportAttributes(tokens) {
|
|
61604
59084
|
if (tokens.matches2(_types.TokenType._with, _types.TokenType.braceL) || tokens.matches2(_types.TokenType.name, _types.TokenType.braceL) && tokens.matchesContextual(_keywords.ContextualKeyword._assert)) {
|
|
61605
59085
|
tokens.removeToken();
|
|
@@ -61614,7 +59094,7 @@ var require_removeMaybeImportAttributes = __commonJS((exports) => {
|
|
|
61614
59094
|
// ../../node_modules/sucrase/dist/util/shouldElideDefaultExport.js
|
|
61615
59095
|
var require_shouldElideDefaultExport = __commonJS((exports) => {
|
|
61616
59096
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61617
|
-
var _types =
|
|
59097
|
+
var _types = require_types2();
|
|
61618
59098
|
function shouldElideDefaultExport(isTypeScriptTransformEnabled, keepUnusedImports, tokens, declarationInfo) {
|
|
61619
59099
|
if (!isTypeScriptTransformEnabled || keepUnusedImports) {
|
|
61620
59100
|
return false;
|
|
@@ -61645,7 +59125,7 @@ var require_CJSImportTransformer = __commonJS((exports) => {
|
|
|
61645
59125
|
}
|
|
61646
59126
|
var _tokenizer = require_tokenizer();
|
|
61647
59127
|
var _keywords = require_keywords();
|
|
61648
|
-
var _types =
|
|
59128
|
+
var _types = require_types2();
|
|
61649
59129
|
var _elideImportEquals = require_elideImportEquals();
|
|
61650
59130
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
61651
59131
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -62287,7 +59767,7 @@ var require_ESMImportTransformer = __commonJS((exports) => {
|
|
|
62287
59767
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62288
59768
|
}
|
|
62289
59769
|
var _keywords = require_keywords();
|
|
62290
|
-
var _types =
|
|
59770
|
+
var _types = require_types2();
|
|
62291
59771
|
var _elideImportEquals = require_elideImportEquals();
|
|
62292
59772
|
var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
|
|
62293
59773
|
var _getDeclarationInfo = require_getDeclarationInfo();
|
|
@@ -62557,7 +60037,7 @@ var require_FlowTransformer = __commonJS((exports) => {
|
|
|
62557
60037
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62558
60038
|
}
|
|
62559
60039
|
var _keywords = require_keywords();
|
|
62560
|
-
var _types =
|
|
60040
|
+
var _types = require_types2();
|
|
62561
60041
|
var _Transformer = require_Transformer();
|
|
62562
60042
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62563
60043
|
|
|
@@ -62677,7 +60157,7 @@ var require_JestHoistTransformer = __commonJS((exports) => {
|
|
|
62677
60157
|
}
|
|
62678
60158
|
return value;
|
|
62679
60159
|
}
|
|
62680
|
-
var _types =
|
|
60160
|
+
var _types = require_types2();
|
|
62681
60161
|
var _Transformer = require_Transformer();
|
|
62682
60162
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62683
60163
|
var JEST_GLOBAL_NAME = "jest";
|
|
@@ -62751,7 +60231,7 @@ var require_NumericSeparatorTransformer = __commonJS((exports) => {
|
|
|
62751
60231
|
function _interopRequireDefault(obj) {
|
|
62752
60232
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62753
60233
|
}
|
|
62754
|
-
var _types =
|
|
60234
|
+
var _types = require_types2();
|
|
62755
60235
|
var _Transformer = require_Transformer();
|
|
62756
60236
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62757
60237
|
|
|
@@ -62780,7 +60260,7 @@ var require_OptionalCatchBindingTransformer = __commonJS((exports) => {
|
|
|
62780
60260
|
function _interopRequireDefault(obj) {
|
|
62781
60261
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62782
60262
|
}
|
|
62783
|
-
var _types =
|
|
60263
|
+
var _types = require_types2();
|
|
62784
60264
|
var _Transformer = require_Transformer();
|
|
62785
60265
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62786
60266
|
|
|
@@ -62808,7 +60288,7 @@ var require_OptionalChainingNullishTransformer = __commonJS((exports) => {
|
|
|
62808
60288
|
function _interopRequireDefault(obj) {
|
|
62809
60289
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62810
60290
|
}
|
|
62811
|
-
var _types =
|
|
60291
|
+
var _types = require_types2();
|
|
62812
60292
|
var _Transformer = require_Transformer();
|
|
62813
60293
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62814
60294
|
|
|
@@ -62924,7 +60404,7 @@ var require_ReactDisplayNameTransformer = __commonJS((exports) => {
|
|
|
62924
60404
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
62925
60405
|
}
|
|
62926
60406
|
var _tokenizer = require_tokenizer();
|
|
62927
|
-
var _types =
|
|
60407
|
+
var _types = require_types2();
|
|
62928
60408
|
var _Transformer = require_Transformer();
|
|
62929
60409
|
var _Transformer2 = _interopRequireDefault(_Transformer);
|
|
62930
60410
|
|
|
@@ -63175,7 +60655,7 @@ var require_TypeScriptTransformer = __commonJS((exports) => {
|
|
|
63175
60655
|
function _interopRequireDefault(obj) {
|
|
63176
60656
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63177
60657
|
}
|
|
63178
|
-
var _types =
|
|
60658
|
+
var _types = require_types2();
|
|
63179
60659
|
var _isIdentifier = require_isIdentifier();
|
|
63180
60660
|
var _isIdentifier2 = _interopRequireDefault(_isIdentifier);
|
|
63181
60661
|
var _Transformer = require_Transformer();
|
|
@@ -63321,7 +60801,7 @@ var require_RootTransformer = __commonJS((exports) => {
|
|
|
63321
60801
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63322
60802
|
}
|
|
63323
60803
|
var _keywords = require_keywords();
|
|
63324
|
-
var _types =
|
|
60804
|
+
var _types = require_types2();
|
|
63325
60805
|
var _getClassInfo = require_getClassInfo();
|
|
63326
60806
|
var _getClassInfo2 = _interopRequireDefault(_getClassInfo);
|
|
63327
60807
|
var _CJSImportTransformer = require_CJSImportTransformer();
|
|
@@ -63720,7 +61200,7 @@ var require_formatTokens = __commonJS((exports) => {
|
|
|
63720
61200
|
}
|
|
63721
61201
|
var _linesandcolumns = require_build();
|
|
63722
61202
|
var _linesandcolumns2 = _interopRequireDefault(_linesandcolumns);
|
|
63723
|
-
var _types =
|
|
61203
|
+
var _types = require_types2();
|
|
63724
61204
|
function formatTokens(code, tokens) {
|
|
63725
61205
|
if (tokens.length === 0) {
|
|
63726
61206
|
return "";
|
|
@@ -63785,7 +61265,7 @@ var require_getTSImportedNames = __commonJS((exports) => {
|
|
|
63785
61265
|
function _interopRequireDefault(obj) {
|
|
63786
61266
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
63787
61267
|
}
|
|
63788
|
-
var _types =
|
|
61268
|
+
var _types = require_types2();
|
|
63789
61269
|
var _getImportExportSpecifierInfo = require_getImportExportSpecifierInfo();
|
|
63790
61270
|
var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
|
|
63791
61271
|
function getTSImportedNames(tokens) {
|
|
@@ -64170,7 +61650,7 @@ function describeUnsupportedType(nodeType) {
|
|
|
64170
61650
|
function compileTypedScript(opts) {
|
|
64171
61651
|
let ast;
|
|
64172
61652
|
try {
|
|
64173
|
-
ast =
|
|
61653
|
+
ast = import_parser2.parse(opts.source, {
|
|
64174
61654
|
sourceType: "script",
|
|
64175
61655
|
plugins: ["typescript"],
|
|
64176
61656
|
ranges: true
|
|
@@ -64422,9 +61902,9 @@ function stripCommentsAndStrings(s) {
|
|
|
64422
61902
|
out = out.replace(/`(\\.|[^`\\])*`/g, "``");
|
|
64423
61903
|
return out;
|
|
64424
61904
|
}
|
|
64425
|
-
var
|
|
61905
|
+
var import_parser2, import_sucrase, EVALUATOR_FN_NAME = "scoreScript", EVALUATOR_PARAM_NAMES, TRANSFORM_FN_NAME = "script";
|
|
64426
61906
|
var init_compile = __esm(() => {
|
|
64427
|
-
|
|
61907
|
+
import_parser2 = __toESM(require_lib(), 1);
|
|
64428
61908
|
import_sucrase = __toESM(require_dist3(), 1);
|
|
64429
61909
|
EVALUATOR_PARAM_NAMES = ["expected", "actual"];
|
|
64430
61910
|
});
|
|
@@ -64782,8 +62262,8 @@ function getAllStepJsonSchemas() {
|
|
|
64782
62262
|
category: def.category,
|
|
64783
62263
|
name: def.name,
|
|
64784
62264
|
description: def.description,
|
|
64785
|
-
configSchema:
|
|
64786
|
-
outputSchema:
|
|
62265
|
+
configSchema: toJsonSchema2(def.configSchema),
|
|
62266
|
+
outputSchema: toJsonSchema2(def.outputSchema),
|
|
64787
62267
|
configInWith: def.configInWith
|
|
64788
62268
|
}));
|
|
64789
62269
|
}
|
|
@@ -65601,6 +63081,81 @@ var init_actions = __esm(() => {
|
|
|
65601
63081
|
ACTION_TYPES = ActionTypeSchema.options;
|
|
65602
63082
|
});
|
|
65603
63083
|
|
|
63084
|
+
// ../types/src/processor/execution.ts
|
|
63085
|
+
function asTuple(values) {
|
|
63086
|
+
return values;
|
|
63087
|
+
}
|
|
63088
|
+
var WorkflowExecutionStatusValue2, WorkflowExecutionStatusSchema2, StepExecutionStatusValue2, StepExecutionStatusSchema2, TriggerTypeValue2, TriggerTypeSchema2, ExecutionTypeValue2, ExecutionTypeSchema2, WORKFLOW_EXECUTION_STATUSES2, STEP_EXECUTION_STATUSES2, TRIGGER_TYPES2, EXECUTION_TYPES2;
|
|
63089
|
+
var init_execution = __esm(() => {
|
|
63090
|
+
init_zod();
|
|
63091
|
+
WorkflowExecutionStatusValue2 = {
|
|
63092
|
+
CREATED: "created",
|
|
63093
|
+
PENDING: "pending",
|
|
63094
|
+
RUNNING: "running",
|
|
63095
|
+
WAITING: "waiting",
|
|
63096
|
+
COMPLETED: "completed",
|
|
63097
|
+
FAILED: "failed",
|
|
63098
|
+
CANCELLED: "cancelled"
|
|
63099
|
+
};
|
|
63100
|
+
WorkflowExecutionStatusSchema2 = exports_external.enum([
|
|
63101
|
+
WorkflowExecutionStatusValue2.CREATED,
|
|
63102
|
+
WorkflowExecutionStatusValue2.PENDING,
|
|
63103
|
+
WorkflowExecutionStatusValue2.RUNNING,
|
|
63104
|
+
WorkflowExecutionStatusValue2.WAITING,
|
|
63105
|
+
WorkflowExecutionStatusValue2.COMPLETED,
|
|
63106
|
+
WorkflowExecutionStatusValue2.FAILED,
|
|
63107
|
+
WorkflowExecutionStatusValue2.CANCELLED
|
|
63108
|
+
]);
|
|
63109
|
+
StepExecutionStatusValue2 = {
|
|
63110
|
+
PENDING: "pending",
|
|
63111
|
+
RUNNING: "running",
|
|
63112
|
+
SUCCESS: "success",
|
|
63113
|
+
FAILURE: "failure",
|
|
63114
|
+
WAITING: "waiting",
|
|
63115
|
+
SKIPPED: "skipped"
|
|
63116
|
+
};
|
|
63117
|
+
StepExecutionStatusSchema2 = exports_external.enum([
|
|
63118
|
+
StepExecutionStatusValue2.PENDING,
|
|
63119
|
+
StepExecutionStatusValue2.RUNNING,
|
|
63120
|
+
StepExecutionStatusValue2.SUCCESS,
|
|
63121
|
+
StepExecutionStatusValue2.FAILURE,
|
|
63122
|
+
StepExecutionStatusValue2.WAITING,
|
|
63123
|
+
StepExecutionStatusValue2.SKIPPED
|
|
63124
|
+
]);
|
|
63125
|
+
TriggerTypeValue2 = {
|
|
63126
|
+
MANUAL: "manual",
|
|
63127
|
+
API: "api",
|
|
63128
|
+
WEBHOOK: "webhook",
|
|
63129
|
+
SCHEDULE: "schedule",
|
|
63130
|
+
EMAIL: "email",
|
|
63131
|
+
EVAL: "eval",
|
|
63132
|
+
CLI: "cli"
|
|
63133
|
+
};
|
|
63134
|
+
TriggerTypeSchema2 = exports_external.enum([
|
|
63135
|
+
TriggerTypeValue2.MANUAL,
|
|
63136
|
+
TriggerTypeValue2.API,
|
|
63137
|
+
TriggerTypeValue2.WEBHOOK,
|
|
63138
|
+
TriggerTypeValue2.SCHEDULE,
|
|
63139
|
+
TriggerTypeValue2.EMAIL,
|
|
63140
|
+
TriggerTypeValue2.EVAL,
|
|
63141
|
+
TriggerTypeValue2.CLI
|
|
63142
|
+
]);
|
|
63143
|
+
ExecutionTypeValue2 = {
|
|
63144
|
+
PROD: "prod",
|
|
63145
|
+
EVAL: "eval",
|
|
63146
|
+
PLAYGROUND: "playground"
|
|
63147
|
+
};
|
|
63148
|
+
ExecutionTypeSchema2 = exports_external.enum([
|
|
63149
|
+
ExecutionTypeValue2.PROD,
|
|
63150
|
+
ExecutionTypeValue2.EVAL,
|
|
63151
|
+
ExecutionTypeValue2.PLAYGROUND
|
|
63152
|
+
]);
|
|
63153
|
+
WORKFLOW_EXECUTION_STATUSES2 = asTuple(WorkflowExecutionStatusSchema2.options);
|
|
63154
|
+
STEP_EXECUTION_STATUSES2 = asTuple(StepExecutionStatusSchema2.options);
|
|
63155
|
+
TRIGGER_TYPES2 = TriggerTypeSchema2.options;
|
|
63156
|
+
EXECUTION_TYPES2 = ExecutionTypeSchema2.options;
|
|
63157
|
+
});
|
|
63158
|
+
|
|
65604
63159
|
// ../types/src/workflow/workflow.ts
|
|
65605
63160
|
function suggestWorkflowName(raw) {
|
|
65606
63161
|
return raw.toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^[_-]+|[_-]+$/g, "").slice(0, 64);
|
|
@@ -65682,11 +63237,11 @@ var init_workflow = __esm(() => {
|
|
|
65682
63237
|
ManualTriggerMethodSchema = exports_external.object({
|
|
65683
63238
|
type: exports_external.literal("manual"),
|
|
65684
63239
|
enabled: exports_external.boolean().optional(),
|
|
65685
|
-
inputSchema:
|
|
63240
|
+
inputSchema: JsonSchemaSchema2.optional()
|
|
65686
63241
|
});
|
|
65687
63242
|
ApiTriggerMethodSchema = exports_external.object({
|
|
65688
63243
|
type: exports_external.literal("api"),
|
|
65689
|
-
inputSchema:
|
|
63244
|
+
inputSchema: JsonSchemaSchema2.optional()
|
|
65690
63245
|
});
|
|
65691
63246
|
EmailTriggerMethodSchema = exports_external.object({
|
|
65692
63247
|
type: exports_external.literal("email"),
|
|
@@ -65726,8 +63281,8 @@ var init_workflow = __esm(() => {
|
|
|
65726
63281
|
yamlContent: exports_external.string(),
|
|
65727
63282
|
definition: WorkflowDefinitionSchema,
|
|
65728
63283
|
isCurrent: exports_external.boolean().default(true),
|
|
65729
|
-
createdAt:
|
|
65730
|
-
updatedAt:
|
|
63284
|
+
createdAt: TimestampSchema2,
|
|
63285
|
+
updatedAt: TimestampSchema2.optional(),
|
|
65731
63286
|
createdBy: exports_external.string()
|
|
65732
63287
|
});
|
|
65733
63288
|
CreateWorkflowDefinitionSchema = exports_external.object({
|
|
@@ -65909,15 +63464,15 @@ function isFileOutput(value) {
|
|
|
65909
63464
|
function isWorkflowResult(value) {
|
|
65910
63465
|
return value != null && typeof value === "object" && "files" in value && Array.isArray(value.files);
|
|
65911
63466
|
}
|
|
65912
|
-
var
|
|
63467
|
+
var WorkflowExecutionStatusSchema3, StepExecutionStatusSchema3, ScopeEntryTypeSchema, ScopeEntrySchema, ScopeStackSchema, StepResultSchema, ExecutionContextSchema, StepInputReferenceSchema, WorkflowExecutionSchema, StepExecutionSchema, StepExecutionAttemptSchema, ConnectorSchema, WorkflowFileOutputSchema, WorkflowResultSchema;
|
|
65913
63468
|
var init_execution2 = __esm(() => {
|
|
65914
63469
|
init_zod();
|
|
65915
63470
|
init_common();
|
|
65916
63471
|
init_execution();
|
|
65917
63472
|
init_retry();
|
|
65918
63473
|
init_workflow();
|
|
65919
|
-
|
|
65920
|
-
|
|
63474
|
+
WorkflowExecutionStatusSchema3 = WorkflowExecutionStatusSchema2;
|
|
63475
|
+
StepExecutionStatusSchema3 = StepExecutionStatusSchema2;
|
|
65921
63476
|
ScopeEntryTypeSchema = exports_external.enum([
|
|
65922
63477
|
"root",
|
|
65923
63478
|
"if-then",
|
|
@@ -65940,7 +63495,7 @@ var init_execution2 = __esm(() => {
|
|
|
65940
63495
|
ScopeStackSchema = exports_external.array(ScopeEntrySchema);
|
|
65941
63496
|
StepResultSchema = exports_external.object({
|
|
65942
63497
|
output: exports_external.unknown(),
|
|
65943
|
-
status:
|
|
63498
|
+
status: StepExecutionStatusSchema3
|
|
65944
63499
|
});
|
|
65945
63500
|
ExecutionContextSchema = exports_external.object({
|
|
65946
63501
|
input: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
@@ -65968,24 +63523,24 @@ var init_execution2 = __esm(() => {
|
|
|
65968
63523
|
triggerType: exports_external.string(),
|
|
65969
63524
|
triggerInput: exports_external.record(exports_external.string(), exports_external.unknown()).nullable(),
|
|
65970
63525
|
overrides: exports_external.object({ steps: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional() }).nullable().optional(),
|
|
65971
|
-
status:
|
|
63526
|
+
status: WorkflowExecutionStatusSchema3,
|
|
65972
63527
|
scopeStack: ScopeStackSchema,
|
|
65973
63528
|
currentStepIndex: exports_external.number(),
|
|
65974
63529
|
stepResults: exports_external.record(exports_external.string(), StepResultSchema).optional(),
|
|
65975
63530
|
result: exports_external.unknown().nullable(),
|
|
65976
63531
|
error: exports_external.string().nullable(),
|
|
65977
63532
|
priority: exports_external.number().default(50),
|
|
65978
|
-
availableAt:
|
|
63533
|
+
availableAt: TimestampSchema2,
|
|
65979
63534
|
leaseId: exports_external.string().nullable(),
|
|
65980
|
-
leaseExpiresAt:
|
|
63535
|
+
leaseExpiresAt: TimestampSchema2.nullable(),
|
|
65981
63536
|
workerId: exports_external.string().nullable(),
|
|
65982
63537
|
maxRetries: exports_external.number().default(0),
|
|
65983
63538
|
originalExecutionId: exports_external.string().nullable().optional(),
|
|
65984
63539
|
previousExecutionId: exports_external.string().nullable().optional(),
|
|
65985
63540
|
retryNumber: exports_external.number().default(0),
|
|
65986
|
-
createdAt:
|
|
65987
|
-
startedAt:
|
|
65988
|
-
completedAt:
|
|
63541
|
+
createdAt: TimestampSchema2,
|
|
63542
|
+
startedAt: TimestampSchema2.nullable(),
|
|
63543
|
+
completedAt: TimestampSchema2.nullable(),
|
|
65989
63544
|
createdBy: exports_external.string().nullable()
|
|
65990
63545
|
});
|
|
65991
63546
|
StepExecutionSchema = exports_external.object({
|
|
@@ -66004,15 +63559,15 @@ var init_execution2 = __esm(() => {
|
|
|
66004
63559
|
effectiveRetryPolicy: ResolvedRetryPolicySchema.nullable().optional(),
|
|
66005
63560
|
retryPolicySource: RetryPolicySourceSchema.nullable().optional(),
|
|
66006
63561
|
latestAttempt: exports_external.number().default(0),
|
|
66007
|
-
nextAttemptAt:
|
|
63562
|
+
nextAttemptAt: TimestampSchema2.nullable().optional(),
|
|
66008
63563
|
inputData: exports_external.unknown().nullable(),
|
|
66009
63564
|
outputData: exports_external.unknown().nullable(),
|
|
66010
|
-
status:
|
|
63565
|
+
status: StepExecutionStatusSchema3,
|
|
66011
63566
|
error: exports_external.string().nullable(),
|
|
66012
63567
|
overrideMode: exports_external.enum(["skipped", "partial"]).nullable().optional(),
|
|
66013
63568
|
durationMs: exports_external.number().nullable(),
|
|
66014
|
-
startedAt:
|
|
66015
|
-
completedAt:
|
|
63569
|
+
startedAt: TimestampSchema2.nullable(),
|
|
63570
|
+
completedAt: TimestampSchema2.nullable()
|
|
66016
63571
|
});
|
|
66017
63572
|
StepExecutionAttemptSchema = exports_external.object({
|
|
66018
63573
|
id: exports_external.string(),
|
|
@@ -66025,8 +63580,8 @@ var init_execution2 = __esm(() => {
|
|
|
66025
63580
|
failure: ExecutionFailureSchema.nullable(),
|
|
66026
63581
|
retryDecision: RetryDecisionSchema.nullable(),
|
|
66027
63582
|
replaySafe: exports_external.boolean().nullable(),
|
|
66028
|
-
startedAt:
|
|
66029
|
-
completedAt:
|
|
63583
|
+
startedAt: TimestampSchema2,
|
|
63584
|
+
completedAt: TimestampSchema2.nullable(),
|
|
66030
63585
|
durationMs: exports_external.number().nullable()
|
|
66031
63586
|
});
|
|
66032
63587
|
ConnectorSchema = exports_external.object({
|
|
@@ -66038,8 +63593,8 @@ var init_execution2 = __esm(() => {
|
|
|
66038
63593
|
config: exports_external.record(exports_external.string(), exports_external.unknown()),
|
|
66039
63594
|
inputSchema: exports_external.unknown().optional(),
|
|
66040
63595
|
outputSchema: exports_external.unknown().optional(),
|
|
66041
|
-
createdAt:
|
|
66042
|
-
updatedAt:
|
|
63596
|
+
createdAt: TimestampSchema2,
|
|
63597
|
+
updatedAt: TimestampSchema2.optional(),
|
|
66043
63598
|
createdBy: exports_external.string()
|
|
66044
63599
|
});
|
|
66045
63600
|
WorkflowFileOutputSchema = exports_external.object({
|
|
@@ -67005,8 +64560,8 @@ function parseRunTarget(target) {
|
|
|
67005
64560
|
if (root !== "agents") {
|
|
67006
64561
|
throw new Error(`Agent target must be rooted at "agents.", got "${idOrSlug2}"`);
|
|
67007
64562
|
}
|
|
67008
|
-
for (const
|
|
67009
|
-
RunTargetSegmentSchema.parse(
|
|
64563
|
+
for (const segment of segments) {
|
|
64564
|
+
RunTargetSegmentSchema.parse(segment);
|
|
67010
64565
|
}
|
|
67011
64566
|
const packagePath = packageName.split(".").join("/");
|
|
67012
64567
|
const [, ...slugParts] = packagePath.split("/");
|
|
@@ -67119,9 +64674,9 @@ var init_grammar = __esm(() => {
|
|
|
67119
64674
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
67120
64675
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
67121
64676
|
}
|
|
67122
|
-
for (const
|
|
67123
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
67124
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
64677
|
+
for (const segment of parts.slice(1)) {
|
|
64678
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
64679
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
67125
64680
|
}
|
|
67126
64681
|
}
|
|
67127
64682
|
});
|
|
@@ -67137,9 +64692,9 @@ var init_grammar = __esm(() => {
|
|
|
67137
64692
|
if (!SourcePackageTypeSchema.safeParse(parts[0]).success) {
|
|
67138
64693
|
ctx.addIssue({ code: "custom", message: `Invalid package root: ${parts[0]}` });
|
|
67139
64694
|
}
|
|
67140
|
-
for (const
|
|
67141
|
-
if (!SourcePackageSegmentSchema.safeParse(
|
|
67142
|
-
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${
|
|
64695
|
+
for (const segment of parts.slice(1)) {
|
|
64696
|
+
if (!SourcePackageSegmentSchema.safeParse(segment).success) {
|
|
64697
|
+
ctx.addIssue({ code: "custom", message: `Invalid package segment: ${segment}` });
|
|
67143
64698
|
}
|
|
67144
64699
|
}
|
|
67145
64700
|
});
|
|
@@ -67233,9 +64788,9 @@ var init_grammar = __esm(() => {
|
|
|
67233
64788
|
});
|
|
67234
64789
|
return;
|
|
67235
64790
|
}
|
|
67236
|
-
for (const
|
|
67237
|
-
if (!RunTargetSegmentSchema.safeParse(
|
|
67238
|
-
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${
|
|
64791
|
+
for (const segment of parts.slice(1)) {
|
|
64792
|
+
if (!RunTargetSegmentSchema.safeParse(segment).success) {
|
|
64793
|
+
ctx.addIssue({ code: "custom", message: `Invalid run target segment: ${segment}` });
|
|
67239
64794
|
}
|
|
67240
64795
|
}
|
|
67241
64796
|
if (ref) {
|
|
@@ -67985,7 +65540,7 @@ function fromBig(n, le = false) {
|
|
|
67985
65540
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
67986
65541
|
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
67987
65542
|
}
|
|
67988
|
-
function
|
|
65543
|
+
function split(lst, le = false) {
|
|
67989
65544
|
const len = lst.length;
|
|
67990
65545
|
let Ah = new Uint32Array(len);
|
|
67991
65546
|
let Al = new Uint32Array(len);
|
|
@@ -68165,7 +65720,7 @@ var init_sha2 = __esm(() => {
|
|
|
68165
65720
|
super(28);
|
|
68166
65721
|
}
|
|
68167
65722
|
};
|
|
68168
|
-
K512 = /* @__PURE__ */ (() =>
|
|
65723
|
+
K512 = /* @__PURE__ */ (() => split([
|
|
68169
65724
|
"0x428a2f98d728ae22",
|
|
68170
65725
|
"0x7137449123ef65cd",
|
|
68171
65726
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -68764,11 +66319,11 @@ function walkGrammar(node, parts) {
|
|
|
68764
66319
|
}
|
|
68765
66320
|
return current;
|
|
68766
66321
|
}
|
|
68767
|
-
function normalizeTemplate(
|
|
68768
|
-
return
|
|
66322
|
+
function normalizeTemplate(template) {
|
|
66323
|
+
return template.endsWith("/") ? template.slice(0, -1) : template;
|
|
68769
66324
|
}
|
|
68770
|
-
function renderTemplate(
|
|
68771
|
-
return normalizeTemplate(
|
|
66325
|
+
function renderTemplate(template, params) {
|
|
66326
|
+
return normalizeTemplate(template).split("/").flatMap((part) => {
|
|
68772
66327
|
if (!part.startsWith(":")) {
|
|
68773
66328
|
return [part];
|
|
68774
66329
|
}
|
|
@@ -68778,36 +66333,36 @@ function renderTemplate(template2, params) {
|
|
|
68778
66333
|
throw new Error(`Missing S3 path parameter: ${part}`);
|
|
68779
66334
|
}
|
|
68780
66335
|
if (name === "path") {
|
|
68781
|
-
return value.split("/").map((
|
|
66336
|
+
return value.split("/").map((segment) => assertSegment("path", segment));
|
|
68782
66337
|
}
|
|
68783
66338
|
return [assertSegment(String(name), value)];
|
|
68784
66339
|
});
|
|
68785
66340
|
}
|
|
68786
|
-
function buildS3Path(tenantId,
|
|
66341
|
+
function buildS3Path(tenantId, template, params) {
|
|
68787
66342
|
const tenant = assertSegment("tenantId", tenantId);
|
|
68788
|
-
const parts = renderTemplate(
|
|
66343
|
+
const parts = renderTemplate(template, params);
|
|
68789
66344
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68790
|
-
if (
|
|
68791
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66345
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
66346
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68792
66347
|
}
|
|
68793
66348
|
const path = ["tenants", tenant, ...parts].join("/");
|
|
68794
|
-
return
|
|
66349
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
68795
66350
|
}
|
|
68796
|
-
function buildS3PathSuffix(
|
|
68797
|
-
const parts = renderTemplate(
|
|
66351
|
+
function buildS3PathSuffix(template, params) {
|
|
66352
|
+
const parts = renderTemplate(template, params);
|
|
68798
66353
|
const node = walkGrammar(S3_PATH_GRAMMAR, parts);
|
|
68799
|
-
if (
|
|
68800
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66354
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
66355
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68801
66356
|
}
|
|
68802
66357
|
const path = parts.join("/");
|
|
68803
|
-
return
|
|
66358
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
68804
66359
|
}
|
|
68805
66360
|
function stripTenantPrefix(key) {
|
|
68806
66361
|
return key.replace(TENANT_PREFIX_RX, "");
|
|
68807
66362
|
}
|
|
68808
|
-
function matchS3Path(
|
|
66363
|
+
function matchS3Path(template, key) {
|
|
68809
66364
|
const keyParts = stripTenantPrefix(key).split("/");
|
|
68810
|
-
const templateParts = normalizeTemplate(
|
|
66365
|
+
const templateParts = normalizeTemplate(template).split("/");
|
|
68811
66366
|
const params = {};
|
|
68812
66367
|
let keyIndex = 0;
|
|
68813
66368
|
for (let templateIndex = 0;templateIndex < templateParts.length; templateIndex += 1) {
|
|
@@ -68826,7 +66381,7 @@ function matchS3Path(template2, key) {
|
|
|
68826
66381
|
if (rest.length === 0)
|
|
68827
66382
|
return null;
|
|
68828
66383
|
try {
|
|
68829
|
-
params.path = rest.map((
|
|
66384
|
+
params.path = rest.map((segment) => assertSegment("path", segment)).join("/");
|
|
68830
66385
|
walkGrammar(S3_PATH_GRAMMAR, keyParts);
|
|
68831
66386
|
} catch {
|
|
68832
66387
|
return null;
|
|
@@ -68860,23 +66415,23 @@ function createBuilder(grammarNode, prefixSegments, boundTenantId) {
|
|
|
68860
66415
|
}
|
|
68861
66416
|
return assertSegment("tenantId", tenantId);
|
|
68862
66417
|
};
|
|
68863
|
-
const build = (
|
|
66418
|
+
const build = (template, params) => {
|
|
68864
66419
|
const tenant = resolveTenantId(params);
|
|
68865
|
-
const parts = renderTemplate(
|
|
66420
|
+
const parts = renderTemplate(template, params ?? {});
|
|
68866
66421
|
const node = walkGrammar(grammarNode, parts);
|
|
68867
|
-
if (
|
|
68868
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66422
|
+
if (template.endsWith("/") && node === PATH_LEAF) {
|
|
66423
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68869
66424
|
}
|
|
68870
66425
|
const path = ["tenants", tenant, ...prefixSegments, ...parts].join("/");
|
|
68871
|
-
return
|
|
66426
|
+
return template.endsWith("/") ? `${path}/` : path;
|
|
68872
66427
|
};
|
|
68873
66428
|
const builder = build;
|
|
68874
|
-
builder.at = (
|
|
66429
|
+
builder.at = (template, params) => {
|
|
68875
66430
|
const tenant = resolveTenantId(params);
|
|
68876
|
-
const parts = renderTemplate(
|
|
66431
|
+
const parts = renderTemplate(template, params ?? {});
|
|
68877
66432
|
const nextNode = walkGrammar(grammarNode, parts);
|
|
68878
|
-
if (
|
|
68879
|
-
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(
|
|
66433
|
+
if (template.endsWith("/") && nextNode === PATH_LEAF) {
|
|
66434
|
+
throw new Error(`S3 path leaf cannot have a trailing slash: ${JSON.stringify(template)}`);
|
|
68880
66435
|
}
|
|
68881
66436
|
return createBuilder(nextNode, [...prefixSegments, ...parts], tenant);
|
|
68882
66437
|
};
|
|
@@ -69295,7 +66850,7 @@ __export(exports_src, {
|
|
|
69295
66850
|
SplitConfigSchema: () => SplitConfigSchema,
|
|
69296
66851
|
SpanTypes: () => SpanTypes,
|
|
69297
66852
|
SpanKindMap: () => SpanKindMap,
|
|
69298
|
-
SpanKind: () =>
|
|
66853
|
+
SpanKind: () => SpanKind,
|
|
69299
66854
|
SourceVersionRefSchema: () => SourceVersionRefSchema,
|
|
69300
66855
|
SourceSecretsFileSchema: () => SourceSecretsFileSchema,
|
|
69301
66856
|
SourcePackageTypeSchema: () => SourcePackageTypeSchema,
|
|
@@ -69412,7 +66967,7 @@ __export(exports_src, {
|
|
|
69412
66967
|
GPFS_FILE_SOURCE_DESCRIPTOR: () => GPFS_FILE_SOURCE_DESCRIPTOR,
|
|
69413
66968
|
ForeachStepSchema: () => ForeachStepSchema,
|
|
69414
66969
|
FileReferenceSentinelSchema: () => FileReferenceSentinelSchema,
|
|
69415
|
-
FilePathDescriptorSchema: () =>
|
|
66970
|
+
FilePathDescriptorSchema: () => FilePathDescriptorSchema2,
|
|
69416
66971
|
FileIngressRefSchema: () => FileIngressRefSchema,
|
|
69417
66972
|
FileIdIngressRefSchema: () => FileIdIngressRefSchema,
|
|
69418
66973
|
FailStepSchema: () => FailStepSchema,
|
|
@@ -69535,8 +67090,8 @@ var init_src = __esm(() => {
|
|
|
69535
67090
|
init_legacy_boundary();
|
|
69536
67091
|
init_runtime_file_ref();
|
|
69537
67092
|
init_scoped_file_ref();
|
|
69538
|
-
|
|
69539
|
-
|
|
67093
|
+
init_processor();
|
|
67094
|
+
init_parser();
|
|
69540
67095
|
init_otel();
|
|
69541
67096
|
init_execution_row();
|
|
69542
67097
|
init_run_expand();
|
|
@@ -70450,7 +68005,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
70450
68005
|
else
|
|
70451
68006
|
end = lineWidth - indentAtStart;
|
|
70452
68007
|
}
|
|
70453
|
-
let
|
|
68008
|
+
let split2 = undefined;
|
|
70454
68009
|
let prev = undefined;
|
|
70455
68010
|
let overflow = false;
|
|
70456
68011
|
let i = -1;
|
|
@@ -70484,20 +68039,20 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
70484
68039
|
if (mode === FOLD_BLOCK)
|
|
70485
68040
|
i = consumeMoreIndentedLines(text, i, indent.length);
|
|
70486
68041
|
end = i + indent.length + endStep;
|
|
70487
|
-
|
|
68042
|
+
split2 = undefined;
|
|
70488
68043
|
} else {
|
|
70489
68044
|
if (ch === " " && prev && prev !== " " && prev !== `
|
|
70490
68045
|
` && prev !== "\t") {
|
|
70491
68046
|
const next = text[i + 1];
|
|
70492
68047
|
if (next && next !== " " && next !== `
|
|
70493
68048
|
` && next !== "\t")
|
|
70494
|
-
|
|
68049
|
+
split2 = i;
|
|
70495
68050
|
}
|
|
70496
68051
|
if (i >= end) {
|
|
70497
|
-
if (
|
|
70498
|
-
folds.push(
|
|
70499
|
-
end =
|
|
70500
|
-
|
|
68052
|
+
if (split2) {
|
|
68053
|
+
folds.push(split2);
|
|
68054
|
+
end = split2 + endStep;
|
|
68055
|
+
split2 = undefined;
|
|
70501
68056
|
} else if (mode === FOLD_QUOTED) {
|
|
70502
68057
|
while (prev === " " || prev === "\t") {
|
|
70503
68058
|
prev = ch;
|
|
@@ -70510,7 +68065,7 @@ var require_foldFlowLines = __commonJS((exports) => {
|
|
|
70510
68065
|
folds.push(j);
|
|
70511
68066
|
escapedFolds[j] = true;
|
|
70512
68067
|
end = j + endStep;
|
|
70513
|
-
|
|
68068
|
+
split2 = undefined;
|
|
70514
68069
|
} else {
|
|
70515
68070
|
overflow = true;
|
|
70516
68071
|
}
|
|
@@ -71144,7 +68699,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
71144
68699
|
var identity = require_identity();
|
|
71145
68700
|
var Scalar = require_Scalar();
|
|
71146
68701
|
var MERGE_KEY = "<<";
|
|
71147
|
-
var
|
|
68702
|
+
var merge2 = {
|
|
71148
68703
|
identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
|
|
71149
68704
|
default: "key",
|
|
71150
68705
|
tag: "tag:yaml.org,2002:merge",
|
|
@@ -71154,7 +68709,7 @@ var require_merge = __commonJS((exports) => {
|
|
|
71154
68709
|
}),
|
|
71155
68710
|
stringify: () => MERGE_KEY
|
|
71156
68711
|
};
|
|
71157
|
-
var isMergeKey = (ctx, key) => (
|
|
68712
|
+
var isMergeKey = (ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
|
|
71158
68713
|
function addMergeToJSMap(ctx, map2, value) {
|
|
71159
68714
|
const source = resolveAliasValue(ctx, value);
|
|
71160
68715
|
if (identity.isSeq(source))
|
|
@@ -71193,21 +68748,21 @@ var require_merge = __commonJS((exports) => {
|
|
|
71193
68748
|
}
|
|
71194
68749
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
71195
68750
|
exports.isMergeKey = isMergeKey;
|
|
71196
|
-
exports.merge =
|
|
68751
|
+
exports.merge = merge2;
|
|
71197
68752
|
});
|
|
71198
68753
|
|
|
71199
68754
|
// ../../node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
71200
68755
|
var require_addPairToJSMap = __commonJS((exports) => {
|
|
71201
68756
|
var log = require_log();
|
|
71202
|
-
var
|
|
68757
|
+
var merge2 = require_merge();
|
|
71203
68758
|
var stringify = require_stringify();
|
|
71204
68759
|
var identity = require_identity();
|
|
71205
68760
|
var toJS = require_toJS();
|
|
71206
68761
|
function addPairToJSMap(ctx, map2, { key, value }) {
|
|
71207
68762
|
if (identity.isNode(key) && key.addToJSMap)
|
|
71208
68763
|
key.addToJSMap(ctx, map2, value);
|
|
71209
|
-
else if (
|
|
71210
|
-
|
|
68764
|
+
else if (merge2.isMergeKey(ctx, key))
|
|
68765
|
+
merge2.addMergeToJSMap(ctx, map2, value);
|
|
71211
68766
|
else {
|
|
71212
68767
|
const jsKey = toJS.toJS(key, "", ctx);
|
|
71213
68768
|
if (map2 instanceof Map) {
|
|
@@ -72483,7 +70038,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
72483
70038
|
var bool = require_bool2();
|
|
72484
70039
|
var float = require_float2();
|
|
72485
70040
|
var int2 = require_int2();
|
|
72486
|
-
var
|
|
70041
|
+
var merge2 = require_merge();
|
|
72487
70042
|
var omap = require_omap();
|
|
72488
70043
|
var pairs = require_pairs();
|
|
72489
70044
|
var set2 = require_set();
|
|
@@ -72503,7 +70058,7 @@ var require_schema3 = __commonJS((exports) => {
|
|
|
72503
70058
|
float.floatExp,
|
|
72504
70059
|
float.float,
|
|
72505
70060
|
binary.binary,
|
|
72506
|
-
|
|
70061
|
+
merge2.merge,
|
|
72507
70062
|
omap.omap,
|
|
72508
70063
|
pairs.pairs,
|
|
72509
70064
|
set2.set,
|
|
@@ -72526,7 +70081,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72526
70081
|
var schema = require_schema();
|
|
72527
70082
|
var schema$1 = require_schema2();
|
|
72528
70083
|
var binary = require_binary();
|
|
72529
|
-
var
|
|
70084
|
+
var merge2 = require_merge();
|
|
72530
70085
|
var omap = require_omap();
|
|
72531
70086
|
var pairs = require_pairs();
|
|
72532
70087
|
var schema$2 = require_schema3();
|
|
@@ -72551,7 +70106,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72551
70106
|
intOct: int2.intOct,
|
|
72552
70107
|
intTime: timestamp.intTime,
|
|
72553
70108
|
map: map2.map,
|
|
72554
|
-
merge:
|
|
70109
|
+
merge: merge2.merge,
|
|
72555
70110
|
null: _null4.nullTag,
|
|
72556
70111
|
omap: omap.omap,
|
|
72557
70112
|
pairs: pairs.pairs,
|
|
@@ -72561,7 +70116,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72561
70116
|
};
|
|
72562
70117
|
var coreKnownTags = {
|
|
72563
70118
|
"tag:yaml.org,2002:binary": binary.binary,
|
|
72564
|
-
"tag:yaml.org,2002:merge":
|
|
70119
|
+
"tag:yaml.org,2002:merge": merge2.merge,
|
|
72565
70120
|
"tag:yaml.org,2002:omap": omap.omap,
|
|
72566
70121
|
"tag:yaml.org,2002:pairs": pairs.pairs,
|
|
72567
70122
|
"tag:yaml.org,2002:set": set2.set,
|
|
@@ -72570,7 +70125,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72570
70125
|
function getTags(customTags, schemaName, addMergeTag) {
|
|
72571
70126
|
const schemaTags = schemas3.get(schemaName);
|
|
72572
70127
|
if (schemaTags && !customTags) {
|
|
72573
|
-
return addMergeTag && !schemaTags.includes(
|
|
70128
|
+
return addMergeTag && !schemaTags.includes(merge2.merge) ? schemaTags.concat(merge2.merge) : schemaTags.slice();
|
|
72574
70129
|
}
|
|
72575
70130
|
let tags = schemaTags;
|
|
72576
70131
|
if (!tags) {
|
|
@@ -72588,7 +70143,7 @@ var require_tags = __commonJS((exports) => {
|
|
|
72588
70143
|
tags = customTags(tags.slice());
|
|
72589
70144
|
}
|
|
72590
70145
|
if (addMergeTag)
|
|
72591
|
-
tags = tags.concat(
|
|
70146
|
+
tags = tags.concat(merge2.merge);
|
|
72592
70147
|
return tags.reduce((tags2, tag) => {
|
|
72593
70148
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
72594
70149
|
if (!tagObj) {
|
|
@@ -72615,11 +70170,11 @@ var require_Schema = __commonJS((exports) => {
|
|
|
72615
70170
|
var sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
|
72616
70171
|
|
|
72617
70172
|
class Schema {
|
|
72618
|
-
constructor({ compat: compat2, customTags, merge:
|
|
70173
|
+
constructor({ compat: compat2, customTags, merge: merge2, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {
|
|
72619
70174
|
this.compat = Array.isArray(compat2) ? tags.getTags(compat2, "compat") : compat2 ? tags.getTags(null, compat2) : null;
|
|
72620
70175
|
this.name = typeof schema === "string" && schema || "core";
|
|
72621
70176
|
this.knownTags = resolveKnownTags ? tags.coreKnownTags : {};
|
|
72622
|
-
this.tags = tags.getTags(customTags, this.name,
|
|
70177
|
+
this.tags = tags.getTags(customTags, this.name, merge2);
|
|
72623
70178
|
this.toStringOptions = toStringDefaults ?? null;
|
|
72624
70179
|
Object.defineProperty(this, identity.MAP, { value: map2.map });
|
|
72625
70180
|
Object.defineProperty(this, identity.SCALAR, { value: string4.string });
|
|
@@ -73842,13 +71397,13 @@ var require_resolve_block_scalar = __commonJS((exports) => {
|
|
|
73842
71397
|
return { mode, indent, chomp, comment, length };
|
|
73843
71398
|
}
|
|
73844
71399
|
function splitLines(source) {
|
|
73845
|
-
const
|
|
73846
|
-
const first =
|
|
71400
|
+
const split2 = source.split(/\n( *)/);
|
|
71401
|
+
const first = split2[0];
|
|
73847
71402
|
const m = first.match(/^( *)/);
|
|
73848
71403
|
const line0 = m?.[1] ? [m[1], first.slice(m[1].length)] : ["", first];
|
|
73849
71404
|
const lines = [line0];
|
|
73850
|
-
for (let i = 1;i <
|
|
73851
|
-
lines.push([
|
|
71405
|
+
for (let i = 1;i < split2.length; i += 2)
|
|
71406
|
+
lines.push([split2[i], split2[i + 1]]);
|
|
73852
71407
|
return lines;
|
|
73853
71408
|
}
|
|
73854
71409
|
exports.resolveBlockScalar = resolveBlockScalar;
|
|
@@ -76862,7 +74417,7 @@ var init_main = __esm(() => {
|
|
|
76862
74417
|
});
|
|
76863
74418
|
|
|
76864
74419
|
// ../../node_modules/sisteransi/src/index.js
|
|
76865
|
-
var
|
|
74420
|
+
var require_src = __commonJS((exports, module) => {
|
|
76866
74421
|
var ESC2 = "\x1B";
|
|
76867
74422
|
var CSI2 = `${ESC2}[`;
|
|
76868
74423
|
var beep = "\x07";
|
|
@@ -77205,7 +74760,7 @@ var import_sisteransi, G, K, h, Y, k, A = (r) => ("columns" in r) && typeof r.co
|
|
|
77205
74760
|
}, Q, X, Z, et, it, rt, nt, ot, ut, at, ht;
|
|
77206
74761
|
var init_dist3 = __esm(() => {
|
|
77207
74762
|
init_main();
|
|
77208
|
-
import_sisteransi = __toESM(
|
|
74763
|
+
import_sisteransi = __toESM(require_src(), 1);
|
|
77209
74764
|
G = ["up", "down", "left", "right", "space", "enter", "cancel"];
|
|
77210
74765
|
K = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
77211
74766
|
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)}` } } };
|
|
@@ -78548,7 +76103,7 @@ var init_dist4 = __esm(() => {
|
|
|
78548
76103
|
init_dist3();
|
|
78549
76104
|
init_main();
|
|
78550
76105
|
init_dist2();
|
|
78551
|
-
import_sisteransi2 = __toESM(
|
|
76106
|
+
import_sisteransi2 = __toESM(require_src(), 1);
|
|
78552
76107
|
tt2 = te();
|
|
78553
76108
|
_t = w2("◆", "*");
|
|
78554
76109
|
ot2 = w2("■", "x");
|
|
@@ -172040,7 +169595,7 @@ var require3, __filename2, __dirname2, __create2, __defProp3, __getOwnPropDesc,
|
|
|
172040
169595
|
__defProp3(to5, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
|
|
172041
169596
|
}
|
|
172042
169597
|
return to5;
|
|
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,
|
|
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, require_utils2, require_stringify2, require_is_number, require_to_regex_range, require_fill_range, require_compile2, require_expand, require_constants, require_parse, require_braces, require_constants2, require_utils22, require_scan, require_parse2, require_picomatch, require_picomatch2, require_micromatch, require_pattern2, require_merge2, require_stream, require_string2, require_utils3, require_tasks, require_async, require_sync, require_fs2, require_settings, require_out, require_queue_microtask, require_run_parallel, require_constants3, require_fs3, require_utils4, require_common, require_async2, require_sync2, require_fs4, require_settings2, require_out2, require_reusify, require_queue, require_common2, require_reader, require_async3, require_async4, require_stream2, require_sync3, require_sync4, require_settings3, require_out3, require_reader2, require_stream3, require_async5, require_matcher, require_partial, require_deep, require_entry, require_error2, require_entry2, require_provider, require_async6, require_stream4, require_sync5, require_sync6, require_settings4, require_out4, require_picocolors2, require_debug, require_constants4, require_re, require_parse_options, require_identifiers, require_semver, require_compare, require_gte, require_pseudomap, require_map2, require_yallist, require_lru_cache, require_sigmund, require_fnmatch, require_ini, require_package, require_src2, require_js_tokens, require_readlines, require_ignore, index_exports, Diff = class {
|
|
172044
169599
|
diff(oldStr, newStr, options8 = {}) {
|
|
172045
169600
|
let callback;
|
|
172046
169601
|
if (typeof options8 === "function") {
|
|
@@ -173062,7 +170617,7 @@ var init_prettier = __esm(() => {
|
|
|
173062
170617
|
};
|
|
173063
170618
|
}
|
|
173064
170619
|
});
|
|
173065
|
-
|
|
170620
|
+
require_utils2 = __commonJS2({
|
|
173066
170621
|
"node_modules/braces/lib/utils.js"(exports) {
|
|
173067
170622
|
exports.isInteger = (num) => {
|
|
173068
170623
|
if (typeof num === "number") {
|
|
@@ -173151,7 +170706,7 @@ var init_prettier = __esm(() => {
|
|
|
173151
170706
|
});
|
|
173152
170707
|
require_stringify2 = __commonJS2({
|
|
173153
170708
|
"node_modules/braces/lib/stringify.js"(exports, module) {
|
|
173154
|
-
var utils2 =
|
|
170709
|
+
var utils2 = require_utils2();
|
|
173155
170710
|
module.exports = (ast, options8 = {}) => {
|
|
173156
170711
|
const stringify2 = (node, parent = {}) => {
|
|
173157
170712
|
const invalidBlock = options8.escapeInvalid && utils2.isInvalidBrace(parent);
|
|
@@ -173605,7 +171160,7 @@ var init_prettier = __esm(() => {
|
|
|
173605
171160
|
require_compile2 = __commonJS2({
|
|
173606
171161
|
"node_modules/braces/lib/compile.js"(exports, module) {
|
|
173607
171162
|
var fill2 = require_fill_range();
|
|
173608
|
-
var utils2 =
|
|
171163
|
+
var utils2 = require_utils2();
|
|
173609
171164
|
var compile = (ast, options8 = {}) => {
|
|
173610
171165
|
const walk2 = (node, parent = {}) => {
|
|
173611
171166
|
const invalidBlock = utils2.isInvalidBrace(parent);
|
|
@@ -173655,7 +171210,7 @@ var init_prettier = __esm(() => {
|
|
|
173655
171210
|
"node_modules/braces/lib/expand.js"(exports, module) {
|
|
173656
171211
|
var fill2 = require_fill_range();
|
|
173657
171212
|
var stringify2 = require_stringify2();
|
|
173658
|
-
var utils2 =
|
|
171213
|
+
var utils2 = require_utils2();
|
|
173659
171214
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
173660
171215
|
const result = [];
|
|
173661
171216
|
queue = [].concat(queue);
|
|
@@ -175854,8 +173409,8 @@ var init_prettier = __esm(() => {
|
|
|
175854
173409
|
var Stream = __require2("stream");
|
|
175855
173410
|
var PassThrough = Stream.PassThrough;
|
|
175856
173411
|
var slice = Array.prototype.slice;
|
|
175857
|
-
module.exports =
|
|
175858
|
-
function
|
|
173412
|
+
module.exports = merge2;
|
|
173413
|
+
function merge2() {
|
|
175859
173414
|
const streamsQueue = [];
|
|
175860
173415
|
const args = slice.call(arguments);
|
|
175861
173416
|
let merging = false;
|
|
@@ -175969,9 +173524,9 @@ var init_prettier = __esm(() => {
|
|
|
175969
173524
|
"node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
175970
173525
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
175971
173526
|
exports.merge = undefined;
|
|
175972
|
-
var
|
|
173527
|
+
var merge2 = require_merge2();
|
|
175973
173528
|
function merge3(streams) {
|
|
175974
|
-
const mergedStream =
|
|
173529
|
+
const mergedStream = merge2(streams);
|
|
175975
173530
|
streams.forEach((stream) => {
|
|
175976
173531
|
stream.once("error", (error52) => mergedStream.emit("error", error52));
|
|
175977
173532
|
});
|
|
@@ -175999,7 +173554,7 @@ var init_prettier = __esm(() => {
|
|
|
175999
173554
|
exports.isEmpty = isEmpty;
|
|
176000
173555
|
}
|
|
176001
173556
|
});
|
|
176002
|
-
|
|
173557
|
+
require_utils3 = __commonJS2({
|
|
176003
173558
|
"node_modules/fast-glob/out/utils/index.js"(exports) {
|
|
176004
173559
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176005
173560
|
exports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = undefined;
|
|
@@ -176023,7 +173578,7 @@ var init_prettier = __esm(() => {
|
|
|
176023
173578
|
"node_modules/fast-glob/out/managers/tasks.js"(exports) {
|
|
176024
173579
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176025
173580
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = undefined;
|
|
176026
|
-
var utils2 =
|
|
173581
|
+
var utils2 = require_utils3();
|
|
176027
173582
|
function generate(input, settings) {
|
|
176028
173583
|
const patterns = processPatterns(input, settings);
|
|
176029
173584
|
const ignore = processPatterns(settings.ignore, settings);
|
|
@@ -176332,7 +173887,7 @@ var init_prettier = __esm(() => {
|
|
|
176332
173887
|
exports.createDirentFromStats = createDirentFromStats;
|
|
176333
173888
|
}
|
|
176334
173889
|
});
|
|
176335
|
-
|
|
173890
|
+
require_utils4 = __commonJS2({
|
|
176336
173891
|
"node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports) {
|
|
176337
173892
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
176338
173893
|
exports.fs = undefined;
|
|
@@ -176360,7 +173915,7 @@ var init_prettier = __esm(() => {
|
|
|
176360
173915
|
var fsStat = require_out();
|
|
176361
173916
|
var rpl = require_run_parallel();
|
|
176362
173917
|
var constants_1 = require_constants3();
|
|
176363
|
-
var utils2 =
|
|
173918
|
+
var utils2 = require_utils4();
|
|
176364
173919
|
var common = require_common();
|
|
176365
173920
|
function read3(directory, settings, callback) {
|
|
176366
173921
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -176466,7 +174021,7 @@ var init_prettier = __esm(() => {
|
|
|
176466
174021
|
exports.readdir = exports.readdirWithFileTypes = exports.read = undefined;
|
|
176467
174022
|
var fsStat = require_out();
|
|
176468
174023
|
var constants_1 = require_constants3();
|
|
176469
|
-
var utils2 =
|
|
174024
|
+
var utils2 = require_utils4();
|
|
176470
174025
|
var common = require_common();
|
|
176471
174026
|
function read3(directory, settings) {
|
|
176472
174027
|
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
@@ -177246,7 +174801,7 @@ var init_prettier = __esm(() => {
|
|
|
177246
174801
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177247
174802
|
var path15 = __require2("path");
|
|
177248
174803
|
var fsStat = require_out();
|
|
177249
|
-
var utils2 =
|
|
174804
|
+
var utils2 = require_utils3();
|
|
177250
174805
|
var Reader = class {
|
|
177251
174806
|
constructor(_settings) {
|
|
177252
174807
|
this._settings = _settings;
|
|
@@ -177370,7 +174925,7 @@ var init_prettier = __esm(() => {
|
|
|
177370
174925
|
require_matcher = __commonJS2({
|
|
177371
174926
|
"node_modules/fast-glob/out/providers/matchers/matcher.js"(exports) {
|
|
177372
174927
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177373
|
-
var utils2 =
|
|
174928
|
+
var utils2 = require_utils3();
|
|
177374
174929
|
var Matcher = class {
|
|
177375
174930
|
constructor(_patterns, _settings, _micromatchOptions) {
|
|
177376
174931
|
this._patterns = _patterns;
|
|
@@ -177409,7 +174964,7 @@ var init_prettier = __esm(() => {
|
|
|
177409
174964
|
});
|
|
177410
174965
|
}
|
|
177411
174966
|
_splitSegmentsIntoSections(segments) {
|
|
177412
|
-
return utils2.array.splitWhen(segments, (
|
|
174967
|
+
return utils2.array.splitWhen(segments, (segment) => segment.dynamic && utils2.pattern.hasGlobStar(segment.pattern));
|
|
177413
174968
|
}
|
|
177414
174969
|
};
|
|
177415
174970
|
exports.default = Matcher;
|
|
@@ -177430,11 +174985,11 @@ var init_prettier = __esm(() => {
|
|
|
177430
174985
|
return true;
|
|
177431
174986
|
}
|
|
177432
174987
|
const match = parts.every((part, index) => {
|
|
177433
|
-
const
|
|
177434
|
-
if (
|
|
174988
|
+
const segment = pattern.segments[index];
|
|
174989
|
+
if (segment.dynamic && segment.patternRe.test(part)) {
|
|
177435
174990
|
return true;
|
|
177436
174991
|
}
|
|
177437
|
-
if (!
|
|
174992
|
+
if (!segment.dynamic && segment.pattern === part) {
|
|
177438
174993
|
return true;
|
|
177439
174994
|
}
|
|
177440
174995
|
return false;
|
|
@@ -177452,7 +175007,7 @@ var init_prettier = __esm(() => {
|
|
|
177452
175007
|
require_deep = __commonJS2({
|
|
177453
175008
|
"node_modules/fast-glob/out/providers/filters/deep.js"(exports) {
|
|
177454
175009
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177455
|
-
var utils2 =
|
|
175010
|
+
var utils2 = require_utils3();
|
|
177456
175011
|
var partial_1 = require_partial();
|
|
177457
175012
|
var DeepFilter = class {
|
|
177458
175013
|
constructor(_settings, _micromatchOptions) {
|
|
@@ -177514,7 +175069,7 @@ var init_prettier = __esm(() => {
|
|
|
177514
175069
|
require_entry = __commonJS2({
|
|
177515
175070
|
"node_modules/fast-glob/out/providers/filters/entry.js"(exports) {
|
|
177516
175071
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177517
|
-
var utils2 =
|
|
175072
|
+
var utils2 = require_utils3();
|
|
177518
175073
|
var EntryFilter = class {
|
|
177519
175074
|
constructor(_settings, _micromatchOptions) {
|
|
177520
175075
|
this._settings = _settings;
|
|
@@ -177599,7 +175154,7 @@ var init_prettier = __esm(() => {
|
|
|
177599
175154
|
require_error2 = __commonJS2({
|
|
177600
175155
|
"node_modules/fast-glob/out/providers/filters/error.js"(exports) {
|
|
177601
175156
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177602
|
-
var utils2 =
|
|
175157
|
+
var utils2 = require_utils3();
|
|
177603
175158
|
var ErrorFilter = class {
|
|
177604
175159
|
constructor(_settings) {
|
|
177605
175160
|
this._settings = _settings;
|
|
@@ -177617,7 +175172,7 @@ var init_prettier = __esm(() => {
|
|
|
177617
175172
|
require_entry2 = __commonJS2({
|
|
177618
175173
|
"node_modules/fast-glob/out/providers/transformers/entry.js"(exports) {
|
|
177619
175174
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177620
|
-
var utils2 =
|
|
175175
|
+
var utils2 = require_utils3();
|
|
177621
175176
|
var EntryTransformer = class {
|
|
177622
175177
|
constructor(_settings) {
|
|
177623
175178
|
this._settings = _settings;
|
|
@@ -177885,7 +175440,7 @@ var init_prettier = __esm(() => {
|
|
|
177885
175440
|
var stream_1 = require_stream4();
|
|
177886
175441
|
var sync_1 = require_sync6();
|
|
177887
175442
|
var settings_1 = require_settings4();
|
|
177888
|
-
var utils2 =
|
|
175443
|
+
var utils2 = require_utils3();
|
|
177889
175444
|
async function FastGlob(source2, options8) {
|
|
177890
175445
|
assertPatternsInput(source2);
|
|
177891
175446
|
const works = getWorks(source2, async_1.default, options8);
|
|
@@ -178203,7 +175758,7 @@ var init_prettier = __esm(() => {
|
|
|
178203
175758
|
};
|
|
178204
175759
|
}
|
|
178205
175760
|
});
|
|
178206
|
-
|
|
175761
|
+
require_semver = __commonJS2({
|
|
178207
175762
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
178208
175763
|
var debug = require_debug();
|
|
178209
175764
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants4();
|
|
@@ -178473,7 +176028,7 @@ var init_prettier = __esm(() => {
|
|
|
178473
176028
|
});
|
|
178474
176029
|
require_compare = __commonJS2({
|
|
178475
176030
|
"node_modules/semver/functions/compare.js"(exports, module) {
|
|
178476
|
-
var SemVer =
|
|
176031
|
+
var SemVer = require_semver();
|
|
178477
176032
|
var compare = (a5, b8, loose) => new SemVer(a5, loose).compare(new SemVer(b8, loose));
|
|
178478
176033
|
module.exports = compare;
|
|
178479
176034
|
}
|
|
@@ -180206,7 +177761,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
180206
177761
|
};
|
|
180207
177762
|
}
|
|
180208
177763
|
});
|
|
180209
|
-
|
|
177764
|
+
require_src2 = __commonJS2({
|
|
180210
177765
|
"node_modules/editorconfig/src/index.js"(exports) {
|
|
180211
177766
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P9, generator) {
|
|
180212
177767
|
return new (P9 || (P9 = Promise))(function(resolve32, reject) {
|
|
@@ -181669,7 +179224,7 @@ globstar while`, file2, fr10, pattern, pr8, swallowee);
|
|
|
181669
179224
|
mockable_default = mockable.mocked;
|
|
181670
179225
|
import_micromatch = __toESM2(require_micromatch(), 1);
|
|
181671
179226
|
partition_default = partition2;
|
|
181672
|
-
import_editorconfig = __toESM2(
|
|
179227
|
+
import_editorconfig = __toESM2(require_src2(), 1);
|
|
181673
179228
|
iterate_directory_up_default = iterateDirectoryUp;
|
|
181674
179229
|
FileSearcher = class extends Searcher {
|
|
181675
179230
|
findInDirectory = findFile;
|
|
@@ -184265,7 +181820,7 @@ import { fileURLToPath as fileURLToPath8 } from "url";
|
|
|
184265
181820
|
// package.json
|
|
184266
181821
|
var package_default = {
|
|
184267
181822
|
name: "@eigenpal/cli",
|
|
184268
|
-
version: "0.10.
|
|
181823
|
+
version: "0.10.22",
|
|
184269
181824
|
description: "Eigenpal CLI — author and run document workflows from your terminal. Agent-ready.",
|
|
184270
181825
|
keywords: [
|
|
184271
181826
|
"eigenpal",
|
|
@@ -185779,7 +183334,7 @@ async function pushCurrentBranch(input) {
|
|
|
185779
183334
|
function slugifyPackageSegment(value) {
|
|
185780
183335
|
return value.trim().toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
185781
183336
|
}
|
|
185782
|
-
function packagePathForTemplate(
|
|
183337
|
+
function packagePathForTemplate(template, name) {
|
|
185783
183338
|
const slug = slugifyPackageSegment(name);
|
|
185784
183339
|
if (!slug)
|
|
185785
183340
|
throw new Error("Package name must include at least one letter or number.");
|
|
@@ -185791,7 +183346,7 @@ function packagePathForTemplate(template2, name) {
|
|
|
185791
183346
|
knowledge: "resources/knowledge",
|
|
185792
183347
|
evaluator: "evaluators"
|
|
185793
183348
|
};
|
|
185794
|
-
const root = rootByTemplate[
|
|
183349
|
+
const root = rootByTemplate[template];
|
|
185795
183350
|
if (!root)
|
|
185796
183351
|
throw new Error("Template must be agent, workflow, skill, rule, knowledge, or evaluator.");
|
|
185797
183352
|
return SourcePackagePathSchema.parse(`${root}/${slug}`);
|
|
@@ -186200,12 +183755,12 @@ function archivePackage(input) {
|
|
|
186200
183755
|
runGit(["archive", "--format=tar", `--output=${tarPath}`, input.ref, input.packagePath], {
|
|
186201
183756
|
cwd: input.gitRoot
|
|
186202
183757
|
});
|
|
186203
|
-
const
|
|
183758
|
+
const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
186204
183759
|
cwd: input.outDir,
|
|
186205
183760
|
encoding: "utf8"
|
|
186206
183761
|
});
|
|
186207
|
-
if (
|
|
186208
|
-
throw new Error(
|
|
183762
|
+
if (extract.status !== 0)
|
|
183763
|
+
throw new Error(extract.stderr.trim() || "tar extraction failed");
|
|
186209
183764
|
} finally {
|
|
186210
183765
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
186211
183766
|
}
|
|
@@ -186234,12 +183789,12 @@ async function tryHostedArchive(input) {
|
|
|
186234
183789
|
const tarPath = path5.join(mkdtempSyncCompat("eigenpal-hosted-source-"), "package.tar");
|
|
186235
183790
|
try {
|
|
186236
183791
|
writeFileSync4(tarPath, Buffer.from(await response.arrayBuffer()));
|
|
186237
|
-
const
|
|
183792
|
+
const extract = spawnSync3("tar", ["-xf", tarPath, "--strip-components", String(input.packagePath.split("/").length)], {
|
|
186238
183793
|
cwd: input.outDir,
|
|
186239
183794
|
encoding: "utf8"
|
|
186240
183795
|
});
|
|
186241
|
-
if (
|
|
186242
|
-
throw new Error(
|
|
183796
|
+
if (extract.status !== 0)
|
|
183797
|
+
throw new Error(extract.stderr.trim() || "tar extraction failed");
|
|
186243
183798
|
return true;
|
|
186244
183799
|
} finally {
|
|
186245
183800
|
rmSync(path5.dirname(tarPath), { recursive: true, force: true });
|
|
@@ -190594,18 +188149,18 @@ async function init(name, opts) {
|
|
|
190594
188149
|
if (existsSync11(target) && readdirSync2(target).length > 0) {
|
|
190595
188150
|
throw new Error(`Target directory ${relative(process.cwd(), target)} exists and is not empty.`);
|
|
190596
188151
|
}
|
|
190597
|
-
let
|
|
188152
|
+
let template;
|
|
190598
188153
|
if (opts.template) {
|
|
190599
188154
|
if (!isTemplateName(opts.template)) {
|
|
190600
188155
|
throw new Error(`Unknown template "${opts.template}". Available: ${TEMPLATE_NAMES.join(", ")}.`);
|
|
190601
188156
|
}
|
|
190602
|
-
|
|
188157
|
+
template = opts.template;
|
|
190603
188158
|
} else if (opts.yes || !process.stdin.isTTY) {
|
|
190604
|
-
|
|
188159
|
+
template = "blank";
|
|
190605
188160
|
} else {
|
|
190606
|
-
|
|
188161
|
+
template = await promptForTemplate();
|
|
190607
188162
|
}
|
|
190608
|
-
const sourceRoot = join2(resolveTemplatesRoot(),
|
|
188163
|
+
const sourceRoot = join2(resolveTemplatesRoot(), template);
|
|
190609
188164
|
if (!existsSync11(sourceRoot)) {
|
|
190610
188165
|
throw new Error(`Template directory missing on disk: ${sourceRoot}`);
|
|
190611
188166
|
}
|