agent-valley 3.0.5 → 4.0.1
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/README.md +69 -69
- package/dist/assets/plugin.json +1 -1
- package/dist/assets/skills/av/SKILL.md +1 -0
- package/dist/index.js +1367 -450
- package/dist/supervisor.js +65 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -67,7 +67,7 @@ function resolveProjectConfigPath(root) {
|
|
|
67
67
|
var PROJECT_CONFIG_FILENAME = "av.yaml";
|
|
68
68
|
var init_project_config_path = () => {};
|
|
69
69
|
|
|
70
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
70
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/util.js
|
|
71
71
|
function getEnumValues(entries) {
|
|
72
72
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
73
73
|
const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -406,6 +406,18 @@ function prefixIssues(path, issues) {
|
|
|
406
406
|
function unwrapMessage(message) {
|
|
407
407
|
return typeof message === "string" ? message : message?.message;
|
|
408
408
|
}
|
|
409
|
+
function sizeCaps(defChecks) {
|
|
410
|
+
const caps = [];
|
|
411
|
+
for (const ch of defChecks ?? []) {
|
|
412
|
+
const d = ch._zod.def;
|
|
413
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
414
|
+
break;
|
|
415
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
416
|
+
if (max >= 0)
|
|
417
|
+
caps.push([max, ch]);
|
|
418
|
+
}
|
|
419
|
+
return caps;
|
|
420
|
+
}
|
|
409
421
|
function attachSchema(issues, start, inst) {
|
|
410
422
|
var _a;
|
|
411
423
|
for (let i = start;i < issues.length; i++) {
|
|
@@ -633,7 +645,7 @@ var init_util = __esm(() => {
|
|
|
633
645
|
};
|
|
634
646
|
});
|
|
635
647
|
|
|
636
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
648
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/core.js
|
|
637
649
|
function newError(Definition) {
|
|
638
650
|
const E = _E;
|
|
639
651
|
if (E) {
|
|
@@ -757,7 +769,7 @@ var init_core = __esm(() => {
|
|
|
757
769
|
globalConfig = globalThis.__zod_globalConfig;
|
|
758
770
|
});
|
|
759
771
|
|
|
760
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
772
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/errors.js
|
|
761
773
|
function _getMessage() {
|
|
762
774
|
const internals = this._zod;
|
|
763
775
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -905,7 +917,7 @@ var init_errors = __esm(() => {
|
|
|
905
917
|
});
|
|
906
918
|
});
|
|
907
919
|
|
|
908
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
920
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/parse.js
|
|
909
921
|
function finalizeParams(callee, params) {
|
|
910
922
|
return { callee: params?.callee ?? callee, Err: params?.Err };
|
|
911
923
|
}
|
|
@@ -1047,7 +1059,7 @@ var init_parse = __esm(() => {
|
|
|
1047
1059
|
COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
|
|
1048
1060
|
});
|
|
1049
1061
|
|
|
1050
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
1062
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/regexes.js
|
|
1051
1063
|
function nanoidOfLength(length) {
|
|
1052
1064
|
return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);
|
|
1053
1065
|
}
|
|
@@ -1107,7 +1119,7 @@ var init_regexes = __esm(() => {
|
|
|
1107
1119
|
uppercase = /^[^a-z]*$/;
|
|
1108
1120
|
});
|
|
1109
1121
|
|
|
1110
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
1122
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/checks.js
|
|
1111
1123
|
var $ZodCheck, _whenHasLength = (payload) => {
|
|
1112
1124
|
const val = payload.value;
|
|
1113
1125
|
return !nullish(val) && val.length !== undefined;
|
|
@@ -1428,7 +1440,7 @@ var init_checks = __esm(() => {
|
|
|
1428
1440
|
});
|
|
1429
1441
|
});
|
|
1430
1442
|
|
|
1431
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
1443
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/doc.js
|
|
1432
1444
|
class Doc {
|
|
1433
1445
|
constructor(args = [], closed = {}) {
|
|
1434
1446
|
this.content = [];
|
|
@@ -1470,17 +1482,17 @@ ${content.join(`
|
|
|
1470
1482
|
}
|
|
1471
1483
|
}
|
|
1472
1484
|
|
|
1473
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
1485
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/versions.js
|
|
1474
1486
|
var version;
|
|
1475
1487
|
var init_versions = __esm(() => {
|
|
1476
1488
|
version = {
|
|
1477
1489
|
major: 4,
|
|
1478
1490
|
minor: 6,
|
|
1479
|
-
patch:
|
|
1491
|
+
patch: 7
|
|
1480
1492
|
};
|
|
1481
1493
|
});
|
|
1482
1494
|
|
|
1483
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
1495
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/schemas.js
|
|
1484
1496
|
async function validateAsync2(inst, value) {
|
|
1485
1497
|
const ctx = { async: true };
|
|
1486
1498
|
return toStandardResult(await inst._zod.run({ value, issues: [] }, ctx), ctx);
|
|
@@ -1602,6 +1614,28 @@ function isValidJWT(token, algorithm = null) {
|
|
|
1602
1614
|
return false;
|
|
1603
1615
|
}
|
|
1604
1616
|
}
|
|
1617
|
+
function capSize(inst, size) {
|
|
1618
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
1619
|
+
if (!caps.length)
|
|
1620
|
+
return;
|
|
1621
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
1622
|
+
const parse = inst._zod.parse;
|
|
1623
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1624
|
+
const n = size(payload.value);
|
|
1625
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
1626
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
1627
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
1628
|
+
const start = payload.issues.length;
|
|
1629
|
+
ch._zod.check(payload);
|
|
1630
|
+
payload.issues[start].continue = false;
|
|
1631
|
+
attachSchema(payload.issues, start, inst);
|
|
1632
|
+
return payload;
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
return parse(payload, ctx);
|
|
1637
|
+
};
|
|
1638
|
+
}
|
|
1605
1639
|
function handleArrayResult(result, final, index) {
|
|
1606
1640
|
if (result.issues.length) {
|
|
1607
1641
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -1907,7 +1941,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
1907
1941
|
payload.issues.push(issue(_iss));
|
|
1908
1942
|
}
|
|
1909
1943
|
}
|
|
1910
|
-
var $ZodType, toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT = 1, URL_UNPARSEABLE = 2, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodDate, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodLazy, $ZodCustom;
|
|
1944
|
+
var $ZodType, toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT = 1, URL_UNPARSEABLE = 2, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodDate, arraySize = (input) => Array.isArray(input) ? input.length : -1, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodLazy, $ZodCustom;
|
|
1911
1945
|
var init_schemas = __esm(() => {
|
|
1912
1946
|
init_checks();
|
|
1913
1947
|
init_core();
|
|
@@ -2439,6 +2473,7 @@ var init_schemas = __esm(() => {
|
|
|
2439
2473
|
}
|
|
2440
2474
|
return payload;
|
|
2441
2475
|
};
|
|
2476
|
+
capSize(inst, arraySize);
|
|
2442
2477
|
});
|
|
2443
2478
|
NO_SYMBOL_KEYS = [];
|
|
2444
2479
|
$ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
@@ -3182,7 +3217,7 @@ var init_schemas = __esm(() => {
|
|
|
3182
3217
|
});
|
|
3183
3218
|
});
|
|
3184
3219
|
|
|
3185
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
3220
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/memoizer.js
|
|
3186
3221
|
function isRef(value) {
|
|
3187
3222
|
return value !== null && typeof value === "object";
|
|
3188
3223
|
}
|
|
@@ -3451,7 +3486,7 @@ var init_memoizer = __esm(() => {
|
|
|
3451
3486
|
};
|
|
3452
3487
|
});
|
|
3453
3488
|
|
|
3454
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
3489
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/locales/en.js
|
|
3455
3490
|
function en_default() {
|
|
3456
3491
|
return {
|
|
3457
3492
|
localeError: error()
|
|
@@ -3577,10 +3612,10 @@ var init_en = __esm(() => {
|
|
|
3577
3612
|
init_util();
|
|
3578
3613
|
});
|
|
3579
3614
|
|
|
3580
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
3615
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/locales/index.js
|
|
3581
3616
|
var init_locales = () => {};
|
|
3582
3617
|
|
|
3583
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
3618
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/registries.js
|
|
3584
3619
|
class $ZodRegistry {
|
|
3585
3620
|
constructor() {
|
|
3586
3621
|
this._map = new WeakMap;
|
|
@@ -3630,7 +3665,7 @@ var init_registries = __esm(() => {
|
|
|
3630
3665
|
globalRegistry = globalThis.__zod_globalRegistry;
|
|
3631
3666
|
});
|
|
3632
3667
|
|
|
3633
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
3668
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/compile.js
|
|
3634
3669
|
var INVALID, FALLBACK_FLAG, WHEN_DEFAULTED_CHECKS, PATTERN_IS_COMPLETE;
|
|
3635
3670
|
var init_compile = __esm(() => {
|
|
3636
3671
|
INVALID = Symbol.for("zod.compile.invalid");
|
|
@@ -3671,7 +3706,7 @@ var init_compile = __esm(() => {
|
|
|
3671
3706
|
]);
|
|
3672
3707
|
});
|
|
3673
3708
|
|
|
3674
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
3709
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/api.js
|
|
3675
3710
|
function snapshotChecks(def) {
|
|
3676
3711
|
if (def.checks)
|
|
3677
3712
|
def.checks = [...def.checks];
|
|
@@ -4173,7 +4208,7 @@ var init_api = __esm(() => {
|
|
|
4173
4208
|
init_util();
|
|
4174
4209
|
});
|
|
4175
4210
|
|
|
4176
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
4211
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.js
|
|
4177
4212
|
function assignProps(target, ...sources) {
|
|
4178
4213
|
for (const source of sources) {
|
|
4179
4214
|
for (const key of Reflect.ownKeys(source)) {
|
|
@@ -4700,7 +4735,7 @@ var init_to_json_schema = __esm(() => {
|
|
|
4700
4735
|
UNION_KEYS = ["oneOf", "anyOf"];
|
|
4701
4736
|
});
|
|
4702
4737
|
|
|
4703
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
4738
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/json-schema-processors.js
|
|
4704
4739
|
function aggregateChecks(schema) {
|
|
4705
4740
|
const agg = {};
|
|
4706
4741
|
const def = schema._zod.def;
|
|
@@ -5401,10 +5436,10 @@ var init_json_schema_processors = __esm(() => {
|
|
|
5401
5436
|
};
|
|
5402
5437
|
});
|
|
5403
5438
|
|
|
5404
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
5439
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/json-schema.js
|
|
5405
5440
|
var init_json_schema = () => {};
|
|
5406
5441
|
|
|
5407
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
5442
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/index.js
|
|
5408
5443
|
var init_core2 = __esm(() => {
|
|
5409
5444
|
init_util();
|
|
5410
5445
|
init_regexes();
|
|
@@ -5424,12 +5459,12 @@ var init_core2 = __esm(() => {
|
|
|
5424
5459
|
init_to_json_schema();
|
|
5425
5460
|
});
|
|
5426
5461
|
|
|
5427
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
5462
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/checks.js
|
|
5428
5463
|
var init_checks2 = __esm(() => {
|
|
5429
5464
|
init_core2();
|
|
5430
5465
|
});
|
|
5431
5466
|
|
|
5432
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
5467
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/errors.js
|
|
5433
5468
|
function _lazyMethod(proto, key, make) {
|
|
5434
5469
|
Object.defineProperty(proto, key, {
|
|
5435
5470
|
configurable: true,
|
|
@@ -5479,7 +5514,7 @@ var init_errors2 = __esm(() => {
|
|
|
5479
5514
|
});
|
|
5480
5515
|
});
|
|
5481
5516
|
|
|
5482
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
5517
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/parse.js
|
|
5483
5518
|
var parse3, parseAsync2, safeParse, safeParseAsync, encode, decode, encodeAsync, decodeAsync, safeEncode, safeDecode, safeEncodeAsync, safeDecodeAsync;
|
|
5484
5519
|
var init_parse2 = __esm(() => {
|
|
5485
5520
|
init_core2();
|
|
@@ -5499,7 +5534,7 @@ var init_parse2 = __esm(() => {
|
|
|
5499
5534
|
safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
5500
5535
|
});
|
|
5501
5536
|
|
|
5502
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
5537
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/schemas.js
|
|
5503
5538
|
function _ensureDefaultLocale() {
|
|
5504
5539
|
if (!globalConfig.localeError)
|
|
5505
5540
|
config(en_default());
|
|
@@ -6536,7 +6571,7 @@ var init_schemas2 = __esm(() => {
|
|
|
6536
6571
|
});
|
|
6537
6572
|
});
|
|
6538
6573
|
|
|
6539
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
6574
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/compat.js
|
|
6540
6575
|
var ZodIssueCode, ZodFirstPartyTypeKind;
|
|
6541
6576
|
var init_compat = __esm(() => {
|
|
6542
6577
|
ZodIssueCode = {
|
|
@@ -6555,7 +6590,7 @@ var init_compat = __esm(() => {
|
|
|
6555
6590
|
(function(ZodFirstPartyTypeKind) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
6556
6591
|
});
|
|
6557
6592
|
|
|
6558
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
6593
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/iso.js
|
|
6559
6594
|
var exports_iso = {};
|
|
6560
6595
|
__export(exports_iso, {
|
|
6561
6596
|
ZodISODate: () => ZodISODate,
|
|
@@ -6585,7 +6620,7 @@ var init_iso = __esm(() => {
|
|
|
6585
6620
|
init_schemas2();
|
|
6586
6621
|
});
|
|
6587
6622
|
|
|
6588
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
6623
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/coerce.js
|
|
6589
6624
|
var exports_coerce = {};
|
|
6590
6625
|
__export(exports_coerce, {
|
|
6591
6626
|
bigint: () => bigint2,
|
|
@@ -6614,7 +6649,7 @@ var init_coerce = __esm(() => {
|
|
|
6614
6649
|
init_schemas2();
|
|
6615
6650
|
});
|
|
6616
6651
|
|
|
6617
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
6652
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/external.js
|
|
6618
6653
|
var init_external = __esm(() => {
|
|
6619
6654
|
init_core2();
|
|
6620
6655
|
init_core2();
|
|
@@ -6629,7 +6664,7 @@ var init_external = __esm(() => {
|
|
|
6629
6664
|
init_compat();
|
|
6630
6665
|
});
|
|
6631
6666
|
|
|
6632
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
6667
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/index.js
|
|
6633
6668
|
var init_zod = __esm(() => {
|
|
6634
6669
|
init_external();
|
|
6635
6670
|
init_external();
|
|
@@ -19664,7 +19699,7 @@ var init_client_integrations = __esm(() => {
|
|
|
19664
19699
|
};
|
|
19665
19700
|
});
|
|
19666
19701
|
|
|
19667
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19702
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/buffer_utils.js
|
|
19668
19703
|
function concat(...buffers) {
|
|
19669
19704
|
const size = buffers.reduce((acc, { length }) => acc + length, 0), buf = new Uint8Array(size);
|
|
19670
19705
|
let i = 0;
|
|
@@ -19700,16 +19735,16 @@ function decodeBase64(encoded, url = false) {
|
|
|
19700
19735
|
bytes[i] = binary.charCodeAt(i);
|
|
19701
19736
|
return bytes;
|
|
19702
19737
|
}
|
|
19703
|
-
var encoder, decoder, strictDecoder,
|
|
19738
|
+
var encoder, decoder, strictDecoder, UINT32_RANGE, NON_ASCII;
|
|
19704
19739
|
var init_buffer_utils = __esm(() => {
|
|
19705
19740
|
encoder = new TextEncoder;
|
|
19706
19741
|
decoder = new TextDecoder;
|
|
19707
19742
|
strictDecoder = new TextDecoder("utf-8", { fatal: true });
|
|
19708
|
-
|
|
19743
|
+
UINT32_RANGE = 2 ** 32;
|
|
19709
19744
|
NON_ASCII = /[^\x00-\x7f]/;
|
|
19710
19745
|
});
|
|
19711
19746
|
|
|
19712
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19747
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/util/errors.js
|
|
19713
19748
|
var JOSEError, JWTClaimValidationFailed, JWTExpired, JOSEAlgNotAllowed, JOSENotSupported, JWSInvalid, JWTInvalid, JWKSInvalid, JWKSNoMatchingKey, JWKSMultipleMatchingKeys, JWKSTimeout, JWSSignatureVerificationFailed;
|
|
19714
19749
|
var init_errors3 = __esm(() => {
|
|
19715
19750
|
JOSEError = class JOSEError extends Error {
|
|
@@ -19790,7 +19825,7 @@ var init_errors3 = __esm(() => {
|
|
|
19790
19825
|
};
|
|
19791
19826
|
});
|
|
19792
19827
|
|
|
19793
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19828
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/util/base64url.js
|
|
19794
19829
|
function decode2(input) {
|
|
19795
19830
|
try {
|
|
19796
19831
|
return decodeBase64(typeof input == "string" ? input : decoder.decode(input), true);
|
|
@@ -19803,7 +19838,7 @@ var init_base64url = __esm(() => {
|
|
|
19803
19838
|
init_buffer_utils();
|
|
19804
19839
|
});
|
|
19805
19840
|
|
|
19806
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19841
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/validate.js
|
|
19807
19842
|
function isObject2(input) {
|
|
19808
19843
|
if (typeof input != "object" || input === null || Object.prototype.toString.call(input) !== "[object Object]")
|
|
19809
19844
|
return false;
|
|
@@ -19827,23 +19862,23 @@ function isDisjoint(...headers) {
|
|
|
19827
19862
|
function decodeBase64url(value, label, ErrorClass) {
|
|
19828
19863
|
try {
|
|
19829
19864
|
return decode2(value);
|
|
19830
|
-
} catch {
|
|
19831
|
-
throw new ErrorClass(`Failed to base64url decode the ${label}
|
|
19865
|
+
} catch (cause) {
|
|
19866
|
+
throw new ErrorClass(`Failed to base64url decode the ${label}`, { cause });
|
|
19832
19867
|
}
|
|
19833
19868
|
}
|
|
19834
|
-
function
|
|
19869
|
+
function encodeAsciiMember(value, label, ErrorClass) {
|
|
19835
19870
|
try {
|
|
19836
19871
|
return encode2(value);
|
|
19837
|
-
} catch {
|
|
19838
|
-
throw new ErrorClass(`The ${label} is not a valid base64url string
|
|
19872
|
+
} catch (cause) {
|
|
19873
|
+
throw new ErrorClass(`The ${label} is not a valid base64url string`, { cause });
|
|
19839
19874
|
}
|
|
19840
19875
|
}
|
|
19841
|
-
function parseJoseHeader(
|
|
19876
|
+
function parseJoseHeader(encodedProtectedHeader, ErrorClass, message) {
|
|
19842
19877
|
let parsed;
|
|
19843
19878
|
try {
|
|
19844
|
-
parsed = JSON.parse(strictDecoder.decode(decode2(
|
|
19845
|
-
} catch {
|
|
19846
|
-
throw new ErrorClass(message);
|
|
19879
|
+
parsed = JSON.parse(strictDecoder.decode(decode2(encodedProtectedHeader)));
|
|
19880
|
+
} catch (cause) {
|
|
19881
|
+
throw new ErrorClass(message, { cause });
|
|
19847
19882
|
}
|
|
19848
19883
|
if (!isObject2(parsed))
|
|
19849
19884
|
throw new ErrorClass(message);
|
|
@@ -19889,17 +19924,17 @@ var init_validate = __esm(() => {
|
|
|
19889
19924
|
JWS_RECOGNIZED = { __proto__: null, b64: true };
|
|
19890
19925
|
});
|
|
19891
19926
|
|
|
19892
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19927
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/key.js
|
|
19893
19928
|
async function prepareKey(entry, key, usage) {
|
|
19894
|
-
const { alg, secret } = entry,
|
|
19929
|
+
const { alg, secret } = entry, requiresPrivateKey = usage === "decrypt" || usage === "sign";
|
|
19895
19930
|
if (secret && key instanceof Uint8Array)
|
|
19896
19931
|
return key;
|
|
19897
19932
|
let normalized, keyObject;
|
|
19898
19933
|
if (isObject2(key)) {
|
|
19899
19934
|
if (normalized = normalizeJwk(key), typeof normalized.kty != "string")
|
|
19900
19935
|
throw invalidKeyType(alg, key, secret);
|
|
19901
|
-
if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (
|
|
19902
|
-
throw new TypeError(secret ? 'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present' : `JSON Web Key for this operation must be a ${
|
|
19936
|
+
if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (requiresPrivateKey ? normalized.kty === "AKP" && typeof normalized.priv == "string" || typeof normalized.d == "string" : normalized.d === undefined && normalized.priv === undefined)))
|
|
19937
|
+
throw new TypeError(secret ? 'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present' : `JSON Web Key for this operation must be a ${requiresPrivateKey ? "private" : "public"} JWK`);
|
|
19903
19938
|
if (jwkMatchesOp(entry, normalized, usage), normalized.kty === "oct")
|
|
19904
19939
|
return decode2(normalized.k);
|
|
19905
19940
|
if (!Object.isFrozen(key)) {
|
|
@@ -19909,7 +19944,7 @@ async function prepareKey(entry, key, usage) {
|
|
|
19909
19944
|
} else {
|
|
19910
19945
|
if (!isKeyLike(key))
|
|
19911
19946
|
throw invalidKeyType(alg, key, secret);
|
|
19912
|
-
const expectedType = secret ? "secret" :
|
|
19947
|
+
const expectedType = secret ? "secret" : requiresPrivateKey ? "private" : "public";
|
|
19913
19948
|
if (key.type !== expectedType && (secret || ["secret", "public", "private"].includes(key.type)))
|
|
19914
19949
|
throw new TypeError(`${tag(key)} instances must be of type "${expectedType}" for the ${alg} algorithm`);
|
|
19915
19950
|
if (isCryptoKey(key))
|
|
@@ -20020,7 +20055,7 @@ var init_key = __esm(() => {
|
|
|
20020
20055
|
};
|
|
20021
20056
|
});
|
|
20022
20057
|
|
|
20023
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20058
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/key_descriptor.js
|
|
20024
20059
|
function table(entries) {
|
|
20025
20060
|
const out = { __proto__: null };
|
|
20026
20061
|
for (const alg in entries)
|
|
@@ -20029,7 +20064,7 @@ function table(entries) {
|
|
|
20029
20064
|
}
|
|
20030
20065
|
var init_key_descriptor = () => {};
|
|
20031
20066
|
|
|
20032
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20067
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/jws_algorithms.js
|
|
20033
20068
|
function hmac(bits) {
|
|
20034
20069
|
const subtle = { name: "HMAC", hash: `SHA-${bits}` };
|
|
20035
20070
|
return { kty: ["oct"], secret: true, subtle, signing: subtle, usages: sig };
|
|
@@ -20063,8 +20098,8 @@ function eddsa() {
|
|
|
20063
20098
|
usages: sig
|
|
20064
20099
|
};
|
|
20065
20100
|
}
|
|
20066
|
-
function mldsa(
|
|
20067
|
-
const subtle = { name: `ML-DSA-${
|
|
20101
|
+
function mldsa(parameterSet) {
|
|
20102
|
+
const subtle = { name: `ML-DSA-${parameterSet}` };
|
|
20068
20103
|
return {
|
|
20069
20104
|
kty: ["AKP"],
|
|
20070
20105
|
subtle,
|
|
@@ -20104,25 +20139,27 @@ var init_jws_algorithms = __esm(() => {
|
|
|
20104
20139
|
});
|
|
20105
20140
|
});
|
|
20106
20141
|
|
|
20107
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20142
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/jws_verify.js
|
|
20108
20143
|
function prepareVerify(options) {
|
|
20109
20144
|
return [options && validateAlgorithms("algorithms", options.algorithms), options?.crit];
|
|
20110
20145
|
}
|
|
20111
|
-
function parseProtectedHeader(
|
|
20112
|
-
return
|
|
20146
|
+
function parseProtectedHeader(encodedProtectedHeader) {
|
|
20147
|
+
return encodedProtectedHeader === undefined ? {} : parseJoseHeader(encodedProtectedHeader, JWSInvalid, "JWS Protected Header is invalid");
|
|
20113
20148
|
}
|
|
20114
20149
|
function encodeCompactUnencodedPayload(payload) {
|
|
20115
20150
|
try {
|
|
20116
20151
|
return encode2(payload);
|
|
20117
|
-
} catch {
|
|
20118
|
-
throw new JWSInvalid("JWS Compact Serialization payload must use only ASCII characters"
|
|
20152
|
+
} catch (cause) {
|
|
20153
|
+
throw new JWSInvalid("JWS Compact Serialization payload must use only ASCII characters", {
|
|
20154
|
+
cause
|
|
20155
|
+
});
|
|
20119
20156
|
}
|
|
20120
20157
|
}
|
|
20121
20158
|
async function verifySignature(jws, shared, key, encodeUnencodedPayload, parsedProtected) {
|
|
20122
|
-
const { protected:
|
|
20123
|
-
if (!isDisjoint(
|
|
20159
|
+
const { protected: encodedProtectedHeader, header, payload: inputPayload } = jws, protectedHeader = parsedProtected ?? parseProtectedHeader(encodedProtectedHeader);
|
|
20160
|
+
if (!isDisjoint(protectedHeader, header))
|
|
20124
20161
|
throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
20125
|
-
const joseHeader = { ...
|
|
20162
|
+
const joseHeader = { ...protectedHeader, ...header }, b64 = validateB64(protectedHeader, validateCrit(JWSInvalid, JWS_RECOGNIZED, shared[1], protectedHeader, joseHeader)), { alg } = joseHeader;
|
|
20126
20163
|
if (typeof alg != "string" || !alg)
|
|
20127
20164
|
throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
20128
20165
|
if (shared[0] && !shared[0].has(alg))
|
|
@@ -20134,17 +20171,19 @@ async function verifySignature(jws, shared, key, encodeUnencodedPayload, parsedP
|
|
|
20134
20171
|
throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance");
|
|
20135
20172
|
const signingPayload = b64 || typeof inputPayload != "string" ? inputPayload : encodeUnencodedPayload(inputPayload);
|
|
20136
20173
|
let resolvedKey = false;
|
|
20137
|
-
typeof key == "function" && (key = await key(
|
|
20138
|
-
const entry = jwsAlgorithm(alg),
|
|
20174
|
+
typeof key == "function" && (key = await key(protectedHeader, jws), resolvedKey = true);
|
|
20175
|
+
const entry = jwsAlgorithm(alg), signingInput = concat(encodedProtectedHeader !== undefined ? encode2(encodedProtectedHeader) : new Uint8Array, encode2("."), typeof signingPayload == "string" ? shared[2] ??= encodeAsciiMember(signingPayload, "payload", JWSInvalid) : signingPayload), signature = decodeBase64url(jws.signature, "signature", JWSInvalid), verificationKey = await prepareKey(entry, key, "verify"), cryptoKey = await rawKey(verificationKey, entry.subtle, "verify");
|
|
20139
20176
|
entry.minRsaBits && checkModulusLength(entry.alg, cryptoKey);
|
|
20140
20177
|
let verified = false;
|
|
20141
20178
|
try {
|
|
20142
|
-
verified = await crypto.subtle.verify(entry.signing, cryptoKey, signature,
|
|
20143
|
-
} catch {
|
|
20179
|
+
verified = await crypto.subtle.verify(entry.signing, cryptoKey, signature, signingInput);
|
|
20180
|
+
} catch (cause) {
|
|
20181
|
+
throw new JWSSignatureVerificationFailed(undefined, { cause });
|
|
20182
|
+
}
|
|
20144
20183
|
if (!verified)
|
|
20145
20184
|
throw new JWSSignatureVerificationFailed;
|
|
20146
20185
|
const result = { payload: typeof signingPayload == "string" ? decodeBase64url(signingPayload, "payload", JWSInvalid) : signingPayload };
|
|
20147
|
-
return
|
|
20186
|
+
return encodedProtectedHeader !== undefined && (result.protectedHeader = protectedHeader), header !== undefined && (result.unprotectedHeader = header), resolvedKey ? [{ ...result, key: verificationKey }, b64] : [result, b64];
|
|
20148
20187
|
}
|
|
20149
20188
|
async function verifyCompact(jws, shared, key) {
|
|
20150
20189
|
if (jws instanceof Uint8Array && (jws = decoder.decode(jws)), typeof jws != "string")
|
|
@@ -20162,7 +20201,7 @@ var init_jws_verify = __esm(() => {
|
|
|
20162
20201
|
init_key();
|
|
20163
20202
|
});
|
|
20164
20203
|
|
|
20165
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20204
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/jwt_claims_set.js
|
|
20166
20205
|
function invalidDuration() {
|
|
20167
20206
|
throw new TypeError("Invalid time period format");
|
|
20168
20207
|
}
|
|
@@ -20170,41 +20209,43 @@ function secs(str) {
|
|
|
20170
20209
|
typeof str != "string" && invalidDuration();
|
|
20171
20210
|
const matched = REGEX.exec(str);
|
|
20172
20211
|
(!matched || matched[4] && matched[1]) && invalidDuration();
|
|
20173
|
-
const value = parseFloat(matched[2]),
|
|
20174
|
-
return Number.isFinite(
|
|
20212
|
+
const value = parseFloat(matched[2]), durationSeconds = Math.round(value * multipliers[matched[3][0].toLowerCase()]);
|
|
20213
|
+
return Number.isFinite(durationSeconds) || invalidDuration(), matched[1] === "-" || matched[4] === "ago" ? -durationSeconds : durationSeconds;
|
|
20175
20214
|
}
|
|
20176
20215
|
function validateInput(label, input) {
|
|
20177
20216
|
if (!Number.isFinite(input))
|
|
20178
20217
|
throw new TypeError(`Invalid ${label} input`);
|
|
20179
20218
|
return input;
|
|
20180
20219
|
}
|
|
20181
|
-
function validateNumericDate(
|
|
20182
|
-
const value =
|
|
20220
|
+
function validateNumericDate(claimsSet, claim, required = false) {
|
|
20221
|
+
const value = claimsSet[claim];
|
|
20183
20222
|
if (!(value === undefined && !required)) {
|
|
20184
20223
|
if (typeof value != "number")
|
|
20185
|
-
throw new JWTClaimValidationFailed(`"${claim}" claim must be a number`,
|
|
20224
|
+
throw new JWTClaimValidationFailed(`"${claim}" claim must be a number`, claimsSet, claim, "invalid");
|
|
20186
20225
|
return value;
|
|
20187
20226
|
}
|
|
20188
20227
|
}
|
|
20189
|
-
function unexpectedClaim(
|
|
20190
|
-
throw new JWTClaimValidationFailed(`unexpected "${claim}" claim value`,
|
|
20228
|
+
function unexpectedClaim(claimsSet, claim) {
|
|
20229
|
+
throw new JWTClaimValidationFailed(`unexpected "${claim}" claim value`, claimsSet, claim, checkFailed);
|
|
20191
20230
|
}
|
|
20192
|
-
function validateClaimsSet(protectedHeader,
|
|
20193
|
-
let
|
|
20231
|
+
function validateClaimsSet(protectedHeader, claimsSetBytes, options = {}) {
|
|
20232
|
+
let claimsSet;
|
|
20194
20233
|
try {
|
|
20195
|
-
|
|
20196
|
-
} catch {
|
|
20197
|
-
|
|
20234
|
+
claimsSet = JSON.parse(strictDecoder.decode(claimsSetBytes));
|
|
20235
|
+
} catch (cause) {
|
|
20236
|
+
throw new JWTInvalid("JWT Claims Set must be a top-level JSON object", { cause });
|
|
20237
|
+
}
|
|
20238
|
+
if (!isObject2(claimsSet))
|
|
20198
20239
|
throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
|
|
20199
20240
|
const { typ } = options;
|
|
20200
20241
|
if (typ !== undefined && (typeof protectedHeader.typ != "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ)))
|
|
20201
|
-
throw new JWTClaimValidationFailed('unexpected "typ" JWT header value',
|
|
20242
|
+
throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', claimsSet, "typ", checkFailed);
|
|
20202
20243
|
const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options, presenceCheck = [...requiredClaims];
|
|
20203
20244
|
maxTokenAge !== undefined && presenceCheck.push("iat"), audience !== undefined && presenceCheck.push("aud"), subject !== undefined && presenceCheck.push("sub"), issuer !== undefined && presenceCheck.push("iss");
|
|
20204
20245
|
for (const claim of new Set(presenceCheck.reverse()))
|
|
20205
|
-
if (!Object.hasOwn(
|
|
20206
|
-
throw new JWTClaimValidationFailed(`missing required "${claim}" claim`,
|
|
20207
|
-
issuer !== undefined && !(Array.isArray(issuer) ? issuer : [issuer]).includes(
|
|
20246
|
+
if (!Object.hasOwn(claimsSet, claim))
|
|
20247
|
+
throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, claimsSet, claim, "missing");
|
|
20248
|
+
issuer !== undefined && !(Array.isArray(issuer) ? issuer : [issuer]).includes(claimsSet.iss) && unexpectedClaim(claimsSet, "iss"), subject !== undefined && claimsSet.sub !== subject && unexpectedClaim(claimsSet, "sub"), audience !== undefined && !checkAudiencePresence(claimsSet.aud, typeof audience == "string" ? [audience] : audience) && unexpectedClaim(claimsSet, "aud");
|
|
20208
20249
|
const { clockTolerance } = options;
|
|
20209
20250
|
let tolerance = 0;
|
|
20210
20251
|
if (typeof clockTolerance == "string")
|
|
@@ -20215,20 +20256,20 @@ function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {
|
|
|
20215
20256
|
tolerance = clockTolerance;
|
|
20216
20257
|
}
|
|
20217
20258
|
validateInput("clockTolerance option", tolerance);
|
|
20218
|
-
const { currentDate } = options, now = validateInput("currentDate option", epoch(currentDate === undefined ? /* @__PURE__ */ new Date : currentDate)), iat = validateNumericDate(
|
|
20259
|
+
const { currentDate } = options, now = validateInput("currentDate option", epoch(currentDate === undefined ? /* @__PURE__ */ new Date : currentDate)), iat = validateNumericDate(claimsSet, "iat", maxTokenAge !== undefined), nbf = validateNumericDate(claimsSet, "nbf");
|
|
20219
20260
|
if (nbf !== undefined && nbf > now + tolerance)
|
|
20220
|
-
throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed',
|
|
20221
|
-
const exp = validateNumericDate(
|
|
20261
|
+
throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', claimsSet, "nbf", checkFailed);
|
|
20262
|
+
const exp = validateNumericDate(claimsSet, "exp");
|
|
20222
20263
|
if (exp !== undefined && exp <= now - tolerance)
|
|
20223
|
-
throw new JWTExpired('"exp" claim timestamp check failed',
|
|
20264
|
+
throw new JWTExpired('"exp" claim timestamp check failed', claimsSet, "exp", checkFailed);
|
|
20224
20265
|
if (maxTokenAge !== undefined) {
|
|
20225
20266
|
const age = now - iat, max = validateInput("maxTokenAge option", typeof maxTokenAge == "number" ? maxTokenAge : secs(maxTokenAge));
|
|
20226
20267
|
if (age - tolerance > max)
|
|
20227
|
-
throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)',
|
|
20268
|
+
throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', claimsSet, "iat", checkFailed);
|
|
20228
20269
|
if (age < -tolerance)
|
|
20229
|
-
throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',
|
|
20270
|
+
throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', claimsSet, "iat", checkFailed);
|
|
20230
20271
|
}
|
|
20231
|
-
return
|
|
20272
|
+
return claimsSet;
|
|
20232
20273
|
}
|
|
20233
20274
|
var epoch = (date) => Math.floor(date.getTime() / 1000), multipliers, REGEX, checkFailed = "check_failed", normalizeTyp = (value) => {
|
|
20234
20275
|
const normalized = value.toLowerCase();
|
|
@@ -20249,7 +20290,7 @@ var init_jwt_claims_set = __esm(() => {
|
|
|
20249
20290
|
REGEX = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;
|
|
20250
20291
|
});
|
|
20251
20292
|
|
|
20252
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20293
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/jwt/verify.js
|
|
20253
20294
|
async function jwtVerify(jwt, key, options) {
|
|
20254
20295
|
const [verified, b64] = await verifyCompact(jwt, prepareVerify(options), key);
|
|
20255
20296
|
if (!b64)
|
|
@@ -20263,7 +20304,7 @@ var init_verify = __esm(() => {
|
|
|
20263
20304
|
init_errors3();
|
|
20264
20305
|
});
|
|
20265
20306
|
|
|
20266
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20307
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/jwks/local.js
|
|
20267
20308
|
function isUsableJWK(jwk, entry, alg, kid) {
|
|
20268
20309
|
const { kty, key_ops: keyOps, ext, kid: jwkKid, alg: jwkAlg, use, crv } = jwk;
|
|
20269
20310
|
return (ext === undefined || typeof ext == "boolean") && (keyOps === undefined || Array.isArray(keyOps) && keyOps.every((operation, index) => typeof operation == "string" && keyOps.indexOf(operation) === index) && keyOps.includes("verify")) && entry.kty.includes(kty) && (kid === undefined || typeof kid == "string" && kid === jwkKid) && (jwkAlg === undefined ? kty !== "AKP" : alg === jwkAlg) && (use === undefined || use === "sig") && (!entry.crv || crv === entry.crv);
|
|
@@ -20286,7 +20327,9 @@ function createLocalJWKSet(jwks) {
|
|
|
20286
20327
|
let snapshot;
|
|
20287
20328
|
try {
|
|
20288
20329
|
snapshot = structuredClone(jwks);
|
|
20289
|
-
} catch {
|
|
20330
|
+
} catch (cause) {
|
|
20331
|
+
throw new JWKSInvalid("JSON Web Key Set malformed", { cause });
|
|
20332
|
+
}
|
|
20290
20333
|
if (!isJwkSet(snapshot))
|
|
20291
20334
|
throw new JWKSInvalid("JSON Web Key Set malformed");
|
|
20292
20335
|
const metadata = snapshot.keys.map((jwk) => {
|
|
@@ -20321,7 +20364,7 @@ var init_local = __esm(() => {
|
|
|
20321
20364
|
init_validate();
|
|
20322
20365
|
});
|
|
20323
20366
|
|
|
20324
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20367
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/jwks/remote.js
|
|
20325
20368
|
function isCloudflareWorkers() {
|
|
20326
20369
|
return typeof WebSocketPair < "u" || typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers" || typeof EdgeRuntime < "u" && EdgeRuntime === "vercel";
|
|
20327
20370
|
}
|
|
@@ -20332,14 +20375,14 @@ async function fetchJwks(url, headers, signal, fetchImpl = fetch) {
|
|
|
20332
20375
|
redirect: "manual",
|
|
20333
20376
|
headers
|
|
20334
20377
|
}).catch((err) => {
|
|
20335
|
-
throw err.name === "TimeoutError" ? new JWKSTimeout : err;
|
|
20378
|
+
throw err.name === "TimeoutError" ? new JWKSTimeout(undefined, { cause: err }) : err;
|
|
20336
20379
|
});
|
|
20337
20380
|
if (response.status !== 200)
|
|
20338
20381
|
throw new JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response");
|
|
20339
20382
|
try {
|
|
20340
20383
|
return await response.json();
|
|
20341
|
-
} catch {
|
|
20342
|
-
throw new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON");
|
|
20384
|
+
} catch (cause) {
|
|
20385
|
+
throw new JOSEError("Failed to parse the JSON Web Key Set HTTP response as JSON", { cause });
|
|
20343
20386
|
}
|
|
20344
20387
|
}
|
|
20345
20388
|
function isFreshFor(timestamp, duration) {
|
|
@@ -20416,12 +20459,12 @@ var init_remote = __esm(() => {
|
|
|
20416
20459
|
init_errors3();
|
|
20417
20460
|
init_local();
|
|
20418
20461
|
init_validate();
|
|
20419
|
-
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (USER_AGENT = "jose/v6.2.
|
|
20462
|
+
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (USER_AGENT = "jose/v6.2.13");
|
|
20420
20463
|
customFetch = /* @__PURE__ */ Symbol();
|
|
20421
20464
|
jwksCache = /* @__PURE__ */ Symbol();
|
|
20422
20465
|
});
|
|
20423
20466
|
|
|
20424
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20467
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/index.js
|
|
20425
20468
|
var init_webapi = __esm(() => {
|
|
20426
20469
|
init_verify();
|
|
20427
20470
|
init_remote();
|
|
@@ -33010,9 +33053,160 @@ init_logger();
|
|
|
33010
33053
|
init_logger();
|
|
33011
33054
|
init_process_tree();
|
|
33012
33055
|
import { spawn as spawn4 } from "node:child_process";
|
|
33056
|
+
|
|
33057
|
+
// ../../packages/core/src/util/bounded-process-output.ts
|
|
33058
|
+
import { StringDecoder } from "node:string_decoder";
|
|
33059
|
+
|
|
33060
|
+
class TerminalStream {
|
|
33061
|
+
append;
|
|
33062
|
+
decoder = new StringDecoder("utf8");
|
|
33063
|
+
state = "text";
|
|
33064
|
+
ended = false;
|
|
33065
|
+
constructor(append) {
|
|
33066
|
+
this.append = append;
|
|
33067
|
+
}
|
|
33068
|
+
write(chunk) {
|
|
33069
|
+
if (!this.ended)
|
|
33070
|
+
this.consume(this.decoder.write(chunk));
|
|
33071
|
+
}
|
|
33072
|
+
end() {
|
|
33073
|
+
if (this.ended)
|
|
33074
|
+
return;
|
|
33075
|
+
this.ended = true;
|
|
33076
|
+
this.consume(this.decoder.end());
|
|
33077
|
+
this.state = "text";
|
|
33078
|
+
}
|
|
33079
|
+
consume(text) {
|
|
33080
|
+
let printable = "";
|
|
33081
|
+
for (const char of text) {
|
|
33082
|
+
if (!this.accept(char))
|
|
33083
|
+
continue;
|
|
33084
|
+
printable += char;
|
|
33085
|
+
if (printable.length >= 1024) {
|
|
33086
|
+
this.append(printable);
|
|
33087
|
+
printable = "";
|
|
33088
|
+
}
|
|
33089
|
+
}
|
|
33090
|
+
if (printable)
|
|
33091
|
+
this.append(printable);
|
|
33092
|
+
}
|
|
33093
|
+
accept(char) {
|
|
33094
|
+
const code = char.codePointAt(0);
|
|
33095
|
+
switch (this.state) {
|
|
33096
|
+
case "osc":
|
|
33097
|
+
case "string":
|
|
33098
|
+
if (code === 156 || this.state === "osc" && code === 7)
|
|
33099
|
+
this.state = "text";
|
|
33100
|
+
else if (code === 27)
|
|
33101
|
+
this.state = this.state === "osc" ? "oscEscape" : "stringEscape";
|
|
33102
|
+
return false;
|
|
33103
|
+
case "oscEscape":
|
|
33104
|
+
case "stringEscape":
|
|
33105
|
+
if (char === "\\" || code === 156 || this.state === "oscEscape" && code === 7)
|
|
33106
|
+
this.state = "text";
|
|
33107
|
+
else if (code !== 27)
|
|
33108
|
+
this.state = this.state === "oscEscape" ? "osc" : "string";
|
|
33109
|
+
return false;
|
|
33110
|
+
case "csi":
|
|
33111
|
+
if (code === 27)
|
|
33112
|
+
this.state = "escape";
|
|
33113
|
+
else if (code >= 64 && code <= 126)
|
|
33114
|
+
this.state = "text";
|
|
33115
|
+
return false;
|
|
33116
|
+
case "escape":
|
|
33117
|
+
if (char === "[")
|
|
33118
|
+
this.state = "csi";
|
|
33119
|
+
else if (char === "]")
|
|
33120
|
+
this.state = "osc";
|
|
33121
|
+
else if (["P", "X", "^", "_"].includes(char))
|
|
33122
|
+
this.state = "string";
|
|
33123
|
+
else if (code >= 32 && code <= 47)
|
|
33124
|
+
this.state = "intermediate";
|
|
33125
|
+
else if (code !== 27)
|
|
33126
|
+
this.state = "text";
|
|
33127
|
+
return false;
|
|
33128
|
+
case "intermediate":
|
|
33129
|
+
if (code === 27)
|
|
33130
|
+
this.state = "escape";
|
|
33131
|
+
else if (code < 32 || code > 47)
|
|
33132
|
+
this.state = "text";
|
|
33133
|
+
return false;
|
|
33134
|
+
case "text":
|
|
33135
|
+
if (code === 27)
|
|
33136
|
+
this.state = "escape";
|
|
33137
|
+
else if (code === 155)
|
|
33138
|
+
this.state = "csi";
|
|
33139
|
+
else if (code === 157)
|
|
33140
|
+
this.state = "osc";
|
|
33141
|
+
else if ([144, 152, 158, 159].includes(code))
|
|
33142
|
+
this.state = "string";
|
|
33143
|
+
else
|
|
33144
|
+
return code === 9 || code === 10 || code >= 32 && (code < 127 || code > 159);
|
|
33145
|
+
return false;
|
|
33146
|
+
}
|
|
33147
|
+
}
|
|
33148
|
+
}
|
|
33149
|
+
|
|
33150
|
+
class BoundedProcessOutput {
|
|
33151
|
+
maxLength;
|
|
33152
|
+
value = "";
|
|
33153
|
+
streams = {
|
|
33154
|
+
stdout: new TerminalStream((text) => this.retain(text)),
|
|
33155
|
+
stderr: new TerminalStream((text) => this.retain(text))
|
|
33156
|
+
};
|
|
33157
|
+
constructor(maxLength) {
|
|
33158
|
+
this.maxLength = maxLength;
|
|
33159
|
+
if (!Number.isSafeInteger(maxLength) || maxLength < 1)
|
|
33160
|
+
throw new RangeError("Output limit must be a positive integer.");
|
|
33161
|
+
}
|
|
33162
|
+
write(stream, chunk) {
|
|
33163
|
+
this.streams[stream].write(chunk);
|
|
33164
|
+
}
|
|
33165
|
+
append(text) {
|
|
33166
|
+
const stream = new TerminalStream((part) => this.retain(part));
|
|
33167
|
+
stream.write(Buffer.from(text));
|
|
33168
|
+
stream.end();
|
|
33169
|
+
}
|
|
33170
|
+
end(stream) {
|
|
33171
|
+
this.streams[stream].end();
|
|
33172
|
+
}
|
|
33173
|
+
finish() {
|
|
33174
|
+
this.end("stdout");
|
|
33175
|
+
this.end("stderr");
|
|
33176
|
+
return this.value;
|
|
33177
|
+
}
|
|
33178
|
+
retain(text) {
|
|
33179
|
+
const tail = (this.value + text).slice(-this.maxLength);
|
|
33180
|
+
const first = tail.charCodeAt(0);
|
|
33181
|
+
this.value = first >= 56320 && first <= 57343 ? tail.slice(1) : tail;
|
|
33182
|
+
}
|
|
33183
|
+
}
|
|
33184
|
+
|
|
33185
|
+
// ../../packages/core/src/orchestrator/verification-gate.ts
|
|
33013
33186
|
var MAX_OUTPUT_LENGTH = 10240;
|
|
33014
33187
|
var DEFAULT_TIMEOUT_SEC = 600;
|
|
33015
|
-
var
|
|
33188
|
+
var MIN_TIMEOUT_SEC = 10;
|
|
33189
|
+
var MAX_TIMEOUT_SEC = 3600;
|
|
33190
|
+
function buildVerifyEnv(extraEnv) {
|
|
33191
|
+
return {
|
|
33192
|
+
PATH: process.env.PATH,
|
|
33193
|
+
HOME: process.env.HOME,
|
|
33194
|
+
NODE_ENV: "development",
|
|
33195
|
+
LANG: "C.UTF-8",
|
|
33196
|
+
NO_COLOR: "1",
|
|
33197
|
+
FORCE_COLOR: "0",
|
|
33198
|
+
...pickEnv(process.env, ["NODE_PATH", "BUN_INSTALL", "BUN_VERSION", "npm_config_user_agent"]),
|
|
33199
|
+
...extraEnv
|
|
33200
|
+
};
|
|
33201
|
+
}
|
|
33202
|
+
function pickEnv(env, keys) {
|
|
33203
|
+
const out = {};
|
|
33204
|
+
for (const key of keys)
|
|
33205
|
+
if (env[key])
|
|
33206
|
+
out[key] = env[key];
|
|
33207
|
+
return out;
|
|
33208
|
+
}
|
|
33209
|
+
var defaultVerifyExec = (command, cwd, timeoutMs, signal, onSpawned, extraEnv) => new Promise((resolve) => {
|
|
33016
33210
|
if (signal?.aborted) {
|
|
33017
33211
|
resolve({ exitCode: -1, output: "Verification cancelled.", timedOut: false, aborted: true });
|
|
33018
33212
|
return;
|
|
@@ -33021,9 +33215,10 @@ var defaultVerifyExec = (command, cwd, timeoutMs, signal, onSpawned) => new Prom
|
|
|
33021
33215
|
cwd,
|
|
33022
33216
|
shell: true,
|
|
33023
33217
|
detached: process.platform !== "win32",
|
|
33024
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
33218
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
33219
|
+
env: buildVerifyEnv(extraEnv)
|
|
33025
33220
|
});
|
|
33026
|
-
|
|
33221
|
+
const output = new BoundedProcessOutput(MAX_OUTPUT_LENGTH);
|
|
33027
33222
|
let timedOut = false;
|
|
33028
33223
|
let settled = false;
|
|
33029
33224
|
let aborted = false;
|
|
@@ -33038,7 +33233,7 @@ var defaultVerifyExec = (command, cwd, timeoutMs, signal, onSpawned) => new Prom
|
|
|
33038
33233
|
signal?.removeEventListener("abort", onAbort);
|
|
33039
33234
|
resolve({
|
|
33040
33235
|
exitCode: timedOut || aborted || registrationFailed ? -1 : code ?? -1,
|
|
33041
|
-
output,
|
|
33236
|
+
output: output.finish(),
|
|
33042
33237
|
timedOut,
|
|
33043
33238
|
...aborted ? { aborted: true } : {}
|
|
33044
33239
|
});
|
|
@@ -33059,7 +33254,7 @@ var defaultVerifyExec = (command, cwd, timeoutMs, signal, onSpawned) => new Prom
|
|
|
33059
33254
|
};
|
|
33060
33255
|
const onAbort = () => {
|
|
33061
33256
|
aborted = true;
|
|
33062
|
-
output
|
|
33257
|
+
output.append(`
|
|
33063
33258
|
Verification cancelled.`);
|
|
33064
33259
|
stopProcess();
|
|
33065
33260
|
};
|
|
@@ -33071,13 +33266,17 @@ Verification cancelled.`);
|
|
|
33071
33266
|
if (signal?.aborted)
|
|
33072
33267
|
onAbort();
|
|
33073
33268
|
proc.stdout?.on("data", (chunk) => {
|
|
33074
|
-
|
|
33269
|
+
if (!settled)
|
|
33270
|
+
output.write("stdout", chunk);
|
|
33075
33271
|
});
|
|
33076
33272
|
proc.stderr?.on("data", (chunk) => {
|
|
33077
|
-
|
|
33273
|
+
if (!settled)
|
|
33274
|
+
output.write("stderr", chunk);
|
|
33078
33275
|
});
|
|
33276
|
+
proc.stdout?.once("end", () => output.end("stdout"));
|
|
33277
|
+
proc.stderr?.once("end", () => output.end("stderr"));
|
|
33079
33278
|
proc.once("error", (err) => {
|
|
33080
|
-
output
|
|
33279
|
+
output.append(`
|
|
33081
33280
|
${String(err)}`);
|
|
33082
33281
|
finish(-1);
|
|
33083
33282
|
});
|
|
@@ -33089,8 +33288,8 @@ ${String(err)}`);
|
|
|
33089
33288
|
onSpawned?.(proc.pid);
|
|
33090
33289
|
} catch (error) {
|
|
33091
33290
|
registrationFailed = true;
|
|
33092
|
-
output
|
|
33093
|
-
|
|
33291
|
+
output.append(`
|
|
33292
|
+
${String(error)}`);
|
|
33094
33293
|
stopProcess();
|
|
33095
33294
|
}
|
|
33096
33295
|
});
|
|
@@ -33105,10 +33304,10 @@ async function runVerificationGate(workspace, command, opts = {}) {
|
|
|
33105
33304
|
return { ran: false, ok: true };
|
|
33106
33305
|
}
|
|
33107
33306
|
const exec = opts.exec ?? defaultVerifyExec;
|
|
33108
|
-
const timeoutSec = opts.timeoutSec ?? DEFAULT_TIMEOUT_SEC;
|
|
33307
|
+
const timeoutSec = Math.min(Math.max(opts.timeoutSec ?? DEFAULT_TIMEOUT_SEC, MIN_TIMEOUT_SEC), MAX_TIMEOUT_SEC);
|
|
33109
33308
|
const timeoutMs = timeoutSec * 1000;
|
|
33110
33309
|
logger.info("verification-gate", "Running verify_command", { workspacePath: workspace.path, command, timeoutSec });
|
|
33111
|
-
const result =
|
|
33310
|
+
const result = await exec(command, workspace.path, timeoutMs, opts.signal, opts.onSpawned, opts.extraEnv);
|
|
33112
33311
|
const output = boundOutput(result.output);
|
|
33113
33312
|
const ok = !result.timedOut && !result.aborted && !opts.signal?.aborted && result.exitCode === 0;
|
|
33114
33313
|
if (ok) {
|
|
@@ -33992,7 +34191,8 @@ async function execute(store, job, signal) {
|
|
|
33992
34191
|
verification = await runVerificationGate(input.workspace, job.verifyCommand, {
|
|
33993
34192
|
timeoutSec: job.timeoutSec,
|
|
33994
34193
|
signal,
|
|
33995
|
-
onSpawned: (pid) => guard.spawned(pid, process.platform !== "win32")
|
|
34194
|
+
onSpawned: (pid) => guard.spawned(pid, process.platform !== "win32"),
|
|
34195
|
+
...process.env.A2A_VERIFY_FAIL ? { extraEnv: { A2A_VERIFY_FAIL: process.env.A2A_VERIFY_FAIL } } : {}
|
|
33996
34196
|
});
|
|
33997
34197
|
} catch (error) {
|
|
33998
34198
|
verificationFailure = error;
|
|
@@ -34495,7 +34695,7 @@ function declaredDialect(schema, remedy) {
|
|
|
34495
34695
|
throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${schema.$schema.slice(0, 200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${remedy}`);
|
|
34496
34696
|
}
|
|
34497
34697
|
|
|
34498
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
34698
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/index.js
|
|
34499
34699
|
init_external();
|
|
34500
34700
|
init_external();
|
|
34501
34701
|
|
|
@@ -52023,7 +52223,7 @@ async function startAvMcpStdio(api, options) {
|
|
|
52023
52223
|
import { timingSafeEqual } from "node:crypto";
|
|
52024
52224
|
import { createServer } from "node:http";
|
|
52025
52225
|
|
|
52026
|
-
// ../../node_modules/.bun/@hono+node-server@1.19.17+
|
|
52226
|
+
// ../../node_modules/.bun/@hono+node-server@1.19.17+e13ad74aed04f6d2/node_modules/@hono/node-server/dist/index.mjs
|
|
52027
52227
|
import { Readable } from "stream";
|
|
52028
52228
|
import crypto2 from "crypto";
|
|
52029
52229
|
var GlobalRequest = global.Request;
|
|
@@ -54309,6 +54509,10 @@ init_zod();
|
|
|
54309
54509
|
init_zod();
|
|
54310
54510
|
var id3 = string2().regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/);
|
|
54311
54511
|
var text7 = string2().trim().min(1).max(32000);
|
|
54512
|
+
var skillName = string2().regex(/^[a-z0-9][a-z0-9-]{0,127}$/);
|
|
54513
|
+
var actorSkillAssignmentsSchema = record(id3, array(skillName).min(1).max(30).refine((skills) => new Set(skills).size === skills.length, {
|
|
54514
|
+
message: "Duplicate Actor skill assignment. Select each installed skill once."
|
|
54515
|
+
}));
|
|
54312
54516
|
var actorSchema = strictObject({
|
|
54313
54517
|
id: id3,
|
|
54314
54518
|
name: text7,
|
|
@@ -54316,14 +54520,14 @@ var actorSchema = strictObject({
|
|
|
54316
54520
|
actorType: text7.optional(),
|
|
54317
54521
|
agentType: text7.optional(),
|
|
54318
54522
|
model: text7.optional(),
|
|
54319
|
-
skills: array(
|
|
54523
|
+
skills: array(skillName).max(30)
|
|
54320
54524
|
}).superRefine((actor, ctx) => {
|
|
54321
54525
|
if (!actor.actorType && !actor.agentType)
|
|
54322
54526
|
ctx.addIssue({ code: "custom", path: ["actorType"], message: "Set actorType to the actor's native CLI type." });
|
|
54323
54527
|
if (actor.actorType && actor.agentType && actor.actorType !== actor.agentType)
|
|
54324
54528
|
ctx.addIssue({ code: "custom", path: ["actorType"], message: "actorType conflicts with legacy agentType." });
|
|
54325
54529
|
}).transform(({ actorType, agentType, ...actor }) => ({ ...actor, agentType: actorType ?? agentType ?? "" }));
|
|
54326
|
-
var
|
|
54530
|
+
var actorTaskInputSchema = strictObject({
|
|
54327
54531
|
id: id3,
|
|
54328
54532
|
title: text7,
|
|
54329
54533
|
actorId: id3.optional(),
|
|
@@ -54332,7 +54536,9 @@ var actorTaskSchema = strictObject({
|
|
|
54332
54536
|
acceptance: array(text7).min(1).max(20),
|
|
54333
54537
|
dependencies: array(id3).max(11),
|
|
54334
54538
|
effectScope: _enum(["workspace", "external"]).optional()
|
|
54335
|
-
})
|
|
54539
|
+
});
|
|
54540
|
+
var canonicalTaskResponseKeys = Object.freeze(actorTaskInputSchema.keyof().options.filter((key) => key !== "personaId"));
|
|
54541
|
+
var actorTaskSchema = actorTaskInputSchema.superRefine((task, ctx) => {
|
|
54336
54542
|
if (!task.actorId && !task.personaId)
|
|
54337
54543
|
ctx.addIssue({ code: "custom", path: ["actorId"], message: "Assign a configured actorId to this task." });
|
|
54338
54544
|
if (task.actorId && task.personaId && task.actorId !== task.personaId)
|
|
@@ -69513,6 +69719,20 @@ ${content}`);
|
|
|
69513
69719
|
function requiresOmaActor(mission) {
|
|
69514
69720
|
return Boolean(mission.oma || mission.availableSkills?.length);
|
|
69515
69721
|
}
|
|
69722
|
+
function assignFixedActorSkills(mission, assignments) {
|
|
69723
|
+
if (!assignments)
|
|
69724
|
+
return mission.personas;
|
|
69725
|
+
const catalog = new Set(mission.availableSkills?.map((skill) => skill.name));
|
|
69726
|
+
const selected = new Map(Object.entries(assignments));
|
|
69727
|
+
for (const [actorId, skills] of selected) {
|
|
69728
|
+
if (!mission.personas.some((actor) => actor.id === actorId))
|
|
69729
|
+
throw new Error(`Unknown fixed Actor ${actorId}. Select an existing Actor id in actorSkills.`);
|
|
69730
|
+
for (const name of skills)
|
|
69731
|
+
if (!catalog.has(name))
|
|
69732
|
+
throw new Error(`Actor ${actorId} skill ${name} is not in the installed skill catalog. Select a supplied skill.`);
|
|
69733
|
+
}
|
|
69734
|
+
return mission.personas.map((actor) => ({ ...actor, skills: [...selected.get(actor.id) ?? actor.skills] }));
|
|
69735
|
+
}
|
|
69516
69736
|
var NAME = /^[a-z0-9][a-z0-9-]{0,127}$/;
|
|
69517
69737
|
var MAX_PROFILE_BYTES = 64000;
|
|
69518
69738
|
var MAX_METADATA_BYTES2 = 16384;
|
|
@@ -69741,7 +69961,7 @@ function parsePlan(source, personas) {
|
|
|
69741
69961
|
return plan;
|
|
69742
69962
|
}
|
|
69743
69963
|
function parsePlanningResponse(source, mission) {
|
|
69744
|
-
if (!mission.availableAgents && !mission.supervision) {
|
|
69964
|
+
if (!mission.availableAgents && !mission.supervision && !requiresOmaActor(mission)) {
|
|
69745
69965
|
const plan = parsePlan(source, mission.personas);
|
|
69746
69966
|
validateOmaAssignments(plan, mission.personas, mission);
|
|
69747
69967
|
return { personas: mission.personas, plan };
|
|
@@ -69752,6 +69972,7 @@ function parsePlanningResponse(source, mission) {
|
|
|
69752
69972
|
const response = strictObject({
|
|
69753
69973
|
actors: roster,
|
|
69754
69974
|
personas: roster,
|
|
69975
|
+
actorSkills: !mission.availableAgents && requiresOmaActor(mission) ? actorSkillAssignmentsSchema.optional() : never().optional(),
|
|
69755
69976
|
tasks: planSchema.shape.tasks,
|
|
69756
69977
|
goalBrief: mission.supervision ? goalBriefSchema : never().optional(),
|
|
69757
69978
|
verificationContract: mission.verificationMode === "chief" ? goalVerificationContractSchema : goalVerificationContractSchema.optional()
|
|
@@ -69761,7 +69982,7 @@ function parsePlanningResponse(source, mission) {
|
|
|
69761
69982
|
if (input.actors && input.personas)
|
|
69762
69983
|
ctx.addIssue({ code: "custom", path: ["actors"], message: "Return actors or legacy Actors, not both rosters." });
|
|
69763
69984
|
}).parse(parseJson(source, "Planning"));
|
|
69764
|
-
const personas = response.actors ?? response.personas ?? mission.
|
|
69985
|
+
const personas = response.actors ?? response.personas ?? assignFixedActorSkills(mission, response.actorSkills);
|
|
69765
69986
|
if (mission.availableAgents)
|
|
69766
69987
|
validateAutomaticPersonas(personas, mission, true);
|
|
69767
69988
|
const plan = { tasks: response.tasks };
|
|
@@ -70033,7 +70254,8 @@ function planPrompt(mission) {
|
|
|
70033
70254
|
"tasks",
|
|
70034
70255
|
...mission.availableAgents ? ["actors"] : [],
|
|
70035
70256
|
...mission.supervision ? ["goalBrief"] : [],
|
|
70036
|
-
...mission.verificationMode === "chief" ? ["verificationContract"] : []
|
|
70257
|
+
...mission.verificationMode === "chief" ? ["verificationContract"] : [],
|
|
70258
|
+
...!mission.availableAgents && requiresOmaActor(mission) ? ["actorSkills"] : []
|
|
70037
70259
|
];
|
|
70038
70260
|
return [
|
|
70039
70261
|
"You are the Chief Director coordinating this mission. Understand the user's intent and the actual business and product context, then decide a strategy and plan the requested work.",
|
|
@@ -70072,10 +70294,15 @@ function planPrompt(mission) {
|
|
|
70072
70294
|
"Select only needed catalog skill names for each generated Actor. No invented names or paths; the runtime supplies selected skill files. Skill access does not extend publication, spending or file-change authorization."
|
|
70073
70295
|
] : [],
|
|
70074
70296
|
`Allowed top-level response keys for this mode: ${JSON.stringify(responseKeys)}. Return no other root keys.`,
|
|
70297
|
+
`Allowed keys for each tasks[] object: ${JSON.stringify(canonicalTaskResponseKeys)}. Return no other Task keys. Use actorId for new responses; personaId is accepted only for legacy compatibility.`,
|
|
70298
|
+
"skills, model and role are Actor fields, never Task fields. When generating a roster, assign skills to its Actor entry. For a fixed roster, use the actorSkills contract when available and otherwise retain existing capabilities.",
|
|
70299
|
+
...!mission.availableAgents && requiresOmaActor(mission) ? [
|
|
70300
|
+
'For a fixed roster, assign relevant supplied catalog skills through "actorSkills":{"existing-actor-id":["installed-skill-name"]}. Only skills may change; preserve every Actor id, CLI, model, name and role. Do not return an actors roster or put skills on tasks. Duplicate skills, unknown Actor ids and skills outside the supplied catalog are rejected.'
|
|
70301
|
+
] : [],
|
|
70075
70302
|
"Mission input identity fields are metadata, not response fields. Do not copy chiefId, technicalLeadId, designLeadId or marketingLeadId into the response root, or copy other Mission metadata. When generating a roster, retain nominated companions only as entries in actors with their supplied ids. With a fixed roster, use configured Actor ids without returning actors.",
|
|
70076
70303
|
...mission.availableAgents ? [
|
|
70077
70304
|
`The operator's Chief Director CLI is fixed: ${JSON.stringify({ id: mission.chiefId, actorType: chief?.agentType })}. Do not replace it with another vendor. Omit model from every response Actor; the scheduler retains the selected Chief Director model and Actors use their CLI defaults.`,
|
|
70078
|
-
mission.availableSkills?.length ? "Select relevant skills only from the verified installed catalog. Assign tasks to generated Actor ids. Return actors, tasks and the requested goalBrief together in one JSON object within the 8,000-character limit." : "Set skills: [] because no installed skill capabilities were supplied; describe expertise in role. Assign tasks to generated Actor ids. Return actors, tasks and any requested goalBrief together in one JSON object within the 8,000-character limit.",
|
|
70305
|
+
mission.availableSkills?.length ? "Select relevant skills only from the verified installed catalog. Assign tasks to generated Actor ids. Return actors, tasks and the requested goalBrief together in one JSON object within the 8,000-character limit." : "Set skills: [] on each Actor because no installed skill capabilities were supplied; describe expertise in role. Assign tasks to generated Actor ids. Return actors, tasks and any requested goalBrief together in one JSON object within the 8,000-character limit.",
|
|
70079
70306
|
'Return ONLY JSON: {"actors":[{"id":"...","name":"...","role":"...","actorType":"...","skills":[]}],"tasks":[{"id":"task-1","title":"...","actorId":"...","instructions":"...","acceptance":["..."],"dependencies":[]}]}'
|
|
70080
70307
|
] : [
|
|
70081
70308
|
'Return ONLY JSON: {"tasks":[{"id":"task-1","title":"...","actorId":"...","instructions":"...","acceptance":["..."],"dependencies":[]}]}'
|
|
@@ -72669,7 +72896,7 @@ function validateOmaEvidence(request, io = createOmaEvidenceIO()) {
|
|
|
72669
72896
|
return fail("An OMA verification check failed or is stale");
|
|
72670
72897
|
}
|
|
72671
72898
|
const lastCheck = latestChecks.get(JSON.stringify([["sh", "-c", request.verifyCommand], root]));
|
|
72672
|
-
if (
|
|
72899
|
+
if (lastCheck?.checkId !== "valley-verify" || lastCheck.exitCode !== 0 || lastCheck.before !== run.after || lastCheck.after !== run.after) {
|
|
72673
72900
|
return fail("Required OMA verification did not pass on current inputs");
|
|
72674
72901
|
}
|
|
72675
72902
|
try {
|
|
@@ -80953,16 +81180,16 @@ var isBaseCallbackHandler = (x) => {
|
|
|
80953
81180
|
const callbackHandler = x;
|
|
80954
81181
|
return callbackHandler !== undefined && typeof callbackHandler.copy === "function" && typeof callbackHandler.name === "string" && typeof callbackHandler.awaitHandlers === "boolean";
|
|
80955
81182
|
};
|
|
80956
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81183
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/regex.mjs
|
|
80957
81184
|
var regex_default2 = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
80958
81185
|
|
|
80959
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81186
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/validate.mjs
|
|
80960
81187
|
function validate4(uuid) {
|
|
80961
81188
|
return typeof uuid === "string" && regex_default2.test(uuid);
|
|
80962
81189
|
}
|
|
80963
81190
|
var validate_default = validate4;
|
|
80964
81191
|
|
|
80965
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81192
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/parse.mjs
|
|
80966
81193
|
function parse8(uuid) {
|
|
80967
81194
|
if (!validate_default(uuid)) {
|
|
80968
81195
|
throw TypeError("Invalid UUID");
|
|
@@ -80971,7 +81198,7 @@ function parse8(uuid) {
|
|
|
80971
81198
|
return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, v >>> 16 & 255, v >>> 8 & 255, v & 255, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 255, (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255, v / 4294967296 & 255, v >>> 24 & 255, v >>> 16 & 255, v >>> 8 & 255, v & 255);
|
|
80972
81199
|
}
|
|
80973
81200
|
var parse_default = parse8;
|
|
80974
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81201
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/stringify.mjs
|
|
80975
81202
|
var byteToHex2 = [];
|
|
80976
81203
|
for (let i = 0;i < 256; ++i) {
|
|
80977
81204
|
byteToHex2.push((i + 256).toString(16).slice(1));
|
|
@@ -80979,13 +81206,13 @@ for (let i = 0;i < 256; ++i) {
|
|
|
80979
81206
|
function unsafeStringify2(arr, offset = 0) {
|
|
80980
81207
|
return (byteToHex2[arr[offset + 0]] + byteToHex2[arr[offset + 1]] + byteToHex2[arr[offset + 2]] + byteToHex2[arr[offset + 3]] + "-" + byteToHex2[arr[offset + 4]] + byteToHex2[arr[offset + 5]] + "-" + byteToHex2[arr[offset + 6]] + byteToHex2[arr[offset + 7]] + "-" + byteToHex2[arr[offset + 8]] + byteToHex2[arr[offset + 9]] + "-" + byteToHex2[arr[offset + 10]] + byteToHex2[arr[offset + 11]] + byteToHex2[arr[offset + 12]] + byteToHex2[arr[offset + 13]] + byteToHex2[arr[offset + 14]] + byteToHex2[arr[offset + 15]]).toLowerCase();
|
|
80981
81208
|
}
|
|
80982
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81209
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/rng.mjs
|
|
80983
81210
|
var rnds82 = new Uint8Array(16);
|
|
80984
81211
|
function rng2() {
|
|
80985
81212
|
return crypto.getRandomValues(rnds82);
|
|
80986
81213
|
}
|
|
80987
81214
|
|
|
80988
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81215
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/v4.mjs
|
|
80989
81216
|
function v43(options, buf, offset) {
|
|
80990
81217
|
if (!buf && !options && crypto.randomUUID) {
|
|
80991
81218
|
return crypto.randomUUID();
|
|
@@ -81013,7 +81240,7 @@ function _v42(options, buf, offset) {
|
|
|
81013
81240
|
return unsafeStringify2(rnds);
|
|
81014
81241
|
}
|
|
81015
81242
|
var v4_default = v43;
|
|
81016
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81243
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/sha1.mjs
|
|
81017
81244
|
function f2(s, x, y, z) {
|
|
81018
81245
|
switch (s) {
|
|
81019
81246
|
case 0:
|
|
@@ -81081,7 +81308,7 @@ function sha12(bytes) {
|
|
|
81081
81308
|
}
|
|
81082
81309
|
var sha1_default = sha12;
|
|
81083
81310
|
|
|
81084
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81311
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/v35.mjs
|
|
81085
81312
|
function stringToBytes2(str) {
|
|
81086
81313
|
str = unescape(encodeURIComponent(str));
|
|
81087
81314
|
const bytes = new Uint8Array(str.length);
|
|
@@ -81120,14 +81347,14 @@ function v352(version, hash, value, namespace, buf, offset) {
|
|
|
81120
81347
|
return unsafeStringify2(bytes);
|
|
81121
81348
|
}
|
|
81122
81349
|
|
|
81123
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81350
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/v5.mjs
|
|
81124
81351
|
function v53(value, namespace, buf, offset) {
|
|
81125
81352
|
return v352(80, sha1_default, value, namespace, buf, offset);
|
|
81126
81353
|
}
|
|
81127
81354
|
v53.DNS = DNS2;
|
|
81128
81355
|
v53.URL = URL3;
|
|
81129
81356
|
var v5_default = v53;
|
|
81130
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81357
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/v7.mjs
|
|
81131
81358
|
var _state3 = {};
|
|
81132
81359
|
function v73(options, buf, offset) {
|
|
81133
81360
|
let bytes;
|
|
@@ -81188,7 +81415,7 @@ function v7Bytes2(rnds, msecs, seq, buf, offset = 0) {
|
|
|
81188
81415
|
return buf;
|
|
81189
81416
|
}
|
|
81190
81417
|
var v7_default = v73;
|
|
81191
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81418
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/api_url.mjs
|
|
81192
81419
|
function getOpenAPIBaseUrl(apiUrl) {
|
|
81193
81420
|
const url = apiUrl.replace(/\/$/, "");
|
|
81194
81421
|
for (const suffix of ["/api/v1", "/api"]) {
|
|
@@ -81198,7 +81425,7 @@ function getOpenAPIBaseUrl(apiUrl) {
|
|
|
81198
81425
|
return url;
|
|
81199
81426
|
}
|
|
81200
81427
|
|
|
81201
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81428
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/experimental/otel/constants.mjs
|
|
81202
81429
|
var GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
|
|
81203
81430
|
var GEN_AI_SYSTEM = "gen_ai.system";
|
|
81204
81431
|
var GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
|
|
@@ -81237,7 +81464,7 @@ var LANGSMITH_REQUEST_STREAMING = "langsmith.request.streaming";
|
|
|
81237
81464
|
var LANGSMITH_REQUEST_HEADERS = "langsmith.request.headers";
|
|
81238
81465
|
var LANGSMITH_USAGE_METADATA = "langsmith.usage_metadata";
|
|
81239
81466
|
|
|
81240
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81467
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/singletons/otel.mjs
|
|
81241
81468
|
class MockTracer {
|
|
81242
81469
|
constructor() {
|
|
81243
81470
|
Object.defineProperty(this, "hasWarned", {
|
|
@@ -81346,7 +81573,7 @@ function getDefaultOTLPTracerComponents() {
|
|
|
81346
81573
|
return OTELProviderSingleton.getDefaultOTLPTracerComponents();
|
|
81347
81574
|
}
|
|
81348
81575
|
|
|
81349
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81576
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/experimental/otel/translator.mjs
|
|
81350
81577
|
var WELL_KNOWN_OPERATION_NAMES = {
|
|
81351
81578
|
llm: "chat",
|
|
81352
81579
|
tool: "execute_tool",
|
|
@@ -81706,7 +81933,7 @@ class LangSmithToOTELTranslator {
|
|
|
81706
81933
|
}
|
|
81707
81934
|
}
|
|
81708
81935
|
|
|
81709
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81936
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/is-network-error/index.mjs
|
|
81710
81937
|
var objectToString = Object.prototype.toString;
|
|
81711
81938
|
var isError = (value) => objectToString.call(value) === "[object Error]";
|
|
81712
81939
|
var errorMessages = new Set([
|
|
@@ -81735,7 +81962,7 @@ function isNetworkError(error) {
|
|
|
81735
81962
|
return errorMessages.has(message);
|
|
81736
81963
|
}
|
|
81737
81964
|
|
|
81738
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81965
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/p-retry/index.mjs
|
|
81739
81966
|
function validateRetries(retries) {
|
|
81740
81967
|
if (typeof retries === "number") {
|
|
81741
81968
|
if (retries < 0) {
|
|
@@ -81908,11 +82135,11 @@ async function pRetry(input, options = {}) {
|
|
|
81908
82135
|
throw new Error("Retry attempts exhausted without throwing an error.");
|
|
81909
82136
|
}
|
|
81910
82137
|
|
|
81911
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82138
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/p-queue.mjs
|
|
81912
82139
|
var import_p_queue = __toESM(require_dist3(), 1);
|
|
81913
82140
|
var PQueue = "default" in import_p_queue.default ? import_p_queue.default.default : import_p_queue.default;
|
|
81914
82141
|
|
|
81915
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82142
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/async_caller.mjs
|
|
81916
82143
|
var STATUS_RETRYABLE = [
|
|
81917
82144
|
408,
|
|
81918
82145
|
425,
|
|
@@ -82032,7 +82259,7 @@ class AsyncCaller {
|
|
|
82032
82259
|
}
|
|
82033
82260
|
}
|
|
82034
82261
|
|
|
82035
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82262
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/messages.mjs
|
|
82036
82263
|
function isLangChainMessage(message) {
|
|
82037
82264
|
return typeof message?._getType === "function";
|
|
82038
82265
|
}
|
|
@@ -82047,7 +82274,7 @@ function convertLangChainMessageToExample(message) {
|
|
|
82047
82274
|
return converted;
|
|
82048
82275
|
}
|
|
82049
82276
|
|
|
82050
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82277
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/tslib.mjs
|
|
82051
82278
|
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
82052
82279
|
if (kind === "m")
|
|
82053
82280
|
throw new TypeError("Private method is not writable");
|
|
@@ -82065,7 +82292,7 @@ function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
|
82065
82292
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
82066
82293
|
}
|
|
82067
82294
|
|
|
82068
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82295
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/uuid.mjs
|
|
82069
82296
|
var uuid4 = function() {
|
|
82070
82297
|
const { crypto: crypto2 } = globalThis;
|
|
82071
82298
|
if (crypto2?.randomUUID) {
|
|
@@ -82077,7 +82304,7 @@ var uuid4 = function() {
|
|
|
82077
82304
|
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ randomByte() & 15 >> +c / 4).toString(16));
|
|
82078
82305
|
};
|
|
82079
82306
|
|
|
82080
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82307
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/errors.mjs
|
|
82081
82308
|
function isAbortError(err) {
|
|
82082
82309
|
return typeof err === "object" && err !== null && (("name" in err) && err.name === "AbortError" || ("message" in err) && String(err.message).includes("FetchRequestCanceledException"));
|
|
82083
82310
|
}
|
|
@@ -82104,7 +82331,7 @@ var castToError = (err) => {
|
|
|
82104
82331
|
return new Error(err);
|
|
82105
82332
|
};
|
|
82106
82333
|
|
|
82107
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82334
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/error.mjs
|
|
82108
82335
|
class LangsmithError extends Error {
|
|
82109
82336
|
}
|
|
82110
82337
|
|
|
@@ -82223,7 +82450,7 @@ class RateLimitError extends APIError {
|
|
|
82223
82450
|
class InternalServerError extends APIError {
|
|
82224
82451
|
}
|
|
82225
82452
|
|
|
82226
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82453
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/values.mjs
|
|
82227
82454
|
var startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
82228
82455
|
var isAbsoluteURL = (url) => {
|
|
82229
82456
|
return startsWithSchemeRegexp.test(url);
|
|
@@ -82263,13 +82490,13 @@ var safeJSON = (text) => {
|
|
|
82263
82490
|
}
|
|
82264
82491
|
};
|
|
82265
82492
|
|
|
82266
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82493
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/sleep.mjs
|
|
82267
82494
|
var sleep3 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
82268
82495
|
|
|
82269
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82270
|
-
var VERSION2 = "0.11.
|
|
82496
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/version.mjs
|
|
82497
|
+
var VERSION2 = "0.11.3";
|
|
82271
82498
|
|
|
82272
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82499
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/detect-platform.mjs
|
|
82273
82500
|
function getDetectedPlatform() {
|
|
82274
82501
|
if (typeof Deno !== "undefined" && Deno.build != null) {
|
|
82275
82502
|
return "deno";
|
|
@@ -82395,7 +82622,7 @@ var getPlatformHeaders = () => {
|
|
|
82395
82622
|
return _platformHeaders ?? (_platformHeaders = getPlatformProperties());
|
|
82396
82623
|
};
|
|
82397
82624
|
|
|
82398
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82625
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/shims.mjs
|
|
82399
82626
|
function getDefaultFetch() {
|
|
82400
82627
|
if (typeof fetch !== "undefined") {
|
|
82401
82628
|
return fetch;
|
|
@@ -82426,6 +82653,33 @@ function ReadableStreamFrom(iterable) {
|
|
|
82426
82653
|
}
|
|
82427
82654
|
});
|
|
82428
82655
|
}
|
|
82656
|
+
function ReadableStreamToAsyncIterable(stream) {
|
|
82657
|
+
if (stream[Symbol.asyncIterator])
|
|
82658
|
+
return stream;
|
|
82659
|
+
const reader = stream.getReader();
|
|
82660
|
+
return {
|
|
82661
|
+
async next() {
|
|
82662
|
+
try {
|
|
82663
|
+
const result = await reader.read();
|
|
82664
|
+
if (result?.done)
|
|
82665
|
+
reader.releaseLock();
|
|
82666
|
+
return result;
|
|
82667
|
+
} catch (e) {
|
|
82668
|
+
reader.releaseLock();
|
|
82669
|
+
throw e;
|
|
82670
|
+
}
|
|
82671
|
+
},
|
|
82672
|
+
async return() {
|
|
82673
|
+
const cancelPromise = reader.cancel();
|
|
82674
|
+
reader.releaseLock();
|
|
82675
|
+
await cancelPromise;
|
|
82676
|
+
return { done: true, value: undefined };
|
|
82677
|
+
},
|
|
82678
|
+
[Symbol.asyncIterator]() {
|
|
82679
|
+
return this;
|
|
82680
|
+
}
|
|
82681
|
+
};
|
|
82682
|
+
}
|
|
82429
82683
|
async function CancelReadableStream(stream) {
|
|
82430
82684
|
if (stream === null || typeof stream !== "object")
|
|
82431
82685
|
return;
|
|
@@ -82439,7 +82693,7 @@ async function CancelReadableStream(stream) {
|
|
|
82439
82693
|
await cancelPromise;
|
|
82440
82694
|
}
|
|
82441
82695
|
|
|
82442
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82696
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/request-options.mjs
|
|
82443
82697
|
var FallbackEncoder = ({ headers, body }) => {
|
|
82444
82698
|
return {
|
|
82445
82699
|
bodyHeaders: {
|
|
@@ -82449,7 +82703,7 @@ var FallbackEncoder = ({ headers, body }) => {
|
|
|
82449
82703
|
};
|
|
82450
82704
|
};
|
|
82451
82705
|
|
|
82452
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82706
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/qs/formats.mjs
|
|
82453
82707
|
var default_format = "RFC3986";
|
|
82454
82708
|
var default_formatter = (v) => String(v);
|
|
82455
82709
|
var formatters = {
|
|
@@ -82458,7 +82712,7 @@ var formatters = {
|
|
|
82458
82712
|
};
|
|
82459
82713
|
var RFC1738 = "RFC1738";
|
|
82460
82714
|
|
|
82461
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82715
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/qs/utils.mjs
|
|
82462
82716
|
var has = (obj, key) => (has = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty), has(obj, key));
|
|
82463
82717
|
var hex_table = /* @__PURE__ */ (() => {
|
|
82464
82718
|
const array = [];
|
|
@@ -82530,7 +82784,7 @@ function maybe_map(val, fn) {
|
|
|
82530
82784
|
return fn(val);
|
|
82531
82785
|
}
|
|
82532
82786
|
|
|
82533
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82787
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/qs/stringify.mjs
|
|
82534
82788
|
var array_prefix_generators = {
|
|
82535
82789
|
brackets(prefix) {
|
|
82536
82790
|
return String(prefix) + "[]";
|
|
@@ -82758,12 +83012,127 @@ function stringify4(object, opts = {}) {
|
|
|
82758
83012
|
return joined.length > 0 ? prefix + joined : "";
|
|
82759
83013
|
}
|
|
82760
83014
|
|
|
82761
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83015
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/query.mjs
|
|
82762
83016
|
function stringifyQuery(query) {
|
|
82763
83017
|
return stringify4(query, { arrayFormat: "repeat" });
|
|
82764
83018
|
}
|
|
82765
83019
|
|
|
82766
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83020
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/bytes.mjs
|
|
83021
|
+
function concatBytes(buffers) {
|
|
83022
|
+
let length = 0;
|
|
83023
|
+
for (const buffer of buffers) {
|
|
83024
|
+
length += buffer.length;
|
|
83025
|
+
}
|
|
83026
|
+
const output = new Uint8Array(length);
|
|
83027
|
+
let index = 0;
|
|
83028
|
+
for (const buffer of buffers) {
|
|
83029
|
+
output.set(buffer, index);
|
|
83030
|
+
index += buffer.length;
|
|
83031
|
+
}
|
|
83032
|
+
return output;
|
|
83033
|
+
}
|
|
83034
|
+
var encodeUTF8_;
|
|
83035
|
+
function encodeUTF8(str) {
|
|
83036
|
+
let encoder;
|
|
83037
|
+
return (encodeUTF8_ ?? (encoder = new globalThis.TextEncoder, encodeUTF8_ = encoder.encode.bind(encoder)))(str);
|
|
83038
|
+
}
|
|
83039
|
+
var decodeUTF8_;
|
|
83040
|
+
function decodeUTF8(bytes) {
|
|
83041
|
+
let decoder;
|
|
83042
|
+
return (decodeUTF8_ ?? (decoder = new globalThis.TextDecoder, decodeUTF8_ = decoder.decode.bind(decoder)))(bytes);
|
|
83043
|
+
}
|
|
83044
|
+
|
|
83045
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/decoders/line.mjs
|
|
83046
|
+
var _LineDecoder_buffer;
|
|
83047
|
+
var _LineDecoder_carriageReturnIndex;
|
|
83048
|
+
|
|
83049
|
+
class LineDecoder {
|
|
83050
|
+
constructor() {
|
|
83051
|
+
_LineDecoder_buffer.set(this, undefined);
|
|
83052
|
+
_LineDecoder_carriageReturnIndex.set(this, undefined);
|
|
83053
|
+
__classPrivateFieldSet(this, _LineDecoder_buffer, new Uint8Array, "f");
|
|
83054
|
+
__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
|
83055
|
+
}
|
|
83056
|
+
decode(chunk) {
|
|
83057
|
+
if (chunk == null) {
|
|
83058
|
+
return [];
|
|
83059
|
+
}
|
|
83060
|
+
const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk) : typeof chunk === "string" ? encodeUTF8(chunk) : chunk;
|
|
83061
|
+
__classPrivateFieldSet(this, _LineDecoder_buffer, concatBytes([__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), binaryChunk]), "f");
|
|
83062
|
+
const lines = [];
|
|
83063
|
+
let patternIndex;
|
|
83064
|
+
while ((patternIndex = findNewlineIndex(__classPrivateFieldGet(this, _LineDecoder_buffer, "f"), __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f"))) != null) {
|
|
83065
|
+
if (patternIndex.carriage && __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") == null) {
|
|
83066
|
+
__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, patternIndex.index, "f");
|
|
83067
|
+
continue;
|
|
83068
|
+
}
|
|
83069
|
+
if (__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") != null && (patternIndex.index !== __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") + 1 || patternIndex.carriage)) {
|
|
83070
|
+
lines.push(decodeUTF8(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") - 1)));
|
|
83071
|
+
__classPrivateFieldSet(this, _LineDecoder_buffer, __classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(__classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f")), "f");
|
|
83072
|
+
__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
|
83073
|
+
continue;
|
|
83074
|
+
}
|
|
83075
|
+
const endIndex = __classPrivateFieldGet(this, _LineDecoder_carriageReturnIndex, "f") !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
|
|
83076
|
+
const line = decodeUTF8(__classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(0, endIndex));
|
|
83077
|
+
lines.push(line);
|
|
83078
|
+
__classPrivateFieldSet(this, _LineDecoder_buffer, __classPrivateFieldGet(this, _LineDecoder_buffer, "f").subarray(patternIndex.index), "f");
|
|
83079
|
+
__classPrivateFieldSet(this, _LineDecoder_carriageReturnIndex, null, "f");
|
|
83080
|
+
}
|
|
83081
|
+
return lines;
|
|
83082
|
+
}
|
|
83083
|
+
flush() {
|
|
83084
|
+
if (!__classPrivateFieldGet(this, _LineDecoder_buffer, "f").length) {
|
|
83085
|
+
return [];
|
|
83086
|
+
}
|
|
83087
|
+
return this.decode(`
|
|
83088
|
+
`);
|
|
83089
|
+
}
|
|
83090
|
+
}
|
|
83091
|
+
_LineDecoder_buffer = new WeakMap, _LineDecoder_carriageReturnIndex = new WeakMap;
|
|
83092
|
+
Object.defineProperty(LineDecoder, "NEWLINE_CHARS", {
|
|
83093
|
+
enumerable: true,
|
|
83094
|
+
configurable: true,
|
|
83095
|
+
writable: true,
|
|
83096
|
+
value: new Set([`
|
|
83097
|
+
`, "\r"])
|
|
83098
|
+
});
|
|
83099
|
+
Object.defineProperty(LineDecoder, "NEWLINE_REGEXP", {
|
|
83100
|
+
enumerable: true,
|
|
83101
|
+
configurable: true,
|
|
83102
|
+
writable: true,
|
|
83103
|
+
value: /\r\n|[\n\r]/g
|
|
83104
|
+
});
|
|
83105
|
+
function findNewlineIndex(buffer, startIndex) {
|
|
83106
|
+
const newline = 10;
|
|
83107
|
+
const carriage = 13;
|
|
83108
|
+
for (let i = startIndex ?? 0;i < buffer.length; i++) {
|
|
83109
|
+
if (buffer[i] === newline) {
|
|
83110
|
+
return { preceding: i, index: i + 1, carriage: false };
|
|
83111
|
+
}
|
|
83112
|
+
if (buffer[i] === carriage) {
|
|
83113
|
+
return { preceding: i, index: i + 1, carriage: true };
|
|
83114
|
+
}
|
|
83115
|
+
}
|
|
83116
|
+
return null;
|
|
83117
|
+
}
|
|
83118
|
+
function findDoubleNewlineIndex(buffer) {
|
|
83119
|
+
const newline = 10;
|
|
83120
|
+
const carriage = 13;
|
|
83121
|
+
for (let i = 0;i < buffer.length - 1; i++) {
|
|
83122
|
+
if (buffer[i] === newline && buffer[i + 1] === newline) {
|
|
83123
|
+
return i + 2;
|
|
83124
|
+
}
|
|
83125
|
+
if (buffer[i] === carriage && buffer[i + 1] === carriage) {
|
|
83126
|
+
return i + 2;
|
|
83127
|
+
}
|
|
83128
|
+
if (buffer[i] === carriage && buffer[i + 1] === newline && i + 3 < buffer.length && buffer[i + 2] === carriage && buffer[i + 3] === newline) {
|
|
83129
|
+
return i + 4;
|
|
83130
|
+
}
|
|
83131
|
+
}
|
|
83132
|
+
return -1;
|
|
83133
|
+
}
|
|
83134
|
+
|
|
83135
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/log.mjs
|
|
82767
83136
|
var levelNumbers = {
|
|
82768
83137
|
off: 0,
|
|
82769
83138
|
error: 200,
|
|
@@ -82835,10 +83204,285 @@ var formatRequestDetails = (details) => {
|
|
|
82835
83204
|
return details;
|
|
82836
83205
|
};
|
|
82837
83206
|
|
|
82838
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83207
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/streaming.mjs
|
|
83208
|
+
var _Stream_client;
|
|
83209
|
+
|
|
83210
|
+
class Stream {
|
|
83211
|
+
constructor(iterator, controller, client) {
|
|
83212
|
+
Object.defineProperty(this, "iterator", {
|
|
83213
|
+
enumerable: true,
|
|
83214
|
+
configurable: true,
|
|
83215
|
+
writable: true,
|
|
83216
|
+
value: iterator
|
|
83217
|
+
});
|
|
83218
|
+
Object.defineProperty(this, "controller", {
|
|
83219
|
+
enumerable: true,
|
|
83220
|
+
configurable: true,
|
|
83221
|
+
writable: true,
|
|
83222
|
+
value: undefined
|
|
83223
|
+
});
|
|
83224
|
+
_Stream_client.set(this, undefined);
|
|
83225
|
+
this.controller = controller;
|
|
83226
|
+
__classPrivateFieldSet(this, _Stream_client, client, "f");
|
|
83227
|
+
}
|
|
83228
|
+
static fromSSEResponse(response, controller, client) {
|
|
83229
|
+
let consumed = false;
|
|
83230
|
+
const logger = client ? loggerFor(client) : console;
|
|
83231
|
+
async function* iterator() {
|
|
83232
|
+
if (consumed) {
|
|
83233
|
+
throw new LangsmithError("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");
|
|
83234
|
+
}
|
|
83235
|
+
consumed = true;
|
|
83236
|
+
let done = false;
|
|
83237
|
+
try {
|
|
83238
|
+
for await (const sse of _iterSSEMessages(response, controller)) {
|
|
83239
|
+
if (sse.event === "end") {
|
|
83240
|
+
break;
|
|
83241
|
+
}
|
|
83242
|
+
if (sse.event === "error") {
|
|
83243
|
+
throw new APIError(undefined, safeJSON(sse.data) ?? sse.data, undefined, response.headers);
|
|
83244
|
+
}
|
|
83245
|
+
if (sse.event === "data") {
|
|
83246
|
+
try {
|
|
83247
|
+
yield JSON.parse(sse.data);
|
|
83248
|
+
} catch (e) {
|
|
83249
|
+
logger.error(`Could not parse message into JSON:`, sse.data);
|
|
83250
|
+
logger.error(`From chunk:`, sse.raw);
|
|
83251
|
+
throw e;
|
|
83252
|
+
}
|
|
83253
|
+
} else {
|
|
83254
|
+
try {
|
|
83255
|
+
yield JSON.parse(sse.data);
|
|
83256
|
+
} catch (e) {
|
|
83257
|
+
logger.error(`Could not parse message into JSON:`, sse.data);
|
|
83258
|
+
logger.error(`From chunk:`, sse.raw);
|
|
83259
|
+
throw e;
|
|
83260
|
+
}
|
|
83261
|
+
}
|
|
83262
|
+
}
|
|
83263
|
+
done = true;
|
|
83264
|
+
} catch (e) {
|
|
83265
|
+
if (isAbortError(e))
|
|
83266
|
+
return;
|
|
83267
|
+
throw e;
|
|
83268
|
+
} finally {
|
|
83269
|
+
if (!done)
|
|
83270
|
+
controller.abort();
|
|
83271
|
+
}
|
|
83272
|
+
}
|
|
83273
|
+
return new Stream(iterator, controller, client);
|
|
83274
|
+
}
|
|
83275
|
+
static fromReadableStream(readableStream, controller, client) {
|
|
83276
|
+
let consumed = false;
|
|
83277
|
+
async function* iterLines() {
|
|
83278
|
+
const lineDecoder = new LineDecoder;
|
|
83279
|
+
const iter = ReadableStreamToAsyncIterable(readableStream);
|
|
83280
|
+
for await (const chunk of iter) {
|
|
83281
|
+
for (const line of lineDecoder.decode(chunk)) {
|
|
83282
|
+
yield line;
|
|
83283
|
+
}
|
|
83284
|
+
}
|
|
83285
|
+
for (const line of lineDecoder.flush()) {
|
|
83286
|
+
yield line;
|
|
83287
|
+
}
|
|
83288
|
+
}
|
|
83289
|
+
async function* iterator() {
|
|
83290
|
+
if (consumed) {
|
|
83291
|
+
throw new LangsmithError("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");
|
|
83292
|
+
}
|
|
83293
|
+
consumed = true;
|
|
83294
|
+
let done = false;
|
|
83295
|
+
try {
|
|
83296
|
+
for await (const line of iterLines()) {
|
|
83297
|
+
if (done)
|
|
83298
|
+
continue;
|
|
83299
|
+
if (line)
|
|
83300
|
+
yield JSON.parse(line);
|
|
83301
|
+
}
|
|
83302
|
+
done = true;
|
|
83303
|
+
} catch (e) {
|
|
83304
|
+
if (isAbortError(e))
|
|
83305
|
+
return;
|
|
83306
|
+
throw e;
|
|
83307
|
+
} finally {
|
|
83308
|
+
if (!done)
|
|
83309
|
+
controller.abort();
|
|
83310
|
+
}
|
|
83311
|
+
}
|
|
83312
|
+
return new Stream(iterator, controller, client);
|
|
83313
|
+
}
|
|
83314
|
+
[(_Stream_client = new WeakMap, Symbol.asyncIterator)]() {
|
|
83315
|
+
return this.iterator();
|
|
83316
|
+
}
|
|
83317
|
+
tee() {
|
|
83318
|
+
const left = [];
|
|
83319
|
+
const right = [];
|
|
83320
|
+
const iterator = this.iterator();
|
|
83321
|
+
const teeIterator = (queue) => {
|
|
83322
|
+
return {
|
|
83323
|
+
next: () => {
|
|
83324
|
+
if (queue.length === 0) {
|
|
83325
|
+
const result = iterator.next();
|
|
83326
|
+
left.push(result);
|
|
83327
|
+
right.push(result);
|
|
83328
|
+
}
|
|
83329
|
+
return queue.shift();
|
|
83330
|
+
}
|
|
83331
|
+
};
|
|
83332
|
+
};
|
|
83333
|
+
return [
|
|
83334
|
+
new Stream(() => teeIterator(left), this.controller, __classPrivateFieldGet(this, _Stream_client, "f")),
|
|
83335
|
+
new Stream(() => teeIterator(right), this.controller, __classPrivateFieldGet(this, _Stream_client, "f"))
|
|
83336
|
+
];
|
|
83337
|
+
}
|
|
83338
|
+
toReadableStream() {
|
|
83339
|
+
const self2 = this;
|
|
83340
|
+
let iter;
|
|
83341
|
+
return makeReadableStream({
|
|
83342
|
+
async start() {
|
|
83343
|
+
iter = self2[Symbol.asyncIterator]();
|
|
83344
|
+
},
|
|
83345
|
+
async pull(ctrl) {
|
|
83346
|
+
try {
|
|
83347
|
+
const { value, done } = await iter.next();
|
|
83348
|
+
if (done)
|
|
83349
|
+
return ctrl.close();
|
|
83350
|
+
const bytes = encodeUTF8(JSON.stringify(value) + `
|
|
83351
|
+
`);
|
|
83352
|
+
ctrl.enqueue(bytes);
|
|
83353
|
+
} catch (err) {
|
|
83354
|
+
ctrl.error(err);
|
|
83355
|
+
}
|
|
83356
|
+
},
|
|
83357
|
+
async cancel() {
|
|
83358
|
+
await iter.return?.();
|
|
83359
|
+
}
|
|
83360
|
+
});
|
|
83361
|
+
}
|
|
83362
|
+
}
|
|
83363
|
+
async function* _iterSSEMessages(response, controller) {
|
|
83364
|
+
if (!response.body) {
|
|
83365
|
+
controller.abort();
|
|
83366
|
+
if (typeof globalThis.navigator !== "undefined" && globalThis.navigator.product === "ReactNative") {
|
|
83367
|
+
throw new LangsmithError(`The default react-native fetch implementation does not support streaming. Please use expo/fetch: https://docs.expo.dev/versions/latest/sdk/expo/#expofetch-api`);
|
|
83368
|
+
}
|
|
83369
|
+
throw new LangsmithError(`Attempted to iterate over a response with no body`);
|
|
83370
|
+
}
|
|
83371
|
+
const sseDecoder = new SSEDecoder;
|
|
83372
|
+
const lineDecoder = new LineDecoder;
|
|
83373
|
+
const iter = ReadableStreamToAsyncIterable(response.body);
|
|
83374
|
+
for await (const sseChunk of iterSSEChunks(iter)) {
|
|
83375
|
+
for (const line of lineDecoder.decode(sseChunk)) {
|
|
83376
|
+
const sse = sseDecoder.decode(line);
|
|
83377
|
+
if (sse)
|
|
83378
|
+
yield sse;
|
|
83379
|
+
}
|
|
83380
|
+
}
|
|
83381
|
+
for (const line of lineDecoder.flush()) {
|
|
83382
|
+
const sse = sseDecoder.decode(line);
|
|
83383
|
+
if (sse)
|
|
83384
|
+
yield sse;
|
|
83385
|
+
}
|
|
83386
|
+
}
|
|
83387
|
+
async function* iterSSEChunks(iterator) {
|
|
83388
|
+
let data = new Uint8Array;
|
|
83389
|
+
for await (const chunk of iterator) {
|
|
83390
|
+
if (chunk == null) {
|
|
83391
|
+
continue;
|
|
83392
|
+
}
|
|
83393
|
+
const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk) : typeof chunk === "string" ? encodeUTF8(chunk) : chunk;
|
|
83394
|
+
let newData = new Uint8Array(data.length + binaryChunk.length);
|
|
83395
|
+
newData.set(data);
|
|
83396
|
+
newData.set(binaryChunk, data.length);
|
|
83397
|
+
data = newData;
|
|
83398
|
+
let patternIndex;
|
|
83399
|
+
while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) {
|
|
83400
|
+
yield data.slice(0, patternIndex);
|
|
83401
|
+
data = data.slice(patternIndex);
|
|
83402
|
+
}
|
|
83403
|
+
}
|
|
83404
|
+
if (data.length > 0) {
|
|
83405
|
+
yield data;
|
|
83406
|
+
}
|
|
83407
|
+
}
|
|
83408
|
+
|
|
83409
|
+
class SSEDecoder {
|
|
83410
|
+
constructor() {
|
|
83411
|
+
Object.defineProperty(this, "data", {
|
|
83412
|
+
enumerable: true,
|
|
83413
|
+
configurable: true,
|
|
83414
|
+
writable: true,
|
|
83415
|
+
value: undefined
|
|
83416
|
+
});
|
|
83417
|
+
Object.defineProperty(this, "event", {
|
|
83418
|
+
enumerable: true,
|
|
83419
|
+
configurable: true,
|
|
83420
|
+
writable: true,
|
|
83421
|
+
value: undefined
|
|
83422
|
+
});
|
|
83423
|
+
Object.defineProperty(this, "chunks", {
|
|
83424
|
+
enumerable: true,
|
|
83425
|
+
configurable: true,
|
|
83426
|
+
writable: true,
|
|
83427
|
+
value: undefined
|
|
83428
|
+
});
|
|
83429
|
+
this.event = null;
|
|
83430
|
+
this.data = [];
|
|
83431
|
+
this.chunks = [];
|
|
83432
|
+
}
|
|
83433
|
+
decode(line) {
|
|
83434
|
+
if (line.endsWith("\r")) {
|
|
83435
|
+
line = line.substring(0, line.length - 1);
|
|
83436
|
+
}
|
|
83437
|
+
if (!line) {
|
|
83438
|
+
if (!this.event && !this.data.length)
|
|
83439
|
+
return null;
|
|
83440
|
+
const sse = {
|
|
83441
|
+
event: this.event,
|
|
83442
|
+
data: this.data.join(`
|
|
83443
|
+
`),
|
|
83444
|
+
raw: this.chunks
|
|
83445
|
+
};
|
|
83446
|
+
this.event = null;
|
|
83447
|
+
this.data = [];
|
|
83448
|
+
this.chunks = [];
|
|
83449
|
+
return sse;
|
|
83450
|
+
}
|
|
83451
|
+
this.chunks.push(line);
|
|
83452
|
+
if (line.startsWith(":")) {
|
|
83453
|
+
return null;
|
|
83454
|
+
}
|
|
83455
|
+
let [fieldname, _, value] = partition(line, ":");
|
|
83456
|
+
if (value.startsWith(" ")) {
|
|
83457
|
+
value = value.substring(1);
|
|
83458
|
+
}
|
|
83459
|
+
if (fieldname === "event") {
|
|
83460
|
+
this.event = value;
|
|
83461
|
+
} else if (fieldname === "data") {
|
|
83462
|
+
this.data.push(value);
|
|
83463
|
+
}
|
|
83464
|
+
return null;
|
|
83465
|
+
}
|
|
83466
|
+
}
|
|
83467
|
+
function partition(str, delimiter) {
|
|
83468
|
+
const index = str.indexOf(delimiter);
|
|
83469
|
+
if (index !== -1) {
|
|
83470
|
+
return [str.substring(0, index), delimiter, str.substring(index + delimiter.length)];
|
|
83471
|
+
}
|
|
83472
|
+
return [str, "", ""];
|
|
83473
|
+
}
|
|
83474
|
+
|
|
83475
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/parse.mjs
|
|
82839
83476
|
async function defaultParseResponse(client, props) {
|
|
82840
83477
|
const { response, requestLogID, retryOfRequestLogID, startTime } = props;
|
|
82841
83478
|
const body = await (async () => {
|
|
83479
|
+
if (props.options.stream) {
|
|
83480
|
+
loggerFor(client).debug("response", response.status, response.url, response.headers, response.body);
|
|
83481
|
+
if (props.options.__streamClass) {
|
|
83482
|
+
return props.options.__streamClass.fromSSEResponse(response, props.controller, client);
|
|
83483
|
+
}
|
|
83484
|
+
return Stream.fromSSEResponse(response, props.controller, client);
|
|
83485
|
+
}
|
|
82842
83486
|
if (response.status === 204) {
|
|
82843
83487
|
return null;
|
|
82844
83488
|
}
|
|
@@ -82869,7 +83513,7 @@ async function defaultParseResponse(client, props) {
|
|
|
82869
83513
|
return body;
|
|
82870
83514
|
}
|
|
82871
83515
|
|
|
82872
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83516
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/api-promise.mjs
|
|
82873
83517
|
var _APIPromise_client;
|
|
82874
83518
|
|
|
82875
83519
|
class APIPromise extends Promise {
|
|
@@ -82926,7 +83570,7 @@ class APIPromise extends Promise {
|
|
|
82926
83570
|
}
|
|
82927
83571
|
_APIPromise_client = new WeakMap;
|
|
82928
83572
|
|
|
82929
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83573
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/pagination.mjs
|
|
82930
83574
|
var _AbstractPage_client;
|
|
82931
83575
|
|
|
82932
83576
|
class AbstractPage {
|
|
@@ -83158,7 +83802,7 @@ class ItemsCursorGetPagination extends AbstractPage {
|
|
|
83158
83802
|
}
|
|
83159
83803
|
}
|
|
83160
83804
|
|
|
83161
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83805
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/uploads.mjs
|
|
83162
83806
|
var checkFileSupport = () => {
|
|
83163
83807
|
if (typeof File === "undefined") {
|
|
83164
83808
|
const { process: process2 } = globalThis;
|
|
@@ -83175,7 +83819,7 @@ function getName(value) {
|
|
|
83175
83819
|
}
|
|
83176
83820
|
var isAsyncIterable = (value) => value != null && typeof value === "object" && typeof value[Symbol.asyncIterator] === "function";
|
|
83177
83821
|
|
|
83178
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83822
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/to-file.mjs
|
|
83179
83823
|
var isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function";
|
|
83180
83824
|
var isFileLike = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value);
|
|
83181
83825
|
var isResponseLike = (value) => value != null && typeof value === "object" && typeof value.url === "string" && typeof value.blob === "function";
|
|
@@ -83225,7 +83869,7 @@ function propsForError(value) {
|
|
|
83225
83869
|
const props = Object.getOwnPropertyNames(value);
|
|
83226
83870
|
return `; props: [${props.map((p) => `"${p}"`).join(", ")}]`;
|
|
83227
83871
|
}
|
|
83228
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83872
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/resource.mjs
|
|
83229
83873
|
class APIResource {
|
|
83230
83874
|
constructor(client) {
|
|
83231
83875
|
Object.defineProperty(this, "_client", {
|
|
@@ -83238,7 +83882,70 @@ class APIResource {
|
|
|
83238
83882
|
}
|
|
83239
83883
|
}
|
|
83240
83884
|
|
|
83241
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83885
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/headers.mjs
|
|
83886
|
+
var brand_privateNullableHeaders = /* @__PURE__ */ Symbol("brand.privateNullableHeaders");
|
|
83887
|
+
function* iterateHeaders(headers) {
|
|
83888
|
+
if (!headers)
|
|
83889
|
+
return;
|
|
83890
|
+
if (brand_privateNullableHeaders in headers) {
|
|
83891
|
+
const { values, nulls } = headers;
|
|
83892
|
+
yield* values.entries();
|
|
83893
|
+
for (const name of nulls) {
|
|
83894
|
+
yield [name, null];
|
|
83895
|
+
}
|
|
83896
|
+
return;
|
|
83897
|
+
}
|
|
83898
|
+
let shouldClear = false;
|
|
83899
|
+
let iter;
|
|
83900
|
+
if (headers instanceof Headers) {
|
|
83901
|
+
iter = headers.entries();
|
|
83902
|
+
} else if (isReadonlyArray(headers)) {
|
|
83903
|
+
iter = headers;
|
|
83904
|
+
} else {
|
|
83905
|
+
shouldClear = true;
|
|
83906
|
+
iter = Object.entries(headers ?? {});
|
|
83907
|
+
}
|
|
83908
|
+
for (let row of iter) {
|
|
83909
|
+
const name = row[0];
|
|
83910
|
+
if (typeof name !== "string")
|
|
83911
|
+
throw new TypeError("expected header name to be a string");
|
|
83912
|
+
const values = isReadonlyArray(row[1]) ? row[1] : [row[1]];
|
|
83913
|
+
let didClear = false;
|
|
83914
|
+
for (const value of values) {
|
|
83915
|
+
if (value === undefined)
|
|
83916
|
+
continue;
|
|
83917
|
+
if (shouldClear && !didClear) {
|
|
83918
|
+
didClear = true;
|
|
83919
|
+
yield [name, null];
|
|
83920
|
+
}
|
|
83921
|
+
yield [name, value];
|
|
83922
|
+
}
|
|
83923
|
+
}
|
|
83924
|
+
}
|
|
83925
|
+
var buildHeaders = (newHeaders) => {
|
|
83926
|
+
const targetHeaders = new Headers;
|
|
83927
|
+
const nullHeaders = new Set;
|
|
83928
|
+
for (const headers of newHeaders) {
|
|
83929
|
+
const seenHeaders = new Set;
|
|
83930
|
+
for (const [name, value] of iterateHeaders(headers)) {
|
|
83931
|
+
const lowerName = name.toLowerCase();
|
|
83932
|
+
if (!seenHeaders.has(lowerName)) {
|
|
83933
|
+
targetHeaders.delete(name);
|
|
83934
|
+
seenHeaders.add(lowerName);
|
|
83935
|
+
}
|
|
83936
|
+
if (value === null) {
|
|
83937
|
+
targetHeaders.delete(name);
|
|
83938
|
+
nullHeaders.add(lowerName);
|
|
83939
|
+
} else {
|
|
83940
|
+
targetHeaders.append(name, value);
|
|
83941
|
+
nullHeaders.delete(lowerName);
|
|
83942
|
+
}
|
|
83943
|
+
}
|
|
83944
|
+
}
|
|
83945
|
+
return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders };
|
|
83946
|
+
};
|
|
83947
|
+
|
|
83948
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/path.mjs
|
|
83242
83949
|
function encodeURIPath(str) {
|
|
83243
83950
|
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
83244
83951
|
}
|
|
@@ -83293,7 +84000,31 @@ ${underline}`);
|
|
|
83293
84000
|
};
|
|
83294
84001
|
var path5 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
83295
84002
|
|
|
83296
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84003
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/agents.mjs
|
|
84004
|
+
class Agents extends APIResource {
|
|
84005
|
+
create(body, options) {
|
|
84006
|
+
return this._client.post("/api/v1/agents", {
|
|
84007
|
+
body: { ...body, source_type: body.source_type === undefined ? "EXTERNAL" : body.source_type },
|
|
84008
|
+
...options
|
|
84009
|
+
});
|
|
84010
|
+
}
|
|
84011
|
+
retrieve(agentID, query = {}, options) {
|
|
84012
|
+
return this._client.get(path5`/api/v1/agents/${agentID}`, { query, ...options });
|
|
84013
|
+
}
|
|
84014
|
+
update(agentID, body, options) {
|
|
84015
|
+
return this._client.patch(path5`/api/v1/agents/${agentID}`, { body, ...options });
|
|
84016
|
+
}
|
|
84017
|
+
list(query = {}, options) {
|
|
84018
|
+
return this._client.getAPIList("/api/v1/agents", ItemsCursorGetPagination, { query, ...options });
|
|
84019
|
+
}
|
|
84020
|
+
delete(agentID, options) {
|
|
84021
|
+
return this._client.delete(path5`/api/v1/agents/${agentID}`, {
|
|
84022
|
+
...options,
|
|
84023
|
+
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
84024
|
+
});
|
|
84025
|
+
}
|
|
84026
|
+
}
|
|
84027
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/annotation-queues/items.mjs
|
|
83297
84028
|
class Items extends APIResource {
|
|
83298
84029
|
create(queueID, params, options) {
|
|
83299
84030
|
const { extend_trace_retention, ...body } = params;
|
|
@@ -83337,7 +84068,7 @@ class Items extends APIResource {
|
|
|
83337
84068
|
}
|
|
83338
84069
|
}
|
|
83339
84070
|
|
|
83340
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84071
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/annotation-queues/runs.mjs
|
|
83341
84072
|
class Runs extends APIResource {
|
|
83342
84073
|
create(queueID, params, options) {
|
|
83343
84074
|
const { body, extend_trace_retention } = params;
|
|
@@ -83374,7 +84105,7 @@ class Runs extends APIResource {
|
|
|
83374
84105
|
}
|
|
83375
84106
|
}
|
|
83376
84107
|
|
|
83377
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84108
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/annotation-queues/annotation-queues.mjs
|
|
83378
84109
|
class AnnotationQueues extends APIResource {
|
|
83379
84110
|
constructor() {
|
|
83380
84111
|
super(...arguments);
|
|
@@ -83437,70 +84168,7 @@ class AnnotationQueues extends APIResource {
|
|
|
83437
84168
|
}
|
|
83438
84169
|
AnnotationQueues.Runs = Runs;
|
|
83439
84170
|
AnnotationQueues.Items = Items;
|
|
83440
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83441
|
-
var brand_privateNullableHeaders = /* @__PURE__ */ Symbol("brand.privateNullableHeaders");
|
|
83442
|
-
function* iterateHeaders(headers) {
|
|
83443
|
-
if (!headers)
|
|
83444
|
-
return;
|
|
83445
|
-
if (brand_privateNullableHeaders in headers) {
|
|
83446
|
-
const { values, nulls } = headers;
|
|
83447
|
-
yield* values.entries();
|
|
83448
|
-
for (const name of nulls) {
|
|
83449
|
-
yield [name, null];
|
|
83450
|
-
}
|
|
83451
|
-
return;
|
|
83452
|
-
}
|
|
83453
|
-
let shouldClear = false;
|
|
83454
|
-
let iter;
|
|
83455
|
-
if (headers instanceof Headers) {
|
|
83456
|
-
iter = headers.entries();
|
|
83457
|
-
} else if (isReadonlyArray(headers)) {
|
|
83458
|
-
iter = headers;
|
|
83459
|
-
} else {
|
|
83460
|
-
shouldClear = true;
|
|
83461
|
-
iter = Object.entries(headers ?? {});
|
|
83462
|
-
}
|
|
83463
|
-
for (let row of iter) {
|
|
83464
|
-
const name = row[0];
|
|
83465
|
-
if (typeof name !== "string")
|
|
83466
|
-
throw new TypeError("expected header name to be a string");
|
|
83467
|
-
const values = isReadonlyArray(row[1]) ? row[1] : [row[1]];
|
|
83468
|
-
let didClear = false;
|
|
83469
|
-
for (const value of values) {
|
|
83470
|
-
if (value === undefined)
|
|
83471
|
-
continue;
|
|
83472
|
-
if (shouldClear && !didClear) {
|
|
83473
|
-
didClear = true;
|
|
83474
|
-
yield [name, null];
|
|
83475
|
-
}
|
|
83476
|
-
yield [name, value];
|
|
83477
|
-
}
|
|
83478
|
-
}
|
|
83479
|
-
}
|
|
83480
|
-
var buildHeaders = (newHeaders) => {
|
|
83481
|
-
const targetHeaders = new Headers;
|
|
83482
|
-
const nullHeaders = new Set;
|
|
83483
|
-
for (const headers of newHeaders) {
|
|
83484
|
-
const seenHeaders = new Set;
|
|
83485
|
-
for (const [name, value] of iterateHeaders(headers)) {
|
|
83486
|
-
const lowerName = name.toLowerCase();
|
|
83487
|
-
if (!seenHeaders.has(lowerName)) {
|
|
83488
|
-
targetHeaders.delete(name);
|
|
83489
|
-
seenHeaders.add(lowerName);
|
|
83490
|
-
}
|
|
83491
|
-
if (value === null) {
|
|
83492
|
-
targetHeaders.delete(name);
|
|
83493
|
-
nullHeaders.add(lowerName);
|
|
83494
|
-
} else {
|
|
83495
|
-
targetHeaders.append(name, value);
|
|
83496
|
-
nullHeaders.delete(lowerName);
|
|
83497
|
-
}
|
|
83498
|
-
}
|
|
83499
|
-
}
|
|
83500
|
-
return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders };
|
|
83501
|
-
};
|
|
83502
|
-
|
|
83503
|
-
// ../../node_modules/.bun/langsmith@0.11.0+ea9f70ecde856c26/node_modules/langsmith/resources/datasets/examples.mjs
|
|
84171
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/datasets/examples.mjs
|
|
83504
84172
|
class Examples extends APIResource {
|
|
83505
84173
|
delete(exampleID, params, options) {
|
|
83506
84174
|
const { dataset_id } = params;
|
|
@@ -83511,14 +84179,14 @@ class Examples extends APIResource {
|
|
|
83511
84179
|
}
|
|
83512
84180
|
}
|
|
83513
84181
|
|
|
83514
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84182
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/datasets/experiment-runs.mjs
|
|
83515
84183
|
class ExperimentRuns extends APIResource {
|
|
83516
84184
|
query(datasetID, body, options) {
|
|
83517
84185
|
return this._client.getAPIList(path5`/api/v2/datasets/${datasetID}/experiment-runs`, ItemsCursorPostPagination, { body, method: "post", ...options });
|
|
83518
84186
|
}
|
|
83519
84187
|
}
|
|
83520
84188
|
|
|
83521
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84189
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/datasets/datasets.mjs
|
|
83522
84190
|
class Datasets extends APIResource {
|
|
83523
84191
|
constructor() {
|
|
83524
84192
|
super(...arguments);
|
|
@@ -83538,14 +84206,14 @@ class Datasets extends APIResource {
|
|
|
83538
84206
|
}
|
|
83539
84207
|
Datasets.Examples = Examples;
|
|
83540
84208
|
Datasets.ExperimentRuns = ExperimentRuns;
|
|
83541
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84209
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/fleet/threads.mjs
|
|
83542
84210
|
class Threads extends APIResource {
|
|
83543
84211
|
activateSandbox(threadID, options) {
|
|
83544
84212
|
return this._client.post(path5`/v1/fleet/threads/${threadID}/sandbox-activation`, options);
|
|
83545
84213
|
}
|
|
83546
84214
|
}
|
|
83547
84215
|
|
|
83548
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84216
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/fleet/fleet.mjs
|
|
83549
84217
|
class Fleet extends APIResource {
|
|
83550
84218
|
constructor() {
|
|
83551
84219
|
super(...arguments);
|
|
@@ -83558,13 +84226,13 @@ class Fleet extends APIResource {
|
|
|
83558
84226
|
}
|
|
83559
84227
|
}
|
|
83560
84228
|
Fleet.Threads = Threads;
|
|
83561
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84229
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/info.mjs
|
|
83562
84230
|
class Info extends APIResource {
|
|
83563
84231
|
list(options) {
|
|
83564
84232
|
return this._client.get("/api/v1/info", options);
|
|
83565
84233
|
}
|
|
83566
84234
|
}
|
|
83567
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84235
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/issues.mjs
|
|
83568
84236
|
class Issues extends APIResource {
|
|
83569
84237
|
retrieve(id, query = {}, options) {
|
|
83570
84238
|
return this._client.get(path5`/api/v1/platform/issues/${id}`, { query, ...options });
|
|
@@ -83576,7 +84244,7 @@ class Issues extends APIResource {
|
|
|
83576
84244
|
});
|
|
83577
84245
|
}
|
|
83578
84246
|
}
|
|
83579
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84247
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/online-evaluators.mjs
|
|
83580
84248
|
class OnlineEvaluators extends APIResource {
|
|
83581
84249
|
create(body, options) {
|
|
83582
84250
|
return this._client.post("/api/v1/platform/evaluators", { body, ...options });
|
|
@@ -83609,7 +84277,7 @@ class OnlineEvaluators extends APIResource {
|
|
|
83609
84277
|
return this._client.get("/api/v1/platform/evaluators/spend", { query, ...options });
|
|
83610
84278
|
}
|
|
83611
84279
|
}
|
|
83612
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84280
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/product-feedback.mjs
|
|
83613
84281
|
class ProductFeedback extends APIResource {
|
|
83614
84282
|
create(params, options) {
|
|
83615
84283
|
const { "Idempotency-Key": idempotencyKey, ...body } = params;
|
|
@@ -83626,7 +84294,31 @@ class ProductFeedback extends APIResource {
|
|
|
83626
84294
|
return this._client.get(path5`/api/v1/platform/product-feedbacks/${id}`, options);
|
|
83627
84295
|
}
|
|
83628
84296
|
}
|
|
83629
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84297
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/prompt-webhooks.mjs
|
|
84298
|
+
class PromptWebhooks extends APIResource {
|
|
84299
|
+
create(body, options) {
|
|
84300
|
+
return this._client.post("/api/v1/prompt-webhooks", { body, ...options });
|
|
84301
|
+
}
|
|
84302
|
+
retrieve(webhookID, options) {
|
|
84303
|
+
return this._client.get(path5`/api/v1/prompt-webhooks/${webhookID}`, options);
|
|
84304
|
+
}
|
|
84305
|
+
update(webhookID, body, options) {
|
|
84306
|
+
return this._client.patch(path5`/api/v1/prompt-webhooks/${webhookID}`, { body, ...options });
|
|
84307
|
+
}
|
|
84308
|
+
list(options) {
|
|
84309
|
+
return this._client.get("/api/v1/prompt-webhooks", options);
|
|
84310
|
+
}
|
|
84311
|
+
delete(webhookID, options) {
|
|
84312
|
+
return this._client.delete(path5`/api/v1/prompt-webhooks/${webhookID}`, {
|
|
84313
|
+
...options,
|
|
84314
|
+
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
84315
|
+
});
|
|
84316
|
+
}
|
|
84317
|
+
test(body, options) {
|
|
84318
|
+
return this._client.post("/api/v1/prompt-webhooks/test", { body, ...options });
|
|
84319
|
+
}
|
|
84320
|
+
}
|
|
84321
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/public/runs.mjs
|
|
83630
84322
|
class Runs2 extends APIResource {
|
|
83631
84323
|
retrieve(runID, params, options) {
|
|
83632
84324
|
const { share_token, Accept, ...query } = params;
|
|
@@ -83646,7 +84338,7 @@ class Runs2 extends APIResource {
|
|
|
83646
84338
|
}
|
|
83647
84339
|
}
|
|
83648
84340
|
|
|
83649
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84341
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/public/public.mjs
|
|
83650
84342
|
class Public extends APIResource {
|
|
83651
84343
|
constructor() {
|
|
83652
84344
|
super(...arguments);
|
|
@@ -83659,7 +84351,7 @@ class Public extends APIResource {
|
|
|
83659
84351
|
}
|
|
83660
84352
|
}
|
|
83661
84353
|
Public.Runs = Runs2;
|
|
83662
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84354
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/runs/share.mjs
|
|
83663
84355
|
class Share extends APIResource {
|
|
83664
84356
|
create(runID, body, options) {
|
|
83665
84357
|
return this._client.post(path5`/api/v2/runs/${runID}/share`, { body, ...options });
|
|
@@ -83673,10 +84365,89 @@ class Share extends APIResource {
|
|
|
83673
84365
|
}
|
|
83674
84366
|
}
|
|
83675
84367
|
|
|
83676
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84368
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/query-streaming.mjs
|
|
84369
|
+
async function* iterQueryStream(fetch2, paths) {
|
|
84370
|
+
const itemPath = new RegExp(`^${escapeRegExp(paths.items)}/(-|\\d+)$`);
|
|
84371
|
+
let cursor;
|
|
84372
|
+
do {
|
|
84373
|
+
let next = null;
|
|
84374
|
+
const doc = [];
|
|
84375
|
+
let yielded = 0;
|
|
84376
|
+
let buffered = false;
|
|
84377
|
+
for await (const event of await fetch2(cursor)) {
|
|
84378
|
+
for (const op of event) {
|
|
84379
|
+
if (op.path === "") {
|
|
84380
|
+
const root = op.value;
|
|
84381
|
+
next = getPointer(root, paths.nextCursor) ?? null;
|
|
84382
|
+
const items = getPointer(root, paths.items) ?? [];
|
|
84383
|
+
doc.splice(yielded, doc.length - yielded, ...items.slice(yielded));
|
|
84384
|
+
} else if (op.path === paths.nextCursor) {
|
|
84385
|
+
next = op.value ?? null;
|
|
84386
|
+
} else {
|
|
84387
|
+
const match = itemPath.exec(op.path);
|
|
84388
|
+
if (!match)
|
|
84389
|
+
continue;
|
|
84390
|
+
const index = match[1] === "-" ? doc.length : Number(match[1]);
|
|
84391
|
+
if (match[1] !== "-")
|
|
84392
|
+
buffered = true;
|
|
84393
|
+
if (op.op === "remove") {
|
|
84394
|
+
if (index >= yielded && index < doc.length)
|
|
84395
|
+
doc.splice(index, 1);
|
|
84396
|
+
} else if (op.op === "replace") {
|
|
84397
|
+
if (index >= yielded && index < doc.length)
|
|
84398
|
+
doc[index] = op.value;
|
|
84399
|
+
} else {
|
|
84400
|
+
doc.splice(Math.min(index, doc.length), 0, op.value);
|
|
84401
|
+
}
|
|
84402
|
+
}
|
|
84403
|
+
while (!buffered && yielded < doc.length)
|
|
84404
|
+
yield doc[yielded++];
|
|
84405
|
+
}
|
|
84406
|
+
}
|
|
84407
|
+
while (yielded < doc.length)
|
|
84408
|
+
yield doc[yielded++];
|
|
84409
|
+
cursor = next || undefined;
|
|
84410
|
+
} while (cursor);
|
|
84411
|
+
}
|
|
84412
|
+
function getPointer(doc, pointer) {
|
|
84413
|
+
let value = doc;
|
|
84414
|
+
for (const segment of pointer.split("/").slice(1)) {
|
|
84415
|
+
if (value == null || typeof value !== "object")
|
|
84416
|
+
return;
|
|
84417
|
+
value = value[segment.replace(/~1/g, "/").replace(/~0/g, "~")];
|
|
84418
|
+
}
|
|
84419
|
+
return value;
|
|
84420
|
+
}
|
|
84421
|
+
function escapeRegExp(value) {
|
|
84422
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
84423
|
+
}
|
|
84424
|
+
|
|
84425
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/runs/streaming.mjs
|
|
84426
|
+
class Streaming extends APIResource {
|
|
84427
|
+
queryV2(params, options) {
|
|
84428
|
+
const { Accept, ...body } = params;
|
|
84429
|
+
return this._client.post("/api/v2/runs/query", {
|
|
84430
|
+
body,
|
|
84431
|
+
...options,
|
|
84432
|
+
headers: buildHeaders([{ Accept: Accept != null ? Accept : "text/event-stream" }, options?.headers]),
|
|
84433
|
+
stream: true
|
|
84434
|
+
});
|
|
84435
|
+
}
|
|
84436
|
+
queryV2Items(params, options) {
|
|
84437
|
+
return iterQueryStream((cursor) => this.queryV2(cursor ? { ...params, cursor } : params, options), { items: "/items", nextCursor: "/next_cursor" });
|
|
84438
|
+
}
|
|
84439
|
+
}
|
|
84440
|
+
|
|
84441
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/runs/runs.mjs
|
|
83677
84442
|
class Runs3 extends APIResource {
|
|
83678
84443
|
constructor() {
|
|
83679
84444
|
super(...arguments);
|
|
84445
|
+
Object.defineProperty(this, "streaming", {
|
|
84446
|
+
enumerable: true,
|
|
84447
|
+
configurable: true,
|
|
84448
|
+
writable: true,
|
|
84449
|
+
value: new Streaming(this._client)
|
|
84450
|
+
});
|
|
83680
84451
|
Object.defineProperty(this, "share", {
|
|
83681
84452
|
enumerable: true,
|
|
83682
84453
|
configurable: true,
|
|
@@ -83717,8 +84488,9 @@ class Runs3 extends APIResource {
|
|
|
83717
84488
|
});
|
|
83718
84489
|
}
|
|
83719
84490
|
}
|
|
84491
|
+
Runs3.Streaming = Streaming;
|
|
83720
84492
|
Runs3.Share = Share;
|
|
83721
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84493
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sandboxes/boxes.mjs
|
|
83722
84494
|
class Boxes extends APIResource {
|
|
83723
84495
|
create(body, options) {
|
|
83724
84496
|
return this._client.post("/api/v2/sandboxes/boxes", { body, ...options });
|
|
@@ -83772,7 +84544,7 @@ class Boxes extends APIResource {
|
|
|
83772
84544
|
}
|
|
83773
84545
|
}
|
|
83774
84546
|
|
|
83775
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84547
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sandboxes/registries.mjs
|
|
83776
84548
|
class Registries extends APIResource {
|
|
83777
84549
|
create(body, options) {
|
|
83778
84550
|
return this._client.post("/api/v2/sandboxes/registries", { body, ...options });
|
|
@@ -83794,7 +84566,7 @@ class Registries extends APIResource {
|
|
|
83794
84566
|
}
|
|
83795
84567
|
}
|
|
83796
84568
|
|
|
83797
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84569
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sandboxes/snapshots.mjs
|
|
83798
84570
|
class Snapshots extends APIResource {
|
|
83799
84571
|
create(body, options) {
|
|
83800
84572
|
return this._client.post("/api/v2/sandboxes/snapshots", { body, ...options });
|
|
@@ -83816,7 +84588,7 @@ class Snapshots extends APIResource {
|
|
|
83816
84588
|
}
|
|
83817
84589
|
}
|
|
83818
84590
|
|
|
83819
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84591
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sandboxes/sandboxes.mjs
|
|
83820
84592
|
class Sandboxes extends APIResource {
|
|
83821
84593
|
constructor() {
|
|
83822
84594
|
super(...arguments);
|
|
@@ -83846,13 +84618,13 @@ class Sandboxes extends APIResource {
|
|
|
83846
84618
|
Sandboxes.Boxes = Boxes;
|
|
83847
84619
|
Sandboxes.Registries = Registries;
|
|
83848
84620
|
Sandboxes.Snapshots = Snapshots;
|
|
83849
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84621
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sessions.mjs
|
|
83850
84622
|
class Sessions extends APIResource {
|
|
83851
84623
|
resolve(query, options) {
|
|
83852
84624
|
return this._client.get("/api/v1/sessions/resolutions", { query, ...options });
|
|
83853
84625
|
}
|
|
83854
84626
|
}
|
|
83855
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84627
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/threads/share.mjs
|
|
83856
84628
|
class Share2 extends APIResource {
|
|
83857
84629
|
create(threadID, body, options) {
|
|
83858
84630
|
return this._client.post(path5`/api/v2/threads/${threadID}/share`, { body, ...options });
|
|
@@ -83870,10 +84642,32 @@ class Share2 extends APIResource {
|
|
|
83870
84642
|
}
|
|
83871
84643
|
}
|
|
83872
84644
|
|
|
83873
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84645
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/threads/streaming.mjs
|
|
84646
|
+
class Streaming2 extends APIResource {
|
|
84647
|
+
query(params, options) {
|
|
84648
|
+
const { Accept, ...body } = params;
|
|
84649
|
+
return this._client.post("/api/v2/threads/query", {
|
|
84650
|
+
body,
|
|
84651
|
+
...options,
|
|
84652
|
+
headers: buildHeaders([{ Accept: Accept != null ? Accept : "text/event-stream" }, options?.headers]),
|
|
84653
|
+
stream: true
|
|
84654
|
+
});
|
|
84655
|
+
}
|
|
84656
|
+
queryItems(params, options) {
|
|
84657
|
+
return iterQueryStream((cursor) => this.query(cursor ? { ...params, cursor } : params, options), { items: "/items", nextCursor: "/next_cursor" });
|
|
84658
|
+
}
|
|
84659
|
+
}
|
|
84660
|
+
|
|
84661
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/threads/threads.mjs
|
|
83874
84662
|
class Threads2 extends APIResource {
|
|
83875
84663
|
constructor() {
|
|
83876
84664
|
super(...arguments);
|
|
84665
|
+
Object.defineProperty(this, "streaming", {
|
|
84666
|
+
enumerable: true,
|
|
84667
|
+
configurable: true,
|
|
84668
|
+
writable: true,
|
|
84669
|
+
value: new Streaming2(this._client)
|
|
84670
|
+
});
|
|
83877
84671
|
Object.defineProperty(this, "share", {
|
|
83878
84672
|
enumerable: true,
|
|
83879
84673
|
configurable: true,
|
|
@@ -83900,9 +84694,35 @@ class Threads2 extends APIResource {
|
|
|
83900
84694
|
return this._client.get(path5`/api/v2/threads/${threadID}/stats`, { query, ...options });
|
|
83901
84695
|
}
|
|
83902
84696
|
}
|
|
84697
|
+
Threads2.Streaming = Streaming2;
|
|
83903
84698
|
Threads2.Share = Share2;
|
|
83904
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84699
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/traces/streaming.mjs
|
|
84700
|
+
class Streaming3 extends APIResource {
|
|
84701
|
+
query(params, options) {
|
|
84702
|
+
const { Accept, ...body } = params;
|
|
84703
|
+
return this._client.post("/api/v2/traces/query", {
|
|
84704
|
+
body,
|
|
84705
|
+
...options,
|
|
84706
|
+
headers: buildHeaders([{ Accept: Accept != null ? Accept : "text/event-stream" }, options?.headers]),
|
|
84707
|
+
stream: true
|
|
84708
|
+
});
|
|
84709
|
+
}
|
|
84710
|
+
queryItems(params, options) {
|
|
84711
|
+
return iterQueryStream((cursor) => this.query(cursor ? { ...params, cursor } : params, options), { items: "/items", nextCursor: "/next_cursor" });
|
|
84712
|
+
}
|
|
84713
|
+
}
|
|
84714
|
+
|
|
84715
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/traces/traces.mjs
|
|
83905
84716
|
class Traces extends APIResource {
|
|
84717
|
+
constructor() {
|
|
84718
|
+
super(...arguments);
|
|
84719
|
+
Object.defineProperty(this, "streaming", {
|
|
84720
|
+
enumerable: true,
|
|
84721
|
+
configurable: true,
|
|
84722
|
+
writable: true,
|
|
84723
|
+
value: new Streaming3(this._client)
|
|
84724
|
+
});
|
|
84725
|
+
}
|
|
83906
84726
|
listRuns(traceID, params, options) {
|
|
83907
84727
|
const { Accept, ...query } = params;
|
|
83908
84728
|
return this._client.get(path5`/api/v2/traces/${traceID}/runs`, {
|
|
@@ -83921,7 +84741,8 @@ class Traces extends APIResource {
|
|
|
83921
84741
|
});
|
|
83922
84742
|
}
|
|
83923
84743
|
}
|
|
83924
|
-
|
|
84744
|
+
Traces.Streaming = Streaming3;
|
|
84745
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/env.mjs
|
|
83925
84746
|
var readEnv = (env) => {
|
|
83926
84747
|
if (typeof globalThis.process !== "undefined") {
|
|
83927
84748
|
return globalThis.process.env?.[env]?.trim() || undefined;
|
|
@@ -83932,7 +84753,7 @@ var readEnv = (env) => {
|
|
|
83932
84753
|
return;
|
|
83933
84754
|
};
|
|
83934
84755
|
|
|
83935
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84756
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/client.mjs
|
|
83936
84757
|
var _Langsmith_instances;
|
|
83937
84758
|
var _a3;
|
|
83938
84759
|
var _Langsmith_encoder;
|
|
@@ -84014,6 +84835,12 @@ class Langsmith {
|
|
|
84014
84835
|
writable: true,
|
|
84015
84836
|
value: new ProductFeedback(this)
|
|
84016
84837
|
});
|
|
84838
|
+
Object.defineProperty(this, "agents", {
|
|
84839
|
+
enumerable: true,
|
|
84840
|
+
configurable: true,
|
|
84841
|
+
writable: true,
|
|
84842
|
+
value: new Agents(this)
|
|
84843
|
+
});
|
|
84017
84844
|
Object.defineProperty(this, "fleet", {
|
|
84018
84845
|
enumerable: true,
|
|
84019
84846
|
configurable: true,
|
|
@@ -84068,6 +84895,12 @@ class Langsmith {
|
|
|
84068
84895
|
writable: true,
|
|
84069
84896
|
value: new AnnotationQueues(this)
|
|
84070
84897
|
});
|
|
84898
|
+
Object.defineProperty(this, "promptWebhooks", {
|
|
84899
|
+
enumerable: true,
|
|
84900
|
+
configurable: true,
|
|
84901
|
+
writable: true,
|
|
84902
|
+
value: new PromptWebhooks(this)
|
|
84903
|
+
});
|
|
84071
84904
|
Object.defineProperty(this, "info", {
|
|
84072
84905
|
enumerable: true,
|
|
84073
84906
|
configurable: true,
|
|
@@ -84558,6 +85391,7 @@ Object.defineProperty(Langsmith, "toFile", {
|
|
|
84558
85391
|
value: toFile
|
|
84559
85392
|
});
|
|
84560
85393
|
Langsmith.ProductFeedback = ProductFeedback;
|
|
85394
|
+
Langsmith.Agents = Agents;
|
|
84561
85395
|
Langsmith.Fleet = Fleet;
|
|
84562
85396
|
Langsmith.Sessions = Sessions;
|
|
84563
85397
|
Langsmith.Datasets = Datasets;
|
|
@@ -84567,11 +85401,12 @@ Langsmith.Traces = Traces;
|
|
|
84567
85401
|
Langsmith.OnlineEvaluators = OnlineEvaluators;
|
|
84568
85402
|
Langsmith.Public = Public;
|
|
84569
85403
|
Langsmith.AnnotationQueues = AnnotationQueues;
|
|
85404
|
+
Langsmith.PromptWebhooks = PromptWebhooks;
|
|
84570
85405
|
Langsmith.Info = Info;
|
|
84571
85406
|
Langsmith.Issues = Issues;
|
|
84572
85407
|
Langsmith.Sandboxes = Sandboxes;
|
|
84573
85408
|
|
|
84574
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85409
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/warn.mjs
|
|
84575
85410
|
var warnedMessages = {};
|
|
84576
85411
|
function warnOnce(message, options) {
|
|
84577
85412
|
const key = options?.code ?? message;
|
|
@@ -84587,7 +85422,7 @@ function warnOnce(message, options) {
|
|
|
84587
85422
|
}
|
|
84588
85423
|
}
|
|
84589
85424
|
|
|
84590
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85425
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/xxhash/xxhash.mjs
|
|
84591
85426
|
var n = (n) => BigInt(n);
|
|
84592
85427
|
var PRIME32_1 = n("0x9E3779B1");
|
|
84593
85428
|
var PRIME32_2 = n("0x85EBCA77");
|
|
@@ -84867,7 +85702,7 @@ function xxh128ToBytes(hash128) {
|
|
|
84867
85702
|
return result;
|
|
84868
85703
|
}
|
|
84869
85704
|
|
|
84870
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85705
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/_uuid.mjs
|
|
84871
85706
|
var UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
84872
85707
|
function assertUuid(str, which) {
|
|
84873
85708
|
if (!UUID_REGEX.test(str)) {
|
|
@@ -84923,7 +85758,7 @@ function nonCryptographicUuid7Deterministic(originalId, key) {
|
|
|
84923
85758
|
return bytesToUuid(b);
|
|
84924
85759
|
}
|
|
84925
85760
|
|
|
84926
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85761
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/sampling.mjs
|
|
84927
85762
|
var SAMPLING_HASH_MODULUS = 1000000n;
|
|
84928
85763
|
var encoder2 = new TextEncoder;
|
|
84929
85764
|
var isSampledById = (identifier, samplingRate) => {
|
|
@@ -84940,7 +85775,7 @@ var isSampledById = (identifier, samplingRate) => {
|
|
|
84940
85775
|
return Number(bucket) / Number(SAMPLING_HASH_MODULUS) < samplingRate;
|
|
84941
85776
|
};
|
|
84942
85777
|
|
|
84943
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85778
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/addressing.mjs
|
|
84944
85779
|
function rejectConflicting(project, address) {
|
|
84945
85780
|
if (project && address) {
|
|
84946
85781
|
throw new Error(`A run is sent to a project (${JSON.stringify(project)}) or to an ` + "address, not both.");
|
|
@@ -84990,7 +85825,6 @@ function applyToPayload(run, { update = false } = {}) {
|
|
|
84990
85825
|
if (!address) {
|
|
84991
85826
|
return;
|
|
84992
85827
|
}
|
|
84993
|
-
warnOnce("Sending runs to an `address` is in beta and enabled per workspace; a " + "workspace without it rejects the runs.");
|
|
84994
85828
|
payload.address = addressToLrn(address);
|
|
84995
85829
|
if (!namedProject) {
|
|
84996
85830
|
delete payload.session_name;
|
|
@@ -84998,7 +85832,7 @@ function applyToPayload(run, { update = false } = {}) {
|
|
|
84998
85832
|
}
|
|
84999
85833
|
}
|
|
85000
85834
|
|
|
85001
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85835
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/v2_migration.mjs
|
|
85002
85836
|
var QueryBackend = {
|
|
85003
85837
|
CLICKHOUSE_ONLY: "clickhouse_only",
|
|
85004
85838
|
SMITHDB_ONLY: "smithdb_only",
|
|
@@ -85015,7 +85849,7 @@ function getQueryBackend(instanceFlags) {
|
|
|
85015
85849
|
return QueryBackend.CLICKHOUSE_ONLY;
|
|
85016
85850
|
}
|
|
85017
85851
|
|
|
85018
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85852
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/error.mjs
|
|
85019
85853
|
function getInvalidPromptIdentifierMsg(identifier) {
|
|
85020
85854
|
return `Invalid prompt identifier format: "${identifier}". ` + `Expected one of:
|
|
85021
85855
|
` + ` - "prompt-name" (for private prompts)
|
|
@@ -85107,7 +85941,7 @@ function isConflictingEndpointsError(err) {
|
|
|
85107
85941
|
return typeof err === "object" && err !== null && err.code === ERR_CONFLICTING_ENDPOINTS;
|
|
85108
85942
|
}
|
|
85109
85943
|
|
|
85110
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85944
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/prompts.mjs
|
|
85111
85945
|
function parseHubIdentifier(identifier) {
|
|
85112
85946
|
if (!identifier || identifier.split("/").length > 2 || identifier.startsWith("/") || identifier.endsWith("/") || identifier.split(":").length > 2) {
|
|
85113
85947
|
throw new Error(getInvalidPromptIdentifierMsg(identifier));
|
|
@@ -85128,7 +85962,7 @@ function parseHubIdentifier(identifier) {
|
|
|
85128
85962
|
}
|
|
85129
85963
|
}
|
|
85130
85964
|
|
|
85131
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85965
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/fs.mjs
|
|
85132
85966
|
import * as nodeFs from "node:fs";
|
|
85133
85967
|
import * as nodeFsPromises from "node:fs/promises";
|
|
85134
85968
|
import * as nodePath from "node:path";
|
|
@@ -85182,7 +86016,7 @@ async function rmRecursive(filePath) {
|
|
|
85182
86016
|
await nodeFsPromises.rm(filePath, { recursive: true, force: true });
|
|
85183
86017
|
}
|
|
85184
86018
|
|
|
85185
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86019
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/prompt_cache/index.mjs
|
|
85186
86020
|
function isStale(entry, ttlSeconds) {
|
|
85187
86021
|
if (ttlSeconds === null) {
|
|
85188
86022
|
return false;
|
|
@@ -85403,7 +86237,7 @@ class PromptCache {
|
|
|
85403
86237
|
}
|
|
85404
86238
|
var promptCacheSingleton = new PromptCache;
|
|
85405
86239
|
|
|
85406
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86240
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/singletons/fetch.mjs
|
|
85407
86241
|
var DEFAULT_FETCH_IMPLEMENTATION = (...args) => fetch(...args);
|
|
85408
86242
|
var globalFetchSupportsWebStreaming = undefined;
|
|
85409
86243
|
var LANGSMITH_FETCH_IMPLEMENTATION_KEY = Symbol.for("ls:fetch_implementation");
|
|
@@ -85428,7 +86262,7 @@ var _getFetchImplementation = (debug) => {
|
|
|
85428
86262
|
};
|
|
85429
86263
|
};
|
|
85430
86264
|
|
|
85431
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86265
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/profile-lock.mjs
|
|
85432
86266
|
var LOCK_POLL_INTERVAL_MS = 10;
|
|
85433
86267
|
var LOCK_STALE_AFTER_MS = 1e4;
|
|
85434
86268
|
var LOCK_METADATA_FILE = "created_at";
|
|
@@ -85512,7 +86346,7 @@ ${owner}
|
|
|
85512
86346
|
};
|
|
85513
86347
|
}
|
|
85514
86348
|
|
|
85515
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86349
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/profiles.mjs
|
|
85516
86350
|
var DEFAULT_API_URL = "https://api.smith.langchain.com";
|
|
85517
86351
|
var OAUTH_CLIENT_ID = "langsmith-cli";
|
|
85518
86352
|
var TOKEN_REFRESH_LEEWAY_MS = 60000;
|
|
@@ -85872,7 +86706,7 @@ function authHeaderFromProfile(profile) {
|
|
|
85872
86706
|
return;
|
|
85873
86707
|
}
|
|
85874
86708
|
|
|
85875
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86709
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/fast-safe-stringify/index.mjs
|
|
85876
86710
|
var LIMIT_REPLACE_NODE = "[...]";
|
|
85877
86711
|
var CIRCULAR_REPLACE_NODE = { result: "[Circular]" };
|
|
85878
86712
|
var arr = [];
|
|
@@ -86162,12 +86996,12 @@ function replaceGetterValues(replacer) {
|
|
|
86162
86996
|
};
|
|
86163
86997
|
}
|
|
86164
86998
|
|
|
86165
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86999
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/worker_threads.mjs
|
|
86166
87000
|
import { Worker as NodeWorker } from "node:worker_threads";
|
|
86167
87001
|
var Worker = NodeWorker;
|
|
86168
87002
|
var WORKER_THREADS_AVAILABLE = true;
|
|
86169
87003
|
|
|
86170
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
87004
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/serialize_worker.mjs
|
|
86171
87005
|
var WORKER_SOURCE = `
|
|
86172
87006
|
const { parentPort } = require("worker_threads");
|
|
86173
87007
|
|
|
@@ -86435,7 +87269,7 @@ function hasLargeString(value, threshold = LARGE_STRING_THRESHOLD, nodeBudget =
|
|
|
86435
87269
|
return false;
|
|
86436
87270
|
}
|
|
86437
87271
|
|
|
86438
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
87272
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/client.mjs
|
|
86439
87273
|
function assertPullPublicPromptAllowed(promptIdentifier, dangerouslyPullPublicPrompt) {
|
|
86440
87274
|
const [owner] = parseHubIdentifier(promptIdentifier);
|
|
86441
87275
|
if (owner !== "-" && !dangerouslyPullPublicPrompt) {
|
|
@@ -87389,6 +88223,9 @@ class Client2 {
|
|
|
87389
88223
|
this._checkStainlessVersion("0.18.0");
|
|
87390
88224
|
return this.openAPIClient.sessions;
|
|
87391
88225
|
}
|
|
88226
|
+
get agents() {
|
|
88227
|
+
return this.openAPIClient.agents;
|
|
88228
|
+
}
|
|
87392
88229
|
get public() {
|
|
87393
88230
|
this._checkStainlessVersion("0.16.0");
|
|
87394
88231
|
return this.openAPIClient.public;
|
|
@@ -87653,12 +88490,15 @@ class Client2 {
|
|
|
87653
88490
|
return;
|
|
87654
88491
|
}
|
|
87655
88492
|
const batchSizeBytes = batch.reduce((sum, item) => sum + (item.size ?? 0), 0);
|
|
88493
|
+
const feedbacks = batch.filter((item) => item.action === "feedback").map((item) => item.item);
|
|
88494
|
+
const runItems = batch.filter((item) => item.action !== "feedback");
|
|
87656
88495
|
try {
|
|
87657
88496
|
if (this.langSmithToOTELTranslator !== undefined) {
|
|
87658
|
-
for (const item of
|
|
88497
|
+
for (const item of runItems) {
|
|
87659
88498
|
item.item = await this._maskRunMetadata(item.item);
|
|
87660
88499
|
}
|
|
87661
|
-
this._sendBatchToOTELTranslator(
|
|
88500
|
+
this._sendBatchToOTELTranslator(runItems);
|
|
88501
|
+
await this._postFeedbacks(feedbacks, options);
|
|
87662
88502
|
} else {
|
|
87663
88503
|
const ingestParams = {
|
|
87664
88504
|
runCreates: batch.filter((item) => item.action === "create").map((item) => item.item),
|
|
@@ -87669,7 +88509,7 @@ class Client2 {
|
|
|
87669
88509
|
if (useMultipart) {
|
|
87670
88510
|
const useGzip = !this._runCompressionDisabled && serverInfo?.instance_flags?.gzip_body_enabled;
|
|
87671
88511
|
try {
|
|
87672
|
-
await this.multipartIngestRuns(ingestParams, {
|
|
88512
|
+
await this.multipartIngestRuns({ ...ingestParams, feedbacks }, {
|
|
87673
88513
|
...options,
|
|
87674
88514
|
useGzip,
|
|
87675
88515
|
sizeBytes: batchSizeBytes
|
|
@@ -87681,6 +88521,7 @@ class Client2 {
|
|
|
87681
88521
|
...options,
|
|
87682
88522
|
sizeBytes: batchSizeBytes
|
|
87683
88523
|
});
|
|
88524
|
+
await this._postFeedbacks(feedbacks, options);
|
|
87684
88525
|
} else {
|
|
87685
88526
|
throw e;
|
|
87686
88527
|
}
|
|
@@ -87690,6 +88531,7 @@ class Client2 {
|
|
|
87690
88531
|
...options,
|
|
87691
88532
|
sizeBytes: batchSizeBytes
|
|
87692
88533
|
});
|
|
88534
|
+
await this._postFeedbacks(feedbacks, options);
|
|
87693
88535
|
}
|
|
87694
88536
|
}
|
|
87695
88537
|
} catch (e) {
|
|
@@ -87745,7 +88587,9 @@ class Client2 {
|
|
|
87745
88587
|
async processRunOperation(item) {
|
|
87746
88588
|
clearTimeout(this.autoBatchTimeout);
|
|
87747
88589
|
this.autoBatchTimeout = undefined;
|
|
87748
|
-
|
|
88590
|
+
if (item.action !== "feedback") {
|
|
88591
|
+
item.item = mergeRuntimeEnvIntoRun(item.item, this.cachedLSEnvVarsForMetadata, this.omitTracedRuntimeInfo, this.tracingSampleRate);
|
|
88592
|
+
}
|
|
87749
88593
|
const itemPromise = this.autoBatchQueue.push(item);
|
|
87750
88594
|
if (this.manualFlushMode) {
|
|
87751
88595
|
return itemPromise;
|
|
@@ -87986,8 +88830,8 @@ class Client2 {
|
|
|
87986
88830
|
return res;
|
|
87987
88831
|
});
|
|
87988
88832
|
}
|
|
87989
|
-
async multipartIngestRuns({ runCreates, runUpdates }, options) {
|
|
87990
|
-
if (runCreates === undefined && runUpdates === undefined) {
|
|
88833
|
+
async multipartIngestRuns({ runCreates, runUpdates, feedbacks }, options) {
|
|
88834
|
+
if (runCreates === undefined && runUpdates === undefined && !feedbacks?.length) {
|
|
87991
88835
|
return;
|
|
87992
88836
|
}
|
|
87993
88837
|
const allAttachments = {};
|
|
@@ -88032,7 +88876,7 @@ class Client2 {
|
|
|
88032
88876
|
preparedCreateParams = Object.values(createById);
|
|
88033
88877
|
preparedUpdateParams = standaloneUpdates;
|
|
88034
88878
|
}
|
|
88035
|
-
if (preparedCreateParams.length === 0 && preparedUpdateParams.length === 0) {
|
|
88879
|
+
if (preparedCreateParams.length === 0 && preparedUpdateParams.length === 0 && !feedbacks?.length) {
|
|
88036
88880
|
return;
|
|
88037
88881
|
}
|
|
88038
88882
|
const accumulatedContext = [];
|
|
@@ -88092,6 +88936,16 @@ class Client2 {
|
|
|
88092
88936
|
accumulatedContext.push(`trace=${payload.trace_id},id=${payload.id}`);
|
|
88093
88937
|
}
|
|
88094
88938
|
}
|
|
88939
|
+
for (const feedback of feedbacks ?? []) {
|
|
88940
|
+
const stringifiedFeedback = await this._serializeBody(feedback, `Serializing for multipart ingestion of feedback with id: ${feedback.id}`);
|
|
88941
|
+
accumulatedParts.push({
|
|
88942
|
+
name: `feedback.${feedback.id}`,
|
|
88943
|
+
payload: new Blob([stringifiedFeedback], {
|
|
88944
|
+
type: `application/json; length=${stringifiedFeedback.length}`
|
|
88945
|
+
})
|
|
88946
|
+
});
|
|
88947
|
+
accumulatedContext.push(`trace=${feedback.trace_id},id=${feedback.id}`);
|
|
88948
|
+
}
|
|
88095
88949
|
await this._sendMultipartRequest(accumulatedParts, accumulatedContext.join("; "), options);
|
|
88096
88950
|
}
|
|
88097
88951
|
async _createNodeFetchBody(parts, boundary) {
|
|
@@ -89324,14 +90178,14 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89324
90178
|
return res;
|
|
89325
90179
|
});
|
|
89326
90180
|
}
|
|
89327
|
-
async createExample(inputsOrUpdate,
|
|
90181
|
+
async createExample(inputsOrUpdate, referenceOutputs, options) {
|
|
89328
90182
|
if (isExampleCreate(inputsOrUpdate)) {
|
|
89329
|
-
if (
|
|
89330
|
-
throw new Error("Cannot provide
|
|
90183
|
+
if (referenceOutputs !== undefined || options !== undefined) {
|
|
90184
|
+
throw new Error("Cannot provide referenceOutputs or options when using ExampleCreate object");
|
|
89331
90185
|
}
|
|
89332
90186
|
}
|
|
89333
|
-
let datasetId_ =
|
|
89334
|
-
const datasetName_ =
|
|
90187
|
+
let datasetId_ = referenceOutputs ? options?.datasetId : inputsOrUpdate.dataset_id;
|
|
90188
|
+
const datasetName_ = referenceOutputs ? options?.datasetName : inputsOrUpdate.dataset_name;
|
|
89335
90189
|
if (datasetId_ === undefined && datasetName_ === undefined) {
|
|
89336
90190
|
throw new Error("Must provide either datasetName or datasetId");
|
|
89337
90191
|
} else if (datasetId_ !== undefined && datasetName_ !== undefined) {
|
|
@@ -89340,12 +90194,12 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89340
90194
|
const dataset = await this.readDataset({ datasetName: datasetName_ });
|
|
89341
90195
|
datasetId_ = dataset.id;
|
|
89342
90196
|
}
|
|
89343
|
-
const createdAt_ = (
|
|
90197
|
+
const createdAt_ = (referenceOutputs ? options?.createdAt : inputsOrUpdate.created_at) || new Date;
|
|
89344
90198
|
let data;
|
|
89345
90199
|
if (!isExampleCreate(inputsOrUpdate)) {
|
|
89346
90200
|
data = {
|
|
89347
90201
|
inputs: inputsOrUpdate,
|
|
89348
|
-
|
|
90202
|
+
reference_outputs: referenceOutputs,
|
|
89349
90203
|
created_at: createdAt_?.toISOString(),
|
|
89350
90204
|
id: options?.exampleId,
|
|
89351
90205
|
metadata: options?.metadata,
|
|
@@ -89382,7 +90236,10 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89382
90236
|
const examples = await Promise.all(response.example_ids.map((id) => this.readExample(id)));
|
|
89383
90237
|
return examples;
|
|
89384
90238
|
}
|
|
89385
|
-
const { inputs, outputs, metadata, splits, sourceRunIds, useSourceRunIOs, useSourceRunAttachments, attachments, exampleIds, datasetId, datasetName } = propsOrUploads;
|
|
90239
|
+
const { inputs, referenceOutputs, outputs, metadata, splits, sourceRunIds, useSourceRunIOs, useSourceRunAttachments, attachments, exampleIds, datasetId, datasetName } = propsOrUploads;
|
|
90240
|
+
if (referenceOutputs !== undefined && outputs !== undefined) {
|
|
90241
|
+
throw new Error("Cannot specify both referenceOutputs and outputs");
|
|
90242
|
+
}
|
|
89386
90243
|
if (inputs === undefined) {
|
|
89387
90244
|
throw new Error("Must provide inputs when using legacy parameters");
|
|
89388
90245
|
}
|
|
@@ -89400,7 +90257,7 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89400
90257
|
return {
|
|
89401
90258
|
dataset_id: datasetId_,
|
|
89402
90259
|
inputs: input,
|
|
89403
|
-
|
|
90260
|
+
reference_outputs: (referenceOutputs ?? outputs)?.[idx],
|
|
89404
90261
|
metadata: metadata?.[idx],
|
|
89405
90262
|
split: splits?.[idx],
|
|
89406
90263
|
id: exampleIds?.[idx],
|
|
@@ -89444,7 +90301,7 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89444
90301
|
}
|
|
89445
90302
|
return example;
|
|
89446
90303
|
}
|
|
89447
|
-
async* listExamples({ datasetId, datasetName, exampleIds, asOf, splits, inlineS3Urls, metadata, limit, offset, filter, includeAttachments } = {}) {
|
|
90304
|
+
async* listExamples({ datasetId, datasetName, exampleIds, asOf, splits, inlineS3Urls, metadata, limit, offset, filter, includeAttachments, select, excludeDefaultFields } = {}) {
|
|
89448
90305
|
let datasetId_;
|
|
89449
90306
|
if (datasetId !== undefined && datasetName !== undefined) {
|
|
89450
90307
|
throw new Error("Must provide either datasetName or datasetId, not both");
|
|
@@ -89486,8 +90343,17 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89486
90343
|
if (filter !== undefined) {
|
|
89487
90344
|
params.append("filter", filter);
|
|
89488
90345
|
}
|
|
90346
|
+
const selectFields = new Set(select ?? []);
|
|
89489
90347
|
if (includeAttachments === true) {
|
|
89490
|
-
["attachment_urls", "outputs", "metadata"]
|
|
90348
|
+
for (const field of ["attachment_urls", "outputs", "metadata"]) {
|
|
90349
|
+
selectFields.add(field);
|
|
90350
|
+
}
|
|
90351
|
+
}
|
|
90352
|
+
for (const field of selectFields) {
|
|
90353
|
+
params.append("select", field);
|
|
90354
|
+
}
|
|
90355
|
+
if (excludeDefaultFields === true) {
|
|
90356
|
+
params.append("exclude_default_fields", "true");
|
|
89491
90357
|
}
|
|
89492
90358
|
let i = 0;
|
|
89493
90359
|
for await (const rawExamples of this._getPaginated("/examples", params)) {
|
|
@@ -89726,12 +90592,43 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89726
90592
|
if (samplingId != null && !this._shouldSample(samplingId)) {
|
|
89727
90593
|
return feedback;
|
|
89728
90594
|
}
|
|
89729
|
-
const
|
|
89730
|
-
|
|
90595
|
+
const payload = address ? { ...feedback, address: addressToLrn(address) } : feedback;
|
|
90596
|
+
if (runId && traceId && extendTraceRetention !== false && await this._canBatchFeedback()) {
|
|
90597
|
+
this.processRunOperation({
|
|
90598
|
+
action: "feedback",
|
|
90599
|
+
item: {
|
|
90600
|
+
...payload,
|
|
90601
|
+
start_time: typeof startTime === "number" ? new Date(startTime).toISOString() : startTime
|
|
90602
|
+
}
|
|
90603
|
+
}).catch(console.error);
|
|
90604
|
+
return feedback;
|
|
90605
|
+
}
|
|
90606
|
+
await this._postFeedback(payload);
|
|
90607
|
+
return feedback;
|
|
90608
|
+
}
|
|
90609
|
+
async _canBatchFeedback() {
|
|
90610
|
+
if (!this.autoBatchTracing || this.langSmithToOTELTranslator !== undefined || this._multipartDisabled) {
|
|
90611
|
+
return false;
|
|
90612
|
+
}
|
|
90613
|
+
const serverInfo = await this._ensureServerInfo();
|
|
90614
|
+
return serverInfo?.batch_ingest_config?.use_multipart_endpoint ?? true;
|
|
90615
|
+
}
|
|
90616
|
+
async _postFeedback(feedback, options) {
|
|
90617
|
+
const headers = {
|
|
90618
|
+
...this._mergedHeaders,
|
|
90619
|
+
"Content-Type": "application/json"
|
|
90620
|
+
};
|
|
90621
|
+
if (options?.apiKey !== undefined) {
|
|
90622
|
+
headers["x-api-key"] = options.apiKey;
|
|
90623
|
+
}
|
|
90624
|
+
if (options?.workspaceId !== undefined) {
|
|
90625
|
+
headers["x-tenant-id"] = options.workspaceId;
|
|
90626
|
+
}
|
|
90627
|
+
const body = JSON.stringify(feedback);
|
|
89731
90628
|
await this.caller.call(async () => {
|
|
89732
|
-
const res = await this._fetch(
|
|
90629
|
+
const res = await this._fetch(`${options?.apiUrl ?? this.apiUrl}/feedback`, {
|
|
89733
90630
|
method: "POST",
|
|
89734
|
-
headers
|
|
90631
|
+
headers,
|
|
89735
90632
|
signal: AbortSignal.timeout(this.timeout_ms),
|
|
89736
90633
|
...this.fetchOptions,
|
|
89737
90634
|
body
|
|
@@ -89739,7 +90636,9 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89739
90636
|
await raiseForStatus(res, "create feedback", true);
|
|
89740
90637
|
return res;
|
|
89741
90638
|
});
|
|
89742
|
-
|
|
90639
|
+
}
|
|
90640
|
+
async _postFeedbacks(feedbacks, options) {
|
|
90641
|
+
await Promise.all(feedbacks.map((feedback) => this._postFeedback(feedback, options)));
|
|
89743
90642
|
}
|
|
89744
90643
|
async updateFeedback(feedbackId, { score, value, correction, comment }) {
|
|
89745
90644
|
const feedbackUpdate = {};
|
|
@@ -89936,12 +90835,15 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89936
90835
|
return results;
|
|
89937
90836
|
}
|
|
89938
90837
|
async createFeedbackConfig(options) {
|
|
89939
|
-
const { feedbackKey, feedbackConfig, isLowerScoreBetter = false } = options;
|
|
90838
|
+
const { feedbackKey, feedbackConfig, isLowerScoreBetter, isEnforced = false } = options;
|
|
89940
90839
|
const body = {
|
|
89941
90840
|
feedback_key: feedbackKey,
|
|
89942
90841
|
feedback_config: feedbackConfig,
|
|
89943
|
-
|
|
90842
|
+
is_enforced: isEnforced
|
|
89944
90843
|
};
|
|
90844
|
+
if (isLowerScoreBetter !== undefined) {
|
|
90845
|
+
body.is_lower_score_better = isLowerScoreBetter;
|
|
90846
|
+
}
|
|
89945
90847
|
const response = await this.caller.call(async () => {
|
|
89946
90848
|
const res = await this._fetch(`${this.apiUrl}/feedback-configs`, {
|
|
89947
90849
|
method: "POST",
|
|
@@ -90486,6 +91388,9 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
90486
91388
|
return this._uploadExamplesMultipart(datasetId, uploads);
|
|
90487
91389
|
}
|
|
90488
91390
|
async _uploadExamplesMultipart(datasetId, uploads = []) {
|
|
91391
|
+
for (const example of uploads) {
|
|
91392
|
+
getExampleReferenceOutputs(example);
|
|
91393
|
+
}
|
|
90489
91394
|
if (!await this._getDatasetExamplesMultiPartSupport()) {
|
|
90490
91395
|
throw new Error("Your LangSmith deployment does not allow using the multipart examples endpoint, please upgrade your deployment to the latest version.");
|
|
90491
91396
|
}
|
|
@@ -90516,8 +91421,9 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
90516
91421
|
});
|
|
90517
91422
|
formData.append(`${exampleId}.inputs`, inputsBlob);
|
|
90518
91423
|
}
|
|
90519
|
-
|
|
90520
|
-
|
|
91424
|
+
const referenceOutputs = getExampleReferenceOutputs(example);
|
|
91425
|
+
if (referenceOutputs !== undefined) {
|
|
91426
|
+
const stringifiedOutputs = serialize2(referenceOutputs, `Serializing outputs for uploaded example with id: ${exampleId}`);
|
|
90521
91427
|
const outputsBlob = new Blob([stringifiedOutputs], {
|
|
90522
91428
|
type: "application/json"
|
|
90523
91429
|
});
|
|
@@ -90993,7 +91899,13 @@ Object.defineProperty(Client2, "_fallbackDirsCreated", {
|
|
|
90993
91899
|
function isExampleCreate(input) {
|
|
90994
91900
|
return "dataset_id" in input || "dataset_name" in input;
|
|
90995
91901
|
}
|
|
90996
|
-
|
|
91902
|
+
function getExampleReferenceOutputs(example) {
|
|
91903
|
+
if (example.reference_outputs !== undefined && example.outputs !== undefined) {
|
|
91904
|
+
throw new Error("Cannot specify both reference_outputs and outputs");
|
|
91905
|
+
}
|
|
91906
|
+
return example.reference_outputs ?? example.outputs;
|
|
91907
|
+
}
|
|
91908
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/env.mjs
|
|
90997
91909
|
var isEnvTracingEnabled = (tracingEnabled) => {
|
|
90998
91910
|
if (tracingEnabled !== undefined) {
|
|
90999
91911
|
return tracingEnabled;
|
|
@@ -91002,7 +91914,7 @@ var isEnvTracingEnabled = (tracingEnabled) => {
|
|
|
91002
91914
|
return !!envVars.find((envVar) => getLangSmithEnvironmentVariable(envVar) === "true");
|
|
91003
91915
|
};
|
|
91004
91916
|
|
|
91005
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
91917
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/singletons/traceable.mjs
|
|
91006
91918
|
class MockAsyncLocalStorage {
|
|
91007
91919
|
getStore() {
|
|
91008
91920
|
return;
|
|
@@ -91038,7 +91950,7 @@ var ROOT = Symbol.for("langsmith:traceable:root");
|
|
|
91038
91950
|
function isTraceableFunction(x) {
|
|
91039
91951
|
return typeof x === "function" && "langsmith:traceable" in x;
|
|
91040
91952
|
}
|
|
91041
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
91953
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/env.mjs
|
|
91042
91954
|
var globalEnv;
|
|
91043
91955
|
var isBrowser2 = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
91044
91956
|
var isWebWorker2 = () => typeof globalThis === "object" && globalThis.constructor && globalThis.constructor.name === "DedicatedWorkerGlobalScope";
|
|
@@ -91214,7 +92126,7 @@ function resolveTracingMode(configValue) {
|
|
|
91214
92126
|
return "langsmith";
|
|
91215
92127
|
}
|
|
91216
92128
|
|
|
91217
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
92129
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/address.mjs
|
|
91218
92130
|
var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
91219
92131
|
var AGENT_ID_PATTERN = /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
91220
92132
|
var ENVIRONMENTS = ["local", "development", "staging", "production"];
|
|
@@ -91295,12 +92207,13 @@ function envNames() {
|
|
|
91295
92207
|
return ENV_NAMES;
|
|
91296
92208
|
}
|
|
91297
92209
|
|
|
91298
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
92210
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/singletons/constants.mjs
|
|
91299
92211
|
var _LC_CONTEXT_VARIABLES_KEY = Symbol.for("lc:context_variables");
|
|
91300
92212
|
var _LC_CHILD_RUN_END_PROMISES_KEY = Symbol.for("lc:child_run_end_promises");
|
|
92213
|
+
var _LC_RUN_OUTPUT_PROCESSING_STARTED_KEY = Symbol.for("lc:run_output_processing_started");
|
|
91301
92214
|
var _REPLICA_TRACE_ROOTS_KEY = Symbol.for("langsmith:replica_trace_roots");
|
|
91302
92215
|
|
|
91303
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
92216
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/context_vars.mjs
|
|
91304
92217
|
function getContextVar(runTree, key) {
|
|
91305
92218
|
if (_LC_CONTEXT_VARIABLES_KEY in runTree) {
|
|
91306
92219
|
const contextVars = runTree[_LC_CONTEXT_VARIABLES_KEY];
|
|
@@ -91314,7 +92227,7 @@ function setContextVar(runTree, key, value) {
|
|
|
91314
92227
|
runTree[_LC_CONTEXT_VARIABLES_KEY] = contextVars;
|
|
91315
92228
|
}
|
|
91316
92229
|
|
|
91317
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
92230
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/run_trees.mjs
|
|
91318
92231
|
var TIMESTAMP_LENGTH = 36;
|
|
91319
92232
|
var UUID_NAMESPACE_DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
91320
92233
|
function getReplicaKey(replica) {
|
|
@@ -93862,13 +94775,13 @@ var singletons_exports = /* @__PURE__ */ __exportAll3({
|
|
|
93862
94775
|
_CONTEXT_VARIABLES_KEY: () => _CONTEXT_VARIABLES_KEY
|
|
93863
94776
|
});
|
|
93864
94777
|
|
|
93865
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
94778
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/node.js
|
|
93866
94779
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
93867
94780
|
function initializeAsyncLocalStorageSingleton() {
|
|
93868
94781
|
AsyncLocalStorageProviderSingleton2.initializeGlobalInstance(new AsyncLocalStorage2);
|
|
93869
94782
|
}
|
|
93870
94783
|
|
|
93871
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
94784
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/utils/timeout.js
|
|
93872
94785
|
function _coerceTimeoutMs(value, field) {
|
|
93873
94786
|
if (value === undefined || value === null)
|
|
93874
94787
|
return;
|
|
@@ -93894,7 +94807,7 @@ function coerceTimeoutPolicy(value) {
|
|
|
93894
94807
|
};
|
|
93895
94808
|
}
|
|
93896
94809
|
|
|
93897
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
94810
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/constants.js
|
|
93898
94811
|
var START = "__start__";
|
|
93899
94812
|
var END = "__end__";
|
|
93900
94813
|
var INPUT = "__input__";
|
|
@@ -94135,7 +95048,7 @@ function _deserializeCommandSendObjectGraph(x, seen = /* @__PURE__ */ new Map) {
|
|
|
94135
95048
|
return x;
|
|
94136
95049
|
}
|
|
94137
95050
|
|
|
94138
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
95051
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/errors.js
|
|
94139
95052
|
var BaseLangGraphError = class extends Error {
|
|
94140
95053
|
lc_error_code;
|
|
94141
95054
|
constructor(message, fields) {
|
|
@@ -94338,7 +95251,7 @@ var StateGraphInputError = class extends BaseLangGraphError {
|
|
|
94338
95251
|
}
|
|
94339
95252
|
};
|
|
94340
95253
|
|
|
94341
|
-
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.
|
|
95254
|
+
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.1+06022994db45fac4/node_modules/@langchain/langgraph-checkpoint/dist/id.js
|
|
94342
95255
|
var lastMsecs = 0;
|
|
94343
95256
|
var lastNsecs = 0;
|
|
94344
95257
|
function uuid6(clockseq) {
|
|
@@ -94363,7 +95276,7 @@ function uuid5(name, namespace) {
|
|
|
94363
95276
|
return v52(name, new Uint8Array(namespaceBytes));
|
|
94364
95277
|
}
|
|
94365
95278
|
|
|
94366
|
-
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.
|
|
95279
|
+
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.1+06022994db45fac4/node_modules/@langchain/langgraph-checkpoint/dist/serde/types.js
|
|
94367
95280
|
var ERROR3 = "__error__";
|
|
94368
95281
|
var SCHEDULED = "__scheduled__";
|
|
94369
95282
|
var INTERRUPT2 = "__interrupt__";
|
|
@@ -94379,7 +95292,7 @@ function isDeltaSnapshot(value) {
|
|
|
94379
95292
|
return value != null && typeof value === "object" && value.lg_name === "DeltaSnapshot";
|
|
94380
95293
|
}
|
|
94381
95294
|
|
|
94382
|
-
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.
|
|
95295
|
+
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.1+06022994db45fac4/node_modules/@langchain/langgraph-checkpoint/dist/serde/utils/fast-safe-stringify/index.js
|
|
94383
95296
|
var LIMIT_REPLACE_NODE2 = "[...]";
|
|
94384
95297
|
var CIRCULAR_REPLACE_NODE2 = "[Circular]";
|
|
94385
95298
|
var arr2 = [];
|
|
@@ -97016,7 +97929,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
|
97016
97929
|
addErrorMessage(res, key, errorMessage, refs);
|
|
97017
97930
|
}
|
|
97018
97931
|
|
|
97019
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
97932
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/helpers/util.js
|
|
97020
97933
|
var util;
|
|
97021
97934
|
(function(util) {
|
|
97022
97935
|
util.assertEqual = (_) => {};
|
|
@@ -97147,7 +98060,7 @@ var getParsedType = (data) => {
|
|
|
97147
98060
|
}
|
|
97148
98061
|
};
|
|
97149
98062
|
|
|
97150
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98063
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/ZodError.js
|
|
97151
98064
|
var ZodIssueCode2 = util.arrayToEnum([
|
|
97152
98065
|
"invalid_type",
|
|
97153
98066
|
"invalid_literal",
|
|
@@ -97276,7 +98189,7 @@ ZodError.create = (issues) => {
|
|
|
97276
98189
|
return error;
|
|
97277
98190
|
};
|
|
97278
98191
|
|
|
97279
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98192
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/locales/en.js
|
|
97280
98193
|
var errorMap = (issue, _ctx) => {
|
|
97281
98194
|
let message;
|
|
97282
98195
|
switch (issue.code) {
|
|
@@ -97379,13 +98292,13 @@ var errorMap = (issue, _ctx) => {
|
|
|
97379
98292
|
};
|
|
97380
98293
|
var en_default2 = errorMap;
|
|
97381
98294
|
|
|
97382
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98295
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/errors.js
|
|
97383
98296
|
var overrideErrorMap = en_default2;
|
|
97384
98297
|
function getErrorMap() {
|
|
97385
98298
|
return overrideErrorMap;
|
|
97386
98299
|
}
|
|
97387
98300
|
|
|
97388
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98301
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/helpers/parseUtil.js
|
|
97389
98302
|
var makeIssue = (params) => {
|
|
97390
98303
|
const { data, path, errorMaps, issueData } = params;
|
|
97391
98304
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -97491,14 +98404,14 @@ var isDirty = (x) => x.status === "dirty";
|
|
|
97491
98404
|
var isValid = (x) => x.status === "valid";
|
|
97492
98405
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
97493
98406
|
|
|
97494
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98407
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/helpers/errorUtil.js
|
|
97495
98408
|
var errorUtil;
|
|
97496
98409
|
(function(errorUtil) {
|
|
97497
98410
|
errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
97498
98411
|
errorUtil.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
97499
98412
|
})(errorUtil || (errorUtil = {}));
|
|
97500
98413
|
|
|
97501
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98414
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/types.js
|
|
97502
98415
|
class ParseInputLazyPath {
|
|
97503
98416
|
constructor(parent, value, path, key) {
|
|
97504
98417
|
this._cachedPath = [];
|
|
@@ -111722,7 +112635,7 @@ function isFunction(object) {
|
|
|
111722
112635
|
function typeStr(obj) {
|
|
111723
112636
|
return isArray2(obj) ? "array" : typeof obj;
|
|
111724
112637
|
}
|
|
111725
|
-
function
|
|
112638
|
+
function escapeRegExp2(string) {
|
|
111726
112639
|
return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
111727
112640
|
}
|
|
111728
112641
|
function hasProperty(obj, propName) {
|
|
@@ -111786,9 +112699,9 @@ function parseTemplate(template, tags) {
|
|
|
111786
112699
|
tagsToCompile = tagsToCompile.split(spaceRe, 2);
|
|
111787
112700
|
if (!isArray2(tagsToCompile) || tagsToCompile.length !== 2)
|
|
111788
112701
|
throw new Error("Invalid tags: " + tagsToCompile);
|
|
111789
|
-
openingTagRe = new RegExp(
|
|
111790
|
-
closingTagRe = new RegExp("\\s*" +
|
|
111791
|
-
closingCurlyRe = new RegExp("\\s*" +
|
|
112702
|
+
openingTagRe = new RegExp(escapeRegExp2(tagsToCompile[0]) + "\\s*");
|
|
112703
|
+
closingTagRe = new RegExp("\\s*" + escapeRegExp2(tagsToCompile[1]));
|
|
112704
|
+
closingCurlyRe = new RegExp("\\s*" + escapeRegExp2("}" + tagsToCompile[1]));
|
|
111792
112705
|
}
|
|
111793
112706
|
compileTags(tags || mustache.tags);
|
|
111794
112707
|
var scanner = new Scanner(template);
|
|
@@ -116411,7 +117324,7 @@ async function load(text, options) {
|
|
|
116411
117324
|
return reviver.call(context, json);
|
|
116412
117325
|
}
|
|
116413
117326
|
|
|
116414
|
-
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.
|
|
117327
|
+
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.1+06022994db45fac4/node_modules/@langchain/langgraph-checkpoint/dist/serde/jsonplus.js
|
|
116415
117328
|
function isLangChainSerializedObject(value) {
|
|
116416
117329
|
return value !== null && value.lc === 1 && value.type === "constructor" && Array.isArray(value.id);
|
|
116417
117330
|
}
|
|
@@ -116551,7 +117464,7 @@ var JsonPlusSerializer = class {
|
|
|
116551
117464
|
}
|
|
116552
117465
|
};
|
|
116553
117466
|
|
|
116554
|
-
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.
|
|
117467
|
+
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.1+06022994db45fac4/node_modules/@langchain/langgraph-checkpoint/dist/base.js
|
|
116555
117468
|
function deepCopy(obj) {
|
|
116556
117469
|
if (typeof obj !== "object" || obj === null)
|
|
116557
117470
|
return obj;
|
|
@@ -116640,14 +117553,14 @@ var EXCLUDED_METADATA_KEYS = new Set([
|
|
|
116640
117553
|
"langgraph_checkpoint_ns"
|
|
116641
117554
|
]);
|
|
116642
117555
|
|
|
116643
|
-
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.
|
|
117556
|
+
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.1+06022994db45fac4/node_modules/@langchain/langgraph-checkpoint/dist/memory.js
|
|
116644
117557
|
var POLLUTION_KEYS = new Set([
|
|
116645
117558
|
"__proto__",
|
|
116646
117559
|
"constructor",
|
|
116647
117560
|
"prototype"
|
|
116648
117561
|
]);
|
|
116649
117562
|
|
|
116650
|
-
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.
|
|
117563
|
+
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.1+06022994db45fac4/node_modules/@langchain/langgraph-checkpoint/dist/store/base.js
|
|
116651
117564
|
var InvalidNamespaceError = class extends Error {
|
|
116652
117565
|
constructor(message) {
|
|
116653
117566
|
super(message);
|
|
@@ -116665,6 +117578,10 @@ function validateNamespace(namespace, options = {}) {
|
|
|
116665
117578
|
throw new InvalidNamespaceError(`Invalid namespace label '${label}' found in ${namespace}. Namespace labels must be strings, but got ${typeof label}.`);
|
|
116666
117579
|
if (label.includes("."))
|
|
116667
117580
|
throw new InvalidNamespaceError(`Invalid namespace label '${label}' found in ${namespace}. Namespace labels cannot contain periods ('.').`);
|
|
117581
|
+
if (label.includes(":"))
|
|
117582
|
+
throw new InvalidNamespaceError(`Invalid namespace label '${label}'. Namespace labels cannot contain colons (':').`);
|
|
117583
|
+
if (label.includes("\x00"))
|
|
117584
|
+
throw new InvalidNamespaceError("Namespace labels cannot contain NUL bytes.");
|
|
116668
117585
|
if (label === "")
|
|
116669
117586
|
throw new InvalidNamespaceError(`Namespace labels cannot be empty strings. Got ${label} in ${namespace}`);
|
|
116670
117587
|
}
|
|
@@ -116750,7 +117667,7 @@ var BaseStore2 = class {
|
|
|
116750
117667
|
stop() {}
|
|
116751
117668
|
};
|
|
116752
117669
|
|
|
116753
|
-
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.
|
|
117670
|
+
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.1+06022994db45fac4/node_modules/@langchain/langgraph-checkpoint/dist/store/batch.js
|
|
116754
117671
|
var extractStore = (input) => {
|
|
116755
117672
|
if ("lg_name" in input && input.lg_name === "AsyncBatchedStore")
|
|
116756
117673
|
return input.store;
|
|
@@ -116870,7 +117787,7 @@ var AsyncBatchedStore = class extends BaseStore2 {
|
|
|
116870
117787
|
}
|
|
116871
117788
|
};
|
|
116872
117789
|
|
|
116873
|
-
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.
|
|
117790
|
+
// ../../node_modules/.bun/@langchain+langgraph-checkpoint@1.2.1+06022994db45fac4/node_modules/@langchain/langgraph-checkpoint/dist/cache/base.js
|
|
116874
117791
|
var BaseCache2 = class {
|
|
116875
117792
|
serde = new JsonPlusSerializer;
|
|
116876
117793
|
constructor(serde) {
|
|
@@ -116878,7 +117795,7 @@ var BaseCache2 = class {
|
|
|
116878
117795
|
}
|
|
116879
117796
|
};
|
|
116880
117797
|
|
|
116881
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
117798
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/channels/base.js
|
|
116882
117799
|
var STRUCTURED_UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
116883
117800
|
function isDeltaChannel(channel) {
|
|
116884
117801
|
return channel != null && channel.lc_graph_name === "DeltaChannel";
|
|
@@ -117121,7 +118038,7 @@ async function channelsFromCheckpoint(specs, checkpoint, options) {
|
|
|
117121
118038
|
return channels;
|
|
117122
118039
|
}
|
|
117123
118040
|
|
|
117124
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118041
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/channels/binop.js
|
|
117125
118042
|
var isBinaryOperatorAggregate = (value) => {
|
|
117126
118043
|
return value != null && value.lc_graph_name === "BinaryOperatorAggregate";
|
|
117127
118044
|
};
|
|
@@ -117190,7 +118107,7 @@ var BinaryOperatorAggregate = class BinaryOperatorAggregate extends BaseChannel
|
|
|
117190
118107
|
}
|
|
117191
118108
|
};
|
|
117192
118109
|
|
|
117193
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118110
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/channels/last_value.js
|
|
117194
118111
|
var LastValue = class LastValue extends BaseChannel {
|
|
117195
118112
|
lc_graph_name = "LastValue";
|
|
117196
118113
|
value = [];
|
|
@@ -117278,7 +118195,7 @@ var LastValueAfterFinish = class LastValueAfterFinish extends BaseChannel {
|
|
|
117278
118195
|
}
|
|
117279
118196
|
};
|
|
117280
118197
|
|
|
117281
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118198
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/graph/annotation.js
|
|
117282
118199
|
var AnnotationRoot = class {
|
|
117283
118200
|
lc_graph_name = "AnnotationRoot";
|
|
117284
118201
|
spec;
|
|
@@ -117304,7 +118221,7 @@ function getChannel(reducer) {
|
|
|
117304
118221
|
return new LastValue;
|
|
117305
118222
|
}
|
|
117306
118223
|
|
|
117307
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118224
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/utils/config.js
|
|
117308
118225
|
var COPIABLE_KEYS = [
|
|
117309
118226
|
"tags",
|
|
117310
118227
|
"metadata",
|
|
@@ -117483,7 +118400,7 @@ function getParentCheckpointNamespace(namespace) {
|
|
|
117483
118400
|
return parts.slice(0, -1).join("|");
|
|
117484
118401
|
}
|
|
117485
118402
|
|
|
117486
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118403
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/callbacks.js
|
|
117487
118404
|
var GRAPH_CALLBACK_HANDLER = Symbol.for("langgraph.graph_callback_handler");
|
|
117488
118405
|
var GraphCallbackHandler = class extends BaseCallbackHandler {
|
|
117489
118406
|
name = "GraphCallbackHandler";
|
|
@@ -117493,7 +118410,7 @@ var GraphCallbackHandler = class extends BaseCallbackHandler {
|
|
|
117493
118410
|
}
|
|
117494
118411
|
};
|
|
117495
118412
|
|
|
117496
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118413
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/runtime.js
|
|
117497
118414
|
var RunControl = class {
|
|
117498
118415
|
#drainReason = undefined;
|
|
117499
118416
|
requestDrain(reason = "shutdown") {
|
|
@@ -117507,7 +118424,7 @@ var RunControl = class {
|
|
|
117507
118424
|
}
|
|
117508
118425
|
};
|
|
117509
118426
|
|
|
117510
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118427
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/graph/messages_reducer.js
|
|
117511
118428
|
var MESSAGE_CLASS_BY_TYPE = {
|
|
117512
118429
|
human: HumanMessage,
|
|
117513
118430
|
ai: AIMessage,
|
|
@@ -117611,7 +118528,7 @@ function isMessagesDeltaReducer(reducer) {
|
|
|
117611
118528
|
return typeof reducer === "function" && reducer[MESSAGES_DELTA_REDUCER] === true;
|
|
117612
118529
|
}
|
|
117613
118530
|
|
|
117614
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118531
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/convert.js
|
|
117615
118532
|
var STREAM_EVENTS_V3_MODES = [
|
|
117616
118533
|
"values",
|
|
117617
118534
|
"updates",
|
|
@@ -117796,7 +118713,7 @@ function convertUpdatesPayload(payload) {
|
|
|
117796
118713
|
};
|
|
117797
118714
|
}
|
|
117798
118715
|
|
|
117799
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118716
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/stream-channel.js
|
|
117800
118717
|
var STREAM_CHANNEL_BRAND = Symbol.for("langgraph.stream_channel");
|
|
117801
118718
|
var StreamChannel = class StreamChannel {
|
|
117802
118719
|
[STREAM_CHANNEL_BRAND] = true;
|
|
@@ -117920,7 +118837,7 @@ function isStreamChannel(value) {
|
|
|
117920
118837
|
return StreamChannel.isInstance(value);
|
|
117921
118838
|
}
|
|
117922
118839
|
|
|
117923
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
118840
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/mux.js
|
|
117924
118841
|
var EXTENSION_CHANNEL_PREFIX = "custom:";
|
|
117925
118842
|
function extensionChannelMethod(channelName) {
|
|
117926
118843
|
return `${EXTENSION_CHANNEL_PREFIX}${channelName}`;
|
|
@@ -118123,7 +119040,7 @@ function hasPrefix(ns, prefix) {
|
|
|
118123
119040
|
return true;
|
|
118124
119041
|
}
|
|
118125
119042
|
|
|
118126
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
119043
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/transformers/lifecycle.js
|
|
118127
119044
|
function filterLifecycleEntries(log, path, startAt = 0) {
|
|
118128
119045
|
return { [Symbol.asyncIterator]() {
|
|
118129
119046
|
const base = log.iterate(startAt);
|
|
@@ -118508,7 +119425,7 @@ function createLifecycleTransformer(options = {}) {
|
|
|
118508
119425
|
};
|
|
118509
119426
|
}
|
|
118510
119427
|
|
|
118511
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
119428
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/transformers/messages.js
|
|
118512
119429
|
function getMessageStreamKey(data) {
|
|
118513
119430
|
const record = data;
|
|
118514
119431
|
if (typeof record.run_id === "string")
|
|
@@ -118600,7 +119517,7 @@ function createMessagesTransformer(path, nodeFilter) {
|
|
|
118600
119517
|
};
|
|
118601
119518
|
}
|
|
118602
119519
|
|
|
118603
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
119520
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/transformers/subgraphs.js
|
|
118604
119521
|
function filterSubgraphHandles(log, path, startAt = 0) {
|
|
118605
119522
|
const targetDepth = path.length + 1;
|
|
118606
119523
|
return { [Symbol.asyncIterator]() {
|
|
@@ -118654,7 +119571,7 @@ function createSubgraphDiscoveryTransformer(mux, options) {
|
|
|
118654
119571
|
};
|
|
118655
119572
|
}
|
|
118656
119573
|
|
|
118657
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
119574
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/transformers/values.js
|
|
118658
119575
|
function createValuesTransformer(path) {
|
|
118659
119576
|
const valuesLog = StreamChannel.local();
|
|
118660
119577
|
return {
|
|
@@ -118678,12 +119595,12 @@ function createValuesTransformer(path) {
|
|
|
118678
119595
|
};
|
|
118679
119596
|
}
|
|
118680
119597
|
|
|
118681
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
119598
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/types.js
|
|
118682
119599
|
function isNativeTransformer(t) {
|
|
118683
119600
|
return "__native" in t && t.__native === true;
|
|
118684
119601
|
}
|
|
118685
119602
|
|
|
118686
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
119603
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/run-stream.js
|
|
118687
119604
|
var SET_VALUES_LOG = Symbol("setValuesLog");
|
|
118688
119605
|
var SET_MESSAGES_ITERABLE = Symbol("setMessagesIterable");
|
|
118689
119606
|
var SET_LIFECYCLE_ITERABLE = Symbol("setLifecycleIterable");
|
|
@@ -118875,7 +119792,7 @@ function createGraphRunStream(source, transformers = [], optionsOrAbortControlle
|
|
|
118875
119792
|
return root;
|
|
118876
119793
|
}
|
|
118877
119794
|
|
|
118878
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
119795
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/stream/subscription.js
|
|
118879
119796
|
var SUPPORTED_CHANNELS = new Set([
|
|
118880
119797
|
"values",
|
|
118881
119798
|
"updates",
|
|
@@ -118888,7 +119805,7 @@ var SUPPORTED_CHANNELS = new Set([
|
|
|
118888
119805
|
"custom"
|
|
118889
119806
|
]);
|
|
118890
119807
|
|
|
118891
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
119808
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/hash.js
|
|
118892
119809
|
var n2 = (n) => BigInt(n);
|
|
118893
119810
|
var view = (data, offset = 0) => new DataView(data.buffer, data.byteOffset + offset, data.byteLength - offset);
|
|
118894
119811
|
var PRIME32_12 = n2("0x9E3779B1");
|
|
@@ -119159,7 +120076,7 @@ function isXXH3(value) {
|
|
|
119159
120076
|
return /^[0-9a-f]{32}$/.test(value);
|
|
119160
120077
|
}
|
|
119161
120078
|
|
|
119162
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120079
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/interrupt.js
|
|
119163
120080
|
function interrupt(value, options) {
|
|
119164
120081
|
const config = AsyncLocalStorageProviderSingleton2.getRunnableConfig();
|
|
119165
120082
|
if (!config)
|
|
@@ -119207,7 +120124,7 @@ function interrupt(value, options) {
|
|
|
119207
120124
|
throw new GraphInterrupt([pending]);
|
|
119208
120125
|
}
|
|
119209
120126
|
|
|
119210
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120127
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/utils.js
|
|
119211
120128
|
var RunnableCallable = class extends Runnable {
|
|
119212
120129
|
lc_namespace = ["langgraph"];
|
|
119213
120130
|
func;
|
|
@@ -119291,7 +120208,7 @@ function isGeneratorFunction(val) {
|
|
|
119291
120208
|
return val != null && typeof val === "function" && val instanceof Object.getPrototypeOf(function* () {}).constructor;
|
|
119292
120209
|
}
|
|
119293
120210
|
|
|
119294
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120211
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/write.js
|
|
119295
120212
|
function _isSkipWrite(x) {
|
|
119296
120213
|
return typeof x === "object" && x?.[Symbol.for("LG_SKIP_WRITE")] !== undefined;
|
|
119297
120214
|
}
|
|
@@ -119388,7 +120305,7 @@ function _isChannelWriteTupleEntry(x) {
|
|
|
119388
120305
|
return x !== undefined && !_isChannelWriteEntry(x) && Runnable.isRunnable(x.mapper);
|
|
119389
120306
|
}
|
|
119390
120307
|
|
|
119391
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120308
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/read.js
|
|
119392
120309
|
var ChannelRead = class ChannelRead extends RunnableCallable {
|
|
119393
120310
|
lc_graph_name = "ChannelRead";
|
|
119394
120311
|
channel;
|
|
@@ -119556,7 +120473,7 @@ var PregelNode = class PregelNode extends RunnableBinding {
|
|
|
119556
120473
|
}
|
|
119557
120474
|
};
|
|
119558
120475
|
|
|
119559
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120476
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/utils/subgraph.js
|
|
119560
120477
|
function isRunnableSequence(x) {
|
|
119561
120478
|
return "steps" in x && Array.isArray(x.steps);
|
|
119562
120479
|
}
|
|
@@ -119572,7 +120489,7 @@ function findSubgraphPregel(candidate) {
|
|
|
119572
120489
|
candidates.push(...candidate.steps);
|
|
119573
120490
|
}
|
|
119574
120491
|
|
|
119575
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120492
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/callbacks.js
|
|
119576
120493
|
function getGraphCallbackDispatcher(manager) {
|
|
119577
120494
|
const handlers = manager?.handlers.filter(GraphCallbackHandler.isInstance);
|
|
119578
120495
|
if (!handlers?.length)
|
|
@@ -119597,7 +120514,7 @@ function getGraphCallbackDispatcher(manager) {
|
|
|
119597
120514
|
};
|
|
119598
120515
|
}
|
|
119599
120516
|
|
|
119600
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120517
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/checkpoint.js
|
|
119601
120518
|
function advanceDeltaCounters(channels, updatedChannels, counters) {
|
|
119602
120519
|
const next = {};
|
|
119603
120520
|
for (const name in channels) {
|
|
@@ -119646,7 +120563,7 @@ async function checkpointSuperseded(saver, config, saved) {
|
|
|
119646
120563
|
return latest !== undefined && latest.checkpoint.id !== saved.checkpoint.id;
|
|
119647
120564
|
}
|
|
119648
120565
|
|
|
119649
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120566
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/io.js
|
|
119650
120567
|
function readChannel(channels, chan, catchErrors = true, returnException = false) {
|
|
119651
120568
|
try {
|
|
119652
120569
|
return channels[chan].get();
|
|
@@ -119794,7 +120711,7 @@ function* mapOutputUpdates(outputChannels, tasks, cached) {
|
|
|
119794
120711
|
yield flattened;
|
|
119795
120712
|
}
|
|
119796
120713
|
|
|
119797
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120714
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/utils/index.js
|
|
119798
120715
|
function getNullChannelVersion(currentVersions) {
|
|
119799
120716
|
const startVersion = typeof currentVersions[START];
|
|
119800
120717
|
if (startVersion === "number")
|
|
@@ -119879,7 +120796,7 @@ function combineAbortSignals(...x) {
|
|
|
119879
120796
|
};
|
|
119880
120797
|
}
|
|
119881
120798
|
|
|
119882
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120799
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/types.js
|
|
119883
120800
|
var Call = class {
|
|
119884
120801
|
func;
|
|
119885
120802
|
name;
|
|
@@ -119903,7 +120820,7 @@ function isCall(value) {
|
|
|
119903
120820
|
return typeof value === "object" && value !== null && "__lg_type" in value && value.__lg_type === "call";
|
|
119904
120821
|
}
|
|
119905
120822
|
|
|
119906
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120823
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/call.js
|
|
119907
120824
|
function getRunnableForFunc(name, func) {
|
|
119908
120825
|
return new RunnableSequence({
|
|
119909
120826
|
name,
|
|
@@ -119930,7 +120847,7 @@ function getRunnableForEntrypoint(name, func) {
|
|
|
119930
120847
|
});
|
|
119931
120848
|
}
|
|
119932
120849
|
|
|
119933
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
120850
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/algo.js
|
|
119934
120851
|
var increment = (current) => {
|
|
119935
120852
|
return current !== undefined ? current + 1 : 1;
|
|
119936
120853
|
};
|
|
@@ -120728,7 +121645,7 @@ function _scratchpad({ pendingWrites, taskId, currentTaskInput, resumeMap, names
|
|
|
120728
121645
|
return scratchpad;
|
|
120729
121646
|
}
|
|
120730
121647
|
|
|
120731
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
121648
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/debug.js
|
|
120732
121649
|
var COLORS_MAP = {
|
|
120733
121650
|
blue: {
|
|
120734
121651
|
start: "\x1B[34m",
|
|
@@ -120928,7 +121845,7 @@ function printStepWrites(step, writes, whitelist) {
|
|
|
120928
121845
|
].join(""));
|
|
120929
121846
|
}
|
|
120930
121847
|
|
|
120931
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
121848
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/stream.js
|
|
120932
121849
|
var IterableReadableStreamWithAbortSignal = class extends IterableReadableStream {
|
|
120933
121850
|
_abortController;
|
|
120934
121851
|
_innerReader;
|
|
@@ -121206,7 +122123,7 @@ function createDuplexStream(...streams) {
|
|
|
121206
122123
|
});
|
|
121207
122124
|
}
|
|
121208
122125
|
|
|
121209
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
122126
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/replay.js
|
|
121210
122127
|
var ReplayState = class {
|
|
121211
122128
|
checkpointId;
|
|
121212
122129
|
#visitedNs = /* @__PURE__ */ new Set;
|
|
@@ -121234,7 +122151,7 @@ var ReplayState = class {
|
|
|
121234
122151
|
}
|
|
121235
122152
|
};
|
|
121236
122153
|
|
|
121237
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
122154
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/loop.js
|
|
121238
122155
|
var INPUT_DONE = Symbol.for("INPUT_DONE");
|
|
121239
122156
|
var INPUT_RESUMING = Symbol.for("INPUT_RESUMING");
|
|
121240
122157
|
var DEFAULT_LOOP_LIMIT = 25;
|
|
@@ -122366,7 +123283,7 @@ var PregelLoop = class PregelLoop {
|
|
|
122366
123283
|
}
|
|
122367
123284
|
};
|
|
122368
123285
|
|
|
122369
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
123286
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/messages.js
|
|
122370
123287
|
function isChatGenerationChunk2(x) {
|
|
122371
123288
|
return isBaseMessage(x?.message);
|
|
122372
123289
|
}
|
|
@@ -122490,7 +123407,7 @@ var StreamMessagesHandler = class extends BaseCallbackHandler {
|
|
|
122490
123407
|
}
|
|
122491
123408
|
};
|
|
122492
123409
|
|
|
122493
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
123410
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/messages-v2.js
|
|
122494
123411
|
function getResponseMetadata(message) {
|
|
122495
123412
|
if ("response_metadata" in message && typeof message.response_metadata === "object" && message.response_metadata != null)
|
|
122496
123413
|
return message.response_metadata;
|
|
@@ -122743,7 +123660,7 @@ var StreamProtocolMessagesHandler = class extends BaseCallbackHandler {
|
|
|
122743
123660
|
}
|
|
122744
123661
|
};
|
|
122745
123662
|
|
|
122746
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
123663
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/timeout.js
|
|
122747
123664
|
var TimedAttemptScope = class {
|
|
122748
123665
|
active = true;
|
|
122749
123666
|
lastProgress = Date.now();
|
|
@@ -122925,7 +123842,7 @@ async function runAttemptWithTimeout(task, config, policy, invoke) {
|
|
|
122925
123842
|
});
|
|
122926
123843
|
}
|
|
122927
123844
|
|
|
122928
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
123845
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/retry.js
|
|
122929
123846
|
var DEFAULT_STATUS_NO_RETRY = [
|
|
122930
123847
|
400,
|
|
122931
123848
|
401,
|
|
@@ -123032,7 +123949,7 @@ async function _runWithRetry(pregelTask, retryPolicy, configurable, signal) {
|
|
|
123032
123949
|
};
|
|
123033
123950
|
}
|
|
123034
123951
|
|
|
123035
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
123952
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/runner.js
|
|
123036
123953
|
var PROMISE_ADDED_SYMBOL = Symbol.for("promiseAdded");
|
|
123037
123954
|
function createPromiseBarrier() {
|
|
123038
123955
|
const barrier = {
|
|
@@ -123271,7 +124188,7 @@ async function call(runner, task, func, name, input, options = {}) {
|
|
|
123271
124188
|
}
|
|
123272
124189
|
}
|
|
123273
124190
|
|
|
123274
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
124191
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/validate.js
|
|
123275
124192
|
var GraphValidationError = class extends Error {
|
|
123276
124193
|
constructor(message) {
|
|
123277
124194
|
super(message);
|
|
@@ -123330,7 +124247,7 @@ function validateKeys(keys, channels) {
|
|
|
123330
124247
|
throw new Error(`Key ${String(keys)} not found in channels`);
|
|
123331
124248
|
}
|
|
123332
124249
|
|
|
123333
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
124250
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/channels/topic.js
|
|
123334
124251
|
function isUniqueTopicCheckpoint(checkpoint) {
|
|
123335
124252
|
return Array.isArray(checkpoint) && checkpoint.length === 2 && Array.isArray(checkpoint[0]) && Array.isArray(checkpoint[1]);
|
|
123336
124253
|
}
|
|
@@ -123400,7 +124317,7 @@ var Topic = class Topic extends BaseChannel {
|
|
|
123400
124317
|
}
|
|
123401
124318
|
};
|
|
123402
124319
|
|
|
123403
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
124320
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/pregel/index.js
|
|
123404
124321
|
function protocolEventsToEventStream(run) {
|
|
123405
124322
|
const encoder = new TextEncoder;
|
|
123406
124323
|
return new ReadableStream({ async start(controller) {
|
|
@@ -124541,7 +125458,7 @@ function _getTracingMetadataDefaults(config) {
|
|
|
124541
125458
|
return Object.keys(metadata).length > 0 ? metadata : undefined;
|
|
124542
125459
|
}
|
|
124543
125460
|
|
|
124544
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
125461
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/channels/ephemeral_value.js
|
|
124545
125462
|
var EphemeralValue = class EphemeralValue extends BaseChannel {
|
|
124546
125463
|
lc_graph_name = "EphemeralValue";
|
|
124547
125464
|
guard;
|
|
@@ -124582,7 +125499,7 @@ var EphemeralValue = class EphemeralValue extends BaseChannel {
|
|
|
124582
125499
|
}
|
|
124583
125500
|
};
|
|
124584
125501
|
|
|
124585
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
125502
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/graph/graph.js
|
|
124586
125503
|
var Branch = class {
|
|
124587
125504
|
path;
|
|
124588
125505
|
ends;
|
|
@@ -125095,7 +126012,7 @@ function addImplicitTerminalEndEdges(nodes, discovered, addEdge) {
|
|
|
125095
126012
|
}
|
|
125096
126013
|
}
|
|
125097
126014
|
|
|
125098
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126015
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/state/types.js
|
|
125099
126016
|
function isStandardSchema4(schema) {
|
|
125100
126017
|
return typeof schema === "object" && schema !== null && "~standard" in schema && typeof schema["~standard"] === "object" && schema["~standard"] !== null && "validate" in schema["~standard"];
|
|
125101
126018
|
}
|
|
@@ -125103,7 +126020,7 @@ function isStandardJSONSchema(schema) {
|
|
|
125103
126020
|
return typeof schema === "object" && schema !== null && "~standard" in schema && typeof schema["~standard"] === "object" && schema["~standard"] !== null && "jsonSchema" in schema["~standard"];
|
|
125104
126021
|
}
|
|
125105
126022
|
|
|
125106
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126023
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/state/adapter.js
|
|
125107
126024
|
function getJsonSchemaFromSchema(schema) {
|
|
125108
126025
|
if (isStandardJSONSchema(schema))
|
|
125109
126026
|
try {
|
|
@@ -125129,7 +126046,7 @@ function getSchemaDefaultGetter(schema) {
|
|
|
125129
126046
|
} catch {}
|
|
125130
126047
|
}
|
|
125131
126048
|
|
|
125132
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126049
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/channels/delta.js
|
|
125133
126050
|
var isDeltaChannel2 = (value) => {
|
|
125134
126051
|
return value != null && value.lc_graph_name === "DeltaChannel";
|
|
125135
126052
|
};
|
|
@@ -125218,7 +126135,7 @@ var DeltaChannel = class DeltaChannel extends BaseChannel {
|
|
|
125218
126135
|
}
|
|
125219
126136
|
};
|
|
125220
126137
|
|
|
125221
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126138
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/channels/untracked_value.js
|
|
125222
126139
|
var MISSING = Symbol.for("langgraph.channel.missing");
|
|
125223
126140
|
var UntrackedValueChannel = class UntrackedValueChannel extends BaseChannel {
|
|
125224
126141
|
lc_graph_name = "UntrackedValue";
|
|
@@ -125257,7 +126174,7 @@ var UntrackedValueChannel = class UntrackedValueChannel extends BaseChannel {
|
|
|
125257
126174
|
}
|
|
125258
126175
|
};
|
|
125259
126176
|
|
|
125260
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126177
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/state/values/reduced.js
|
|
125261
126178
|
var REDUCED_VALUE_SYMBOL = Symbol.for("langgraph.state.reduced_value");
|
|
125262
126179
|
var ReducedValue = class {
|
|
125263
126180
|
[REDUCED_VALUE_SYMBOL] = true;
|
|
@@ -125277,7 +126194,7 @@ var ReducedValue = class {
|
|
|
125277
126194
|
}
|
|
125278
126195
|
};
|
|
125279
126196
|
|
|
125280
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126197
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/state/values/untracked.js
|
|
125281
126198
|
var UNTRACKED_VALUE_SYMBOL = Symbol.for("langgraph.state.untracked_value");
|
|
125282
126199
|
var UntrackedValue = class {
|
|
125283
126200
|
[UNTRACKED_VALUE_SYMBOL] = true;
|
|
@@ -125292,7 +126209,7 @@ var UntrackedValue = class {
|
|
|
125292
126209
|
}
|
|
125293
126210
|
};
|
|
125294
126211
|
|
|
125295
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126212
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/state/values/delta.js
|
|
125296
126213
|
var DELTA_VALUE_SYMBOL = Symbol.for("langgraph.state.delta_value");
|
|
125297
126214
|
var DeltaValue = class {
|
|
125298
126215
|
[DELTA_VALUE_SYMBOL] = true;
|
|
@@ -125313,7 +126230,7 @@ var DeltaValue = class {
|
|
|
125313
126230
|
}
|
|
125314
126231
|
};
|
|
125315
126232
|
|
|
125316
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126233
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/channels/named_barrier_value.js
|
|
125317
126234
|
var areSetsEqual = (a, b) => a.size === b.size && [...a].every((value) => b.has(value));
|
|
125318
126235
|
var NamedBarrierValue = class NamedBarrierValue extends BaseChannel {
|
|
125319
126236
|
lc_graph_name = "NamedBarrierValue";
|
|
@@ -125417,7 +126334,7 @@ var NamedBarrierValueAfterFinish = class NamedBarrierValueAfterFinish extends Ba
|
|
|
125417
126334
|
}
|
|
125418
126335
|
};
|
|
125419
126336
|
|
|
125420
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126337
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/state/schema.js
|
|
125421
126338
|
var STATE_SCHEMA_SYMBOL = Symbol.for("langgraph.state.state_schema");
|
|
125422
126339
|
var StateSchema = class {
|
|
125423
126340
|
[STATE_SCHEMA_SYMBOL] = true;
|
|
@@ -125553,7 +126470,7 @@ var StateSchema = class {
|
|
|
125553
126470
|
}
|
|
125554
126471
|
};
|
|
125555
126472
|
|
|
125556
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126473
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/state/prebuilt/messages.js
|
|
125557
126474
|
var messagesValueSchema = custom().default(() => []);
|
|
125558
126475
|
var messagesInputSchema = custom();
|
|
125559
126476
|
var MessagesValue = new ReducedValue(messagesValueSchema, {
|
|
@@ -125573,7 +126490,7 @@ var MessagesDeltaValue = new DeltaValue(messagesValueSchema, {
|
|
|
125573
126490
|
}
|
|
125574
126491
|
});
|
|
125575
126492
|
|
|
125576
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126493
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/graph/zod/meta.js
|
|
125577
126494
|
var SchemaMetaRegistry = class {
|
|
125578
126495
|
_map = /* @__PURE__ */ new Map;
|
|
125579
126496
|
_extensionCache = /* @__PURE__ */ new Map;
|
|
@@ -125653,7 +126570,7 @@ function withLangGraph(schema, meta) {
|
|
|
125653
126570
|
}
|
|
125654
126571
|
}
|
|
125655
126572
|
|
|
125656
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126573
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/graph/types.js
|
|
125657
126574
|
function isStateDefinitionInit(value) {
|
|
125658
126575
|
if (value == null)
|
|
125659
126576
|
return false;
|
|
@@ -125683,7 +126600,7 @@ function isStateGraphInit(value) {
|
|
|
125683
126600
|
return true;
|
|
125684
126601
|
}
|
|
125685
126602
|
|
|
125686
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
126603
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/graph/state.js
|
|
125687
126604
|
var ROOT2 = "__root__";
|
|
125688
126605
|
var DEFAULT_ERROR_HANDLER_NODE = "__default_error_handler__";
|
|
125689
126606
|
var PartialStateSchema = Symbol.for("langgraph.state.partial");
|
|
@@ -126321,7 +127238,7 @@ function _getControlBranch() {
|
|
|
126321
127238
|
}) });
|
|
126322
127239
|
}
|
|
126323
127240
|
|
|
126324
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
127241
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/func/index.js
|
|
126325
127242
|
var entrypoint = function entrypoint(optionsOrName, func) {
|
|
126326
127243
|
const { name, checkpointer, store, cache } = typeof optionsOrName === "string" ? {
|
|
126327
127244
|
name: optionsOrName,
|
|
@@ -126388,7 +127305,7 @@ entrypoint.final = function final({ value, save }) {
|
|
|
126388
127305
|
};
|
|
126389
127306
|
};
|
|
126390
127307
|
|
|
126391
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
127308
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/graph/messages_annotation.js
|
|
126392
127309
|
var MessagesAnnotation = Annotation.Root({ messages: Annotation({
|
|
126393
127310
|
reducer: messagesStateReducer,
|
|
126394
127311
|
default: () => []
|
|
@@ -126400,7 +127317,7 @@ var MessagesZodMeta = {
|
|
|
126400
127317
|
};
|
|
126401
127318
|
var MessagesZodState = objectType({ messages: withLangGraph(custom2(), MessagesZodMeta) });
|
|
126402
127319
|
|
|
126403
|
-
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+
|
|
127320
|
+
// ../../node_modules/.bun/@langchain+langgraph@1.5.1+e9c3a36be84e4c7c/node_modules/@langchain/langgraph/dist/index.js
|
|
126404
127321
|
initializeAsyncLocalStorageSingleton();
|
|
126405
127322
|
|
|
126406
127323
|
// ../../packages/core/src/chief/coordinator-graph.ts
|
|
@@ -129288,7 +130205,7 @@ import { isDeepStrictEqual } from "node:util";
|
|
|
129288
130205
|
import { createHash as createHash23, randomBytes as randomBytes3 } from "node:crypto";
|
|
129289
130206
|
import { createClient as createClient2 } from "@libsql/client";
|
|
129290
130207
|
|
|
129291
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130208
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/entity.js
|
|
129292
130209
|
var entityKind = Symbol.for("drizzle:entityKind");
|
|
129293
130210
|
var hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
|
|
129294
130211
|
function is(value, type) {
|
|
@@ -129313,7 +130230,7 @@ function is(value, type) {
|
|
|
129313
130230
|
return false;
|
|
129314
130231
|
}
|
|
129315
130232
|
|
|
129316
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130233
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/column.js
|
|
129317
130234
|
class Column {
|
|
129318
130235
|
constructor(table, config) {
|
|
129319
130236
|
this.table = table;
|
|
@@ -129363,7 +130280,7 @@ class Column {
|
|
|
129363
130280
|
}
|
|
129364
130281
|
}
|
|
129365
130282
|
|
|
129366
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130283
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/column-builder.js
|
|
129367
130284
|
class ColumnBuilder {
|
|
129368
130285
|
static [entityKind] = "ColumnBuilder";
|
|
129369
130286
|
config;
|
|
@@ -129419,21 +130336,21 @@ class ColumnBuilder {
|
|
|
129419
130336
|
}
|
|
129420
130337
|
}
|
|
129421
130338
|
|
|
129422
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130339
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/table.utils.js
|
|
129423
130340
|
var TableName = Symbol.for("drizzle:Name");
|
|
129424
130341
|
|
|
129425
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130342
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/tracing-utils.js
|
|
129426
130343
|
function iife4(fn, ...args) {
|
|
129427
130344
|
return fn(...args);
|
|
129428
130345
|
}
|
|
129429
130346
|
|
|
129430
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130347
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/pg-core/columns/enum.js
|
|
129431
130348
|
var isPgEnumSym = Symbol.for("drizzle:isPgEnum");
|
|
129432
130349
|
function isPgEnum(obj) {
|
|
129433
130350
|
return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
|
|
129434
130351
|
}
|
|
129435
130352
|
|
|
129436
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130353
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/subquery.js
|
|
129437
130354
|
class Subquery {
|
|
129438
130355
|
static [entityKind] = "Subquery";
|
|
129439
130356
|
constructor(sql, fields, alias, isWith = false, usedTables = []) {
|
|
@@ -129452,10 +130369,10 @@ class WithSubquery extends Subquery {
|
|
|
129452
130369
|
static [entityKind] = "WithSubquery";
|
|
129453
130370
|
}
|
|
129454
130371
|
|
|
129455
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130372
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/version.js
|
|
129456
130373
|
var version4 = "0.45.4";
|
|
129457
130374
|
|
|
129458
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130375
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/tracing.js
|
|
129459
130376
|
var otel;
|
|
129460
130377
|
var rawTracer;
|
|
129461
130378
|
var tracer = {
|
|
@@ -129482,10 +130399,10 @@ var tracer = {
|
|
|
129482
130399
|
}
|
|
129483
130400
|
};
|
|
129484
130401
|
|
|
129485
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130402
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/view-common.js
|
|
129486
130403
|
var ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
|
129487
130404
|
|
|
129488
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130405
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/table.js
|
|
129489
130406
|
var Schema2 = Symbol.for("drizzle:Schema");
|
|
129490
130407
|
var Columns = Symbol.for("drizzle:Columns");
|
|
129491
130408
|
var ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns");
|
|
@@ -129529,7 +130446,7 @@ function getTableUniqueName(table) {
|
|
|
129529
130446
|
return `${table[Schema2] ?? "public"}.${table[TableName]}`;
|
|
129530
130447
|
}
|
|
129531
130448
|
|
|
129532
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130449
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sql/sql.js
|
|
129533
130450
|
function isSQLWrapper(value) {
|
|
129534
130451
|
return value !== null && value !== undefined && typeof value.getSQL === "function";
|
|
129535
130452
|
}
|
|
@@ -129909,7 +130826,7 @@ Subquery.prototype.getSQL = function() {
|
|
|
129909
130826
|
return new SQL([this]);
|
|
129910
130827
|
};
|
|
129911
130828
|
|
|
129912
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130829
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/alias.js
|
|
129913
130830
|
class ColumnAliasProxyHandler {
|
|
129914
130831
|
constructor(table) {
|
|
129915
130832
|
this.table = table;
|
|
@@ -129988,7 +130905,7 @@ function mapColumnsInSQLToAlias(query, alias) {
|
|
|
129988
130905
|
}));
|
|
129989
130906
|
}
|
|
129990
130907
|
|
|
129991
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130908
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/errors.js
|
|
129992
130909
|
class DrizzleError extends Error {
|
|
129993
130910
|
static [entityKind] = "DrizzleError";
|
|
129994
130911
|
constructor({ message, cause }) {
|
|
@@ -130018,7 +130935,7 @@ class TransactionRollbackError extends DrizzleError {
|
|
|
130018
130935
|
}
|
|
130019
130936
|
}
|
|
130020
130937
|
|
|
130021
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130938
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/logger.js
|
|
130022
130939
|
class ConsoleLogWriter {
|
|
130023
130940
|
static [entityKind] = "ConsoleLogWriter";
|
|
130024
130941
|
write(message) {
|
|
@@ -130050,7 +130967,7 @@ class NoopLogger {
|
|
|
130050
130967
|
logQuery() {}
|
|
130051
130968
|
}
|
|
130052
130969
|
|
|
130053
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130970
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/query-promise.js
|
|
130054
130971
|
class QueryPromise {
|
|
130055
130972
|
static [entityKind] = "QueryPromise";
|
|
130056
130973
|
[Symbol.toStringTag] = "QueryPromise";
|
|
@@ -130071,7 +130988,7 @@ class QueryPromise {
|
|
|
130071
130988
|
}
|
|
130072
130989
|
}
|
|
130073
130990
|
|
|
130074
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130991
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/utils.js
|
|
130075
130992
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
130076
130993
|
const nullifyMap = {};
|
|
130077
130994
|
const result = columns.reduce((result2, { path, field }, columnIndex) => {
|
|
@@ -130225,7 +131142,7 @@ function isConfig(data) {
|
|
|
130225
131142
|
}
|
|
130226
131143
|
var textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder;
|
|
130227
131144
|
|
|
130228
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131145
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/pg-core/table.js
|
|
130229
131146
|
var InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
|
130230
131147
|
var EnableRLS = Symbol.for("drizzle:EnableRLS");
|
|
130231
131148
|
|
|
@@ -130241,7 +131158,7 @@ class PgTable extends Table {
|
|
|
130241
131158
|
[Table.Symbol.ExtraConfigColumns] = {};
|
|
130242
131159
|
}
|
|
130243
131160
|
|
|
130244
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131161
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/pg-core/primary-keys.js
|
|
130245
131162
|
class PrimaryKeyBuilder {
|
|
130246
131163
|
static [entityKind] = "PgPrimaryKeyBuilder";
|
|
130247
131164
|
columns;
|
|
@@ -130269,7 +131186,7 @@ class PrimaryKey {
|
|
|
130269
131186
|
}
|
|
130270
131187
|
}
|
|
130271
131188
|
|
|
130272
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131189
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sql/expressions/conditions.js
|
|
130273
131190
|
function bindIfParam(value, column) {
|
|
130274
131191
|
if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
|
|
130275
131192
|
return new Param(value, column);
|
|
@@ -130374,7 +131291,7 @@ function notIlike(column, value) {
|
|
|
130374
131291
|
return sql`${column} not ilike ${value}`;
|
|
130375
131292
|
}
|
|
130376
131293
|
|
|
130377
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131294
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sql/expressions/select.js
|
|
130378
131295
|
function asc(column) {
|
|
130379
131296
|
return sql`${column} asc`;
|
|
130380
131297
|
}
|
|
@@ -130382,7 +131299,7 @@ function desc(column) {
|
|
|
130382
131299
|
return sql`${column} desc`;
|
|
130383
131300
|
}
|
|
130384
131301
|
|
|
130385
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131302
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/relations.js
|
|
130386
131303
|
class Relation {
|
|
130387
131304
|
constructor(sourceTable, referencedTable, relationName) {
|
|
130388
131305
|
this.sourceTable = sourceTable;
|
|
@@ -130602,10 +131519,10 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
|
130602
131519
|
return result;
|
|
130603
131520
|
}
|
|
130604
131521
|
|
|
130605
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131522
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/libsql/driver.js
|
|
130606
131523
|
import { createClient } from "@libsql/client";
|
|
130607
131524
|
|
|
130608
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131525
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/selection-proxy.js
|
|
130609
131526
|
class SelectionProxyHandler {
|
|
130610
131527
|
static [entityKind] = "SelectionProxyHandler";
|
|
130611
131528
|
config;
|
|
@@ -130657,7 +131574,7 @@ class SelectionProxyHandler {
|
|
|
130657
131574
|
}
|
|
130658
131575
|
}
|
|
130659
131576
|
|
|
130660
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131577
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/foreign-keys.js
|
|
130661
131578
|
class ForeignKeyBuilder {
|
|
130662
131579
|
static [entityKind] = "SQLiteForeignKeyBuilder";
|
|
130663
131580
|
reference;
|
|
@@ -130725,12 +131642,12 @@ function foreignKey(config) {
|
|
|
130725
131642
|
return new ForeignKeyBuilder(mappedConfig);
|
|
130726
131643
|
}
|
|
130727
131644
|
|
|
130728
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131645
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/unique-constraint.js
|
|
130729
131646
|
function uniqueKeyName(table, columns) {
|
|
130730
131647
|
return `${table[TableName]}_${columns.join("_")}_unique`;
|
|
130731
131648
|
}
|
|
130732
131649
|
|
|
130733
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131650
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/columns/common.js
|
|
130734
131651
|
class SQLiteColumnBuilder extends ColumnBuilder {
|
|
130735
131652
|
static [entityKind] = "SQLiteColumnBuilder";
|
|
130736
131653
|
foreignKeyConfigs = [];
|
|
@@ -130781,7 +131698,7 @@ class SQLiteColumn extends Column {
|
|
|
130781
131698
|
static [entityKind] = "SQLiteColumn";
|
|
130782
131699
|
}
|
|
130783
131700
|
|
|
130784
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131701
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/columns/blob.js
|
|
130785
131702
|
class SQLiteBigIntBuilder extends SQLiteColumnBuilder {
|
|
130786
131703
|
static [entityKind] = "SQLiteBigIntBuilder";
|
|
130787
131704
|
constructor(name) {
|
|
@@ -130869,7 +131786,7 @@ function blob(a, b) {
|
|
|
130869
131786
|
return new SQLiteBlobBufferBuilder(name);
|
|
130870
131787
|
}
|
|
130871
131788
|
|
|
130872
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131789
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/columns/custom.js
|
|
130873
131790
|
class SQLiteCustomColumnBuilder extends SQLiteColumnBuilder {
|
|
130874
131791
|
static [entityKind] = "SQLiteCustomColumnBuilder";
|
|
130875
131792
|
constructor(name, fieldConfig, customTypeParams) {
|
|
@@ -130910,7 +131827,7 @@ function customType(customTypeParams) {
|
|
|
130910
131827
|
};
|
|
130911
131828
|
}
|
|
130912
131829
|
|
|
130913
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131830
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/columns/integer.js
|
|
130914
131831
|
class SQLiteBaseIntegerBuilder extends SQLiteColumnBuilder {
|
|
130915
131832
|
static [entityKind] = "SQLiteBaseIntegerBuilder";
|
|
130916
131833
|
constructor(name, dataType, columnType) {
|
|
@@ -131012,7 +131929,7 @@ function integer3(a, b) {
|
|
|
131012
131929
|
return new SQLiteIntegerBuilder(name);
|
|
131013
131930
|
}
|
|
131014
131931
|
|
|
131015
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131932
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/columns/numeric.js
|
|
131016
131933
|
class SQLiteNumericBuilder extends SQLiteColumnBuilder {
|
|
131017
131934
|
static [entityKind] = "SQLiteNumericBuilder";
|
|
131018
131935
|
constructor(name) {
|
|
@@ -131082,7 +131999,7 @@ function numeric(a, b) {
|
|
|
131082
131999
|
return mode === "number" ? new SQLiteNumericNumberBuilder(name) : mode === "bigint" ? new SQLiteNumericBigIntBuilder(name) : new SQLiteNumericBuilder(name);
|
|
131083
132000
|
}
|
|
131084
132001
|
|
|
131085
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132002
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/columns/real.js
|
|
131086
132003
|
class SQLiteRealBuilder extends SQLiteColumnBuilder {
|
|
131087
132004
|
static [entityKind] = "SQLiteRealBuilder";
|
|
131088
132005
|
constructor(name) {
|
|
@@ -131103,7 +132020,7 @@ function real(name) {
|
|
|
131103
132020
|
return new SQLiteRealBuilder(name ?? "");
|
|
131104
132021
|
}
|
|
131105
132022
|
|
|
131106
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132023
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/columns/text.js
|
|
131107
132024
|
class SQLiteTextBuilder extends SQLiteColumnBuilder {
|
|
131108
132025
|
static [entityKind] = "SQLiteTextBuilder";
|
|
131109
132026
|
constructor(name, config) {
|
|
@@ -131158,7 +132075,7 @@ function text15(a, b = {}) {
|
|
|
131158
132075
|
return new SQLiteTextBuilder(name, config);
|
|
131159
132076
|
}
|
|
131160
132077
|
|
|
131161
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132078
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/columns/all.js
|
|
131162
132079
|
function getSQLiteColumnBuilders() {
|
|
131163
132080
|
return {
|
|
131164
132081
|
blob,
|
|
@@ -131170,7 +132087,7 @@ function getSQLiteColumnBuilders() {
|
|
|
131170
132087
|
};
|
|
131171
132088
|
}
|
|
131172
132089
|
|
|
131173
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132090
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/table.js
|
|
131174
132091
|
var InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
|
131175
132092
|
|
|
131176
132093
|
class SQLiteTable extends Table {
|
|
@@ -131204,7 +132121,7 @@ var sqliteTable = (name, columns, extraConfig) => {
|
|
|
131204
132121
|
return sqliteTableBase(name, columns, extraConfig);
|
|
131205
132122
|
};
|
|
131206
132123
|
|
|
131207
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132124
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/checks.js
|
|
131208
132125
|
class CheckBuilder {
|
|
131209
132126
|
constructor(name, value) {
|
|
131210
132127
|
this.name = name;
|
|
@@ -131231,7 +132148,7 @@ function check(name, value) {
|
|
|
131231
132148
|
return new CheckBuilder(name, value);
|
|
131232
132149
|
}
|
|
131233
132150
|
|
|
131234
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132151
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/indexes.js
|
|
131235
132152
|
class IndexBuilderOn {
|
|
131236
132153
|
constructor(name, unique) {
|
|
131237
132154
|
this.name = name;
|
|
@@ -131277,7 +132194,7 @@ function uniqueIndex(name) {
|
|
|
131277
132194
|
return new IndexBuilderOn(name, true);
|
|
131278
132195
|
}
|
|
131279
132196
|
|
|
131280
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132197
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/primary-keys.js
|
|
131281
132198
|
function primaryKey(...config) {
|
|
131282
132199
|
if (config[0].columns) {
|
|
131283
132200
|
return new PrimaryKeyBuilder2(config[0].columns, config[0].name);
|
|
@@ -131312,7 +132229,7 @@ class PrimaryKey2 {
|
|
|
131312
132229
|
}
|
|
131313
132230
|
}
|
|
131314
132231
|
|
|
131315
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132232
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/utils.js
|
|
131316
132233
|
function extractUsedTable(table) {
|
|
131317
132234
|
if (is(table, SQLiteTable)) {
|
|
131318
132235
|
return [`${table[Table.Symbol.BaseName]}`];
|
|
@@ -131326,7 +132243,7 @@ function extractUsedTable(table) {
|
|
|
131326
132243
|
return [];
|
|
131327
132244
|
}
|
|
131328
132245
|
|
|
131329
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132246
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/query-builders/delete.js
|
|
131330
132247
|
class SQLiteDeleteBase extends QueryPromise {
|
|
131331
132248
|
constructor(table, session, dialect, withList) {
|
|
131332
132249
|
super();
|
|
@@ -131396,7 +132313,7 @@ class SQLiteDeleteBase extends QueryPromise {
|
|
|
131396
132313
|
}
|
|
131397
132314
|
}
|
|
131398
132315
|
|
|
131399
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132316
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/casing.js
|
|
131400
132317
|
function toSnakeCase(input) {
|
|
131401
132318
|
const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? [];
|
|
131402
132319
|
return words.map((word) => word.toLowerCase()).join("_");
|
|
@@ -131449,12 +132366,12 @@ class CasingCache {
|
|
|
131449
132366
|
}
|
|
131450
132367
|
}
|
|
131451
132368
|
|
|
131452
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132369
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/view-base.js
|
|
131453
132370
|
class SQLiteViewBase extends View {
|
|
131454
132371
|
static [entityKind] = "SQLiteViewBase";
|
|
131455
132372
|
}
|
|
131456
132373
|
|
|
131457
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132374
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/dialect.js
|
|
131458
132375
|
class SQLiteDialect {
|
|
131459
132376
|
static [entityKind] = "SQLiteDialect";
|
|
131460
132377
|
casing;
|
|
@@ -132064,7 +132981,7 @@ class SQLiteAsyncDialect extends SQLiteDialect {
|
|
|
132064
132981
|
}
|
|
132065
132982
|
}
|
|
132066
132983
|
|
|
132067
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132984
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/query-builders/query-builder.js
|
|
132068
132985
|
class TypedQueryBuilder {
|
|
132069
132986
|
static [entityKind] = "TypedQueryBuilder";
|
|
132070
132987
|
getSelectedFields() {
|
|
@@ -132072,7 +132989,7 @@ class TypedQueryBuilder {
|
|
|
132072
132989
|
}
|
|
132073
132990
|
}
|
|
132074
132991
|
|
|
132075
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132992
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/query-builders/select.js
|
|
132076
132993
|
class SQLiteSelectBuilder {
|
|
132077
132994
|
static [entityKind] = "SQLiteSelectBuilder";
|
|
132078
132995
|
fields;
|
|
@@ -132370,7 +133287,7 @@ var unionAll = createSetOperator("union", true);
|
|
|
132370
133287
|
var intersect = createSetOperator("intersect", false);
|
|
132371
133288
|
var except = createSetOperator("except", false);
|
|
132372
133289
|
|
|
132373
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
133290
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/query-builders/query-builder.js
|
|
132374
133291
|
class QueryBuilder {
|
|
132375
133292
|
static [entityKind] = "SQLiteQueryBuilder";
|
|
132376
133293
|
dialect;
|
|
@@ -132429,7 +133346,7 @@ class QueryBuilder {
|
|
|
132429
133346
|
}
|
|
132430
133347
|
}
|
|
132431
133348
|
|
|
132432
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
133349
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/query-builders/insert.js
|
|
132433
133350
|
class SQLiteInsertBuilder {
|
|
132434
133351
|
constructor(table, session, dialect, withList) {
|
|
132435
133352
|
this.table = table;
|
|
@@ -132538,7 +133455,7 @@ class SQLiteInsertBase extends QueryPromise {
|
|
|
132538
133455
|
}
|
|
132539
133456
|
}
|
|
132540
133457
|
|
|
132541
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
133458
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/query-builders/update.js
|
|
132542
133459
|
class SQLiteUpdateBuilder {
|
|
132543
133460
|
constructor(table, session, dialect, withList) {
|
|
132544
133461
|
this.table = table;
|
|
@@ -132642,7 +133559,7 @@ class SQLiteUpdateBase extends QueryPromise {
|
|
|
132642
133559
|
}
|
|
132643
133560
|
}
|
|
132644
133561
|
|
|
132645
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
133562
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/query-builders/count.js
|
|
132646
133563
|
class SQLiteCountBuilder extends SQL {
|
|
132647
133564
|
constructor(params) {
|
|
132648
133565
|
super(SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
|
@@ -132677,7 +133594,7 @@ class SQLiteCountBuilder extends SQL {
|
|
|
132677
133594
|
}
|
|
132678
133595
|
}
|
|
132679
133596
|
|
|
132680
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
133597
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/query-builders/query.js
|
|
132681
133598
|
class RelationalQueryBuilder {
|
|
132682
133599
|
constructor(mode, fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session) {
|
|
132683
133600
|
this.mode = mode;
|
|
@@ -132771,7 +133688,7 @@ class SQLiteSyncRelationalQuery extends SQLiteRelationalQuery {
|
|
|
132771
133688
|
}
|
|
132772
133689
|
}
|
|
132773
133690
|
|
|
132774
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
133691
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/query-builders/raw.js
|
|
132775
133692
|
class SQLiteRaw extends QueryPromise {
|
|
132776
133693
|
constructor(execute, getSQL, action, dialect, mapBatchResult) {
|
|
132777
133694
|
super();
|
|
@@ -132797,7 +133714,7 @@ class SQLiteRaw extends QueryPromise {
|
|
|
132797
133714
|
}
|
|
132798
133715
|
}
|
|
132799
133716
|
|
|
132800
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
133717
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/db.js
|
|
132801
133718
|
class BaseSQLiteDatabase {
|
|
132802
133719
|
constructor(resultKind, dialect, session, schema) {
|
|
132803
133720
|
this.resultKind = resultKind;
|
|
@@ -132920,7 +133837,7 @@ class BaseSQLiteDatabase {
|
|
|
132920
133837
|
}
|
|
132921
133838
|
}
|
|
132922
133839
|
|
|
132923
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
133840
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/cache/core/cache.js
|
|
132924
133841
|
class Cache2 {
|
|
132925
133842
|
static [entityKind] = "Cache";
|
|
132926
133843
|
}
|
|
@@ -132946,7 +133863,7 @@ async function hashQuery(sql, params) {
|
|
|
132946
133863
|
return hashHex;
|
|
132947
133864
|
}
|
|
132948
133865
|
|
|
132949
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
133866
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/sqlite-core/session.js
|
|
132950
133867
|
class ExecuteResultSync extends QueryPromise {
|
|
132951
133868
|
constructor(resultCb) {
|
|
132952
133869
|
super();
|
|
@@ -133119,7 +134036,7 @@ class SQLiteTransaction extends BaseSQLiteDatabase {
|
|
|
133119
134036
|
}
|
|
133120
134037
|
}
|
|
133121
134038
|
|
|
133122
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
134039
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/libsql/session.js
|
|
133123
134040
|
class LibSQLSession extends SQLiteSession {
|
|
133124
134041
|
constructor(client, dialect, schema, options, tx) {
|
|
133125
134042
|
super(dialect);
|
|
@@ -133314,7 +134231,7 @@ function normalizeFieldValue(value) {
|
|
|
133314
134231
|
return value;
|
|
133315
134232
|
}
|
|
133316
134233
|
|
|
133317
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
134234
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/libsql/driver-core.js
|
|
133318
134235
|
class LibSQLDatabase extends BaseSQLiteDatabase {
|
|
133319
134236
|
static [entityKind] = "LibSQLDatabase";
|
|
133320
134237
|
async batch(batch) {
|
|
@@ -133348,7 +134265,7 @@ function construct(client, config = {}) {
|
|
|
133348
134265
|
return db;
|
|
133349
134266
|
}
|
|
133350
134267
|
|
|
133351
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
134268
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/libsql/driver.js
|
|
133352
134269
|
function drizzle(...params) {
|
|
133353
134270
|
if (typeof params[0] === "string") {
|
|
133354
134271
|
const instance = createClient({
|
|
@@ -133372,7 +134289,7 @@ function drizzle(...params) {
|
|
|
133372
134289
|
drizzle2.mock = mock;
|
|
133373
134290
|
})(drizzle || (drizzle = {}));
|
|
133374
134291
|
|
|
133375
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
134292
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/migrator.js
|
|
133376
134293
|
import crypto4 from "node:crypto";
|
|
133377
134294
|
import fs2 from "node:fs";
|
|
133378
134295
|
function readMigrationFiles(config) {
|
|
@@ -133404,7 +134321,7 @@ function readMigrationFiles(config) {
|
|
|
133404
134321
|
return migrationQueries;
|
|
133405
134322
|
}
|
|
133406
134323
|
|
|
133407
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
134324
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/libsql/migrator.js
|
|
133408
134325
|
async function migrate(db, config) {
|
|
133409
134326
|
const migrations = readMigrationFiles(config);
|
|
133410
134327
|
const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
|