@mickey-kras/hindsight-memory-router-coding-agents 0.8.2 → 0.8.9
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/DEVIATIONS.md +149 -31
- package/README.md +40 -14
- package/UPSTREAM.json +10 -10
- package/dist/antigravity-hook.js +13 -8
- package/dist/antigravity-statusline.js +1 -1
- package/dist/antigravity-stop-hook.js +13 -8
- package/dist/claude-hook.js +13 -8
- package/dist/claude-sessionstart-hook.js +13 -8
- package/dist/claude-stop-hook.js +13 -8
- package/dist/cline.js +51 -2
- package/dist/codebuddy-hook.js +13 -8
- package/dist/codebuddy-sessionstart-hook.js +13 -8
- package/dist/codebuddy-stop-hook.js +13 -8
- package/dist/codex-hook.js +13 -8
- package/dist/codex-sessionstart-hook.js +13 -8
- package/dist/codex-stop-hook.js +13 -8
- package/dist/copilot-hook.js +13 -8
- package/dist/copilot-sessionstart-hook.js +13 -8
- package/dist/copilot-stop-hook.js +13 -8
- package/dist/cursor-hook.js +13 -8
- package/dist/cursor-sessionstart-hook.js +13 -8
- package/dist/cursor-stop-hook.js +13 -8
- package/dist/dcode-hook.js +13 -8
- package/dist/dcode-sessionstart-hook.js +13 -8
- package/dist/dcode-stop-hook.js +13 -8
- package/dist/deepen.js +7 -3
- package/dist/devin-hook.js +13 -8
- package/dist/devin-sessionstart-hook.js +13 -8
- package/dist/devin-stop-hook.js +13 -8
- package/dist/droid-hook.js +13 -8
- package/dist/droid-sessionstart-hook.js +13 -8
- package/dist/droid-stop-hook.js +13 -8
- package/dist/dsh.js +51 -2
- package/dist/grok-hook.js +13 -8
- package/dist/grok-sessionstart-hook.js +13 -8
- package/dist/grok-stop-hook.js +13 -8
- package/dist/hindsight-seed.js +1 -1
- package/dist/index.js +2294 -14661
- package/dist/installer.js +13 -8
- package/dist/kilo.js +2294 -14661
- package/dist/kimi-hook.js +13 -8
- package/dist/kimi-sessionstart-hook.js +13 -8
- package/dist/kimi-stop-hook.js +13 -8
- package/dist/mcp-server.js +125 -20
- package/dist/opencode2.js +2296 -14663
- package/dist/pi.js +51 -2
- package/dist/prime-agent.js +51 -2
- package/dist/qwen-hook.js +13 -8
- package/dist/qwen-sessionstart-hook.js +13 -8
- package/dist/qwen-stop-hook.js +13 -8
- package/dist/status.js +1 -1
- package/dist/traecode-hook.js +13 -8
- package/dist/traecode-sessionstart-hook.js +13 -8
- package/dist/traecode-stop-hook.js +13 -8
- package/dist/workbuddy-hook.js +13 -8
- package/dist/workbuddy-sessionstart-hook.js +13 -8
- package/dist/workbuddy-stop-hook.js +13 -8
- package/dist/zcode-hook.js +13 -8
- package/dist/zcode-sessionstart-hook.js +13 -8
- package/dist/zcode-stop-hook.js +13 -8
- package/npm-shrinkwrap.json +745 -353
- package/package.json +14 -10
- package/plugin.json +1 -1
- package/skill/SKILL.md +113 -106
package/dist/kimi-hook.js
CHANGED
|
@@ -1277,7 +1277,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
|
|
|
1277
1277
|
];
|
|
1278
1278
|
|
|
1279
1279
|
// package.json
|
|
1280
|
-
var version = "0.8.
|
|
1280
|
+
var version = "0.8.9";
|
|
1281
1281
|
|
|
1282
1282
|
// src/core/util.ts
|
|
1283
1283
|
import { accessSync, constants } from "fs";
|
|
@@ -3175,20 +3175,25 @@ function* readJsonl(path) {
|
|
|
3175
3175
|
try {
|
|
3176
3176
|
const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
|
|
3177
3177
|
const decoder = new StringDecoder("utf8");
|
|
3178
|
-
let
|
|
3178
|
+
let fragments = [];
|
|
3179
3179
|
let position = 0;
|
|
3180
3180
|
for (; ; ) {
|
|
3181
3181
|
const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
|
|
3182
3182
|
if (bytesRead <= 0) break;
|
|
3183
3183
|
position += bytesRead;
|
|
3184
|
-
|
|
3184
|
+
const chunk = decoder.write(buffer.subarray(0, bytesRead));
|
|
3185
|
+
let start = 0;
|
|
3185
3186
|
let newline;
|
|
3186
|
-
while ((newline =
|
|
3187
|
-
|
|
3188
|
-
|
|
3187
|
+
while ((newline = chunk.indexOf("\n", start)) !== -1) {
|
|
3188
|
+
fragments.push(chunk.slice(start, newline));
|
|
3189
|
+
yield fragments.join("");
|
|
3190
|
+
fragments = [];
|
|
3191
|
+
start = newline + 1;
|
|
3189
3192
|
}
|
|
3193
|
+
if (start < chunk.length) fragments.push(chunk.slice(start));
|
|
3190
3194
|
}
|
|
3191
|
-
|
|
3195
|
+
fragments.push(decoder.end());
|
|
3196
|
+
const pending = fragments.join("");
|
|
3192
3197
|
if (pending) yield pending;
|
|
3193
3198
|
} finally {
|
|
3194
3199
|
closeSync2(fd);
|
|
@@ -4577,7 +4582,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
4577
4582
|
var version2 = {
|
|
4578
4583
|
major: 4,
|
|
4579
4584
|
minor: 6,
|
|
4580
|
-
patch:
|
|
4585
|
+
patch: 7
|
|
4581
4586
|
};
|
|
4582
4587
|
|
|
4583
4588
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -1348,7 +1348,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
|
|
|
1348
1348
|
];
|
|
1349
1349
|
|
|
1350
1350
|
// package.json
|
|
1351
|
-
var version = "0.8.
|
|
1351
|
+
var version = "0.8.9";
|
|
1352
1352
|
|
|
1353
1353
|
// src/core/util.ts
|
|
1354
1354
|
import { accessSync, constants } from "fs";
|
|
@@ -2924,20 +2924,25 @@ function* readJsonl(path) {
|
|
|
2924
2924
|
try {
|
|
2925
2925
|
const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
|
|
2926
2926
|
const decoder = new StringDecoder("utf8");
|
|
2927
|
-
let
|
|
2927
|
+
let fragments = [];
|
|
2928
2928
|
let position = 0;
|
|
2929
2929
|
for (; ; ) {
|
|
2930
2930
|
const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
|
|
2931
2931
|
if (bytesRead <= 0) break;
|
|
2932
2932
|
position += bytesRead;
|
|
2933
|
-
|
|
2933
|
+
const chunk = decoder.write(buffer.subarray(0, bytesRead));
|
|
2934
|
+
let start = 0;
|
|
2934
2935
|
let newline;
|
|
2935
|
-
while ((newline =
|
|
2936
|
-
|
|
2937
|
-
|
|
2936
|
+
while ((newline = chunk.indexOf("\n", start)) !== -1) {
|
|
2937
|
+
fragments.push(chunk.slice(start, newline));
|
|
2938
|
+
yield fragments.join("");
|
|
2939
|
+
fragments = [];
|
|
2940
|
+
start = newline + 1;
|
|
2938
2941
|
}
|
|
2942
|
+
if (start < chunk.length) fragments.push(chunk.slice(start));
|
|
2939
2943
|
}
|
|
2940
|
-
|
|
2944
|
+
fragments.push(decoder.end());
|
|
2945
|
+
const pending = fragments.join("");
|
|
2941
2946
|
if (pending) yield pending;
|
|
2942
2947
|
} finally {
|
|
2943
2948
|
closeSync2(fd);
|
|
@@ -5260,7 +5265,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
5260
5265
|
var version2 = {
|
|
5261
5266
|
major: 4,
|
|
5262
5267
|
minor: 6,
|
|
5263
|
-
patch:
|
|
5268
|
+
patch: 7
|
|
5264
5269
|
};
|
|
5265
5270
|
|
|
5266
5271
|
// node_modules/zod/v4/core/schemas.js
|
package/dist/kimi-stop-hook.js
CHANGED
|
@@ -1214,7 +1214,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
|
|
|
1214
1214
|
];
|
|
1215
1215
|
|
|
1216
1216
|
// package.json
|
|
1217
|
-
var version = "0.8.
|
|
1217
|
+
var version = "0.8.9";
|
|
1218
1218
|
|
|
1219
1219
|
// src/core/util.ts
|
|
1220
1220
|
import { accessSync, constants } from "fs";
|
|
@@ -3142,20 +3142,25 @@ function* readJsonl(path) {
|
|
|
3142
3142
|
try {
|
|
3143
3143
|
const buffer = Buffer.allocUnsafe(CHUNK_BYTES);
|
|
3144
3144
|
const decoder = new StringDecoder("utf8");
|
|
3145
|
-
let
|
|
3145
|
+
let fragments = [];
|
|
3146
3146
|
let position = 0;
|
|
3147
3147
|
for (; ; ) {
|
|
3148
3148
|
const bytesRead = readSync2(fd, buffer, 0, buffer.length, position);
|
|
3149
3149
|
if (bytesRead <= 0) break;
|
|
3150
3150
|
position += bytesRead;
|
|
3151
|
-
|
|
3151
|
+
const chunk = decoder.write(buffer.subarray(0, bytesRead));
|
|
3152
|
+
let start = 0;
|
|
3152
3153
|
let newline;
|
|
3153
|
-
while ((newline =
|
|
3154
|
-
|
|
3155
|
-
|
|
3154
|
+
while ((newline = chunk.indexOf("\n", start)) !== -1) {
|
|
3155
|
+
fragments.push(chunk.slice(start, newline));
|
|
3156
|
+
yield fragments.join("");
|
|
3157
|
+
fragments = [];
|
|
3158
|
+
start = newline + 1;
|
|
3156
3159
|
}
|
|
3160
|
+
if (start < chunk.length) fragments.push(chunk.slice(start));
|
|
3157
3161
|
}
|
|
3158
|
-
|
|
3162
|
+
fragments.push(decoder.end());
|
|
3163
|
+
const pending = fragments.join("");
|
|
3159
3164
|
if (pending) yield pending;
|
|
3160
3165
|
} finally {
|
|
3161
3166
|
closeSync2(fd);
|
|
@@ -4770,7 +4775,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
4770
4775
|
var version2 = {
|
|
4771
4776
|
major: 4,
|
|
4772
4777
|
minor: 6,
|
|
4773
|
-
patch:
|
|
4778
|
+
patch: 7
|
|
4774
4779
|
};
|
|
4775
4780
|
|
|
4776
4781
|
// node_modules/zod/v4/core/schemas.js
|
package/dist/mcp-server.js
CHANGED
|
@@ -3337,6 +3337,37 @@ var require_utils = __commonJS({
|
|
|
3337
3337
|
}
|
|
3338
3338
|
return output2.join("");
|
|
3339
3339
|
}
|
|
3340
|
+
function removeDotSegmentsRelative(path) {
|
|
3341
|
+
if (path === "" || path[0] === "/") {
|
|
3342
|
+
return removeDotSegments(path);
|
|
3343
|
+
}
|
|
3344
|
+
const segments = path.split("/");
|
|
3345
|
+
const last = segments.length - 1;
|
|
3346
|
+
const output2 = [];
|
|
3347
|
+
let trailingDirectory = false;
|
|
3348
|
+
for (let i = 0; i <= last; i++) {
|
|
3349
|
+
const segment = segments[i];
|
|
3350
|
+
if (segment === "." || segment === "..") {
|
|
3351
|
+
if (segment === "..") {
|
|
3352
|
+
if (output2.length !== 0 && output2[output2.length - 1] !== "..") {
|
|
3353
|
+
output2.pop();
|
|
3354
|
+
} else {
|
|
3355
|
+
output2.push("..");
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
trailingDirectory = i === last;
|
|
3359
|
+
} else {
|
|
3360
|
+
output2.push(segment);
|
|
3361
|
+
}
|
|
3362
|
+
}
|
|
3363
|
+
if (trailingDirectory && output2[output2.length - 1] !== "..") {
|
|
3364
|
+
output2.push("");
|
|
3365
|
+
}
|
|
3366
|
+
if (output2.length === 0 || output2[0] === "" || output2[0].includes(":")) {
|
|
3367
|
+
output2.unshift(".");
|
|
3368
|
+
}
|
|
3369
|
+
return output2.join("/");
|
|
3370
|
+
}
|
|
3340
3371
|
var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
|
|
3341
3372
|
var HOST_DELIM_RE = /[@/?#:]/g;
|
|
3342
3373
|
var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
|
|
@@ -3597,6 +3628,7 @@ var require_utils = __commonJS({
|
|
|
3597
3628
|
encodeFragment,
|
|
3598
3629
|
escapePreservingEscapes,
|
|
3599
3630
|
removeDotSegments,
|
|
3631
|
+
removeDotSegmentsRelative,
|
|
3600
3632
|
isIPv4,
|
|
3601
3633
|
isUUID,
|
|
3602
3634
|
normalizeIPv6,
|
|
@@ -3820,16 +3852,18 @@ var require_schemes = __commonJS({
|
|
|
3820
3852
|
var require_fast_uri = __commonJS({
|
|
3821
3853
|
"node_modules/fast-uri/index.js"(exports, module) {
|
|
3822
3854
|
"use strict";
|
|
3823
|
-
var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3855
|
+
var { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
|
|
3824
3856
|
var { SCHEMES, getSchemeHandler } = require_schemes();
|
|
3825
3857
|
var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
|
|
3826
3858
|
var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3859
|
+
var MALFORMED_HOST_ERROR = "URI host is malformed.";
|
|
3860
|
+
var FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
|
|
3861
|
+
function validateScheme(scheme) {
|
|
3862
|
+
const stringScheme = String(scheme);
|
|
3863
|
+
if (!VALID_SCHEME.test(stringScheme)) {
|
|
3830
3864
|
throw new TypeError(MALFORMED_SCHEME_ERROR);
|
|
3831
3865
|
}
|
|
3832
|
-
return
|
|
3866
|
+
return stringScheme;
|
|
3833
3867
|
}
|
|
3834
3868
|
function normalize2(uri, options) {
|
|
3835
3869
|
if (typeof uri === "string") {
|
|
@@ -3866,6 +3900,9 @@ var require_fast_uri = __commonJS({
|
|
|
3866
3900
|
const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved2.scheme);
|
|
3867
3901
|
const resolvedHost = resolved2.host;
|
|
3868
3902
|
const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
|
|
3903
|
+
if (hasForbiddenDomainHost(resolved2, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
|
|
3904
|
+
throw new Error(MALFORMED_HOST_ERROR);
|
|
3905
|
+
}
|
|
3869
3906
|
canonicalizeHost(resolved2, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
|
|
3870
3907
|
const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
|
|
3871
3908
|
if (resolved2.error && !encodedASCIIHost) {
|
|
@@ -3907,14 +3944,15 @@ var require_fast_uri = __commonJS({
|
|
|
3907
3944
|
if (relative.path[0] === "/") {
|
|
3908
3945
|
target.path = removeDotSegments(relative.path);
|
|
3909
3946
|
} else {
|
|
3910
|
-
|
|
3947
|
+
const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
|
|
3948
|
+
if (baseHasAuthority && !base.path) {
|
|
3911
3949
|
target.path = "/" + relative.path;
|
|
3912
3950
|
} else if (!base.path) {
|
|
3913
3951
|
target.path = relative.path;
|
|
3914
3952
|
} else {
|
|
3915
3953
|
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
3916
3954
|
}
|
|
3917
|
-
target.path = removeDotSegments(target.path);
|
|
3955
|
+
target.path = base.scheme === void 0 && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
|
|
3918
3956
|
}
|
|
3919
3957
|
target.query = relative.query;
|
|
3920
3958
|
}
|
|
@@ -3952,12 +3990,13 @@ var require_fast_uri = __commonJS({
|
|
|
3952
3990
|
const options = Object.assign({}, opts);
|
|
3953
3991
|
const uriTokens = [];
|
|
3954
3992
|
if (component.scheme) {
|
|
3955
|
-
component.scheme =
|
|
3993
|
+
component.scheme = validateScheme(component.scheme);
|
|
3956
3994
|
}
|
|
3957
3995
|
const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
|
|
3958
3996
|
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
|
|
3959
3997
|
const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
|
|
3960
|
-
const
|
|
3998
|
+
const schemelessReference = (component.scheme === void 0 || options.reference === "suffix") && !hasAuthority;
|
|
3999
|
+
const pathNoScheme = !options.skipEscape && schemelessReference;
|
|
3961
4000
|
if (component.path !== void 0) {
|
|
3962
4001
|
if (!options.skipEscape) {
|
|
3963
4002
|
component.path = serializePathEncoding(component.path, pathNoScheme);
|
|
@@ -3966,7 +4005,7 @@ var require_fast_uri = __commonJS({
|
|
|
3966
4005
|
}
|
|
3967
4006
|
}
|
|
3968
4007
|
if (options.reference !== "suffix" && component.scheme) {
|
|
3969
|
-
component.scheme =
|
|
4008
|
+
component.scheme = validateScheme(component.scheme);
|
|
3970
4009
|
uriTokens.push(component.scheme, ":");
|
|
3971
4010
|
}
|
|
3972
4011
|
const authority = recomposeAuthority(component);
|
|
@@ -3982,9 +4021,9 @@ var require_fast_uri = __commonJS({
|
|
|
3982
4021
|
if (component.path !== void 0) {
|
|
3983
4022
|
let s = component.path;
|
|
3984
4023
|
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
3985
|
-
s = removeDotSegments(s);
|
|
4024
|
+
s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
|
|
3986
4025
|
}
|
|
3987
|
-
if (
|
|
4026
|
+
if (schemelessReference) {
|
|
3988
4027
|
s = serializePathEncoding(s, true);
|
|
3989
4028
|
}
|
|
3990
4029
|
if (authority === void 0 && s[0] === "/" && s[1] === "/") {
|
|
@@ -4031,16 +4070,34 @@ var require_fast_uri = __commonJS({
|
|
|
4031
4070
|
return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
|
|
4032
4071
|
}
|
|
4033
4072
|
function canonicalizeHost(parsed, options, schemeHandler, isIP) {
|
|
4073
|
+
if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
|
|
4074
|
+
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
4075
|
+
return true;
|
|
4076
|
+
}
|
|
4034
4077
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
4078
|
+
let url2;
|
|
4035
4079
|
try {
|
|
4036
|
-
|
|
4080
|
+
url2 = new URL("http://" + parsed.host);
|
|
4037
4081
|
} catch (e) {
|
|
4038
4082
|
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
4039
4083
|
return true;
|
|
4040
4084
|
}
|
|
4085
|
+
if (!isHostOnlyURL(url2)) {
|
|
4086
|
+
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
4087
|
+
return true;
|
|
4088
|
+
}
|
|
4089
|
+
parsed.host = url2.hostname;
|
|
4041
4090
|
}
|
|
4042
4091
|
return false;
|
|
4043
4092
|
}
|
|
4093
|
+
function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
|
|
4094
|
+
return Boolean(
|
|
4095
|
+
parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host)
|
|
4096
|
+
);
|
|
4097
|
+
}
|
|
4098
|
+
function isHostOnlyURL(url2) {
|
|
4099
|
+
return url2.username === "" && url2.password === "" && url2.port === "" && url2.pathname === "/" && url2.search === "" && url2.hash === "" && url2.hostname !== "";
|
|
4100
|
+
}
|
|
4044
4101
|
function parseWithStatus(uri, opts) {
|
|
4045
4102
|
const options = Object.assign({}, opts);
|
|
4046
4103
|
const parsed = {
|
|
@@ -4095,9 +4152,8 @@ var require_fast_uri = __commonJS({
|
|
|
4095
4152
|
parsed.query = matches[7];
|
|
4096
4153
|
parsed.fragment = matches[8];
|
|
4097
4154
|
if (parsed.scheme !== void 0) {
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
parsed.scheme = decodedScheme.toLowerCase();
|
|
4155
|
+
if (VALID_SCHEME.test(parsed.scheme)) {
|
|
4156
|
+
parsed.scheme = parsed.scheme.toLowerCase();
|
|
4101
4157
|
} else {
|
|
4102
4158
|
parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
|
|
4103
4159
|
malformedScheme = true;
|
|
@@ -4125,7 +4181,7 @@ var require_fast_uri = __commonJS({
|
|
|
4125
4181
|
malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
|
|
4126
4182
|
parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
|
|
4127
4183
|
if (malformedIPLiteral) {
|
|
4128
|
-
parsed.error = parsed.error ||
|
|
4184
|
+
parsed.error = parsed.error || MALFORMED_HOST_ERROR;
|
|
4129
4185
|
malformedAuthorityOrPort = true;
|
|
4130
4186
|
}
|
|
4131
4187
|
} else {
|
|
@@ -4153,7 +4209,7 @@ var require_fast_uri = __commonJS({
|
|
|
4153
4209
|
if (!isIP) {
|
|
4154
4210
|
host = normalizePercentEncoding(host.toLowerCase());
|
|
4155
4211
|
}
|
|
4156
|
-
parsed.host = reescapeHostDelimiters(host, isIP);
|
|
4212
|
+
parsed.host = isIP || options.scheme !== "null" ? reescapeHostDelimiters(host, isIP) : host;
|
|
4157
4213
|
}
|
|
4158
4214
|
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
4159
4215
|
if (parsed.path) {
|
|
@@ -11600,6 +11656,7 @@ __export(util_exports, {
|
|
|
11600
11656
|
required: () => required,
|
|
11601
11657
|
safeExtend: () => safeExtend,
|
|
11602
11658
|
shallowClone: () => shallowClone,
|
|
11659
|
+
sizeCaps: () => sizeCaps,
|
|
11603
11660
|
slugify: () => slugify,
|
|
11604
11661
|
stringifyPrimitive: () => stringifyPrimitive,
|
|
11605
11662
|
toZod: () => toZod,
|
|
@@ -12119,6 +12176,18 @@ function prefixIssues(path, issues) {
|
|
|
12119
12176
|
function unwrapMessage(message) {
|
|
12120
12177
|
return typeof message === "string" ? message : message?.message;
|
|
12121
12178
|
}
|
|
12179
|
+
function sizeCaps(defChecks) {
|
|
12180
|
+
const caps = [];
|
|
12181
|
+
for (const ch of defChecks ?? []) {
|
|
12182
|
+
const d = ch._zod.def;
|
|
12183
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
12184
|
+
break;
|
|
12185
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
12186
|
+
if (max >= 0)
|
|
12187
|
+
caps.push([max, ch]);
|
|
12188
|
+
}
|
|
12189
|
+
return caps;
|
|
12190
|
+
}
|
|
12122
12191
|
function attachSchema(issues, start, inst) {
|
|
12123
12192
|
var _a3;
|
|
12124
12193
|
for (let i = start; i < issues.length; i++) {
|
|
@@ -13539,7 +13608,7 @@ ${content.join("\n")}
|
|
|
13539
13608
|
var version = {
|
|
13540
13609
|
major: 4,
|
|
13541
13610
|
minor: 6,
|
|
13542
|
-
patch:
|
|
13611
|
+
patch: 7
|
|
13543
13612
|
};
|
|
13544
13613
|
|
|
13545
13614
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -14295,6 +14364,31 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
14295
14364
|
return payload;
|
|
14296
14365
|
};
|
|
14297
14366
|
});
|
|
14367
|
+
function capSize(inst, size) {
|
|
14368
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
14369
|
+
if (!caps.length)
|
|
14370
|
+
return;
|
|
14371
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
14372
|
+
const parse3 = inst._zod.parse;
|
|
14373
|
+
inst._zod.parse = (payload, ctx) => {
|
|
14374
|
+
const n = size(payload.value);
|
|
14375
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
14376
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
14377
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
14378
|
+
const start = payload.issues.length;
|
|
14379
|
+
ch._zod.check(payload);
|
|
14380
|
+
payload.issues[start].continue = false;
|
|
14381
|
+
attachSchema(payload.issues, start, inst);
|
|
14382
|
+
return payload;
|
|
14383
|
+
}
|
|
14384
|
+
}
|
|
14385
|
+
}
|
|
14386
|
+
return parse3(payload, ctx);
|
|
14387
|
+
};
|
|
14388
|
+
}
|
|
14389
|
+
var arraySize = (input2) => Array.isArray(input2) ? input2.length : -1;
|
|
14390
|
+
var mapSize = (input2) => input2 instanceof Map ? input2.size : -1;
|
|
14391
|
+
var setSize = (input2) => input2 instanceof Set ? input2.size : -1;
|
|
14298
14392
|
function handleArrayResult(result, final, index) {
|
|
14299
14393
|
if (result.issues.length) {
|
|
14300
14394
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -14338,6 +14432,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
14338
14432
|
}
|
|
14339
14433
|
return payload;
|
|
14340
14434
|
};
|
|
14435
|
+
capSize(inst, arraySize);
|
|
14341
14436
|
});
|
|
14342
14437
|
function handlePropertyResult(result, final, key, input2, optin, optout) {
|
|
14343
14438
|
const isPresent = key in input2;
|
|
@@ -15294,6 +15389,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
15294
15389
|
return Promise.all(proms).then(() => payload);
|
|
15295
15390
|
return payload;
|
|
15296
15391
|
};
|
|
15392
|
+
capSize(inst, mapSize);
|
|
15297
15393
|
});
|
|
15298
15394
|
function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
|
|
15299
15395
|
if (keyResult.issues.length) {
|
|
@@ -15360,6 +15456,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
|
15360
15456
|
return Promise.all(proms).then(() => payload);
|
|
15361
15457
|
return payload;
|
|
15362
15458
|
};
|
|
15459
|
+
capSize(inst, setSize);
|
|
15363
15460
|
});
|
|
15364
15461
|
function handleSetResult(result, final) {
|
|
15365
15462
|
if (result.issues.length) {
|
|
@@ -24890,9 +24987,15 @@ function generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
|
24890
24987
|
doc.write(`}`);
|
|
24891
24988
|
return outputVar;
|
|
24892
24989
|
}
|
|
24990
|
+
function generateSizeGate(doc, schema, size) {
|
|
24991
|
+
for (const [max, check2] of sizeCaps(schema._zod.def.checks)) {
|
|
24992
|
+
doc.write(`if (${size} > ${numericOperand(max, check2._zod.def.check)}) return INVALID;`);
|
|
24993
|
+
}
|
|
24994
|
+
}
|
|
24893
24995
|
function generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {
|
|
24894
24996
|
const def = schema._zod.def;
|
|
24895
24997
|
doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);
|
|
24998
|
+
generateSizeGate(doc, schema, `${accessor}.length`);
|
|
24896
24999
|
const outputVar = buildsValue ? newVar(ctx) : null;
|
|
24897
25000
|
const iVar = newVar(ctx);
|
|
24898
25001
|
const elemVar = newVar(ctx);
|
|
@@ -25292,6 +25395,7 @@ function literalPropertyKey(ctx, key) {
|
|
|
25292
25395
|
function generateMapCheck(doc, ctx, schema, accessor) {
|
|
25293
25396
|
const def = schema._zod.def;
|
|
25294
25397
|
doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);
|
|
25398
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
25295
25399
|
const outputVar = newVar(ctx);
|
|
25296
25400
|
const kVar = newVar(ctx);
|
|
25297
25401
|
const valVar = newVar(ctx);
|
|
@@ -25308,6 +25412,7 @@ function generateMapCheck(doc, ctx, schema, accessor) {
|
|
|
25308
25412
|
function generateSetCheck(doc, ctx, schema, accessor) {
|
|
25309
25413
|
const def = schema._zod.def;
|
|
25310
25414
|
doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);
|
|
25415
|
+
generateSizeGate(doc, schema, `${accessor}.size`);
|
|
25311
25416
|
const outputVar = newVar(ctx);
|
|
25312
25417
|
const valVar = newVar(ctx);
|
|
25313
25418
|
doc.write(`const ${outputVar} = new Set();`);
|
|
@@ -37826,7 +37931,7 @@ var PLUGIN_GOVERNED_BANK_FIELDS = [
|
|
|
37826
37931
|
];
|
|
37827
37932
|
|
|
37828
37933
|
// package.json
|
|
37829
|
-
var version2 = "0.8.
|
|
37934
|
+
var version2 = "0.8.9";
|
|
37830
37935
|
|
|
37831
37936
|
// src/core/util.ts
|
|
37832
37937
|
import { accessSync, constants } from "fs";
|