raysurfer 0.3.8 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +11 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/index.d.ts +6 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +543 -377
- package/dist/sdk-client.d.ts.map +1 -1
- package/dist/types.d.ts +30 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -3
package/dist/index.js
CHANGED
|
@@ -13,11 +13,11 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
// node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs
|
|
14
14
|
var exports_sdk = {};
|
|
15
15
|
__export(exports_sdk, {
|
|
16
|
-
unstable_v2_resumeSession: () =>
|
|
17
|
-
unstable_v2_prompt: () =>
|
|
18
|
-
unstable_v2_createSession: () =>
|
|
16
|
+
unstable_v2_resumeSession: () => d_,
|
|
17
|
+
unstable_v2_prompt: () => i_,
|
|
18
|
+
unstable_v2_createSession: () => p_,
|
|
19
19
|
tool: () => jE,
|
|
20
|
-
query: () =>
|
|
20
|
+
query: () => c_,
|
|
21
21
|
createSdkMcpServer: () => RE,
|
|
22
22
|
HOOK_EVENTS: () => hU,
|
|
23
23
|
EXIT_REASONS: () => fU,
|
|
@@ -29,10 +29,10 @@ import { setMaxListeners as GK } from "events";
|
|
|
29
29
|
import { spawn as dU } from "child_process";
|
|
30
30
|
import { createInterface as iU } from "readline";
|
|
31
31
|
import * as f from "fs";
|
|
32
|
-
import { stat as _U, open as
|
|
32
|
+
import { stat as _U, open as XP } from "fs/promises";
|
|
33
33
|
import { join as wU } from "path";
|
|
34
34
|
import { homedir as MU } from "os";
|
|
35
|
-
import { dirname as
|
|
35
|
+
import { dirname as z9, join as $W } from "path";
|
|
36
36
|
import { cwd as jU } from "process";
|
|
37
37
|
import { realpathSync as RU } from "fs";
|
|
38
38
|
import { randomUUID as EU } from "crypto";
|
|
@@ -184,7 +184,7 @@ function w6(X) {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
function KU() {
|
|
187
|
-
this.size = 0, this.__data__ = { hash: new
|
|
187
|
+
this.size = 0, this.__data__ = { hash: new W9, map: new (h7 || g7), string: new W9 };
|
|
188
188
|
}
|
|
189
189
|
function UU(X) {
|
|
190
190
|
var Q = typeof X;
|
|
@@ -216,7 +216,7 @@ function M6(X) {
|
|
|
216
216
|
this.set(Y[0], Y[1]);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function G9(X, Q) {
|
|
220
220
|
if (typeof X != "function" || Q != null && typeof Q != "function")
|
|
221
221
|
throw TypeError(OU);
|
|
222
222
|
var $ = function() {
|
|
@@ -226,7 +226,7 @@ function G8(X, Q) {
|
|
|
226
226
|
var G = X.apply(this, Y);
|
|
227
227
|
return $.cache = J.set(W, G) || J, G;
|
|
228
228
|
};
|
|
229
|
-
return $.cache = new (
|
|
229
|
+
return $.cache = new (G9.Cache || J9), $;
|
|
230
230
|
}
|
|
231
231
|
function d7(X) {
|
|
232
232
|
if (process.stderr.destroyed)
|
|
@@ -275,7 +275,7 @@ function n7(X, Q) {
|
|
|
275
275
|
function V4() {
|
|
276
276
|
return process.env.CLAUDE_CONFIG_DIR ?? wU(MU(), ".claude");
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function H9(X) {
|
|
279
279
|
if (!X)
|
|
280
280
|
return false;
|
|
281
281
|
if (typeof X === "boolean")
|
|
@@ -299,7 +299,7 @@ function IU() {
|
|
|
299
299
|
let X = "";
|
|
300
300
|
if (typeof process < "u" && typeof process.cwd === "function")
|
|
301
301
|
X = RU(jU());
|
|
302
|
-
return { originalCwd: X, projectRoot: X, totalCostUSD: 0, totalAPIDuration: 0, totalAPIDurationWithoutRetries: 0, totalToolDuration: 0, startTime: Date.now(), lastInteractionTime: Date.now(), totalLinesAdded: 0, totalLinesRemoved: 0, hasUnknownModelCost: false, cwd: X, modelUsage: {}, mainLoopModelOverride: undefined, initialMainLoopModel: null, modelStrings: null, isInteractive: false, clientType: "cli", sessionIngressToken: undefined, oauthTokenFromFd: undefined, apiKeyFromFd: undefined, flagSettingsPath: undefined, allowedSettingSources: ["userSettings", "projectSettings", "localSettings", "flagSettings", "policySettings"], meter: null, sessionCounter: null, locCounter: null, prCounter: null, commitCounter: null, costCounter: null, tokenCounter: null, codeEditToolDecisionCounter: null, activeTimeCounter: null, sessionId: EU(), parentSessionId: undefined, loggerProvider: null, eventLogger: null, meterProvider: null, tracerProvider: null, agentColorMap: new Map, agentColorIndex: 0, envVarValidators: [o7, t7], lastAPIRequest: null, inMemoryErrorLog: [], inlinePlugins: [], useCoworkPlugins: false, sessionBypassPermissionsMode: false, sessionTrustAccepted: false, sessionPersistenceDisabled: false, hasExitedPlanMode: false, needsPlanModeExitAttachment: false, hasExitedDelegateMode: false, needsDelegateModeExitAttachment: false, lspRecommendationShownThisSession: false, initJsonSchema: null, registeredHooks: null, planSlugCache: new Map, teleportedSessionInfo: null, invokedSkills: new Map, slowOperations: [], sdkBetas: undefined, mainThreadAgentType: undefined, isRemoteMode: false };
|
|
302
|
+
return { originalCwd: X, projectRoot: X, totalCostUSD: 0, totalAPIDuration: 0, totalAPIDurationWithoutRetries: 0, totalToolDuration: 0, startTime: Date.now(), lastInteractionTime: Date.now(), totalLinesAdded: 0, totalLinesRemoved: 0, hasUnknownModelCost: false, cwd: X, modelUsage: {}, mainLoopModelOverride: undefined, initialMainLoopModel: null, modelStrings: null, isInteractive: false, clientType: "cli", sessionIngressToken: undefined, oauthTokenFromFd: undefined, apiKeyFromFd: undefined, flagSettingsPath: undefined, allowedSettingSources: ["userSettings", "projectSettings", "localSettings", "flagSettings", "policySettings"], meter: null, sessionCounter: null, locCounter: null, prCounter: null, commitCounter: null, costCounter: null, tokenCounter: null, codeEditToolDecisionCounter: null, activeTimeCounter: null, sessionId: EU(), parentSessionId: undefined, loggerProvider: null, eventLogger: null, meterProvider: null, tracerProvider: null, agentColorMap: new Map, agentColorIndex: 0, envVarValidators: [o7, t7], lastAPIRequest: null, inMemoryErrorLog: [], inlinePlugins: [], useCoworkPlugins: false, sessionBypassPermissionsMode: false, sessionTrustAccepted: false, sessionPersistenceDisabled: false, hasExitedPlanMode: false, needsPlanModeExitAttachment: false, hasExitedDelegateMode: false, needsDelegateModeExitAttachment: false, lspRecommendationShownThisSession: false, initJsonSchema: null, registeredHooks: null, planSlugCache: new Map, teleportedSessionInfo: null, invokedSkills: new Map, slowOperations: [], sdkBetas: undefined, mainThreadAgentType: undefined, isRemoteMode: false, resumedTranscriptPath: null };
|
|
303
303
|
}
|
|
304
304
|
function a7() {
|
|
305
305
|
return bU.sessionId;
|
|
@@ -351,7 +351,7 @@ function QW(X, Q) {
|
|
|
351
351
|
try {
|
|
352
352
|
return Q();
|
|
353
353
|
} finally {
|
|
354
|
-
performance.now() - $ >
|
|
354
|
+
performance.now() - $ > B9;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
function Z0(X, Q, $) {
|
|
@@ -368,8 +368,8 @@ function vU() {
|
|
|
368
368
|
if (!q4)
|
|
369
369
|
q4 = s7({ writeFn: (X) => {
|
|
370
370
|
let Q = WW();
|
|
371
|
-
if (!n0().existsSync(
|
|
372
|
-
n0().mkdirSync(
|
|
371
|
+
if (!n0().existsSync(z9(Q)))
|
|
372
|
+
n0().mkdirSync(z9(Q));
|
|
373
373
|
n0().appendFileSync(Q, X), TU();
|
|
374
374
|
}, flushIntervalMs: 1000, maxBufferSize: 100, immediateMode: SU() }), XW(async () => q4?.dispose());
|
|
375
375
|
return q4;
|
|
@@ -396,7 +396,7 @@ function F0(X, Q) {
|
|
|
396
396
|
try {
|
|
397
397
|
return Q();
|
|
398
398
|
} finally {
|
|
399
|
-
performance.now() - $ >
|
|
399
|
+
performance.now() - $ > B9;
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
function n0() {
|
|
@@ -541,8 +541,8 @@ class XX {
|
|
|
541
541
|
d.push("--resume-session-at", this.options.resumeSessionAt);
|
|
542
542
|
if (this.options.persistSession === false)
|
|
543
543
|
d.push("--no-session-persistence");
|
|
544
|
-
let
|
|
545
|
-
for (let [S0, S1] of Object.entries(
|
|
544
|
+
let Q9 = HW(G ?? {}, U6);
|
|
545
|
+
for (let [S0, S1] of Object.entries(Q9))
|
|
546
546
|
if (S1 === null)
|
|
547
547
|
d.push(`--${S0}`);
|
|
548
548
|
else
|
|
@@ -706,7 +706,7 @@ function nU(X) {
|
|
|
706
706
|
return ![".js", ".mjs", ".tsx", ".ts", ".jsx"].some(($) => X.endsWith($));
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
-
class
|
|
709
|
+
class K9 {
|
|
710
710
|
sendMcpMessage;
|
|
711
711
|
isClosed = false;
|
|
712
712
|
constructor(X) {
|
|
@@ -727,11 +727,11 @@ class K8 {
|
|
|
727
727
|
this.isClosed = true, this.onclose?.();
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
|
-
function
|
|
731
|
-
return new
|
|
730
|
+
function V9(X) {
|
|
731
|
+
return new U9(X);
|
|
732
732
|
}
|
|
733
733
|
function zW(X, Q) {
|
|
734
|
-
return new
|
|
734
|
+
return new U9({ ...Q, resume: X });
|
|
735
735
|
}
|
|
736
736
|
function YX() {
|
|
737
737
|
return aU;
|
|
@@ -950,7 +950,7 @@ class p {
|
|
|
950
950
|
return new qX({ ...l(this._def), innerType: this, defaultValue: Q, typeName: j.ZodDefault });
|
|
951
951
|
}
|
|
952
952
|
brand() {
|
|
953
|
-
return new
|
|
953
|
+
return new D9({ typeName: j.ZodBranded, type: this, ...l(this._def) });
|
|
954
954
|
}
|
|
955
955
|
catch(X) {
|
|
956
956
|
let Q = typeof X === "function" ? X : () => X;
|
|
@@ -1048,14 +1048,14 @@ function E6(X) {
|
|
|
1048
1048
|
else
|
|
1049
1049
|
return X;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function N9(X, Q) {
|
|
1052
1052
|
let $ = O1(X), Y = O1(Q);
|
|
1053
1053
|
if (X === Q)
|
|
1054
1054
|
return { valid: true, data: X };
|
|
1055
1055
|
else if ($ === E.object && Y === E.object) {
|
|
1056
1056
|
let W = n.objectKeys(Q), J = n.objectKeys(X).filter((H) => W.indexOf(H) !== -1), G = { ...X, ...Q };
|
|
1057
1057
|
for (let H of J) {
|
|
1058
|
-
let B =
|
|
1058
|
+
let B = N9(X[H], Q[H]);
|
|
1059
1059
|
if (!B.valid)
|
|
1060
1060
|
return { valid: false };
|
|
1061
1061
|
G[H] = B.data;
|
|
@@ -1066,7 +1066,7 @@ function N8(X, Q) {
|
|
|
1066
1066
|
return { valid: false };
|
|
1067
1067
|
let W = [];
|
|
1068
1068
|
for (let J = 0;J < X.length; J++) {
|
|
1069
|
-
let G = X[J], H = Q[J], B =
|
|
1069
|
+
let G = X[J], H = Q[J], B = N9(G, H);
|
|
1070
1070
|
if (!B.valid)
|
|
1071
1071
|
return { valid: false };
|
|
1072
1072
|
W.push(B.data);
|
|
@@ -1131,7 +1131,7 @@ function DX(X) {
|
|
|
1131
1131
|
function b4(X, Q = "|") {
|
|
1132
1132
|
return X.map(($) => S4($)).join(Q);
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1134
|
+
function w9(X, Q) {
|
|
1135
1135
|
if (typeof Q === "bigint")
|
|
1136
1136
|
return Q.toString();
|
|
1137
1137
|
return Q;
|
|
@@ -1152,7 +1152,7 @@ function MX(X) {
|
|
|
1152
1152
|
let Q = X.startsWith("^") ? 1 : 0, $ = X.endsWith("$") ? X.length - 1 : X.length;
|
|
1153
1153
|
return X.slice(Q, $);
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function M9(X, Q) {
|
|
1156
1156
|
let $ = (X.toString().split(".")[1] || "").length, Y = (Q.toString().split(".")[1] || "").length, W = $ > Y ? $ : Y, J = Number.parseInt(X.toFixed(W).replace(".", "")), G = Number.parseInt(Q.toFixed(W).replace(".", ""));
|
|
1157
1157
|
return J % G / 10 ** W;
|
|
1158
1158
|
}
|
|
@@ -1167,7 +1167,7 @@ function Y0(X, Q, $) {
|
|
|
1167
1167
|
Object.defineProperty(X, Q, { value: W });
|
|
1168
1168
|
}, configurable: true });
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function j9(X, Q, $) {
|
|
1171
1171
|
Object.defineProperty(X, Q, { value: $, writable: true, enumerable: true, configurable: true });
|
|
1172
1172
|
}
|
|
1173
1173
|
function PV(X, Q) {
|
|
@@ -1265,7 +1265,7 @@ function S4(X) {
|
|
|
1265
1265
|
return `"${X}"`;
|
|
1266
1266
|
return `${X}`;
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function I9(X) {
|
|
1269
1269
|
return Object.keys(X).filter((Q) => {
|
|
1270
1270
|
return X[Q]._zod.optin === "optional" && X[Q]._zod.optout === "optional";
|
|
1271
1271
|
});
|
|
@@ -1297,14 +1297,14 @@ function xV(X, Q) {
|
|
|
1297
1297
|
throw Error("Invalid input to extend: expected a plain object");
|
|
1298
1298
|
let $ = { ...X._zod.def, get shape() {
|
|
1299
1299
|
let Y = { ...X._zod.def.shape, ...Q };
|
|
1300
|
-
return
|
|
1300
|
+
return j9(this, "shape", Y), Y;
|
|
1301
1301
|
}, checks: [] };
|
|
1302
1302
|
return l0(X, $);
|
|
1303
1303
|
}
|
|
1304
1304
|
function yV(X, Q) {
|
|
1305
1305
|
return l0(X, { ...X._zod.def, get shape() {
|
|
1306
1306
|
let $ = { ...X._zod.def.shape, ...Q._zod.def.shape };
|
|
1307
|
-
return
|
|
1307
|
+
return j9(this, "shape", $), $;
|
|
1308
1308
|
}, catchall: Q._zod.def.catchall, checks: [] });
|
|
1309
1309
|
}
|
|
1310
1310
|
function gV(X, Q, $) {
|
|
@@ -1378,7 +1378,7 @@ function jX(X) {
|
|
|
1378
1378
|
return "string";
|
|
1379
1379
|
return "unknown";
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function P9(...X) {
|
|
1382
1382
|
let [Q, $, Y] = X;
|
|
1383
1383
|
if (typeof Q === "string")
|
|
1384
1384
|
return { message: Q, code: "custom", input: $, inst: Y };
|
|
@@ -1393,7 +1393,7 @@ function fV(X) {
|
|
|
1393
1393
|
class AW {
|
|
1394
1394
|
constructor(...X) {}
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function S9(X, Q = ($) => $.message) {
|
|
1397
1397
|
let $ = {}, Y = [];
|
|
1398
1398
|
for (let W of X.issues)
|
|
1399
1399
|
if (W.path.length > 0)
|
|
@@ -1402,7 +1402,7 @@ function S8(X, Q = ($) => $.message) {
|
|
|
1402
1402
|
Y.push(Q(W));
|
|
1403
1403
|
return { formErrors: Y, fieldErrors: $ };
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function Z9(X, Q) {
|
|
1406
1406
|
let $ = Q || function(J) {
|
|
1407
1407
|
return J.message;
|
|
1408
1408
|
}, Y = { _errors: [] }, W = (J) => {
|
|
@@ -1448,7 +1448,7 @@ function mW(X) {
|
|
|
1448
1448
|
return new RegExp(`^${hW}T(?:${Y})$`);
|
|
1449
1449
|
}
|
|
1450
1450
|
|
|
1451
|
-
class
|
|
1451
|
+
class u9 {
|
|
1452
1452
|
constructor(X = []) {
|
|
1453
1453
|
if (this.content = [], this.indent = 0, this)
|
|
1454
1454
|
this.args = X;
|
|
@@ -1484,7 +1484,7 @@ function EJ(X) {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
}
|
|
1486
1486
|
function lV(X) {
|
|
1487
|
-
if (!
|
|
1487
|
+
if (!g9.test(X))
|
|
1488
1488
|
return false;
|
|
1489
1489
|
let Q = X.replace(/[-_]/g, (Y) => Y === "-" ? "+" : "/"), $ = Q.padEnd(Math.ceil(Q.length / 4) * 4, "=");
|
|
1490
1490
|
return EJ($);
|
|
@@ -1540,7 +1540,7 @@ function LJ(X, Q, $, Y) {
|
|
|
1540
1540
|
return Q.value = W.value, Q;
|
|
1541
1541
|
return Q.issues.push({ code: "invalid_union", input: Q.value, inst: $, errors: X.map((W) => W.issues.map((J) => o0(J, Y, u0()))) }), Q;
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function l9(X, Q) {
|
|
1544
1544
|
if (X === Q)
|
|
1545
1545
|
return { valid: true, data: X };
|
|
1546
1546
|
if (X instanceof Date && Q instanceof Date && +X === +Q)
|
|
@@ -1548,7 +1548,7 @@ function l8(X, Q) {
|
|
|
1548
1548
|
if (C6(X) && C6(Q)) {
|
|
1549
1549
|
let $ = Object.keys(Q), Y = Object.keys(X).filter((J) => $.indexOf(J) !== -1), W = { ...X, ...Q };
|
|
1550
1550
|
for (let J of Y) {
|
|
1551
|
-
let G =
|
|
1551
|
+
let G = l9(X[J], Q[J]);
|
|
1552
1552
|
if (!G.valid)
|
|
1553
1553
|
return { valid: false, mergeErrorPath: [J, ...G.mergeErrorPath] };
|
|
1554
1554
|
W[J] = G.data;
|
|
@@ -1560,7 +1560,7 @@ function l8(X, Q) {
|
|
|
1560
1560
|
return { valid: false, mergeErrorPath: [] };
|
|
1561
1561
|
let $ = [];
|
|
1562
1562
|
for (let Y = 0;Y < X.length; Y++) {
|
|
1563
|
-
let W = X[Y], J = Q[Y], G =
|
|
1563
|
+
let W = X[Y], J = Q[Y], G = l9(W, J);
|
|
1564
1564
|
if (!G.valid)
|
|
1565
1565
|
return { valid: false, mergeErrorPath: [Y, ...G.mergeErrorPath] };
|
|
1566
1566
|
$.push(G.data);
|
|
@@ -1576,7 +1576,7 @@ function qJ(X, Q, $) {
|
|
|
1576
1576
|
X.issues.push(...$.issues);
|
|
1577
1577
|
if (e1(X))
|
|
1578
1578
|
return X;
|
|
1579
|
-
let Y =
|
|
1579
|
+
let Y = l9(Q.value, $.value);
|
|
1580
1580
|
if (!Y.valid)
|
|
1581
1581
|
throw Error(`Unmergable intersection. Error path: ${JSON.stringify(Y.mergeErrorPath)}`);
|
|
1582
1582
|
return X.value = Y.data, X;
|
|
@@ -1604,7 +1604,7 @@ function AJ(X, Q, $, Y) {
|
|
|
1604
1604
|
let W = { code: "custom", input: $, inst: Y, path: [...Y._zod.def.path ?? []], continue: !Y._zod.def.abort };
|
|
1605
1605
|
if (Y._zod.def.params)
|
|
1606
1606
|
W.params = Y._zod.def.params;
|
|
1607
|
-
Q.issues.push(
|
|
1607
|
+
Q.issues.push(P9(W));
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
1610
|
function SQ() {
|
|
@@ -1742,16 +1742,16 @@ function $$(X, Q) {
|
|
|
1742
1742
|
return new X({ type: "never", ...y(Q) });
|
|
1743
1743
|
}
|
|
1744
1744
|
function g4(X, Q) {
|
|
1745
|
-
return new
|
|
1745
|
+
return new h9({ check: "less_than", ...y(Q), value: X, inclusive: false });
|
|
1746
1746
|
}
|
|
1747
1747
|
function bX(X, Q) {
|
|
1748
|
-
return new
|
|
1748
|
+
return new h9({ check: "less_than", ...y(Q), value: X, inclusive: true });
|
|
1749
1749
|
}
|
|
1750
1750
|
function h4(X, Q) {
|
|
1751
|
-
return new
|
|
1751
|
+
return new f9({ check: "greater_than", ...y(Q), value: X, inclusive: false });
|
|
1752
1752
|
}
|
|
1753
1753
|
function PX(X, Q) {
|
|
1754
|
-
return new
|
|
1754
|
+
return new f9({ check: "greater_than", ...y(Q), value: X, inclusive: true });
|
|
1755
1755
|
}
|
|
1756
1756
|
function f4(X, Q) {
|
|
1757
1757
|
return new aW({ check: "multiple_of", ...y(Q), value: X });
|
|
@@ -2633,7 +2633,7 @@ function B0(X) {
|
|
|
2633
2633
|
if (X.target !== "openAi")
|
|
2634
2634
|
return {};
|
|
2635
2635
|
let Q = [...X.basePath, X.definitionPath, X.openAiAnyTypeName];
|
|
2636
|
-
return X.flags.hasReferencedOpenAiAnyType = true, { $ref: X.$refStrategy === "relative" ?
|
|
2636
|
+
return X.flags.hasReferencedOpenAiAnyType = true, { $ref: X.$refStrategy === "relative" ? q8(Q, X.currentPath) : Q.join("/") };
|
|
2637
2637
|
}
|
|
2638
2638
|
function I5(X, Q) {
|
|
2639
2639
|
let $ = { type: "array" };
|
|
@@ -2686,7 +2686,7 @@ function b5(X, Q) {
|
|
|
2686
2686
|
function P5() {
|
|
2687
2687
|
return { type: "boolean" };
|
|
2688
2688
|
}
|
|
2689
|
-
function
|
|
2689
|
+
function F8(X, Q) {
|
|
2690
2690
|
return h(X.type._def, Q);
|
|
2691
2691
|
}
|
|
2692
2692
|
function c$(X, Q, $) {
|
|
@@ -2737,7 +2737,7 @@ function T5(X, Q) {
|
|
|
2737
2737
|
return { type: $ === "bigint" ? "integer" : $, enum: [X.value] };
|
|
2738
2738
|
return { type: $ === "bigint" ? "integer" : $, const: X.value };
|
|
2739
2739
|
}
|
|
2740
|
-
function
|
|
2740
|
+
function N8(X, Q) {
|
|
2741
2741
|
let $ = { type: "string" };
|
|
2742
2742
|
if (X.checks)
|
|
2743
2743
|
for (let Y of X.checks)
|
|
@@ -2952,7 +2952,7 @@ function _5(X, Q) {
|
|
|
2952
2952
|
}
|
|
2953
2953
|
return W;
|
|
2954
2954
|
}
|
|
2955
|
-
function
|
|
2955
|
+
function O8(X, Q) {
|
|
2956
2956
|
if (Q.target === "openAi")
|
|
2957
2957
|
console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.");
|
|
2958
2958
|
if (Q.target === "openApi3" && X.keyType?._def.typeName === j.ZodEnum)
|
|
@@ -2961,19 +2961,19 @@ function O9(X, Q) {
|
|
|
2961
2961
|
if (Q.target === "openApi3")
|
|
2962
2962
|
return $;
|
|
2963
2963
|
if (X.keyType?._def.typeName === j.ZodString && X.keyType._def.checks?.length) {
|
|
2964
|
-
let { type: Y, ...W } =
|
|
2964
|
+
let { type: Y, ...W } = N8(X.keyType._def, Q);
|
|
2965
2965
|
return { ...$, propertyNames: W };
|
|
2966
2966
|
} else if (X.keyType?._def.typeName === j.ZodEnum)
|
|
2967
2967
|
return { ...$, propertyNames: { enum: X.keyType._def.values } };
|
|
2968
2968
|
else if (X.keyType?._def.typeName === j.ZodBranded && X.keyType._def.type._def.typeName === j.ZodString && X.keyType._def.type._def.checks?.length) {
|
|
2969
|
-
let { type: Y, ...W } =
|
|
2969
|
+
let { type: Y, ...W } = F8(X.keyType._def, Q);
|
|
2970
2970
|
return { ...$, propertyNames: W };
|
|
2971
2971
|
}
|
|
2972
2972
|
return $;
|
|
2973
2973
|
}
|
|
2974
2974
|
function x5(X, Q) {
|
|
2975
2975
|
if (Q.mapStrategy === "record")
|
|
2976
|
-
return
|
|
2976
|
+
return O8(X, Q);
|
|
2977
2977
|
let $ = h(X.keyType._def, { ...Q, currentPath: [...Q.currentPath, "items", "items", "0"] }) || B0(Q), Y = h(X.valueType._def, { ...Q, currentPath: [...Q.currentPath, "items", "items", "1"] }) || B0(Q);
|
|
2978
2978
|
return { type: "array", maxItems: 125, items: { type: "array", items: [$, Y], minItems: 2, maxItems: 2 } };
|
|
2979
2979
|
}
|
|
@@ -3213,12 +3213,12 @@ class t$ {
|
|
|
3213
3213
|
}), this.setNotificationHandler(e4, (Q) => {
|
|
3214
3214
|
this._onprogress(Q);
|
|
3215
3215
|
}), this.setRequestHandler(s4, (Q) => ({})), this._taskStore = X === null || X === undefined ? undefined : X.taskStore, this._taskMessageQueue = X === null || X === undefined ? undefined : X.taskMessageQueue, this._taskStore)
|
|
3216
|
-
this.setRequestHandler(
|
|
3216
|
+
this.setRequestHandler(X8, async (Q, $) => {
|
|
3217
3217
|
let Y = await this._taskStore.getTask(Q.params.taskId, $.sessionId);
|
|
3218
3218
|
if (!Y)
|
|
3219
3219
|
throw new k(x.InvalidParams, "Failed to retrieve task: Task not found");
|
|
3220
3220
|
return { ...Y };
|
|
3221
|
-
}), this.setRequestHandler($
|
|
3221
|
+
}), this.setRequestHandler($8, async (Q, $) => {
|
|
3222
3222
|
let Y = async () => {
|
|
3223
3223
|
var W;
|
|
3224
3224
|
let J = Q.params.taskId;
|
|
@@ -3255,7 +3255,7 @@ class t$ {
|
|
|
3255
3255
|
return await Y();
|
|
3256
3256
|
};
|
|
3257
3257
|
return await Y();
|
|
3258
|
-
}), this.setRequestHandler(
|
|
3258
|
+
}), this.setRequestHandler(Y8, async (Q, $) => {
|
|
3259
3259
|
var Y;
|
|
3260
3260
|
try {
|
|
3261
3261
|
let { tasks: W, nextCursor: J } = await this._taskStore.listTasks((Y = Q.params) === null || Y === undefined ? undefined : Y.cursor, $.sessionId);
|
|
@@ -3569,13 +3569,13 @@ class t$ {
|
|
|
3569
3569
|
});
|
|
3570
3570
|
}
|
|
3571
3571
|
async getTask(X, Q) {
|
|
3572
|
-
return this.request({ method: "tasks/get", params: X },
|
|
3572
|
+
return this.request({ method: "tasks/get", params: X }, Q8, Q);
|
|
3573
3573
|
}
|
|
3574
3574
|
async getTaskResult(X, Q, $) {
|
|
3575
3575
|
return this.request({ method: "tasks/result", params: X }, Q, $);
|
|
3576
3576
|
}
|
|
3577
3577
|
async listTasks(X, Q) {
|
|
3578
|
-
return this.request({ method: "tasks/list", params: X },
|
|
3578
|
+
return this.request({ method: "tasks/list", params: X }, W8, Q);
|
|
3579
3579
|
}
|
|
3580
3580
|
async cancelTask(X, Q) {
|
|
3581
3581
|
return this.request({ method: "tasks/cancel", params: X }, V5, Q);
|
|
@@ -3877,7 +3877,7 @@ class J7 {
|
|
|
3877
3877
|
setToolRequestHandlers() {
|
|
3878
3878
|
if (this._toolHandlersInitialized)
|
|
3879
3879
|
return;
|
|
3880
|
-
this.server.assertCanSetRequestHandler(n1(
|
|
3880
|
+
this.server.assertCanSetRequestHandler(n1(K8)), this.server.assertCanSetRequestHandler(n1(g6)), this.server.registerCapabilities({ tools: { listChanged: true } }), this.server.setRequestHandler(K8, () => ({ tools: Object.entries(this._registeredTools).filter(([, X]) => X.enabled).map(([X, Q]) => {
|
|
3881
3881
|
let $ = { name: X, title: Q.title, description: Q.description, inputSchema: (() => {
|
|
3882
3882
|
let Y = T6(Q.inputSchema);
|
|
3883
3883
|
return Y ? n$(Y, { strictUnions: true, pipeStrategy: "input" }) : AE;
|
|
@@ -3977,7 +3977,7 @@ class J7 {
|
|
|
3977
3977
|
setCompletionRequestHandler() {
|
|
3978
3978
|
if (this._completionHandlerInitialized)
|
|
3979
3979
|
return;
|
|
3980
|
-
this.server.assertCanSetRequestHandler(n1(
|
|
3980
|
+
this.server.assertCanSetRequestHandler(n1(L8)), this.server.registerCapabilities({ completions: {} }), this.server.setRequestHandler(L8, async (X) => {
|
|
3981
3981
|
switch (X.params.ref.type) {
|
|
3982
3982
|
case "ref/prompt":
|
|
3983
3983
|
return D5(X), this.handlePromptCompletion(X, X.params.ref);
|
|
@@ -4021,7 +4021,7 @@ class J7 {
|
|
|
4021
4021
|
setResourceRequestHandlers() {
|
|
4022
4022
|
if (this._resourceHandlersInitialized)
|
|
4023
4023
|
return;
|
|
4024
|
-
this.server.assertCanSetRequestHandler(n1(
|
|
4024
|
+
this.server.assertCanSetRequestHandler(n1(J8)), this.server.assertCanSetRequestHandler(n1(G8)), this.server.assertCanSetRequestHandler(n1(H8)), this.server.registerCapabilities({ resources: { listChanged: true } }), this.server.setRequestHandler(J8, async (X, Q) => {
|
|
4025
4025
|
let $ = Object.entries(this._registeredResources).filter(([W, J]) => J.enabled).map(([W, J]) => ({ uri: W, name: J.name, ...J.metadata })), Y = [];
|
|
4026
4026
|
for (let W of Object.values(this._registeredResourceTemplates)) {
|
|
4027
4027
|
if (!W.resourceTemplate.listCallback)
|
|
@@ -4031,9 +4031,9 @@ class J7 {
|
|
|
4031
4031
|
Y.push({ ...W.metadata, ...G });
|
|
4032
4032
|
}
|
|
4033
4033
|
return { resources: [...$, ...Y] };
|
|
4034
|
-
}), this.server.setRequestHandler(
|
|
4034
|
+
}), this.server.setRequestHandler(G8, async () => {
|
|
4035
4035
|
return { resourceTemplates: Object.entries(this._registeredResourceTemplates).map(([Q, $]) => ({ name: Q, uriTemplate: $.resourceTemplate.uriTemplate.toString(), ...$.metadata })) };
|
|
4036
|
-
}), this.server.setRequestHandler(
|
|
4036
|
+
}), this.server.setRequestHandler(H8, async (X, Q) => {
|
|
4037
4037
|
let $ = new URL(X.params.uri), Y = this._registeredResources[$.toString()];
|
|
4038
4038
|
if (Y) {
|
|
4039
4039
|
if (!Y.enabled)
|
|
@@ -4051,9 +4051,9 @@ class J7 {
|
|
|
4051
4051
|
setPromptRequestHandlers() {
|
|
4052
4052
|
if (this._promptHandlersInitialized)
|
|
4053
4053
|
return;
|
|
4054
|
-
this.server.assertCanSetRequestHandler(n1(
|
|
4054
|
+
this.server.assertCanSetRequestHandler(n1(B8)), this.server.assertCanSetRequestHandler(n1(z8)), this.server.registerCapabilities({ prompts: { listChanged: true } }), this.server.setRequestHandler(B8, () => ({ prompts: Object.entries(this._registeredPrompts).filter(([, X]) => X.enabled).map(([X, Q]) => {
|
|
4055
4055
|
return { name: X, title: Q.title, description: Q.description, arguments: Q.argsSchema ? ME(Q.argsSchema) : undefined };
|
|
4056
|
-
}) })), this.server.setRequestHandler(
|
|
4056
|
+
}) })), this.server.setRequestHandler(z8, async (X, Q) => {
|
|
4057
4057
|
let $ = this._registeredPrompts[X.params.name];
|
|
4058
4058
|
if (!$)
|
|
4059
4059
|
throw new k(x.InvalidParams, `Prompt ${X.params.name} not found`);
|
|
@@ -4304,7 +4304,7 @@ function RE(X) {
|
|
|
4304
4304
|
});
|
|
4305
4305
|
return { type: "sdk", name: X.name, instance: Q };
|
|
4306
4306
|
}
|
|
4307
|
-
function
|
|
4307
|
+
function c_({ prompt: X, options: Q }) {
|
|
4308
4308
|
let { systemPrompt: $, settingSources: Y, sandbox: W, ...J } = Q ?? {}, G, H;
|
|
4309
4309
|
if ($ === undefined)
|
|
4310
4310
|
G = "";
|
|
@@ -4317,8 +4317,8 @@ function u_({ prompt: X, options: Q }) {
|
|
|
4317
4317
|
let q6 = EE(import.meta.url), F6 = rz(q6, "..");
|
|
4318
4318
|
B = rz(F6, "cli.js");
|
|
4319
4319
|
}
|
|
4320
|
-
process.env.CLAUDE_AGENT_SDK_VERSION = "0.2.
|
|
4321
|
-
let { abortController: z = N6(), additionalDirectories: K = [], agent: V, agents: L, allowedTools: U = [], betas: F, canUseTool: q, continue: N, cwd: A, disallowedTools: M = [], tools: R, env: S, executable: C = j6() ? "bun" : "node", executableArgs: K0 = [], extraArgs: U0 = {}, fallbackModel: s, enableFileCheckpointing: D0, forkSession: q0, hooks: W1, includePartialMessages: P1, persistSession: U6, maxThinkingTokens: d, maxTurns:
|
|
4320
|
+
process.env.CLAUDE_AGENT_SDK_VERSION = "0.2.19";
|
|
4321
|
+
let { abortController: z = N6(), additionalDirectories: K = [], agent: V, agents: L, allowedTools: U = [], betas: F, canUseTool: q, continue: N, cwd: A, disallowedTools: M = [], tools: R, env: S, executable: C = j6() ? "bun" : "node", executableArgs: K0 = [], extraArgs: U0 = {}, fallbackModel: s, enableFileCheckpointing: D0, forkSession: q0, hooks: W1, includePartialMessages: P1, persistSession: U6, maxThinkingTokens: d, maxTurns: Q9, maxBudgetUsd: o6, mcpServers: V6, model: t6, outputFormat: a6, permissionMode: B4 = "default", allowDangerouslySkipPermissions: S0 = false, permissionPromptToolName: S1, plugins: s6, resume: oz, resumeSessionAt: tz, stderr: az, strictMcpConfig: sz } = J, G7 = a6?.type === "json_schema" ? a6.schema : undefined, L6 = S;
|
|
4322
4322
|
if (!L6)
|
|
4323
4323
|
L6 = { ...process.env };
|
|
4324
4324
|
if (!L6.CLAUDE_CODE_ENTRYPOINT)
|
|
@@ -4327,14 +4327,14 @@ function u_({ prompt: X, options: Q }) {
|
|
|
4327
4327
|
L6.CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING = "true";
|
|
4328
4328
|
if (!B)
|
|
4329
4329
|
throw Error("pathToClaudeCodeExecutable is required");
|
|
4330
|
-
let $
|
|
4330
|
+
let $9 = {}, H7 = new Map;
|
|
4331
4331
|
if (V6)
|
|
4332
4332
|
for (let [q6, F6] of Object.entries(V6))
|
|
4333
4333
|
if (F6.type === "sdk" && "instance" in F6)
|
|
4334
|
-
H7.set(q6, F6.instance), $
|
|
4334
|
+
H7.set(q6, F6.instance), $9[q6] = { type: "sdk", name: q6 };
|
|
4335
4335
|
else
|
|
4336
|
-
$
|
|
4337
|
-
let ez = typeof X === "string", B7 = new XX({ abortController: z, additionalDirectories: K, agent: V, betas: F, cwd: A, executable: C, executableArgs: K0, extraArgs: U0, pathToClaudeCodeExecutable: B, env: L6, forkSession: q0, stderr: az, maxThinkingTokens: d, maxTurns:
|
|
4336
|
+
$9[q6] = F6;
|
|
4337
|
+
let ez = typeof X === "string", B7 = new XX({ abortController: z, additionalDirectories: K, agent: V, betas: F, cwd: A, executable: C, executableArgs: K0, extraArgs: U0, pathToClaudeCodeExecutable: B, env: L6, forkSession: q0, stderr: az, maxThinkingTokens: d, maxTurns: Q9, maxBudgetUsd: o6, model: t6, fallbackModel: s, jsonSchema: G7, permissionMode: B4, allowDangerouslySkipPermissions: S0, permissionPromptToolName: S1, continueConversation: N, resume: oz, resumeSessionAt: tz, settingSources: Y ?? [], allowedTools: U, disallowedTools: M, tools: R, mcpServers: $9, strictMcpConfig: sz, canUseTool: !!q, hooks: !!W1, includePartialMessages: P1, persistSession: U6, plugins: s6, sandbox: W, spawnClaudeCodeProcess: J.spawnClaudeCodeProcess }), z7 = new $X(B7, ez, q, W1, z, H7, G7, { systemPrompt: G, appendSystemPrompt: H, agents: L });
|
|
4338
4338
|
if (typeof X === "string")
|
|
4339
4339
|
B7.write(Z0({ type: "user", session_id: "", message: { role: "user", content: [{ type: "text", text: X }] }, parent_tool_use_id: null }) + `
|
|
4340
4340
|
`);
|
|
@@ -4342,16 +4342,16 @@ function u_({ prompt: X, options: Q }) {
|
|
|
4342
4342
|
z7.streamInput(X);
|
|
4343
4343
|
return z7;
|
|
4344
4344
|
}
|
|
4345
|
-
function
|
|
4346
|
-
return
|
|
4345
|
+
function p_(X) {
|
|
4346
|
+
return V9(X);
|
|
4347
4347
|
}
|
|
4348
|
-
function
|
|
4348
|
+
function d_(X, Q) {
|
|
4349
4349
|
return zW(X, Q);
|
|
4350
4350
|
}
|
|
4351
|
-
async function
|
|
4351
|
+
async function i_(X, Q) {
|
|
4352
4352
|
let Y = [];
|
|
4353
4353
|
try {
|
|
4354
|
-
const $ = V7(Y,
|
|
4354
|
+
const $ = V7(Y, V9(Q), 1);
|
|
4355
4355
|
await $.send(X);
|
|
4356
4356
|
for await (let B of $.stream())
|
|
4357
4357
|
if (B.type === "result")
|
|
@@ -4364,16 +4364,16 @@ async function c_(X, Q) {
|
|
|
4364
4364
|
H && await H;
|
|
4365
4365
|
}
|
|
4366
4366
|
}
|
|
4367
|
-
var XK, QK,
|
|
4367
|
+
var XK, QK, Y9, $K, YK, K7 = (X, Q, $) => {
|
|
4368
4368
|
$ = X != null ? XK(QK(X)) : {};
|
|
4369
|
-
let Y = Q || !X || !X.__esModule ?
|
|
4369
|
+
let Y = Q || !X || !X.__esModule ? Y9($, "default", { value: X, enumerable: true }) : $;
|
|
4370
4370
|
for (let W of $K(X))
|
|
4371
4371
|
if (!YK.call(Y, W))
|
|
4372
|
-
|
|
4372
|
+
Y9(Y, W, { get: () => X[W], enumerable: true });
|
|
4373
4373
|
return Y;
|
|
4374
4374
|
}, P = (X, Q) => () => (Q || X((Q = { exports: {} }).exports, Q), Q.exports), U7 = (X, Q) => {
|
|
4375
4375
|
for (var $ in Q)
|
|
4376
|
-
|
|
4376
|
+
Y9(X, $, { get: Q[$], enumerable: true, configurable: true, set: (Y) => Q[$] = () => Y });
|
|
4377
4377
|
}, WK, JK, V7 = (X, Q, $) => {
|
|
4378
4378
|
if (Q != null) {
|
|
4379
4379
|
if (typeof Q !== "object" && typeof Q !== "function")
|
|
@@ -4405,10 +4405,10 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4405
4405
|
throw Q;
|
|
4406
4406
|
};
|
|
4407
4407
|
return J();
|
|
4408
|
-
}, fX, $Y, c, e, R1, lX, lG, KY, UY, mX, $3, d0, U3, F3, DY, D3, cX, iX,
|
|
4408
|
+
}, fX, $Y, c, e, R1, lX, lG, KY, UY, mX, $3, d0, U3, F3, DY, D3, cX, iX, v8, nX, _8, r3, t3, WH, KH, VH, FH, RH, IH, kH, TH, xH, gH, uH, mH, pH, iH, rH, tH, d8, XB, $B, WB, GB, yY, gY, FB, DB, wB, bB, ZB, fY, _B, fB, lB, cB, dB, nB, aB, eB, Qz, Yz, Jz, Bz, Uz, Fz, Dz, Az, cY, Cz, vz, yz, HK = 50, BK, q7, zK, KK, O6, UK, D6, F7, VK, LK, e6, N7, FK, NK, O7, DK = "[object Null]", AK = "[object Undefined]", D7, A7, z4, jK = "[object AsyncFunction]", RK = "[object Function]", EK = "[object GeneratorFunction]", IK = "[object Proxy]", w7, PK, K4, M7, j7, ZK, CK, R7, vK, TK, _K, xK, yK, gK, hK, E7, I7, U4, mK, q1, b7, P7, dK = "__lodash_hash_undefined__", iK, nK, S7, oK, tK, Z7, sK = "__lodash_hash_undefined__", C7, W9, k7, v7, Z1, YU, WU, T7, _7, x7, y7, g7, zU, h7, f7, u7, C1, l7, m7, c7, p7, J9, OU = "Expected a function", r1, i7, o7, Db, t7, bU, e7, B9, L4 = (X, Q) => {
|
|
4409
4409
|
let $ = typeof X === "string" ? X.length : 0;
|
|
4410
4410
|
return QW(`JSON.parse(${$} chars)`, () => JSON.parse(X, Q));
|
|
4411
|
-
}, SU, ZU, YW, kU = false, q4 = null, TU, yU, gU, hU, fU, F1, F4 = null, GW = false, QX, $X,
|
|
4411
|
+
}, SU, ZU, YW, kU = false, q4 = null, TU, yU, gU, hU, fU, F1, F4 = null, GW = false, QX, $X, U9, n, KW, E, O1 = (X) => {
|
|
4412
4412
|
switch (typeof X) {
|
|
4413
4413
|
case "undefined":
|
|
4414
4414
|
return E.undefined;
|
|
@@ -4542,7 +4542,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4542
4542
|
for (let z of B)
|
|
4543
4543
|
H = z(G, { data: Q, defaultError: H }).message;
|
|
4544
4544
|
return { ...W, path: J, message: H };
|
|
4545
|
-
}, g, R6 = (X) => ({ status: "dirty", value: X }), C0 = (X) => ({ status: "valid", value: X }),
|
|
4545
|
+
}, g, R6 = (X) => ({ status: "dirty", value: X }), C0 = (X) => ({ status: "valid", value: X }), L9 = (X) => X.status === "aborted", q9 = (X) => X.status === "dirty", o1 = (X) => X.status === "valid", WX = (X) => typeof Promise < "u" && X instanceof Promise, Z, UW = (X, Q) => {
|
|
4546
4546
|
if (o1(Q))
|
|
4547
4547
|
return { success: true, data: Q.value };
|
|
4548
4548
|
else {
|
|
@@ -4555,7 +4555,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4555
4555
|
return this._error = $, this._error;
|
|
4556
4556
|
} };
|
|
4557
4557
|
}
|
|
4558
|
-
}, sU, eU, XV, QV, $V, YV, WV, JV, GV = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
|
|
4558
|
+
}, sU, eU, XV, QV, $V, YV, WV, JV, GV = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", F9, HV, BV, zV, KV, UV, VV, VW = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", LV, A1, I6, b6, O4, GX, D4, HX, BX, A4, t1, w1, w4, J1, V0, zX, D1 = (X) => {
|
|
4559
4559
|
if (X instanceof UX)
|
|
4560
4560
|
return D1(X.schema);
|
|
4561
4561
|
else if (X instanceof H1)
|
|
@@ -4576,7 +4576,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4576
4576
|
return [undefined, ...D1(X.unwrap())];
|
|
4577
4577
|
else if (X instanceof T1)
|
|
4578
4578
|
return [null, ...D1(X.unwrap())];
|
|
4579
|
-
else if (X instanceof
|
|
4579
|
+
else if (X instanceof D9)
|
|
4580
4580
|
return D1(X.unwrap());
|
|
4581
4581
|
else if (X instanceof NX)
|
|
4582
4582
|
return D1(X.unwrap());
|
|
@@ -4584,7 +4584,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4584
4584
|
return D1(X._def.innerType);
|
|
4585
4585
|
else
|
|
4586
4586
|
return [];
|
|
4587
|
-
},
|
|
4587
|
+
}, O9, KX, M1, M4, j4, P6, JX, UX, VX, a1, LX, S6, H1, G1, T1, qX, FX, R4, V2, D9, E4, NX, L2, j, q2, F2, N2, O2, D2, A2, w2, M2, j2, R2, E2, I2, b2, P2, FW, S2, Z2, C2, k2, v2, T2, _2, x2, y2, g2, h2, f2, u2, l2, m2, c2, p2, d2, i2, wV, MV, _1, I4, i, P4, R9, kV = (X) => {
|
|
4588
4588
|
let Q = typeof X;
|
|
4589
4589
|
switch (Q) {
|
|
4590
4590
|
case "undefined":
|
|
@@ -4620,11 +4620,11 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4620
4620
|
default:
|
|
4621
4621
|
throw Error(`Unknown data type: ${Q}`);
|
|
4622
4622
|
}
|
|
4623
|
-
},
|
|
4623
|
+
}, E9, NW, b9, OW, wW = (X, Q) => {
|
|
4624
4624
|
X.name = "$ZodError", Object.defineProperty(X, "_zod", { value: X._zod, enumerable: false }), Object.defineProperty(X, "issues", { value: Q, enumerable: false }), Object.defineProperty(X, "message", { get() {
|
|
4625
|
-
return JSON.stringify(Q,
|
|
4625
|
+
return JSON.stringify(Q, w9, 2);
|
|
4626
4626
|
}, enumerable: true });
|
|
4627
|
-
}, Z4, RX,
|
|
4627
|
+
}, Z4, RX, C9 = (X) => (Q, $, Y, W) => {
|
|
4628
4628
|
let J = Y ? Object.assign(Y, { async: false }) : { async: false }, G = Q._zod.run({ value: $, issues: [] }, J);
|
|
4629
4629
|
if (G instanceof Promise)
|
|
4630
4630
|
throw new _1;
|
|
@@ -4633,7 +4633,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4633
4633
|
throw P4(H, W?.callee), H;
|
|
4634
4634
|
}
|
|
4635
4635
|
return G.value;
|
|
4636
|
-
},
|
|
4636
|
+
}, k9, v9 = (X) => async (Q, $, Y, W) => {
|
|
4637
4637
|
let J = Y ? Object.assign(Y, { async: true }) : { async: true }, G = Q._zod.run({ value: $, issues: [] }, J);
|
|
4638
4638
|
if (G instanceof Promise)
|
|
4639
4639
|
G = await G;
|
|
@@ -4642,24 +4642,24 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4642
4642
|
throw P4(H, W?.callee), H;
|
|
4643
4643
|
}
|
|
4644
4644
|
return G.value;
|
|
4645
|
-
},
|
|
4645
|
+
}, T9, _9 = (X) => (Q, $, Y) => {
|
|
4646
4646
|
let W = Y ? { ...Y, async: false } : { async: false }, J = Q._zod.run({ value: $, issues: [] }, W);
|
|
4647
4647
|
if (J instanceof Promise)
|
|
4648
4648
|
throw new _1;
|
|
4649
4649
|
return J.issues.length ? { success: false, error: new (X ?? Z4)(J.issues.map((G) => o0(G, W, u0()))) } : { success: true, data: J.value };
|
|
4650
|
-
}, X6,
|
|
4650
|
+
}, X6, x9 = (X) => async (Q, $, Y) => {
|
|
4651
4651
|
let W = Y ? Object.assign(Y, { async: true }) : { async: true }, J = Q._zod.run({ value: $, issues: [] }, W);
|
|
4652
4652
|
if (J instanceof Promise)
|
|
4653
4653
|
J = await J;
|
|
4654
4654
|
return J.issues.length ? { success: false, error: new X(J.issues.map((G) => o0(G, W, u0()))) } : { success: true, data: J.value };
|
|
4655
|
-
}, Q6, MW, jW, RW, EW, IW, bW, PW, SW,
|
|
4655
|
+
}, Q6, MW, jW, RW, EW, IW, bW, PW, SW, y9 = (X) => {
|
|
4656
4656
|
if (!X)
|
|
4657
4657
|
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;
|
|
4658
4658
|
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${X}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
4659
|
-
}, ZW, kW, vW, TW, _W, xW,
|
|
4659
|
+
}, ZW, kW, vW, TW, _W, xW, g9, yW, gW, hW = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", fW, cW = (X) => {
|
|
4660
4660
|
let Q = X ? `[\\s\\S]{${X?.minimum ?? 0},${X?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
4661
4661
|
return new RegExp(`^${Q}$`);
|
|
4662
|
-
}, pW, dW, iW, nW, rW, oW, w0, tW,
|
|
4662
|
+
}, pW, dW, iW, nW, rW, oW, w0, tW, h9, f9, aW, sW, eW, XJ, QJ, EX, $J, YJ, WJ, JJ, GJ, HJ, BJ, KJ, X0, IX, W0, m9, c9, p9, d9, i9, n9, r9, o9, t9, a9, s9, wJ, MJ, jJ, RJ, e9, XQ, QQ, $Q, YQ, WQ, JQ, GQ, v4, HQ, BQ, zQ, KQ, UQ, VQ, T4, _4, LQ, qQ, FQ, NQ, OQ, DQ, AQ, wQ, MQ, jQ, RQ, EQ, IQ, bQ, PQ, cV = (X) => {
|
|
4663
4663
|
let Q = typeof X;
|
|
4664
4664
|
switch (Q) {
|
|
4665
4665
|
case "number":
|
|
@@ -4727,13 +4727,13 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4727
4727
|
}
|
|
4728
4728
|
};
|
|
4729
4729
|
}, dV, iV, y1, PL, SL, SX, _J, xJ, yJ, gJ, hJ = (X, Q) => {
|
|
4730
|
-
Z4.init(X, Q), X.name = "ZodError", Object.defineProperties(X, { format: { value: ($) =>
|
|
4730
|
+
Z4.init(X, Q), X.name = "ZodError", Object.defineProperties(X, { format: { value: ($) => Z9(X, $) }, flatten: { value: ($) => S9(X, $) }, addIssue: { value: ($) => X.issues.push($) }, addIssues: { value: ($) => X.issues.push(...$) }, isEmpty: { get() {
|
|
4731
4731
|
return X.issues.length === 0;
|
|
4732
4732
|
} } });
|
|
4733
|
-
},
|
|
4733
|
+
}, sS, ZX, fJ, uJ, lJ, mJ, z0, iJ, gL, H0, hL, cJ, d4, fL, uL, lL, mL, cL, pL, dL, iL, nL, rL, oL, tL, aL, sL, eL, Xq, nJ, Qq, $q, Yq, Wq, Jq, Hq, rJ, oJ, Bq, zq, Kq, j$, Uq, Vq, aJ, Lq, qq, Nq, sJ, Aq, Mq, jq, eJ, P$ = "2025-11-25", Q5, K1 = "io.modelcontextprotocol/related-task", r4 = "2.0", z1, $5, Y5, Pq, S$, Sq, _0, R0, W6, p0, b0, o4, W5, Z$ = (X) => W5.safeParse(X).success, J5, G5 = (X) => J5.safeParse(X).success, H5, CX = (X) => H5.safeParse(X).success, x, B5, z5 = (X) => B5.safeParse(X).success, VZ, t4, Zq, a4, Cq, kX, _6, K5, kq, vq, Tq, _q, xq, yq, C$, gq, hq, k$, s4, fq, uq, e4, lq, vX, TX, _X, x6, mq, xX, X8, Q8, $8, Y8, W8, U5, V5, L5, q5, v$, F5, y6, N5, cq, J8, pq, G8, dq, T$, iq, H8, nq, rq, oq, tq, aq, sq, eq, XF, QF, $F, B8, YF, WF, z8, _$, x$, y$, JF, GF, HF, g$, BF, zF, KF, UF, VF, O5, K8, LF, U8, LZ, qF, g6, FF, yX, NF, h$, OF, DF, AF, wF, MF, jF, RF, n4, EF, IF, bF, f$, u$, PF, SF, ZF, CF, kF, vF, TF, _F, xF, yF, gF, hF, fF, uF, lF, mF, cF, pF, V8, dF, iF, nF, L8, rF, oF, tF, l$, aF, qZ, FZ, NZ, OZ, DZ, AZ, k, w5, j5, M5, R5 = (X) => typeof X === "string" ? { ...M5, name: X } : { ...M5, ...X }, E5 = (X) => {
|
|
4734
4734
|
let Q = R5(X), $ = Q.name !== undefined ? [...Q.basePath, Q.definitionPath, Q.name] : Q.basePath;
|
|
4735
4735
|
return { ...Q, flags: { hasReferencedOpenAiAnyType: false }, currentPath: $, propertyPath: undefined, seen: new Map(Object.entries(Q.definitions).map(([Y, W]) => [W._def, { def: W._def, path: [...Q.basePath, Q.definitionPath, Y], jsonSchema: undefined }])) };
|
|
4736
|
-
},
|
|
4736
|
+
}, q8 = (X, Q) => {
|
|
4737
4737
|
let $ = 0;
|
|
4738
4738
|
for (;$ < X.length && $ < Q.length; $++)
|
|
4739
4739
|
if (X[$] !== Q[$])
|
|
@@ -4779,7 +4779,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4779
4779
|
}, s5 = (X, Q, $) => {
|
|
4780
4780
|
switch (Q) {
|
|
4781
4781
|
case j.ZodString:
|
|
4782
|
-
return
|
|
4782
|
+
return N8(X, $);
|
|
4783
4783
|
case j.ZodNumber:
|
|
4784
4784
|
return m5(X, $);
|
|
4785
4785
|
case j.ZodObject:
|
|
@@ -4804,7 +4804,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4804
4804
|
case j.ZodTuple:
|
|
4805
4805
|
return r5(X, $);
|
|
4806
4806
|
case j.ZodRecord:
|
|
4807
|
-
return
|
|
4807
|
+
return O8(X, $);
|
|
4808
4808
|
case j.ZodLiteral:
|
|
4809
4809
|
return T5(X, $);
|
|
4810
4810
|
case j.ZodEnum:
|
|
@@ -4835,7 +4835,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4835
4835
|
case j.ZodDefault:
|
|
4836
4836
|
return Z5(X, $);
|
|
4837
4837
|
case j.ZodBranded:
|
|
4838
|
-
return
|
|
4838
|
+
return F8(X, $);
|
|
4839
4839
|
case j.ZodReadonly:
|
|
4840
4840
|
return a5(X, $);
|
|
4841
4841
|
case j.ZodCatch:
|
|
@@ -4856,7 +4856,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4856
4856
|
case "root":
|
|
4857
4857
|
return { $ref: X.path.join("/") };
|
|
4858
4858
|
case "relative":
|
|
4859
|
-
return { $ref:
|
|
4859
|
+
return { $ref: q8(Q.currentPath, X.path) };
|
|
4860
4860
|
case "none":
|
|
4861
4861
|
case "seen": {
|
|
4862
4862
|
if (X.path.length < Q.currentPath.length && X.path.every(($, Y) => Q.currentPath[Y] === $))
|
|
@@ -4891,7 +4891,7 @@ var XK, QK, Y8, $K, YK, K7 = (X, Q, $) => {
|
|
|
4891
4891
|
}, HN = 60000, gz, hz, Q7, mz, lz, NE, AE, H4;
|
|
4892
4892
|
var init_sdk = __esm(() => {
|
|
4893
4893
|
XK = Object.create;
|
|
4894
|
-
({ getPrototypeOf: QK, defineProperty:
|
|
4894
|
+
({ getPrototypeOf: QK, defineProperty: Y9, getOwnPropertyNames: $K } = Object);
|
|
4895
4895
|
YK = Object.prototype.hasOwnProperty;
|
|
4896
4896
|
WK = Symbol.dispose || Symbol.for("Symbol.dispose");
|
|
4897
4897
|
JK = Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose");
|
|
@@ -4899,12 +4899,12 @@ var init_sdk = __esm(() => {
|
|
|
4899
4899
|
Object.defineProperty(YG, "__esModule", { value: true });
|
|
4900
4900
|
YG.regexpCode = YG.getEsmExportName = YG.getProperty = YG.safeStringify = YG.stringify = YG.strConcat = YG.addCodeArg = YG.str = YG._ = YG.nil = YG._Code = YG.Name = YG.IDENTIFIER = YG._CodeOrName = undefined;
|
|
4901
4901
|
|
|
4902
|
-
class
|
|
4902
|
+
class D8 {
|
|
4903
4903
|
}
|
|
4904
|
-
YG._CodeOrName =
|
|
4904
|
+
YG._CodeOrName = D8;
|
|
4905
4905
|
YG.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
|
|
4906
4906
|
|
|
4907
|
-
class h6 extends
|
|
4907
|
+
class h6 extends D8 {
|
|
4908
4908
|
constructor(X) {
|
|
4909
4909
|
super();
|
|
4910
4910
|
if (!YG.IDENTIFIER.test(X))
|
|
@@ -4923,7 +4923,7 @@ var init_sdk = __esm(() => {
|
|
|
4923
4923
|
}
|
|
4924
4924
|
YG.Name = h6;
|
|
4925
4925
|
|
|
4926
|
-
class s0 extends
|
|
4926
|
+
class s0 extends D8 {
|
|
4927
4927
|
constructor(X) {
|
|
4928
4928
|
super();
|
|
4929
4929
|
this._items = typeof X === "string" ? [X] : X;
|
|
@@ -5049,10 +5049,10 @@ var init_sdk = __esm(() => {
|
|
|
5049
5049
|
this.value = X.value;
|
|
5050
5050
|
}
|
|
5051
5051
|
}
|
|
5052
|
-
var
|
|
5052
|
+
var w8;
|
|
5053
5053
|
(function(X) {
|
|
5054
5054
|
X[X.Started = 0] = "Started", X[X.Completed = 1] = "Completed";
|
|
5055
|
-
})(
|
|
5055
|
+
})(w8 || (HG.UsedValueState = w8 = {}));
|
|
5056
5056
|
HG.varKinds = { const: new x0.Name("const"), let: new x0.Name("let"), var: new x0.Name("var") };
|
|
5057
5057
|
|
|
5058
5058
|
class XY {
|
|
@@ -5146,7 +5146,7 @@ var init_sdk = __esm(() => {
|
|
|
5146
5146
|
G.forEach((B) => {
|
|
5147
5147
|
if (H.has(B))
|
|
5148
5148
|
return;
|
|
5149
|
-
H.set(B,
|
|
5149
|
+
H.set(B, w8.Started);
|
|
5150
5150
|
let z = Q(B);
|
|
5151
5151
|
if (z) {
|
|
5152
5152
|
let K = this.opts.es5 ? HG.varKinds.var : HG.varKinds.const;
|
|
@@ -5155,7 +5155,7 @@ var init_sdk = __esm(() => {
|
|
|
5155
5155
|
W = x0._`${W}${z}${this.opts._n}`;
|
|
5156
5156
|
else
|
|
5157
5157
|
throw new JG(B);
|
|
5158
|
-
H.set(B,
|
|
5158
|
+
H.set(B, w8.Completed);
|
|
5159
5159
|
});
|
|
5160
5160
|
}
|
|
5161
5161
|
return W;
|
|
@@ -5191,18 +5191,18 @@ var init_sdk = __esm(() => {
|
|
|
5191
5191
|
Object.defineProperty(y0, "Name", { enumerable: true, get: function() {
|
|
5192
5192
|
return u1.Name;
|
|
5193
5193
|
} });
|
|
5194
|
-
var
|
|
5194
|
+
var b8 = $Y();
|
|
5195
5195
|
Object.defineProperty(y0, "Scope", { enumerable: true, get: function() {
|
|
5196
|
-
return
|
|
5196
|
+
return b8.Scope;
|
|
5197
5197
|
} });
|
|
5198
5198
|
Object.defineProperty(y0, "ValueScope", { enumerable: true, get: function() {
|
|
5199
|
-
return
|
|
5199
|
+
return b8.ValueScope;
|
|
5200
5200
|
} });
|
|
5201
5201
|
Object.defineProperty(y0, "ValueScopeName", { enumerable: true, get: function() {
|
|
5202
|
-
return
|
|
5202
|
+
return b8.ValueScopeName;
|
|
5203
5203
|
} });
|
|
5204
5204
|
Object.defineProperty(y0, "varKinds", { enumerable: true, get: function() {
|
|
5205
|
-
return
|
|
5205
|
+
return b8.varKinds;
|
|
5206
5206
|
} });
|
|
5207
5207
|
y0.operators = { GT: new t._Code(">"), GTE: new t._Code(">="), LT: new t._Code("<"), LTE: new t._Code("<="), EQ: new t._Code("==="), NEQ: new t._Code("!=="), NOT: new t._Code("!"), OR: new t._Code("||"), AND: new t._Code("&&"), ADD: new t._Code("+") };
|
|
5208
5208
|
|
|
@@ -5251,7 +5251,7 @@ var init_sdk = __esm(() => {
|
|
|
5251
5251
|
}
|
|
5252
5252
|
get names() {
|
|
5253
5253
|
let X = this.lhs instanceof t.Name ? {} : { ...this.lhs.names };
|
|
5254
|
-
return
|
|
5254
|
+
return I8(X, this.rhs);
|
|
5255
5255
|
}
|
|
5256
5256
|
}
|
|
5257
5257
|
|
|
@@ -5317,7 +5317,7 @@ var init_sdk = __esm(() => {
|
|
|
5317
5317
|
}
|
|
5318
5318
|
}
|
|
5319
5319
|
|
|
5320
|
-
class
|
|
5320
|
+
class P8 extends l1 {
|
|
5321
5321
|
constructor(X = []) {
|
|
5322
5322
|
super();
|
|
5323
5323
|
this.nodes = X;
|
|
@@ -5353,13 +5353,13 @@ var init_sdk = __esm(() => {
|
|
|
5353
5353
|
}
|
|
5354
5354
|
}
|
|
5355
5355
|
|
|
5356
|
-
class m1 extends
|
|
5356
|
+
class m1 extends P8 {
|
|
5357
5357
|
render(X) {
|
|
5358
5358
|
return "{" + X._n + super.render(X) + "}" + X._n;
|
|
5359
5359
|
}
|
|
5360
5360
|
}
|
|
5361
5361
|
|
|
5362
|
-
class FG extends
|
|
5362
|
+
class FG extends P8 {
|
|
5363
5363
|
}
|
|
5364
5364
|
|
|
5365
5365
|
class uX extends m1 {
|
|
@@ -5406,7 +5406,7 @@ var init_sdk = __esm(() => {
|
|
|
5406
5406
|
}
|
|
5407
5407
|
get names() {
|
|
5408
5408
|
let X = super.names;
|
|
5409
|
-
if (
|
|
5409
|
+
if (I8(X, this.condition), this.else)
|
|
5410
5410
|
J6(X, this.else.names);
|
|
5411
5411
|
return X;
|
|
5412
5412
|
}
|
|
@@ -5445,8 +5445,8 @@ var init_sdk = __esm(() => {
|
|
|
5445
5445
|
return `for(${Q} ${$}=${Y}; ${$}<${W}; ${$}++)` + super.render(X);
|
|
5446
5446
|
}
|
|
5447
5447
|
get names() {
|
|
5448
|
-
let X =
|
|
5449
|
-
return
|
|
5448
|
+
let X = I8(super.names, this.from);
|
|
5449
|
+
return I8(X, this.to);
|
|
5450
5450
|
}
|
|
5451
5451
|
}
|
|
5452
5452
|
|
|
@@ -5468,7 +5468,7 @@ var init_sdk = __esm(() => {
|
|
|
5468
5468
|
}
|
|
5469
5469
|
}
|
|
5470
5470
|
|
|
5471
|
-
class
|
|
5471
|
+
class M8 extends m1 {
|
|
5472
5472
|
constructor(X, Q, $) {
|
|
5473
5473
|
super();
|
|
5474
5474
|
this.name = X, this.args = Q, this.async = $;
|
|
@@ -5477,14 +5477,14 @@ var init_sdk = __esm(() => {
|
|
|
5477
5477
|
return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(X);
|
|
5478
5478
|
}
|
|
5479
5479
|
}
|
|
5480
|
-
|
|
5480
|
+
M8.kind = "func";
|
|
5481
5481
|
|
|
5482
|
-
class
|
|
5482
|
+
class j8 extends P8 {
|
|
5483
5483
|
render(X) {
|
|
5484
5484
|
return "return " + super.render(X);
|
|
5485
5485
|
}
|
|
5486
5486
|
}
|
|
5487
|
-
|
|
5487
|
+
j8.kind = "return";
|
|
5488
5488
|
|
|
5489
5489
|
class DG extends m1 {
|
|
5490
5490
|
render(X) {
|
|
@@ -5513,7 +5513,7 @@ var init_sdk = __esm(() => {
|
|
|
5513
5513
|
}
|
|
5514
5514
|
}
|
|
5515
5515
|
|
|
5516
|
-
class
|
|
5516
|
+
class R8 extends m1 {
|
|
5517
5517
|
constructor(X) {
|
|
5518
5518
|
super();
|
|
5519
5519
|
this.error = X;
|
|
@@ -5522,14 +5522,14 @@ var init_sdk = __esm(() => {
|
|
|
5522
5522
|
return `catch(${this.error})` + super.render(X);
|
|
5523
5523
|
}
|
|
5524
5524
|
}
|
|
5525
|
-
|
|
5525
|
+
R8.kind = "catch";
|
|
5526
5526
|
|
|
5527
|
-
class
|
|
5527
|
+
class E8 extends m1 {
|
|
5528
5528
|
render(X) {
|
|
5529
5529
|
return "finally" + super.render(X);
|
|
5530
5530
|
}
|
|
5531
5531
|
}
|
|
5532
|
-
|
|
5532
|
+
E8.kind = "finally";
|
|
5533
5533
|
|
|
5534
5534
|
class AG {
|
|
5535
5535
|
constructor(X, Q = {}) {
|
|
@@ -5652,10 +5652,10 @@ var init_sdk = __esm(() => {
|
|
|
5652
5652
|
return this._leafNode(new VG(X));
|
|
5653
5653
|
}
|
|
5654
5654
|
return(X) {
|
|
5655
|
-
let Q = new
|
|
5655
|
+
let Q = new j8;
|
|
5656
5656
|
if (this._blockNode(Q), this.code(X), Q.nodes.length !== 1)
|
|
5657
5657
|
throw Error('CodeGen: "return" should have one node');
|
|
5658
|
-
return this._endBlockNode(
|
|
5658
|
+
return this._endBlockNode(j8);
|
|
5659
5659
|
}
|
|
5660
5660
|
try(X, Q, $) {
|
|
5661
5661
|
if (!Q && !$)
|
|
@@ -5663,11 +5663,11 @@ var init_sdk = __esm(() => {
|
|
|
5663
5663
|
let Y = new DG;
|
|
5664
5664
|
if (this._blockNode(Y), this.code(X), Q) {
|
|
5665
5665
|
let W = this.name("e");
|
|
5666
|
-
this._currNode = Y.catch = new
|
|
5666
|
+
this._currNode = Y.catch = new R8(W), Q(W);
|
|
5667
5667
|
}
|
|
5668
5668
|
if ($)
|
|
5669
|
-
this._currNode = Y.finally = new
|
|
5670
|
-
return this._endBlockNode(
|
|
5669
|
+
this._currNode = Y.finally = new E8, this.code($);
|
|
5670
|
+
return this._endBlockNode(R8, E8);
|
|
5671
5671
|
}
|
|
5672
5672
|
throw(X) {
|
|
5673
5673
|
return this._leafNode(new LG(X));
|
|
@@ -5687,12 +5687,12 @@ var init_sdk = __esm(() => {
|
|
|
5687
5687
|
return this._nodes.length = Q, this;
|
|
5688
5688
|
}
|
|
5689
5689
|
func(X, Q = t.nil, $, Y) {
|
|
5690
|
-
if (this._blockNode(new
|
|
5690
|
+
if (this._blockNode(new M8(X, Q, $)), Y)
|
|
5691
5691
|
this.code(Y).endFunc();
|
|
5692
5692
|
return this;
|
|
5693
5693
|
}
|
|
5694
5694
|
endFunc() {
|
|
5695
|
-
return this._endBlockNode(
|
|
5695
|
+
return this._endBlockNode(M8);
|
|
5696
5696
|
}
|
|
5697
5697
|
optimize(X = 1) {
|
|
5698
5698
|
while (X-- > 0)
|
|
@@ -5734,7 +5734,7 @@ var init_sdk = __esm(() => {
|
|
|
5734
5734
|
X[$] = (X[$] || 0) + (Q[$] || 0);
|
|
5735
5735
|
return X;
|
|
5736
5736
|
}
|
|
5737
|
-
function
|
|
5737
|
+
function I8(X, Q) {
|
|
5738
5738
|
return Q instanceof t._CodeOrName ? J6(X, Q.names) : X;
|
|
5739
5739
|
}
|
|
5740
5740
|
function u6(X, Q, $) {
|
|
@@ -5932,7 +5932,7 @@ var init_sdk = __esm(() => {
|
|
|
5932
5932
|
lX = P((yG) => {
|
|
5933
5933
|
Object.defineProperty(yG, "__esModule", { value: true });
|
|
5934
5934
|
yG.extendErrors = yG.resetErrorsCount = yG.reportExtraError = yG.reportError = yG.keyword$DataError = yG.keywordError = undefined;
|
|
5935
|
-
var a = c(),
|
|
5935
|
+
var a = c(), Z8 = e(), v0 = R1();
|
|
5936
5936
|
yG.keywordError = { message: ({ keyword: X }) => a.str`must pass "${X}" keyword validation` };
|
|
5937
5937
|
yG.keyword$DataError = { message: ({ keyword: X, schemaType: Q }) => Q ? a.str`"${X}" keyword must be ${Q} ($data)` : a.str`"${X}" keyword is invalid ($data)` };
|
|
5938
5938
|
function FO(X, Q = yG.keywordError, $, Y) {
|
|
@@ -5986,13 +5986,13 @@ var init_sdk = __esm(() => {
|
|
|
5986
5986
|
return jO(X, Q, J), Y.object(...J);
|
|
5987
5987
|
}
|
|
5988
5988
|
function wO({ errorPath: X }, { instancePath: Q }) {
|
|
5989
|
-
let $ = Q ? a.str`${X}${(0,
|
|
5989
|
+
let $ = Q ? a.str`${X}${(0, Z8.getErrorPath)(Q, Z8.Type.Str)}` : X;
|
|
5990
5990
|
return [v0.default.instancePath, (0, a.strConcat)(v0.default.instancePath, $)];
|
|
5991
5991
|
}
|
|
5992
5992
|
function MO({ keyword: X, it: { errSchemaPath: Q } }, { schemaPath: $, parentSchema: Y }) {
|
|
5993
5993
|
let W = Y ? Q : a.str`${Q}/${X}`;
|
|
5994
5994
|
if ($)
|
|
5995
|
-
W = a.str`${W}${(0,
|
|
5995
|
+
W = a.str`${W}${(0, Z8.getErrorPath)($, Z8.Type.Str)}`;
|
|
5996
5996
|
return [G6.schemaPath, W];
|
|
5997
5997
|
}
|
|
5998
5998
|
function jO(X, { params: Q, message: $ }, Y) {
|
|
@@ -6458,7 +6458,7 @@ var init_sdk = __esm(() => {
|
|
|
6458
6458
|
}
|
|
6459
6459
|
L3.extendSubschemaMode = mD;
|
|
6460
6460
|
});
|
|
6461
|
-
DY = P((
|
|
6461
|
+
DY = P((nv, N3) => {
|
|
6462
6462
|
N3.exports = function X(Q, $) {
|
|
6463
6463
|
if (Q === $)
|
|
6464
6464
|
return true;
|
|
@@ -6495,19 +6495,19 @@ var init_sdk = __esm(() => {
|
|
|
6495
6495
|
return Q !== Q && $ !== $;
|
|
6496
6496
|
};
|
|
6497
6497
|
});
|
|
6498
|
-
D3 = P((
|
|
6498
|
+
D3 = P((rv, O3) => {
|
|
6499
6499
|
var p1 = O3.exports = function(X, Q, $) {
|
|
6500
6500
|
if (typeof Q == "function")
|
|
6501
6501
|
$ = Q, Q = {};
|
|
6502
6502
|
$ = Q.cb || $;
|
|
6503
6503
|
var Y = typeof $ == "function" ? $ : $.pre || function() {}, W = $.post || function() {};
|
|
6504
|
-
|
|
6504
|
+
C8(Q, Y, W, X, "", X);
|
|
6505
6505
|
};
|
|
6506
6506
|
p1.keywords = { additionalItems: true, items: true, contains: true, additionalProperties: true, propertyNames: true, not: true, if: true, then: true, else: true };
|
|
6507
6507
|
p1.arrayKeywords = { items: true, allOf: true, anyOf: true, oneOf: true };
|
|
6508
6508
|
p1.propsKeywords = { $defs: true, definitions: true, properties: true, patternProperties: true, dependencies: true };
|
|
6509
6509
|
p1.skipKeywords = { default: true, enum: true, const: true, required: true, maximum: true, minimum: true, exclusiveMaximum: true, exclusiveMinimum: true, multipleOf: true, maxLength: true, minLength: true, pattern: true, format: true, maxItems: true, minItems: true, uniqueItems: true, maxProperties: true, minProperties: true };
|
|
6510
|
-
function
|
|
6510
|
+
function C8(X, Q, $, Y, W, J, G, H, B, z) {
|
|
6511
6511
|
if (Y && typeof Y == "object" && !Array.isArray(Y)) {
|
|
6512
6512
|
Q(Y, W, J, G, H, B, z);
|
|
6513
6513
|
for (var K in Y) {
|
|
@@ -6515,13 +6515,13 @@ var init_sdk = __esm(() => {
|
|
|
6515
6515
|
if (Array.isArray(V)) {
|
|
6516
6516
|
if (K in p1.arrayKeywords)
|
|
6517
6517
|
for (var L = 0;L < V.length; L++)
|
|
6518
|
-
|
|
6518
|
+
C8(X, Q, $, V[L], W + "/" + K + "/" + L, J, W, K, Y, L);
|
|
6519
6519
|
} else if (K in p1.propsKeywords) {
|
|
6520
6520
|
if (V && typeof V == "object")
|
|
6521
6521
|
for (var U in V)
|
|
6522
|
-
|
|
6522
|
+
C8(X, Q, $, V[U], W + "/" + K + "/" + dD(U), J, W, K, Y, U);
|
|
6523
6523
|
} else if (K in p1.keywords || X.allKeys && !(K in p1.skipKeywords))
|
|
6524
|
-
|
|
6524
|
+
C8(X, Q, $, V, W + "/" + K, J, W, K, Y);
|
|
6525
6525
|
}
|
|
6526
6526
|
$(Y, W, J, G, H, B, z);
|
|
6527
6527
|
}
|
|
@@ -6641,7 +6641,7 @@ var init_sdk = __esm(() => {
|
|
|
6641
6641
|
iX = P((h3) => {
|
|
6642
6642
|
Object.defineProperty(h3, "__esModule", { value: true });
|
|
6643
6643
|
h3.getData = h3.KeywordCxt = h3.validateFunctionCode = undefined;
|
|
6644
|
-
var S3 = lG(), E3 = mX(), MY = UY(),
|
|
6644
|
+
var S3 = lG(), E3 = mX(), MY = UY(), k8 = mX(), HA = $3(), dX = U3(), wY = F3(), _ = c(), u = R1(), BA = cX(), E1 = e(), pX = lX();
|
|
6645
6645
|
function zA(X) {
|
|
6646
6646
|
if (k3(X)) {
|
|
6647
6647
|
if (v3(X), C3(X)) {
|
|
@@ -6789,8 +6789,8 @@ var init_sdk = __esm(() => {
|
|
|
6789
6789
|
if (!(0, MY.shouldUseGroup)(J, L))
|
|
6790
6790
|
return;
|
|
6791
6791
|
if (L.type) {
|
|
6792
|
-
if (W.if((0,
|
|
6793
|
-
W.else(), (0,
|
|
6792
|
+
if (W.if((0, k8.checkDataType)(L.type, G, B.strictNumbers)), P3(X, L), Q.length === 1 && Q[0] === L.type && $)
|
|
6793
|
+
W.else(), (0, k8.reportTypeError)(X);
|
|
6794
6794
|
W.endIf();
|
|
6795
6795
|
} else
|
|
6796
6796
|
P3(X, L);
|
|
@@ -6960,7 +6960,7 @@ var init_sdk = __esm(() => {
|
|
|
6960
6960
|
if (!(Q instanceof _.Name))
|
|
6961
6961
|
throw Error("ajv implementation error");
|
|
6962
6962
|
let H = Array.isArray($) ? $ : [$];
|
|
6963
|
-
return _._`${(0,
|
|
6963
|
+
return _._`${(0, k8.checkDataTypes)(H, Q, W.opts.strictNumbers, k8.DataType.Wrong)}`;
|
|
6964
6964
|
}
|
|
6965
6965
|
return _.nil;
|
|
6966
6966
|
}
|
|
@@ -7040,7 +7040,7 @@ var init_sdk = __esm(() => {
|
|
|
7040
7040
|
}
|
|
7041
7041
|
h3.getData = g3;
|
|
7042
7042
|
});
|
|
7043
|
-
|
|
7043
|
+
v8 = P((l3) => {
|
|
7044
7044
|
Object.defineProperty(l3, "__esModule", { value: true });
|
|
7045
7045
|
|
|
7046
7046
|
class u3 extends Error {
|
|
@@ -7063,10 +7063,10 @@ var init_sdk = __esm(() => {
|
|
|
7063
7063
|
}
|
|
7064
7064
|
c3.default = m3;
|
|
7065
7065
|
});
|
|
7066
|
-
|
|
7066
|
+
_8 = P((i3) => {
|
|
7067
7067
|
Object.defineProperty(i3, "__esModule", { value: true });
|
|
7068
7068
|
i3.resolveSchema = i3.getCompilingSchema = i3.resolveRef = i3.compileSchema = i3.SchemaEnv = undefined;
|
|
7069
|
-
var X1 = c(), _A =
|
|
7069
|
+
var X1 = c(), _A = v8(), B6 = R1(), Q1 = cX(), p3 = e(), xA = iX();
|
|
7070
7070
|
|
|
7071
7071
|
class rX {
|
|
7072
7072
|
constructor(X) {
|
|
@@ -7149,15 +7149,15 @@ var init_sdk = __esm(() => {
|
|
|
7149
7149
|
let $;
|
|
7150
7150
|
while (typeof ($ = this.refs[Q]) == "string")
|
|
7151
7151
|
Q = $;
|
|
7152
|
-
return $ || this.schemas[Q] ||
|
|
7152
|
+
return $ || this.schemas[Q] || T8.call(this, X, Q);
|
|
7153
7153
|
}
|
|
7154
|
-
function
|
|
7154
|
+
function T8(X, Q) {
|
|
7155
7155
|
let $ = this.opts.uriResolver.parse(Q), Y = (0, Q1._getFullPath)(this.opts.uriResolver, $), W = (0, Q1.getFullPath)(this.opts.uriResolver, X.baseId, undefined);
|
|
7156
7156
|
if (Object.keys(X.schema).length > 0 && Y === W)
|
|
7157
7157
|
return IY.call(this, $, X);
|
|
7158
7158
|
let J = (0, Q1.normalizeId)(Y), G = this.refs[J] || this.schemas[J];
|
|
7159
7159
|
if (typeof G == "string") {
|
|
7160
|
-
let H =
|
|
7160
|
+
let H = T8.call(this, X, G);
|
|
7161
7161
|
if (typeof (H === null || H === undefined ? undefined : H.schema) !== "object")
|
|
7162
7162
|
return;
|
|
7163
7163
|
return IY.call(this, $, H);
|
|
@@ -7174,7 +7174,7 @@ var init_sdk = __esm(() => {
|
|
|
7174
7174
|
}
|
|
7175
7175
|
return IY.call(this, $, G);
|
|
7176
7176
|
}
|
|
7177
|
-
i3.resolveSchema =
|
|
7177
|
+
i3.resolveSchema = T8;
|
|
7178
7178
|
var uA = new Set(["properties", "patternProperties", "enum", "dependencies", "definitions"]);
|
|
7179
7179
|
function IY(X, { baseId: Q, schema: $, root: Y }) {
|
|
7180
7180
|
var W;
|
|
@@ -7194,7 +7194,7 @@ var init_sdk = __esm(() => {
|
|
|
7194
7194
|
let J;
|
|
7195
7195
|
if (typeof $ != "boolean" && $.$ref && !(0, p3.schemaHasRulesButRef)($, this.RULES)) {
|
|
7196
7196
|
let H = (0, Q1.resolveUrl)(this.opts.uriResolver, Q, $.$ref);
|
|
7197
|
-
J =
|
|
7197
|
+
J = T8.call(this, Y, H);
|
|
7198
7198
|
}
|
|
7199
7199
|
let { schemaId: G } = this.opts;
|
|
7200
7200
|
if (J = J || new rX({ schema: $, schemaId: G, root: Y, baseId: Q }), J.schema !== J.root.schema)
|
|
@@ -7202,14 +7202,14 @@ var init_sdk = __esm(() => {
|
|
|
7202
7202
|
return;
|
|
7203
7203
|
}
|
|
7204
7204
|
});
|
|
7205
|
-
r3 = P((
|
|
7205
|
+
r3 = P((XT, dA) => {
|
|
7206
7206
|
dA.exports = { $id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", description: "Meta-schema for $data reference (JSON AnySchema extension proposal)", type: "object", required: ["$data"], properties: { $data: { type: "string", anyOf: [{ format: "relative-json-pointer" }, { format: "json-pointer" }] } }, additionalProperties: false };
|
|
7207
7207
|
});
|
|
7208
|
-
t3 = P((
|
|
7208
|
+
t3 = P((QT, o3) => {
|
|
7209
7209
|
var iA = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, a: 10, A: 10, b: 11, B: 11, c: 12, C: 12, d: 13, D: 13, e: 14, E: 14, f: 15, F: 15 };
|
|
7210
7210
|
o3.exports = { HEX: iA };
|
|
7211
7211
|
});
|
|
7212
|
-
WH = P((
|
|
7212
|
+
WH = P(($T, YH) => {
|
|
7213
7213
|
var { HEX: nA } = t3(), rA = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;
|
|
7214
7214
|
function XH(X) {
|
|
7215
7215
|
if ($H(X, ".") < 3)
|
|
@@ -7380,7 +7380,7 @@ var init_sdk = __esm(() => {
|
|
|
7380
7380
|
}
|
|
7381
7381
|
YH.exports = { recomposeAuthority: Xw, normalizeComponentEncoding: eA, removeDotSegments: sA, normalizeIPv4: XH, normalizeIPv6: QH, stringArrayToHexStripped: PY };
|
|
7382
7382
|
});
|
|
7383
|
-
KH = P((
|
|
7383
|
+
KH = P((YT, zH) => {
|
|
7384
7384
|
var Qw = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu, $w = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
7385
7385
|
function JH(X) {
|
|
7386
7386
|
return typeof X.secure === "boolean" ? X.secure : String(X.scheme).toLowerCase() === "wss";
|
|
@@ -7443,11 +7443,11 @@ var init_sdk = __esm(() => {
|
|
|
7443
7443
|
let Q = X;
|
|
7444
7444
|
return Q.nss = (X.uuid || "").toLowerCase(), Q;
|
|
7445
7445
|
}
|
|
7446
|
-
var BH = { scheme: "http", domainHost: true, parse: GH, serialize: HH }, zw = { scheme: "https", domainHost: BH.domainHost, parse: GH, serialize: HH },
|
|
7446
|
+
var BH = { scheme: "http", domainHost: true, parse: GH, serialize: HH }, zw = { scheme: "https", domainHost: BH.domainHost, parse: GH, serialize: HH }, x8 = { scheme: "ws", domainHost: true, parse: Yw, serialize: Ww }, Kw = { scheme: "wss", domainHost: x8.domainHost, parse: x8.parse, serialize: x8.serialize }, Uw = { scheme: "urn", parse: Jw, serialize: Gw, skipNormalize: true }, Vw = { scheme: "urn:uuid", parse: Hw, serialize: Bw, skipNormalize: true }, SY = { http: BH, https: zw, ws: x8, wss: Kw, urn: Uw, "urn:uuid": Vw };
|
|
7447
7447
|
zH.exports = SY;
|
|
7448
7448
|
});
|
|
7449
|
-
VH = P((
|
|
7450
|
-
var { normalizeIPv6: Lw, normalizeIPv4: qw, removeDotSegments: oX, recomposeAuthority: Fw, normalizeComponentEncoding:
|
|
7449
|
+
VH = P((WT, g8) => {
|
|
7450
|
+
var { normalizeIPv6: Lw, normalizeIPv4: qw, removeDotSegments: oX, recomposeAuthority: Fw, normalizeComponentEncoding: y8 } = WH(), ZY = KH();
|
|
7451
7451
|
function Nw(X, Q) {
|
|
7452
7452
|
if (typeof X === "string")
|
|
7453
7453
|
X = V1(I1(X, Q), Q);
|
|
@@ -7496,13 +7496,13 @@ var init_sdk = __esm(() => {
|
|
|
7496
7496
|
}
|
|
7497
7497
|
function Dw(X, Q, $) {
|
|
7498
7498
|
if (typeof X === "string")
|
|
7499
|
-
X = unescape(X), X = V1(
|
|
7499
|
+
X = unescape(X), X = V1(y8(I1(X, $), true), { ...$, skipEscape: true });
|
|
7500
7500
|
else if (typeof X === "object")
|
|
7501
|
-
X = V1(
|
|
7501
|
+
X = V1(y8(X, true), { ...$, skipEscape: true });
|
|
7502
7502
|
if (typeof Q === "string")
|
|
7503
|
-
Q = unescape(Q), Q = V1(
|
|
7503
|
+
Q = unescape(Q), Q = V1(y8(I1(Q, $), true), { ...$, skipEscape: true });
|
|
7504
7504
|
else if (typeof Q === "object")
|
|
7505
|
-
Q = V1(
|
|
7505
|
+
Q = V1(y8(Q, true), { ...$, skipEscape: true });
|
|
7506
7506
|
return X.toLowerCase() === Q.toLowerCase();
|
|
7507
7507
|
}
|
|
7508
7508
|
function V1(X, Q) {
|
|
@@ -7599,9 +7599,9 @@ var init_sdk = __esm(() => {
|
|
|
7599
7599
|
return Y;
|
|
7600
7600
|
}
|
|
7601
7601
|
var CY = { SCHEMES: ZY, normalize: Nw, resolve: Ow, resolveComponents: UH, equal: Dw, serialize: V1, parse: I1 };
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7602
|
+
g8.exports = CY;
|
|
7603
|
+
g8.exports.default = CY;
|
|
7604
|
+
g8.exports.fastUri = CY;
|
|
7605
7605
|
});
|
|
7606
7606
|
FH = P((qH) => {
|
|
7607
7607
|
Object.defineProperty(qH, "__esModule", { value: true });
|
|
@@ -7635,7 +7635,7 @@ var init_sdk = __esm(() => {
|
|
|
7635
7635
|
Object.defineProperty(b1, "CodeGen", { enumerable: true, get: function() {
|
|
7636
7636
|
return p6.CodeGen;
|
|
7637
7637
|
} });
|
|
7638
|
-
var Ew =
|
|
7638
|
+
var Ew = v8(), wH = nX(), Iw = KY(), tX = _8(), bw = c(), aX = cX(), h8 = mX(), vY = e(), NH = r3(), Pw = FH(), MH = (X, Q) => new RegExp(X, Q);
|
|
7639
7639
|
MH.code = "new RegExp";
|
|
7640
7640
|
var Sw = ["removeAdditional", "useDefaults", "coerceTypes"], Zw = new Set(["validate", "serialize", "parse", "wrapper", "root", "schema", "keyword", "pattern", "formats", "validate$data", "func", "obj", "Error"]), Cw = { errorDataPath: "", format: "`validateFormats: false` can be used instead.", nullable: '"nullable" keyword is supported by default.', jsonPointers: "Deprecated jsPropertySyntax can be used instead.", extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", sourceCode: "Use option `code: {source: true}`", strictDefaults: "It is default now, see option `strict`.", strictKeywords: "It is default now, see option `strict`.", uniqueItems: '"uniqueItems" keyword is always validated.', unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", cache: "Map is used as cache, schema object as key.", serialize: "Map is used as cache, schema object as key.", ajvErrors: "It is default now." }, kw = { ignoreKeywordsWithRef: "", jsPropertySyntax: "", unicode: '"minLength"/"maxLength" account for unicode characters by default.' }, OH = 200;
|
|
7641
7641
|
function vw(X) {
|
|
@@ -7644,7 +7644,7 @@ var init_sdk = __esm(() => {
|
|
|
7644
7644
|
return { strictSchema: (G = (J = X.strictSchema) !== null && J !== undefined ? J : q0) !== null && G !== undefined ? G : true, strictNumbers: (B = (H = X.strictNumbers) !== null && H !== undefined ? H : q0) !== null && B !== undefined ? B : true, strictTypes: (K = (z = X.strictTypes) !== null && z !== undefined ? z : q0) !== null && K !== undefined ? K : "log", strictTuples: (L = (V = X.strictTuples) !== null && V !== undefined ? V : q0) !== null && L !== undefined ? L : "log", strictRequired: (F = (U = X.strictRequired) !== null && U !== undefined ? U : q0) !== null && F !== undefined ? F : false, code: X.code ? { ...X.code, optimize: P1, regExp: U6 } : { optimize: P1, regExp: U6 }, loopRequired: (q = X.loopRequired) !== null && q !== undefined ? q : OH, loopEnum: (N = X.loopEnum) !== null && N !== undefined ? N : OH, meta: (A = X.meta) !== null && A !== undefined ? A : true, messages: (M = X.messages) !== null && M !== undefined ? M : true, inlineRefs: (R = X.inlineRefs) !== null && R !== undefined ? R : true, schemaId: (S = X.schemaId) !== null && S !== undefined ? S : "$id", addUsedSchema: (C = X.addUsedSchema) !== null && C !== undefined ? C : true, validateSchema: (K0 = X.validateSchema) !== null && K0 !== undefined ? K0 : true, validateFormats: (U0 = X.validateFormats) !== null && U0 !== undefined ? U0 : true, unicodeRegExp: (s = X.unicodeRegExp) !== null && s !== undefined ? s : true, int32range: (D0 = X.int32range) !== null && D0 !== undefined ? D0 : true, uriResolver: d };
|
|
7645
7645
|
}
|
|
7646
7646
|
|
|
7647
|
-
class
|
|
7647
|
+
class f8 {
|
|
7648
7648
|
constructor(X = {}) {
|
|
7649
7649
|
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = new Set, this._loading = {}, this._cache = new Map, X = this.opts = { ...X, ...vw(X) };
|
|
7650
7650
|
let { es5: Q, lines: $ } = this.opts.code;
|
|
@@ -7822,7 +7822,7 @@ var init_sdk = __esm(() => {
|
|
|
7822
7822
|
if (uw.call(this, $, Q), !Q)
|
|
7823
7823
|
return (0, vY.eachItem)($, (W) => kY.call(this, W)), this;
|
|
7824
7824
|
mw.call(this, Q);
|
|
7825
|
-
let Y = { ...Q, type: (0,
|
|
7825
|
+
let Y = { ...Q, type: (0, h8.getJSONTypes)(Q.type), schemaType: (0, h8.getJSONTypes)(Q.schemaType) };
|
|
7826
7826
|
return (0, vY.eachItem)($, Y.type.length === 0 ? (W) => kY.call(this, W, Y) : (W) => Y.type.forEach((J) => kY.call(this, W, Y, J))), this;
|
|
7827
7827
|
}
|
|
7828
7828
|
getKeyword(X) {
|
|
@@ -7923,9 +7923,9 @@ var init_sdk = __esm(() => {
|
|
|
7923
7923
|
}
|
|
7924
7924
|
}
|
|
7925
7925
|
}
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
b1.default =
|
|
7926
|
+
f8.ValidationError = Ew.default;
|
|
7927
|
+
f8.MissingRefError = wH.default;
|
|
7928
|
+
b1.default = f8;
|
|
7929
7929
|
function DH(X, Q, $, Y = "error") {
|
|
7930
7930
|
for (let W in X) {
|
|
7931
7931
|
let J = W;
|
|
@@ -8005,7 +8005,7 @@ var init_sdk = __esm(() => {
|
|
|
8005
8005
|
G = { type: $, rules: [] }, J.rules.push(G);
|
|
8006
8006
|
if (J.keywords[X] = true, !Q)
|
|
8007
8007
|
return;
|
|
8008
|
-
let H = { keyword: X, definition: { ...Q, type: (0,
|
|
8008
|
+
let H = { keyword: X, definition: { ...Q, type: (0, h8.getJSONTypes)(Q.type), schemaType: (0, h8.getJSONTypes)(Q.schemaType) } };
|
|
8009
8009
|
if (Q.before)
|
|
8010
8010
|
lw.call(this, G, H, Q.before);
|
|
8011
8011
|
else
|
|
@@ -8042,7 +8042,7 @@ var init_sdk = __esm(() => {
|
|
|
8042
8042
|
kH = P((ZH) => {
|
|
8043
8043
|
Object.defineProperty(ZH, "__esModule", { value: true });
|
|
8044
8044
|
ZH.callRef = ZH.getValidate = undefined;
|
|
8045
|
-
var rw = nX(), bH = d0(), g0 = c(), d6 = R1(), PH =
|
|
8045
|
+
var rw = nX(), bH = d0(), g0 = c(), d6 = R1(), PH = _8(), u8 = e(), ow = { keyword: "$ref", schemaType: "string", code(X) {
|
|
8046
8046
|
let { gen: Q, schema: $, it: Y } = X, { baseId: W, schemaEnv: J, validateName: G, opts: H, self: B } = Y, { root: z } = J;
|
|
8047
8047
|
if (($ === "#" || $ === "#/") && W === z.baseId)
|
|
8048
8048
|
return V();
|
|
@@ -8054,13 +8054,13 @@ var init_sdk = __esm(() => {
|
|
|
8054
8054
|
return U(K);
|
|
8055
8055
|
function V() {
|
|
8056
8056
|
if (J === z)
|
|
8057
|
-
return
|
|
8057
|
+
return l8(X, G, J, J.$async);
|
|
8058
8058
|
let F = Q.scopeValue("root", { ref: z });
|
|
8059
|
-
return
|
|
8059
|
+
return l8(X, g0._`${F}.validate`, z, z.$async);
|
|
8060
8060
|
}
|
|
8061
8061
|
function L(F) {
|
|
8062
8062
|
let q = SH(X, F);
|
|
8063
|
-
|
|
8063
|
+
l8(X, q, F, F.$async);
|
|
8064
8064
|
}
|
|
8065
8065
|
function U(F) {
|
|
8066
8066
|
let q = Q.scopeValue("schema", H.code.source === true ? { ref: F, code: (0, g0.stringify)(F) } : { ref: F }), N = Q.name("valid"), A = X.subschema({ schema: F, dataTypes: [], schemaPath: g0.nil, topSchemaRef: q, errSchemaPath: $ }, N);
|
|
@@ -8072,7 +8072,7 @@ var init_sdk = __esm(() => {
|
|
|
8072
8072
|
return Q.validate ? $.scopeValue("validate", { ref: Q.validate }) : g0._`${$.scopeValue("wrapper", { ref: Q })}.validate`;
|
|
8073
8073
|
}
|
|
8074
8074
|
ZH.getValidate = SH;
|
|
8075
|
-
function
|
|
8075
|
+
function l8(X, Q, $, Y) {
|
|
8076
8076
|
let { gen: W, it: J } = X, { allErrors: G, schemaEnv: H, opts: B } = J, z = B.passContext ? d6.default.this : g0.nil;
|
|
8077
8077
|
if (Y)
|
|
8078
8078
|
K();
|
|
@@ -8105,22 +8105,22 @@ var init_sdk = __esm(() => {
|
|
|
8105
8105
|
if (J.props !== true)
|
|
8106
8106
|
if (N && !N.dynamicProps) {
|
|
8107
8107
|
if (N.props !== undefined)
|
|
8108
|
-
J.props =
|
|
8108
|
+
J.props = u8.mergeEvaluated.props(W, N.props, J.props);
|
|
8109
8109
|
} else {
|
|
8110
8110
|
let A = W.var("props", g0._`${F}.evaluated.props`);
|
|
8111
|
-
J.props =
|
|
8111
|
+
J.props = u8.mergeEvaluated.props(W, A, J.props, g0.Name);
|
|
8112
8112
|
}
|
|
8113
8113
|
if (J.items !== true)
|
|
8114
8114
|
if (N && !N.dynamicItems) {
|
|
8115
8115
|
if (N.items !== undefined)
|
|
8116
|
-
J.items =
|
|
8116
|
+
J.items = u8.mergeEvaluated.items(W, N.items, J.items);
|
|
8117
8117
|
} else {
|
|
8118
8118
|
let A = W.var("items", g0._`${F}.evaluated.items`);
|
|
8119
|
-
J.items =
|
|
8119
|
+
J.items = u8.mergeEvaluated.items(W, A, J.items, g0.Name);
|
|
8120
8120
|
}
|
|
8121
8121
|
}
|
|
8122
8122
|
}
|
|
8123
|
-
ZH.callRef =
|
|
8123
|
+
ZH.callRef = l8;
|
|
8124
8124
|
ZH.default = ow;
|
|
8125
8125
|
});
|
|
8126
8126
|
TH = P((vH) => {
|
|
@@ -8130,9 +8130,9 @@ var init_sdk = __esm(() => {
|
|
|
8130
8130
|
});
|
|
8131
8131
|
xH = P((_H) => {
|
|
8132
8132
|
Object.defineProperty(_H, "__esModule", { value: true });
|
|
8133
|
-
var
|
|
8133
|
+
var m8 = c(), d1 = m8.operators, c8 = { maximum: { okStr: "<=", ok: d1.LTE, fail: d1.GT }, minimum: { okStr: ">=", ok: d1.GTE, fail: d1.LT }, exclusiveMaximum: { okStr: "<", ok: d1.LT, fail: d1.GTE }, exclusiveMinimum: { okStr: ">", ok: d1.GT, fail: d1.LTE } }, $M = { message: ({ keyword: X, schemaCode: Q }) => m8.str`must be ${c8[X].okStr} ${Q}`, params: ({ keyword: X, schemaCode: Q }) => m8._`{comparison: ${c8[X].okStr}, limit: ${Q}}` }, YM = { keyword: Object.keys(c8), type: "number", schemaType: "number", $data: true, error: $M, code(X) {
|
|
8134
8134
|
let { keyword: Q, data: $, schemaCode: Y } = X;
|
|
8135
|
-
X.fail$data(
|
|
8135
|
+
X.fail$data(m8._`${$} ${c8[Q].fail} ${Y} || isNaN(${$})`);
|
|
8136
8136
|
} };
|
|
8137
8137
|
_H.default = YM;
|
|
8138
8138
|
});
|
|
@@ -8171,9 +8171,9 @@ var init_sdk = __esm(() => {
|
|
|
8171
8171
|
});
|
|
8172
8172
|
pH = P((cH) => {
|
|
8173
8173
|
Object.defineProperty(cH, "__esModule", { value: true });
|
|
8174
|
-
var qM = d0(),
|
|
8175
|
-
let { data: Q, $data: $, schema: Y, schemaCode: W, it: J } = X, G = J.opts.unicodeRegExp ? "u" : "", H = $ ?
|
|
8176
|
-
X.fail$data(
|
|
8174
|
+
var qM = d0(), p8 = c(), FM = { message: ({ schemaCode: X }) => p8.str`must match pattern "${X}"`, params: ({ schemaCode: X }) => p8._`{pattern: ${X}}` }, NM = { keyword: "pattern", type: "string", schemaType: "string", $data: true, error: FM, code(X) {
|
|
8175
|
+
let { data: Q, $data: $, schema: Y, schemaCode: W, it: J } = X, G = J.opts.unicodeRegExp ? "u" : "", H = $ ? p8._`(new RegExp(${W}, ${G}))` : (0, qM.usePattern)(X, Y);
|
|
8176
|
+
X.fail$data(p8._`!${H}.test(${Q})`);
|
|
8177
8177
|
} };
|
|
8178
8178
|
cH.default = NM;
|
|
8179
8179
|
});
|
|
@@ -8248,7 +8248,7 @@ var init_sdk = __esm(() => {
|
|
|
8248
8248
|
} };
|
|
8249
8249
|
oH.default = bM;
|
|
8250
8250
|
});
|
|
8251
|
-
|
|
8251
|
+
d8 = P((sH) => {
|
|
8252
8252
|
Object.defineProperty(sH, "__esModule", { value: true });
|
|
8253
8253
|
var aH = DY();
|
|
8254
8254
|
aH.code = 'require("ajv/dist/runtime/equal").default';
|
|
@@ -8256,7 +8256,7 @@ var init_sdk = __esm(() => {
|
|
|
8256
8256
|
});
|
|
8257
8257
|
XB = P((eH) => {
|
|
8258
8258
|
Object.defineProperty(eH, "__esModule", { value: true });
|
|
8259
|
-
var TY = mX(), E0 = c(), ZM = e(), CM =
|
|
8259
|
+
var TY = mX(), E0 = c(), ZM = e(), CM = d8(), kM = { message: ({ params: { i: X, j: Q } }) => E0.str`must NOT have duplicate items (items ## ${Q} and ${X} are identical)`, params: ({ params: { i: X, j: Q } }) => E0._`{i: ${X}, j: ${Q}}` }, vM = { keyword: "uniqueItems", type: "array", schemaType: "boolean", $data: true, error: kM, code(X) {
|
|
8260
8260
|
let { gen: Q, data: $, $data: Y, schema: W, parentSchema: J, schemaCode: G, it: H } = X;
|
|
8261
8261
|
if (!Y && !W)
|
|
8262
8262
|
return;
|
|
@@ -8290,7 +8290,7 @@ var init_sdk = __esm(() => {
|
|
|
8290
8290
|
});
|
|
8291
8291
|
$B = P((QB) => {
|
|
8292
8292
|
Object.defineProperty(QB, "__esModule", { value: true });
|
|
8293
|
-
var _Y = c(), _M = e(), xM =
|
|
8293
|
+
var _Y = c(), _M = e(), xM = d8(), yM = { message: "must be equal to constant", params: ({ schemaCode: X }) => _Y._`{allowedValue: ${X}}` }, gM = { keyword: "const", $data: true, error: yM, code(X) {
|
|
8294
8294
|
let { gen: Q, data: $, $data: Y, schemaCode: W, schema: J } = X;
|
|
8295
8295
|
if (Y || J && typeof J == "object")
|
|
8296
8296
|
X.fail$data(_Y._`!${(0, _M.useFunc)(Q, xM.default)}(${$}, ${W})`);
|
|
@@ -8301,7 +8301,7 @@ var init_sdk = __esm(() => {
|
|
|
8301
8301
|
});
|
|
8302
8302
|
WB = P((YB) => {
|
|
8303
8303
|
Object.defineProperty(YB, "__esModule", { value: true });
|
|
8304
|
-
var Y4 = c(), fM = e(), uM =
|
|
8304
|
+
var Y4 = c(), fM = e(), uM = d8(), lM = { message: "must be equal to one of the allowed values", params: ({ schemaCode: X }) => Y4._`{allowedValues: ${X}}` }, mM = { keyword: "enum", schemaType: "array", $data: true, error: lM, code(X) {
|
|
8305
8305
|
let { gen: Q, data: $, $data: Y, schema: W, schemaCode: J, it: G } = X;
|
|
8306
8306
|
if (!Y && W.length === 0)
|
|
8307
8307
|
throw Error("enum must have non-empty array");
|
|
@@ -8364,21 +8364,21 @@ var init_sdk = __esm(() => {
|
|
|
8364
8364
|
gY = P((VB) => {
|
|
8365
8365
|
Object.defineProperty(VB, "__esModule", { value: true });
|
|
8366
8366
|
VB.validateTuple = undefined;
|
|
8367
|
-
var KB = c(),
|
|
8367
|
+
var KB = c(), i8 = e(), Jj = d0(), Gj = { keyword: "items", type: "array", schemaType: ["object", "array", "boolean"], before: "uniqueItems", code(X) {
|
|
8368
8368
|
let { schema: Q, it: $ } = X;
|
|
8369
8369
|
if (Array.isArray(Q))
|
|
8370
8370
|
return UB(X, "additionalItems", Q);
|
|
8371
|
-
if ($.items = true, (0,
|
|
8371
|
+
if ($.items = true, (0, i8.alwaysValidSchema)($, Q))
|
|
8372
8372
|
return;
|
|
8373
8373
|
X.ok((0, Jj.validateArray)(X));
|
|
8374
8374
|
} };
|
|
8375
8375
|
function UB(X, Q, $ = X.schema) {
|
|
8376
8376
|
let { gen: Y, parentSchema: W, data: J, keyword: G, it: H } = X;
|
|
8377
8377
|
if (K(W), H.opts.unevaluated && $.length && H.items !== true)
|
|
8378
|
-
H.items =
|
|
8378
|
+
H.items = i8.mergeEvaluated.items(Y, $.length, H.items);
|
|
8379
8379
|
let B = Y.name("valid"), z = Y.const("len", KB._`${J}.length`);
|
|
8380
8380
|
$.forEach((V, L) => {
|
|
8381
|
-
if ((0,
|
|
8381
|
+
if ((0, i8.alwaysValidSchema)(H, V))
|
|
8382
8382
|
return;
|
|
8383
8383
|
Y.if(KB._`${z} > ${L}`, () => X.subschema({ keyword: G, schemaProp: L, dataProp: L }, B)), X.ok(B);
|
|
8384
8384
|
});
|
|
@@ -8386,7 +8386,7 @@ var init_sdk = __esm(() => {
|
|
|
8386
8386
|
let { opts: L, errSchemaPath: U } = H, F = $.length, q = F === V.minItems && (F === V.maxItems || V[Q] === false);
|
|
8387
8387
|
if (L.strictTuples && !q) {
|
|
8388
8388
|
let N = `"${G}" is ${F}-tuple, but minItems or maxItems/${Q} are not specified or different at path "${U}"`;
|
|
8389
|
-
(0,
|
|
8389
|
+
(0, i8.checkStrictMode)(H, N, L.strictTuples);
|
|
8390
8390
|
}
|
|
8391
8391
|
}
|
|
8392
8392
|
}
|
|
@@ -8413,7 +8413,7 @@ var init_sdk = __esm(() => {
|
|
|
8413
8413
|
});
|
|
8414
8414
|
wB = P((AB) => {
|
|
8415
8415
|
Object.defineProperty(AB, "__esModule", { value: true });
|
|
8416
|
-
var i0 = c(),
|
|
8416
|
+
var i0 = c(), n8 = e(), Oj = { message: ({ params: { min: X, max: Q } }) => Q === undefined ? i0.str`must contain at least ${X} valid item(s)` : i0.str`must contain at least ${X} and no more than ${Q} valid item(s)`, params: ({ params: { min: X, max: Q } }) => Q === undefined ? i0._`{minContains: ${X}}` : i0._`{minContains: ${X}, maxContains: ${Q}}` }, Dj = { keyword: "contains", type: "array", schemaType: ["object", "boolean"], before: "uniqueItems", trackErrors: true, error: Oj, code(X) {
|
|
8417
8417
|
let { gen: Q, schema: $, parentSchema: Y, data: W, it: J } = X, G, H, { minContains: B, maxContains: z } = Y;
|
|
8418
8418
|
if (J.opts.next)
|
|
8419
8419
|
G = B === undefined ? 1 : B, H = z;
|
|
@@ -8421,14 +8421,14 @@ var init_sdk = __esm(() => {
|
|
|
8421
8421
|
G = 1;
|
|
8422
8422
|
let K = Q.const("len", i0._`${W}.length`);
|
|
8423
8423
|
if (X.setParams({ min: G, max: H }), H === undefined && G === 0) {
|
|
8424
|
-
(0,
|
|
8424
|
+
(0, n8.checkStrictMode)(J, '"minContains" == 0 without "maxContains": "contains" keyword ignored');
|
|
8425
8425
|
return;
|
|
8426
8426
|
}
|
|
8427
8427
|
if (H !== undefined && G > H) {
|
|
8428
|
-
(0,
|
|
8428
|
+
(0, n8.checkStrictMode)(J, '"minContains" > "maxContains" is always invalid'), X.fail();
|
|
8429
8429
|
return;
|
|
8430
8430
|
}
|
|
8431
|
-
if ((0,
|
|
8431
|
+
if ((0, n8.alwaysValidSchema)(J, $)) {
|
|
8432
8432
|
let q = i0._`${K} >= ${G}`;
|
|
8433
8433
|
if (H !== undefined)
|
|
8434
8434
|
q = i0._`${q} && ${K} <= ${H}`;
|
|
@@ -8451,7 +8451,7 @@ var init_sdk = __esm(() => {
|
|
|
8451
8451
|
}
|
|
8452
8452
|
function U(q, N) {
|
|
8453
8453
|
Q.forRange("i", 0, K, (A) => {
|
|
8454
|
-
X.subschema({ keyword: "contains", dataProp: A, dataPropType:
|
|
8454
|
+
X.subschema({ keyword: "contains", dataProp: A, dataPropType: n8.Type.Num, compositeRule: true }, q), N();
|
|
8455
8455
|
});
|
|
8456
8456
|
}
|
|
8457
8457
|
function F(q) {
|
|
@@ -8542,14 +8542,14 @@ var init_sdk = __esm(() => {
|
|
|
8542
8542
|
});
|
|
8543
8543
|
fY = P((CB) => {
|
|
8544
8544
|
Object.defineProperty(CB, "__esModule", { value: true });
|
|
8545
|
-
var
|
|
8545
|
+
var r8 = d0(), $1 = c(), Zj = R1(), o8 = e(), Cj = { message: "must NOT have additional properties", params: ({ params: X }) => $1._`{additionalProperty: ${X.additionalProperty}}` }, kj = { keyword: "additionalProperties", type: ["object"], schemaType: ["boolean", "object"], allowUndefined: true, trackErrors: true, error: Cj, code(X) {
|
|
8546
8546
|
let { gen: Q, schema: $, parentSchema: Y, data: W, errsCount: J, it: G } = X;
|
|
8547
8547
|
if (!J)
|
|
8548
8548
|
throw Error("ajv implementation error");
|
|
8549
8549
|
let { allErrors: H, opts: B } = G;
|
|
8550
|
-
if (G.props = true, B.removeAdditional !== "all" && (0,
|
|
8550
|
+
if (G.props = true, B.removeAdditional !== "all" && (0, o8.alwaysValidSchema)(G, $))
|
|
8551
8551
|
return;
|
|
8552
|
-
let z = (0,
|
|
8552
|
+
let z = (0, r8.allSchemaProperties)(Y.properties), K = (0, r8.allSchemaProperties)(Y.patternProperties);
|
|
8553
8553
|
V(), X.ok($1._`${J} === ${Zj.default.errors}`);
|
|
8554
8554
|
function V() {
|
|
8555
8555
|
Q.forIn("key", W, (N) => {
|
|
@@ -8562,14 +8562,14 @@ var init_sdk = __esm(() => {
|
|
|
8562
8562
|
function L(N) {
|
|
8563
8563
|
let A;
|
|
8564
8564
|
if (z.length > 8) {
|
|
8565
|
-
let M = (0,
|
|
8566
|
-
A = (0,
|
|
8565
|
+
let M = (0, o8.schemaRefOrVal)(G, Y.properties, "properties");
|
|
8566
|
+
A = (0, r8.isOwnProperty)(Q, M, N);
|
|
8567
8567
|
} else if (z.length)
|
|
8568
8568
|
A = (0, $1.or)(...z.map((M) => $1._`${N} === ${M}`));
|
|
8569
8569
|
else
|
|
8570
8570
|
A = $1.nil;
|
|
8571
8571
|
if (K.length)
|
|
8572
|
-
A = (0, $1.or)(A, ...K.map((M) => $1._`${(0,
|
|
8572
|
+
A = (0, $1.or)(A, ...K.map((M) => $1._`${(0, r8.usePattern)(X, M)}.test(${N})`));
|
|
8573
8573
|
return (0, $1.not)(A);
|
|
8574
8574
|
}
|
|
8575
8575
|
function U(N) {
|
|
@@ -8585,7 +8585,7 @@ var init_sdk = __esm(() => {
|
|
|
8585
8585
|
Q.break();
|
|
8586
8586
|
return;
|
|
8587
8587
|
}
|
|
8588
|
-
if (typeof $ == "object" && !(0,
|
|
8588
|
+
if (typeof $ == "object" && !(0, o8.alwaysValidSchema)(G, $)) {
|
|
8589
8589
|
let A = Q.name("valid");
|
|
8590
8590
|
if (B.removeAdditional === "failing")
|
|
8591
8591
|
q(N, A, false), Q.if((0, $1.not)(A), () => {
|
|
@@ -8596,7 +8596,7 @@ var init_sdk = __esm(() => {
|
|
|
8596
8596
|
}
|
|
8597
8597
|
}
|
|
8598
8598
|
function q(N, A, M) {
|
|
8599
|
-
let R = { keyword: "additionalProperties", dataProp: N, dataPropType:
|
|
8599
|
+
let R = { keyword: "additionalProperties", dataProp: N, dataPropType: o8.Type.Str };
|
|
8600
8600
|
if (M === false)
|
|
8601
8601
|
Object.assign(R, { compositeRule: true, createErrors: false, allErrors: false });
|
|
8602
8602
|
X.subschema(R, A);
|
|
@@ -8640,12 +8640,12 @@ var init_sdk = __esm(() => {
|
|
|
8640
8640
|
});
|
|
8641
8641
|
fB = P((hB) => {
|
|
8642
8642
|
Object.defineProperty(hB, "__esModule", { value: true });
|
|
8643
|
-
var xB = d0(),
|
|
8643
|
+
var xB = d0(), t8 = c(), yB = e(), gB = e(), yj = { keyword: "patternProperties", type: "object", schemaType: "object", code(X) {
|
|
8644
8644
|
let { gen: Q, schema: $, data: Y, parentSchema: W, it: J } = X, { opts: G } = J, H = (0, xB.allSchemaProperties)($), B = H.filter((q) => (0, yB.alwaysValidSchema)(J, $[q]));
|
|
8645
8645
|
if (H.length === 0 || B.length === H.length && (!J.opts.unevaluated || J.props === true))
|
|
8646
8646
|
return;
|
|
8647
8647
|
let z = G.strictSchema && !G.allowMatchingProperties && W.properties, K = Q.name("valid");
|
|
8648
|
-
if (J.props !== true && !(J.props instanceof
|
|
8648
|
+
if (J.props !== true && !(J.props instanceof t8.Name))
|
|
8649
8649
|
J.props = (0, gB.evaluatedPropsToName)(Q, J.props);
|
|
8650
8650
|
let { props: V } = J;
|
|
8651
8651
|
L();
|
|
@@ -8666,14 +8666,14 @@ var init_sdk = __esm(() => {
|
|
|
8666
8666
|
}
|
|
8667
8667
|
function F(q) {
|
|
8668
8668
|
Q.forIn("key", Y, (N) => {
|
|
8669
|
-
Q.if(
|
|
8669
|
+
Q.if(t8._`${(0, xB.usePattern)(X, q)}.test(${N})`, () => {
|
|
8670
8670
|
let A = B.includes(q);
|
|
8671
8671
|
if (!A)
|
|
8672
8672
|
X.subschema({ keyword: "patternProperties", schemaProp: q, dataProp: N, dataPropType: gB.Type.Str }, K);
|
|
8673
8673
|
if (J.opts.unevaluated && V !== true)
|
|
8674
|
-
Q.assign(
|
|
8674
|
+
Q.assign(t8._`${V}[${N}]`, true);
|
|
8675
8675
|
else if (!A && !J.allErrors)
|
|
8676
|
-
Q.if((0,
|
|
8676
|
+
Q.if((0, t8.not)(K), () => Q.break());
|
|
8677
8677
|
});
|
|
8678
8678
|
});
|
|
8679
8679
|
}
|
|
@@ -8700,7 +8700,7 @@ var init_sdk = __esm(() => {
|
|
|
8700
8700
|
});
|
|
8701
8701
|
dB = P((pB) => {
|
|
8702
8702
|
Object.defineProperty(pB, "__esModule", { value: true });
|
|
8703
|
-
var
|
|
8703
|
+
var a8 = c(), pj = e(), dj = { message: "must match exactly one schema in oneOf", params: ({ params: X }) => a8._`{passingSchemas: ${X.passing}}` }, ij = { keyword: "oneOf", schemaType: "array", trackErrors: true, error: dj, code(X) {
|
|
8704
8704
|
let { gen: Q, schema: $, parentSchema: Y, it: W } = X;
|
|
8705
8705
|
if (!Array.isArray($))
|
|
8706
8706
|
throw Error("ajv implementation error");
|
|
@@ -8716,10 +8716,10 @@ var init_sdk = __esm(() => {
|
|
|
8716
8716
|
else
|
|
8717
8717
|
L = X.subschema({ keyword: "oneOf", schemaProp: V, compositeRule: true }, B);
|
|
8718
8718
|
if (V > 0)
|
|
8719
|
-
Q.if(
|
|
8719
|
+
Q.if(a8._`${B} && ${G}`).assign(G, false).assign(H, a8._`[${H}, ${V}]`).else();
|
|
8720
8720
|
Q.if(B, () => {
|
|
8721
8721
|
if (Q.assign(G, true), Q.assign(H, V), L)
|
|
8722
|
-
X.mergeEvaluated(L,
|
|
8722
|
+
X.mergeEvaluated(L, a8.Name);
|
|
8723
8723
|
});
|
|
8724
8724
|
});
|
|
8725
8725
|
}
|
|
@@ -8744,7 +8744,7 @@ var init_sdk = __esm(() => {
|
|
|
8744
8744
|
});
|
|
8745
8745
|
aB = P((tB) => {
|
|
8746
8746
|
Object.defineProperty(tB, "__esModule", { value: true });
|
|
8747
|
-
var
|
|
8747
|
+
var s8 = c(), oB = e(), aj = { message: ({ params: X }) => s8.str`must match "${X.ifClause}" schema`, params: ({ params: X }) => s8._`{failingKeyword: ${X.ifClause}}` }, sj = { keyword: "if", schemaType: ["object", "boolean"], trackErrors: true, error: aj, code(X) {
|
|
8748
8748
|
let { gen: Q, parentSchema: $, it: Y } = X;
|
|
8749
8749
|
if ($.then === undefined && $.else === undefined)
|
|
8750
8750
|
(0, oB.checkStrictMode)(Y, '"if" without "then" and "else" is ignored');
|
|
@@ -8758,7 +8758,7 @@ var init_sdk = __esm(() => {
|
|
|
8758
8758
|
} else if (W)
|
|
8759
8759
|
Q.if(H, z("then"));
|
|
8760
8760
|
else
|
|
8761
|
-
Q.if((0,
|
|
8761
|
+
Q.if((0, s8.not)(H), z("else"));
|
|
8762
8762
|
X.pass(G, () => X.error(true));
|
|
8763
8763
|
function B() {
|
|
8764
8764
|
let K = X.subschema({ keyword: "if", compositeRule: true, createErrors: false, allErrors: false }, H);
|
|
@@ -8768,7 +8768,7 @@ var init_sdk = __esm(() => {
|
|
|
8768
8768
|
return () => {
|
|
8769
8769
|
let L = X.subschema({ keyword: K }, H);
|
|
8770
8770
|
if (Q.assign(G, H), X.mergeValidEvaluated(L, G), V)
|
|
8771
|
-
Q.assign(V,
|
|
8771
|
+
Q.assign(V, s8._`${K}`);
|
|
8772
8772
|
else
|
|
8773
8773
|
X.setParams({ ifClause: K });
|
|
8774
8774
|
};
|
|
@@ -8889,7 +8889,7 @@ var init_sdk = __esm(() => {
|
|
|
8889
8889
|
});
|
|
8890
8890
|
Dz = P((Oz) => {
|
|
8891
8891
|
Object.defineProperty(Oz, "__esModule", { value: true });
|
|
8892
|
-
var i6 = c(), lY = Fz(), Nz =
|
|
8892
|
+
var i6 = c(), lY = Fz(), Nz = _8(), _R = nX(), xR = e(), yR = { message: ({ params: { discrError: X, tagName: Q } }) => X === lY.DiscrError.Tag ? `tag "${Q}" must be string` : `value of tag "${Q}" must be in oneOf`, params: ({ params: { discrError: X, tag: Q, tagName: $ } }) => i6._`{error: ${X}, tag: ${$}, tagValue: ${Q}}` }, gR = { keyword: "discriminator", type: "object", schemaType: "object", error: yR, code(X) {
|
|
8893
8893
|
let { gen: Q, data: $, schema: Y, parentSchema: W, it: J } = X, { oneOf: G } = W;
|
|
8894
8894
|
if (!J.opts.discriminator)
|
|
8895
8895
|
throw Error("discriminator: requires discriminator option");
|
|
@@ -8954,13 +8954,13 @@ var init_sdk = __esm(() => {
|
|
|
8954
8954
|
} };
|
|
8955
8955
|
Oz.default = gR;
|
|
8956
8956
|
});
|
|
8957
|
-
Az = P((
|
|
8957
|
+
Az = P((sT, fR) => {
|
|
8958
8958
|
fR.exports = { $schema: "http://json-schema.org/draft-07/schema#", $id: "http://json-schema.org/draft-07/schema#", title: "Core schema meta-schema", definitions: { schemaArray: { type: "array", minItems: 1, items: { $ref: "#" } }, nonNegativeInteger: { type: "integer", minimum: 0 }, nonNegativeIntegerDefault0: { allOf: [{ $ref: "#/definitions/nonNegativeInteger" }, { default: 0 }] }, simpleTypes: { enum: ["array", "boolean", "integer", "null", "number", "object", "string"] }, stringArray: { type: "array", items: { type: "string" }, uniqueItems: true, default: [] } }, type: ["object", "boolean"], properties: { $id: { type: "string", format: "uri-reference" }, $schema: { type: "string", format: "uri" }, $ref: { type: "string", format: "uri-reference" }, $comment: { type: "string" }, title: { type: "string" }, description: { type: "string" }, default: true, readOnly: { type: "boolean", default: false }, examples: { type: "array", items: true }, multipleOf: { type: "number", exclusiveMinimum: 0 }, maximum: { type: "number" }, exclusiveMaximum: { type: "number" }, minimum: { type: "number" }, exclusiveMinimum: { type: "number" }, maxLength: { $ref: "#/definitions/nonNegativeInteger" }, minLength: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, pattern: { type: "string", format: "regex" }, additionalItems: { $ref: "#" }, items: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/schemaArray" }], default: true }, maxItems: { $ref: "#/definitions/nonNegativeInteger" }, minItems: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, uniqueItems: { type: "boolean", default: false }, contains: { $ref: "#" }, maxProperties: { $ref: "#/definitions/nonNegativeInteger" }, minProperties: { $ref: "#/definitions/nonNegativeIntegerDefault0" }, required: { $ref: "#/definitions/stringArray" }, additionalProperties: { $ref: "#" }, definitions: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, properties: { type: "object", additionalProperties: { $ref: "#" }, default: {} }, patternProperties: { type: "object", additionalProperties: { $ref: "#" }, propertyNames: { format: "regex" }, default: {} }, dependencies: { type: "object", additionalProperties: { anyOf: [{ $ref: "#" }, { $ref: "#/definitions/stringArray" }] } }, propertyNames: { $ref: "#" }, const: true, enum: { type: "array", items: true, minItems: 1, uniqueItems: true }, type: { anyOf: [{ $ref: "#/definitions/simpleTypes" }, { type: "array", items: { $ref: "#/definitions/simpleTypes" }, minItems: 1, uniqueItems: true }] }, format: { type: "string" }, contentMediaType: { type: "string" }, contentEncoding: { type: "string" }, if: { $ref: "#" }, then: { $ref: "#" }, else: { $ref: "#" }, allOf: { $ref: "#/definitions/schemaArray" }, anyOf: { $ref: "#/definitions/schemaArray" }, oneOf: { $ref: "#/definitions/schemaArray" }, not: { $ref: "#" } }, default: true };
|
|
8959
8959
|
});
|
|
8960
8960
|
cY = P((h0, mY) => {
|
|
8961
8961
|
Object.defineProperty(h0, "__esModule", { value: true });
|
|
8962
8962
|
h0.MissingRefError = h0.ValidationError = h0.CodeGen = h0.Name = h0.nil = h0.stringify = h0.str = h0._ = h0.KeywordCxt = h0.Ajv = undefined;
|
|
8963
|
-
var uR = RH(), lR = Uz(), mR = Dz(), wz = Az(), cR = ["/properties"],
|
|
8963
|
+
var uR = RH(), lR = Uz(), mR = Dz(), wz = Az(), cR = ["/properties"], e8 = "http://json-schema.org/draft-07/schema";
|
|
8964
8964
|
|
|
8965
8965
|
class J4 extends uR.default {
|
|
8966
8966
|
_addVocabularies() {
|
|
@@ -8971,10 +8971,10 @@ var init_sdk = __esm(() => {
|
|
|
8971
8971
|
if (super._addDefaultMetaSchema(), !this.opts.meta)
|
|
8972
8972
|
return;
|
|
8973
8973
|
let X = this.opts.$data ? this.$dataMetaSchema(wz, cR) : wz;
|
|
8974
|
-
this.addMetaSchema(X,
|
|
8974
|
+
this.addMetaSchema(X, e8, false), this.refs["http://json-schema.org/schema"] = e8;
|
|
8975
8975
|
}
|
|
8976
8976
|
defaultMeta() {
|
|
8977
|
-
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(
|
|
8977
|
+
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(e8) ? e8 : undefined);
|
|
8978
8978
|
}
|
|
8979
8979
|
}
|
|
8980
8980
|
h0.Ajv = J4;
|
|
@@ -9005,7 +9005,7 @@ var init_sdk = __esm(() => {
|
|
|
9005
9005
|
Object.defineProperty(h0, "CodeGen", { enumerable: true, get: function() {
|
|
9006
9006
|
return n6.CodeGen;
|
|
9007
9007
|
} });
|
|
9008
|
-
var dR =
|
|
9008
|
+
var dR = v8();
|
|
9009
9009
|
Object.defineProperty(h0, "ValidationError", { enumerable: true, get: function() {
|
|
9010
9010
|
return dR.default;
|
|
9011
9011
|
} });
|
|
@@ -9134,8 +9134,8 @@ var init_sdk = __esm(() => {
|
|
|
9134
9134
|
vz = P((kz) => {
|
|
9135
9135
|
Object.defineProperty(kz, "__esModule", { value: true });
|
|
9136
9136
|
kz.formatLimitDefinition = undefined;
|
|
9137
|
-
var zE = cY(), Y1 = c(), i1 = Y1.operators,
|
|
9138
|
-
kz.formatLimitDefinition = { keyword: Object.keys(
|
|
9137
|
+
var zE = cY(), Y1 = c(), i1 = Y1.operators, X9 = { formatMaximum: { okStr: "<=", ok: i1.LTE, fail: i1.GT }, formatMinimum: { okStr: ">=", ok: i1.GTE, fail: i1.LT }, formatExclusiveMaximum: { okStr: "<", ok: i1.LT, fail: i1.GTE }, formatExclusiveMinimum: { okStr: ">", ok: i1.GT, fail: i1.LTE } }, KE = { message: ({ keyword: X, schemaCode: Q }) => Y1.str`should be ${X9[X].okStr} ${Q}`, params: ({ keyword: X, schemaCode: Q }) => Y1._`{comparison: ${X9[X].okStr}, limit: ${Q}}` };
|
|
9138
|
+
kz.formatLimitDefinition = { keyword: Object.keys(X9), type: "string", schemaType: "string", $data: true, error: KE, code(X) {
|
|
9139
9139
|
let { gen: Q, data: $, schemaCode: Y, keyword: W, it: J } = X, { opts: G, self: H } = J;
|
|
9140
9140
|
if (!G.validateFormats)
|
|
9141
9141
|
return;
|
|
@@ -9158,7 +9158,7 @@ var init_sdk = __esm(() => {
|
|
|
9158
9158
|
X.fail$data(V(F));
|
|
9159
9159
|
}
|
|
9160
9160
|
function V(L) {
|
|
9161
|
-
return Y1._`${L}.compare(${$}, ${Y}) ${
|
|
9161
|
+
return Y1._`${L}.compare(${$}, ${Y}) ${X9[W].fail} 0`;
|
|
9162
9162
|
}
|
|
9163
9163
|
}, dependencies: ["format"] };
|
|
9164
9164
|
var UE = (X) => {
|
|
@@ -9247,7 +9247,7 @@ var init_sdk = __esm(() => {
|
|
|
9247
9247
|
A6.prototype.get = S7;
|
|
9248
9248
|
A6.prototype.has = Z7;
|
|
9249
9249
|
A6.prototype.set = C7;
|
|
9250
|
-
|
|
9250
|
+
W9 = A6;
|
|
9251
9251
|
k7 = XU;
|
|
9252
9252
|
v7 = QU;
|
|
9253
9253
|
Z1 = $U;
|
|
@@ -9277,9 +9277,9 @@ var init_sdk = __esm(() => {
|
|
|
9277
9277
|
M6.prototype.get = m7;
|
|
9278
9278
|
M6.prototype.has = c7;
|
|
9279
9279
|
M6.prototype.set = p7;
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
r1 =
|
|
9280
|
+
J9 = M6;
|
|
9281
|
+
G9.Cache = J9;
|
|
9282
|
+
r1 = G9;
|
|
9283
9283
|
i7 = r1((X) => {
|
|
9284
9284
|
if (!X || X.trim() === "")
|
|
9285
9285
|
return null;
|
|
@@ -9306,9 +9306,9 @@ var init_sdk = __esm(() => {
|
|
|
9306
9306
|
} };
|
|
9307
9307
|
bU = IU();
|
|
9308
9308
|
e7 = new Set;
|
|
9309
|
-
|
|
9309
|
+
B9 = 1 / 0;
|
|
9310
9310
|
SU = r1(() => {
|
|
9311
|
-
return
|
|
9311
|
+
return H9(process.env.DEBUG) || H9(process.env.DEBUG_SDK) || process.argv.includes("--debug") || process.argv.includes("-d") || YW() || process.argv.some((X) => X.startsWith("--debug="));
|
|
9312
9312
|
});
|
|
9313
9313
|
ZU = r1(() => {
|
|
9314
9314
|
let X = process.argv.find(($) => $.startsWith("--debug="));
|
|
@@ -9324,7 +9324,7 @@ var init_sdk = __esm(() => {
|
|
|
9324
9324
|
if (process.argv[2] === "--ripgrep")
|
|
9325
9325
|
return;
|
|
9326
9326
|
try {
|
|
9327
|
-
let X = WW(), Q =
|
|
9327
|
+
let X = WW(), Q = z9(X), $ = $W(Q, "latest");
|
|
9328
9328
|
if (!n0().existsSync(Q))
|
|
9329
9329
|
n0().mkdirSync(Q);
|
|
9330
9330
|
if (n0().existsSync($))
|
|
@@ -9735,7 +9735,7 @@ var init_sdk = __esm(() => {
|
|
|
9735
9735
|
return W(Q, $, { signal: Y });
|
|
9736
9736
|
}
|
|
9737
9737
|
connectSdkMcpServer(X, Q) {
|
|
9738
|
-
let $ = new
|
|
9738
|
+
let $ = new K9((Y) => this.sendMcpServerMessageToCli(X, Y));
|
|
9739
9739
|
this.sdkMcpTransports.set(X, $), this.sdkMcpServerInstances.set(X, Q), Q.connect($);
|
|
9740
9740
|
}
|
|
9741
9741
|
async disconnectSdkMcpServer(X) {
|
|
@@ -9775,7 +9775,7 @@ var init_sdk = __esm(() => {
|
|
|
9775
9775
|
});
|
|
9776
9776
|
}
|
|
9777
9777
|
};
|
|
9778
|
-
|
|
9778
|
+
U9 = class U9 {
|
|
9779
9779
|
closed = false;
|
|
9780
9780
|
inputStream;
|
|
9781
9781
|
query;
|
|
@@ -10005,9 +10005,9 @@ var init_sdk = __esm(() => {
|
|
|
10005
10005
|
if (!JV.test(X.data))
|
|
10006
10006
|
Y = this._getOrReturnCtx(X, Y), b(Y, { validation: "email", code: w.invalid_string, message: W.message }), $.dirty();
|
|
10007
10007
|
} else if (W.kind === "emoji") {
|
|
10008
|
-
if (!
|
|
10009
|
-
|
|
10010
|
-
if (!
|
|
10008
|
+
if (!F9)
|
|
10009
|
+
F9 = new RegExp(GV, "u");
|
|
10010
|
+
if (!F9.test(X.data))
|
|
10011
10011
|
Y = this._getOrReturnCtx(X, Y), b(Y, { validation: "emoji", code: w.invalid_string, message: W.message }), $.dirty();
|
|
10012
10012
|
} else if (W.kind === "uuid") {
|
|
10013
10013
|
if (!QV.test(X.data))
|
|
@@ -10828,7 +10828,7 @@ var init_sdk = __esm(() => {
|
|
|
10828
10828
|
zX.create = (X, Q) => {
|
|
10829
10829
|
return new zX({ options: X, typeName: j.ZodUnion, ...l(Q) });
|
|
10830
10830
|
};
|
|
10831
|
-
|
|
10831
|
+
O9 = class O9 extends p {
|
|
10832
10832
|
_parse(X) {
|
|
10833
10833
|
let { ctx: Q } = this._processInputParams(X);
|
|
10834
10834
|
if (Q.parsedType !== E.object)
|
|
@@ -10862,18 +10862,18 @@ var init_sdk = __esm(() => {
|
|
|
10862
10862
|
Y.set(G, W);
|
|
10863
10863
|
}
|
|
10864
10864
|
}
|
|
10865
|
-
return new
|
|
10865
|
+
return new O9({ typeName: j.ZodDiscriminatedUnion, discriminator: X, options: Q, optionsMap: Y, ...l($) });
|
|
10866
10866
|
}
|
|
10867
10867
|
};
|
|
10868
10868
|
KX = class KX extends p {
|
|
10869
10869
|
_parse(X) {
|
|
10870
10870
|
let { status: Q, ctx: $ } = this._processInputParams(X), Y = (W, J) => {
|
|
10871
|
-
if (
|
|
10871
|
+
if (L9(W) || L9(J))
|
|
10872
10872
|
return g;
|
|
10873
|
-
let G =
|
|
10873
|
+
let G = N9(W.value, J.value);
|
|
10874
10874
|
if (!G.valid)
|
|
10875
10875
|
return b($, { code: w.invalid_intersection_types }), g;
|
|
10876
|
-
if (
|
|
10876
|
+
if (q9(W) || q9(J))
|
|
10877
10877
|
Q.dirty();
|
|
10878
10878
|
return { status: Q.value, value: G.data };
|
|
10879
10879
|
};
|
|
@@ -11378,8 +11378,8 @@ var init_sdk = __esm(() => {
|
|
|
11378
11378
|
R4.create = (X) => {
|
|
11379
11379
|
return new R4({ typeName: j.ZodNaN, ...l(X) });
|
|
11380
11380
|
};
|
|
11381
|
-
|
|
11382
|
-
|
|
11381
|
+
V2 = Symbol("zod_brand");
|
|
11382
|
+
D9 = class D9 extends p {
|
|
11383
11383
|
_parse(X) {
|
|
11384
11384
|
let { ctx: Q } = this._processInputParams(X), $ = Q.data;
|
|
11385
11385
|
return this._def.type._parse({ data: $, path: Q.path, parent: Q });
|
|
@@ -11431,44 +11431,44 @@ var init_sdk = __esm(() => {
|
|
|
11431
11431
|
NX.create = (X, Q) => {
|
|
11432
11432
|
return new NX({ innerType: X, typeName: j.ZodReadonly, ...l(Q) });
|
|
11433
11433
|
};
|
|
11434
|
-
|
|
11434
|
+
L2 = { object: V0.lazycreate };
|
|
11435
11435
|
(function(X) {
|
|
11436
11436
|
X.ZodString = "ZodString", X.ZodNumber = "ZodNumber", X.ZodNaN = "ZodNaN", X.ZodBigInt = "ZodBigInt", X.ZodBoolean = "ZodBoolean", X.ZodDate = "ZodDate", X.ZodSymbol = "ZodSymbol", X.ZodUndefined = "ZodUndefined", X.ZodNull = "ZodNull", X.ZodAny = "ZodAny", X.ZodUnknown = "ZodUnknown", X.ZodNever = "ZodNever", X.ZodVoid = "ZodVoid", X.ZodArray = "ZodArray", X.ZodObject = "ZodObject", X.ZodUnion = "ZodUnion", X.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", X.ZodIntersection = "ZodIntersection", X.ZodTuple = "ZodTuple", X.ZodRecord = "ZodRecord", X.ZodMap = "ZodMap", X.ZodSet = "ZodSet", X.ZodFunction = "ZodFunction", X.ZodLazy = "ZodLazy", X.ZodLiteral = "ZodLiteral", X.ZodEnum = "ZodEnum", X.ZodEffects = "ZodEffects", X.ZodNativeEnum = "ZodNativeEnum", X.ZodOptional = "ZodOptional", X.ZodNullable = "ZodNullable", X.ZodDefault = "ZodDefault", X.ZodCatch = "ZodCatch", X.ZodPromise = "ZodPromise", X.ZodBranded = "ZodBranded", X.ZodPipeline = "ZodPipeline", X.ZodReadonly = "ZodReadonly";
|
|
11437
11437
|
})(j || (j = {}));
|
|
11438
|
-
|
|
11439
|
-
|
|
11440
|
-
|
|
11441
|
-
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
11451
|
-
|
|
11438
|
+
q2 = A1.create;
|
|
11439
|
+
F2 = I6.create;
|
|
11440
|
+
N2 = R4.create;
|
|
11441
|
+
O2 = b6.create;
|
|
11442
|
+
D2 = O4.create;
|
|
11443
|
+
A2 = GX.create;
|
|
11444
|
+
w2 = D4.create;
|
|
11445
|
+
M2 = HX.create;
|
|
11446
|
+
j2 = BX.create;
|
|
11447
|
+
R2 = A4.create;
|
|
11448
|
+
E2 = t1.create;
|
|
11449
|
+
I2 = w1.create;
|
|
11450
|
+
b2 = w4.create;
|
|
11451
|
+
P2 = J1.create;
|
|
11452
11452
|
FW = V0.create;
|
|
11453
|
-
|
|
11454
|
-
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11453
|
+
S2 = V0.strictCreate;
|
|
11454
|
+
Z2 = zX.create;
|
|
11455
|
+
C2 = O9.create;
|
|
11456
|
+
k2 = KX.create;
|
|
11457
|
+
v2 = M1.create;
|
|
11458
|
+
T2 = M4.create;
|
|
11459
|
+
_2 = j4.create;
|
|
11460
|
+
x2 = P6.create;
|
|
11461
|
+
y2 = JX.create;
|
|
11462
|
+
g2 = UX.create;
|
|
11463
|
+
h2 = VX.create;
|
|
11464
|
+
f2 = a1.create;
|
|
11465
|
+
u2 = LX.create;
|
|
11466
|
+
l2 = S6.create;
|
|
11467
|
+
m2 = H1.create;
|
|
11468
|
+
c2 = G1.create;
|
|
11469
|
+
p2 = T1.create;
|
|
11470
|
+
d2 = H1.createWithPreprocess;
|
|
11471
|
+
i2 = E4.create;
|
|
11472
11472
|
wV = Object.freeze({ status: "aborted" });
|
|
11473
11473
|
MV = Symbol("zod_brand");
|
|
11474
11474
|
_1 = class _1 extends Error {
|
|
@@ -11478,9 +11478,9 @@ var init_sdk = __esm(() => {
|
|
|
11478
11478
|
};
|
|
11479
11479
|
I4 = {};
|
|
11480
11480
|
i = {};
|
|
11481
|
-
U7(i, { unwrapMessage: () => OX, stringifyPrimitive: () => S4, required: () => hV, randomString: () => ZV, propertyKeyTypes: () =>
|
|
11481
|
+
U7(i, { unwrapMessage: () => OX, stringifyPrimitive: () => S4, required: () => hV, randomString: () => ZV, propertyKeyTypes: () => E9, promiseAllObject: () => SV, primitiveTypes: () => NW, prefixIssues: () => B1, pick: () => TV, partial: () => gV, optionalKeys: () => I9, omit: () => _V, numKeys: () => CV, nullish: () => wX, normalizeParams: () => y, merge: () => yV, jsonStringifyReplacer: () => w9, joinValues: () => b4, issue: () => P9, isPlainObject: () => C6, isObject: () => Z6, getSizableOrigin: () => DW, getParsedType: () => kV, getLengthableOrigin: () => jX, getEnumValues: () => DX, getElementAtPath: () => PV, floatSafeRemainder: () => M9, finalizeIssue: () => o0, extend: () => xV, escapeRegex: () => x1, esc: () => s1, defineLazy: () => Y0, createTransparentProxy: () => vV, clone: () => l0, cleanRegex: () => MX, cleanEnum: () => fV, captureStackTrace: () => P4, cached: () => AX, assignProp: () => j9, assertNotEqual: () => RV, assertNever: () => IV, assertIs: () => EV, assertEqual: () => jV, assert: () => bV, allowsEval: () => R9, aborted: () => e1, NUMBER_FORMAT_RANGES: () => b9, Class: () => AW, BIGINT_FORMAT_RANGES: () => OW });
|
|
11482
11482
|
P4 = Error.captureStackTrace ? Error.captureStackTrace : (...X) => {};
|
|
11483
|
-
|
|
11483
|
+
R9 = AX(() => {
|
|
11484
11484
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
11485
11485
|
return false;
|
|
11486
11486
|
try {
|
|
@@ -11489,16 +11489,16 @@ var init_sdk = __esm(() => {
|
|
|
11489
11489
|
return false;
|
|
11490
11490
|
}
|
|
11491
11491
|
});
|
|
11492
|
-
|
|
11492
|
+
E9 = new Set(["string", "number", "symbol"]);
|
|
11493
11493
|
NW = new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
|
|
11494
|
-
|
|
11494
|
+
b9 = { safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], int32: [-2147483648, 2147483647], uint32: [0, 4294967295], float32: [-340282346638528860000000000000000000000, 340282346638528860000000000000000000000], float64: [-Number.MAX_VALUE, Number.MAX_VALUE] };
|
|
11495
11495
|
OW = { int64: [BigInt("-9223372036854775808"), BigInt("9223372036854775807")], uint64: [BigInt(0), BigInt("18446744073709551615")] };
|
|
11496
11496
|
Z4 = O("$ZodError", wW);
|
|
11497
11497
|
RX = O("$ZodError", wW, { Parent: Error });
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
X6 =
|
|
11501
|
-
Q6 =
|
|
11498
|
+
k9 = C9(RX);
|
|
11499
|
+
T9 = v9(RX);
|
|
11500
|
+
X6 = _9(RX);
|
|
11501
|
+
Q6 = x9(RX);
|
|
11502
11502
|
MW = /^[cC][^\s-]{8,}$/;
|
|
11503
11503
|
jW = /^[0-9a-z]+$/;
|
|
11504
11504
|
RW = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
@@ -11513,7 +11513,7 @@ var init_sdk = __esm(() => {
|
|
|
11513
11513
|
TW = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
11514
11514
|
_W = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
11515
11515
|
xW = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
11516
|
-
|
|
11516
|
+
g9 = /^[A-Za-z0-9_-]*$/;
|
|
11517
11517
|
yW = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
|
|
11518
11518
|
gW = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
11519
11519
|
fW = new RegExp(`^${hW}$`);
|
|
@@ -11528,7 +11528,7 @@ var init_sdk = __esm(() => {
|
|
|
11528
11528
|
X._zod ?? (X._zod = {}), X._zod.def = Q, ($ = X._zod).onattach ?? ($.onattach = []);
|
|
11529
11529
|
});
|
|
11530
11530
|
tW = { number: "number", bigint: "bigint", object: "date" };
|
|
11531
|
-
|
|
11531
|
+
h9 = O("$ZodCheckLessThan", (X, Q) => {
|
|
11532
11532
|
w0.init(X, Q);
|
|
11533
11533
|
let $ = tW[typeof Q.value];
|
|
11534
11534
|
X._zod.onattach.push((Y) => {
|
|
@@ -11544,7 +11544,7 @@ var init_sdk = __esm(() => {
|
|
|
11544
11544
|
Y.issues.push({ origin: $, code: "too_big", maximum: Q.value, input: Y.value, inclusive: Q.inclusive, inst: X, continue: !Q.abort });
|
|
11545
11545
|
};
|
|
11546
11546
|
});
|
|
11547
|
-
|
|
11547
|
+
f9 = O("$ZodCheckGreaterThan", (X, Q) => {
|
|
11548
11548
|
w0.init(X, Q);
|
|
11549
11549
|
let $ = tW[typeof Q.value];
|
|
11550
11550
|
X._zod.onattach.push((Y) => {
|
|
@@ -11567,14 +11567,14 @@ var init_sdk = __esm(() => {
|
|
|
11567
11567
|
}), X._zod.check = ($) => {
|
|
11568
11568
|
if (typeof $.value !== typeof Q.value)
|
|
11569
11569
|
throw Error("Cannot mix number and bigint in multiple_of check.");
|
|
11570
|
-
if (typeof $.value === "bigint" ? $.value % Q.value === BigInt(0) :
|
|
11570
|
+
if (typeof $.value === "bigint" ? $.value % Q.value === BigInt(0) : M9($.value, Q.value) === 0)
|
|
11571
11571
|
return;
|
|
11572
11572
|
$.issues.push({ origin: typeof $.value, code: "not_multiple_of", divisor: Q.value, input: $.value, inst: X, continue: !Q.abort });
|
|
11573
11573
|
};
|
|
11574
11574
|
});
|
|
11575
11575
|
sW = O("$ZodCheckNumberFormat", (X, Q) => {
|
|
11576
11576
|
w0.init(X, Q), Q.format = Q.format || "float64";
|
|
11577
|
-
let $ = Q.format?.includes("int"), Y = $ ? "int" : "number", [W, J] =
|
|
11577
|
+
let $ = Q.format?.includes("int"), Y = $ ? "int" : "number", [W, J] = b9[Q.format];
|
|
11578
11578
|
X._zod.onattach.push((G) => {
|
|
11579
11579
|
let H = G._zod.bag;
|
|
11580
11580
|
if (H.format = Q.format, H.minimum = W, H.maximum = J, $)
|
|
@@ -11795,23 +11795,23 @@ var init_sdk = __esm(() => {
|
|
|
11795
11795
|
W0 = O("$ZodStringFormat", (X, Q) => {
|
|
11796
11796
|
EX.init(X, Q), IX.init(X, Q);
|
|
11797
11797
|
});
|
|
11798
|
-
|
|
11798
|
+
m9 = O("$ZodGUID", (X, Q) => {
|
|
11799
11799
|
Q.pattern ?? (Q.pattern = SW), W0.init(X, Q);
|
|
11800
11800
|
});
|
|
11801
|
-
|
|
11801
|
+
c9 = O("$ZodUUID", (X, Q) => {
|
|
11802
11802
|
if (Q.version) {
|
|
11803
11803
|
let Y = { v1: 1, v2: 2, v3: 3, v4: 4, v5: 5, v6: 6, v7: 7, v8: 8 }[Q.version];
|
|
11804
11804
|
if (Y === undefined)
|
|
11805
11805
|
throw Error(`Invalid UUID version: "${Q.version}"`);
|
|
11806
|
-
Q.pattern ?? (Q.pattern =
|
|
11806
|
+
Q.pattern ?? (Q.pattern = y9(Y));
|
|
11807
11807
|
} else
|
|
11808
|
-
Q.pattern ?? (Q.pattern =
|
|
11808
|
+
Q.pattern ?? (Q.pattern = y9());
|
|
11809
11809
|
W0.init(X, Q);
|
|
11810
11810
|
});
|
|
11811
|
-
|
|
11811
|
+
p9 = O("$ZodEmail", (X, Q) => {
|
|
11812
11812
|
Q.pattern ?? (Q.pattern = ZW), W0.init(X, Q);
|
|
11813
11813
|
});
|
|
11814
|
-
|
|
11814
|
+
d9 = O("$ZodURL", (X, Q) => {
|
|
11815
11815
|
W0.init(X, Q), X._zod.check = ($) => {
|
|
11816
11816
|
try {
|
|
11817
11817
|
let Y = $.value, W = new URL(Y), J = W.href;
|
|
@@ -11833,25 +11833,25 @@ var init_sdk = __esm(() => {
|
|
|
11833
11833
|
}
|
|
11834
11834
|
};
|
|
11835
11835
|
});
|
|
11836
|
-
|
|
11836
|
+
i9 = O("$ZodEmoji", (X, Q) => {
|
|
11837
11837
|
Q.pattern ?? (Q.pattern = CW()), W0.init(X, Q);
|
|
11838
11838
|
});
|
|
11839
|
-
|
|
11839
|
+
n9 = O("$ZodNanoID", (X, Q) => {
|
|
11840
11840
|
Q.pattern ?? (Q.pattern = bW), W0.init(X, Q);
|
|
11841
11841
|
});
|
|
11842
|
-
|
|
11842
|
+
r9 = O("$ZodCUID", (X, Q) => {
|
|
11843
11843
|
Q.pattern ?? (Q.pattern = MW), W0.init(X, Q);
|
|
11844
11844
|
});
|
|
11845
|
-
|
|
11845
|
+
o9 = O("$ZodCUID2", (X, Q) => {
|
|
11846
11846
|
Q.pattern ?? (Q.pattern = jW), W0.init(X, Q);
|
|
11847
11847
|
});
|
|
11848
|
-
|
|
11848
|
+
t9 = O("$ZodULID", (X, Q) => {
|
|
11849
11849
|
Q.pattern ?? (Q.pattern = RW), W0.init(X, Q);
|
|
11850
11850
|
});
|
|
11851
|
-
|
|
11851
|
+
a9 = O("$ZodXID", (X, Q) => {
|
|
11852
11852
|
Q.pattern ?? (Q.pattern = EW), W0.init(X, Q);
|
|
11853
11853
|
});
|
|
11854
|
-
|
|
11854
|
+
s9 = O("$ZodKSUID", (X, Q) => {
|
|
11855
11855
|
Q.pattern ?? (Q.pattern = IW), W0.init(X, Q);
|
|
11856
11856
|
});
|
|
11857
11857
|
wJ = O("$ZodISODateTime", (X, Q) => {
|
|
@@ -11866,7 +11866,7 @@ var init_sdk = __esm(() => {
|
|
|
11866
11866
|
RJ = O("$ZodISODuration", (X, Q) => {
|
|
11867
11867
|
Q.pattern ?? (Q.pattern = PW), W0.init(X, Q);
|
|
11868
11868
|
});
|
|
11869
|
-
|
|
11869
|
+
e9 = O("$ZodIPv4", (X, Q) => {
|
|
11870
11870
|
Q.pattern ?? (Q.pattern = kW), W0.init(X, Q), X._zod.onattach.push(($) => {
|
|
11871
11871
|
let Y = $._zod.bag;
|
|
11872
11872
|
Y.format = "ipv4";
|
|
@@ -11914,7 +11914,7 @@ var init_sdk = __esm(() => {
|
|
|
11914
11914
|
};
|
|
11915
11915
|
});
|
|
11916
11916
|
WQ = O("$ZodBase64URL", (X, Q) => {
|
|
11917
|
-
Q.pattern ?? (Q.pattern =
|
|
11917
|
+
Q.pattern ?? (Q.pattern = g9), W0.init(X, Q), X._zod.onattach.push(($) => {
|
|
11918
11918
|
$._zod.bag.contentEncoding = "base64url";
|
|
11919
11919
|
}), X._zod.check = ($) => {
|
|
11920
11920
|
if (lV($.value))
|
|
@@ -12002,7 +12002,7 @@ var init_sdk = __esm(() => {
|
|
|
12002
12002
|
for (let U of V)
|
|
12003
12003
|
if (!(Q.shape[U] instanceof X0))
|
|
12004
12004
|
throw Error(`Invalid element at key "${U}": expected a Zod schema`);
|
|
12005
|
-
let L =
|
|
12005
|
+
let L = I9(Q.shape);
|
|
12006
12006
|
return { shape: Q.shape, keys: V, keySet: new Set(V), numKeys: V.length, optionalKeys: new Set(L) };
|
|
12007
12007
|
});
|
|
12008
12008
|
Y0(X._zod, "propValues", () => {
|
|
@@ -12018,7 +12018,7 @@ var init_sdk = __esm(() => {
|
|
|
12018
12018
|
return L;
|
|
12019
12019
|
});
|
|
12020
12020
|
let Y = (V) => {
|
|
12021
|
-
let L = new
|
|
12021
|
+
let L = new u9(["shape", "payload", "ctx"]), U = $.value, F = (M) => {
|
|
12022
12022
|
let R = s1(M);
|
|
12023
12023
|
return `shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`;
|
|
12024
12024
|
};
|
|
@@ -12063,7 +12063,7 @@ var init_sdk = __esm(() => {
|
|
|
12063
12063
|
L.write("payload.value = newResult;"), L.write("return payload;");
|
|
12064
12064
|
let A = L.compile();
|
|
12065
12065
|
return (M, R) => A(V, M, R);
|
|
12066
|
-
}, W, J = Z6, G = !I4.jitless, B = G &&
|
|
12066
|
+
}, W, J = Z6, G = !I4.jitless, B = G && R9.value, z = Q.catchall, K;
|
|
12067
12067
|
X._zod.parse = (V, L) => {
|
|
12068
12068
|
K ?? (K = $.value);
|
|
12069
12069
|
let U = V.value;
|
|
@@ -12260,7 +12260,7 @@ var init_sdk = __esm(() => {
|
|
|
12260
12260
|
NQ = O("$ZodEnum", (X, Q) => {
|
|
12261
12261
|
X0.init(X, Q);
|
|
12262
12262
|
let $ = DX(Q.entries);
|
|
12263
|
-
X._zod.values = new Set($), X._zod.pattern = new RegExp(`^(${$.filter((Y) =>
|
|
12263
|
+
X._zod.values = new Set($), X._zod.pattern = new RegExp(`^(${$.filter((Y) => E9.has(typeof Y)).map((Y) => typeof Y === "string" ? x1(Y) : Y.toString()).join("|")})$`), X._zod.parse = (Y, W) => {
|
|
12264
12264
|
let J = Y.value;
|
|
12265
12265
|
if (X._zod.values.has(J))
|
|
12266
12266
|
return Y;
|
|
@@ -12388,7 +12388,7 @@ var init_sdk = __esm(() => {
|
|
|
12388
12388
|
PL = O("ZodMiniType", (X, Q) => {
|
|
12389
12389
|
if (!X._zod)
|
|
12390
12390
|
throw Error("Uninitialized schema in ZodMiniType.");
|
|
12391
|
-
X0.init(X, Q), X.def = Q, X.parse = ($, Y) =>
|
|
12391
|
+
X0.init(X, Q), X.def = Q, X.parse = ($, Y) => k9(X, $, Y, { callee: X.parse }), X.safeParse = ($, Y) => X6(X, $, Y), X.parseAsync = async ($, Y) => T9(X, $, Y, { callee: X.parseAsync }), X.safeParseAsync = async ($, Y) => Q6(X, $, Y), X.check = (...$) => {
|
|
12392
12392
|
return X.clone({ ...Q, checks: [...Q.checks ?? [], ...$.map((Y) => typeof Y === "function" ? { _zod: { check: Y, def: { check: "custom" }, onattach: [] } } : Y)] });
|
|
12393
12393
|
}, X.clone = ($, Y) => l0(X, $, Y), X.brand = () => X, X.register = ($, Y) => {
|
|
12394
12394
|
return $.add(X, Y), X;
|
|
@@ -12411,12 +12411,12 @@ var init_sdk = __esm(() => {
|
|
|
12411
12411
|
gJ = O("ZodISODuration", (X, Q) => {
|
|
12412
12412
|
RJ.init(X, Q), H0.init(X, Q);
|
|
12413
12413
|
});
|
|
12414
|
-
|
|
12414
|
+
sS = O("ZodError", hJ);
|
|
12415
12415
|
ZX = O("ZodError", hJ, { Parent: Error });
|
|
12416
|
-
fJ =
|
|
12417
|
-
uJ =
|
|
12418
|
-
lJ =
|
|
12419
|
-
mJ =
|
|
12416
|
+
fJ = C9(ZX);
|
|
12417
|
+
uJ = v9(ZX);
|
|
12418
|
+
lJ = _9(ZX);
|
|
12419
|
+
mJ = x9(ZX);
|
|
12420
12420
|
z0 = O("ZodType", (X, Q) => {
|
|
12421
12421
|
return X0.init(X, Q), X.def = Q, Object.defineProperty(X, "_def", { value: Q }), X.check = (...$) => {
|
|
12422
12422
|
return X.clone({ ...Q, checks: [...Q.checks ?? [], ...$.map((Y) => typeof Y === "function" ? { _zod: { check: Y, def: { check: "custom" }, onattach: [] } } : Y)] });
|
|
@@ -12446,40 +12446,40 @@ var init_sdk = __esm(() => {
|
|
|
12446
12446
|
W0.init(X, Q), iJ.init(X, Q);
|
|
12447
12447
|
});
|
|
12448
12448
|
hL = O("ZodEmail", (X, Q) => {
|
|
12449
|
-
|
|
12449
|
+
p9.init(X, Q), H0.init(X, Q);
|
|
12450
12450
|
});
|
|
12451
12451
|
cJ = O("ZodGUID", (X, Q) => {
|
|
12452
|
-
|
|
12452
|
+
m9.init(X, Q), H0.init(X, Q);
|
|
12453
12453
|
});
|
|
12454
12454
|
d4 = O("ZodUUID", (X, Q) => {
|
|
12455
|
-
|
|
12455
|
+
c9.init(X, Q), H0.init(X, Q);
|
|
12456
12456
|
});
|
|
12457
12457
|
fL = O("ZodURL", (X, Q) => {
|
|
12458
|
-
|
|
12458
|
+
d9.init(X, Q), H0.init(X, Q);
|
|
12459
12459
|
});
|
|
12460
12460
|
uL = O("ZodEmoji", (X, Q) => {
|
|
12461
|
-
|
|
12461
|
+
i9.init(X, Q), H0.init(X, Q);
|
|
12462
12462
|
});
|
|
12463
12463
|
lL = O("ZodNanoID", (X, Q) => {
|
|
12464
|
-
|
|
12464
|
+
n9.init(X, Q), H0.init(X, Q);
|
|
12465
12465
|
});
|
|
12466
12466
|
mL = O("ZodCUID", (X, Q) => {
|
|
12467
|
-
|
|
12467
|
+
r9.init(X, Q), H0.init(X, Q);
|
|
12468
12468
|
});
|
|
12469
12469
|
cL = O("ZodCUID2", (X, Q) => {
|
|
12470
|
-
|
|
12470
|
+
o9.init(X, Q), H0.init(X, Q);
|
|
12471
12471
|
});
|
|
12472
12472
|
pL = O("ZodULID", (X, Q) => {
|
|
12473
|
-
|
|
12473
|
+
t9.init(X, Q), H0.init(X, Q);
|
|
12474
12474
|
});
|
|
12475
12475
|
dL = O("ZodXID", (X, Q) => {
|
|
12476
|
-
|
|
12476
|
+
a9.init(X, Q), H0.init(X, Q);
|
|
12477
12477
|
});
|
|
12478
12478
|
iL = O("ZodKSUID", (X, Q) => {
|
|
12479
|
-
|
|
12479
|
+
s9.init(X, Q), H0.init(X, Q);
|
|
12480
12480
|
});
|
|
12481
12481
|
nL = O("ZodIPv4", (X, Q) => {
|
|
12482
|
-
|
|
12482
|
+
e9.init(X, Q), H0.init(X, Q);
|
|
12483
12483
|
});
|
|
12484
12484
|
rL = O("ZodIPv6", (X, Q) => {
|
|
12485
12485
|
XQ.init(X, Q), H0.init(X, Q);
|
|
@@ -12638,7 +12638,7 @@ var init_sdk = __esm(() => {
|
|
|
12638
12638
|
X[X.ConnectionClosed = -32000] = "ConnectionClosed", X[X.RequestTimeout = -32001] = "RequestTimeout", X[X.ParseError = -32700] = "ParseError", X[X.InvalidRequest = -32600] = "InvalidRequest", X[X.MethodNotFound = -32601] = "MethodNotFound", X[X.InvalidParams = -32602] = "InvalidParams", X[X.InternalError = -32603] = "InternalError", X[X.UrlElicitationRequired = -32042] = "UrlElicitationRequired";
|
|
12639
12639
|
})(x || (x = {}));
|
|
12640
12640
|
B5 = I({ jsonrpc: T(r4), id: o4, error: I({ code: Q0().int(), message: D(), data: v(N0()) }) }).strict();
|
|
12641
|
-
|
|
12641
|
+
VZ = J0([W5, J5, H5, B5]);
|
|
12642
12642
|
t4 = b0.strict();
|
|
12643
12643
|
Zq = W6.extend({ requestId: o4, reason: D().optional() });
|
|
12644
12644
|
a4 = p0.extend({ method: T("notifications/cancelled"), params: Zq });
|
|
@@ -12673,11 +12673,11 @@ var init_sdk = __esm(() => {
|
|
|
12673
12673
|
x6 = b0.extend({ task: _X });
|
|
12674
12674
|
mq = W6.merge(_X);
|
|
12675
12675
|
xX = p0.extend({ method: T("notifications/tasks/status"), params: mq });
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
$
|
|
12679
|
-
|
|
12680
|
-
|
|
12676
|
+
X8 = R0.extend({ method: T("tasks/get"), params: _0.extend({ taskId: D() }) });
|
|
12677
|
+
Q8 = b0.merge(_X);
|
|
12678
|
+
$8 = R0.extend({ method: T("tasks/result"), params: _0.extend({ taskId: D() }) });
|
|
12679
|
+
Y8 = vX.extend({ method: T("tasks/list") });
|
|
12680
|
+
W8 = TX.extend({ tasks: r(_X) });
|
|
12681
12681
|
U5 = R0.extend({ method: T("tasks/cancel"), params: _0.extend({ taskId: D() }) });
|
|
12682
12682
|
V5 = b0.merge(_X);
|
|
12683
12683
|
L5 = I({ uri: D(), mimeType: v(D()), _meta: O0(D(), N0()).optional() });
|
|
@@ -12693,13 +12693,13 @@ var init_sdk = __esm(() => {
|
|
|
12693
12693
|
y6 = I({ audience: r(j0(["user", "assistant"])).optional(), priority: Q0().min(0).max(1).optional(), lastModified: SX.datetime({ offset: true }).optional() });
|
|
12694
12694
|
N5 = I({ ..._6.shape, ...kX.shape, uri: D(), description: v(D()), mimeType: v(D()), annotations: y6.optional(), _meta: v(c0({})) });
|
|
12695
12695
|
cq = I({ ..._6.shape, ...kX.shape, uriTemplate: D(), description: v(D()), mimeType: v(D()), annotations: y6.optional(), _meta: v(c0({})) });
|
|
12696
|
-
|
|
12696
|
+
J8 = vX.extend({ method: T("resources/list") });
|
|
12697
12697
|
pq = TX.extend({ resources: r(N5) });
|
|
12698
|
-
|
|
12698
|
+
G8 = vX.extend({ method: T("resources/templates/list") });
|
|
12699
12699
|
dq = TX.extend({ resourceTemplates: r(cq) });
|
|
12700
12700
|
T$ = _0.extend({ uri: D() });
|
|
12701
12701
|
iq = T$;
|
|
12702
|
-
|
|
12702
|
+
H8 = R0.extend({ method: T("resources/read"), params: iq });
|
|
12703
12703
|
nq = b0.extend({ contents: r(J0([q5, F5])) });
|
|
12704
12704
|
rq = p0.extend({ method: T("notifications/resources/list_changed") });
|
|
12705
12705
|
oq = T$;
|
|
@@ -12710,10 +12710,10 @@ var init_sdk = __esm(() => {
|
|
|
12710
12710
|
XF = p0.extend({ method: T("notifications/resources/updated"), params: eq });
|
|
12711
12711
|
QF = I({ name: D(), description: v(D()), required: v(M0()) });
|
|
12712
12712
|
$F = I({ ..._6.shape, ...kX.shape, description: v(D()), arguments: v(r(QF)), _meta: v(c0({})) });
|
|
12713
|
-
|
|
12713
|
+
B8 = vX.extend({ method: T("prompts/list") });
|
|
12714
12714
|
YF = TX.extend({ prompts: r($F) });
|
|
12715
12715
|
WF = _0.extend({ name: D(), arguments: O0(D(), D()).optional() });
|
|
12716
|
-
|
|
12716
|
+
z8 = R0.extend({ method: T("prompts/get"), params: WF });
|
|
12717
12717
|
_$ = I({ type: T("text"), text: D(), annotations: y6.optional(), _meta: O0(D(), N0()).optional() });
|
|
12718
12718
|
x$ = I({ type: T("image"), data: v$, mimeType: D(), annotations: y6.optional(), _meta: O0(D(), N0()).optional() });
|
|
12719
12719
|
y$ = I({ type: T("audio"), data: v$, mimeType: D(), annotations: y6.optional(), _meta: O0(D(), N0()).optional() });
|
|
@@ -12727,10 +12727,10 @@ var init_sdk = __esm(() => {
|
|
|
12727
12727
|
UF = I({ title: D().optional(), readOnlyHint: M0().optional(), destructiveHint: M0().optional(), idempotentHint: M0().optional(), openWorldHint: M0().optional() });
|
|
12728
12728
|
VF = I({ taskSupport: j0(["required", "optional", "forbidden"]).optional() });
|
|
12729
12729
|
O5 = I({ ..._6.shape, ...kX.shape, description: D().optional(), inputSchema: I({ type: T("object"), properties: O0(D(), z1).optional(), required: r(D()).optional() }).catchall(N0()), outputSchema: I({ type: T("object"), properties: O0(D(), z1).optional(), required: r(D()).optional() }).catchall(N0()).optional(), annotations: v(UF), execution: v(VF), _meta: O0(D(), N0()).optional() });
|
|
12730
|
-
|
|
12730
|
+
K8 = vX.extend({ method: T("tools/list") });
|
|
12731
12731
|
LF = TX.extend({ tools: r(O5) });
|
|
12732
|
-
|
|
12733
|
-
|
|
12732
|
+
U8 = b0.extend({ content: r(g$).default([]), structuredContent: O0(D(), N0()).optional(), isError: v(M0()) });
|
|
12733
|
+
LZ = U8.or(b0.extend({ toolResult: N0() }));
|
|
12734
12734
|
qF = _0.extend({ name: D(), arguments: v(O0(D(), N0())) });
|
|
12735
12735
|
g6 = R0.extend({ method: T("tools/call"), params: qF });
|
|
12736
12736
|
FF = p0.extend({ method: T("notifications/tools/list_changed") });
|
|
@@ -12768,22 +12768,22 @@ var init_sdk = __esm(() => {
|
|
|
12768
12768
|
mF = R0.extend({ method: T("elicitation/create"), params: lF });
|
|
12769
12769
|
cF = W6.extend({ elicitationId: D() });
|
|
12770
12770
|
pF = p0.extend({ method: T("notifications/elicitation/complete"), params: cF });
|
|
12771
|
-
|
|
12771
|
+
V8 = b0.extend({ action: j0(["accept", "decline", "cancel"]), content: b$((X) => X === null ? undefined : X, O0(D(), J0([D(), Q0(), M0(), r(D())])).optional()) });
|
|
12772
12772
|
dF = I({ type: T("ref/resource"), uri: D() });
|
|
12773
12773
|
iF = I({ type: T("ref/prompt"), name: D() });
|
|
12774
12774
|
nF = _0.extend({ ref: J0([iF, dF]), argument: I({ name: D(), value: D() }), context: I({ arguments: O0(D(), D()).optional() }).optional() });
|
|
12775
|
-
|
|
12775
|
+
L8 = R0.extend({ method: T("completion/complete"), params: nF });
|
|
12776
12776
|
rF = b0.extend({ completion: c0({ values: r(D()).max(100), total: v(Q0().int()), hasMore: v(M0()) }) });
|
|
12777
12777
|
oF = I({ uri: D().startsWith("file://"), name: D().optional(), _meta: O0(D(), N0()).optional() });
|
|
12778
12778
|
tF = R0.extend({ method: T("roots/list") });
|
|
12779
12779
|
l$ = b0.extend({ roots: r(oF) });
|
|
12780
12780
|
aF = p0.extend({ method: T("notifications/roots/list_changed") });
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
|
|
12781
|
+
qZ = J0([s4, C$, L8, h$, z8, B8, J8, G8, H8, tq, sq, g6, K8, X8, $8, Y8]);
|
|
12782
|
+
FZ = J0([a4, e4, k$, aF, xX]);
|
|
12783
|
+
NZ = J0([t4, f$, u$, V8, l$, Q8, W8, x6]);
|
|
12784
|
+
OZ = J0([s4, bF, mF, tF, X8, $8, Y8]);
|
|
12785
|
+
DZ = J0([a4, e4, DF, XF, rq, FF, KF, xX, pF]);
|
|
12786
|
+
AZ = J0([t4, hq, rF, zF, YF, pq, dq, nq, U8, LF, Q8, W8, x6]);
|
|
12787
12787
|
k = class k extends Error {
|
|
12788
12788
|
constructor(X, Q, $) {
|
|
12789
12789
|
super(`MCP error ${X}: ${Q}`);
|
|
@@ -12878,7 +12878,7 @@ var init_sdk = __esm(() => {
|
|
|
12878
12878
|
}
|
|
12879
12879
|
return N.data;
|
|
12880
12880
|
}
|
|
12881
|
-
let q = g1(
|
|
12881
|
+
let q = g1(U8, F);
|
|
12882
12882
|
if (!q.success) {
|
|
12883
12883
|
let N = q.error instanceof Error ? q.error.message : String(q.error);
|
|
12884
12884
|
throw new k(x.InvalidParams, `Invalid tools/call result: ${N}`);
|
|
@@ -13035,12 +13035,12 @@ var init_sdk = __esm(() => {
|
|
|
13035
13035
|
if (!((W = (Y = this._clientCapabilities) === null || Y === undefined ? undefined : Y.elicitation) === null || W === undefined ? undefined : W.url))
|
|
13036
13036
|
throw Error("Client does not support url elicitation.");
|
|
13037
13037
|
let B = X;
|
|
13038
|
-
return this.request({ method: "elicitation/create", params: B },
|
|
13038
|
+
return this.request({ method: "elicitation/create", params: B }, V8, Q);
|
|
13039
13039
|
}
|
|
13040
13040
|
case "form": {
|
|
13041
13041
|
if (!((G = (J = this._clientCapabilities) === null || J === undefined ? undefined : J.elicitation) === null || G === undefined ? undefined : G.form))
|
|
13042
13042
|
throw Error("Client does not support form elicitation.");
|
|
13043
|
-
let B = X.mode === "form" ? X : { ...X, mode: "form" }, z = await this.request({ method: "elicitation/create", params: B },
|
|
13043
|
+
let B = X.mode === "form" ? X : { ...X, mode: "form" }, z = await this.request({ method: "elicitation/create", params: B }, V8, Q);
|
|
13044
13044
|
if (z.action === "accept" && z.content && B.requestedSchema)
|
|
13045
13045
|
try {
|
|
13046
13046
|
let V = this._jsonSchemaValidator.getValidator(B.requestedSchema)(z.content);
|
|
@@ -13117,6 +13117,7 @@ class AuthenticationError extends RaySurferError {
|
|
|
13117
13117
|
}
|
|
13118
13118
|
|
|
13119
13119
|
// src/client.ts
|
|
13120
|
+
var VERSION = "0.3.9";
|
|
13120
13121
|
var DEFAULT_BASE_URL = "https://web-production-3d338.up.railway.app";
|
|
13121
13122
|
|
|
13122
13123
|
class RaySurfer {
|
|
@@ -13131,7 +13132,7 @@ class RaySurfer {
|
|
|
13131
13132
|
constructor(options = {}) {
|
|
13132
13133
|
this.apiKey = options.apiKey;
|
|
13133
13134
|
this.baseUrl = (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\/$/, "");
|
|
13134
|
-
this.timeout = options.timeout ??
|
|
13135
|
+
this.timeout = options.timeout ?? 60000;
|
|
13135
13136
|
this.organizationId = options.organizationId;
|
|
13136
13137
|
this.workspaceId = options.workspaceId;
|
|
13137
13138
|
this.publicSnips = options.publicSnips ?? false;
|
|
@@ -13143,7 +13144,7 @@ class RaySurfer {
|
|
|
13143
13144
|
"Content-Type": "application/json"
|
|
13144
13145
|
};
|
|
13145
13146
|
if (this.apiKey) {
|
|
13146
|
-
headers
|
|
13147
|
+
headers.Authorization = `Bearer ${this.apiKey}`;
|
|
13147
13148
|
}
|
|
13148
13149
|
if (this.organizationId) {
|
|
13149
13150
|
headers["X-Raysurfer-Org-Id"] = this.organizationId;
|
|
@@ -13160,6 +13161,7 @@ class RaySurfer {
|
|
|
13160
13161
|
if (this.namespace) {
|
|
13161
13162
|
headers["X-Raysurfer-Namespace"] = this.namespace;
|
|
13162
13163
|
}
|
|
13164
|
+
headers["X-Raysurfer-SDK-Version"] = `typescript/${VERSION}`;
|
|
13163
13165
|
const controller = new AbortController;
|
|
13164
13166
|
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
13165
13167
|
try {
|
|
@@ -13238,11 +13240,17 @@ class RaySurfer {
|
|
|
13238
13240
|
succeeded
|
|
13239
13241
|
};
|
|
13240
13242
|
if (cachedCodeBlocks && cachedCodeBlocks.length > 0) {
|
|
13243
|
+
console.log(`[raysurfer] Including ${cachedCodeBlocks.length} cached code blocks for voting:`);
|
|
13244
|
+
cachedCodeBlocks.forEach((cb, i) => {
|
|
13245
|
+
console.log(`[raysurfer] ${i + 1}. ${cb.codeBlockId} (${cb.filename})`);
|
|
13246
|
+
});
|
|
13241
13247
|
data.cached_code_blocks = cachedCodeBlocks.map((cb) => ({
|
|
13242
13248
|
code_block_id: cb.codeBlockId,
|
|
13243
13249
|
filename: cb.filename,
|
|
13244
13250
|
description: cb.description
|
|
13245
13251
|
}));
|
|
13252
|
+
} else {
|
|
13253
|
+
console.log(`[raysurfer] No cached code blocks to vote on`);
|
|
13246
13254
|
}
|
|
13247
13255
|
const result = await this.request("POST", "/api/store/execution-result", data);
|
|
13248
13256
|
return {
|
|
@@ -13403,6 +13411,83 @@ class RaySurfer {
|
|
|
13403
13411
|
return lines.join(`
|
|
13404
13412
|
`);
|
|
13405
13413
|
}
|
|
13414
|
+
async autoReview(params) {
|
|
13415
|
+
const response = await this.request("POST", "/api/store/auto-review", {
|
|
13416
|
+
execution_id: params.executionId,
|
|
13417
|
+
triggering_task: params.triggeringTask,
|
|
13418
|
+
execution_state: params.executionState,
|
|
13419
|
+
input_data: params.inputData,
|
|
13420
|
+
output_data: params.outputData,
|
|
13421
|
+
code_block_name: params.codeBlockName,
|
|
13422
|
+
code_block_description: params.codeBlockDescription,
|
|
13423
|
+
error_message: params.errorMessage
|
|
13424
|
+
});
|
|
13425
|
+
return {
|
|
13426
|
+
success: response.success,
|
|
13427
|
+
executionId: response.execution_id,
|
|
13428
|
+
review: {
|
|
13429
|
+
timestamp: response.review.timestamp,
|
|
13430
|
+
verdict: response.review.verdict,
|
|
13431
|
+
reasoning: response.review.reasoning,
|
|
13432
|
+
whatWorked: response.review.what_worked,
|
|
13433
|
+
whatDidntWork: response.review.what_didnt_work,
|
|
13434
|
+
outputWasUseful: response.review.output_was_useful,
|
|
13435
|
+
outputWasCorrect: response.review.output_was_correct,
|
|
13436
|
+
outputWasComplete: response.review.output_was_complete,
|
|
13437
|
+
errorWasAppropriate: response.review.error_was_appropriate,
|
|
13438
|
+
wouldUseAgain: response.review.would_use_again,
|
|
13439
|
+
suggestedImprovements: response.review.suggested_improvements,
|
|
13440
|
+
requiredWorkaround: response.review.required_workaround,
|
|
13441
|
+
workaroundDescription: response.review.workaround_description
|
|
13442
|
+
},
|
|
13443
|
+
message: response.message
|
|
13444
|
+
};
|
|
13445
|
+
}
|
|
13446
|
+
async getExecutions(params = {}) {
|
|
13447
|
+
const response = await this.request("POST", "/api/retrieve/executions", {
|
|
13448
|
+
code_block_id: params.codeBlockId,
|
|
13449
|
+
task: params.task,
|
|
13450
|
+
verdict: params.verdict,
|
|
13451
|
+
limit: params.limit ?? 20
|
|
13452
|
+
});
|
|
13453
|
+
return {
|
|
13454
|
+
executions: response.executions.map((exec) => ({
|
|
13455
|
+
id: exec.id,
|
|
13456
|
+
codeBlockId: exec.code_block_id,
|
|
13457
|
+
timestamp: exec.timestamp,
|
|
13458
|
+
executionState: exec.execution_state,
|
|
13459
|
+
durationMs: exec.duration_ms,
|
|
13460
|
+
errorMessage: exec.error_message,
|
|
13461
|
+
errorType: exec.error_type,
|
|
13462
|
+
io: {
|
|
13463
|
+
inputData: exec.io.input_data,
|
|
13464
|
+
inputHash: exec.io.input_hash,
|
|
13465
|
+
outputData: exec.io.output_data,
|
|
13466
|
+
outputHash: exec.io.output_hash,
|
|
13467
|
+
outputType: exec.io.output_type
|
|
13468
|
+
},
|
|
13469
|
+
triggeringTask: exec.triggering_task,
|
|
13470
|
+
retrievalScore: exec.retrieval_score,
|
|
13471
|
+
verdict: exec.verdict,
|
|
13472
|
+
review: exec.review ? {
|
|
13473
|
+
timestamp: exec.review.timestamp,
|
|
13474
|
+
verdict: exec.review.verdict,
|
|
13475
|
+
reasoning: exec.review.reasoning,
|
|
13476
|
+
whatWorked: exec.review.what_worked,
|
|
13477
|
+
whatDidntWork: exec.review.what_didnt_work,
|
|
13478
|
+
outputWasUseful: exec.review.output_was_useful,
|
|
13479
|
+
outputWasCorrect: exec.review.output_was_correct,
|
|
13480
|
+
outputWasComplete: exec.review.output_was_complete,
|
|
13481
|
+
errorWasAppropriate: exec.review.error_was_appropriate,
|
|
13482
|
+
wouldUseAgain: exec.review.would_use_again,
|
|
13483
|
+
suggestedImprovements: exec.review.suggested_improvements,
|
|
13484
|
+
requiredWorkaround: exec.review.required_workaround,
|
|
13485
|
+
workaroundDescription: exec.review.workaround_description
|
|
13486
|
+
} : null
|
|
13487
|
+
})),
|
|
13488
|
+
totalFound: response.total_found
|
|
13489
|
+
};
|
|
13490
|
+
}
|
|
13406
13491
|
async recordCacheUsage(params) {
|
|
13407
13492
|
const data = {
|
|
13408
13493
|
task: params.task,
|
|
@@ -13448,13 +13533,54 @@ class RaySurfer {
|
|
|
13448
13533
|
}
|
|
13449
13534
|
}
|
|
13450
13535
|
var client_default = RaySurfer;
|
|
13451
|
-
|
|
13452
13536
|
// src/sdk-client.ts
|
|
13453
|
-
import {
|
|
13454
|
-
|
|
13537
|
+
import {
|
|
13538
|
+
existsSync as existsSync2,
|
|
13539
|
+
mkdirSync as mkdirSync2,
|
|
13540
|
+
readFileSync as readFileSync2,
|
|
13541
|
+
rmSync as rmSync2,
|
|
13542
|
+
writeFileSync
|
|
13543
|
+
} from "node:fs";
|
|
13544
|
+
import { join } from "node:path";
|
|
13455
13545
|
var DEFAULT_RAYSURFER_URL = "https://web-production-3d338.up.railway.app";
|
|
13456
13546
|
var CACHE_DIR = ".raysurfer_code";
|
|
13457
13547
|
var FILE_MODIFY_TOOLS = ["Write", "Edit", "MultiEdit", "NotebookEdit"];
|
|
13548
|
+
var TRACKABLE_EXTENSIONS = new Set([
|
|
13549
|
+
".py",
|
|
13550
|
+
".js",
|
|
13551
|
+
".ts",
|
|
13552
|
+
".rb",
|
|
13553
|
+
".go",
|
|
13554
|
+
".rs",
|
|
13555
|
+
".java",
|
|
13556
|
+
".cpp",
|
|
13557
|
+
".c",
|
|
13558
|
+
".h",
|
|
13559
|
+
".pdf",
|
|
13560
|
+
".docx",
|
|
13561
|
+
".xlsx",
|
|
13562
|
+
".csv",
|
|
13563
|
+
".json",
|
|
13564
|
+
".yaml",
|
|
13565
|
+
".yml",
|
|
13566
|
+
".xml",
|
|
13567
|
+
".html",
|
|
13568
|
+
".css",
|
|
13569
|
+
".md",
|
|
13570
|
+
".txt",
|
|
13571
|
+
".sh",
|
|
13572
|
+
".sql"
|
|
13573
|
+
]);
|
|
13574
|
+
var BASH_OUTPUT_PATTERNS = [
|
|
13575
|
+
/>>\s*([^\s;&|]+)/g,
|
|
13576
|
+
/>\s*([^\s;&|]+)/g,
|
|
13577
|
+
/-o\s+([^\s;&|]+)/g,
|
|
13578
|
+
/--output[=\s]+([^\s;&|]+)/g,
|
|
13579
|
+
/savefig\(['"]([^'"]+)['"]\)/g,
|
|
13580
|
+
/to_csv\(['"]([^'"]+)['"]\)/g,
|
|
13581
|
+
/to_excel\(['"]([^'"]+)['"]\)/g,
|
|
13582
|
+
/write\(['"]([^'"]+)['"]\)/g
|
|
13583
|
+
];
|
|
13458
13584
|
var createDebugLogger = (enabled) => ({
|
|
13459
13585
|
log: (...args) => enabled && console.log("[raysurfer]", ...args),
|
|
13460
13586
|
time: (label) => enabled && console.time(`[raysurfer] ${label}`),
|
|
@@ -13469,7 +13595,10 @@ async function* query(params) {
|
|
|
13469
13595
|
const debug = createDebugLogger(debugEnabled);
|
|
13470
13596
|
debug.group("Raysurfer Query Started");
|
|
13471
13597
|
debug.log("Prompt:", prompt);
|
|
13472
|
-
debug.log("Options:", {
|
|
13598
|
+
debug.log("Options:", {
|
|
13599
|
+
...options,
|
|
13600
|
+
systemPrompt: options.systemPrompt || undefined
|
|
13601
|
+
});
|
|
13473
13602
|
const apiKey = process.env.RAYSURFER_API_KEY;
|
|
13474
13603
|
const baseUrl = process.env.RAYSURFER_BASE_URL || DEFAULT_RAYSURFER_URL;
|
|
13475
13604
|
const cacheEnabled = !!apiKey;
|
|
@@ -13478,7 +13607,25 @@ async function* query(params) {
|
|
|
13478
13607
|
let raysurfer = null;
|
|
13479
13608
|
let cachedFiles = [];
|
|
13480
13609
|
const modifiedFilePaths = new Set;
|
|
13610
|
+
const bashGeneratedFiles = new Set;
|
|
13481
13611
|
let taskSucceeded = false;
|
|
13612
|
+
const extractBashOutputFiles = (command) => {
|
|
13613
|
+
for (const pattern of BASH_OUTPUT_PATTERNS) {
|
|
13614
|
+
pattern.lastIndex = 0;
|
|
13615
|
+
let match = pattern.exec(command);
|
|
13616
|
+
while (match !== null) {
|
|
13617
|
+
const filePath = match[1];
|
|
13618
|
+
if (filePath && filePath.length > 0) {
|
|
13619
|
+
const ext = filePath.substring(filePath.lastIndexOf(".")).toLowerCase();
|
|
13620
|
+
if (TRACKABLE_EXTENSIONS.has(ext)) {
|
|
13621
|
+
bashGeneratedFiles.add(filePath);
|
|
13622
|
+
debug.log(` → Bash output file detected: ${filePath}`);
|
|
13623
|
+
}
|
|
13624
|
+
}
|
|
13625
|
+
match = pattern.exec(command);
|
|
13626
|
+
}
|
|
13627
|
+
}
|
|
13628
|
+
};
|
|
13482
13629
|
const workDir = options.workingDirectory || process.cwd();
|
|
13483
13630
|
let addToLlmPrompt = "";
|
|
13484
13631
|
if (cacheEnabled) {
|
|
@@ -13574,12 +13721,19 @@ async function* query(params) {
|
|
|
13574
13721
|
for (const block of contentBlocks) {
|
|
13575
13722
|
if (block.type === "tool_use" && FILE_MODIFY_TOOLS.includes(block.name)) {
|
|
13576
13723
|
const input = block.input;
|
|
13577
|
-
const filePath = input?.file_path;
|
|
13724
|
+
const filePath = input?.file_path ?? input?.notebook_path;
|
|
13578
13725
|
if (filePath) {
|
|
13579
13726
|
debug.log(` → ${block.name} tool detected:`, filePath);
|
|
13580
13727
|
modifiedFilePaths.add(filePath);
|
|
13581
13728
|
}
|
|
13582
13729
|
}
|
|
13730
|
+
if (block.type === "tool_use" && block.name === "Bash") {
|
|
13731
|
+
const input = block.input;
|
|
13732
|
+
const command = input?.command;
|
|
13733
|
+
if (command) {
|
|
13734
|
+
extractBashOutputFiles(command);
|
|
13735
|
+
}
|
|
13736
|
+
}
|
|
13583
13737
|
if (block.type === "text") {
|
|
13584
13738
|
const text = block.text;
|
|
13585
13739
|
const codeMatches = text.match(/```(?:typescript|javascript|ts|js)?\n?([\s\S]*?)\n?```/g);
|
|
@@ -13636,6 +13790,21 @@ async function* query(params) {
|
|
|
13636
13790
|
debug.log(" → Failed to read file:", filePath, err);
|
|
13637
13791
|
}
|
|
13638
13792
|
}
|
|
13793
|
+
for (const filePath of bashGeneratedFiles) {
|
|
13794
|
+
if (modifiedFilePaths.has(filePath))
|
|
13795
|
+
continue;
|
|
13796
|
+
try {
|
|
13797
|
+
if (existsSync2(filePath)) {
|
|
13798
|
+
const content = readFileSync2(filePath, "utf-8");
|
|
13799
|
+
if (!content.includes("\x00")) {
|
|
13800
|
+
filesToCache.push({ path: filePath, content });
|
|
13801
|
+
debug.log(" → Will cache Bash-generated file:", filePath, `(${content.length} chars)`);
|
|
13802
|
+
}
|
|
13803
|
+
}
|
|
13804
|
+
} catch {
|
|
13805
|
+
debug.log(" → Failed to read Bash-generated file:", filePath);
|
|
13806
|
+
}
|
|
13807
|
+
}
|
|
13639
13808
|
if (generatedCodeBlocks.length > 0) {
|
|
13640
13809
|
const largestBlock = generatedCodeBlocks.reduce((a, b3) => a.length > b3.length ? a : b3);
|
|
13641
13810
|
filesToCache.push({
|
|
@@ -13697,9 +13866,6 @@ var AgentVerdict;
|
|
|
13697
13866
|
AgentVerdict2["THUMBS_DOWN"] = "thumbs_down";
|
|
13698
13867
|
AgentVerdict2["PENDING"] = "pending";
|
|
13699
13868
|
})(AgentVerdict ||= {});
|
|
13700
|
-
|
|
13701
|
-
// src/index.ts
|
|
13702
|
-
var VERSION = "0.3.5";
|
|
13703
13869
|
export {
|
|
13704
13870
|
sdk_client_default as queryDefault,
|
|
13705
13871
|
query,
|