@workit-dev/pi 2.21.1 → 2.21.2
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/worker.js +37 -1
- package/dist/workit.js +38 -2
- package/package.json +2 -2
package/dist/worker.js
CHANGED
|
@@ -351,6 +351,18 @@ function prefixIssues(path, issues) {
|
|
|
351
351
|
function unwrapMessage(message) {
|
|
352
352
|
return typeof message === "string" ? message : message?.message;
|
|
353
353
|
}
|
|
354
|
+
function sizeCaps(defChecks) {
|
|
355
|
+
const caps = [];
|
|
356
|
+
for (const ch of defChecks ?? []) {
|
|
357
|
+
const d = ch._zod.def;
|
|
358
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
359
|
+
break;
|
|
360
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
361
|
+
if (max >= 0)
|
|
362
|
+
caps.push([max, ch]);
|
|
363
|
+
}
|
|
364
|
+
return caps;
|
|
365
|
+
}
|
|
354
366
|
function attachSchema(issues, start, inst) {
|
|
355
367
|
var _a;
|
|
356
368
|
for (let i = start;i < issues.length; i++) {
|
|
@@ -1348,7 +1360,7 @@ ${content.join(`
|
|
|
1348
1360
|
var version = {
|
|
1349
1361
|
major: 4,
|
|
1350
1362
|
minor: 6,
|
|
1351
|
-
patch:
|
|
1363
|
+
patch: 7
|
|
1352
1364
|
};
|
|
1353
1365
|
|
|
1354
1366
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -1900,6 +1912,29 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
|
1900
1912
|
return payload;
|
|
1901
1913
|
};
|
|
1902
1914
|
});
|
|
1915
|
+
function capSize(inst, size) {
|
|
1916
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
1917
|
+
if (!caps.length)
|
|
1918
|
+
return;
|
|
1919
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
1920
|
+
const parse = inst._zod.parse;
|
|
1921
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1922
|
+
const n = size(payload.value);
|
|
1923
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
1924
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
1925
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
1926
|
+
const start = payload.issues.length;
|
|
1927
|
+
ch._zod.check(payload);
|
|
1928
|
+
payload.issues[start].continue = false;
|
|
1929
|
+
attachSchema(payload.issues, start, inst);
|
|
1930
|
+
return payload;
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
return parse(payload, ctx);
|
|
1935
|
+
};
|
|
1936
|
+
}
|
|
1937
|
+
var arraySize = (input) => Array.isArray(input) ? input.length : -1;
|
|
1903
1938
|
function handleArrayResult(result, final, index) {
|
|
1904
1939
|
if (result.issues.length) {
|
|
1905
1940
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -1943,6 +1978,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
1943
1978
|
}
|
|
1944
1979
|
return payload;
|
|
1945
1980
|
};
|
|
1981
|
+
capSize(inst, arraySize);
|
|
1946
1982
|
});
|
|
1947
1983
|
function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
1948
1984
|
const isPresent = key in input;
|
package/dist/workit.js
CHANGED
|
@@ -356,6 +356,18 @@ function prefixIssues(path, issues) {
|
|
|
356
356
|
function unwrapMessage(message) {
|
|
357
357
|
return typeof message === "string" ? message : message?.message;
|
|
358
358
|
}
|
|
359
|
+
function sizeCaps(defChecks) {
|
|
360
|
+
const caps = [];
|
|
361
|
+
for (const ch of defChecks ?? []) {
|
|
362
|
+
const d = ch._zod.def;
|
|
363
|
+
if (!/_(length|size)$|_equals$/.test(d.check))
|
|
364
|
+
break;
|
|
365
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
366
|
+
if (max >= 0)
|
|
367
|
+
caps.push([max, ch]);
|
|
368
|
+
}
|
|
369
|
+
return caps;
|
|
370
|
+
}
|
|
359
371
|
function attachSchema(issues, start, inst) {
|
|
360
372
|
var _a;
|
|
361
373
|
for (let i = start;i < issues.length; i++) {
|
|
@@ -1353,7 +1365,7 @@ ${content.join(`
|
|
|
1353
1365
|
var version = {
|
|
1354
1366
|
major: 4,
|
|
1355
1367
|
minor: 6,
|
|
1356
|
-
patch:
|
|
1368
|
+
patch: 7
|
|
1357
1369
|
};
|
|
1358
1370
|
|
|
1359
1371
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -1905,6 +1917,29 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
|
1905
1917
|
return payload;
|
|
1906
1918
|
};
|
|
1907
1919
|
});
|
|
1920
|
+
function capSize(inst, size) {
|
|
1921
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
1922
|
+
if (!caps.length)
|
|
1923
|
+
return;
|
|
1924
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
1925
|
+
const parse = inst._zod.parse;
|
|
1926
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1927
|
+
const n = size(payload.value);
|
|
1928
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
1929
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
|
|
1930
|
+
if (n > max && ch._zod.def.when(payload)) {
|
|
1931
|
+
const start = payload.issues.length;
|
|
1932
|
+
ch._zod.check(payload);
|
|
1933
|
+
payload.issues[start].continue = false;
|
|
1934
|
+
attachSchema(payload.issues, start, inst);
|
|
1935
|
+
return payload;
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
return parse(payload, ctx);
|
|
1940
|
+
};
|
|
1941
|
+
}
|
|
1942
|
+
var arraySize = (input) => Array.isArray(input) ? input.length : -1;
|
|
1908
1943
|
function handleArrayResult(result, final, index) {
|
|
1909
1944
|
if (result.issues.length) {
|
|
1910
1945
|
final.issues.push(...prefixIssues(index, result.issues));
|
|
@@ -1948,6 +1983,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
1948
1983
|
}
|
|
1949
1984
|
return payload;
|
|
1950
1985
|
};
|
|
1986
|
+
capSize(inst, arraySize);
|
|
1951
1987
|
});
|
|
1952
1988
|
function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
1953
1989
|
const isPresent = key in input;
|
|
@@ -11687,7 +11723,7 @@ function normalizeMaxBytes(value, options = {}) {
|
|
|
11687
11723
|
if (selected === undefined || selected === Number.POSITIVE_INFINITY)
|
|
11688
11724
|
return selected;
|
|
11689
11725
|
if (!Number.isSafeInteger(selected) || selected < 0) {
|
|
11690
|
-
throw new RangeError(
|
|
11726
|
+
throw new RangeError("maxBytes must be a non-negative safe integer or Infinity");
|
|
11691
11727
|
}
|
|
11692
11728
|
return selected;
|
|
11693
11729
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/pi",
|
|
3
|
-
"version": "2.21.
|
|
3
|
+
"version": "2.21.2",
|
|
4
4
|
"description": "Workit native extension for Pi — tools, method skills, and session continuity",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentic-coding",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"build": "bun scripts/build.ts"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
35
|
+
"@earendil-works/pi-coding-agent": "1.6.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@earendil-works/pi-coding-agent": "^1.4.0"
|