@codexhost/cli-linux-arm64 0.24.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +3166 -3040
- package/app/console-web.js +1156 -585
- package/app/desktop-controller.mjs +645 -264
- package/app/host-runtime.mjs +10906 -10282
- package/app/plugins/antigravity/plugin.mjs +515 -369
- package/app/plugins/claude-code/plugin.mjs +583 -438
- package/app/plugins/codebuddy/plugin.mjs +551 -429
- package/app/plugins/codex-usage/plugin.mjs +344 -224
- package/app/plugins/copilot/plugin.mjs +408 -286
- package/app/plugins/cursor-cli/plugin.mjs +499 -360
- package/app/plugins/deepseek-harness/plugin.mjs +759 -520
- package/app/plugins/devin/plugin.mjs +385 -265
- package/app/plugins/grok/plugin.mjs +638 -516
- package/app/plugins/hermes/plugin.mjs +456 -334
- package/app/plugins/kimi-code/plugin.mjs +454 -332
- package/app/plugins/kiro-cli/plugin.mjs +445 -325
- package/app/plugins/omp/plugin.mjs +707 -339
- package/app/plugins/opencode/plugin.mjs +873 -741
- package/app/plugins/pi/plugin.mjs +481 -359
- package/app/plugins/qoder/plugin.mjs +682 -560
- package/app/plugins/qoder-cn/plugin.mjs +682 -560
- package/app/plugins/qwen-code/plugin.mjs +475 -355
- package/app/plugins/workbuddy/plugin.mjs +549 -429
- package/app/plugins/zcode/plugin.mjs +352 -232
- package/app/renderer-extension.js +1706 -945
- package/app/web/assets/{index-IvFk9KT-.js → index-DUOvhHbV.js} +82 -82
- package/app/web/codexhost-settings.js +416 -51
- package/app/web/index.html +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +64 -64
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
- package/app/web/plugins/deepseek-ai__dsh-api-workspace-controller/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-shortcuts/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-brand-official/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +74 -74
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +72 -72
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +97 -97
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-files/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -8
- package/app/web-modules/server.mjs +2132 -1312
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
|
@@ -774,8 +774,8 @@ function cached(getter) {
|
|
|
774
774
|
}
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
|
-
function nullish(
|
|
778
|
-
return
|
|
777
|
+
function nullish(input2) {
|
|
778
|
+
return input2 === null || input2 === void 0;
|
|
779
779
|
}
|
|
780
780
|
function cleanRegex(source) {
|
|
781
781
|
const start = source.startsWith("^") ? 1 : 0;
|
|
@@ -862,8 +862,8 @@ function randomString(length = 10) {
|
|
|
862
862
|
function esc(str) {
|
|
863
863
|
return JSON.stringify(str);
|
|
864
864
|
}
|
|
865
|
-
function slugify(
|
|
866
|
-
return
|
|
865
|
+
function slugify(input2) {
|
|
866
|
+
return input2.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
867
867
|
}
|
|
868
868
|
var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
|
|
869
869
|
};
|
|
@@ -1268,19 +1268,19 @@ function finalizeIssue(iss, ctx, config2) {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
return rest;
|
|
1270
1270
|
}
|
|
1271
|
-
function getSizableOrigin(
|
|
1272
|
-
if (
|
|
1271
|
+
function getSizableOrigin(input2) {
|
|
1272
|
+
if (input2 instanceof Set)
|
|
1273
1273
|
return "set";
|
|
1274
|
-
if (
|
|
1274
|
+
if (input2 instanceof Map)
|
|
1275
1275
|
return "map";
|
|
1276
|
-
if (
|
|
1276
|
+
if (input2 instanceof File)
|
|
1277
1277
|
return "file";
|
|
1278
1278
|
return "unknown";
|
|
1279
1279
|
}
|
|
1280
|
-
function getLengthableOrigin(
|
|
1281
|
-
if (Array.isArray(
|
|
1280
|
+
function getLengthableOrigin(input2) {
|
|
1281
|
+
if (Array.isArray(input2))
|
|
1282
1282
|
return "array";
|
|
1283
|
-
if (typeof
|
|
1283
|
+
if (typeof input2 === "string")
|
|
1284
1284
|
return "string";
|
|
1285
1285
|
return "unknown";
|
|
1286
1286
|
}
|
|
@@ -1306,12 +1306,12 @@ function parsedType(data) {
|
|
|
1306
1306
|
return t;
|
|
1307
1307
|
}
|
|
1308
1308
|
function issue(...args) {
|
|
1309
|
-
const [iss,
|
|
1309
|
+
const [iss, input2, inst] = args;
|
|
1310
1310
|
if (typeof iss === "string") {
|
|
1311
1311
|
return {
|
|
1312
1312
|
message: iss,
|
|
1313
1313
|
code: "custom",
|
|
1314
|
-
input,
|
|
1314
|
+
input: input2,
|
|
1315
1315
|
inst
|
|
1316
1316
|
};
|
|
1317
1317
|
}
|
|
@@ -1855,23 +1855,23 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
1855
1855
|
bag.pattern = integer;
|
|
1856
1856
|
});
|
|
1857
1857
|
inst._zod.check = (payload) => {
|
|
1858
|
-
const
|
|
1858
|
+
const input2 = payload.value;
|
|
1859
1859
|
if (isInt) {
|
|
1860
|
-
if (!Number.isInteger(
|
|
1860
|
+
if (!Number.isInteger(input2)) {
|
|
1861
1861
|
payload.issues.push({
|
|
1862
1862
|
expected: origin,
|
|
1863
1863
|
format: def.format,
|
|
1864
1864
|
code: "invalid_type",
|
|
1865
1865
|
continue: false,
|
|
1866
|
-
input,
|
|
1866
|
+
input: input2,
|
|
1867
1867
|
inst
|
|
1868
1868
|
});
|
|
1869
1869
|
return;
|
|
1870
1870
|
}
|
|
1871
|
-
if (!Number.isSafeInteger(
|
|
1872
|
-
if (
|
|
1871
|
+
if (!Number.isSafeInteger(input2)) {
|
|
1872
|
+
if (input2 > 0) {
|
|
1873
1873
|
payload.issues.push({
|
|
1874
|
-
input,
|
|
1874
|
+
input: input2,
|
|
1875
1875
|
code: "too_big",
|
|
1876
1876
|
maximum: Number.MAX_SAFE_INTEGER,
|
|
1877
1877
|
note: "Integers must be within the safe integer range.",
|
|
@@ -1882,7 +1882,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
1882
1882
|
});
|
|
1883
1883
|
} else {
|
|
1884
1884
|
payload.issues.push({
|
|
1885
|
-
input,
|
|
1885
|
+
input: input2,
|
|
1886
1886
|
code: "too_small",
|
|
1887
1887
|
minimum: Number.MIN_SAFE_INTEGER,
|
|
1888
1888
|
note: "Integers must be within the safe integer range.",
|
|
@@ -1895,10 +1895,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
1895
1895
|
return;
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
|
-
if (
|
|
1898
|
+
if (input2 < minimum) {
|
|
1899
1899
|
payload.issues.push({
|
|
1900
1900
|
origin: "number",
|
|
1901
|
-
input,
|
|
1901
|
+
input: input2,
|
|
1902
1902
|
code: "too_small",
|
|
1903
1903
|
minimum,
|
|
1904
1904
|
inclusive: true,
|
|
@@ -1906,10 +1906,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
1906
1906
|
continue: !def.abort
|
|
1907
1907
|
});
|
|
1908
1908
|
}
|
|
1909
|
-
if (
|
|
1909
|
+
if (input2 > maximum) {
|
|
1910
1910
|
payload.issues.push({
|
|
1911
1911
|
origin: "number",
|
|
1912
|
-
input,
|
|
1912
|
+
input: input2,
|
|
1913
1913
|
code: "too_big",
|
|
1914
1914
|
maximum,
|
|
1915
1915
|
inclusive: true,
|
|
@@ -1929,11 +1929,11 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1929
1929
|
bag.maximum = maximum;
|
|
1930
1930
|
});
|
|
1931
1931
|
inst._zod.check = (payload) => {
|
|
1932
|
-
const
|
|
1933
|
-
if (
|
|
1932
|
+
const input2 = payload.value;
|
|
1933
|
+
if (input2 < minimum) {
|
|
1934
1934
|
payload.issues.push({
|
|
1935
1935
|
origin: "bigint",
|
|
1936
|
-
input,
|
|
1936
|
+
input: input2,
|
|
1937
1937
|
code: "too_small",
|
|
1938
1938
|
minimum,
|
|
1939
1939
|
inclusive: true,
|
|
@@ -1941,10 +1941,10 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
1941
1941
|
continue: !def.abort
|
|
1942
1942
|
});
|
|
1943
1943
|
}
|
|
1944
|
-
if (
|
|
1944
|
+
if (input2 > maximum) {
|
|
1945
1945
|
payload.issues.push({
|
|
1946
1946
|
origin: "bigint",
|
|
1947
|
-
input,
|
|
1947
|
+
input: input2,
|
|
1948
1948
|
code: "too_big",
|
|
1949
1949
|
maximum,
|
|
1950
1950
|
inclusive: true,
|
|
@@ -1967,16 +1967,16 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
1967
1967
|
inst2._zod.bag.maximum = def.maximum;
|
|
1968
1968
|
});
|
|
1969
1969
|
inst._zod.check = (payload) => {
|
|
1970
|
-
const
|
|
1971
|
-
const size =
|
|
1970
|
+
const input2 = payload.value;
|
|
1971
|
+
const size = input2.size;
|
|
1972
1972
|
if (size <= def.maximum)
|
|
1973
1973
|
return;
|
|
1974
1974
|
payload.issues.push({
|
|
1975
|
-
origin: getSizableOrigin(
|
|
1975
|
+
origin: getSizableOrigin(input2),
|
|
1976
1976
|
code: "too_big",
|
|
1977
1977
|
maximum: def.maximum,
|
|
1978
1978
|
inclusive: true,
|
|
1979
|
-
input,
|
|
1979
|
+
input: input2,
|
|
1980
1980
|
inst,
|
|
1981
1981
|
continue: !def.abort
|
|
1982
1982
|
});
|
|
@@ -1995,16 +1995,16 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
1995
1995
|
inst2._zod.bag.minimum = def.minimum;
|
|
1996
1996
|
});
|
|
1997
1997
|
inst._zod.check = (payload) => {
|
|
1998
|
-
const
|
|
1999
|
-
const size =
|
|
1998
|
+
const input2 = payload.value;
|
|
1999
|
+
const size = input2.size;
|
|
2000
2000
|
if (size >= def.minimum)
|
|
2001
2001
|
return;
|
|
2002
2002
|
payload.issues.push({
|
|
2003
|
-
origin: getSizableOrigin(
|
|
2003
|
+
origin: getSizableOrigin(input2),
|
|
2004
2004
|
code: "too_small",
|
|
2005
2005
|
minimum: def.minimum,
|
|
2006
2006
|
inclusive: true,
|
|
2007
|
-
input,
|
|
2007
|
+
input: input2,
|
|
2008
2008
|
inst,
|
|
2009
2009
|
continue: !def.abort
|
|
2010
2010
|
});
|
|
@@ -2024,13 +2024,13 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
2024
2024
|
bag.size = def.size;
|
|
2025
2025
|
});
|
|
2026
2026
|
inst._zod.check = (payload) => {
|
|
2027
|
-
const
|
|
2028
|
-
const size =
|
|
2027
|
+
const input2 = payload.value;
|
|
2028
|
+
const size = input2.size;
|
|
2029
2029
|
if (size === def.size)
|
|
2030
2030
|
return;
|
|
2031
2031
|
const tooBig = size > def.size;
|
|
2032
2032
|
payload.issues.push({
|
|
2033
|
-
origin: getSizableOrigin(
|
|
2033
|
+
origin: getSizableOrigin(input2),
|
|
2034
2034
|
...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
|
|
2035
2035
|
inclusive: true,
|
|
2036
2036
|
exact: true,
|
|
@@ -2053,17 +2053,17 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2053
2053
|
inst2._zod.bag.maximum = def.maximum;
|
|
2054
2054
|
});
|
|
2055
2055
|
inst._zod.check = (payload) => {
|
|
2056
|
-
const
|
|
2057
|
-
const length =
|
|
2056
|
+
const input2 = payload.value;
|
|
2057
|
+
const length = input2.length;
|
|
2058
2058
|
if (length <= def.maximum)
|
|
2059
2059
|
return;
|
|
2060
|
-
const origin = getLengthableOrigin(
|
|
2060
|
+
const origin = getLengthableOrigin(input2);
|
|
2061
2061
|
payload.issues.push({
|
|
2062
2062
|
origin,
|
|
2063
2063
|
code: "too_big",
|
|
2064
2064
|
maximum: def.maximum,
|
|
2065
2065
|
inclusive: true,
|
|
2066
|
-
input,
|
|
2066
|
+
input: input2,
|
|
2067
2067
|
inst,
|
|
2068
2068
|
continue: !def.abort
|
|
2069
2069
|
});
|
|
@@ -2082,17 +2082,17 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2082
2082
|
inst2._zod.bag.minimum = def.minimum;
|
|
2083
2083
|
});
|
|
2084
2084
|
inst._zod.check = (payload) => {
|
|
2085
|
-
const
|
|
2086
|
-
const length =
|
|
2085
|
+
const input2 = payload.value;
|
|
2086
|
+
const length = input2.length;
|
|
2087
2087
|
if (length >= def.minimum)
|
|
2088
2088
|
return;
|
|
2089
|
-
const origin = getLengthableOrigin(
|
|
2089
|
+
const origin = getLengthableOrigin(input2);
|
|
2090
2090
|
payload.issues.push({
|
|
2091
2091
|
origin,
|
|
2092
2092
|
code: "too_small",
|
|
2093
2093
|
minimum: def.minimum,
|
|
2094
2094
|
inclusive: true,
|
|
2095
|
-
input,
|
|
2095
|
+
input: input2,
|
|
2096
2096
|
inst,
|
|
2097
2097
|
continue: !def.abort
|
|
2098
2098
|
});
|
|
@@ -2112,11 +2112,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2112
2112
|
bag.length = def.length;
|
|
2113
2113
|
});
|
|
2114
2114
|
inst._zod.check = (payload) => {
|
|
2115
|
-
const
|
|
2116
|
-
const length =
|
|
2115
|
+
const input2 = payload.value;
|
|
2116
|
+
const length = input2.length;
|
|
2117
2117
|
if (length === def.length)
|
|
2118
2118
|
return;
|
|
2119
|
-
const origin = getLengthableOrigin(
|
|
2119
|
+
const origin = getLengthableOrigin(input2);
|
|
2120
2120
|
const tooBig = length > def.length;
|
|
2121
2121
|
payload.issues.push({
|
|
2122
2122
|
origin,
|
|
@@ -2787,15 +2787,15 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
|
|
|
2787
2787
|
payload.value = Number(payload.value);
|
|
2788
2788
|
} catch (_) {
|
|
2789
2789
|
}
|
|
2790
|
-
const
|
|
2791
|
-
if (typeof
|
|
2790
|
+
const input2 = payload.value;
|
|
2791
|
+
if (typeof input2 === "number" && !Number.isNaN(input2) && Number.isFinite(input2)) {
|
|
2792
2792
|
return payload;
|
|
2793
2793
|
}
|
|
2794
|
-
const received = typeof
|
|
2794
|
+
const received = typeof input2 === "number" ? Number.isNaN(input2) ? "NaN" : !Number.isFinite(input2) ? "Infinity" : void 0 : void 0;
|
|
2795
2795
|
payload.issues.push({
|
|
2796
2796
|
expected: "number",
|
|
2797
2797
|
code: "invalid_type",
|
|
2798
|
-
input,
|
|
2798
|
+
input: input2,
|
|
2799
2799
|
inst,
|
|
2800
2800
|
...received ? { received } : {}
|
|
2801
2801
|
});
|
|
@@ -2815,13 +2815,13 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
|
|
|
2815
2815
|
payload.value = Boolean(payload.value);
|
|
2816
2816
|
} catch (_) {
|
|
2817
2817
|
}
|
|
2818
|
-
const
|
|
2819
|
-
if (typeof
|
|
2818
|
+
const input2 = payload.value;
|
|
2819
|
+
if (typeof input2 === "boolean")
|
|
2820
2820
|
return payload;
|
|
2821
2821
|
payload.issues.push({
|
|
2822
2822
|
expected: "boolean",
|
|
2823
2823
|
code: "invalid_type",
|
|
2824
|
-
input,
|
|
2824
|
+
input: input2,
|
|
2825
2825
|
inst
|
|
2826
2826
|
});
|
|
2827
2827
|
return payload;
|
|
@@ -2854,13 +2854,13 @@ var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, d
|
|
|
2854
2854
|
var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
|
|
2855
2855
|
$ZodType.init(inst, def);
|
|
2856
2856
|
inst._zod.parse = (payload, _ctx) => {
|
|
2857
|
-
const
|
|
2858
|
-
if (typeof
|
|
2857
|
+
const input2 = payload.value;
|
|
2858
|
+
if (typeof input2 === "symbol")
|
|
2859
2859
|
return payload;
|
|
2860
2860
|
payload.issues.push({
|
|
2861
2861
|
expected: "symbol",
|
|
2862
2862
|
code: "invalid_type",
|
|
2863
|
-
input,
|
|
2863
|
+
input: input2,
|
|
2864
2864
|
inst
|
|
2865
2865
|
});
|
|
2866
2866
|
return payload;
|
|
@@ -2871,13 +2871,13 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
|
|
|
2871
2871
|
inst._zod.pattern = _undefined;
|
|
2872
2872
|
inst._zod.values = /* @__PURE__ */ new Set([void 0]);
|
|
2873
2873
|
inst._zod.parse = (payload, _ctx) => {
|
|
2874
|
-
const
|
|
2875
|
-
if (typeof
|
|
2874
|
+
const input2 = payload.value;
|
|
2875
|
+
if (typeof input2 === "undefined")
|
|
2876
2876
|
return payload;
|
|
2877
2877
|
payload.issues.push({
|
|
2878
2878
|
expected: "undefined",
|
|
2879
2879
|
code: "invalid_type",
|
|
2880
|
-
input,
|
|
2880
|
+
input: input2,
|
|
2881
2881
|
inst
|
|
2882
2882
|
});
|
|
2883
2883
|
return payload;
|
|
@@ -2888,13 +2888,13 @@ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
|
|
|
2888
2888
|
inst._zod.pattern = _null;
|
|
2889
2889
|
inst._zod.values = /* @__PURE__ */ new Set([null]);
|
|
2890
2890
|
inst._zod.parse = (payload, _ctx) => {
|
|
2891
|
-
const
|
|
2892
|
-
if (
|
|
2891
|
+
const input2 = payload.value;
|
|
2892
|
+
if (input2 === null)
|
|
2893
2893
|
return payload;
|
|
2894
2894
|
payload.issues.push({
|
|
2895
2895
|
expected: "null",
|
|
2896
2896
|
code: "invalid_type",
|
|
2897
|
-
input,
|
|
2897
|
+
input: input2,
|
|
2898
2898
|
inst
|
|
2899
2899
|
});
|
|
2900
2900
|
return payload;
|
|
@@ -2923,13 +2923,13 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
|
|
|
2923
2923
|
var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
|
|
2924
2924
|
$ZodType.init(inst, def);
|
|
2925
2925
|
inst._zod.parse = (payload, _ctx) => {
|
|
2926
|
-
const
|
|
2927
|
-
if (typeof
|
|
2926
|
+
const input2 = payload.value;
|
|
2927
|
+
if (typeof input2 === "undefined")
|
|
2928
2928
|
return payload;
|
|
2929
2929
|
payload.issues.push({
|
|
2930
2930
|
expected: "void",
|
|
2931
2931
|
code: "invalid_type",
|
|
2932
|
-
input,
|
|
2932
|
+
input: input2,
|
|
2933
2933
|
inst
|
|
2934
2934
|
});
|
|
2935
2935
|
return payload;
|
|
@@ -2944,15 +2944,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
|
|
|
2944
2944
|
} catch (_err) {
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
|
-
const
|
|
2948
|
-
const isDate =
|
|
2949
|
-
const isValidDate = isDate && !Number.isNaN(
|
|
2947
|
+
const input2 = payload.value;
|
|
2948
|
+
const isDate = input2 instanceof Date;
|
|
2949
|
+
const isValidDate = isDate && !Number.isNaN(input2.getTime());
|
|
2950
2950
|
if (isValidDate)
|
|
2951
2951
|
return payload;
|
|
2952
2952
|
payload.issues.push({
|
|
2953
2953
|
expected: "date",
|
|
2954
2954
|
code: "invalid_type",
|
|
2955
|
-
input,
|
|
2955
|
+
input: input2,
|
|
2956
2956
|
...isDate ? { received: "Invalid Date" } : {},
|
|
2957
2957
|
inst
|
|
2958
2958
|
});
|
|
@@ -2968,20 +2968,20 @@ function handleArrayResult(result, final, index) {
|
|
|
2968
2968
|
var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
2969
2969
|
$ZodType.init(inst, def);
|
|
2970
2970
|
inst._zod.parse = (payload, ctx) => {
|
|
2971
|
-
const
|
|
2972
|
-
if (!Array.isArray(
|
|
2971
|
+
const input2 = payload.value;
|
|
2972
|
+
if (!Array.isArray(input2)) {
|
|
2973
2973
|
payload.issues.push({
|
|
2974
2974
|
expected: "array",
|
|
2975
2975
|
code: "invalid_type",
|
|
2976
|
-
input,
|
|
2976
|
+
input: input2,
|
|
2977
2977
|
inst
|
|
2978
2978
|
});
|
|
2979
2979
|
return payload;
|
|
2980
2980
|
}
|
|
2981
|
-
payload.value = Array(
|
|
2981
|
+
payload.value = Array(input2.length);
|
|
2982
2982
|
const proms = [];
|
|
2983
|
-
for (let i = 0; i <
|
|
2984
|
-
const item =
|
|
2983
|
+
for (let i = 0; i < input2.length; i++) {
|
|
2984
|
+
const item = input2[i];
|
|
2985
2985
|
const result = def.element._zod.run({
|
|
2986
2986
|
value: item,
|
|
2987
2987
|
issues: []
|
|
@@ -2998,8 +2998,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
|
|
|
2998
2998
|
return payload;
|
|
2999
2999
|
};
|
|
3000
3000
|
});
|
|
3001
|
-
function handlePropertyResult(result, final, key,
|
|
3002
|
-
const isPresent = key in
|
|
3001
|
+
function handlePropertyResult(result, final, key, input2, isOptionalIn, isOptionalOut) {
|
|
3002
|
+
const isPresent = key in input2;
|
|
3003
3003
|
if (result.issues.length) {
|
|
3004
3004
|
if (isOptionalIn && isOptionalOut && !isPresent) {
|
|
3005
3005
|
return;
|
|
@@ -3041,14 +3041,14 @@ function normalizeDef(def) {
|
|
|
3041
3041
|
optionalKeys: new Set(okeys)
|
|
3042
3042
|
};
|
|
3043
3043
|
}
|
|
3044
|
-
function handleCatchall(proms,
|
|
3044
|
+
function handleCatchall(proms, input2, payload, ctx, def, inst) {
|
|
3045
3045
|
const unrecognized = [];
|
|
3046
3046
|
const keySet = def.keySet;
|
|
3047
3047
|
const _catchall = def.catchall._zod;
|
|
3048
3048
|
const t = _catchall.def.type;
|
|
3049
3049
|
const isOptionalIn = _catchall.optin === "optional";
|
|
3050
3050
|
const isOptionalOut = _catchall.optout === "optional";
|
|
3051
|
-
for (const key in
|
|
3051
|
+
for (const key in input2) {
|
|
3052
3052
|
if (key === "__proto__")
|
|
3053
3053
|
continue;
|
|
3054
3054
|
if (keySet.has(key))
|
|
@@ -3057,18 +3057,18 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
3057
3057
|
unrecognized.push(key);
|
|
3058
3058
|
continue;
|
|
3059
3059
|
}
|
|
3060
|
-
const r = _catchall.run({ value:
|
|
3060
|
+
const r = _catchall.run({ value: input2[key], issues: [] }, ctx);
|
|
3061
3061
|
if (r instanceof Promise) {
|
|
3062
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key,
|
|
3062
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
|
|
3063
3063
|
} else {
|
|
3064
|
-
handlePropertyResult(r, payload, key,
|
|
3064
|
+
handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
|
|
3065
3065
|
}
|
|
3066
3066
|
}
|
|
3067
3067
|
if (unrecognized.length) {
|
|
3068
3068
|
payload.issues.push({
|
|
3069
3069
|
code: "unrecognized_keys",
|
|
3070
3070
|
keys: unrecognized,
|
|
3071
|
-
input,
|
|
3071
|
+
input: input2,
|
|
3072
3072
|
inst
|
|
3073
3073
|
});
|
|
3074
3074
|
}
|
|
@@ -3112,12 +3112,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3112
3112
|
let value;
|
|
3113
3113
|
inst._zod.parse = (payload, ctx) => {
|
|
3114
3114
|
value ?? (value = _normalized.value);
|
|
3115
|
-
const
|
|
3116
|
-
if (!isObject2(
|
|
3115
|
+
const input2 = payload.value;
|
|
3116
|
+
if (!isObject2(input2)) {
|
|
3117
3117
|
payload.issues.push({
|
|
3118
3118
|
expected: "object",
|
|
3119
3119
|
code: "invalid_type",
|
|
3120
|
-
input,
|
|
3120
|
+
input: input2,
|
|
3121
3121
|
inst
|
|
3122
3122
|
});
|
|
3123
3123
|
return payload;
|
|
@@ -3129,17 +3129,17 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3129
3129
|
const el = shape[key];
|
|
3130
3130
|
const isOptionalIn = el._zod.optin === "optional";
|
|
3131
3131
|
const isOptionalOut = el._zod.optout === "optional";
|
|
3132
|
-
const r = el._zod.run({ value:
|
|
3132
|
+
const r = el._zod.run({ value: input2[key], issues: [] }, ctx);
|
|
3133
3133
|
if (r instanceof Promise) {
|
|
3134
|
-
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key,
|
|
3134
|
+
proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
|
|
3135
3135
|
} else {
|
|
3136
|
-
handlePropertyResult(r, payload, key,
|
|
3136
|
+
handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
|
|
3137
3137
|
}
|
|
3138
3138
|
}
|
|
3139
3139
|
if (!catchall) {
|
|
3140
3140
|
return proms.length ? Promise.all(proms).then(() => payload) : payload;
|
|
3141
3141
|
}
|
|
3142
|
-
return handleCatchall(proms,
|
|
3142
|
+
return handleCatchall(proms, input2, payload, ctx, _normalized.value, inst);
|
|
3143
3143
|
};
|
|
3144
3144
|
});
|
|
3145
3145
|
var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
|
|
@@ -3248,12 +3248,12 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3248
3248
|
let value;
|
|
3249
3249
|
inst._zod.parse = (payload, ctx) => {
|
|
3250
3250
|
value ?? (value = _normalized.value);
|
|
3251
|
-
const
|
|
3252
|
-
if (!isObject2(
|
|
3251
|
+
const input2 = payload.value;
|
|
3252
|
+
if (!isObject2(input2)) {
|
|
3253
3253
|
payload.issues.push({
|
|
3254
3254
|
expected: "object",
|
|
3255
3255
|
code: "invalid_type",
|
|
3256
|
-
input,
|
|
3256
|
+
input: input2,
|
|
3257
3257
|
inst
|
|
3258
3258
|
});
|
|
3259
3259
|
return payload;
|
|
@@ -3264,7 +3264,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
3264
3264
|
payload = fastpass(payload, ctx);
|
|
3265
3265
|
if (!catchall)
|
|
3266
3266
|
return payload;
|
|
3267
|
-
return handleCatchall([],
|
|
3267
|
+
return handleCatchall([], input2, payload, ctx, value, inst);
|
|
3268
3268
|
}
|
|
3269
3269
|
return superParse(payload, ctx);
|
|
3270
3270
|
};
|
|
@@ -3424,17 +3424,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3424
3424
|
return map2;
|
|
3425
3425
|
});
|
|
3426
3426
|
inst._zod.parse = (payload, ctx) => {
|
|
3427
|
-
const
|
|
3428
|
-
if (!isObject(
|
|
3427
|
+
const input2 = payload.value;
|
|
3428
|
+
if (!isObject(input2)) {
|
|
3429
3429
|
payload.issues.push({
|
|
3430
3430
|
code: "invalid_type",
|
|
3431
3431
|
expected: "object",
|
|
3432
|
-
input,
|
|
3432
|
+
input: input2,
|
|
3433
3433
|
inst
|
|
3434
3434
|
});
|
|
3435
3435
|
return payload;
|
|
3436
3436
|
}
|
|
3437
|
-
const opt = disc.value.get(
|
|
3437
|
+
const opt = disc.value.get(input2?.[def.discriminator]);
|
|
3438
3438
|
if (opt) {
|
|
3439
3439
|
return opt._zod.run(payload, ctx);
|
|
3440
3440
|
}
|
|
@@ -3447,7 +3447,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3447
3447
|
note: "No matching discriminator",
|
|
3448
3448
|
discriminator: def.discriminator,
|
|
3449
3449
|
options: Array.from(disc.value.keys()),
|
|
3450
|
-
input,
|
|
3450
|
+
input: input2,
|
|
3451
3451
|
path: [def.discriminator],
|
|
3452
3452
|
inst
|
|
3453
3453
|
});
|
|
@@ -3457,9 +3457,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
|
|
|
3457
3457
|
var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
|
|
3458
3458
|
$ZodType.init(inst, def);
|
|
3459
3459
|
inst._zod.parse = (payload, ctx) => {
|
|
3460
|
-
const
|
|
3461
|
-
const left = def.left._zod.run({ value:
|
|
3462
|
-
const right = def.right._zod.run({ value:
|
|
3460
|
+
const input2 = payload.value;
|
|
3461
|
+
const left = def.left._zod.run({ value: input2, issues: [] }, ctx);
|
|
3462
|
+
const right = def.right._zod.run({ value: input2, issues: [] }, ctx);
|
|
3463
3463
|
const async = left instanceof Promise || right instanceof Promise;
|
|
3464
3464
|
if (async) {
|
|
3465
3465
|
return Promise.all([left, right]).then(([left2, right2]) => {
|
|
@@ -3556,10 +3556,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3556
3556
|
$ZodType.init(inst, def);
|
|
3557
3557
|
const items = def.items;
|
|
3558
3558
|
inst._zod.parse = (payload, ctx) => {
|
|
3559
|
-
const
|
|
3560
|
-
if (!Array.isArray(
|
|
3559
|
+
const input2 = payload.value;
|
|
3560
|
+
if (!Array.isArray(input2)) {
|
|
3561
3561
|
payload.issues.push({
|
|
3562
|
-
input,
|
|
3562
|
+
input: input2,
|
|
3563
3563
|
inst,
|
|
3564
3564
|
expected: "tuple",
|
|
3565
3565
|
code: "invalid_type"
|
|
@@ -3571,23 +3571,23 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3571
3571
|
const optinStart = getTupleOptStart(items, "optin");
|
|
3572
3572
|
const optoutStart = getTupleOptStart(items, "optout");
|
|
3573
3573
|
if (!def.rest) {
|
|
3574
|
-
if (
|
|
3574
|
+
if (input2.length < optinStart) {
|
|
3575
3575
|
payload.issues.push({
|
|
3576
3576
|
code: "too_small",
|
|
3577
3577
|
minimum: optinStart,
|
|
3578
3578
|
inclusive: true,
|
|
3579
|
-
input,
|
|
3579
|
+
input: input2,
|
|
3580
3580
|
inst,
|
|
3581
3581
|
origin: "array"
|
|
3582
3582
|
});
|
|
3583
3583
|
return payload;
|
|
3584
3584
|
}
|
|
3585
|
-
if (
|
|
3585
|
+
if (input2.length > items.length) {
|
|
3586
3586
|
payload.issues.push({
|
|
3587
3587
|
code: "too_big",
|
|
3588
3588
|
maximum: items.length,
|
|
3589
3589
|
inclusive: true,
|
|
3590
|
-
input,
|
|
3590
|
+
input: input2,
|
|
3591
3591
|
inst,
|
|
3592
3592
|
origin: "array"
|
|
3593
3593
|
});
|
|
@@ -3595,7 +3595,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3595
3595
|
}
|
|
3596
3596
|
const itemResults = new Array(items.length);
|
|
3597
3597
|
for (let i = 0; i < items.length; i++) {
|
|
3598
|
-
const r = items[i]._zod.run({ value:
|
|
3598
|
+
const r = items[i]._zod.run({ value: input2[i], issues: [] }, ctx);
|
|
3599
3599
|
if (r instanceof Promise) {
|
|
3600
3600
|
proms.push(r.then((rr) => {
|
|
3601
3601
|
itemResults[i] = rr;
|
|
@@ -3606,7 +3606,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3606
3606
|
}
|
|
3607
3607
|
if (def.rest) {
|
|
3608
3608
|
let i = items.length - 1;
|
|
3609
|
-
const rest =
|
|
3609
|
+
const rest = input2.slice(items.length);
|
|
3610
3610
|
for (const el of rest) {
|
|
3611
3611
|
i++;
|
|
3612
3612
|
const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
|
|
@@ -3618,9 +3618,9 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
|
|
|
3618
3618
|
}
|
|
3619
3619
|
}
|
|
3620
3620
|
if (proms.length) {
|
|
3621
|
-
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items,
|
|
3621
|
+
return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input2, optoutStart));
|
|
3622
3622
|
}
|
|
3623
|
-
return handleTupleResults(itemResults, payload, items,
|
|
3623
|
+
return handleTupleResults(itemResults, payload, items, input2, optoutStart);
|
|
3624
3624
|
};
|
|
3625
3625
|
});
|
|
3626
3626
|
function getTupleOptStart(items, key) {
|
|
@@ -3636,10 +3636,10 @@ function handleTupleResult(result, final, index) {
|
|
|
3636
3636
|
}
|
|
3637
3637
|
final.value[index] = result.value;
|
|
3638
3638
|
}
|
|
3639
|
-
function handleTupleResults(itemResults, final, items,
|
|
3639
|
+
function handleTupleResults(itemResults, final, items, input2, optoutStart) {
|
|
3640
3640
|
for (let i = 0; i < items.length; i++) {
|
|
3641
3641
|
const r = itemResults[i];
|
|
3642
|
-
const isPresent = i <
|
|
3642
|
+
const isPresent = i < input2.length;
|
|
3643
3643
|
if (r.issues.length) {
|
|
3644
3644
|
if (!isPresent && i >= optoutStart) {
|
|
3645
3645
|
final.value.length = i;
|
|
@@ -3649,7 +3649,7 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
|
3649
3649
|
}
|
|
3650
3650
|
final.value[i] = r.value;
|
|
3651
3651
|
}
|
|
3652
|
-
for (let i = final.value.length - 1; i >=
|
|
3652
|
+
for (let i = final.value.length - 1; i >= input2.length; i--) {
|
|
3653
3653
|
if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
|
|
3654
3654
|
final.value.length = i;
|
|
3655
3655
|
} else {
|
|
@@ -3661,12 +3661,12 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
|
|
|
3661
3661
|
var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
3662
3662
|
$ZodType.init(inst, def);
|
|
3663
3663
|
inst._zod.parse = (payload, ctx) => {
|
|
3664
|
-
const
|
|
3665
|
-
if (!isPlainObject(
|
|
3664
|
+
const input2 = payload.value;
|
|
3665
|
+
if (!isPlainObject(input2)) {
|
|
3666
3666
|
payload.issues.push({
|
|
3667
3667
|
expected: "record",
|
|
3668
3668
|
code: "invalid_type",
|
|
3669
|
-
input,
|
|
3669
|
+
input: input2,
|
|
3670
3670
|
inst
|
|
3671
3671
|
});
|
|
3672
3672
|
return payload;
|
|
@@ -3695,7 +3695,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3695
3695
|
continue;
|
|
3696
3696
|
}
|
|
3697
3697
|
const outKey = keyResult.value;
|
|
3698
|
-
const result = def.valueType._zod.run({ value:
|
|
3698
|
+
const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
|
|
3699
3699
|
if (result instanceof Promise) {
|
|
3700
3700
|
proms.push(result.then((result2) => {
|
|
3701
3701
|
if (result2.issues.length) {
|
|
@@ -3712,7 +3712,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3712
3712
|
}
|
|
3713
3713
|
}
|
|
3714
3714
|
let unrecognized;
|
|
3715
|
-
for (const key in
|
|
3715
|
+
for (const key in input2) {
|
|
3716
3716
|
if (!recordKeys.has(key)) {
|
|
3717
3717
|
unrecognized = unrecognized ?? [];
|
|
3718
3718
|
unrecognized.push(key);
|
|
@@ -3721,17 +3721,17 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3721
3721
|
if (unrecognized && unrecognized.length > 0) {
|
|
3722
3722
|
payload.issues.push({
|
|
3723
3723
|
code: "unrecognized_keys",
|
|
3724
|
-
input,
|
|
3724
|
+
input: input2,
|
|
3725
3725
|
inst,
|
|
3726
3726
|
keys: unrecognized
|
|
3727
3727
|
});
|
|
3728
3728
|
}
|
|
3729
3729
|
} else {
|
|
3730
3730
|
payload.value = {};
|
|
3731
|
-
for (const key of Reflect.ownKeys(
|
|
3731
|
+
for (const key of Reflect.ownKeys(input2)) {
|
|
3732
3732
|
if (key === "__proto__")
|
|
3733
3733
|
continue;
|
|
3734
|
-
if (!Object.prototype.propertyIsEnumerable.call(
|
|
3734
|
+
if (!Object.prototype.propertyIsEnumerable.call(input2, key))
|
|
3735
3735
|
continue;
|
|
3736
3736
|
let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3737
3737
|
if (keyResult instanceof Promise) {
|
|
@@ -3749,7 +3749,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3749
3749
|
}
|
|
3750
3750
|
if (keyResult.issues.length) {
|
|
3751
3751
|
if (def.mode === "loose") {
|
|
3752
|
-
payload.value[key] =
|
|
3752
|
+
payload.value[key] = input2[key];
|
|
3753
3753
|
} else {
|
|
3754
3754
|
payload.issues.push({
|
|
3755
3755
|
code: "invalid_key",
|
|
@@ -3762,7 +3762,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3762
3762
|
}
|
|
3763
3763
|
continue;
|
|
3764
3764
|
}
|
|
3765
|
-
const result = def.valueType._zod.run({ value:
|
|
3765
|
+
const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
|
|
3766
3766
|
if (result instanceof Promise) {
|
|
3767
3767
|
proms.push(result.then((result2) => {
|
|
3768
3768
|
if (result2.issues.length) {
|
|
@@ -3787,27 +3787,27 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3787
3787
|
var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
3788
3788
|
$ZodType.init(inst, def);
|
|
3789
3789
|
inst._zod.parse = (payload, ctx) => {
|
|
3790
|
-
const
|
|
3791
|
-
if (!(
|
|
3790
|
+
const input2 = payload.value;
|
|
3791
|
+
if (!(input2 instanceof Map)) {
|
|
3792
3792
|
payload.issues.push({
|
|
3793
3793
|
expected: "map",
|
|
3794
3794
|
code: "invalid_type",
|
|
3795
|
-
input,
|
|
3795
|
+
input: input2,
|
|
3796
3796
|
inst
|
|
3797
3797
|
});
|
|
3798
3798
|
return payload;
|
|
3799
3799
|
}
|
|
3800
3800
|
const proms = [];
|
|
3801
3801
|
payload.value = /* @__PURE__ */ new Map();
|
|
3802
|
-
for (const [key, value] of
|
|
3802
|
+
for (const [key, value] of input2) {
|
|
3803
3803
|
const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
|
|
3804
3804
|
const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
|
|
3805
3805
|
if (keyResult instanceof Promise || valueResult instanceof Promise) {
|
|
3806
3806
|
proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
|
|
3807
|
-
handleMapResult(keyResult2, valueResult2, payload, key,
|
|
3807
|
+
handleMapResult(keyResult2, valueResult2, payload, key, input2, inst, ctx);
|
|
3808
3808
|
}));
|
|
3809
3809
|
} else {
|
|
3810
|
-
handleMapResult(keyResult, valueResult, payload, key,
|
|
3810
|
+
handleMapResult(keyResult, valueResult, payload, key, input2, inst, ctx);
|
|
3811
3811
|
}
|
|
3812
3812
|
}
|
|
3813
3813
|
if (proms.length)
|
|
@@ -3815,7 +3815,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
|
|
|
3815
3815
|
return payload;
|
|
3816
3816
|
};
|
|
3817
3817
|
});
|
|
3818
|
-
function handleMapResult(keyResult, valueResult, final, key,
|
|
3818
|
+
function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
|
|
3819
3819
|
if (keyResult.issues.length) {
|
|
3820
3820
|
if (propertyKeyTypes.has(typeof key)) {
|
|
3821
3821
|
final.issues.push(...prefixIssues(key, keyResult.issues));
|
|
@@ -3823,7 +3823,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
|
|
|
3823
3823
|
final.issues.push({
|
|
3824
3824
|
code: "invalid_key",
|
|
3825
3825
|
origin: "map",
|
|
3826
|
-
input,
|
|
3826
|
+
input: input2,
|
|
3827
3827
|
inst,
|
|
3828
3828
|
issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
|
|
3829
3829
|
});
|
|
@@ -3836,7 +3836,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
|
|
|
3836
3836
|
final.issues.push({
|
|
3837
3837
|
origin: "map",
|
|
3838
3838
|
code: "invalid_element",
|
|
3839
|
-
input,
|
|
3839
|
+
input: input2,
|
|
3840
3840
|
inst,
|
|
3841
3841
|
key,
|
|
3842
3842
|
issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
|
|
@@ -3848,10 +3848,10 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
|
|
|
3848
3848
|
var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
3849
3849
|
$ZodType.init(inst, def);
|
|
3850
3850
|
inst._zod.parse = (payload, ctx) => {
|
|
3851
|
-
const
|
|
3852
|
-
if (!(
|
|
3851
|
+
const input2 = payload.value;
|
|
3852
|
+
if (!(input2 instanceof Set)) {
|
|
3853
3853
|
payload.issues.push({
|
|
3854
|
-
input,
|
|
3854
|
+
input: input2,
|
|
3855
3855
|
inst,
|
|
3856
3856
|
expected: "set",
|
|
3857
3857
|
code: "invalid_type"
|
|
@@ -3860,7 +3860,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
|
|
|
3860
3860
|
}
|
|
3861
3861
|
const proms = [];
|
|
3862
3862
|
payload.value = /* @__PURE__ */ new Set();
|
|
3863
|
-
for (const item of
|
|
3863
|
+
for (const item of input2) {
|
|
3864
3864
|
const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
|
|
3865
3865
|
if (result instanceof Promise) {
|
|
3866
3866
|
proms.push(result.then((result2) => handleSetResult(result2, payload)));
|
|
@@ -3885,14 +3885,14 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
3885
3885
|
inst._zod.values = valuesSet;
|
|
3886
3886
|
inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
|
|
3887
3887
|
inst._zod.parse = (payload, _ctx) => {
|
|
3888
|
-
const
|
|
3889
|
-
if (valuesSet.has(
|
|
3888
|
+
const input2 = payload.value;
|
|
3889
|
+
if (valuesSet.has(input2)) {
|
|
3890
3890
|
return payload;
|
|
3891
3891
|
}
|
|
3892
3892
|
payload.issues.push({
|
|
3893
3893
|
code: "invalid_value",
|
|
3894
3894
|
values,
|
|
3895
|
-
input,
|
|
3895
|
+
input: input2,
|
|
3896
3896
|
inst
|
|
3897
3897
|
});
|
|
3898
3898
|
return payload;
|
|
@@ -3907,14 +3907,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
3907
3907
|
inst._zod.values = values;
|
|
3908
3908
|
inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
|
|
3909
3909
|
inst._zod.parse = (payload, _ctx) => {
|
|
3910
|
-
const
|
|
3911
|
-
if (values.has(
|
|
3910
|
+
const input2 = payload.value;
|
|
3911
|
+
if (values.has(input2)) {
|
|
3912
3912
|
return payload;
|
|
3913
3913
|
}
|
|
3914
3914
|
payload.issues.push({
|
|
3915
3915
|
code: "invalid_value",
|
|
3916
3916
|
values: def.values,
|
|
3917
|
-
input,
|
|
3917
|
+
input: input2,
|
|
3918
3918
|
inst
|
|
3919
3919
|
});
|
|
3920
3920
|
return payload;
|
|
@@ -3923,13 +3923,13 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
|
3923
3923
|
var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
|
|
3924
3924
|
$ZodType.init(inst, def);
|
|
3925
3925
|
inst._zod.parse = (payload, _ctx) => {
|
|
3926
|
-
const
|
|
3927
|
-
if (
|
|
3926
|
+
const input2 = payload.value;
|
|
3927
|
+
if (input2 instanceof File)
|
|
3928
3928
|
return payload;
|
|
3929
3929
|
payload.issues.push({
|
|
3930
3930
|
expected: "file",
|
|
3931
3931
|
code: "invalid_type",
|
|
3932
|
-
input,
|
|
3932
|
+
input: input2,
|
|
3933
3933
|
inst
|
|
3934
3934
|
});
|
|
3935
3935
|
return payload;
|
|
@@ -3959,8 +3959,8 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
|
|
|
3959
3959
|
return payload;
|
|
3960
3960
|
};
|
|
3961
3961
|
});
|
|
3962
|
-
function handleOptionalResult(result,
|
|
3963
|
-
if (
|
|
3962
|
+
function handleOptionalResult(result, input2) {
|
|
3963
|
+
if (input2 === void 0 && (result.issues.length || result.fallback)) {
|
|
3964
3964
|
return { issues: [], value: void 0 };
|
|
3965
3965
|
}
|
|
3966
3966
|
return result;
|
|
@@ -3978,11 +3978,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
|
|
|
3978
3978
|
});
|
|
3979
3979
|
inst._zod.parse = (payload, ctx) => {
|
|
3980
3980
|
if (def.innerType._zod.optin === "optional") {
|
|
3981
|
-
const
|
|
3981
|
+
const input2 = payload.value;
|
|
3982
3982
|
const result = def.innerType._zod.run(payload, ctx);
|
|
3983
3983
|
if (result instanceof Promise)
|
|
3984
|
-
return result.then((r) => handleOptionalResult(r,
|
|
3985
|
-
return handleOptionalResult(result,
|
|
3984
|
+
return result.then((r) => handleOptionalResult(r, input2));
|
|
3985
|
+
return handleOptionalResult(result, input2);
|
|
3986
3986
|
}
|
|
3987
3987
|
if (payload.value === void 0) {
|
|
3988
3988
|
return payload;
|
|
@@ -4407,20 +4407,20 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
|
|
|
4407
4407
|
return payload;
|
|
4408
4408
|
};
|
|
4409
4409
|
inst._zod.check = (payload) => {
|
|
4410
|
-
const
|
|
4411
|
-
const r = def.fn(
|
|
4410
|
+
const input2 = payload.value;
|
|
4411
|
+
const r = def.fn(input2);
|
|
4412
4412
|
if (r instanceof Promise) {
|
|
4413
|
-
return r.then((r2) => handleRefineResult(r2, payload,
|
|
4413
|
+
return r.then((r2) => handleRefineResult(r2, payload, input2, inst));
|
|
4414
4414
|
}
|
|
4415
|
-
handleRefineResult(r, payload,
|
|
4415
|
+
handleRefineResult(r, payload, input2, inst);
|
|
4416
4416
|
return;
|
|
4417
4417
|
};
|
|
4418
4418
|
});
|
|
4419
|
-
function handleRefineResult(result, payload,
|
|
4419
|
+
function handleRefineResult(result, payload, input2, inst) {
|
|
4420
4420
|
if (!result) {
|
|
4421
4421
|
const _iss = {
|
|
4422
4422
|
code: "custom",
|
|
4423
|
-
input,
|
|
4423
|
+
input: input2,
|
|
4424
4424
|
inst,
|
|
4425
4425
|
// incorporates params.error into issue reporting
|
|
4426
4426
|
path: [...inst._zod.def.path ?? []],
|
|
@@ -7707,8 +7707,8 @@ function ko_default() {
|
|
|
7707
7707
|
}
|
|
7708
7708
|
|
|
7709
7709
|
// ../../../node_modules/zod/v4/locales/lt.js
|
|
7710
|
-
var capitalizeFirstCharacter = (
|
|
7711
|
-
return
|
|
7710
|
+
var capitalizeFirstCharacter = (text3) => {
|
|
7711
|
+
return text3.charAt(0).toUpperCase() + text3.slice(1);
|
|
7712
7712
|
};
|
|
7713
7713
|
function getUnitTypeFromNumber(number4) {
|
|
7714
7714
|
const abs = Math.abs(number4);
|
|
@@ -11108,23 +11108,23 @@ function _overwrite(tx) {
|
|
|
11108
11108
|
}
|
|
11109
11109
|
// @__NO_SIDE_EFFECTS__
|
|
11110
11110
|
function _normalize(form) {
|
|
11111
|
-
return /* @__PURE__ */ _overwrite((
|
|
11111
|
+
return /* @__PURE__ */ _overwrite((input2) => input2.normalize(form));
|
|
11112
11112
|
}
|
|
11113
11113
|
// @__NO_SIDE_EFFECTS__
|
|
11114
11114
|
function _trim() {
|
|
11115
|
-
return /* @__PURE__ */ _overwrite((
|
|
11115
|
+
return /* @__PURE__ */ _overwrite((input2) => input2.trim());
|
|
11116
11116
|
}
|
|
11117
11117
|
// @__NO_SIDE_EFFECTS__
|
|
11118
11118
|
function _toLowerCase() {
|
|
11119
|
-
return /* @__PURE__ */ _overwrite((
|
|
11119
|
+
return /* @__PURE__ */ _overwrite((input2) => input2.toLowerCase());
|
|
11120
11120
|
}
|
|
11121
11121
|
// @__NO_SIDE_EFFECTS__
|
|
11122
11122
|
function _toUpperCase() {
|
|
11123
|
-
return /* @__PURE__ */ _overwrite((
|
|
11123
|
+
return /* @__PURE__ */ _overwrite((input2) => input2.toUpperCase());
|
|
11124
11124
|
}
|
|
11125
11125
|
// @__NO_SIDE_EFFECTS__
|
|
11126
11126
|
function _slugify() {
|
|
11127
|
-
return /* @__PURE__ */ _overwrite((
|
|
11127
|
+
return /* @__PURE__ */ _overwrite((input2) => slugify(input2));
|
|
11128
11128
|
}
|
|
11129
11129
|
// @__NO_SIDE_EFFECTS__
|
|
11130
11130
|
function _array(Class2, element, params) {
|
|
@@ -11429,8 +11429,8 @@ function _stringbool(Classes, _params) {
|
|
|
11429
11429
|
type: "pipe",
|
|
11430
11430
|
in: stringSchema,
|
|
11431
11431
|
out: booleanSchema,
|
|
11432
|
-
transform: ((
|
|
11433
|
-
let data =
|
|
11432
|
+
transform: ((input2, payload) => {
|
|
11433
|
+
let data = input2;
|
|
11434
11434
|
if (params.case !== "sensitive")
|
|
11435
11435
|
data = data.toLowerCase();
|
|
11436
11436
|
if (truthySet.has(data)) {
|
|
@@ -11449,8 +11449,8 @@ function _stringbool(Classes, _params) {
|
|
|
11449
11449
|
return {};
|
|
11450
11450
|
}
|
|
11451
11451
|
}),
|
|
11452
|
-
reverseTransform: ((
|
|
11453
|
-
if (
|
|
11452
|
+
reverseTransform: ((input2, _payload) => {
|
|
11453
|
+
if (input2 === true) {
|
|
11454
11454
|
return truthyArray[0] || "true";
|
|
11455
11455
|
} else {
|
|
11456
11456
|
return falsyArray[0] || "false";
|
|
@@ -12346,9 +12346,9 @@ var allProcessors = {
|
|
|
12346
12346
|
optional: optionalProcessor,
|
|
12347
12347
|
lazy: lazyProcessor
|
|
12348
12348
|
};
|
|
12349
|
-
function toJSONSchema(
|
|
12350
|
-
if ("_idmap" in
|
|
12351
|
-
const registry2 =
|
|
12349
|
+
function toJSONSchema(input2, params) {
|
|
12350
|
+
if ("_idmap" in input2) {
|
|
12351
|
+
const registry2 = input2;
|
|
12352
12352
|
const ctx2 = initializeContext({ ...params, processors: allProcessors });
|
|
12353
12353
|
const defs = {};
|
|
12354
12354
|
for (const entry of registry2._idmap.entries()) {
|
|
@@ -12376,9 +12376,9 @@ function toJSONSchema(input, params) {
|
|
|
12376
12376
|
return { schemas };
|
|
12377
12377
|
}
|
|
12378
12378
|
const ctx = initializeContext({ ...params, processors: allProcessors });
|
|
12379
|
-
process2(
|
|
12380
|
-
extractDefs(ctx,
|
|
12381
|
-
return finalize(ctx,
|
|
12379
|
+
process2(input2, ctx);
|
|
12380
|
+
extractDefs(ctx, input2);
|
|
12381
|
+
return finalize(ctx, input2);
|
|
12382
12382
|
}
|
|
12383
12383
|
|
|
12384
12384
|
// ../../../node_modules/zod/v4/core/json-schema-generator.js
|
|
@@ -14783,7 +14783,7 @@ var codexhostErrorSchema = external_exports.strictObject({
|
|
|
14783
14783
|
|
|
14784
14784
|
// ../../shared-contracts/dist/harness-presentation.js
|
|
14785
14785
|
var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
|
|
14786
|
-
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((
|
|
14786
|
+
var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text3) => text3.trim().length > 0);
|
|
14787
14787
|
var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
|
|
14788
14788
|
label: displayText(256).optional(),
|
|
14789
14789
|
description: displayText(1024).optional()
|
|
@@ -14872,7 +14872,7 @@ var usageMeasurementsSchema = external_exports.object({
|
|
|
14872
14872
|
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
|
|
14873
14873
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
14874
14874
|
}).strict();
|
|
14875
|
-
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((
|
|
14875
|
+
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text3) => text3.length <= maximum));
|
|
14876
14876
|
var composerIndicatorsSchema = external_exports.array(external_exports.object({
|
|
14877
14877
|
kind: external_exports.literal("countdown"),
|
|
14878
14878
|
id: external_exports.string().min(1).max(64),
|
|
@@ -15255,6 +15255,8 @@ var externalThreadInspectionSchema = external_exports.object({
|
|
|
15255
15255
|
effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
15256
15256
|
availableThinkingOptions: harnessThinkingOptionsSchema.optional(),
|
|
15257
15257
|
effectivePermissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
15258
|
+
/** Live Session catalog when it, not the Adapter inspection, contains `effectiveModel`. */
|
|
15259
|
+
catalog: harnessModelCatalogSchema.optional(),
|
|
15258
15260
|
history: harnessHistoryCapabilitiesSchema,
|
|
15259
15261
|
usage: threadUsageSnapshotSchema.optional(),
|
|
15260
15262
|
locked: external_exports.literal(true)
|
|
@@ -15313,9 +15315,9 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
15313
15315
|
}).strict();
|
|
15314
15316
|
var threadSteeringContextSchema = external_exports.object({
|
|
15315
15317
|
kind: external_exports.literal("application"),
|
|
15316
|
-
value: external_exports.string().transform((
|
|
15318
|
+
value: external_exports.string().transform((text3, context) => {
|
|
15317
15319
|
try {
|
|
15318
|
-
return JSON.parse(
|
|
15320
|
+
return JSON.parse(text3);
|
|
15319
15321
|
} catch {
|
|
15320
15322
|
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
15321
15323
|
return external_exports.NEVER;
|
|
@@ -15450,8 +15452,8 @@ var desktopExtensionHttpUrlSchema = external_exports.string().trim().max(2048).r
|
|
|
15450
15452
|
const { username, password } = new URL(value);
|
|
15451
15453
|
return !username && !password && !/[\\\s]/u.test(value);
|
|
15452
15454
|
}, "URL must not contain credentials, backslashes, or whitespace");
|
|
15453
|
-
function localizedText(
|
|
15454
|
-
return external_exports.strictObject({ en:
|
|
15455
|
+
function localizedText(text3) {
|
|
15456
|
+
return external_exports.strictObject({ en: text3, "zh-CN": text3 });
|
|
15455
15457
|
}
|
|
15456
15458
|
var desktopExtensionLocalizedTextSchema = localizedText(external_exports.string().trim().min(1));
|
|
15457
15459
|
var categoriesSchema = external_exports.array(desktopExtensionCategorySchema).max(desktopExtensionCategorySchema.options.length).refine((categories) => new Set(categories).size === categories.length, "Duplicate categories");
|
|
@@ -15568,8 +15570,8 @@ var desktopExtensionTrustTierSchema = external_exports.enum(["official", "commun
|
|
|
15568
15570
|
function isGitHubDesktopExtensionZipballUrl(url2) {
|
|
15569
15571
|
return url2.origin === "https://api.github.com" && /^\/repos\/[\w-]+\/[\w.-]+\/zipball(?:\/[^/]+)?\/?$/u.test(url2.pathname);
|
|
15570
15572
|
}
|
|
15571
|
-
var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((
|
|
15572
|
-
const url2 = new URL(
|
|
15573
|
+
var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input2) => {
|
|
15574
|
+
const url2 = new URL(input2);
|
|
15573
15575
|
return /\.zip$/iu.test(url2.pathname) || isGitHubDesktopExtensionZipballUrl(url2) || url2.origin === "https://github.com" && /^\/[\w-]+\/[\w.-]+\/zipball(?:\/.+)?\/?$/u.test(url2.pathname) || url2.origin === "https://codeload.github.com" && /^\/[\w-]+\/[\w.-]+\/(?:zip|zipball|legacy\.zip)\/.+$/u.test(url2.pathname);
|
|
15574
15576
|
}, "Expected a .zip download URL or a GitHub zipball URL");
|
|
15575
15577
|
var desktopExtensionCatalogEntrySchema = external_exports.strictObject({
|
|
@@ -15920,6 +15922,8 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
15920
15922
|
"codexhost/workspace/read",
|
|
15921
15923
|
"codexhost/thread/tree/read",
|
|
15922
15924
|
"codexhost/thread/pins/list",
|
|
15925
|
+
"codexhost/thread/sections/list",
|
|
15926
|
+
"codexhost/thread/sections/move",
|
|
15923
15927
|
"codexhost/thread/pins/set",
|
|
15924
15928
|
"codexhost/harness/plugins/list",
|
|
15925
15929
|
"codexhost/harness/inspect",
|
|
@@ -15958,8 +15962,21 @@ var CLIENT_CHANNEL_METHODS = [
|
|
|
15958
15962
|
"codexhost/update/check",
|
|
15959
15963
|
"codexhost/update/start",
|
|
15960
15964
|
"codexhost/update/status",
|
|
15965
|
+
"codexhost/announcement/get",
|
|
15966
|
+
"codexhost/announcement/acknowledge",
|
|
15961
15967
|
"codexhost/sessions/loaded/list"
|
|
15962
15968
|
];
|
|
15969
|
+
var clientThreadSectionsSchema = external_exports.object({
|
|
15970
|
+
sections: external_exports.array(external_exports.object({
|
|
15971
|
+
id: external_exports.string().min(1),
|
|
15972
|
+
name: external_exports.string().min(1),
|
|
15973
|
+
threads: external_exports.array(jsonObjectSchema)
|
|
15974
|
+
}).strict())
|
|
15975
|
+
}).strict();
|
|
15976
|
+
var clientThreadSectionMoveSchema = external_exports.object({
|
|
15977
|
+
threadId: external_exports.string().min(1).max(1024),
|
|
15978
|
+
sectionId: external_exports.string().min(1).max(1024).nullable()
|
|
15979
|
+
}).strict();
|
|
15963
15980
|
var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
|
|
15964
15981
|
var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
|
|
15965
15982
|
var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
|
|
@@ -16501,8 +16518,8 @@ var harnessPreferencePatchSchema = external_exports.strictObject({
|
|
|
16501
16518
|
operations: external_exports.array(harnessPreferenceOperationSchema).min(1).max(256),
|
|
16502
16519
|
initializeOnly: external_exports.boolean().optional(),
|
|
16503
16520
|
expectedRevision: external_exports.number().int().nonnegative().optional()
|
|
16504
|
-
}).superRefine((
|
|
16505
|
-
for (const operation of
|
|
16521
|
+
}).superRefine((input2, ctx) => {
|
|
16522
|
+
for (const operation of input2.operations) {
|
|
16506
16523
|
if (operation.kind === "newThread" && (!operation.lastHarness && !operation.configuration || Boolean(operation.harnessId) !== Boolean(operation.configuration)))
|
|
16507
16524
|
ctx.addIssue({
|
|
16508
16525
|
code: "custom",
|
|
@@ -16904,13 +16921,18 @@ var harnessLaunchSettingsSchema = external_exports.object({
|
|
|
16904
16921
|
// ../../shared-contracts/dist/harness-installation.js
|
|
16905
16922
|
var harnessInstallationParamsSchema = external_exports.object({
|
|
16906
16923
|
harnessId: harnessIdSchema,
|
|
16907
|
-
action: external_exports.enum(["check", "update", "install"])
|
|
16908
|
-
|
|
16924
|
+
action: external_exports.enum(["check", "update", "install"]),
|
|
16925
|
+
confirmedVersion: external_exports.string().min(1).max(128).optional()
|
|
16926
|
+
}).strict().refine(({ action, confirmedVersion }) => action === "update" || confirmedVersion === void 0);
|
|
16909
16927
|
var harnessInstallationStateSchema = external_exports.object({
|
|
16910
16928
|
currentVersion: external_exports.string().min(1).max(128),
|
|
16911
16929
|
latestVersion: external_exports.string().min(1).max(128),
|
|
16912
16930
|
updateAvailable: external_exports.boolean(),
|
|
16913
16931
|
canUpdate: external_exports.boolean(),
|
|
16932
|
+
/** Present when the Adapter has a verified list and the available target is outside it. */
|
|
16933
|
+
latestVerifiedVersion: external_exports.string().min(1).max(128).optional(),
|
|
16934
|
+
/** Update preflight stopped before running the installer; latestVersion needs confirmation. */
|
|
16935
|
+
confirmationRequired: external_exports.literal(true).optional(),
|
|
16914
16936
|
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
16915
16937
|
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
16916
16938
|
/** Official download opened by the user; does not imply an automatic installation. */
|
|
@@ -17240,6 +17262,38 @@ var updateStatusResultSchema = external_exports.strictObject({
|
|
|
17240
17262
|
status: updateStatusSchema.nullable()
|
|
17241
17263
|
});
|
|
17242
17264
|
|
|
17265
|
+
// ../../shared-contracts/dist/release-announcement.js
|
|
17266
|
+
var RELEASE_ANNOUNCEMENT_MAX_THEMES = 12;
|
|
17267
|
+
var releaseAnnouncementThemeSchema = external_exports.strictObject({
|
|
17268
|
+
icon: external_exports.string().min(1).max(16).optional(),
|
|
17269
|
+
title: external_exports.string().min(1).max(120),
|
|
17270
|
+
body: external_exports.string().min(1).max(1200),
|
|
17271
|
+
contributors: external_exports.array(external_exports.string().min(1).max(39)).max(30)
|
|
17272
|
+
});
|
|
17273
|
+
var releaseAnnouncementContentSchema = external_exports.strictObject({
|
|
17274
|
+
summary: external_exports.string().min(1).max(600).optional(),
|
|
17275
|
+
themes: external_exports.array(releaseAnnouncementThemeSchema).min(1).max(RELEASE_ANNOUNCEMENT_MAX_THEMES)
|
|
17276
|
+
});
|
|
17277
|
+
var releaseAnnouncementSchema = external_exports.strictObject({
|
|
17278
|
+
version: updateSemanticVersionSchema,
|
|
17279
|
+
publishedAt: external_exports.iso.datetime(),
|
|
17280
|
+
url: external_exports.string().max(300).regex(/^https:\/\/github\.com\/BytePioneer-AI\/codex-host\/releases\/tag\/v[0-9A-Za-z.+-]+$/u),
|
|
17281
|
+
zh: releaseAnnouncementContentSchema.nullable(),
|
|
17282
|
+
en: releaseAnnouncementContentSchema.nullable()
|
|
17283
|
+
}).refine((value) => value.zh !== null || value.en !== null, {
|
|
17284
|
+
message: "an announcement needs at least one language"
|
|
17285
|
+
});
|
|
17286
|
+
var releaseAnnouncementGetParamsSchema = external_exports.strictObject({
|
|
17287
|
+
manual: external_exports.boolean().optional()
|
|
17288
|
+
});
|
|
17289
|
+
var releaseAnnouncementGetResultSchema = external_exports.strictObject({
|
|
17290
|
+
announcement: releaseAnnouncementSchema.nullable(),
|
|
17291
|
+
unread: external_exports.boolean()
|
|
17292
|
+
});
|
|
17293
|
+
var releaseAnnouncementAcknowledgeParamsSchema = external_exports.strictObject({
|
|
17294
|
+
version: updateSemanticVersionSchema
|
|
17295
|
+
});
|
|
17296
|
+
|
|
17243
17297
|
// ../../shared-contracts/dist/thread-watch-notice.js
|
|
17244
17298
|
var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
17245
17299
|
"completed",
|
|
@@ -17287,17 +17341,67 @@ var remoteSshSetupResultSchema = external_exports.object({ state: external_expor
|
|
|
17287
17341
|
|
|
17288
17342
|
// ../../shared-contracts/dist/remote-sessions.js
|
|
17289
17343
|
var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
|
|
17290
|
-
var
|
|
17344
|
+
var REMOTE_IDENTITY_MAX_LENGTH = 1024;
|
|
17345
|
+
var identity = external_exports.string().min(1).max(REMOTE_IDENTITY_MAX_LENGTH);
|
|
17291
17346
|
var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
17292
17347
|
var thread = { ...target, threadId: identity };
|
|
17348
|
+
var text2 = external_exports.string().min(1).max(8e3);
|
|
17349
|
+
var input = { text: text2, requestId: identity };
|
|
17350
|
+
var remoteDeliveryReplySchema = external_exports.discriminatedUnion("accepted", [
|
|
17351
|
+
external_exports.object({ accepted: external_exports.literal(true), startQueuedItemId: identity.optional() }),
|
|
17352
|
+
external_exports.object({
|
|
17353
|
+
accepted: external_exports.literal(false),
|
|
17354
|
+
code: external_exports.enum([
|
|
17355
|
+
"remote/queue-unavailable",
|
|
17356
|
+
"remote/steer-unavailable",
|
|
17357
|
+
"remote/turn-changed",
|
|
17358
|
+
"remote/send-rejected",
|
|
17359
|
+
"session/queue-item-not-found",
|
|
17360
|
+
"session/queue-item-starting"
|
|
17361
|
+
]),
|
|
17362
|
+
message: external_exports.string()
|
|
17363
|
+
})
|
|
17364
|
+
]);
|
|
17365
|
+
var remoteQueueSnapshotSchema = external_exports.discriminatedUnion("available", [
|
|
17366
|
+
external_exports.object({ available: external_exports.literal(false) }),
|
|
17367
|
+
external_exports.object({
|
|
17368
|
+
available: external_exports.literal(true),
|
|
17369
|
+
items: external_exports.array(external_exports.object({ id: identity, clientUserMessageId: identity, preview: external_exports.string().max(801) })).max(100)
|
|
17370
|
+
})
|
|
17371
|
+
]);
|
|
17293
17372
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
17294
17373
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
17374
|
+
external_exports.strictObject({
|
|
17375
|
+
kind: external_exports.literal("create"),
|
|
17376
|
+
...target,
|
|
17377
|
+
cwd: external_exports.string().min(1).max(8192),
|
|
17378
|
+
epoch: identity
|
|
17379
|
+
}),
|
|
17380
|
+
external_exports.strictObject({ kind: external_exports.literal("projectHarnesses"), ...target, epoch: identity }),
|
|
17381
|
+
external_exports.strictObject({
|
|
17382
|
+
kind: external_exports.literal("inspectHarness"),
|
|
17383
|
+
...target,
|
|
17384
|
+
epoch: identity,
|
|
17385
|
+
cwd: external_exports.string().min(1).max(8192),
|
|
17386
|
+
harnessId: identity
|
|
17387
|
+
}),
|
|
17388
|
+
external_exports.strictObject({
|
|
17389
|
+
kind: external_exports.literal("startSelected"),
|
|
17390
|
+
...target,
|
|
17391
|
+
epoch: identity,
|
|
17392
|
+
cwd: external_exports.string().min(1).max(8192),
|
|
17393
|
+
harnessId: identity,
|
|
17394
|
+
model: external_exports.string().min(1).max(4096),
|
|
17395
|
+
serviceTier: external_exports.enum(["priority", "ultrafast"]).optional(),
|
|
17396
|
+
reasoningEffort: identity.optional()
|
|
17397
|
+
}),
|
|
17295
17398
|
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
17296
17399
|
external_exports.strictObject({
|
|
17297
17400
|
kind: external_exports.literal("list"),
|
|
17298
17401
|
...target,
|
|
17299
17402
|
cursor: external_exports.string().nullable(),
|
|
17300
|
-
archived: external_exports.boolean()
|
|
17403
|
+
archived: external_exports.boolean(),
|
|
17404
|
+
includeLoaded: external_exports.literal(true).optional()
|
|
17301
17405
|
}),
|
|
17302
17406
|
external_exports.strictObject({
|
|
17303
17407
|
kind: external_exports.literal("read"),
|
|
@@ -17327,9 +17431,25 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
|
17327
17431
|
kind: external_exports.literal("prompt"),
|
|
17328
17432
|
...thread,
|
|
17329
17433
|
epoch: identity,
|
|
17330
|
-
text:
|
|
17434
|
+
text: text2,
|
|
17331
17435
|
requestId: identity.optional()
|
|
17332
17436
|
}),
|
|
17437
|
+
external_exports.strictObject({ kind: external_exports.literal("queue"), ...thread, epoch: identity }),
|
|
17438
|
+
external_exports.strictObject({
|
|
17439
|
+
kind: external_exports.literal("delivery"),
|
|
17440
|
+
...thread,
|
|
17441
|
+
epoch: identity,
|
|
17442
|
+
action: external_exports.discriminatedUnion("kind", [
|
|
17443
|
+
external_exports.strictObject({ kind: external_exports.literal("enqueue"), ...input }),
|
|
17444
|
+
external_exports.strictObject({ kind: external_exports.literal("steer"), ...input, turnId: identity }),
|
|
17445
|
+
external_exports.strictObject({ kind: external_exports.literal("remove"), itemId: identity }),
|
|
17446
|
+
external_exports.strictObject({
|
|
17447
|
+
kind: external_exports.literal("start"),
|
|
17448
|
+
itemId: identity,
|
|
17449
|
+
onlyIfHead: external_exports.literal(true).optional()
|
|
17450
|
+
})
|
|
17451
|
+
])
|
|
17452
|
+
}),
|
|
17333
17453
|
external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
|
|
17334
17454
|
external_exports.strictObject({
|
|
17335
17455
|
kind: external_exports.literal("rename"),
|
|
@@ -17781,9 +17901,9 @@ function subagentConfiguration(value) {
|
|
|
17781
17901
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
17782
17902
|
return {};
|
|
17783
17903
|
const row = value;
|
|
17784
|
-
const
|
|
17785
|
-
const model2 = row.model === "inherit" ? void 0 :
|
|
17786
|
-
const reasoningEffort =
|
|
17904
|
+
const text3 = (value2) => typeof value2 === "string" && value2.trim() ? value2 : void 0;
|
|
17905
|
+
const model2 = row.model === "inherit" ? void 0 : text3(row.model);
|
|
17906
|
+
const reasoningEffort = text3(row.reasoningEffort) ?? text3(row.reasoning_effort) ?? text3(row.thinking);
|
|
17787
17907
|
return { ...model2 ? { model: model2 } : {}, ...reasoningEffort ? { reasoningEffort } : {} };
|
|
17788
17908
|
}
|
|
17789
17909
|
function inheritSubagentConfiguration(child, parent) {
|
|
@@ -20693,9 +20813,9 @@ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader
|
|
|
20693
20813
|
function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
20694
20814
|
return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
20695
20815
|
}
|
|
20696
|
-
function splitLines(
|
|
20697
|
-
const hasTrailingNl =
|
|
20698
|
-
const result =
|
|
20816
|
+
function splitLines(text3) {
|
|
20817
|
+
const hasTrailingNl = text3.endsWith("\n");
|
|
20818
|
+
const result = text3.split("\n").map((line) => line + "\n");
|
|
20699
20819
|
if (hasTrailingNl) {
|
|
20700
20820
|
result.pop();
|
|
20701
20821
|
} else {
|
|
@@ -20750,8 +20870,8 @@ function fileChanges(value) {
|
|
|
20750
20870
|
}
|
|
20751
20871
|
return [];
|
|
20752
20872
|
}
|
|
20753
|
-
function subagent(value,
|
|
20754
|
-
const result = record2(value), data = record2(result.data), args = record2(
|
|
20873
|
+
function subagent(value, input2, fallback) {
|
|
20874
|
+
const result = record2(value), data = record2(result.data), args = record2(input2);
|
|
20755
20875
|
const id2 = text(result.childSessionId) || text(data.childSessionId) || text(result.agentId) || text(data.agentId);
|
|
20756
20876
|
if (!id2)
|
|
20757
20877
|
return;
|
|
@@ -20769,15 +20889,15 @@ function subagent(value, input, fallback) {
|
|
|
20769
20889
|
...text(result.output) ? { resultSummary: text(result.output).slice(0, OUTPUT_LIMIT) } : {}
|
|
20770
20890
|
};
|
|
20771
20891
|
}
|
|
20772
|
-
function makeTool(id2, name,
|
|
20773
|
-
const itemId = hostItemIdSchema.parse(id2), args = record2(
|
|
20892
|
+
function makeTool(id2, name, input2, cwd) {
|
|
20893
|
+
const itemId = hostItemIdSchema.parse(id2), args = record2(input2);
|
|
20774
20894
|
if (name.toLowerCase() === "bash")
|
|
20775
20895
|
return { type: "commandExecution", itemId, command: text(args.command), cwd };
|
|
20776
20896
|
return {
|
|
20777
20897
|
type: "toolExecution",
|
|
20778
20898
|
itemId,
|
|
20779
20899
|
toolName: name,
|
|
20780
|
-
arguments: jsonValueSchema.parse(
|
|
20900
|
+
arguments: jsonValueSchema.parse(input2 ?? {})
|
|
20781
20901
|
};
|
|
20782
20902
|
}
|
|
20783
20903
|
function projectPart(part, cwd) {
|
|
@@ -20810,8 +20930,8 @@ function projectPart(part, cwd) {
|
|
|
20810
20930
|
];
|
|
20811
20931
|
if (part.type !== "tool")
|
|
20812
20932
|
return [];
|
|
20813
|
-
const state = record2(part.state),
|
|
20814
|
-
const item = makeTool(itemId, name,
|
|
20933
|
+
const state = record2(part.state), input2 = state.input ?? {}, name = text(part.tool);
|
|
20934
|
+
const item = makeTool(itemId, name, input2, cwd);
|
|
20815
20935
|
const output = toolOutput(state.output ?? state.error ?? "");
|
|
20816
20936
|
const outcome = state.status === "completed" ? succeeded : state.status === "error" ? {
|
|
20817
20937
|
status: "failed",
|
|
@@ -20841,14 +20961,14 @@ function projectPart(part, cwd) {
|
|
|
20841
20961
|
},
|
|
20842
20962
|
outcome: succeeded
|
|
20843
20963
|
});
|
|
20844
|
-
const child = subagent(record2(state.metadata),
|
|
20964
|
+
const child = subagent(record2(state.metadata), input2, name);
|
|
20845
20965
|
if (child)
|
|
20846
20966
|
snapshots.push({
|
|
20847
20967
|
item: {
|
|
20848
20968
|
type: "subagentDelegation",
|
|
20849
20969
|
itemId: hostItemIdSchema.parse(`${itemId}:agent`),
|
|
20850
20970
|
operation: name === "SendMessage" ? "send" : "spawn",
|
|
20851
|
-
prompt: text(record2(
|
|
20971
|
+
prompt: text(record2(input2).prompt),
|
|
20852
20972
|
subagents: [child]
|
|
20853
20973
|
},
|
|
20854
20974
|
outcome
|
|
@@ -22027,9 +22147,9 @@ var ZcodeAdapter = class {
|
|
|
22027
22147
|
throw error51;
|
|
22028
22148
|
}
|
|
22029
22149
|
}
|
|
22030
|
-
async inspect(
|
|
22031
|
-
const cwd = path7.resolve(
|
|
22032
|
-
const access =
|
|
22150
|
+
async inspect(input2 = {}) {
|
|
22151
|
+
const cwd = path7.resolve(input2.cwd ?? process.cwd());
|
|
22152
|
+
const access = input2.credentialAccess;
|
|
22033
22153
|
return this.#inspect(cwd, access ? { access, requestedAt: performance.now() } : {});
|
|
22034
22154
|
}
|
|
22035
22155
|
async #inspect(cwd, keyOptions) {
|
|
@@ -22102,15 +22222,15 @@ var ZcodeAdapter = class {
|
|
|
22102
22222
|
}
|
|
22103
22223
|
}
|
|
22104
22224
|
}
|
|
22105
|
-
async open(
|
|
22106
|
-
if (
|
|
22225
|
+
async open(input2) {
|
|
22226
|
+
if (input2.kind === "fork" || input2.kind === "rollbackLastTurn")
|
|
22107
22227
|
return failure("unsupported", "ZCode history derivation is not enabled for the ZCode Adapter");
|
|
22108
|
-
const parsedRef =
|
|
22228
|
+
const parsedRef = input2.kind === "resume" ? nativeSessionRefSchema.safeParse(input2.nativeRef) : void 0;
|
|
22109
22229
|
if (parsedRef && !parsedRef.success)
|
|
22110
22230
|
return failure("invalidRequest", "Invalid ZCode Session reference");
|
|
22111
22231
|
const nativeRef = parsedRef?.data;
|
|
22112
22232
|
const locator = record2(nativeRef?.locator);
|
|
22113
|
-
if (nativeRef && (nativeRef.harnessId !== ZCODE_ID || nativeRef.formatVersion !== 1 || locator.backend !== "local-service" || typeof locator.cwd !== "string" || !sameWorkspaceDirectory(locator.cwd,
|
|
22233
|
+
if (nativeRef && (nativeRef.harnessId !== ZCODE_ID || nativeRef.formatVersion !== 1 || locator.backend !== "local-service" || typeof locator.cwd !== "string" || !sameWorkspaceDirectory(locator.cwd, input2.cwd)))
|
|
22114
22234
|
return failure("invalidRequest", "ZCode Session identity or workspace does not match");
|
|
22115
22235
|
const key = nativeRef?.nativeSessionId;
|
|
22116
22236
|
if (key && (this.#opening.has(key) || [...this.#sessions].some((s) => s.sessionId === key)))
|
|
@@ -22120,28 +22240,28 @@ var ZcodeAdapter = class {
|
|
|
22120
22240
|
let transport;
|
|
22121
22241
|
let createdId;
|
|
22122
22242
|
try {
|
|
22123
|
-
const prewarm =
|
|
22124
|
-
transport = await this.#transport(path7.resolve(
|
|
22243
|
+
const prewarm = input2.kind === "create" && input2.prewarm === true;
|
|
22244
|
+
transport = await this.#transport(path7.resolve(input2.cwd), input2.environment, prewarm ? void 0 : { access: "allow" });
|
|
22125
22245
|
const credentialIssue = transport.credentialIssue ?? "ZCode credential access is required";
|
|
22126
22246
|
if (prewarm && transport.credentialAccessRequired)
|
|
22127
22247
|
throw new ZcodeError("credentialAccessRequired", credentialIssue);
|
|
22128
22248
|
let snapshot, settings;
|
|
22129
22249
|
let requestedModel;
|
|
22130
|
-
if (
|
|
22250
|
+
if (input2.kind === "create") {
|
|
22131
22251
|
settings = await readCatalog(transport);
|
|
22132
22252
|
const { catalog, index } = modelCatalog(settings);
|
|
22133
22253
|
if (transport.credentialAccessRequired && !catalog.models.length)
|
|
22134
22254
|
throw new ZcodeError("credentialAccessRequired", credentialIssue);
|
|
22135
|
-
if (
|
|
22255
|
+
if (input2.permissionModeId && !permissionModes().modes.some((m) => m.id === input2.permissionModeId))
|
|
22136
22256
|
throw new ZcodeError("invalidRequest", "Unknown ZCode permission mode");
|
|
22137
|
-
requestedModel =
|
|
22138
|
-
const mode =
|
|
22257
|
+
requestedModel = input2.model ? selectNativeModel(input2.model, index, settings.model.current, input2.thinkingOptionId) : void 0;
|
|
22258
|
+
const mode = input2.executionPolicy === "unattended-full-access" ? "yolo" : input2.permissionModeId;
|
|
22139
22259
|
const created = await transport.command(null, "createSession", {
|
|
22140
|
-
workspaceId:
|
|
22260
|
+
workspaceId: input2.cwd,
|
|
22141
22261
|
config: {
|
|
22142
22262
|
...requestedModel ? { modelSelection: requestedModel } : {},
|
|
22143
22263
|
...mode ? { mode } : {},
|
|
22144
|
-
...
|
|
22264
|
+
...input2.thinkingOptionId ? { thought: input2.thinkingOptionId } : {}
|
|
22145
22265
|
}
|
|
22146
22266
|
});
|
|
22147
22267
|
const result = record2(created.result);
|
|
@@ -22150,21 +22270,21 @@ var ZcodeAdapter = class {
|
|
|
22150
22270
|
createdId = result.sessionId;
|
|
22151
22271
|
snapshot = snapshotSchema.parse(await transport.request("readSession", { sessionId: createdId }));
|
|
22152
22272
|
} else {
|
|
22153
|
-
snapshot = snapshotSchema.parse(await transport.request("resumeSession", { sessionId:
|
|
22154
|
-
if (snapshot.session.sessionId !==
|
|
22273
|
+
snapshot = snapshotSchema.parse(await transport.request("resumeSession", { sessionId: input2.nativeRef.nativeSessionId }));
|
|
22274
|
+
if (snapshot.session.sessionId !== input2.nativeRef.nativeSessionId)
|
|
22155
22275
|
throw new ZcodeError("protocolError", "ZCode resumed a different Session");
|
|
22156
22276
|
settings = snapshot.settings;
|
|
22157
22277
|
}
|
|
22158
|
-
if (!sameWorkspaceDirectory(snapshot.session.workspace.workspacePath,
|
|
22278
|
+
if (!sameWorkspaceDirectory(snapshot.session.workspace.workspacePath, input2.cwd))
|
|
22159
22279
|
throw new ZcodeError("protocolError", "ZCode Session belongs to a different workspace");
|
|
22160
22280
|
if (snapshot.projection.currentTurnId || snapshot.session.status === "running")
|
|
22161
22281
|
throw new ZcodeError("sessionBusy", "ZCode Session is executing native work", true);
|
|
22162
|
-
if (
|
|
22282
|
+
if (input2.kind === "create") {
|
|
22163
22283
|
if (requestedModel && (!snapshot.settings.model.current || !sameNativeModel(snapshot.settings.model.current, requestedModel)))
|
|
22164
22284
|
throw new ZcodeError("nativeFailure", "ZCode did not apply the requested model");
|
|
22165
|
-
if (
|
|
22285
|
+
if (input2.thinkingOptionId && snapshot.settings.thoughtLevel.current !== input2.thinkingOptionId)
|
|
22166
22286
|
throw new ZcodeError("nativeFailure", "ZCode did not apply the requested thinking option");
|
|
22167
|
-
const requestedMode =
|
|
22287
|
+
const requestedMode = input2.executionPolicy === "unattended-full-access" ? "yolo" : input2.permissionModeId;
|
|
22168
22288
|
if (requestedMode && snapshot.settings.mode.current !== requestedMode)
|
|
22169
22289
|
throw new ZcodeError("nativeFailure", "ZCode did not apply the requested permission mode");
|
|
22170
22290
|
}
|