agent-valley 3.0.4 → 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 +1385 -453
- 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();
|
|
@@ -15926,13 +15961,16 @@ function signalProcessTree(proc, signal) {
|
|
|
15926
15961
|
try {
|
|
15927
15962
|
proc.kill(signal);
|
|
15928
15963
|
} catch (handleError) {
|
|
15929
|
-
if (handleError.code === "EPERM" &&
|
|
15964
|
+
if (handleError.code === "EPERM" && rootAndGroupAbsent(proc.pid))
|
|
15930
15965
|
return;
|
|
15931
15966
|
throw handleError;
|
|
15932
15967
|
}
|
|
15933
15968
|
}
|
|
15934
15969
|
}
|
|
15935
15970
|
}
|
|
15971
|
+
function rootAndGroupAbsent(pid) {
|
|
15972
|
+
return absent(-pid) && absent(pid);
|
|
15973
|
+
}
|
|
15936
15974
|
function absent(pid) {
|
|
15937
15975
|
try {
|
|
15938
15976
|
process.kill(pid, 0);
|
|
@@ -16380,6 +16418,15 @@ function waitForReap(proc, timeoutMs) {
|
|
|
16380
16418
|
onExit();
|
|
16381
16419
|
});
|
|
16382
16420
|
}
|
|
16421
|
+
async function waitForRootAndGroupAbsence(pid, timeoutMs) {
|
|
16422
|
+
const deadline = Date.now() + Math.min(250, timeoutMs);
|
|
16423
|
+
while (Date.now() < deadline) {
|
|
16424
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(25, deadline - Date.now())));
|
|
16425
|
+
if (rootAndGroupAbsent(pid))
|
|
16426
|
+
return true;
|
|
16427
|
+
}
|
|
16428
|
+
return false;
|
|
16429
|
+
}
|
|
16383
16430
|
function waitForStreamCompletion(proc, graceMs = 250) {
|
|
16384
16431
|
return new Promise((resolve) => {
|
|
16385
16432
|
if (!proc.stdout) {
|
|
@@ -16540,6 +16587,7 @@ class BaseSession {
|
|
|
16540
16587
|
async terminateProcess(proc) {
|
|
16541
16588
|
if (!proc.pid)
|
|
16542
16589
|
return;
|
|
16590
|
+
const deadline = Date.now() + 5000;
|
|
16543
16591
|
let signalError;
|
|
16544
16592
|
try {
|
|
16545
16593
|
signalProcessTree(proc, "SIGKILL");
|
|
@@ -16548,13 +16596,15 @@ class BaseSession {
|
|
|
16548
16596
|
throw error;
|
|
16549
16597
|
signalError = error;
|
|
16550
16598
|
}
|
|
16551
|
-
if (!await waitForReap(proc,
|
|
16599
|
+
if (!await waitForReap(proc, Math.max(0, deadline - Date.now()))) {
|
|
16552
16600
|
throw signalError ?? new Error(`Agent process ${proc.pid} did not exit within 5000ms after SIGKILL; inspect it before retrying.`);
|
|
16553
16601
|
}
|
|
16554
16602
|
if (signalError) {
|
|
16555
16603
|
try {
|
|
16556
16604
|
signalProcessTree(proc, "SIGKILL");
|
|
16557
|
-
} catch {
|
|
16605
|
+
} catch (retryError) {
|
|
16606
|
+
if (retryError.code === "EPERM" && await waitForRootAndGroupAbsence(proc.pid, Math.max(0, deadline - Date.now())))
|
|
16607
|
+
return;
|
|
16558
16608
|
throw signalError;
|
|
16559
16609
|
}
|
|
16560
16610
|
}
|
|
@@ -19649,7 +19699,7 @@ var init_client_integrations = __esm(() => {
|
|
|
19649
19699
|
};
|
|
19650
19700
|
});
|
|
19651
19701
|
|
|
19652
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19702
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/buffer_utils.js
|
|
19653
19703
|
function concat(...buffers) {
|
|
19654
19704
|
const size = buffers.reduce((acc, { length }) => acc + length, 0), buf = new Uint8Array(size);
|
|
19655
19705
|
let i = 0;
|
|
@@ -19685,16 +19735,16 @@ function decodeBase64(encoded, url = false) {
|
|
|
19685
19735
|
bytes[i] = binary.charCodeAt(i);
|
|
19686
19736
|
return bytes;
|
|
19687
19737
|
}
|
|
19688
|
-
var encoder, decoder, strictDecoder,
|
|
19738
|
+
var encoder, decoder, strictDecoder, UINT32_RANGE, NON_ASCII;
|
|
19689
19739
|
var init_buffer_utils = __esm(() => {
|
|
19690
19740
|
encoder = new TextEncoder;
|
|
19691
19741
|
decoder = new TextDecoder;
|
|
19692
19742
|
strictDecoder = new TextDecoder("utf-8", { fatal: true });
|
|
19693
|
-
|
|
19743
|
+
UINT32_RANGE = 2 ** 32;
|
|
19694
19744
|
NON_ASCII = /[^\x00-\x7f]/;
|
|
19695
19745
|
});
|
|
19696
19746
|
|
|
19697
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19747
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/util/errors.js
|
|
19698
19748
|
var JOSEError, JWTClaimValidationFailed, JWTExpired, JOSEAlgNotAllowed, JOSENotSupported, JWSInvalid, JWTInvalid, JWKSInvalid, JWKSNoMatchingKey, JWKSMultipleMatchingKeys, JWKSTimeout, JWSSignatureVerificationFailed;
|
|
19699
19749
|
var init_errors3 = __esm(() => {
|
|
19700
19750
|
JOSEError = class JOSEError extends Error {
|
|
@@ -19775,7 +19825,7 @@ var init_errors3 = __esm(() => {
|
|
|
19775
19825
|
};
|
|
19776
19826
|
});
|
|
19777
19827
|
|
|
19778
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19828
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/util/base64url.js
|
|
19779
19829
|
function decode2(input) {
|
|
19780
19830
|
try {
|
|
19781
19831
|
return decodeBase64(typeof input == "string" ? input : decoder.decode(input), true);
|
|
@@ -19788,7 +19838,7 @@ var init_base64url = __esm(() => {
|
|
|
19788
19838
|
init_buffer_utils();
|
|
19789
19839
|
});
|
|
19790
19840
|
|
|
19791
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19841
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/validate.js
|
|
19792
19842
|
function isObject2(input) {
|
|
19793
19843
|
if (typeof input != "object" || input === null || Object.prototype.toString.call(input) !== "[object Object]")
|
|
19794
19844
|
return false;
|
|
@@ -19812,23 +19862,23 @@ function isDisjoint(...headers) {
|
|
|
19812
19862
|
function decodeBase64url(value, label, ErrorClass) {
|
|
19813
19863
|
try {
|
|
19814
19864
|
return decode2(value);
|
|
19815
|
-
} catch {
|
|
19816
|
-
throw new ErrorClass(`Failed to base64url decode the ${label}
|
|
19865
|
+
} catch (cause) {
|
|
19866
|
+
throw new ErrorClass(`Failed to base64url decode the ${label}`, { cause });
|
|
19817
19867
|
}
|
|
19818
19868
|
}
|
|
19819
|
-
function
|
|
19869
|
+
function encodeAsciiMember(value, label, ErrorClass) {
|
|
19820
19870
|
try {
|
|
19821
19871
|
return encode2(value);
|
|
19822
|
-
} catch {
|
|
19823
|
-
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 });
|
|
19824
19874
|
}
|
|
19825
19875
|
}
|
|
19826
|
-
function parseJoseHeader(
|
|
19876
|
+
function parseJoseHeader(encodedProtectedHeader, ErrorClass, message) {
|
|
19827
19877
|
let parsed;
|
|
19828
19878
|
try {
|
|
19829
|
-
parsed = JSON.parse(strictDecoder.decode(decode2(
|
|
19830
|
-
} catch {
|
|
19831
|
-
throw new ErrorClass(message);
|
|
19879
|
+
parsed = JSON.parse(strictDecoder.decode(decode2(encodedProtectedHeader)));
|
|
19880
|
+
} catch (cause) {
|
|
19881
|
+
throw new ErrorClass(message, { cause });
|
|
19832
19882
|
}
|
|
19833
19883
|
if (!isObject2(parsed))
|
|
19834
19884
|
throw new ErrorClass(message);
|
|
@@ -19874,17 +19924,17 @@ var init_validate = __esm(() => {
|
|
|
19874
19924
|
JWS_RECOGNIZED = { __proto__: null, b64: true };
|
|
19875
19925
|
});
|
|
19876
19926
|
|
|
19877
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
19927
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/key.js
|
|
19878
19928
|
async function prepareKey(entry, key, usage) {
|
|
19879
|
-
const { alg, secret } = entry,
|
|
19929
|
+
const { alg, secret } = entry, requiresPrivateKey = usage === "decrypt" || usage === "sign";
|
|
19880
19930
|
if (secret && key instanceof Uint8Array)
|
|
19881
19931
|
return key;
|
|
19882
19932
|
let normalized, keyObject;
|
|
19883
19933
|
if (isObject2(key)) {
|
|
19884
19934
|
if (normalized = normalizeJwk(key), typeof normalized.kty != "string")
|
|
19885
19935
|
throw invalidKeyType(alg, key, secret);
|
|
19886
|
-
if (!(secret ? normalized.kty === "oct" && typeof normalized.k == "string" : normalized.kty !== "oct" && (
|
|
19887
|
-
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`);
|
|
19888
19938
|
if (jwkMatchesOp(entry, normalized, usage), normalized.kty === "oct")
|
|
19889
19939
|
return decode2(normalized.k);
|
|
19890
19940
|
if (!Object.isFrozen(key)) {
|
|
@@ -19894,7 +19944,7 @@ async function prepareKey(entry, key, usage) {
|
|
|
19894
19944
|
} else {
|
|
19895
19945
|
if (!isKeyLike(key))
|
|
19896
19946
|
throw invalidKeyType(alg, key, secret);
|
|
19897
|
-
const expectedType = secret ? "secret" :
|
|
19947
|
+
const expectedType = secret ? "secret" : requiresPrivateKey ? "private" : "public";
|
|
19898
19948
|
if (key.type !== expectedType && (secret || ["secret", "public", "private"].includes(key.type)))
|
|
19899
19949
|
throw new TypeError(`${tag(key)} instances must be of type "${expectedType}" for the ${alg} algorithm`);
|
|
19900
19950
|
if (isCryptoKey(key))
|
|
@@ -20005,7 +20055,7 @@ var init_key = __esm(() => {
|
|
|
20005
20055
|
};
|
|
20006
20056
|
});
|
|
20007
20057
|
|
|
20008
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20058
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/key_descriptor.js
|
|
20009
20059
|
function table(entries) {
|
|
20010
20060
|
const out = { __proto__: null };
|
|
20011
20061
|
for (const alg in entries)
|
|
@@ -20014,7 +20064,7 @@ function table(entries) {
|
|
|
20014
20064
|
}
|
|
20015
20065
|
var init_key_descriptor = () => {};
|
|
20016
20066
|
|
|
20017
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20067
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/jws_algorithms.js
|
|
20018
20068
|
function hmac(bits) {
|
|
20019
20069
|
const subtle = { name: "HMAC", hash: `SHA-${bits}` };
|
|
20020
20070
|
return { kty: ["oct"], secret: true, subtle, signing: subtle, usages: sig };
|
|
@@ -20048,8 +20098,8 @@ function eddsa() {
|
|
|
20048
20098
|
usages: sig
|
|
20049
20099
|
};
|
|
20050
20100
|
}
|
|
20051
|
-
function mldsa(
|
|
20052
|
-
const subtle = { name: `ML-DSA-${
|
|
20101
|
+
function mldsa(parameterSet) {
|
|
20102
|
+
const subtle = { name: `ML-DSA-${parameterSet}` };
|
|
20053
20103
|
return {
|
|
20054
20104
|
kty: ["AKP"],
|
|
20055
20105
|
subtle,
|
|
@@ -20089,25 +20139,27 @@ var init_jws_algorithms = __esm(() => {
|
|
|
20089
20139
|
});
|
|
20090
20140
|
});
|
|
20091
20141
|
|
|
20092
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20142
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/jws_verify.js
|
|
20093
20143
|
function prepareVerify(options) {
|
|
20094
20144
|
return [options && validateAlgorithms("algorithms", options.algorithms), options?.crit];
|
|
20095
20145
|
}
|
|
20096
|
-
function parseProtectedHeader(
|
|
20097
|
-
return
|
|
20146
|
+
function parseProtectedHeader(encodedProtectedHeader) {
|
|
20147
|
+
return encodedProtectedHeader === undefined ? {} : parseJoseHeader(encodedProtectedHeader, JWSInvalid, "JWS Protected Header is invalid");
|
|
20098
20148
|
}
|
|
20099
20149
|
function encodeCompactUnencodedPayload(payload) {
|
|
20100
20150
|
try {
|
|
20101
20151
|
return encode2(payload);
|
|
20102
|
-
} catch {
|
|
20103
|
-
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
|
+
});
|
|
20104
20156
|
}
|
|
20105
20157
|
}
|
|
20106
20158
|
async function verifySignature(jws, shared, key, encodeUnencodedPayload, parsedProtected) {
|
|
20107
|
-
const { protected:
|
|
20108
|
-
if (!isDisjoint(
|
|
20159
|
+
const { protected: encodedProtectedHeader, header, payload: inputPayload } = jws, protectedHeader = parsedProtected ?? parseProtectedHeader(encodedProtectedHeader);
|
|
20160
|
+
if (!isDisjoint(protectedHeader, header))
|
|
20109
20161
|
throw new JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
|
|
20110
|
-
const joseHeader = { ...
|
|
20162
|
+
const joseHeader = { ...protectedHeader, ...header }, b64 = validateB64(protectedHeader, validateCrit(JWSInvalid, JWS_RECOGNIZED, shared[1], protectedHeader, joseHeader)), { alg } = joseHeader;
|
|
20111
20163
|
if (typeof alg != "string" || !alg)
|
|
20112
20164
|
throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
|
20113
20165
|
if (shared[0] && !shared[0].has(alg))
|
|
@@ -20119,17 +20171,19 @@ async function verifySignature(jws, shared, key, encodeUnencodedPayload, parsedP
|
|
|
20119
20171
|
throw new JWSInvalid("JWS Payload must be a string or an Uint8Array instance");
|
|
20120
20172
|
const signingPayload = b64 || typeof inputPayload != "string" ? inputPayload : encodeUnencodedPayload(inputPayload);
|
|
20121
20173
|
let resolvedKey = false;
|
|
20122
|
-
typeof key == "function" && (key = await key(
|
|
20123
|
-
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");
|
|
20124
20176
|
entry.minRsaBits && checkModulusLength(entry.alg, cryptoKey);
|
|
20125
20177
|
let verified = false;
|
|
20126
20178
|
try {
|
|
20127
|
-
verified = await crypto.subtle.verify(entry.signing, cryptoKey, signature,
|
|
20128
|
-
} catch {
|
|
20179
|
+
verified = await crypto.subtle.verify(entry.signing, cryptoKey, signature, signingInput);
|
|
20180
|
+
} catch (cause) {
|
|
20181
|
+
throw new JWSSignatureVerificationFailed(undefined, { cause });
|
|
20182
|
+
}
|
|
20129
20183
|
if (!verified)
|
|
20130
20184
|
throw new JWSSignatureVerificationFailed;
|
|
20131
20185
|
const result = { payload: typeof signingPayload == "string" ? decodeBase64url(signingPayload, "payload", JWSInvalid) : signingPayload };
|
|
20132
|
-
return
|
|
20186
|
+
return encodedProtectedHeader !== undefined && (result.protectedHeader = protectedHeader), header !== undefined && (result.unprotectedHeader = header), resolvedKey ? [{ ...result, key: verificationKey }, b64] : [result, b64];
|
|
20133
20187
|
}
|
|
20134
20188
|
async function verifyCompact(jws, shared, key) {
|
|
20135
20189
|
if (jws instanceof Uint8Array && (jws = decoder.decode(jws)), typeof jws != "string")
|
|
@@ -20147,7 +20201,7 @@ var init_jws_verify = __esm(() => {
|
|
|
20147
20201
|
init_key();
|
|
20148
20202
|
});
|
|
20149
20203
|
|
|
20150
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20204
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/lib/jwt_claims_set.js
|
|
20151
20205
|
function invalidDuration() {
|
|
20152
20206
|
throw new TypeError("Invalid time period format");
|
|
20153
20207
|
}
|
|
@@ -20155,41 +20209,43 @@ function secs(str) {
|
|
|
20155
20209
|
typeof str != "string" && invalidDuration();
|
|
20156
20210
|
const matched = REGEX.exec(str);
|
|
20157
20211
|
(!matched || matched[4] && matched[1]) && invalidDuration();
|
|
20158
|
-
const value = parseFloat(matched[2]),
|
|
20159
|
-
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;
|
|
20160
20214
|
}
|
|
20161
20215
|
function validateInput(label, input) {
|
|
20162
20216
|
if (!Number.isFinite(input))
|
|
20163
20217
|
throw new TypeError(`Invalid ${label} input`);
|
|
20164
20218
|
return input;
|
|
20165
20219
|
}
|
|
20166
|
-
function validateNumericDate(
|
|
20167
|
-
const value =
|
|
20220
|
+
function validateNumericDate(claimsSet, claim, required = false) {
|
|
20221
|
+
const value = claimsSet[claim];
|
|
20168
20222
|
if (!(value === undefined && !required)) {
|
|
20169
20223
|
if (typeof value != "number")
|
|
20170
|
-
throw new JWTClaimValidationFailed(`"${claim}" claim must be a number`,
|
|
20224
|
+
throw new JWTClaimValidationFailed(`"${claim}" claim must be a number`, claimsSet, claim, "invalid");
|
|
20171
20225
|
return value;
|
|
20172
20226
|
}
|
|
20173
20227
|
}
|
|
20174
|
-
function unexpectedClaim(
|
|
20175
|
-
throw new JWTClaimValidationFailed(`unexpected "${claim}" claim value`,
|
|
20228
|
+
function unexpectedClaim(claimsSet, claim) {
|
|
20229
|
+
throw new JWTClaimValidationFailed(`unexpected "${claim}" claim value`, claimsSet, claim, checkFailed);
|
|
20176
20230
|
}
|
|
20177
|
-
function validateClaimsSet(protectedHeader,
|
|
20178
|
-
let
|
|
20231
|
+
function validateClaimsSet(protectedHeader, claimsSetBytes, options = {}) {
|
|
20232
|
+
let claimsSet;
|
|
20179
20233
|
try {
|
|
20180
|
-
|
|
20181
|
-
} catch {
|
|
20182
|
-
|
|
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))
|
|
20183
20239
|
throw new JWTInvalid("JWT Claims Set must be a top-level JSON object");
|
|
20184
20240
|
const { typ } = options;
|
|
20185
20241
|
if (typ !== undefined && (typeof protectedHeader.typ != "string" || normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ)))
|
|
20186
|
-
throw new JWTClaimValidationFailed('unexpected "typ" JWT header value',
|
|
20242
|
+
throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', claimsSet, "typ", checkFailed);
|
|
20187
20243
|
const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options, presenceCheck = [...requiredClaims];
|
|
20188
20244
|
maxTokenAge !== undefined && presenceCheck.push("iat"), audience !== undefined && presenceCheck.push("aud"), subject !== undefined && presenceCheck.push("sub"), issuer !== undefined && presenceCheck.push("iss");
|
|
20189
20245
|
for (const claim of new Set(presenceCheck.reverse()))
|
|
20190
|
-
if (!Object.hasOwn(
|
|
20191
|
-
throw new JWTClaimValidationFailed(`missing required "${claim}" claim`,
|
|
20192
|
-
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");
|
|
20193
20249
|
const { clockTolerance } = options;
|
|
20194
20250
|
let tolerance = 0;
|
|
20195
20251
|
if (typeof clockTolerance == "string")
|
|
@@ -20200,20 +20256,20 @@ function validateClaimsSet(protectedHeader, encodedPayload, options = {}) {
|
|
|
20200
20256
|
tolerance = clockTolerance;
|
|
20201
20257
|
}
|
|
20202
20258
|
validateInput("clockTolerance option", tolerance);
|
|
20203
|
-
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");
|
|
20204
20260
|
if (nbf !== undefined && nbf > now + tolerance)
|
|
20205
|
-
throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed',
|
|
20206
|
-
const exp = validateNumericDate(
|
|
20261
|
+
throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', claimsSet, "nbf", checkFailed);
|
|
20262
|
+
const exp = validateNumericDate(claimsSet, "exp");
|
|
20207
20263
|
if (exp !== undefined && exp <= now - tolerance)
|
|
20208
|
-
throw new JWTExpired('"exp" claim timestamp check failed',
|
|
20264
|
+
throw new JWTExpired('"exp" claim timestamp check failed', claimsSet, "exp", checkFailed);
|
|
20209
20265
|
if (maxTokenAge !== undefined) {
|
|
20210
20266
|
const age = now - iat, max = validateInput("maxTokenAge option", typeof maxTokenAge == "number" ? maxTokenAge : secs(maxTokenAge));
|
|
20211
20267
|
if (age - tolerance > max)
|
|
20212
|
-
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);
|
|
20213
20269
|
if (age < -tolerance)
|
|
20214
|
-
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);
|
|
20215
20271
|
}
|
|
20216
|
-
return
|
|
20272
|
+
return claimsSet;
|
|
20217
20273
|
}
|
|
20218
20274
|
var epoch = (date) => Math.floor(date.getTime() / 1000), multipliers, REGEX, checkFailed = "check_failed", normalizeTyp = (value) => {
|
|
20219
20275
|
const normalized = value.toLowerCase();
|
|
@@ -20234,7 +20290,7 @@ var init_jwt_claims_set = __esm(() => {
|
|
|
20234
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;
|
|
20235
20291
|
});
|
|
20236
20292
|
|
|
20237
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20293
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/jwt/verify.js
|
|
20238
20294
|
async function jwtVerify(jwt, key, options) {
|
|
20239
20295
|
const [verified, b64] = await verifyCompact(jwt, prepareVerify(options), key);
|
|
20240
20296
|
if (!b64)
|
|
@@ -20248,7 +20304,7 @@ var init_verify = __esm(() => {
|
|
|
20248
20304
|
init_errors3();
|
|
20249
20305
|
});
|
|
20250
20306
|
|
|
20251
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20307
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/jwks/local.js
|
|
20252
20308
|
function isUsableJWK(jwk, entry, alg, kid) {
|
|
20253
20309
|
const { kty, key_ops: keyOps, ext, kid: jwkKid, alg: jwkAlg, use, crv } = jwk;
|
|
20254
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);
|
|
@@ -20271,7 +20327,9 @@ function createLocalJWKSet(jwks) {
|
|
|
20271
20327
|
let snapshot;
|
|
20272
20328
|
try {
|
|
20273
20329
|
snapshot = structuredClone(jwks);
|
|
20274
|
-
} catch {
|
|
20330
|
+
} catch (cause) {
|
|
20331
|
+
throw new JWKSInvalid("JSON Web Key Set malformed", { cause });
|
|
20332
|
+
}
|
|
20275
20333
|
if (!isJwkSet(snapshot))
|
|
20276
20334
|
throw new JWKSInvalid("JSON Web Key Set malformed");
|
|
20277
20335
|
const metadata = snapshot.keys.map((jwk) => {
|
|
@@ -20306,7 +20364,7 @@ var init_local = __esm(() => {
|
|
|
20306
20364
|
init_validate();
|
|
20307
20365
|
});
|
|
20308
20366
|
|
|
20309
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20367
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/jwks/remote.js
|
|
20310
20368
|
function isCloudflareWorkers() {
|
|
20311
20369
|
return typeof WebSocketPair < "u" || typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers" || typeof EdgeRuntime < "u" && EdgeRuntime === "vercel";
|
|
20312
20370
|
}
|
|
@@ -20317,14 +20375,14 @@ async function fetchJwks(url, headers, signal, fetchImpl = fetch) {
|
|
|
20317
20375
|
redirect: "manual",
|
|
20318
20376
|
headers
|
|
20319
20377
|
}).catch((err) => {
|
|
20320
|
-
throw err.name === "TimeoutError" ? new JWKSTimeout : err;
|
|
20378
|
+
throw err.name === "TimeoutError" ? new JWKSTimeout(undefined, { cause: err }) : err;
|
|
20321
20379
|
});
|
|
20322
20380
|
if (response.status !== 200)
|
|
20323
20381
|
throw new JOSEError("Expected 200 OK from the JSON Web Key Set HTTP response");
|
|
20324
20382
|
try {
|
|
20325
20383
|
return await response.json();
|
|
20326
|
-
} catch {
|
|
20327
|
-
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 });
|
|
20328
20386
|
}
|
|
20329
20387
|
}
|
|
20330
20388
|
function isFreshFor(timestamp, duration) {
|
|
@@ -20401,12 +20459,12 @@ var init_remote = __esm(() => {
|
|
|
20401
20459
|
init_errors3();
|
|
20402
20460
|
init_local();
|
|
20403
20461
|
init_validate();
|
|
20404
|
-
(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");
|
|
20405
20463
|
customFetch = /* @__PURE__ */ Symbol();
|
|
20406
20464
|
jwksCache = /* @__PURE__ */ Symbol();
|
|
20407
20465
|
});
|
|
20408
20466
|
|
|
20409
|
-
// ../../node_modules/.bun/jose@6.2.
|
|
20467
|
+
// ../../node_modules/.bun/jose@6.2.13/node_modules/jose/dist/webapi/index.js
|
|
20410
20468
|
var init_webapi = __esm(() => {
|
|
20411
20469
|
init_verify();
|
|
20412
20470
|
init_remote();
|
|
@@ -32995,9 +33053,160 @@ init_logger();
|
|
|
32995
33053
|
init_logger();
|
|
32996
33054
|
init_process_tree();
|
|
32997
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
|
|
32998
33186
|
var MAX_OUTPUT_LENGTH = 10240;
|
|
32999
33187
|
var DEFAULT_TIMEOUT_SEC = 600;
|
|
33000
|
-
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) => {
|
|
33001
33210
|
if (signal?.aborted) {
|
|
33002
33211
|
resolve({ exitCode: -1, output: "Verification cancelled.", timedOut: false, aborted: true });
|
|
33003
33212
|
return;
|
|
@@ -33006,9 +33215,10 @@ var defaultVerifyExec = (command, cwd, timeoutMs, signal, onSpawned) => new Prom
|
|
|
33006
33215
|
cwd,
|
|
33007
33216
|
shell: true,
|
|
33008
33217
|
detached: process.platform !== "win32",
|
|
33009
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
33218
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
33219
|
+
env: buildVerifyEnv(extraEnv)
|
|
33010
33220
|
});
|
|
33011
|
-
|
|
33221
|
+
const output = new BoundedProcessOutput(MAX_OUTPUT_LENGTH);
|
|
33012
33222
|
let timedOut = false;
|
|
33013
33223
|
let settled = false;
|
|
33014
33224
|
let aborted = false;
|
|
@@ -33023,7 +33233,7 @@ var defaultVerifyExec = (command, cwd, timeoutMs, signal, onSpawned) => new Prom
|
|
|
33023
33233
|
signal?.removeEventListener("abort", onAbort);
|
|
33024
33234
|
resolve({
|
|
33025
33235
|
exitCode: timedOut || aborted || registrationFailed ? -1 : code ?? -1,
|
|
33026
|
-
output,
|
|
33236
|
+
output: output.finish(),
|
|
33027
33237
|
timedOut,
|
|
33028
33238
|
...aborted ? { aborted: true } : {}
|
|
33029
33239
|
});
|
|
@@ -33044,7 +33254,7 @@ var defaultVerifyExec = (command, cwd, timeoutMs, signal, onSpawned) => new Prom
|
|
|
33044
33254
|
};
|
|
33045
33255
|
const onAbort = () => {
|
|
33046
33256
|
aborted = true;
|
|
33047
|
-
output
|
|
33257
|
+
output.append(`
|
|
33048
33258
|
Verification cancelled.`);
|
|
33049
33259
|
stopProcess();
|
|
33050
33260
|
};
|
|
@@ -33056,13 +33266,17 @@ Verification cancelled.`);
|
|
|
33056
33266
|
if (signal?.aborted)
|
|
33057
33267
|
onAbort();
|
|
33058
33268
|
proc.stdout?.on("data", (chunk) => {
|
|
33059
|
-
|
|
33269
|
+
if (!settled)
|
|
33270
|
+
output.write("stdout", chunk);
|
|
33060
33271
|
});
|
|
33061
33272
|
proc.stderr?.on("data", (chunk) => {
|
|
33062
|
-
|
|
33273
|
+
if (!settled)
|
|
33274
|
+
output.write("stderr", chunk);
|
|
33063
33275
|
});
|
|
33276
|
+
proc.stdout?.once("end", () => output.end("stdout"));
|
|
33277
|
+
proc.stderr?.once("end", () => output.end("stderr"));
|
|
33064
33278
|
proc.once("error", (err) => {
|
|
33065
|
-
output
|
|
33279
|
+
output.append(`
|
|
33066
33280
|
${String(err)}`);
|
|
33067
33281
|
finish(-1);
|
|
33068
33282
|
});
|
|
@@ -33074,8 +33288,8 @@ ${String(err)}`);
|
|
|
33074
33288
|
onSpawned?.(proc.pid);
|
|
33075
33289
|
} catch (error) {
|
|
33076
33290
|
registrationFailed = true;
|
|
33077
|
-
output
|
|
33078
|
-
|
|
33291
|
+
output.append(`
|
|
33292
|
+
${String(error)}`);
|
|
33079
33293
|
stopProcess();
|
|
33080
33294
|
}
|
|
33081
33295
|
});
|
|
@@ -33090,10 +33304,10 @@ async function runVerificationGate(workspace, command, opts = {}) {
|
|
|
33090
33304
|
return { ran: false, ok: true };
|
|
33091
33305
|
}
|
|
33092
33306
|
const exec = opts.exec ?? defaultVerifyExec;
|
|
33093
|
-
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);
|
|
33094
33308
|
const timeoutMs = timeoutSec * 1000;
|
|
33095
33309
|
logger.info("verification-gate", "Running verify_command", { workspacePath: workspace.path, command, timeoutSec });
|
|
33096
|
-
const result =
|
|
33310
|
+
const result = await exec(command, workspace.path, timeoutMs, opts.signal, opts.onSpawned, opts.extraEnv);
|
|
33097
33311
|
const output = boundOutput(result.output);
|
|
33098
33312
|
const ok = !result.timedOut && !result.aborted && !opts.signal?.aborted && result.exitCode === 0;
|
|
33099
33313
|
if (ok) {
|
|
@@ -33977,7 +34191,8 @@ async function execute(store, job, signal) {
|
|
|
33977
34191
|
verification = await runVerificationGate(input.workspace, job.verifyCommand, {
|
|
33978
34192
|
timeoutSec: job.timeoutSec,
|
|
33979
34193
|
signal,
|
|
33980
|
-
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 } } : {}
|
|
33981
34196
|
});
|
|
33982
34197
|
} catch (error) {
|
|
33983
34198
|
verificationFailure = error;
|
|
@@ -34480,7 +34695,7 @@ function declaredDialect(schema, remedy) {
|
|
|
34480
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}`);
|
|
34481
34696
|
}
|
|
34482
34697
|
|
|
34483
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
34698
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/index.js
|
|
34484
34699
|
init_external();
|
|
34485
34700
|
init_external();
|
|
34486
34701
|
|
|
@@ -52008,7 +52223,7 @@ async function startAvMcpStdio(api, options) {
|
|
|
52008
52223
|
import { timingSafeEqual } from "node:crypto";
|
|
52009
52224
|
import { createServer } from "node:http";
|
|
52010
52225
|
|
|
52011
|
-
// ../../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
|
|
52012
52227
|
import { Readable } from "stream";
|
|
52013
52228
|
import crypto2 from "crypto";
|
|
52014
52229
|
var GlobalRequest = global.Request;
|
|
@@ -54294,6 +54509,10 @@ init_zod();
|
|
|
54294
54509
|
init_zod();
|
|
54295
54510
|
var id3 = string2().regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$/);
|
|
54296
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
|
+
}));
|
|
54297
54516
|
var actorSchema = strictObject({
|
|
54298
54517
|
id: id3,
|
|
54299
54518
|
name: text7,
|
|
@@ -54301,14 +54520,14 @@ var actorSchema = strictObject({
|
|
|
54301
54520
|
actorType: text7.optional(),
|
|
54302
54521
|
agentType: text7.optional(),
|
|
54303
54522
|
model: text7.optional(),
|
|
54304
|
-
skills: array(
|
|
54523
|
+
skills: array(skillName).max(30)
|
|
54305
54524
|
}).superRefine((actor, ctx) => {
|
|
54306
54525
|
if (!actor.actorType && !actor.agentType)
|
|
54307
54526
|
ctx.addIssue({ code: "custom", path: ["actorType"], message: "Set actorType to the actor's native CLI type." });
|
|
54308
54527
|
if (actor.actorType && actor.agentType && actor.actorType !== actor.agentType)
|
|
54309
54528
|
ctx.addIssue({ code: "custom", path: ["actorType"], message: "actorType conflicts with legacy agentType." });
|
|
54310
54529
|
}).transform(({ actorType, agentType, ...actor }) => ({ ...actor, agentType: actorType ?? agentType ?? "" }));
|
|
54311
|
-
var
|
|
54530
|
+
var actorTaskInputSchema = strictObject({
|
|
54312
54531
|
id: id3,
|
|
54313
54532
|
title: text7,
|
|
54314
54533
|
actorId: id3.optional(),
|
|
@@ -54317,7 +54536,9 @@ var actorTaskSchema = strictObject({
|
|
|
54317
54536
|
acceptance: array(text7).min(1).max(20),
|
|
54318
54537
|
dependencies: array(id3).max(11),
|
|
54319
54538
|
effectScope: _enum(["workspace", "external"]).optional()
|
|
54320
|
-
})
|
|
54539
|
+
});
|
|
54540
|
+
var canonicalTaskResponseKeys = Object.freeze(actorTaskInputSchema.keyof().options.filter((key) => key !== "personaId"));
|
|
54541
|
+
var actorTaskSchema = actorTaskInputSchema.superRefine((task, ctx) => {
|
|
54321
54542
|
if (!task.actorId && !task.personaId)
|
|
54322
54543
|
ctx.addIssue({ code: "custom", path: ["actorId"], message: "Assign a configured actorId to this task." });
|
|
54323
54544
|
if (task.actorId && task.personaId && task.actorId !== task.personaId)
|
|
@@ -69498,6 +69719,20 @@ ${content}`);
|
|
|
69498
69719
|
function requiresOmaActor(mission) {
|
|
69499
69720
|
return Boolean(mission.oma || mission.availableSkills?.length);
|
|
69500
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
|
+
}
|
|
69501
69736
|
var NAME = /^[a-z0-9][a-z0-9-]{0,127}$/;
|
|
69502
69737
|
var MAX_PROFILE_BYTES = 64000;
|
|
69503
69738
|
var MAX_METADATA_BYTES2 = 16384;
|
|
@@ -69726,7 +69961,7 @@ function parsePlan(source, personas) {
|
|
|
69726
69961
|
return plan;
|
|
69727
69962
|
}
|
|
69728
69963
|
function parsePlanningResponse(source, mission) {
|
|
69729
|
-
if (!mission.availableAgents && !mission.supervision) {
|
|
69964
|
+
if (!mission.availableAgents && !mission.supervision && !requiresOmaActor(mission)) {
|
|
69730
69965
|
const plan = parsePlan(source, mission.personas);
|
|
69731
69966
|
validateOmaAssignments(plan, mission.personas, mission);
|
|
69732
69967
|
return { personas: mission.personas, plan };
|
|
@@ -69737,6 +69972,7 @@ function parsePlanningResponse(source, mission) {
|
|
|
69737
69972
|
const response = strictObject({
|
|
69738
69973
|
actors: roster,
|
|
69739
69974
|
personas: roster,
|
|
69975
|
+
actorSkills: !mission.availableAgents && requiresOmaActor(mission) ? actorSkillAssignmentsSchema.optional() : never().optional(),
|
|
69740
69976
|
tasks: planSchema.shape.tasks,
|
|
69741
69977
|
goalBrief: mission.supervision ? goalBriefSchema : never().optional(),
|
|
69742
69978
|
verificationContract: mission.verificationMode === "chief" ? goalVerificationContractSchema : goalVerificationContractSchema.optional()
|
|
@@ -69746,7 +69982,7 @@ function parsePlanningResponse(source, mission) {
|
|
|
69746
69982
|
if (input.actors && input.personas)
|
|
69747
69983
|
ctx.addIssue({ code: "custom", path: ["actors"], message: "Return actors or legacy Actors, not both rosters." });
|
|
69748
69984
|
}).parse(parseJson(source, "Planning"));
|
|
69749
|
-
const personas = response.actors ?? response.personas ?? mission.
|
|
69985
|
+
const personas = response.actors ?? response.personas ?? assignFixedActorSkills(mission, response.actorSkills);
|
|
69750
69986
|
if (mission.availableAgents)
|
|
69751
69987
|
validateAutomaticPersonas(personas, mission, true);
|
|
69752
69988
|
const plan = { tasks: response.tasks };
|
|
@@ -70018,7 +70254,8 @@ function planPrompt(mission) {
|
|
|
70018
70254
|
"tasks",
|
|
70019
70255
|
...mission.availableAgents ? ["actors"] : [],
|
|
70020
70256
|
...mission.supervision ? ["goalBrief"] : [],
|
|
70021
|
-
...mission.verificationMode === "chief" ? ["verificationContract"] : []
|
|
70257
|
+
...mission.verificationMode === "chief" ? ["verificationContract"] : [],
|
|
70258
|
+
...!mission.availableAgents && requiresOmaActor(mission) ? ["actorSkills"] : []
|
|
70022
70259
|
];
|
|
70023
70260
|
return [
|
|
70024
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.",
|
|
@@ -70057,10 +70294,15 @@ function planPrompt(mission) {
|
|
|
70057
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."
|
|
70058
70295
|
] : [],
|
|
70059
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
|
+
] : [],
|
|
70060
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.",
|
|
70061
70303
|
...mission.availableAgents ? [
|
|
70062
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.`,
|
|
70063
|
-
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.",
|
|
70064
70306
|
'Return ONLY JSON: {"actors":[{"id":"...","name":"...","role":"...","actorType":"...","skills":[]}],"tasks":[{"id":"task-1","title":"...","actorId":"...","instructions":"...","acceptance":["..."],"dependencies":[]}]}'
|
|
70065
70307
|
] : [
|
|
70066
70308
|
'Return ONLY JSON: {"tasks":[{"id":"task-1","title":"...","actorId":"...","instructions":"...","acceptance":["..."],"dependencies":[]}]}'
|
|
@@ -72654,7 +72896,7 @@ function validateOmaEvidence(request, io = createOmaEvidenceIO()) {
|
|
|
72654
72896
|
return fail("An OMA verification check failed or is stale");
|
|
72655
72897
|
}
|
|
72656
72898
|
const lastCheck = latestChecks.get(JSON.stringify([["sh", "-c", request.verifyCommand], root]));
|
|
72657
|
-
if (
|
|
72899
|
+
if (lastCheck?.checkId !== "valley-verify" || lastCheck.exitCode !== 0 || lastCheck.before !== run.after || lastCheck.after !== run.after) {
|
|
72658
72900
|
return fail("Required OMA verification did not pass on current inputs");
|
|
72659
72901
|
}
|
|
72660
72902
|
try {
|
|
@@ -80938,16 +81180,16 @@ var isBaseCallbackHandler = (x) => {
|
|
|
80938
81180
|
const callbackHandler = x;
|
|
80939
81181
|
return callbackHandler !== undefined && typeof callbackHandler.copy === "function" && typeof callbackHandler.name === "string" && typeof callbackHandler.awaitHandlers === "boolean";
|
|
80940
81182
|
};
|
|
80941
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81183
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/regex.mjs
|
|
80942
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;
|
|
80943
81185
|
|
|
80944
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81186
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/validate.mjs
|
|
80945
81187
|
function validate4(uuid) {
|
|
80946
81188
|
return typeof uuid === "string" && regex_default2.test(uuid);
|
|
80947
81189
|
}
|
|
80948
81190
|
var validate_default = validate4;
|
|
80949
81191
|
|
|
80950
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81192
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/parse.mjs
|
|
80951
81193
|
function parse8(uuid) {
|
|
80952
81194
|
if (!validate_default(uuid)) {
|
|
80953
81195
|
throw TypeError("Invalid UUID");
|
|
@@ -80956,7 +81198,7 @@ function parse8(uuid) {
|
|
|
80956
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);
|
|
80957
81199
|
}
|
|
80958
81200
|
var parse_default = parse8;
|
|
80959
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81201
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/stringify.mjs
|
|
80960
81202
|
var byteToHex2 = [];
|
|
80961
81203
|
for (let i = 0;i < 256; ++i) {
|
|
80962
81204
|
byteToHex2.push((i + 256).toString(16).slice(1));
|
|
@@ -80964,13 +81206,13 @@ for (let i = 0;i < 256; ++i) {
|
|
|
80964
81206
|
function unsafeStringify2(arr, offset = 0) {
|
|
80965
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();
|
|
80966
81208
|
}
|
|
80967
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81209
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/rng.mjs
|
|
80968
81210
|
var rnds82 = new Uint8Array(16);
|
|
80969
81211
|
function rng2() {
|
|
80970
81212
|
return crypto.getRandomValues(rnds82);
|
|
80971
81213
|
}
|
|
80972
81214
|
|
|
80973
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81215
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/v4.mjs
|
|
80974
81216
|
function v43(options, buf, offset) {
|
|
80975
81217
|
if (!buf && !options && crypto.randomUUID) {
|
|
80976
81218
|
return crypto.randomUUID();
|
|
@@ -80998,7 +81240,7 @@ function _v42(options, buf, offset) {
|
|
|
80998
81240
|
return unsafeStringify2(rnds);
|
|
80999
81241
|
}
|
|
81000
81242
|
var v4_default = v43;
|
|
81001
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81243
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/sha1.mjs
|
|
81002
81244
|
function f2(s, x, y, z) {
|
|
81003
81245
|
switch (s) {
|
|
81004
81246
|
case 0:
|
|
@@ -81066,7 +81308,7 @@ function sha12(bytes) {
|
|
|
81066
81308
|
}
|
|
81067
81309
|
var sha1_default = sha12;
|
|
81068
81310
|
|
|
81069
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81311
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/v35.mjs
|
|
81070
81312
|
function stringToBytes2(str) {
|
|
81071
81313
|
str = unescape(encodeURIComponent(str));
|
|
81072
81314
|
const bytes = new Uint8Array(str.length);
|
|
@@ -81105,14 +81347,14 @@ function v352(version, hash, value, namespace, buf, offset) {
|
|
|
81105
81347
|
return unsafeStringify2(bytes);
|
|
81106
81348
|
}
|
|
81107
81349
|
|
|
81108
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81350
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/v5.mjs
|
|
81109
81351
|
function v53(value, namespace, buf, offset) {
|
|
81110
81352
|
return v352(80, sha1_default, value, namespace, buf, offset);
|
|
81111
81353
|
}
|
|
81112
81354
|
v53.DNS = DNS2;
|
|
81113
81355
|
v53.URL = URL3;
|
|
81114
81356
|
var v5_default = v53;
|
|
81115
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81357
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/uuid/src/v7.mjs
|
|
81116
81358
|
var _state3 = {};
|
|
81117
81359
|
function v73(options, buf, offset) {
|
|
81118
81360
|
let bytes;
|
|
@@ -81173,7 +81415,7 @@ function v7Bytes2(rnds, msecs, seq, buf, offset = 0) {
|
|
|
81173
81415
|
return buf;
|
|
81174
81416
|
}
|
|
81175
81417
|
var v7_default = v73;
|
|
81176
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81418
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/api_url.mjs
|
|
81177
81419
|
function getOpenAPIBaseUrl(apiUrl) {
|
|
81178
81420
|
const url = apiUrl.replace(/\/$/, "");
|
|
81179
81421
|
for (const suffix of ["/api/v1", "/api"]) {
|
|
@@ -81183,7 +81425,7 @@ function getOpenAPIBaseUrl(apiUrl) {
|
|
|
81183
81425
|
return url;
|
|
81184
81426
|
}
|
|
81185
81427
|
|
|
81186
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81428
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/experimental/otel/constants.mjs
|
|
81187
81429
|
var GEN_AI_OPERATION_NAME = "gen_ai.operation.name";
|
|
81188
81430
|
var GEN_AI_SYSTEM = "gen_ai.system";
|
|
81189
81431
|
var GEN_AI_REQUEST_MODEL = "gen_ai.request.model";
|
|
@@ -81222,7 +81464,7 @@ var LANGSMITH_REQUEST_STREAMING = "langsmith.request.streaming";
|
|
|
81222
81464
|
var LANGSMITH_REQUEST_HEADERS = "langsmith.request.headers";
|
|
81223
81465
|
var LANGSMITH_USAGE_METADATA = "langsmith.usage_metadata";
|
|
81224
81466
|
|
|
81225
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81467
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/singletons/otel.mjs
|
|
81226
81468
|
class MockTracer {
|
|
81227
81469
|
constructor() {
|
|
81228
81470
|
Object.defineProperty(this, "hasWarned", {
|
|
@@ -81331,7 +81573,7 @@ function getDefaultOTLPTracerComponents() {
|
|
|
81331
81573
|
return OTELProviderSingleton.getDefaultOTLPTracerComponents();
|
|
81332
81574
|
}
|
|
81333
81575
|
|
|
81334
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81576
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/experimental/otel/translator.mjs
|
|
81335
81577
|
var WELL_KNOWN_OPERATION_NAMES = {
|
|
81336
81578
|
llm: "chat",
|
|
81337
81579
|
tool: "execute_tool",
|
|
@@ -81691,7 +81933,7 @@ class LangSmithToOTELTranslator {
|
|
|
81691
81933
|
}
|
|
81692
81934
|
}
|
|
81693
81935
|
|
|
81694
|
-
// ../../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
|
|
81695
81937
|
var objectToString = Object.prototype.toString;
|
|
81696
81938
|
var isError = (value) => objectToString.call(value) === "[object Error]";
|
|
81697
81939
|
var errorMessages = new Set([
|
|
@@ -81720,7 +81962,7 @@ function isNetworkError(error) {
|
|
|
81720
81962
|
return errorMessages.has(message);
|
|
81721
81963
|
}
|
|
81722
81964
|
|
|
81723
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
81965
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/p-retry/index.mjs
|
|
81724
81966
|
function validateRetries(retries) {
|
|
81725
81967
|
if (typeof retries === "number") {
|
|
81726
81968
|
if (retries < 0) {
|
|
@@ -81893,11 +82135,11 @@ async function pRetry(input, options = {}) {
|
|
|
81893
82135
|
throw new Error("Retry attempts exhausted without throwing an error.");
|
|
81894
82136
|
}
|
|
81895
82137
|
|
|
81896
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82138
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/p-queue.mjs
|
|
81897
82139
|
var import_p_queue = __toESM(require_dist3(), 1);
|
|
81898
82140
|
var PQueue = "default" in import_p_queue.default ? import_p_queue.default.default : import_p_queue.default;
|
|
81899
82141
|
|
|
81900
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82142
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/async_caller.mjs
|
|
81901
82143
|
var STATUS_RETRYABLE = [
|
|
81902
82144
|
408,
|
|
81903
82145
|
425,
|
|
@@ -82017,7 +82259,7 @@ class AsyncCaller {
|
|
|
82017
82259
|
}
|
|
82018
82260
|
}
|
|
82019
82261
|
|
|
82020
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82262
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/messages.mjs
|
|
82021
82263
|
function isLangChainMessage(message) {
|
|
82022
82264
|
return typeof message?._getType === "function";
|
|
82023
82265
|
}
|
|
@@ -82032,7 +82274,7 @@ function convertLangChainMessageToExample(message) {
|
|
|
82032
82274
|
return converted;
|
|
82033
82275
|
}
|
|
82034
82276
|
|
|
82035
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82277
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/tslib.mjs
|
|
82036
82278
|
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
82037
82279
|
if (kind === "m")
|
|
82038
82280
|
throw new TypeError("Private method is not writable");
|
|
@@ -82050,7 +82292,7 @@ function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
|
82050
82292
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
82051
82293
|
}
|
|
82052
82294
|
|
|
82053
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82295
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/uuid.mjs
|
|
82054
82296
|
var uuid4 = function() {
|
|
82055
82297
|
const { crypto: crypto2 } = globalThis;
|
|
82056
82298
|
if (crypto2?.randomUUID) {
|
|
@@ -82062,7 +82304,7 @@ var uuid4 = function() {
|
|
|
82062
82304
|
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ randomByte() & 15 >> +c / 4).toString(16));
|
|
82063
82305
|
};
|
|
82064
82306
|
|
|
82065
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82307
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/errors.mjs
|
|
82066
82308
|
function isAbortError(err) {
|
|
82067
82309
|
return typeof err === "object" && err !== null && (("name" in err) && err.name === "AbortError" || ("message" in err) && String(err.message).includes("FetchRequestCanceledException"));
|
|
82068
82310
|
}
|
|
@@ -82089,7 +82331,7 @@ var castToError = (err) => {
|
|
|
82089
82331
|
return new Error(err);
|
|
82090
82332
|
};
|
|
82091
82333
|
|
|
82092
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82334
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/error.mjs
|
|
82093
82335
|
class LangsmithError extends Error {
|
|
82094
82336
|
}
|
|
82095
82337
|
|
|
@@ -82208,7 +82450,7 @@ class RateLimitError extends APIError {
|
|
|
82208
82450
|
class InternalServerError extends APIError {
|
|
82209
82451
|
}
|
|
82210
82452
|
|
|
82211
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82453
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/values.mjs
|
|
82212
82454
|
var startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
82213
82455
|
var isAbsoluteURL = (url) => {
|
|
82214
82456
|
return startsWithSchemeRegexp.test(url);
|
|
@@ -82248,13 +82490,13 @@ var safeJSON = (text) => {
|
|
|
82248
82490
|
}
|
|
82249
82491
|
};
|
|
82250
82492
|
|
|
82251
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82493
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/sleep.mjs
|
|
82252
82494
|
var sleep3 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
82253
82495
|
|
|
82254
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82255
|
-
var VERSION2 = "0.11.
|
|
82496
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/version.mjs
|
|
82497
|
+
var VERSION2 = "0.11.3";
|
|
82256
82498
|
|
|
82257
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82499
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/detect-platform.mjs
|
|
82258
82500
|
function getDetectedPlatform() {
|
|
82259
82501
|
if (typeof Deno !== "undefined" && Deno.build != null) {
|
|
82260
82502
|
return "deno";
|
|
@@ -82380,7 +82622,7 @@ var getPlatformHeaders = () => {
|
|
|
82380
82622
|
return _platformHeaders ?? (_platformHeaders = getPlatformProperties());
|
|
82381
82623
|
};
|
|
82382
82624
|
|
|
82383
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82625
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/shims.mjs
|
|
82384
82626
|
function getDefaultFetch() {
|
|
82385
82627
|
if (typeof fetch !== "undefined") {
|
|
82386
82628
|
return fetch;
|
|
@@ -82411,6 +82653,33 @@ function ReadableStreamFrom(iterable) {
|
|
|
82411
82653
|
}
|
|
82412
82654
|
});
|
|
82413
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
|
+
}
|
|
82414
82683
|
async function CancelReadableStream(stream) {
|
|
82415
82684
|
if (stream === null || typeof stream !== "object")
|
|
82416
82685
|
return;
|
|
@@ -82424,7 +82693,7 @@ async function CancelReadableStream(stream) {
|
|
|
82424
82693
|
await cancelPromise;
|
|
82425
82694
|
}
|
|
82426
82695
|
|
|
82427
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82696
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/request-options.mjs
|
|
82428
82697
|
var FallbackEncoder = ({ headers, body }) => {
|
|
82429
82698
|
return {
|
|
82430
82699
|
bodyHeaders: {
|
|
@@ -82434,7 +82703,7 @@ var FallbackEncoder = ({ headers, body }) => {
|
|
|
82434
82703
|
};
|
|
82435
82704
|
};
|
|
82436
82705
|
|
|
82437
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82706
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/qs/formats.mjs
|
|
82438
82707
|
var default_format = "RFC3986";
|
|
82439
82708
|
var default_formatter = (v) => String(v);
|
|
82440
82709
|
var formatters = {
|
|
@@ -82443,7 +82712,7 @@ var formatters = {
|
|
|
82443
82712
|
};
|
|
82444
82713
|
var RFC1738 = "RFC1738";
|
|
82445
82714
|
|
|
82446
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82715
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/qs/utils.mjs
|
|
82447
82716
|
var has = (obj, key) => (has = Object.hasOwn ?? Function.prototype.call.bind(Object.prototype.hasOwnProperty), has(obj, key));
|
|
82448
82717
|
var hex_table = /* @__PURE__ */ (() => {
|
|
82449
82718
|
const array = [];
|
|
@@ -82515,7 +82784,7 @@ function maybe_map(val, fn) {
|
|
|
82515
82784
|
return fn(val);
|
|
82516
82785
|
}
|
|
82517
82786
|
|
|
82518
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
82787
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/qs/stringify.mjs
|
|
82519
82788
|
var array_prefix_generators = {
|
|
82520
82789
|
brackets(prefix) {
|
|
82521
82790
|
return String(prefix) + "[]";
|
|
@@ -82743,12 +83012,127 @@ function stringify4(object, opts = {}) {
|
|
|
82743
83012
|
return joined.length > 0 ? prefix + joined : "";
|
|
82744
83013
|
}
|
|
82745
83014
|
|
|
82746
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83015
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/query.mjs
|
|
82747
83016
|
function stringifyQuery(query) {
|
|
82748
83017
|
return stringify4(query, { arrayFormat: "repeat" });
|
|
82749
83018
|
}
|
|
82750
83019
|
|
|
82751
|
-
// ../../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
|
|
82752
83136
|
var levelNumbers = {
|
|
82753
83137
|
off: 0,
|
|
82754
83138
|
error: 200,
|
|
@@ -82820,10 +83204,285 @@ var formatRequestDetails = (details) => {
|
|
|
82820
83204
|
return details;
|
|
82821
83205
|
};
|
|
82822
83206
|
|
|
82823
|
-
// ../../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
|
|
82824
83476
|
async function defaultParseResponse(client, props) {
|
|
82825
83477
|
const { response, requestLogID, retryOfRequestLogID, startTime } = props;
|
|
82826
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
|
+
}
|
|
82827
83486
|
if (response.status === 204) {
|
|
82828
83487
|
return null;
|
|
82829
83488
|
}
|
|
@@ -82854,7 +83513,7 @@ async function defaultParseResponse(client, props) {
|
|
|
82854
83513
|
return body;
|
|
82855
83514
|
}
|
|
82856
83515
|
|
|
82857
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83516
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/api-promise.mjs
|
|
82858
83517
|
var _APIPromise_client;
|
|
82859
83518
|
|
|
82860
83519
|
class APIPromise extends Promise {
|
|
@@ -82911,7 +83570,7 @@ class APIPromise extends Promise {
|
|
|
82911
83570
|
}
|
|
82912
83571
|
_APIPromise_client = new WeakMap;
|
|
82913
83572
|
|
|
82914
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83573
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/pagination.mjs
|
|
82915
83574
|
var _AbstractPage_client;
|
|
82916
83575
|
|
|
82917
83576
|
class AbstractPage {
|
|
@@ -83143,7 +83802,7 @@ class ItemsCursorGetPagination extends AbstractPage {
|
|
|
83143
83802
|
}
|
|
83144
83803
|
}
|
|
83145
83804
|
|
|
83146
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83805
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/uploads.mjs
|
|
83147
83806
|
var checkFileSupport = () => {
|
|
83148
83807
|
if (typeof File === "undefined") {
|
|
83149
83808
|
const { process: process2 } = globalThis;
|
|
@@ -83160,7 +83819,7 @@ function getName(value) {
|
|
|
83160
83819
|
}
|
|
83161
83820
|
var isAsyncIterable = (value) => value != null && typeof value === "object" && typeof value[Symbol.asyncIterator] === "function";
|
|
83162
83821
|
|
|
83163
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83822
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/to-file.mjs
|
|
83164
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";
|
|
83165
83824
|
var isFileLike = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value);
|
|
83166
83825
|
var isResponseLike = (value) => value != null && typeof value === "object" && typeof value.url === "string" && typeof value.blob === "function";
|
|
@@ -83210,7 +83869,7 @@ function propsForError(value) {
|
|
|
83210
83869
|
const props = Object.getOwnPropertyNames(value);
|
|
83211
83870
|
return `; props: [${props.map((p) => `"${p}"`).join(", ")}]`;
|
|
83212
83871
|
}
|
|
83213
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83872
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/core/resource.mjs
|
|
83214
83873
|
class APIResource {
|
|
83215
83874
|
constructor(client) {
|
|
83216
83875
|
Object.defineProperty(this, "_client", {
|
|
@@ -83223,7 +83882,70 @@ class APIResource {
|
|
|
83223
83882
|
}
|
|
83224
83883
|
}
|
|
83225
83884
|
|
|
83226
|
-
// ../../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
|
|
83227
83949
|
function encodeURIPath(str) {
|
|
83228
83950
|
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
83229
83951
|
}
|
|
@@ -83278,7 +84000,31 @@ ${underline}`);
|
|
|
83278
84000
|
};
|
|
83279
84001
|
var path5 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
83280
84002
|
|
|
83281
|
-
// ../../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
|
|
83282
84028
|
class Items extends APIResource {
|
|
83283
84029
|
create(queueID, params, options) {
|
|
83284
84030
|
const { extend_trace_retention, ...body } = params;
|
|
@@ -83322,7 +84068,7 @@ class Items extends APIResource {
|
|
|
83322
84068
|
}
|
|
83323
84069
|
}
|
|
83324
84070
|
|
|
83325
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84071
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/annotation-queues/runs.mjs
|
|
83326
84072
|
class Runs extends APIResource {
|
|
83327
84073
|
create(queueID, params, options) {
|
|
83328
84074
|
const { body, extend_trace_retention } = params;
|
|
@@ -83359,7 +84105,7 @@ class Runs extends APIResource {
|
|
|
83359
84105
|
}
|
|
83360
84106
|
}
|
|
83361
84107
|
|
|
83362
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84108
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/annotation-queues/annotation-queues.mjs
|
|
83363
84109
|
class AnnotationQueues extends APIResource {
|
|
83364
84110
|
constructor() {
|
|
83365
84111
|
super(...arguments);
|
|
@@ -83422,70 +84168,7 @@ class AnnotationQueues extends APIResource {
|
|
|
83422
84168
|
}
|
|
83423
84169
|
AnnotationQueues.Runs = Runs;
|
|
83424
84170
|
AnnotationQueues.Items = Items;
|
|
83425
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
83426
|
-
var brand_privateNullableHeaders = /* @__PURE__ */ Symbol("brand.privateNullableHeaders");
|
|
83427
|
-
function* iterateHeaders(headers) {
|
|
83428
|
-
if (!headers)
|
|
83429
|
-
return;
|
|
83430
|
-
if (brand_privateNullableHeaders in headers) {
|
|
83431
|
-
const { values, nulls } = headers;
|
|
83432
|
-
yield* values.entries();
|
|
83433
|
-
for (const name of nulls) {
|
|
83434
|
-
yield [name, null];
|
|
83435
|
-
}
|
|
83436
|
-
return;
|
|
83437
|
-
}
|
|
83438
|
-
let shouldClear = false;
|
|
83439
|
-
let iter;
|
|
83440
|
-
if (headers instanceof Headers) {
|
|
83441
|
-
iter = headers.entries();
|
|
83442
|
-
} else if (isReadonlyArray(headers)) {
|
|
83443
|
-
iter = headers;
|
|
83444
|
-
} else {
|
|
83445
|
-
shouldClear = true;
|
|
83446
|
-
iter = Object.entries(headers ?? {});
|
|
83447
|
-
}
|
|
83448
|
-
for (let row of iter) {
|
|
83449
|
-
const name = row[0];
|
|
83450
|
-
if (typeof name !== "string")
|
|
83451
|
-
throw new TypeError("expected header name to be a string");
|
|
83452
|
-
const values = isReadonlyArray(row[1]) ? row[1] : [row[1]];
|
|
83453
|
-
let didClear = false;
|
|
83454
|
-
for (const value of values) {
|
|
83455
|
-
if (value === undefined)
|
|
83456
|
-
continue;
|
|
83457
|
-
if (shouldClear && !didClear) {
|
|
83458
|
-
didClear = true;
|
|
83459
|
-
yield [name, null];
|
|
83460
|
-
}
|
|
83461
|
-
yield [name, value];
|
|
83462
|
-
}
|
|
83463
|
-
}
|
|
83464
|
-
}
|
|
83465
|
-
var buildHeaders = (newHeaders) => {
|
|
83466
|
-
const targetHeaders = new Headers;
|
|
83467
|
-
const nullHeaders = new Set;
|
|
83468
|
-
for (const headers of newHeaders) {
|
|
83469
|
-
const seenHeaders = new Set;
|
|
83470
|
-
for (const [name, value] of iterateHeaders(headers)) {
|
|
83471
|
-
const lowerName = name.toLowerCase();
|
|
83472
|
-
if (!seenHeaders.has(lowerName)) {
|
|
83473
|
-
targetHeaders.delete(name);
|
|
83474
|
-
seenHeaders.add(lowerName);
|
|
83475
|
-
}
|
|
83476
|
-
if (value === null) {
|
|
83477
|
-
targetHeaders.delete(name);
|
|
83478
|
-
nullHeaders.add(lowerName);
|
|
83479
|
-
} else {
|
|
83480
|
-
targetHeaders.append(name, value);
|
|
83481
|
-
nullHeaders.delete(lowerName);
|
|
83482
|
-
}
|
|
83483
|
-
}
|
|
83484
|
-
}
|
|
83485
|
-
return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders };
|
|
83486
|
-
};
|
|
83487
|
-
|
|
83488
|
-
// ../../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
|
|
83489
84172
|
class Examples extends APIResource {
|
|
83490
84173
|
delete(exampleID, params, options) {
|
|
83491
84174
|
const { dataset_id } = params;
|
|
@@ -83496,14 +84179,14 @@ class Examples extends APIResource {
|
|
|
83496
84179
|
}
|
|
83497
84180
|
}
|
|
83498
84181
|
|
|
83499
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84182
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/datasets/experiment-runs.mjs
|
|
83500
84183
|
class ExperimentRuns extends APIResource {
|
|
83501
84184
|
query(datasetID, body, options) {
|
|
83502
84185
|
return this._client.getAPIList(path5`/api/v2/datasets/${datasetID}/experiment-runs`, ItemsCursorPostPagination, { body, method: "post", ...options });
|
|
83503
84186
|
}
|
|
83504
84187
|
}
|
|
83505
84188
|
|
|
83506
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84189
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/datasets/datasets.mjs
|
|
83507
84190
|
class Datasets extends APIResource {
|
|
83508
84191
|
constructor() {
|
|
83509
84192
|
super(...arguments);
|
|
@@ -83523,14 +84206,14 @@ class Datasets extends APIResource {
|
|
|
83523
84206
|
}
|
|
83524
84207
|
Datasets.Examples = Examples;
|
|
83525
84208
|
Datasets.ExperimentRuns = ExperimentRuns;
|
|
83526
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84209
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/fleet/threads.mjs
|
|
83527
84210
|
class Threads extends APIResource {
|
|
83528
84211
|
activateSandbox(threadID, options) {
|
|
83529
84212
|
return this._client.post(path5`/v1/fleet/threads/${threadID}/sandbox-activation`, options);
|
|
83530
84213
|
}
|
|
83531
84214
|
}
|
|
83532
84215
|
|
|
83533
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84216
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/fleet/fleet.mjs
|
|
83534
84217
|
class Fleet extends APIResource {
|
|
83535
84218
|
constructor() {
|
|
83536
84219
|
super(...arguments);
|
|
@@ -83543,13 +84226,13 @@ class Fleet extends APIResource {
|
|
|
83543
84226
|
}
|
|
83544
84227
|
}
|
|
83545
84228
|
Fleet.Threads = Threads;
|
|
83546
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84229
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/info.mjs
|
|
83547
84230
|
class Info extends APIResource {
|
|
83548
84231
|
list(options) {
|
|
83549
84232
|
return this._client.get("/api/v1/info", options);
|
|
83550
84233
|
}
|
|
83551
84234
|
}
|
|
83552
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84235
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/issues.mjs
|
|
83553
84236
|
class Issues extends APIResource {
|
|
83554
84237
|
retrieve(id, query = {}, options) {
|
|
83555
84238
|
return this._client.get(path5`/api/v1/platform/issues/${id}`, { query, ...options });
|
|
@@ -83561,7 +84244,7 @@ class Issues extends APIResource {
|
|
|
83561
84244
|
});
|
|
83562
84245
|
}
|
|
83563
84246
|
}
|
|
83564
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84247
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/online-evaluators.mjs
|
|
83565
84248
|
class OnlineEvaluators extends APIResource {
|
|
83566
84249
|
create(body, options) {
|
|
83567
84250
|
return this._client.post("/api/v1/platform/evaluators", { body, ...options });
|
|
@@ -83594,7 +84277,7 @@ class OnlineEvaluators extends APIResource {
|
|
|
83594
84277
|
return this._client.get("/api/v1/platform/evaluators/spend", { query, ...options });
|
|
83595
84278
|
}
|
|
83596
84279
|
}
|
|
83597
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84280
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/product-feedback.mjs
|
|
83598
84281
|
class ProductFeedback extends APIResource {
|
|
83599
84282
|
create(params, options) {
|
|
83600
84283
|
const { "Idempotency-Key": idempotencyKey, ...body } = params;
|
|
@@ -83611,7 +84294,31 @@ class ProductFeedback extends APIResource {
|
|
|
83611
84294
|
return this._client.get(path5`/api/v1/platform/product-feedbacks/${id}`, options);
|
|
83612
84295
|
}
|
|
83613
84296
|
}
|
|
83614
|
-
// ../../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
|
|
83615
84322
|
class Runs2 extends APIResource {
|
|
83616
84323
|
retrieve(runID, params, options) {
|
|
83617
84324
|
const { share_token, Accept, ...query } = params;
|
|
@@ -83631,7 +84338,7 @@ class Runs2 extends APIResource {
|
|
|
83631
84338
|
}
|
|
83632
84339
|
}
|
|
83633
84340
|
|
|
83634
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84341
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/public/public.mjs
|
|
83635
84342
|
class Public extends APIResource {
|
|
83636
84343
|
constructor() {
|
|
83637
84344
|
super(...arguments);
|
|
@@ -83644,7 +84351,7 @@ class Public extends APIResource {
|
|
|
83644
84351
|
}
|
|
83645
84352
|
}
|
|
83646
84353
|
Public.Runs = Runs2;
|
|
83647
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84354
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/runs/share.mjs
|
|
83648
84355
|
class Share extends APIResource {
|
|
83649
84356
|
create(runID, body, options) {
|
|
83650
84357
|
return this._client.post(path5`/api/v2/runs/${runID}/share`, { body, ...options });
|
|
@@ -83658,10 +84365,89 @@ class Share extends APIResource {
|
|
|
83658
84365
|
}
|
|
83659
84366
|
}
|
|
83660
84367
|
|
|
83661
|
-
// ../../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
|
|
83662
84442
|
class Runs3 extends APIResource {
|
|
83663
84443
|
constructor() {
|
|
83664
84444
|
super(...arguments);
|
|
84445
|
+
Object.defineProperty(this, "streaming", {
|
|
84446
|
+
enumerable: true,
|
|
84447
|
+
configurable: true,
|
|
84448
|
+
writable: true,
|
|
84449
|
+
value: new Streaming(this._client)
|
|
84450
|
+
});
|
|
83665
84451
|
Object.defineProperty(this, "share", {
|
|
83666
84452
|
enumerable: true,
|
|
83667
84453
|
configurable: true,
|
|
@@ -83702,8 +84488,9 @@ class Runs3 extends APIResource {
|
|
|
83702
84488
|
});
|
|
83703
84489
|
}
|
|
83704
84490
|
}
|
|
84491
|
+
Runs3.Streaming = Streaming;
|
|
83705
84492
|
Runs3.Share = Share;
|
|
83706
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84493
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sandboxes/boxes.mjs
|
|
83707
84494
|
class Boxes extends APIResource {
|
|
83708
84495
|
create(body, options) {
|
|
83709
84496
|
return this._client.post("/api/v2/sandboxes/boxes", { body, ...options });
|
|
@@ -83757,7 +84544,7 @@ class Boxes extends APIResource {
|
|
|
83757
84544
|
}
|
|
83758
84545
|
}
|
|
83759
84546
|
|
|
83760
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84547
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sandboxes/registries.mjs
|
|
83761
84548
|
class Registries extends APIResource {
|
|
83762
84549
|
create(body, options) {
|
|
83763
84550
|
return this._client.post("/api/v2/sandboxes/registries", { body, ...options });
|
|
@@ -83779,7 +84566,7 @@ class Registries extends APIResource {
|
|
|
83779
84566
|
}
|
|
83780
84567
|
}
|
|
83781
84568
|
|
|
83782
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84569
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sandboxes/snapshots.mjs
|
|
83783
84570
|
class Snapshots extends APIResource {
|
|
83784
84571
|
create(body, options) {
|
|
83785
84572
|
return this._client.post("/api/v2/sandboxes/snapshots", { body, ...options });
|
|
@@ -83801,7 +84588,7 @@ class Snapshots extends APIResource {
|
|
|
83801
84588
|
}
|
|
83802
84589
|
}
|
|
83803
84590
|
|
|
83804
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84591
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sandboxes/sandboxes.mjs
|
|
83805
84592
|
class Sandboxes extends APIResource {
|
|
83806
84593
|
constructor() {
|
|
83807
84594
|
super(...arguments);
|
|
@@ -83831,13 +84618,13 @@ class Sandboxes extends APIResource {
|
|
|
83831
84618
|
Sandboxes.Boxes = Boxes;
|
|
83832
84619
|
Sandboxes.Registries = Registries;
|
|
83833
84620
|
Sandboxes.Snapshots = Snapshots;
|
|
83834
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84621
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/sessions.mjs
|
|
83835
84622
|
class Sessions extends APIResource {
|
|
83836
84623
|
resolve(query, options) {
|
|
83837
84624
|
return this._client.get("/api/v1/sessions/resolutions", { query, ...options });
|
|
83838
84625
|
}
|
|
83839
84626
|
}
|
|
83840
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84627
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/resources/threads/share.mjs
|
|
83841
84628
|
class Share2 extends APIResource {
|
|
83842
84629
|
create(threadID, body, options) {
|
|
83843
84630
|
return this._client.post(path5`/api/v2/threads/${threadID}/share`, { body, ...options });
|
|
@@ -83855,10 +84642,32 @@ class Share2 extends APIResource {
|
|
|
83855
84642
|
}
|
|
83856
84643
|
}
|
|
83857
84644
|
|
|
83858
|
-
// ../../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
|
|
83859
84662
|
class Threads2 extends APIResource {
|
|
83860
84663
|
constructor() {
|
|
83861
84664
|
super(...arguments);
|
|
84665
|
+
Object.defineProperty(this, "streaming", {
|
|
84666
|
+
enumerable: true,
|
|
84667
|
+
configurable: true,
|
|
84668
|
+
writable: true,
|
|
84669
|
+
value: new Streaming2(this._client)
|
|
84670
|
+
});
|
|
83862
84671
|
Object.defineProperty(this, "share", {
|
|
83863
84672
|
enumerable: true,
|
|
83864
84673
|
configurable: true,
|
|
@@ -83885,9 +84694,35 @@ class Threads2 extends APIResource {
|
|
|
83885
84694
|
return this._client.get(path5`/api/v2/threads/${threadID}/stats`, { query, ...options });
|
|
83886
84695
|
}
|
|
83887
84696
|
}
|
|
84697
|
+
Threads2.Streaming = Streaming2;
|
|
83888
84698
|
Threads2.Share = Share2;
|
|
83889
|
-
// ../../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
|
|
83890
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
|
+
}
|
|
83891
84726
|
listRuns(traceID, params, options) {
|
|
83892
84727
|
const { Accept, ...query } = params;
|
|
83893
84728
|
return this._client.get(path5`/api/v2/traces/${traceID}/runs`, {
|
|
@@ -83906,7 +84741,8 @@ class Traces extends APIResource {
|
|
|
83906
84741
|
});
|
|
83907
84742
|
}
|
|
83908
84743
|
}
|
|
83909
|
-
|
|
84744
|
+
Traces.Streaming = Streaming3;
|
|
84745
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/internal/utils/env.mjs
|
|
83910
84746
|
var readEnv = (env) => {
|
|
83911
84747
|
if (typeof globalThis.process !== "undefined") {
|
|
83912
84748
|
return globalThis.process.env?.[env]?.trim() || undefined;
|
|
@@ -83917,7 +84753,7 @@ var readEnv = (env) => {
|
|
|
83917
84753
|
return;
|
|
83918
84754
|
};
|
|
83919
84755
|
|
|
83920
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
84756
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/client.mjs
|
|
83921
84757
|
var _Langsmith_instances;
|
|
83922
84758
|
var _a3;
|
|
83923
84759
|
var _Langsmith_encoder;
|
|
@@ -83999,6 +84835,12 @@ class Langsmith {
|
|
|
83999
84835
|
writable: true,
|
|
84000
84836
|
value: new ProductFeedback(this)
|
|
84001
84837
|
});
|
|
84838
|
+
Object.defineProperty(this, "agents", {
|
|
84839
|
+
enumerable: true,
|
|
84840
|
+
configurable: true,
|
|
84841
|
+
writable: true,
|
|
84842
|
+
value: new Agents(this)
|
|
84843
|
+
});
|
|
84002
84844
|
Object.defineProperty(this, "fleet", {
|
|
84003
84845
|
enumerable: true,
|
|
84004
84846
|
configurable: true,
|
|
@@ -84053,6 +84895,12 @@ class Langsmith {
|
|
|
84053
84895
|
writable: true,
|
|
84054
84896
|
value: new AnnotationQueues(this)
|
|
84055
84897
|
});
|
|
84898
|
+
Object.defineProperty(this, "promptWebhooks", {
|
|
84899
|
+
enumerable: true,
|
|
84900
|
+
configurable: true,
|
|
84901
|
+
writable: true,
|
|
84902
|
+
value: new PromptWebhooks(this)
|
|
84903
|
+
});
|
|
84056
84904
|
Object.defineProperty(this, "info", {
|
|
84057
84905
|
enumerable: true,
|
|
84058
84906
|
configurable: true,
|
|
@@ -84543,6 +85391,7 @@ Object.defineProperty(Langsmith, "toFile", {
|
|
|
84543
85391
|
value: toFile
|
|
84544
85392
|
});
|
|
84545
85393
|
Langsmith.ProductFeedback = ProductFeedback;
|
|
85394
|
+
Langsmith.Agents = Agents;
|
|
84546
85395
|
Langsmith.Fleet = Fleet;
|
|
84547
85396
|
Langsmith.Sessions = Sessions;
|
|
84548
85397
|
Langsmith.Datasets = Datasets;
|
|
@@ -84552,11 +85401,12 @@ Langsmith.Traces = Traces;
|
|
|
84552
85401
|
Langsmith.OnlineEvaluators = OnlineEvaluators;
|
|
84553
85402
|
Langsmith.Public = Public;
|
|
84554
85403
|
Langsmith.AnnotationQueues = AnnotationQueues;
|
|
85404
|
+
Langsmith.PromptWebhooks = PromptWebhooks;
|
|
84555
85405
|
Langsmith.Info = Info;
|
|
84556
85406
|
Langsmith.Issues = Issues;
|
|
84557
85407
|
Langsmith.Sandboxes = Sandboxes;
|
|
84558
85408
|
|
|
84559
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85409
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/warn.mjs
|
|
84560
85410
|
var warnedMessages = {};
|
|
84561
85411
|
function warnOnce(message, options) {
|
|
84562
85412
|
const key = options?.code ?? message;
|
|
@@ -84572,7 +85422,7 @@ function warnOnce(message, options) {
|
|
|
84572
85422
|
}
|
|
84573
85423
|
}
|
|
84574
85424
|
|
|
84575
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85425
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/xxhash/xxhash.mjs
|
|
84576
85426
|
var n = (n) => BigInt(n);
|
|
84577
85427
|
var PRIME32_1 = n("0x9E3779B1");
|
|
84578
85428
|
var PRIME32_2 = n("0x85EBCA77");
|
|
@@ -84852,7 +85702,7 @@ function xxh128ToBytes(hash128) {
|
|
|
84852
85702
|
return result;
|
|
84853
85703
|
}
|
|
84854
85704
|
|
|
84855
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85705
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/_uuid.mjs
|
|
84856
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;
|
|
84857
85707
|
function assertUuid(str, which) {
|
|
84858
85708
|
if (!UUID_REGEX.test(str)) {
|
|
@@ -84908,7 +85758,7 @@ function nonCryptographicUuid7Deterministic(originalId, key) {
|
|
|
84908
85758
|
return bytesToUuid(b);
|
|
84909
85759
|
}
|
|
84910
85760
|
|
|
84911
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85761
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/sampling.mjs
|
|
84912
85762
|
var SAMPLING_HASH_MODULUS = 1000000n;
|
|
84913
85763
|
var encoder2 = new TextEncoder;
|
|
84914
85764
|
var isSampledById = (identifier, samplingRate) => {
|
|
@@ -84925,7 +85775,7 @@ var isSampledById = (identifier, samplingRate) => {
|
|
|
84925
85775
|
return Number(bucket) / Number(SAMPLING_HASH_MODULUS) < samplingRate;
|
|
84926
85776
|
};
|
|
84927
85777
|
|
|
84928
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85778
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/addressing.mjs
|
|
84929
85779
|
function rejectConflicting(project, address) {
|
|
84930
85780
|
if (project && address) {
|
|
84931
85781
|
throw new Error(`A run is sent to a project (${JSON.stringify(project)}) or to an ` + "address, not both.");
|
|
@@ -84975,7 +85825,6 @@ function applyToPayload(run, { update = false } = {}) {
|
|
|
84975
85825
|
if (!address) {
|
|
84976
85826
|
return;
|
|
84977
85827
|
}
|
|
84978
|
-
warnOnce("Sending runs to an `address` is in beta and enabled per workspace; a " + "workspace without it rejects the runs.");
|
|
84979
85828
|
payload.address = addressToLrn(address);
|
|
84980
85829
|
if (!namedProject) {
|
|
84981
85830
|
delete payload.session_name;
|
|
@@ -84983,7 +85832,7 @@ function applyToPayload(run, { update = false } = {}) {
|
|
|
84983
85832
|
}
|
|
84984
85833
|
}
|
|
84985
85834
|
|
|
84986
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85835
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/v2_migration.mjs
|
|
84987
85836
|
var QueryBackend = {
|
|
84988
85837
|
CLICKHOUSE_ONLY: "clickhouse_only",
|
|
84989
85838
|
SMITHDB_ONLY: "smithdb_only",
|
|
@@ -85000,7 +85849,7 @@ function getQueryBackend(instanceFlags) {
|
|
|
85000
85849
|
return QueryBackend.CLICKHOUSE_ONLY;
|
|
85001
85850
|
}
|
|
85002
85851
|
|
|
85003
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85852
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/error.mjs
|
|
85004
85853
|
function getInvalidPromptIdentifierMsg(identifier) {
|
|
85005
85854
|
return `Invalid prompt identifier format: "${identifier}". ` + `Expected one of:
|
|
85006
85855
|
` + ` - "prompt-name" (for private prompts)
|
|
@@ -85092,7 +85941,7 @@ function isConflictingEndpointsError(err) {
|
|
|
85092
85941
|
return typeof err === "object" && err !== null && err.code === ERR_CONFLICTING_ENDPOINTS;
|
|
85093
85942
|
}
|
|
85094
85943
|
|
|
85095
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85944
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/prompts.mjs
|
|
85096
85945
|
function parseHubIdentifier(identifier) {
|
|
85097
85946
|
if (!identifier || identifier.split("/").length > 2 || identifier.startsWith("/") || identifier.endsWith("/") || identifier.split(":").length > 2) {
|
|
85098
85947
|
throw new Error(getInvalidPromptIdentifierMsg(identifier));
|
|
@@ -85113,7 +85962,7 @@ function parseHubIdentifier(identifier) {
|
|
|
85113
85962
|
}
|
|
85114
85963
|
}
|
|
85115
85964
|
|
|
85116
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
85965
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/fs.mjs
|
|
85117
85966
|
import * as nodeFs from "node:fs";
|
|
85118
85967
|
import * as nodeFsPromises from "node:fs/promises";
|
|
85119
85968
|
import * as nodePath from "node:path";
|
|
@@ -85167,7 +86016,7 @@ async function rmRecursive(filePath) {
|
|
|
85167
86016
|
await nodeFsPromises.rm(filePath, { recursive: true, force: true });
|
|
85168
86017
|
}
|
|
85169
86018
|
|
|
85170
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86019
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/prompt_cache/index.mjs
|
|
85171
86020
|
function isStale(entry, ttlSeconds) {
|
|
85172
86021
|
if (ttlSeconds === null) {
|
|
85173
86022
|
return false;
|
|
@@ -85388,7 +86237,7 @@ class PromptCache {
|
|
|
85388
86237
|
}
|
|
85389
86238
|
var promptCacheSingleton = new PromptCache;
|
|
85390
86239
|
|
|
85391
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86240
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/singletons/fetch.mjs
|
|
85392
86241
|
var DEFAULT_FETCH_IMPLEMENTATION = (...args) => fetch(...args);
|
|
85393
86242
|
var globalFetchSupportsWebStreaming = undefined;
|
|
85394
86243
|
var LANGSMITH_FETCH_IMPLEMENTATION_KEY = Symbol.for("ls:fetch_implementation");
|
|
@@ -85413,7 +86262,7 @@ var _getFetchImplementation = (debug) => {
|
|
|
85413
86262
|
};
|
|
85414
86263
|
};
|
|
85415
86264
|
|
|
85416
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86265
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/profile-lock.mjs
|
|
85417
86266
|
var LOCK_POLL_INTERVAL_MS = 10;
|
|
85418
86267
|
var LOCK_STALE_AFTER_MS = 1e4;
|
|
85419
86268
|
var LOCK_METADATA_FILE = "created_at";
|
|
@@ -85497,7 +86346,7 @@ ${owner}
|
|
|
85497
86346
|
};
|
|
85498
86347
|
}
|
|
85499
86348
|
|
|
85500
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86349
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/profiles.mjs
|
|
85501
86350
|
var DEFAULT_API_URL = "https://api.smith.langchain.com";
|
|
85502
86351
|
var OAUTH_CLIENT_ID = "langsmith-cli";
|
|
85503
86352
|
var TOKEN_REFRESH_LEEWAY_MS = 60000;
|
|
@@ -85857,7 +86706,7 @@ function authHeaderFromProfile(profile) {
|
|
|
85857
86706
|
return;
|
|
85858
86707
|
}
|
|
85859
86708
|
|
|
85860
|
-
// ../../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
|
|
85861
86710
|
var LIMIT_REPLACE_NODE = "[...]";
|
|
85862
86711
|
var CIRCULAR_REPLACE_NODE = { result: "[Circular]" };
|
|
85863
86712
|
var arr = [];
|
|
@@ -86147,12 +86996,12 @@ function replaceGetterValues(replacer) {
|
|
|
86147
86996
|
};
|
|
86148
86997
|
}
|
|
86149
86998
|
|
|
86150
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
86999
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/worker_threads.mjs
|
|
86151
87000
|
import { Worker as NodeWorker } from "node:worker_threads";
|
|
86152
87001
|
var Worker = NodeWorker;
|
|
86153
87002
|
var WORKER_THREADS_AVAILABLE = true;
|
|
86154
87003
|
|
|
86155
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
87004
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/serialize_worker.mjs
|
|
86156
87005
|
var WORKER_SOURCE = `
|
|
86157
87006
|
const { parentPort } = require("worker_threads");
|
|
86158
87007
|
|
|
@@ -86420,7 +87269,7 @@ function hasLargeString(value, threshold = LARGE_STRING_THRESHOLD, nodeBudget =
|
|
|
86420
87269
|
return false;
|
|
86421
87270
|
}
|
|
86422
87271
|
|
|
86423
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
87272
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/client.mjs
|
|
86424
87273
|
function assertPullPublicPromptAllowed(promptIdentifier, dangerouslyPullPublicPrompt) {
|
|
86425
87274
|
const [owner] = parseHubIdentifier(promptIdentifier);
|
|
86426
87275
|
if (owner !== "-" && !dangerouslyPullPublicPrompt) {
|
|
@@ -87374,6 +88223,9 @@ class Client2 {
|
|
|
87374
88223
|
this._checkStainlessVersion("0.18.0");
|
|
87375
88224
|
return this.openAPIClient.sessions;
|
|
87376
88225
|
}
|
|
88226
|
+
get agents() {
|
|
88227
|
+
return this.openAPIClient.agents;
|
|
88228
|
+
}
|
|
87377
88229
|
get public() {
|
|
87378
88230
|
this._checkStainlessVersion("0.16.0");
|
|
87379
88231
|
return this.openAPIClient.public;
|
|
@@ -87638,12 +88490,15 @@ class Client2 {
|
|
|
87638
88490
|
return;
|
|
87639
88491
|
}
|
|
87640
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");
|
|
87641
88495
|
try {
|
|
87642
88496
|
if (this.langSmithToOTELTranslator !== undefined) {
|
|
87643
|
-
for (const item of
|
|
88497
|
+
for (const item of runItems) {
|
|
87644
88498
|
item.item = await this._maskRunMetadata(item.item);
|
|
87645
88499
|
}
|
|
87646
|
-
this._sendBatchToOTELTranslator(
|
|
88500
|
+
this._sendBatchToOTELTranslator(runItems);
|
|
88501
|
+
await this._postFeedbacks(feedbacks, options);
|
|
87647
88502
|
} else {
|
|
87648
88503
|
const ingestParams = {
|
|
87649
88504
|
runCreates: batch.filter((item) => item.action === "create").map((item) => item.item),
|
|
@@ -87654,7 +88509,7 @@ class Client2 {
|
|
|
87654
88509
|
if (useMultipart) {
|
|
87655
88510
|
const useGzip = !this._runCompressionDisabled && serverInfo?.instance_flags?.gzip_body_enabled;
|
|
87656
88511
|
try {
|
|
87657
|
-
await this.multipartIngestRuns(ingestParams, {
|
|
88512
|
+
await this.multipartIngestRuns({ ...ingestParams, feedbacks }, {
|
|
87658
88513
|
...options,
|
|
87659
88514
|
useGzip,
|
|
87660
88515
|
sizeBytes: batchSizeBytes
|
|
@@ -87666,6 +88521,7 @@ class Client2 {
|
|
|
87666
88521
|
...options,
|
|
87667
88522
|
sizeBytes: batchSizeBytes
|
|
87668
88523
|
});
|
|
88524
|
+
await this._postFeedbacks(feedbacks, options);
|
|
87669
88525
|
} else {
|
|
87670
88526
|
throw e;
|
|
87671
88527
|
}
|
|
@@ -87675,6 +88531,7 @@ class Client2 {
|
|
|
87675
88531
|
...options,
|
|
87676
88532
|
sizeBytes: batchSizeBytes
|
|
87677
88533
|
});
|
|
88534
|
+
await this._postFeedbacks(feedbacks, options);
|
|
87678
88535
|
}
|
|
87679
88536
|
}
|
|
87680
88537
|
} catch (e) {
|
|
@@ -87730,7 +88587,9 @@ class Client2 {
|
|
|
87730
88587
|
async processRunOperation(item) {
|
|
87731
88588
|
clearTimeout(this.autoBatchTimeout);
|
|
87732
88589
|
this.autoBatchTimeout = undefined;
|
|
87733
|
-
|
|
88590
|
+
if (item.action !== "feedback") {
|
|
88591
|
+
item.item = mergeRuntimeEnvIntoRun(item.item, this.cachedLSEnvVarsForMetadata, this.omitTracedRuntimeInfo, this.tracingSampleRate);
|
|
88592
|
+
}
|
|
87734
88593
|
const itemPromise = this.autoBatchQueue.push(item);
|
|
87735
88594
|
if (this.manualFlushMode) {
|
|
87736
88595
|
return itemPromise;
|
|
@@ -87971,8 +88830,8 @@ class Client2 {
|
|
|
87971
88830
|
return res;
|
|
87972
88831
|
});
|
|
87973
88832
|
}
|
|
87974
|
-
async multipartIngestRuns({ runCreates, runUpdates }, options) {
|
|
87975
|
-
if (runCreates === undefined && runUpdates === undefined) {
|
|
88833
|
+
async multipartIngestRuns({ runCreates, runUpdates, feedbacks }, options) {
|
|
88834
|
+
if (runCreates === undefined && runUpdates === undefined && !feedbacks?.length) {
|
|
87976
88835
|
return;
|
|
87977
88836
|
}
|
|
87978
88837
|
const allAttachments = {};
|
|
@@ -88017,7 +88876,7 @@ class Client2 {
|
|
|
88017
88876
|
preparedCreateParams = Object.values(createById);
|
|
88018
88877
|
preparedUpdateParams = standaloneUpdates;
|
|
88019
88878
|
}
|
|
88020
|
-
if (preparedCreateParams.length === 0 && preparedUpdateParams.length === 0) {
|
|
88879
|
+
if (preparedCreateParams.length === 0 && preparedUpdateParams.length === 0 && !feedbacks?.length) {
|
|
88021
88880
|
return;
|
|
88022
88881
|
}
|
|
88023
88882
|
const accumulatedContext = [];
|
|
@@ -88077,6 +88936,16 @@ class Client2 {
|
|
|
88077
88936
|
accumulatedContext.push(`trace=${payload.trace_id},id=${payload.id}`);
|
|
88078
88937
|
}
|
|
88079
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
|
+
}
|
|
88080
88949
|
await this._sendMultipartRequest(accumulatedParts, accumulatedContext.join("; "), options);
|
|
88081
88950
|
}
|
|
88082
88951
|
async _createNodeFetchBody(parts, boundary) {
|
|
@@ -89309,14 +90178,14 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89309
90178
|
return res;
|
|
89310
90179
|
});
|
|
89311
90180
|
}
|
|
89312
|
-
async createExample(inputsOrUpdate,
|
|
90181
|
+
async createExample(inputsOrUpdate, referenceOutputs, options) {
|
|
89313
90182
|
if (isExampleCreate(inputsOrUpdate)) {
|
|
89314
|
-
if (
|
|
89315
|
-
throw new Error("Cannot provide
|
|
90183
|
+
if (referenceOutputs !== undefined || options !== undefined) {
|
|
90184
|
+
throw new Error("Cannot provide referenceOutputs or options when using ExampleCreate object");
|
|
89316
90185
|
}
|
|
89317
90186
|
}
|
|
89318
|
-
let datasetId_ =
|
|
89319
|
-
const datasetName_ =
|
|
90187
|
+
let datasetId_ = referenceOutputs ? options?.datasetId : inputsOrUpdate.dataset_id;
|
|
90188
|
+
const datasetName_ = referenceOutputs ? options?.datasetName : inputsOrUpdate.dataset_name;
|
|
89320
90189
|
if (datasetId_ === undefined && datasetName_ === undefined) {
|
|
89321
90190
|
throw new Error("Must provide either datasetName or datasetId");
|
|
89322
90191
|
} else if (datasetId_ !== undefined && datasetName_ !== undefined) {
|
|
@@ -89325,12 +90194,12 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89325
90194
|
const dataset = await this.readDataset({ datasetName: datasetName_ });
|
|
89326
90195
|
datasetId_ = dataset.id;
|
|
89327
90196
|
}
|
|
89328
|
-
const createdAt_ = (
|
|
90197
|
+
const createdAt_ = (referenceOutputs ? options?.createdAt : inputsOrUpdate.created_at) || new Date;
|
|
89329
90198
|
let data;
|
|
89330
90199
|
if (!isExampleCreate(inputsOrUpdate)) {
|
|
89331
90200
|
data = {
|
|
89332
90201
|
inputs: inputsOrUpdate,
|
|
89333
|
-
|
|
90202
|
+
reference_outputs: referenceOutputs,
|
|
89334
90203
|
created_at: createdAt_?.toISOString(),
|
|
89335
90204
|
id: options?.exampleId,
|
|
89336
90205
|
metadata: options?.metadata,
|
|
@@ -89367,7 +90236,10 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89367
90236
|
const examples = await Promise.all(response.example_ids.map((id) => this.readExample(id)));
|
|
89368
90237
|
return examples;
|
|
89369
90238
|
}
|
|
89370
|
-
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
|
+
}
|
|
89371
90243
|
if (inputs === undefined) {
|
|
89372
90244
|
throw new Error("Must provide inputs when using legacy parameters");
|
|
89373
90245
|
}
|
|
@@ -89385,7 +90257,7 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89385
90257
|
return {
|
|
89386
90258
|
dataset_id: datasetId_,
|
|
89387
90259
|
inputs: input,
|
|
89388
|
-
|
|
90260
|
+
reference_outputs: (referenceOutputs ?? outputs)?.[idx],
|
|
89389
90261
|
metadata: metadata?.[idx],
|
|
89390
90262
|
split: splits?.[idx],
|
|
89391
90263
|
id: exampleIds?.[idx],
|
|
@@ -89429,7 +90301,7 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89429
90301
|
}
|
|
89430
90302
|
return example;
|
|
89431
90303
|
}
|
|
89432
|
-
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 } = {}) {
|
|
89433
90305
|
let datasetId_;
|
|
89434
90306
|
if (datasetId !== undefined && datasetName !== undefined) {
|
|
89435
90307
|
throw new Error("Must provide either datasetName or datasetId, not both");
|
|
@@ -89471,8 +90343,17 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89471
90343
|
if (filter !== undefined) {
|
|
89472
90344
|
params.append("filter", filter);
|
|
89473
90345
|
}
|
|
90346
|
+
const selectFields = new Set(select ?? []);
|
|
89474
90347
|
if (includeAttachments === true) {
|
|
89475
|
-
["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");
|
|
89476
90357
|
}
|
|
89477
90358
|
let i = 0;
|
|
89478
90359
|
for await (const rawExamples of this._getPaginated("/examples", params)) {
|
|
@@ -89711,12 +90592,43 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89711
90592
|
if (samplingId != null && !this._shouldSample(samplingId)) {
|
|
89712
90593
|
return feedback;
|
|
89713
90594
|
}
|
|
89714
|
-
const
|
|
89715
|
-
|
|
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);
|
|
89716
90628
|
await this.caller.call(async () => {
|
|
89717
|
-
const res = await this._fetch(
|
|
90629
|
+
const res = await this._fetch(`${options?.apiUrl ?? this.apiUrl}/feedback`, {
|
|
89718
90630
|
method: "POST",
|
|
89719
|
-
headers
|
|
90631
|
+
headers,
|
|
89720
90632
|
signal: AbortSignal.timeout(this.timeout_ms),
|
|
89721
90633
|
...this.fetchOptions,
|
|
89722
90634
|
body
|
|
@@ -89724,7 +90636,9 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89724
90636
|
await raiseForStatus(res, "create feedback", true);
|
|
89725
90637
|
return res;
|
|
89726
90638
|
});
|
|
89727
|
-
|
|
90639
|
+
}
|
|
90640
|
+
async _postFeedbacks(feedbacks, options) {
|
|
90641
|
+
await Promise.all(feedbacks.map((feedback) => this._postFeedback(feedback, options)));
|
|
89728
90642
|
}
|
|
89729
90643
|
async updateFeedback(feedbackId, { score, value, correction, comment }) {
|
|
89730
90644
|
const feedbackUpdate = {};
|
|
@@ -89921,12 +90835,15 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
89921
90835
|
return results;
|
|
89922
90836
|
}
|
|
89923
90837
|
async createFeedbackConfig(options) {
|
|
89924
|
-
const { feedbackKey, feedbackConfig, isLowerScoreBetter = false } = options;
|
|
90838
|
+
const { feedbackKey, feedbackConfig, isLowerScoreBetter, isEnforced = false } = options;
|
|
89925
90839
|
const body = {
|
|
89926
90840
|
feedback_key: feedbackKey,
|
|
89927
90841
|
feedback_config: feedbackConfig,
|
|
89928
|
-
|
|
90842
|
+
is_enforced: isEnforced
|
|
89929
90843
|
};
|
|
90844
|
+
if (isLowerScoreBetter !== undefined) {
|
|
90845
|
+
body.is_lower_score_better = isLowerScoreBetter;
|
|
90846
|
+
}
|
|
89930
90847
|
const response = await this.caller.call(async () => {
|
|
89931
90848
|
const res = await this._fetch(`${this.apiUrl}/feedback-configs`, {
|
|
89932
90849
|
method: "POST",
|
|
@@ -90471,6 +91388,9 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
90471
91388
|
return this._uploadExamplesMultipart(datasetId, uploads);
|
|
90472
91389
|
}
|
|
90473
91390
|
async _uploadExamplesMultipart(datasetId, uploads = []) {
|
|
91391
|
+
for (const example of uploads) {
|
|
91392
|
+
getExampleReferenceOutputs(example);
|
|
91393
|
+
}
|
|
90474
91394
|
if (!await this._getDatasetExamplesMultiPartSupport()) {
|
|
90475
91395
|
throw new Error("Your LangSmith deployment does not allow using the multipart examples endpoint, please upgrade your deployment to the latest version.");
|
|
90476
91396
|
}
|
|
@@ -90501,8 +91421,9 @@ Message: ${Array.isArray(result.detail) ? result.detail.join(`
|
|
|
90501
91421
|
});
|
|
90502
91422
|
formData.append(`${exampleId}.inputs`, inputsBlob);
|
|
90503
91423
|
}
|
|
90504
|
-
|
|
90505
|
-
|
|
91424
|
+
const referenceOutputs = getExampleReferenceOutputs(example);
|
|
91425
|
+
if (referenceOutputs !== undefined) {
|
|
91426
|
+
const stringifiedOutputs = serialize2(referenceOutputs, `Serializing outputs for uploaded example with id: ${exampleId}`);
|
|
90506
91427
|
const outputsBlob = new Blob([stringifiedOutputs], {
|
|
90507
91428
|
type: "application/json"
|
|
90508
91429
|
});
|
|
@@ -90978,7 +91899,13 @@ Object.defineProperty(Client2, "_fallbackDirsCreated", {
|
|
|
90978
91899
|
function isExampleCreate(input) {
|
|
90979
91900
|
return "dataset_id" in input || "dataset_name" in input;
|
|
90980
91901
|
}
|
|
90981
|
-
|
|
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
|
|
90982
91909
|
var isEnvTracingEnabled = (tracingEnabled) => {
|
|
90983
91910
|
if (tracingEnabled !== undefined) {
|
|
90984
91911
|
return tracingEnabled;
|
|
@@ -90987,7 +91914,7 @@ var isEnvTracingEnabled = (tracingEnabled) => {
|
|
|
90987
91914
|
return !!envVars.find((envVar) => getLangSmithEnvironmentVariable(envVar) === "true");
|
|
90988
91915
|
};
|
|
90989
91916
|
|
|
90990
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
91917
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/singletons/traceable.mjs
|
|
90991
91918
|
class MockAsyncLocalStorage {
|
|
90992
91919
|
getStore() {
|
|
90993
91920
|
return;
|
|
@@ -91023,7 +91950,7 @@ var ROOT = Symbol.for("langsmith:traceable:root");
|
|
|
91023
91950
|
function isTraceableFunction(x) {
|
|
91024
91951
|
return typeof x === "function" && "langsmith:traceable" in x;
|
|
91025
91952
|
}
|
|
91026
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
91953
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/env.mjs
|
|
91027
91954
|
var globalEnv;
|
|
91028
91955
|
var isBrowser2 = () => typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
91029
91956
|
var isWebWorker2 = () => typeof globalThis === "object" && globalThis.constructor && globalThis.constructor.name === "DedicatedWorkerGlobalScope";
|
|
@@ -91199,7 +92126,7 @@ function resolveTracingMode(configValue) {
|
|
|
91199
92126
|
return "langsmith";
|
|
91200
92127
|
}
|
|
91201
92128
|
|
|
91202
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
92129
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/address.mjs
|
|
91203
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;
|
|
91204
92131
|
var AGENT_ID_PATTERN = /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
91205
92132
|
var ENVIRONMENTS = ["local", "development", "staging", "production"];
|
|
@@ -91280,12 +92207,13 @@ function envNames() {
|
|
|
91280
92207
|
return ENV_NAMES;
|
|
91281
92208
|
}
|
|
91282
92209
|
|
|
91283
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
92210
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/singletons/constants.mjs
|
|
91284
92211
|
var _LC_CONTEXT_VARIABLES_KEY = Symbol.for("lc:context_variables");
|
|
91285
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");
|
|
91286
92214
|
var _REPLICA_TRACE_ROOTS_KEY = Symbol.for("langsmith:replica_trace_roots");
|
|
91287
92215
|
|
|
91288
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
92216
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/utils/context_vars.mjs
|
|
91289
92217
|
function getContextVar(runTree, key) {
|
|
91290
92218
|
if (_LC_CONTEXT_VARIABLES_KEY in runTree) {
|
|
91291
92219
|
const contextVars = runTree[_LC_CONTEXT_VARIABLES_KEY];
|
|
@@ -91299,7 +92227,7 @@ function setContextVar(runTree, key, value) {
|
|
|
91299
92227
|
runTree[_LC_CONTEXT_VARIABLES_KEY] = contextVars;
|
|
91300
92228
|
}
|
|
91301
92229
|
|
|
91302
|
-
// ../../node_modules/.bun/langsmith@0.11.
|
|
92230
|
+
// ../../node_modules/.bun/langsmith@0.11.3+ea9f70ecde856c26/node_modules/langsmith/lib/run_trees.mjs
|
|
91303
92231
|
var TIMESTAMP_LENGTH = 36;
|
|
91304
92232
|
var UUID_NAMESPACE_DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
91305
92233
|
function getReplicaKey(replica) {
|
|
@@ -93847,13 +94775,13 @@ var singletons_exports = /* @__PURE__ */ __exportAll3({
|
|
|
93847
94775
|
_CONTEXT_VARIABLES_KEY: () => _CONTEXT_VARIABLES_KEY
|
|
93848
94776
|
});
|
|
93849
94777
|
|
|
93850
|
-
// ../../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
|
|
93851
94779
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
93852
94780
|
function initializeAsyncLocalStorageSingleton() {
|
|
93853
94781
|
AsyncLocalStorageProviderSingleton2.initializeGlobalInstance(new AsyncLocalStorage2);
|
|
93854
94782
|
}
|
|
93855
94783
|
|
|
93856
|
-
// ../../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
|
|
93857
94785
|
function _coerceTimeoutMs(value, field) {
|
|
93858
94786
|
if (value === undefined || value === null)
|
|
93859
94787
|
return;
|
|
@@ -93879,7 +94807,7 @@ function coerceTimeoutPolicy(value) {
|
|
|
93879
94807
|
};
|
|
93880
94808
|
}
|
|
93881
94809
|
|
|
93882
|
-
// ../../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
|
|
93883
94811
|
var START = "__start__";
|
|
93884
94812
|
var END = "__end__";
|
|
93885
94813
|
var INPUT = "__input__";
|
|
@@ -94120,7 +95048,7 @@ function _deserializeCommandSendObjectGraph(x, seen = /* @__PURE__ */ new Map) {
|
|
|
94120
95048
|
return x;
|
|
94121
95049
|
}
|
|
94122
95050
|
|
|
94123
|
-
// ../../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
|
|
94124
95052
|
var BaseLangGraphError = class extends Error {
|
|
94125
95053
|
lc_error_code;
|
|
94126
95054
|
constructor(message, fields) {
|
|
@@ -94323,7 +95251,7 @@ var StateGraphInputError = class extends BaseLangGraphError {
|
|
|
94323
95251
|
}
|
|
94324
95252
|
};
|
|
94325
95253
|
|
|
94326
|
-
// ../../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
|
|
94327
95255
|
var lastMsecs = 0;
|
|
94328
95256
|
var lastNsecs = 0;
|
|
94329
95257
|
function uuid6(clockseq) {
|
|
@@ -94348,7 +95276,7 @@ function uuid5(name, namespace) {
|
|
|
94348
95276
|
return v52(name, new Uint8Array(namespaceBytes));
|
|
94349
95277
|
}
|
|
94350
95278
|
|
|
94351
|
-
// ../../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
|
|
94352
95280
|
var ERROR3 = "__error__";
|
|
94353
95281
|
var SCHEDULED = "__scheduled__";
|
|
94354
95282
|
var INTERRUPT2 = "__interrupt__";
|
|
@@ -94364,7 +95292,7 @@ function isDeltaSnapshot(value) {
|
|
|
94364
95292
|
return value != null && typeof value === "object" && value.lg_name === "DeltaSnapshot";
|
|
94365
95293
|
}
|
|
94366
95294
|
|
|
94367
|
-
// ../../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
|
|
94368
95296
|
var LIMIT_REPLACE_NODE2 = "[...]";
|
|
94369
95297
|
var CIRCULAR_REPLACE_NODE2 = "[Circular]";
|
|
94370
95298
|
var arr2 = [];
|
|
@@ -97001,7 +97929,7 @@ function setResponseValueAndErrors(res, key, value, errorMessage, refs) {
|
|
|
97001
97929
|
addErrorMessage(res, key, errorMessage, refs);
|
|
97002
97930
|
}
|
|
97003
97931
|
|
|
97004
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
97932
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/helpers/util.js
|
|
97005
97933
|
var util;
|
|
97006
97934
|
(function(util) {
|
|
97007
97935
|
util.assertEqual = (_) => {};
|
|
@@ -97132,7 +98060,7 @@ var getParsedType = (data) => {
|
|
|
97132
98060
|
}
|
|
97133
98061
|
};
|
|
97134
98062
|
|
|
97135
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98063
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/ZodError.js
|
|
97136
98064
|
var ZodIssueCode2 = util.arrayToEnum([
|
|
97137
98065
|
"invalid_type",
|
|
97138
98066
|
"invalid_literal",
|
|
@@ -97261,7 +98189,7 @@ ZodError.create = (issues) => {
|
|
|
97261
98189
|
return error;
|
|
97262
98190
|
};
|
|
97263
98191
|
|
|
97264
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98192
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/locales/en.js
|
|
97265
98193
|
var errorMap = (issue, _ctx) => {
|
|
97266
98194
|
let message;
|
|
97267
98195
|
switch (issue.code) {
|
|
@@ -97364,13 +98292,13 @@ var errorMap = (issue, _ctx) => {
|
|
|
97364
98292
|
};
|
|
97365
98293
|
var en_default2 = errorMap;
|
|
97366
98294
|
|
|
97367
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98295
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/errors.js
|
|
97368
98296
|
var overrideErrorMap = en_default2;
|
|
97369
98297
|
function getErrorMap() {
|
|
97370
98298
|
return overrideErrorMap;
|
|
97371
98299
|
}
|
|
97372
98300
|
|
|
97373
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98301
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/helpers/parseUtil.js
|
|
97374
98302
|
var makeIssue = (params) => {
|
|
97375
98303
|
const { data, path, errorMaps, issueData } = params;
|
|
97376
98304
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -97476,14 +98404,14 @@ var isDirty = (x) => x.status === "dirty";
|
|
|
97476
98404
|
var isValid = (x) => x.status === "valid";
|
|
97477
98405
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
97478
98406
|
|
|
97479
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98407
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/helpers/errorUtil.js
|
|
97480
98408
|
var errorUtil;
|
|
97481
98409
|
(function(errorUtil) {
|
|
97482
98410
|
errorUtil.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
97483
98411
|
errorUtil.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
97484
98412
|
})(errorUtil || (errorUtil = {}));
|
|
97485
98413
|
|
|
97486
|
-
// ../../node_modules/.bun/zod@4.6.
|
|
98414
|
+
// ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v3/types.js
|
|
97487
98415
|
class ParseInputLazyPath {
|
|
97488
98416
|
constructor(parent, value, path, key) {
|
|
97489
98417
|
this._cachedPath = [];
|
|
@@ -111707,7 +112635,7 @@ function isFunction(object) {
|
|
|
111707
112635
|
function typeStr(obj) {
|
|
111708
112636
|
return isArray2(obj) ? "array" : typeof obj;
|
|
111709
112637
|
}
|
|
111710
|
-
function
|
|
112638
|
+
function escapeRegExp2(string) {
|
|
111711
112639
|
return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
|
111712
112640
|
}
|
|
111713
112641
|
function hasProperty(obj, propName) {
|
|
@@ -111771,9 +112699,9 @@ function parseTemplate(template, tags) {
|
|
|
111771
112699
|
tagsToCompile = tagsToCompile.split(spaceRe, 2);
|
|
111772
112700
|
if (!isArray2(tagsToCompile) || tagsToCompile.length !== 2)
|
|
111773
112701
|
throw new Error("Invalid tags: " + tagsToCompile);
|
|
111774
|
-
openingTagRe = new RegExp(
|
|
111775
|
-
closingTagRe = new RegExp("\\s*" +
|
|
111776
|
-
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]));
|
|
111777
112705
|
}
|
|
111778
112706
|
compileTags(tags || mustache.tags);
|
|
111779
112707
|
var scanner = new Scanner(template);
|
|
@@ -116396,7 +117324,7 @@ async function load(text, options) {
|
|
|
116396
117324
|
return reviver.call(context, json);
|
|
116397
117325
|
}
|
|
116398
117326
|
|
|
116399
|
-
// ../../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
|
|
116400
117328
|
function isLangChainSerializedObject(value) {
|
|
116401
117329
|
return value !== null && value.lc === 1 && value.type === "constructor" && Array.isArray(value.id);
|
|
116402
117330
|
}
|
|
@@ -116536,7 +117464,7 @@ var JsonPlusSerializer = class {
|
|
|
116536
117464
|
}
|
|
116537
117465
|
};
|
|
116538
117466
|
|
|
116539
|
-
// ../../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
|
|
116540
117468
|
function deepCopy(obj) {
|
|
116541
117469
|
if (typeof obj !== "object" || obj === null)
|
|
116542
117470
|
return obj;
|
|
@@ -116625,14 +117553,14 @@ var EXCLUDED_METADATA_KEYS = new Set([
|
|
|
116625
117553
|
"langgraph_checkpoint_ns"
|
|
116626
117554
|
]);
|
|
116627
117555
|
|
|
116628
|
-
// ../../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
|
|
116629
117557
|
var POLLUTION_KEYS = new Set([
|
|
116630
117558
|
"__proto__",
|
|
116631
117559
|
"constructor",
|
|
116632
117560
|
"prototype"
|
|
116633
117561
|
]);
|
|
116634
117562
|
|
|
116635
|
-
// ../../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
|
|
116636
117564
|
var InvalidNamespaceError = class extends Error {
|
|
116637
117565
|
constructor(message) {
|
|
116638
117566
|
super(message);
|
|
@@ -116650,6 +117578,10 @@ function validateNamespace(namespace, options = {}) {
|
|
|
116650
117578
|
throw new InvalidNamespaceError(`Invalid namespace label '${label}' found in ${namespace}. Namespace labels must be strings, but got ${typeof label}.`);
|
|
116651
117579
|
if (label.includes("."))
|
|
116652
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.");
|
|
116653
117585
|
if (label === "")
|
|
116654
117586
|
throw new InvalidNamespaceError(`Namespace labels cannot be empty strings. Got ${label} in ${namespace}`);
|
|
116655
117587
|
}
|
|
@@ -116735,7 +117667,7 @@ var BaseStore2 = class {
|
|
|
116735
117667
|
stop() {}
|
|
116736
117668
|
};
|
|
116737
117669
|
|
|
116738
|
-
// ../../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
|
|
116739
117671
|
var extractStore = (input) => {
|
|
116740
117672
|
if ("lg_name" in input && input.lg_name === "AsyncBatchedStore")
|
|
116741
117673
|
return input.store;
|
|
@@ -116855,7 +117787,7 @@ var AsyncBatchedStore = class extends BaseStore2 {
|
|
|
116855
117787
|
}
|
|
116856
117788
|
};
|
|
116857
117789
|
|
|
116858
|
-
// ../../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
|
|
116859
117791
|
var BaseCache2 = class {
|
|
116860
117792
|
serde = new JsonPlusSerializer;
|
|
116861
117793
|
constructor(serde) {
|
|
@@ -116863,7 +117795,7 @@ var BaseCache2 = class {
|
|
|
116863
117795
|
}
|
|
116864
117796
|
};
|
|
116865
117797
|
|
|
116866
|
-
// ../../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
|
|
116867
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;
|
|
116868
117800
|
function isDeltaChannel(channel) {
|
|
116869
117801
|
return channel != null && channel.lc_graph_name === "DeltaChannel";
|
|
@@ -117106,7 +118038,7 @@ async function channelsFromCheckpoint(specs, checkpoint, options) {
|
|
|
117106
118038
|
return channels;
|
|
117107
118039
|
}
|
|
117108
118040
|
|
|
117109
|
-
// ../../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
|
|
117110
118042
|
var isBinaryOperatorAggregate = (value) => {
|
|
117111
118043
|
return value != null && value.lc_graph_name === "BinaryOperatorAggregate";
|
|
117112
118044
|
};
|
|
@@ -117175,7 +118107,7 @@ var BinaryOperatorAggregate = class BinaryOperatorAggregate extends BaseChannel
|
|
|
117175
118107
|
}
|
|
117176
118108
|
};
|
|
117177
118109
|
|
|
117178
|
-
// ../../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
|
|
117179
118111
|
var LastValue = class LastValue extends BaseChannel {
|
|
117180
118112
|
lc_graph_name = "LastValue";
|
|
117181
118113
|
value = [];
|
|
@@ -117263,7 +118195,7 @@ var LastValueAfterFinish = class LastValueAfterFinish extends BaseChannel {
|
|
|
117263
118195
|
}
|
|
117264
118196
|
};
|
|
117265
118197
|
|
|
117266
|
-
// ../../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
|
|
117267
118199
|
var AnnotationRoot = class {
|
|
117268
118200
|
lc_graph_name = "AnnotationRoot";
|
|
117269
118201
|
spec;
|
|
@@ -117289,7 +118221,7 @@ function getChannel(reducer) {
|
|
|
117289
118221
|
return new LastValue;
|
|
117290
118222
|
}
|
|
117291
118223
|
|
|
117292
|
-
// ../../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
|
|
117293
118225
|
var COPIABLE_KEYS = [
|
|
117294
118226
|
"tags",
|
|
117295
118227
|
"metadata",
|
|
@@ -117468,7 +118400,7 @@ function getParentCheckpointNamespace(namespace) {
|
|
|
117468
118400
|
return parts.slice(0, -1).join("|");
|
|
117469
118401
|
}
|
|
117470
118402
|
|
|
117471
|
-
// ../../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
|
|
117472
118404
|
var GRAPH_CALLBACK_HANDLER = Symbol.for("langgraph.graph_callback_handler");
|
|
117473
118405
|
var GraphCallbackHandler = class extends BaseCallbackHandler {
|
|
117474
118406
|
name = "GraphCallbackHandler";
|
|
@@ -117478,7 +118410,7 @@ var GraphCallbackHandler = class extends BaseCallbackHandler {
|
|
|
117478
118410
|
}
|
|
117479
118411
|
};
|
|
117480
118412
|
|
|
117481
|
-
// ../../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
|
|
117482
118414
|
var RunControl = class {
|
|
117483
118415
|
#drainReason = undefined;
|
|
117484
118416
|
requestDrain(reason = "shutdown") {
|
|
@@ -117492,7 +118424,7 @@ var RunControl = class {
|
|
|
117492
118424
|
}
|
|
117493
118425
|
};
|
|
117494
118426
|
|
|
117495
|
-
// ../../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
|
|
117496
118428
|
var MESSAGE_CLASS_BY_TYPE = {
|
|
117497
118429
|
human: HumanMessage,
|
|
117498
118430
|
ai: AIMessage,
|
|
@@ -117596,7 +118528,7 @@ function isMessagesDeltaReducer(reducer) {
|
|
|
117596
118528
|
return typeof reducer === "function" && reducer[MESSAGES_DELTA_REDUCER] === true;
|
|
117597
118529
|
}
|
|
117598
118530
|
|
|
117599
|
-
// ../../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
|
|
117600
118532
|
var STREAM_EVENTS_V3_MODES = [
|
|
117601
118533
|
"values",
|
|
117602
118534
|
"updates",
|
|
@@ -117781,7 +118713,7 @@ function convertUpdatesPayload(payload) {
|
|
|
117781
118713
|
};
|
|
117782
118714
|
}
|
|
117783
118715
|
|
|
117784
|
-
// ../../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
|
|
117785
118717
|
var STREAM_CHANNEL_BRAND = Symbol.for("langgraph.stream_channel");
|
|
117786
118718
|
var StreamChannel = class StreamChannel {
|
|
117787
118719
|
[STREAM_CHANNEL_BRAND] = true;
|
|
@@ -117905,7 +118837,7 @@ function isStreamChannel(value) {
|
|
|
117905
118837
|
return StreamChannel.isInstance(value);
|
|
117906
118838
|
}
|
|
117907
118839
|
|
|
117908
|
-
// ../../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
|
|
117909
118841
|
var EXTENSION_CHANNEL_PREFIX = "custom:";
|
|
117910
118842
|
function extensionChannelMethod(channelName) {
|
|
117911
118843
|
return `${EXTENSION_CHANNEL_PREFIX}${channelName}`;
|
|
@@ -118108,7 +119040,7 @@ function hasPrefix(ns, prefix) {
|
|
|
118108
119040
|
return true;
|
|
118109
119041
|
}
|
|
118110
119042
|
|
|
118111
|
-
// ../../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
|
|
118112
119044
|
function filterLifecycleEntries(log, path, startAt = 0) {
|
|
118113
119045
|
return { [Symbol.asyncIterator]() {
|
|
118114
119046
|
const base = log.iterate(startAt);
|
|
@@ -118493,7 +119425,7 @@ function createLifecycleTransformer(options = {}) {
|
|
|
118493
119425
|
};
|
|
118494
119426
|
}
|
|
118495
119427
|
|
|
118496
|
-
// ../../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
|
|
118497
119429
|
function getMessageStreamKey(data) {
|
|
118498
119430
|
const record = data;
|
|
118499
119431
|
if (typeof record.run_id === "string")
|
|
@@ -118585,7 +119517,7 @@ function createMessagesTransformer(path, nodeFilter) {
|
|
|
118585
119517
|
};
|
|
118586
119518
|
}
|
|
118587
119519
|
|
|
118588
|
-
// ../../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
|
|
118589
119521
|
function filterSubgraphHandles(log, path, startAt = 0) {
|
|
118590
119522
|
const targetDepth = path.length + 1;
|
|
118591
119523
|
return { [Symbol.asyncIterator]() {
|
|
@@ -118639,7 +119571,7 @@ function createSubgraphDiscoveryTransformer(mux, options) {
|
|
|
118639
119571
|
};
|
|
118640
119572
|
}
|
|
118641
119573
|
|
|
118642
|
-
// ../../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
|
|
118643
119575
|
function createValuesTransformer(path) {
|
|
118644
119576
|
const valuesLog = StreamChannel.local();
|
|
118645
119577
|
return {
|
|
@@ -118663,12 +119595,12 @@ function createValuesTransformer(path) {
|
|
|
118663
119595
|
};
|
|
118664
119596
|
}
|
|
118665
119597
|
|
|
118666
|
-
// ../../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
|
|
118667
119599
|
function isNativeTransformer(t) {
|
|
118668
119600
|
return "__native" in t && t.__native === true;
|
|
118669
119601
|
}
|
|
118670
119602
|
|
|
118671
|
-
// ../../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
|
|
118672
119604
|
var SET_VALUES_LOG = Symbol("setValuesLog");
|
|
118673
119605
|
var SET_MESSAGES_ITERABLE = Symbol("setMessagesIterable");
|
|
118674
119606
|
var SET_LIFECYCLE_ITERABLE = Symbol("setLifecycleIterable");
|
|
@@ -118860,7 +119792,7 @@ function createGraphRunStream(source, transformers = [], optionsOrAbortControlle
|
|
|
118860
119792
|
return root;
|
|
118861
119793
|
}
|
|
118862
119794
|
|
|
118863
|
-
// ../../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
|
|
118864
119796
|
var SUPPORTED_CHANNELS = new Set([
|
|
118865
119797
|
"values",
|
|
118866
119798
|
"updates",
|
|
@@ -118873,7 +119805,7 @@ var SUPPORTED_CHANNELS = new Set([
|
|
|
118873
119805
|
"custom"
|
|
118874
119806
|
]);
|
|
118875
119807
|
|
|
118876
|
-
// ../../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
|
|
118877
119809
|
var n2 = (n) => BigInt(n);
|
|
118878
119810
|
var view = (data, offset = 0) => new DataView(data.buffer, data.byteOffset + offset, data.byteLength - offset);
|
|
118879
119811
|
var PRIME32_12 = n2("0x9E3779B1");
|
|
@@ -119144,7 +120076,7 @@ function isXXH3(value) {
|
|
|
119144
120076
|
return /^[0-9a-f]{32}$/.test(value);
|
|
119145
120077
|
}
|
|
119146
120078
|
|
|
119147
|
-
// ../../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
|
|
119148
120080
|
function interrupt(value, options) {
|
|
119149
120081
|
const config = AsyncLocalStorageProviderSingleton2.getRunnableConfig();
|
|
119150
120082
|
if (!config)
|
|
@@ -119192,7 +120124,7 @@ function interrupt(value, options) {
|
|
|
119192
120124
|
throw new GraphInterrupt([pending]);
|
|
119193
120125
|
}
|
|
119194
120126
|
|
|
119195
|
-
// ../../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
|
|
119196
120128
|
var RunnableCallable = class extends Runnable {
|
|
119197
120129
|
lc_namespace = ["langgraph"];
|
|
119198
120130
|
func;
|
|
@@ -119276,7 +120208,7 @@ function isGeneratorFunction(val) {
|
|
|
119276
120208
|
return val != null && typeof val === "function" && val instanceof Object.getPrototypeOf(function* () {}).constructor;
|
|
119277
120209
|
}
|
|
119278
120210
|
|
|
119279
|
-
// ../../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
|
|
119280
120212
|
function _isSkipWrite(x) {
|
|
119281
120213
|
return typeof x === "object" && x?.[Symbol.for("LG_SKIP_WRITE")] !== undefined;
|
|
119282
120214
|
}
|
|
@@ -119373,7 +120305,7 @@ function _isChannelWriteTupleEntry(x) {
|
|
|
119373
120305
|
return x !== undefined && !_isChannelWriteEntry(x) && Runnable.isRunnable(x.mapper);
|
|
119374
120306
|
}
|
|
119375
120307
|
|
|
119376
|
-
// ../../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
|
|
119377
120309
|
var ChannelRead = class ChannelRead extends RunnableCallable {
|
|
119378
120310
|
lc_graph_name = "ChannelRead";
|
|
119379
120311
|
channel;
|
|
@@ -119541,7 +120473,7 @@ var PregelNode = class PregelNode extends RunnableBinding {
|
|
|
119541
120473
|
}
|
|
119542
120474
|
};
|
|
119543
120475
|
|
|
119544
|
-
// ../../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
|
|
119545
120477
|
function isRunnableSequence(x) {
|
|
119546
120478
|
return "steps" in x && Array.isArray(x.steps);
|
|
119547
120479
|
}
|
|
@@ -119557,7 +120489,7 @@ function findSubgraphPregel(candidate) {
|
|
|
119557
120489
|
candidates.push(...candidate.steps);
|
|
119558
120490
|
}
|
|
119559
120491
|
|
|
119560
|
-
// ../../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
|
|
119561
120493
|
function getGraphCallbackDispatcher(manager) {
|
|
119562
120494
|
const handlers = manager?.handlers.filter(GraphCallbackHandler.isInstance);
|
|
119563
120495
|
if (!handlers?.length)
|
|
@@ -119582,7 +120514,7 @@ function getGraphCallbackDispatcher(manager) {
|
|
|
119582
120514
|
};
|
|
119583
120515
|
}
|
|
119584
120516
|
|
|
119585
|
-
// ../../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
|
|
119586
120518
|
function advanceDeltaCounters(channels, updatedChannels, counters) {
|
|
119587
120519
|
const next = {};
|
|
119588
120520
|
for (const name in channels) {
|
|
@@ -119631,7 +120563,7 @@ async function checkpointSuperseded(saver, config, saved) {
|
|
|
119631
120563
|
return latest !== undefined && latest.checkpoint.id !== saved.checkpoint.id;
|
|
119632
120564
|
}
|
|
119633
120565
|
|
|
119634
|
-
// ../../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
|
|
119635
120567
|
function readChannel(channels, chan, catchErrors = true, returnException = false) {
|
|
119636
120568
|
try {
|
|
119637
120569
|
return channels[chan].get();
|
|
@@ -119779,7 +120711,7 @@ function* mapOutputUpdates(outputChannels, tasks, cached) {
|
|
|
119779
120711
|
yield flattened;
|
|
119780
120712
|
}
|
|
119781
120713
|
|
|
119782
|
-
// ../../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
|
|
119783
120715
|
function getNullChannelVersion(currentVersions) {
|
|
119784
120716
|
const startVersion = typeof currentVersions[START];
|
|
119785
120717
|
if (startVersion === "number")
|
|
@@ -119864,7 +120796,7 @@ function combineAbortSignals(...x) {
|
|
|
119864
120796
|
};
|
|
119865
120797
|
}
|
|
119866
120798
|
|
|
119867
|
-
// ../../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
|
|
119868
120800
|
var Call = class {
|
|
119869
120801
|
func;
|
|
119870
120802
|
name;
|
|
@@ -119888,7 +120820,7 @@ function isCall(value) {
|
|
|
119888
120820
|
return typeof value === "object" && value !== null && "__lg_type" in value && value.__lg_type === "call";
|
|
119889
120821
|
}
|
|
119890
120822
|
|
|
119891
|
-
// ../../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
|
|
119892
120824
|
function getRunnableForFunc(name, func) {
|
|
119893
120825
|
return new RunnableSequence({
|
|
119894
120826
|
name,
|
|
@@ -119915,7 +120847,7 @@ function getRunnableForEntrypoint(name, func) {
|
|
|
119915
120847
|
});
|
|
119916
120848
|
}
|
|
119917
120849
|
|
|
119918
|
-
// ../../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
|
|
119919
120851
|
var increment = (current) => {
|
|
119920
120852
|
return current !== undefined ? current + 1 : 1;
|
|
119921
120853
|
};
|
|
@@ -120713,7 +121645,7 @@ function _scratchpad({ pendingWrites, taskId, currentTaskInput, resumeMap, names
|
|
|
120713
121645
|
return scratchpad;
|
|
120714
121646
|
}
|
|
120715
121647
|
|
|
120716
|
-
// ../../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
|
|
120717
121649
|
var COLORS_MAP = {
|
|
120718
121650
|
blue: {
|
|
120719
121651
|
start: "\x1B[34m",
|
|
@@ -120913,7 +121845,7 @@ function printStepWrites(step, writes, whitelist) {
|
|
|
120913
121845
|
].join(""));
|
|
120914
121846
|
}
|
|
120915
121847
|
|
|
120916
|
-
// ../../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
|
|
120917
121849
|
var IterableReadableStreamWithAbortSignal = class extends IterableReadableStream {
|
|
120918
121850
|
_abortController;
|
|
120919
121851
|
_innerReader;
|
|
@@ -121191,7 +122123,7 @@ function createDuplexStream(...streams) {
|
|
|
121191
122123
|
});
|
|
121192
122124
|
}
|
|
121193
122125
|
|
|
121194
|
-
// ../../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
|
|
121195
122127
|
var ReplayState = class {
|
|
121196
122128
|
checkpointId;
|
|
121197
122129
|
#visitedNs = /* @__PURE__ */ new Set;
|
|
@@ -121219,7 +122151,7 @@ var ReplayState = class {
|
|
|
121219
122151
|
}
|
|
121220
122152
|
};
|
|
121221
122153
|
|
|
121222
|
-
// ../../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
|
|
121223
122155
|
var INPUT_DONE = Symbol.for("INPUT_DONE");
|
|
121224
122156
|
var INPUT_RESUMING = Symbol.for("INPUT_RESUMING");
|
|
121225
122157
|
var DEFAULT_LOOP_LIMIT = 25;
|
|
@@ -122351,7 +123283,7 @@ var PregelLoop = class PregelLoop {
|
|
|
122351
123283
|
}
|
|
122352
123284
|
};
|
|
122353
123285
|
|
|
122354
|
-
// ../../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
|
|
122355
123287
|
function isChatGenerationChunk2(x) {
|
|
122356
123288
|
return isBaseMessage(x?.message);
|
|
122357
123289
|
}
|
|
@@ -122475,7 +123407,7 @@ var StreamMessagesHandler = class extends BaseCallbackHandler {
|
|
|
122475
123407
|
}
|
|
122476
123408
|
};
|
|
122477
123409
|
|
|
122478
|
-
// ../../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
|
|
122479
123411
|
function getResponseMetadata(message) {
|
|
122480
123412
|
if ("response_metadata" in message && typeof message.response_metadata === "object" && message.response_metadata != null)
|
|
122481
123413
|
return message.response_metadata;
|
|
@@ -122728,7 +123660,7 @@ var StreamProtocolMessagesHandler = class extends BaseCallbackHandler {
|
|
|
122728
123660
|
}
|
|
122729
123661
|
};
|
|
122730
123662
|
|
|
122731
|
-
// ../../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
|
|
122732
123664
|
var TimedAttemptScope = class {
|
|
122733
123665
|
active = true;
|
|
122734
123666
|
lastProgress = Date.now();
|
|
@@ -122910,7 +123842,7 @@ async function runAttemptWithTimeout(task, config, policy, invoke) {
|
|
|
122910
123842
|
});
|
|
122911
123843
|
}
|
|
122912
123844
|
|
|
122913
|
-
// ../../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
|
|
122914
123846
|
var DEFAULT_STATUS_NO_RETRY = [
|
|
122915
123847
|
400,
|
|
122916
123848
|
401,
|
|
@@ -123017,7 +123949,7 @@ async function _runWithRetry(pregelTask, retryPolicy, configurable, signal) {
|
|
|
123017
123949
|
};
|
|
123018
123950
|
}
|
|
123019
123951
|
|
|
123020
|
-
// ../../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
|
|
123021
123953
|
var PROMISE_ADDED_SYMBOL = Symbol.for("promiseAdded");
|
|
123022
123954
|
function createPromiseBarrier() {
|
|
123023
123955
|
const barrier = {
|
|
@@ -123256,7 +124188,7 @@ async function call(runner, task, func, name, input, options = {}) {
|
|
|
123256
124188
|
}
|
|
123257
124189
|
}
|
|
123258
124190
|
|
|
123259
|
-
// ../../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
|
|
123260
124192
|
var GraphValidationError = class extends Error {
|
|
123261
124193
|
constructor(message) {
|
|
123262
124194
|
super(message);
|
|
@@ -123315,7 +124247,7 @@ function validateKeys(keys, channels) {
|
|
|
123315
124247
|
throw new Error(`Key ${String(keys)} not found in channels`);
|
|
123316
124248
|
}
|
|
123317
124249
|
|
|
123318
|
-
// ../../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
|
|
123319
124251
|
function isUniqueTopicCheckpoint(checkpoint) {
|
|
123320
124252
|
return Array.isArray(checkpoint) && checkpoint.length === 2 && Array.isArray(checkpoint[0]) && Array.isArray(checkpoint[1]);
|
|
123321
124253
|
}
|
|
@@ -123385,7 +124317,7 @@ var Topic = class Topic extends BaseChannel {
|
|
|
123385
124317
|
}
|
|
123386
124318
|
};
|
|
123387
124319
|
|
|
123388
|
-
// ../../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
|
|
123389
124321
|
function protocolEventsToEventStream(run) {
|
|
123390
124322
|
const encoder = new TextEncoder;
|
|
123391
124323
|
return new ReadableStream({ async start(controller) {
|
|
@@ -124526,7 +125458,7 @@ function _getTracingMetadataDefaults(config) {
|
|
|
124526
125458
|
return Object.keys(metadata).length > 0 ? metadata : undefined;
|
|
124527
125459
|
}
|
|
124528
125460
|
|
|
124529
|
-
// ../../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
|
|
124530
125462
|
var EphemeralValue = class EphemeralValue extends BaseChannel {
|
|
124531
125463
|
lc_graph_name = "EphemeralValue";
|
|
124532
125464
|
guard;
|
|
@@ -124567,7 +125499,7 @@ var EphemeralValue = class EphemeralValue extends BaseChannel {
|
|
|
124567
125499
|
}
|
|
124568
125500
|
};
|
|
124569
125501
|
|
|
124570
|
-
// ../../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
|
|
124571
125503
|
var Branch = class {
|
|
124572
125504
|
path;
|
|
124573
125505
|
ends;
|
|
@@ -125080,7 +126012,7 @@ function addImplicitTerminalEndEdges(nodes, discovered, addEdge) {
|
|
|
125080
126012
|
}
|
|
125081
126013
|
}
|
|
125082
126014
|
|
|
125083
|
-
// ../../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
|
|
125084
126016
|
function isStandardSchema4(schema) {
|
|
125085
126017
|
return typeof schema === "object" && schema !== null && "~standard" in schema && typeof schema["~standard"] === "object" && schema["~standard"] !== null && "validate" in schema["~standard"];
|
|
125086
126018
|
}
|
|
@@ -125088,7 +126020,7 @@ function isStandardJSONSchema(schema) {
|
|
|
125088
126020
|
return typeof schema === "object" && schema !== null && "~standard" in schema && typeof schema["~standard"] === "object" && schema["~standard"] !== null && "jsonSchema" in schema["~standard"];
|
|
125089
126021
|
}
|
|
125090
126022
|
|
|
125091
|
-
// ../../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
|
|
125092
126024
|
function getJsonSchemaFromSchema(schema) {
|
|
125093
126025
|
if (isStandardJSONSchema(schema))
|
|
125094
126026
|
try {
|
|
@@ -125114,7 +126046,7 @@ function getSchemaDefaultGetter(schema) {
|
|
|
125114
126046
|
} catch {}
|
|
125115
126047
|
}
|
|
125116
126048
|
|
|
125117
|
-
// ../../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
|
|
125118
126050
|
var isDeltaChannel2 = (value) => {
|
|
125119
126051
|
return value != null && value.lc_graph_name === "DeltaChannel";
|
|
125120
126052
|
};
|
|
@@ -125203,7 +126135,7 @@ var DeltaChannel = class DeltaChannel extends BaseChannel {
|
|
|
125203
126135
|
}
|
|
125204
126136
|
};
|
|
125205
126137
|
|
|
125206
|
-
// ../../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
|
|
125207
126139
|
var MISSING = Symbol.for("langgraph.channel.missing");
|
|
125208
126140
|
var UntrackedValueChannel = class UntrackedValueChannel extends BaseChannel {
|
|
125209
126141
|
lc_graph_name = "UntrackedValue";
|
|
@@ -125242,7 +126174,7 @@ var UntrackedValueChannel = class UntrackedValueChannel extends BaseChannel {
|
|
|
125242
126174
|
}
|
|
125243
126175
|
};
|
|
125244
126176
|
|
|
125245
|
-
// ../../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
|
|
125246
126178
|
var REDUCED_VALUE_SYMBOL = Symbol.for("langgraph.state.reduced_value");
|
|
125247
126179
|
var ReducedValue = class {
|
|
125248
126180
|
[REDUCED_VALUE_SYMBOL] = true;
|
|
@@ -125262,7 +126194,7 @@ var ReducedValue = class {
|
|
|
125262
126194
|
}
|
|
125263
126195
|
};
|
|
125264
126196
|
|
|
125265
|
-
// ../../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
|
|
125266
126198
|
var UNTRACKED_VALUE_SYMBOL = Symbol.for("langgraph.state.untracked_value");
|
|
125267
126199
|
var UntrackedValue = class {
|
|
125268
126200
|
[UNTRACKED_VALUE_SYMBOL] = true;
|
|
@@ -125277,7 +126209,7 @@ var UntrackedValue = class {
|
|
|
125277
126209
|
}
|
|
125278
126210
|
};
|
|
125279
126211
|
|
|
125280
|
-
// ../../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
|
|
125281
126213
|
var DELTA_VALUE_SYMBOL = Symbol.for("langgraph.state.delta_value");
|
|
125282
126214
|
var DeltaValue = class {
|
|
125283
126215
|
[DELTA_VALUE_SYMBOL] = true;
|
|
@@ -125298,7 +126230,7 @@ var DeltaValue = class {
|
|
|
125298
126230
|
}
|
|
125299
126231
|
};
|
|
125300
126232
|
|
|
125301
|
-
// ../../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
|
|
125302
126234
|
var areSetsEqual = (a, b) => a.size === b.size && [...a].every((value) => b.has(value));
|
|
125303
126235
|
var NamedBarrierValue = class NamedBarrierValue extends BaseChannel {
|
|
125304
126236
|
lc_graph_name = "NamedBarrierValue";
|
|
@@ -125402,7 +126334,7 @@ var NamedBarrierValueAfterFinish = class NamedBarrierValueAfterFinish extends Ba
|
|
|
125402
126334
|
}
|
|
125403
126335
|
};
|
|
125404
126336
|
|
|
125405
|
-
// ../../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
|
|
125406
126338
|
var STATE_SCHEMA_SYMBOL = Symbol.for("langgraph.state.state_schema");
|
|
125407
126339
|
var StateSchema = class {
|
|
125408
126340
|
[STATE_SCHEMA_SYMBOL] = true;
|
|
@@ -125538,7 +126470,7 @@ var StateSchema = class {
|
|
|
125538
126470
|
}
|
|
125539
126471
|
};
|
|
125540
126472
|
|
|
125541
|
-
// ../../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
|
|
125542
126474
|
var messagesValueSchema = custom().default(() => []);
|
|
125543
126475
|
var messagesInputSchema = custom();
|
|
125544
126476
|
var MessagesValue = new ReducedValue(messagesValueSchema, {
|
|
@@ -125558,7 +126490,7 @@ var MessagesDeltaValue = new DeltaValue(messagesValueSchema, {
|
|
|
125558
126490
|
}
|
|
125559
126491
|
});
|
|
125560
126492
|
|
|
125561
|
-
// ../../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
|
|
125562
126494
|
var SchemaMetaRegistry = class {
|
|
125563
126495
|
_map = /* @__PURE__ */ new Map;
|
|
125564
126496
|
_extensionCache = /* @__PURE__ */ new Map;
|
|
@@ -125638,7 +126570,7 @@ function withLangGraph(schema, meta) {
|
|
|
125638
126570
|
}
|
|
125639
126571
|
}
|
|
125640
126572
|
|
|
125641
|
-
// ../../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
|
|
125642
126574
|
function isStateDefinitionInit(value) {
|
|
125643
126575
|
if (value == null)
|
|
125644
126576
|
return false;
|
|
@@ -125668,7 +126600,7 @@ function isStateGraphInit(value) {
|
|
|
125668
126600
|
return true;
|
|
125669
126601
|
}
|
|
125670
126602
|
|
|
125671
|
-
// ../../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
|
|
125672
126604
|
var ROOT2 = "__root__";
|
|
125673
126605
|
var DEFAULT_ERROR_HANDLER_NODE = "__default_error_handler__";
|
|
125674
126606
|
var PartialStateSchema = Symbol.for("langgraph.state.partial");
|
|
@@ -126306,7 +127238,7 @@ function _getControlBranch() {
|
|
|
126306
127238
|
}) });
|
|
126307
127239
|
}
|
|
126308
127240
|
|
|
126309
|
-
// ../../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
|
|
126310
127242
|
var entrypoint = function entrypoint(optionsOrName, func) {
|
|
126311
127243
|
const { name, checkpointer, store, cache } = typeof optionsOrName === "string" ? {
|
|
126312
127244
|
name: optionsOrName,
|
|
@@ -126373,7 +127305,7 @@ entrypoint.final = function final({ value, save }) {
|
|
|
126373
127305
|
};
|
|
126374
127306
|
};
|
|
126375
127307
|
|
|
126376
|
-
// ../../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
|
|
126377
127309
|
var MessagesAnnotation = Annotation.Root({ messages: Annotation({
|
|
126378
127310
|
reducer: messagesStateReducer,
|
|
126379
127311
|
default: () => []
|
|
@@ -126385,7 +127317,7 @@ var MessagesZodMeta = {
|
|
|
126385
127317
|
};
|
|
126386
127318
|
var MessagesZodState = objectType({ messages: withLangGraph(custom2(), MessagesZodMeta) });
|
|
126387
127319
|
|
|
126388
|
-
// ../../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
|
|
126389
127321
|
initializeAsyncLocalStorageSingleton();
|
|
126390
127322
|
|
|
126391
127323
|
// ../../packages/core/src/chief/coordinator-graph.ts
|
|
@@ -129273,7 +130205,7 @@ import { isDeepStrictEqual } from "node:util";
|
|
|
129273
130205
|
import { createHash as createHash23, randomBytes as randomBytes3 } from "node:crypto";
|
|
129274
130206
|
import { createClient as createClient2 } from "@libsql/client";
|
|
129275
130207
|
|
|
129276
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130208
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/entity.js
|
|
129277
130209
|
var entityKind = Symbol.for("drizzle:entityKind");
|
|
129278
130210
|
var hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
|
|
129279
130211
|
function is(value, type) {
|
|
@@ -129298,7 +130230,7 @@ function is(value, type) {
|
|
|
129298
130230
|
return false;
|
|
129299
130231
|
}
|
|
129300
130232
|
|
|
129301
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130233
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/column.js
|
|
129302
130234
|
class Column {
|
|
129303
130235
|
constructor(table, config) {
|
|
129304
130236
|
this.table = table;
|
|
@@ -129348,7 +130280,7 @@ class Column {
|
|
|
129348
130280
|
}
|
|
129349
130281
|
}
|
|
129350
130282
|
|
|
129351
|
-
// ../../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
|
|
129352
130284
|
class ColumnBuilder {
|
|
129353
130285
|
static [entityKind] = "ColumnBuilder";
|
|
129354
130286
|
config;
|
|
@@ -129404,21 +130336,21 @@ class ColumnBuilder {
|
|
|
129404
130336
|
}
|
|
129405
130337
|
}
|
|
129406
130338
|
|
|
129407
|
-
// ../../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
|
|
129408
130340
|
var TableName = Symbol.for("drizzle:Name");
|
|
129409
130341
|
|
|
129410
|
-
// ../../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
|
|
129411
130343
|
function iife4(fn, ...args) {
|
|
129412
130344
|
return fn(...args);
|
|
129413
130345
|
}
|
|
129414
130346
|
|
|
129415
|
-
// ../../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
|
|
129416
130348
|
var isPgEnumSym = Symbol.for("drizzle:isPgEnum");
|
|
129417
130349
|
function isPgEnum(obj) {
|
|
129418
130350
|
return !!obj && typeof obj === "function" && isPgEnumSym in obj && obj[isPgEnumSym] === true;
|
|
129419
130351
|
}
|
|
129420
130352
|
|
|
129421
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130353
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/subquery.js
|
|
129422
130354
|
class Subquery {
|
|
129423
130355
|
static [entityKind] = "Subquery";
|
|
129424
130356
|
constructor(sql, fields, alias, isWith = false, usedTables = []) {
|
|
@@ -129437,10 +130369,10 @@ class WithSubquery extends Subquery {
|
|
|
129437
130369
|
static [entityKind] = "WithSubquery";
|
|
129438
130370
|
}
|
|
129439
130371
|
|
|
129440
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130372
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/version.js
|
|
129441
130373
|
var version4 = "0.45.4";
|
|
129442
130374
|
|
|
129443
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130375
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/tracing.js
|
|
129444
130376
|
var otel;
|
|
129445
130377
|
var rawTracer;
|
|
129446
130378
|
var tracer = {
|
|
@@ -129467,10 +130399,10 @@ var tracer = {
|
|
|
129467
130399
|
}
|
|
129468
130400
|
};
|
|
129469
130401
|
|
|
129470
|
-
// ../../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
|
|
129471
130403
|
var ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
|
129472
130404
|
|
|
129473
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130405
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/table.js
|
|
129474
130406
|
var Schema2 = Symbol.for("drizzle:Schema");
|
|
129475
130407
|
var Columns = Symbol.for("drizzle:Columns");
|
|
129476
130408
|
var ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns");
|
|
@@ -129514,7 +130446,7 @@ function getTableUniqueName(table) {
|
|
|
129514
130446
|
return `${table[Schema2] ?? "public"}.${table[TableName]}`;
|
|
129515
130447
|
}
|
|
129516
130448
|
|
|
129517
|
-
// ../../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
|
|
129518
130450
|
function isSQLWrapper(value) {
|
|
129519
130451
|
return value !== null && value !== undefined && typeof value.getSQL === "function";
|
|
129520
130452
|
}
|
|
@@ -129894,7 +130826,7 @@ Subquery.prototype.getSQL = function() {
|
|
|
129894
130826
|
return new SQL([this]);
|
|
129895
130827
|
};
|
|
129896
130828
|
|
|
129897
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130829
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/alias.js
|
|
129898
130830
|
class ColumnAliasProxyHandler {
|
|
129899
130831
|
constructor(table) {
|
|
129900
130832
|
this.table = table;
|
|
@@ -129973,7 +130905,7 @@ function mapColumnsInSQLToAlias(query, alias) {
|
|
|
129973
130905
|
}));
|
|
129974
130906
|
}
|
|
129975
130907
|
|
|
129976
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130908
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/errors.js
|
|
129977
130909
|
class DrizzleError extends Error {
|
|
129978
130910
|
static [entityKind] = "DrizzleError";
|
|
129979
130911
|
constructor({ message, cause }) {
|
|
@@ -130003,7 +130935,7 @@ class TransactionRollbackError extends DrizzleError {
|
|
|
130003
130935
|
}
|
|
130004
130936
|
}
|
|
130005
130937
|
|
|
130006
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130938
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/logger.js
|
|
130007
130939
|
class ConsoleLogWriter {
|
|
130008
130940
|
static [entityKind] = "ConsoleLogWriter";
|
|
130009
130941
|
write(message) {
|
|
@@ -130035,7 +130967,7 @@ class NoopLogger {
|
|
|
130035
130967
|
logQuery() {}
|
|
130036
130968
|
}
|
|
130037
130969
|
|
|
130038
|
-
// ../../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
|
|
130039
130971
|
class QueryPromise {
|
|
130040
130972
|
static [entityKind] = "QueryPromise";
|
|
130041
130973
|
[Symbol.toStringTag] = "QueryPromise";
|
|
@@ -130056,7 +130988,7 @@ class QueryPromise {
|
|
|
130056
130988
|
}
|
|
130057
130989
|
}
|
|
130058
130990
|
|
|
130059
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
130991
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/utils.js
|
|
130060
130992
|
function mapResultRow(columns, row, joinsNotNullableMap) {
|
|
130061
130993
|
const nullifyMap = {};
|
|
130062
130994
|
const result = columns.reduce((result2, { path, field }, columnIndex) => {
|
|
@@ -130210,7 +131142,7 @@ function isConfig(data) {
|
|
|
130210
131142
|
}
|
|
130211
131143
|
var textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder;
|
|
130212
131144
|
|
|
130213
|
-
// ../../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
|
|
130214
131146
|
var InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys");
|
|
130215
131147
|
var EnableRLS = Symbol.for("drizzle:EnableRLS");
|
|
130216
131148
|
|
|
@@ -130226,7 +131158,7 @@ class PgTable extends Table {
|
|
|
130226
131158
|
[Table.Symbol.ExtraConfigColumns] = {};
|
|
130227
131159
|
}
|
|
130228
131160
|
|
|
130229
|
-
// ../../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
|
|
130230
131162
|
class PrimaryKeyBuilder {
|
|
130231
131163
|
static [entityKind] = "PgPrimaryKeyBuilder";
|
|
130232
131164
|
columns;
|
|
@@ -130254,7 +131186,7 @@ class PrimaryKey {
|
|
|
130254
131186
|
}
|
|
130255
131187
|
}
|
|
130256
131188
|
|
|
130257
|
-
// ../../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
|
|
130258
131190
|
function bindIfParam(value, column) {
|
|
130259
131191
|
if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
|
|
130260
131192
|
return new Param(value, column);
|
|
@@ -130359,7 +131291,7 @@ function notIlike(column, value) {
|
|
|
130359
131291
|
return sql`${column} not ilike ${value}`;
|
|
130360
131292
|
}
|
|
130361
131293
|
|
|
130362
|
-
// ../../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
|
|
130363
131295
|
function asc(column) {
|
|
130364
131296
|
return sql`${column} asc`;
|
|
130365
131297
|
}
|
|
@@ -130367,7 +131299,7 @@ function desc(column) {
|
|
|
130367
131299
|
return sql`${column} desc`;
|
|
130368
131300
|
}
|
|
130369
131301
|
|
|
130370
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
131302
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/relations.js
|
|
130371
131303
|
class Relation {
|
|
130372
131304
|
constructor(sourceTable, referencedTable, relationName) {
|
|
130373
131305
|
this.sourceTable = sourceTable;
|
|
@@ -130587,10 +131519,10 @@ function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelect
|
|
|
130587
131519
|
return result;
|
|
130588
131520
|
}
|
|
130589
131521
|
|
|
130590
|
-
// ../../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
|
|
130591
131523
|
import { createClient } from "@libsql/client";
|
|
130592
131524
|
|
|
130593
|
-
// ../../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
|
|
130594
131526
|
class SelectionProxyHandler {
|
|
130595
131527
|
static [entityKind] = "SelectionProxyHandler";
|
|
130596
131528
|
config;
|
|
@@ -130642,7 +131574,7 @@ class SelectionProxyHandler {
|
|
|
130642
131574
|
}
|
|
130643
131575
|
}
|
|
130644
131576
|
|
|
130645
|
-
// ../../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
|
|
130646
131578
|
class ForeignKeyBuilder {
|
|
130647
131579
|
static [entityKind] = "SQLiteForeignKeyBuilder";
|
|
130648
131580
|
reference;
|
|
@@ -130710,12 +131642,12 @@ function foreignKey(config) {
|
|
|
130710
131642
|
return new ForeignKeyBuilder(mappedConfig);
|
|
130711
131643
|
}
|
|
130712
131644
|
|
|
130713
|
-
// ../../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
|
|
130714
131646
|
function uniqueKeyName(table, columns) {
|
|
130715
131647
|
return `${table[TableName]}_${columns.join("_")}_unique`;
|
|
130716
131648
|
}
|
|
130717
131649
|
|
|
130718
|
-
// ../../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
|
|
130719
131651
|
class SQLiteColumnBuilder extends ColumnBuilder {
|
|
130720
131652
|
static [entityKind] = "SQLiteColumnBuilder";
|
|
130721
131653
|
foreignKeyConfigs = [];
|
|
@@ -130766,7 +131698,7 @@ class SQLiteColumn extends Column {
|
|
|
130766
131698
|
static [entityKind] = "SQLiteColumn";
|
|
130767
131699
|
}
|
|
130768
131700
|
|
|
130769
|
-
// ../../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
|
|
130770
131702
|
class SQLiteBigIntBuilder extends SQLiteColumnBuilder {
|
|
130771
131703
|
static [entityKind] = "SQLiteBigIntBuilder";
|
|
130772
131704
|
constructor(name) {
|
|
@@ -130854,7 +131786,7 @@ function blob(a, b) {
|
|
|
130854
131786
|
return new SQLiteBlobBufferBuilder(name);
|
|
130855
131787
|
}
|
|
130856
131788
|
|
|
130857
|
-
// ../../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
|
|
130858
131790
|
class SQLiteCustomColumnBuilder extends SQLiteColumnBuilder {
|
|
130859
131791
|
static [entityKind] = "SQLiteCustomColumnBuilder";
|
|
130860
131792
|
constructor(name, fieldConfig, customTypeParams) {
|
|
@@ -130895,7 +131827,7 @@ function customType(customTypeParams) {
|
|
|
130895
131827
|
};
|
|
130896
131828
|
}
|
|
130897
131829
|
|
|
130898
|
-
// ../../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
|
|
130899
131831
|
class SQLiteBaseIntegerBuilder extends SQLiteColumnBuilder {
|
|
130900
131832
|
static [entityKind] = "SQLiteBaseIntegerBuilder";
|
|
130901
131833
|
constructor(name, dataType, columnType) {
|
|
@@ -130997,7 +131929,7 @@ function integer3(a, b) {
|
|
|
130997
131929
|
return new SQLiteIntegerBuilder(name);
|
|
130998
131930
|
}
|
|
130999
131931
|
|
|
131000
|
-
// ../../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
|
|
131001
131933
|
class SQLiteNumericBuilder extends SQLiteColumnBuilder {
|
|
131002
131934
|
static [entityKind] = "SQLiteNumericBuilder";
|
|
131003
131935
|
constructor(name) {
|
|
@@ -131067,7 +131999,7 @@ function numeric(a, b) {
|
|
|
131067
131999
|
return mode === "number" ? new SQLiteNumericNumberBuilder(name) : mode === "bigint" ? new SQLiteNumericBigIntBuilder(name) : new SQLiteNumericBuilder(name);
|
|
131068
132000
|
}
|
|
131069
132001
|
|
|
131070
|
-
// ../../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
|
|
131071
132003
|
class SQLiteRealBuilder extends SQLiteColumnBuilder {
|
|
131072
132004
|
static [entityKind] = "SQLiteRealBuilder";
|
|
131073
132005
|
constructor(name) {
|
|
@@ -131088,7 +132020,7 @@ function real(name) {
|
|
|
131088
132020
|
return new SQLiteRealBuilder(name ?? "");
|
|
131089
132021
|
}
|
|
131090
132022
|
|
|
131091
|
-
// ../../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
|
|
131092
132024
|
class SQLiteTextBuilder extends SQLiteColumnBuilder {
|
|
131093
132025
|
static [entityKind] = "SQLiteTextBuilder";
|
|
131094
132026
|
constructor(name, config) {
|
|
@@ -131143,7 +132075,7 @@ function text15(a, b = {}) {
|
|
|
131143
132075
|
return new SQLiteTextBuilder(name, config);
|
|
131144
132076
|
}
|
|
131145
132077
|
|
|
131146
|
-
// ../../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
|
|
131147
132079
|
function getSQLiteColumnBuilders() {
|
|
131148
132080
|
return {
|
|
131149
132081
|
blob,
|
|
@@ -131155,7 +132087,7 @@ function getSQLiteColumnBuilders() {
|
|
|
131155
132087
|
};
|
|
131156
132088
|
}
|
|
131157
132089
|
|
|
131158
|
-
// ../../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
|
|
131159
132091
|
var InlineForeignKeys2 = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
|
131160
132092
|
|
|
131161
132093
|
class SQLiteTable extends Table {
|
|
@@ -131189,7 +132121,7 @@ var sqliteTable = (name, columns, extraConfig) => {
|
|
|
131189
132121
|
return sqliteTableBase(name, columns, extraConfig);
|
|
131190
132122
|
};
|
|
131191
132123
|
|
|
131192
|
-
// ../../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
|
|
131193
132125
|
class CheckBuilder {
|
|
131194
132126
|
constructor(name, value) {
|
|
131195
132127
|
this.name = name;
|
|
@@ -131216,7 +132148,7 @@ function check(name, value) {
|
|
|
131216
132148
|
return new CheckBuilder(name, value);
|
|
131217
132149
|
}
|
|
131218
132150
|
|
|
131219
|
-
// ../../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
|
|
131220
132152
|
class IndexBuilderOn {
|
|
131221
132153
|
constructor(name, unique) {
|
|
131222
132154
|
this.name = name;
|
|
@@ -131262,7 +132194,7 @@ function uniqueIndex(name) {
|
|
|
131262
132194
|
return new IndexBuilderOn(name, true);
|
|
131263
132195
|
}
|
|
131264
132196
|
|
|
131265
|
-
// ../../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
|
|
131266
132198
|
function primaryKey(...config) {
|
|
131267
132199
|
if (config[0].columns) {
|
|
131268
132200
|
return new PrimaryKeyBuilder2(config[0].columns, config[0].name);
|
|
@@ -131297,7 +132229,7 @@ class PrimaryKey2 {
|
|
|
131297
132229
|
}
|
|
131298
132230
|
}
|
|
131299
132231
|
|
|
131300
|
-
// ../../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
|
|
131301
132233
|
function extractUsedTable(table) {
|
|
131302
132234
|
if (is(table, SQLiteTable)) {
|
|
131303
132235
|
return [`${table[Table.Symbol.BaseName]}`];
|
|
@@ -131311,7 +132243,7 @@ function extractUsedTable(table) {
|
|
|
131311
132243
|
return [];
|
|
131312
132244
|
}
|
|
131313
132245
|
|
|
131314
|
-
// ../../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
|
|
131315
132247
|
class SQLiteDeleteBase extends QueryPromise {
|
|
131316
132248
|
constructor(table, session, dialect, withList) {
|
|
131317
132249
|
super();
|
|
@@ -131381,7 +132313,7 @@ class SQLiteDeleteBase extends QueryPromise {
|
|
|
131381
132313
|
}
|
|
131382
132314
|
}
|
|
131383
132315
|
|
|
131384
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
132316
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/casing.js
|
|
131385
132317
|
function toSnakeCase(input) {
|
|
131386
132318
|
const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? [];
|
|
131387
132319
|
return words.map((word) => word.toLowerCase()).join("_");
|
|
@@ -131434,12 +132366,12 @@ class CasingCache {
|
|
|
131434
132366
|
}
|
|
131435
132367
|
}
|
|
131436
132368
|
|
|
131437
|
-
// ../../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
|
|
131438
132370
|
class SQLiteViewBase extends View {
|
|
131439
132371
|
static [entityKind] = "SQLiteViewBase";
|
|
131440
132372
|
}
|
|
131441
132373
|
|
|
131442
|
-
// ../../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
|
|
131443
132375
|
class SQLiteDialect {
|
|
131444
132376
|
static [entityKind] = "SQLiteDialect";
|
|
131445
132377
|
casing;
|
|
@@ -132049,7 +132981,7 @@ class SQLiteAsyncDialect extends SQLiteDialect {
|
|
|
132049
132981
|
}
|
|
132050
132982
|
}
|
|
132051
132983
|
|
|
132052
|
-
// ../../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
|
|
132053
132985
|
class TypedQueryBuilder {
|
|
132054
132986
|
static [entityKind] = "TypedQueryBuilder";
|
|
132055
132987
|
getSelectedFields() {
|
|
@@ -132057,7 +132989,7 @@ class TypedQueryBuilder {
|
|
|
132057
132989
|
}
|
|
132058
132990
|
}
|
|
132059
132991
|
|
|
132060
|
-
// ../../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
|
|
132061
132993
|
class SQLiteSelectBuilder {
|
|
132062
132994
|
static [entityKind] = "SQLiteSelectBuilder";
|
|
132063
132995
|
fields;
|
|
@@ -132355,7 +133287,7 @@ var unionAll = createSetOperator("union", true);
|
|
|
132355
133287
|
var intersect = createSetOperator("intersect", false);
|
|
132356
133288
|
var except = createSetOperator("except", false);
|
|
132357
133289
|
|
|
132358
|
-
// ../../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
|
|
132359
133291
|
class QueryBuilder {
|
|
132360
133292
|
static [entityKind] = "SQLiteQueryBuilder";
|
|
132361
133293
|
dialect;
|
|
@@ -132414,7 +133346,7 @@ class QueryBuilder {
|
|
|
132414
133346
|
}
|
|
132415
133347
|
}
|
|
132416
133348
|
|
|
132417
|
-
// ../../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
|
|
132418
133350
|
class SQLiteInsertBuilder {
|
|
132419
133351
|
constructor(table, session, dialect, withList) {
|
|
132420
133352
|
this.table = table;
|
|
@@ -132523,7 +133455,7 @@ class SQLiteInsertBase extends QueryPromise {
|
|
|
132523
133455
|
}
|
|
132524
133456
|
}
|
|
132525
133457
|
|
|
132526
|
-
// ../../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
|
|
132527
133459
|
class SQLiteUpdateBuilder {
|
|
132528
133460
|
constructor(table, session, dialect, withList) {
|
|
132529
133461
|
this.table = table;
|
|
@@ -132627,7 +133559,7 @@ class SQLiteUpdateBase extends QueryPromise {
|
|
|
132627
133559
|
}
|
|
132628
133560
|
}
|
|
132629
133561
|
|
|
132630
|
-
// ../../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
|
|
132631
133563
|
class SQLiteCountBuilder extends SQL {
|
|
132632
133564
|
constructor(params) {
|
|
132633
133565
|
super(SQLiteCountBuilder.buildEmbeddedCount(params.source, params.filters).queryChunks);
|
|
@@ -132662,7 +133594,7 @@ class SQLiteCountBuilder extends SQL {
|
|
|
132662
133594
|
}
|
|
132663
133595
|
}
|
|
132664
133596
|
|
|
132665
|
-
// ../../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
|
|
132666
133598
|
class RelationalQueryBuilder {
|
|
132667
133599
|
constructor(mode, fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session) {
|
|
132668
133600
|
this.mode = mode;
|
|
@@ -132756,7 +133688,7 @@ class SQLiteSyncRelationalQuery extends SQLiteRelationalQuery {
|
|
|
132756
133688
|
}
|
|
132757
133689
|
}
|
|
132758
133690
|
|
|
132759
|
-
// ../../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
|
|
132760
133692
|
class SQLiteRaw extends QueryPromise {
|
|
132761
133693
|
constructor(execute, getSQL, action, dialect, mapBatchResult) {
|
|
132762
133694
|
super();
|
|
@@ -132782,7 +133714,7 @@ class SQLiteRaw extends QueryPromise {
|
|
|
132782
133714
|
}
|
|
132783
133715
|
}
|
|
132784
133716
|
|
|
132785
|
-
// ../../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
|
|
132786
133718
|
class BaseSQLiteDatabase {
|
|
132787
133719
|
constructor(resultKind, dialect, session, schema) {
|
|
132788
133720
|
this.resultKind = resultKind;
|
|
@@ -132905,7 +133837,7 @@ class BaseSQLiteDatabase {
|
|
|
132905
133837
|
}
|
|
132906
133838
|
}
|
|
132907
133839
|
|
|
132908
|
-
// ../../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
|
|
132909
133841
|
class Cache2 {
|
|
132910
133842
|
static [entityKind] = "Cache";
|
|
132911
133843
|
}
|
|
@@ -132931,7 +133863,7 @@ async function hashQuery(sql, params) {
|
|
|
132931
133863
|
return hashHex;
|
|
132932
133864
|
}
|
|
132933
133865
|
|
|
132934
|
-
// ../../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
|
|
132935
133867
|
class ExecuteResultSync extends QueryPromise {
|
|
132936
133868
|
constructor(resultCb) {
|
|
132937
133869
|
super();
|
|
@@ -133104,7 +134036,7 @@ class SQLiteTransaction extends BaseSQLiteDatabase {
|
|
|
133104
134036
|
}
|
|
133105
134037
|
}
|
|
133106
134038
|
|
|
133107
|
-
// ../../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
|
|
133108
134040
|
class LibSQLSession extends SQLiteSession {
|
|
133109
134041
|
constructor(client, dialect, schema, options, tx) {
|
|
133110
134042
|
super(dialect);
|
|
@@ -133299,7 +134231,7 @@ function normalizeFieldValue(value) {
|
|
|
133299
134231
|
return value;
|
|
133300
134232
|
}
|
|
133301
134233
|
|
|
133302
|
-
// ../../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
|
|
133303
134235
|
class LibSQLDatabase extends BaseSQLiteDatabase {
|
|
133304
134236
|
static [entityKind] = "LibSQLDatabase";
|
|
133305
134237
|
async batch(batch) {
|
|
@@ -133333,7 +134265,7 @@ function construct(client, config = {}) {
|
|
|
133333
134265
|
return db;
|
|
133334
134266
|
}
|
|
133335
134267
|
|
|
133336
|
-
// ../../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
|
|
133337
134269
|
function drizzle(...params) {
|
|
133338
134270
|
if (typeof params[0] === "string") {
|
|
133339
134271
|
const instance = createClient({
|
|
@@ -133357,7 +134289,7 @@ function drizzle(...params) {
|
|
|
133357
134289
|
drizzle2.mock = mock;
|
|
133358
134290
|
})(drizzle || (drizzle = {}));
|
|
133359
134291
|
|
|
133360
|
-
// ../../node_modules/.bun/drizzle-orm@0.45.4+
|
|
134292
|
+
// ../../node_modules/.bun/drizzle-orm@0.45.4+0c7b544c7f7b61ad/node_modules/drizzle-orm/migrator.js
|
|
133361
134293
|
import crypto4 from "node:crypto";
|
|
133362
134294
|
import fs2 from "node:fs";
|
|
133363
134295
|
function readMigrationFiles(config) {
|
|
@@ -133389,7 +134321,7 @@ function readMigrationFiles(config) {
|
|
|
133389
134321
|
return migrationQueries;
|
|
133390
134322
|
}
|
|
133391
134323
|
|
|
133392
|
-
// ../../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
|
|
133393
134325
|
async function migrate(db, config) {
|
|
133394
134326
|
const migrations = readMigrationFiles(config);
|
|
133395
134327
|
const migrationsTable = config.migrationsTable ?? "__drizzle_migrations";
|