@codexhost/cli-linux-arm64 0.24.0 → 0.25.0

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.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/app/codexhost-distribution.json +1 -1
  3. package/app/console-server.mjs +3166 -3040
  4. package/app/console-web.js +1156 -585
  5. package/app/desktop-controller.mjs +645 -264
  6. package/app/host-runtime.mjs +10906 -10282
  7. package/app/plugins/antigravity/plugin.mjs +515 -369
  8. package/app/plugins/claude-code/plugin.mjs +583 -438
  9. package/app/plugins/codebuddy/plugin.mjs +551 -429
  10. package/app/plugins/codex-usage/plugin.mjs +344 -224
  11. package/app/plugins/copilot/plugin.mjs +408 -286
  12. package/app/plugins/cursor-cli/plugin.mjs +499 -360
  13. package/app/plugins/deepseek-harness/plugin.mjs +759 -520
  14. package/app/plugins/devin/plugin.mjs +385 -265
  15. package/app/plugins/grok/plugin.mjs +638 -516
  16. package/app/plugins/hermes/plugin.mjs +456 -334
  17. package/app/plugins/kimi-code/plugin.mjs +454 -332
  18. package/app/plugins/kiro-cli/plugin.mjs +445 -325
  19. package/app/plugins/omp/plugin.mjs +707 -339
  20. package/app/plugins/opencode/plugin.mjs +873 -741
  21. package/app/plugins/pi/plugin.mjs +481 -359
  22. package/app/plugins/qoder/plugin.mjs +682 -560
  23. package/app/plugins/qoder-cn/plugin.mjs +682 -560
  24. package/app/plugins/qwen-code/plugin.mjs +475 -355
  25. package/app/plugins/workbuddy/plugin.mjs +549 -429
  26. package/app/plugins/zcode/plugin.mjs +352 -232
  27. package/app/renderer-extension.js +1706 -945
  28. package/app/web/assets/{index-IvFk9KT-.js → index-DUOvhHbV.js} +82 -82
  29. package/app/web/codexhost-settings.js +416 -51
  30. package/app/web/index.html +1 -1
  31. package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +64 -64
  32. package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
  33. package/app/web/plugins/deepseek-ai__dsh-api-workspace-controller/client.js +1 -1
  34. package/app/web/plugins/deepseek-ai__dsh-client-shortcuts/client.js +1 -1
  35. package/app/web/plugins/deepseek-ai__dsh-client-ui-brand-official/client.js +1 -1
  36. package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +74 -74
  37. package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +72 -72
  38. package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +97 -97
  39. package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +1 -1
  40. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +2 -2
  41. package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-files/client.js +1 -1
  42. package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
  43. package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +8 -8
  44. package/app/web-modules/server.mjs +2132 -1312
  45. package/bin/codexhost +0 -0
  46. package/libexec/codexhost-shim +0 -0
  47. package/libexec/codexhost-updater +0 -0
  48. package/package.json +1 -1
@@ -714,8 +714,8 @@ function cached(getter) {
714
714
  }
715
715
  };
716
716
  }
717
- function nullish(input) {
718
- return input === null || input === void 0;
717
+ function nullish(input2) {
718
+ return input2 === null || input2 === void 0;
719
719
  }
720
720
  function cleanRegex(source) {
721
721
  const start = source.startsWith("^") ? 1 : 0;
@@ -802,8 +802,8 @@ function randomString(length = 10) {
802
802
  function esc(str) {
803
803
  return JSON.stringify(str);
804
804
  }
805
- function slugify(input) {
806
- return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
805
+ function slugify(input2) {
806
+ return input2.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
807
807
  }
808
808
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
809
809
  };
@@ -1208,19 +1208,19 @@ function finalizeIssue(iss, ctx, config2) {
1208
1208
  }
1209
1209
  return rest;
1210
1210
  }
1211
- function getSizableOrigin(input) {
1212
- if (input instanceof Set)
1211
+ function getSizableOrigin(input2) {
1212
+ if (input2 instanceof Set)
1213
1213
  return "set";
1214
- if (input instanceof Map)
1214
+ if (input2 instanceof Map)
1215
1215
  return "map";
1216
- if (input instanceof File)
1216
+ if (input2 instanceof File)
1217
1217
  return "file";
1218
1218
  return "unknown";
1219
1219
  }
1220
- function getLengthableOrigin(input) {
1221
- if (Array.isArray(input))
1220
+ function getLengthableOrigin(input2) {
1221
+ if (Array.isArray(input2))
1222
1222
  return "array";
1223
- if (typeof input === "string")
1223
+ if (typeof input2 === "string")
1224
1224
  return "string";
1225
1225
  return "unknown";
1226
1226
  }
@@ -1246,12 +1246,12 @@ function parsedType(data) {
1246
1246
  return t;
1247
1247
  }
1248
1248
  function issue(...args) {
1249
- const [iss, input, inst] = args;
1249
+ const [iss, input2, inst] = args;
1250
1250
  if (typeof iss === "string") {
1251
1251
  return {
1252
1252
  message: iss,
1253
1253
  code: "custom",
1254
- input,
1254
+ input: input2,
1255
1255
  inst
1256
1256
  };
1257
1257
  }
@@ -1795,23 +1795,23 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
1795
1795
  bag.pattern = integer;
1796
1796
  });
1797
1797
  inst._zod.check = (payload) => {
1798
- const input = payload.value;
1798
+ const input2 = payload.value;
1799
1799
  if (isInt) {
1800
- if (!Number.isInteger(input)) {
1800
+ if (!Number.isInteger(input2)) {
1801
1801
  payload.issues.push({
1802
1802
  expected: origin,
1803
1803
  format: def.format,
1804
1804
  code: "invalid_type",
1805
1805
  continue: false,
1806
- input,
1806
+ input: input2,
1807
1807
  inst
1808
1808
  });
1809
1809
  return;
1810
1810
  }
1811
- if (!Number.isSafeInteger(input)) {
1812
- if (input > 0) {
1811
+ if (!Number.isSafeInteger(input2)) {
1812
+ if (input2 > 0) {
1813
1813
  payload.issues.push({
1814
- input,
1814
+ input: input2,
1815
1815
  code: "too_big",
1816
1816
  maximum: Number.MAX_SAFE_INTEGER,
1817
1817
  note: "Integers must be within the safe integer range.",
@@ -1822,7 +1822,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
1822
1822
  });
1823
1823
  } else {
1824
1824
  payload.issues.push({
1825
- input,
1825
+ input: input2,
1826
1826
  code: "too_small",
1827
1827
  minimum: Number.MIN_SAFE_INTEGER,
1828
1828
  note: "Integers must be within the safe integer range.",
@@ -1835,10 +1835,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
1835
1835
  return;
1836
1836
  }
1837
1837
  }
1838
- if (input < minimum) {
1838
+ if (input2 < minimum) {
1839
1839
  payload.issues.push({
1840
1840
  origin: "number",
1841
- input,
1841
+ input: input2,
1842
1842
  code: "too_small",
1843
1843
  minimum,
1844
1844
  inclusive: true,
@@ -1846,10 +1846,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
1846
1846
  continue: !def.abort
1847
1847
  });
1848
1848
  }
1849
- if (input > maximum) {
1849
+ if (input2 > maximum) {
1850
1850
  payload.issues.push({
1851
1851
  origin: "number",
1852
- input,
1852
+ input: input2,
1853
1853
  code: "too_big",
1854
1854
  maximum,
1855
1855
  inclusive: true,
@@ -1869,11 +1869,11 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
1869
1869
  bag.maximum = maximum;
1870
1870
  });
1871
1871
  inst._zod.check = (payload) => {
1872
- const input = payload.value;
1873
- if (input < minimum) {
1872
+ const input2 = payload.value;
1873
+ if (input2 < minimum) {
1874
1874
  payload.issues.push({
1875
1875
  origin: "bigint",
1876
- input,
1876
+ input: input2,
1877
1877
  code: "too_small",
1878
1878
  minimum,
1879
1879
  inclusive: true,
@@ -1881,10 +1881,10 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
1881
1881
  continue: !def.abort
1882
1882
  });
1883
1883
  }
1884
- if (input > maximum) {
1884
+ if (input2 > maximum) {
1885
1885
  payload.issues.push({
1886
1886
  origin: "bigint",
1887
- input,
1887
+ input: input2,
1888
1888
  code: "too_big",
1889
1889
  maximum,
1890
1890
  inclusive: true,
@@ -1907,16 +1907,16 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
1907
1907
  inst2._zod.bag.maximum = def.maximum;
1908
1908
  });
1909
1909
  inst._zod.check = (payload) => {
1910
- const input = payload.value;
1911
- const size = input.size;
1910
+ const input2 = payload.value;
1911
+ const size = input2.size;
1912
1912
  if (size <= def.maximum)
1913
1913
  return;
1914
1914
  payload.issues.push({
1915
- origin: getSizableOrigin(input),
1915
+ origin: getSizableOrigin(input2),
1916
1916
  code: "too_big",
1917
1917
  maximum: def.maximum,
1918
1918
  inclusive: true,
1919
- input,
1919
+ input: input2,
1920
1920
  inst,
1921
1921
  continue: !def.abort
1922
1922
  });
@@ -1935,16 +1935,16 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
1935
1935
  inst2._zod.bag.minimum = def.minimum;
1936
1936
  });
1937
1937
  inst._zod.check = (payload) => {
1938
- const input = payload.value;
1939
- const size = input.size;
1938
+ const input2 = payload.value;
1939
+ const size = input2.size;
1940
1940
  if (size >= def.minimum)
1941
1941
  return;
1942
1942
  payload.issues.push({
1943
- origin: getSizableOrigin(input),
1943
+ origin: getSizableOrigin(input2),
1944
1944
  code: "too_small",
1945
1945
  minimum: def.minimum,
1946
1946
  inclusive: true,
1947
- input,
1947
+ input: input2,
1948
1948
  inst,
1949
1949
  continue: !def.abort
1950
1950
  });
@@ -1964,13 +1964,13 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
1964
1964
  bag.size = def.size;
1965
1965
  });
1966
1966
  inst._zod.check = (payload) => {
1967
- const input = payload.value;
1968
- const size = input.size;
1967
+ const input2 = payload.value;
1968
+ const size = input2.size;
1969
1969
  if (size === def.size)
1970
1970
  return;
1971
1971
  const tooBig = size > def.size;
1972
1972
  payload.issues.push({
1973
- origin: getSizableOrigin(input),
1973
+ origin: getSizableOrigin(input2),
1974
1974
  ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
1975
1975
  inclusive: true,
1976
1976
  exact: true,
@@ -1993,17 +1993,17 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
1993
1993
  inst2._zod.bag.maximum = def.maximum;
1994
1994
  });
1995
1995
  inst._zod.check = (payload) => {
1996
- const input = payload.value;
1997
- const length = input.length;
1996
+ const input2 = payload.value;
1997
+ const length = input2.length;
1998
1998
  if (length <= def.maximum)
1999
1999
  return;
2000
- const origin = getLengthableOrigin(input);
2000
+ const origin = getLengthableOrigin(input2);
2001
2001
  payload.issues.push({
2002
2002
  origin,
2003
2003
  code: "too_big",
2004
2004
  maximum: def.maximum,
2005
2005
  inclusive: true,
2006
- input,
2006
+ input: input2,
2007
2007
  inst,
2008
2008
  continue: !def.abort
2009
2009
  });
@@ -2022,17 +2022,17 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
2022
2022
  inst2._zod.bag.minimum = def.minimum;
2023
2023
  });
2024
2024
  inst._zod.check = (payload) => {
2025
- const input = payload.value;
2026
- const length = input.length;
2025
+ const input2 = payload.value;
2026
+ const length = input2.length;
2027
2027
  if (length >= def.minimum)
2028
2028
  return;
2029
- const origin = getLengthableOrigin(input);
2029
+ const origin = getLengthableOrigin(input2);
2030
2030
  payload.issues.push({
2031
2031
  origin,
2032
2032
  code: "too_small",
2033
2033
  minimum: def.minimum,
2034
2034
  inclusive: true,
2035
- input,
2035
+ input: input2,
2036
2036
  inst,
2037
2037
  continue: !def.abort
2038
2038
  });
@@ -2052,11 +2052,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
2052
2052
  bag.length = def.length;
2053
2053
  });
2054
2054
  inst._zod.check = (payload) => {
2055
- const input = payload.value;
2056
- const length = input.length;
2055
+ const input2 = payload.value;
2056
+ const length = input2.length;
2057
2057
  if (length === def.length)
2058
2058
  return;
2059
- const origin = getLengthableOrigin(input);
2059
+ const origin = getLengthableOrigin(input2);
2060
2060
  const tooBig = length > def.length;
2061
2061
  payload.issues.push({
2062
2062
  origin,
@@ -2727,15 +2727,15 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
2727
2727
  payload.value = Number(payload.value);
2728
2728
  } catch (_) {
2729
2729
  }
2730
- const input = payload.value;
2731
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
2730
+ const input2 = payload.value;
2731
+ if (typeof input2 === "number" && !Number.isNaN(input2) && Number.isFinite(input2)) {
2732
2732
  return payload;
2733
2733
  }
2734
- const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
2734
+ const received = typeof input2 === "number" ? Number.isNaN(input2) ? "NaN" : !Number.isFinite(input2) ? "Infinity" : void 0 : void 0;
2735
2735
  payload.issues.push({
2736
2736
  expected: "number",
2737
2737
  code: "invalid_type",
2738
- input,
2738
+ input: input2,
2739
2739
  inst,
2740
2740
  ...received ? { received } : {}
2741
2741
  });
@@ -2755,13 +2755,13 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
2755
2755
  payload.value = Boolean(payload.value);
2756
2756
  } catch (_) {
2757
2757
  }
2758
- const input = payload.value;
2759
- if (typeof input === "boolean")
2758
+ const input2 = payload.value;
2759
+ if (typeof input2 === "boolean")
2760
2760
  return payload;
2761
2761
  payload.issues.push({
2762
2762
  expected: "boolean",
2763
2763
  code: "invalid_type",
2764
- input,
2764
+ input: input2,
2765
2765
  inst
2766
2766
  });
2767
2767
  return payload;
@@ -2794,13 +2794,13 @@ var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, d
2794
2794
  var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
2795
2795
  $ZodType.init(inst, def);
2796
2796
  inst._zod.parse = (payload, _ctx) => {
2797
- const input = payload.value;
2798
- if (typeof input === "symbol")
2797
+ const input2 = payload.value;
2798
+ if (typeof input2 === "symbol")
2799
2799
  return payload;
2800
2800
  payload.issues.push({
2801
2801
  expected: "symbol",
2802
2802
  code: "invalid_type",
2803
- input,
2803
+ input: input2,
2804
2804
  inst
2805
2805
  });
2806
2806
  return payload;
@@ -2811,13 +2811,13 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
2811
2811
  inst._zod.pattern = _undefined;
2812
2812
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
2813
2813
  inst._zod.parse = (payload, _ctx) => {
2814
- const input = payload.value;
2815
- if (typeof input === "undefined")
2814
+ const input2 = payload.value;
2815
+ if (typeof input2 === "undefined")
2816
2816
  return payload;
2817
2817
  payload.issues.push({
2818
2818
  expected: "undefined",
2819
2819
  code: "invalid_type",
2820
- input,
2820
+ input: input2,
2821
2821
  inst
2822
2822
  });
2823
2823
  return payload;
@@ -2828,13 +2828,13 @@ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
2828
2828
  inst._zod.pattern = _null;
2829
2829
  inst._zod.values = /* @__PURE__ */ new Set([null]);
2830
2830
  inst._zod.parse = (payload, _ctx) => {
2831
- const input = payload.value;
2832
- if (input === null)
2831
+ const input2 = payload.value;
2832
+ if (input2 === null)
2833
2833
  return payload;
2834
2834
  payload.issues.push({
2835
2835
  expected: "null",
2836
2836
  code: "invalid_type",
2837
- input,
2837
+ input: input2,
2838
2838
  inst
2839
2839
  });
2840
2840
  return payload;
@@ -2863,13 +2863,13 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2863
2863
  var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
2864
2864
  $ZodType.init(inst, def);
2865
2865
  inst._zod.parse = (payload, _ctx) => {
2866
- const input = payload.value;
2867
- if (typeof input === "undefined")
2866
+ const input2 = payload.value;
2867
+ if (typeof input2 === "undefined")
2868
2868
  return payload;
2869
2869
  payload.issues.push({
2870
2870
  expected: "void",
2871
2871
  code: "invalid_type",
2872
- input,
2872
+ input: input2,
2873
2873
  inst
2874
2874
  });
2875
2875
  return payload;
@@ -2884,15 +2884,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
2884
2884
  } catch (_err) {
2885
2885
  }
2886
2886
  }
2887
- const input = payload.value;
2888
- const isDate = input instanceof Date;
2889
- const isValidDate = isDate && !Number.isNaN(input.getTime());
2887
+ const input2 = payload.value;
2888
+ const isDate = input2 instanceof Date;
2889
+ const isValidDate = isDate && !Number.isNaN(input2.getTime());
2890
2890
  if (isValidDate)
2891
2891
  return payload;
2892
2892
  payload.issues.push({
2893
2893
  expected: "date",
2894
2894
  code: "invalid_type",
2895
- input,
2895
+ input: input2,
2896
2896
  ...isDate ? { received: "Invalid Date" } : {},
2897
2897
  inst
2898
2898
  });
@@ -2908,20 +2908,20 @@ function handleArrayResult(result, final, index) {
2908
2908
  var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
2909
2909
  $ZodType.init(inst, def);
2910
2910
  inst._zod.parse = (payload, ctx) => {
2911
- const input = payload.value;
2912
- if (!Array.isArray(input)) {
2911
+ const input2 = payload.value;
2912
+ if (!Array.isArray(input2)) {
2913
2913
  payload.issues.push({
2914
2914
  expected: "array",
2915
2915
  code: "invalid_type",
2916
- input,
2916
+ input: input2,
2917
2917
  inst
2918
2918
  });
2919
2919
  return payload;
2920
2920
  }
2921
- payload.value = Array(input.length);
2921
+ payload.value = Array(input2.length);
2922
2922
  const proms = [];
2923
- for (let i = 0; i < input.length; i++) {
2924
- const item = input[i];
2923
+ for (let i = 0; i < input2.length; i++) {
2924
+ const item = input2[i];
2925
2925
  const result = def.element._zod.run({
2926
2926
  value: item,
2927
2927
  issues: []
@@ -2938,8 +2938,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
2938
2938
  return payload;
2939
2939
  };
2940
2940
  });
2941
- function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
2942
- const isPresent = key in input;
2941
+ function handlePropertyResult(result, final, key, input2, isOptionalIn, isOptionalOut) {
2942
+ const isPresent = key in input2;
2943
2943
  if (result.issues.length) {
2944
2944
  if (isOptionalIn && isOptionalOut && !isPresent) {
2945
2945
  return;
@@ -2981,14 +2981,14 @@ function normalizeDef(def) {
2981
2981
  optionalKeys: new Set(okeys)
2982
2982
  };
2983
2983
  }
2984
- function handleCatchall(proms, input, payload, ctx, def, inst) {
2984
+ function handleCatchall(proms, input2, payload, ctx, def, inst) {
2985
2985
  const unrecognized = [];
2986
2986
  const keySet = def.keySet;
2987
2987
  const _catchall = def.catchall._zod;
2988
2988
  const t = _catchall.def.type;
2989
2989
  const isOptionalIn = _catchall.optin === "optional";
2990
2990
  const isOptionalOut = _catchall.optout === "optional";
2991
- for (const key in input) {
2991
+ for (const key in input2) {
2992
2992
  if (key === "__proto__")
2993
2993
  continue;
2994
2994
  if (keySet.has(key))
@@ -2997,18 +2997,18 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
2997
2997
  unrecognized.push(key);
2998
2998
  continue;
2999
2999
  }
3000
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
3000
+ const r = _catchall.run({ value: input2[key], issues: [] }, ctx);
3001
3001
  if (r instanceof Promise) {
3002
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3002
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
3003
3003
  } else {
3004
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3004
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
3005
3005
  }
3006
3006
  }
3007
3007
  if (unrecognized.length) {
3008
3008
  payload.issues.push({
3009
3009
  code: "unrecognized_keys",
3010
3010
  keys: unrecognized,
3011
- input,
3011
+ input: input2,
3012
3012
  inst
3013
3013
  });
3014
3014
  }
@@ -3052,12 +3052,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3052
3052
  let value;
3053
3053
  inst._zod.parse = (payload, ctx) => {
3054
3054
  value ?? (value = _normalized.value);
3055
- const input = payload.value;
3056
- if (!isObject2(input)) {
3055
+ const input2 = payload.value;
3056
+ if (!isObject2(input2)) {
3057
3057
  payload.issues.push({
3058
3058
  expected: "object",
3059
3059
  code: "invalid_type",
3060
- input,
3060
+ input: input2,
3061
3061
  inst
3062
3062
  });
3063
3063
  return payload;
@@ -3069,17 +3069,17 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3069
3069
  const el = shape[key];
3070
3070
  const isOptionalIn = el._zod.optin === "optional";
3071
3071
  const isOptionalOut = el._zod.optout === "optional";
3072
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
3072
+ const r = el._zod.run({ value: input2[key], issues: [] }, ctx);
3073
3073
  if (r instanceof Promise) {
3074
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
3074
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
3075
3075
  } else {
3076
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
3076
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
3077
3077
  }
3078
3078
  }
3079
3079
  if (!catchall) {
3080
3080
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
3081
3081
  }
3082
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
3082
+ return handleCatchall(proms, input2, payload, ctx, _normalized.value, inst);
3083
3083
  };
3084
3084
  });
3085
3085
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -3188,12 +3188,12 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3188
3188
  let value;
3189
3189
  inst._zod.parse = (payload, ctx) => {
3190
3190
  value ?? (value = _normalized.value);
3191
- const input = payload.value;
3192
- if (!isObject2(input)) {
3191
+ const input2 = payload.value;
3192
+ if (!isObject2(input2)) {
3193
3193
  payload.issues.push({
3194
3194
  expected: "object",
3195
3195
  code: "invalid_type",
3196
- input,
3196
+ input: input2,
3197
3197
  inst
3198
3198
  });
3199
3199
  return payload;
@@ -3204,7 +3204,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3204
3204
  payload = fastpass(payload, ctx);
3205
3205
  if (!catchall)
3206
3206
  return payload;
3207
- return handleCatchall([], input, payload, ctx, value, inst);
3207
+ return handleCatchall([], input2, payload, ctx, value, inst);
3208
3208
  }
3209
3209
  return superParse(payload, ctx);
3210
3210
  };
@@ -3364,17 +3364,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3364
3364
  return map2;
3365
3365
  });
3366
3366
  inst._zod.parse = (payload, ctx) => {
3367
- const input = payload.value;
3368
- if (!isObject(input)) {
3367
+ const input2 = payload.value;
3368
+ if (!isObject(input2)) {
3369
3369
  payload.issues.push({
3370
3370
  code: "invalid_type",
3371
3371
  expected: "object",
3372
- input,
3372
+ input: input2,
3373
3373
  inst
3374
3374
  });
3375
3375
  return payload;
3376
3376
  }
3377
- const opt = disc.value.get(input?.[def.discriminator]);
3377
+ const opt = disc.value.get(input2?.[def.discriminator]);
3378
3378
  if (opt) {
3379
3379
  return opt._zod.run(payload, ctx);
3380
3380
  }
@@ -3387,7 +3387,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3387
3387
  note: "No matching discriminator",
3388
3388
  discriminator: def.discriminator,
3389
3389
  options: Array.from(disc.value.keys()),
3390
- input,
3390
+ input: input2,
3391
3391
  path: [def.discriminator],
3392
3392
  inst
3393
3393
  });
@@ -3397,9 +3397,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
3397
3397
  var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
3398
3398
  $ZodType.init(inst, def);
3399
3399
  inst._zod.parse = (payload, ctx) => {
3400
- const input = payload.value;
3401
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
3402
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
3400
+ const input2 = payload.value;
3401
+ const left = def.left._zod.run({ value: input2, issues: [] }, ctx);
3402
+ const right = def.right._zod.run({ value: input2, issues: [] }, ctx);
3403
3403
  const async = left instanceof Promise || right instanceof Promise;
3404
3404
  if (async) {
3405
3405
  return Promise.all([left, right]).then(([left2, right2]) => {
@@ -3496,10 +3496,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3496
3496
  $ZodType.init(inst, def);
3497
3497
  const items = def.items;
3498
3498
  inst._zod.parse = (payload, ctx) => {
3499
- const input = payload.value;
3500
- if (!Array.isArray(input)) {
3499
+ const input2 = payload.value;
3500
+ if (!Array.isArray(input2)) {
3501
3501
  payload.issues.push({
3502
- input,
3502
+ input: input2,
3503
3503
  inst,
3504
3504
  expected: "tuple",
3505
3505
  code: "invalid_type"
@@ -3511,23 +3511,23 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3511
3511
  const optinStart = getTupleOptStart(items, "optin");
3512
3512
  const optoutStart = getTupleOptStart(items, "optout");
3513
3513
  if (!def.rest) {
3514
- if (input.length < optinStart) {
3514
+ if (input2.length < optinStart) {
3515
3515
  payload.issues.push({
3516
3516
  code: "too_small",
3517
3517
  minimum: optinStart,
3518
3518
  inclusive: true,
3519
- input,
3519
+ input: input2,
3520
3520
  inst,
3521
3521
  origin: "array"
3522
3522
  });
3523
3523
  return payload;
3524
3524
  }
3525
- if (input.length > items.length) {
3525
+ if (input2.length > items.length) {
3526
3526
  payload.issues.push({
3527
3527
  code: "too_big",
3528
3528
  maximum: items.length,
3529
3529
  inclusive: true,
3530
- input,
3530
+ input: input2,
3531
3531
  inst,
3532
3532
  origin: "array"
3533
3533
  });
@@ -3535,7 +3535,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3535
3535
  }
3536
3536
  const itemResults = new Array(items.length);
3537
3537
  for (let i = 0; i < items.length; i++) {
3538
- const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
3538
+ const r = items[i]._zod.run({ value: input2[i], issues: [] }, ctx);
3539
3539
  if (r instanceof Promise) {
3540
3540
  proms.push(r.then((rr) => {
3541
3541
  itemResults[i] = rr;
@@ -3546,7 +3546,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3546
3546
  }
3547
3547
  if (def.rest) {
3548
3548
  let i = items.length - 1;
3549
- const rest = input.slice(items.length);
3549
+ const rest = input2.slice(items.length);
3550
3550
  for (const el of rest) {
3551
3551
  i++;
3552
3552
  const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
@@ -3558,9 +3558,9 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
3558
3558
  }
3559
3559
  }
3560
3560
  if (proms.length) {
3561
- return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
3561
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input2, optoutStart));
3562
3562
  }
3563
- return handleTupleResults(itemResults, payload, items, input, optoutStart);
3563
+ return handleTupleResults(itemResults, payload, items, input2, optoutStart);
3564
3564
  };
3565
3565
  });
3566
3566
  function getTupleOptStart(items, key) {
@@ -3576,10 +3576,10 @@ function handleTupleResult(result, final, index) {
3576
3576
  }
3577
3577
  final.value[index] = result.value;
3578
3578
  }
3579
- function handleTupleResults(itemResults, final, items, input, optoutStart) {
3579
+ function handleTupleResults(itemResults, final, items, input2, optoutStart) {
3580
3580
  for (let i = 0; i < items.length; i++) {
3581
3581
  const r = itemResults[i];
3582
- const isPresent = i < input.length;
3582
+ const isPresent = i < input2.length;
3583
3583
  if (r.issues.length) {
3584
3584
  if (!isPresent && i >= optoutStart) {
3585
3585
  final.value.length = i;
@@ -3589,7 +3589,7 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
3589
3589
  }
3590
3590
  final.value[i] = r.value;
3591
3591
  }
3592
- for (let i = final.value.length - 1; i >= input.length; i--) {
3592
+ for (let i = final.value.length - 1; i >= input2.length; i--) {
3593
3593
  if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
3594
3594
  final.value.length = i;
3595
3595
  } else {
@@ -3601,12 +3601,12 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
3601
3601
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3602
3602
  $ZodType.init(inst, def);
3603
3603
  inst._zod.parse = (payload, ctx) => {
3604
- const input = payload.value;
3605
- if (!isPlainObject(input)) {
3604
+ const input2 = payload.value;
3605
+ if (!isPlainObject(input2)) {
3606
3606
  payload.issues.push({
3607
3607
  expected: "record",
3608
3608
  code: "invalid_type",
3609
- input,
3609
+ input: input2,
3610
3610
  inst
3611
3611
  });
3612
3612
  return payload;
@@ -3635,7 +3635,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3635
3635
  continue;
3636
3636
  }
3637
3637
  const outKey = keyResult.value;
3638
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3638
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
3639
3639
  if (result instanceof Promise) {
3640
3640
  proms.push(result.then((result2) => {
3641
3641
  if (result2.issues.length) {
@@ -3652,7 +3652,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3652
3652
  }
3653
3653
  }
3654
3654
  let unrecognized;
3655
- for (const key in input) {
3655
+ for (const key in input2) {
3656
3656
  if (!recordKeys.has(key)) {
3657
3657
  unrecognized = unrecognized ?? [];
3658
3658
  unrecognized.push(key);
@@ -3661,17 +3661,17 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3661
3661
  if (unrecognized && unrecognized.length > 0) {
3662
3662
  payload.issues.push({
3663
3663
  code: "unrecognized_keys",
3664
- input,
3664
+ input: input2,
3665
3665
  inst,
3666
3666
  keys: unrecognized
3667
3667
  });
3668
3668
  }
3669
3669
  } else {
3670
3670
  payload.value = {};
3671
- for (const key of Reflect.ownKeys(input)) {
3671
+ for (const key of Reflect.ownKeys(input2)) {
3672
3672
  if (key === "__proto__")
3673
3673
  continue;
3674
- if (!Object.prototype.propertyIsEnumerable.call(input, key))
3674
+ if (!Object.prototype.propertyIsEnumerable.call(input2, key))
3675
3675
  continue;
3676
3676
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3677
3677
  if (keyResult instanceof Promise) {
@@ -3689,7 +3689,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3689
3689
  }
3690
3690
  if (keyResult.issues.length) {
3691
3691
  if (def.mode === "loose") {
3692
- payload.value[key] = input[key];
3692
+ payload.value[key] = input2[key];
3693
3693
  } else {
3694
3694
  payload.issues.push({
3695
3695
  code: "invalid_key",
@@ -3702,7 +3702,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3702
3702
  }
3703
3703
  continue;
3704
3704
  }
3705
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3705
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
3706
3706
  if (result instanceof Promise) {
3707
3707
  proms.push(result.then((result2) => {
3708
3708
  if (result2.issues.length) {
@@ -3727,27 +3727,27 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3727
3727
  var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
3728
3728
  $ZodType.init(inst, def);
3729
3729
  inst._zod.parse = (payload, ctx) => {
3730
- const input = payload.value;
3731
- if (!(input instanceof Map)) {
3730
+ const input2 = payload.value;
3731
+ if (!(input2 instanceof Map)) {
3732
3732
  payload.issues.push({
3733
3733
  expected: "map",
3734
3734
  code: "invalid_type",
3735
- input,
3735
+ input: input2,
3736
3736
  inst
3737
3737
  });
3738
3738
  return payload;
3739
3739
  }
3740
3740
  const proms = [];
3741
3741
  payload.value = /* @__PURE__ */ new Map();
3742
- for (const [key, value] of input) {
3742
+ for (const [key, value] of input2) {
3743
3743
  const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3744
3744
  const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
3745
3745
  if (keyResult instanceof Promise || valueResult instanceof Promise) {
3746
3746
  proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
3747
- handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx);
3747
+ handleMapResult(keyResult2, valueResult2, payload, key, input2, inst, ctx);
3748
3748
  }));
3749
3749
  } else {
3750
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
3750
+ handleMapResult(keyResult, valueResult, payload, key, input2, inst, ctx);
3751
3751
  }
3752
3752
  }
3753
3753
  if (proms.length)
@@ -3755,7 +3755,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
3755
3755
  return payload;
3756
3756
  };
3757
3757
  });
3758
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
3758
+ function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
3759
3759
  if (keyResult.issues.length) {
3760
3760
  if (propertyKeyTypes.has(typeof key)) {
3761
3761
  final.issues.push(...prefixIssues(key, keyResult.issues));
@@ -3763,7 +3763,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
3763
3763
  final.issues.push({
3764
3764
  code: "invalid_key",
3765
3765
  origin: "map",
3766
- input,
3766
+ input: input2,
3767
3767
  inst,
3768
3768
  issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
3769
3769
  });
@@ -3776,7 +3776,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
3776
3776
  final.issues.push({
3777
3777
  origin: "map",
3778
3778
  code: "invalid_element",
3779
- input,
3779
+ input: input2,
3780
3780
  inst,
3781
3781
  key,
3782
3782
  issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
@@ -3788,10 +3788,10 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
3788
3788
  var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
3789
3789
  $ZodType.init(inst, def);
3790
3790
  inst._zod.parse = (payload, ctx) => {
3791
- const input = payload.value;
3792
- if (!(input instanceof Set)) {
3791
+ const input2 = payload.value;
3792
+ if (!(input2 instanceof Set)) {
3793
3793
  payload.issues.push({
3794
- input,
3794
+ input: input2,
3795
3795
  inst,
3796
3796
  expected: "set",
3797
3797
  code: "invalid_type"
@@ -3800,7 +3800,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
3800
3800
  }
3801
3801
  const proms = [];
3802
3802
  payload.value = /* @__PURE__ */ new Set();
3803
- for (const item of input) {
3803
+ for (const item of input2) {
3804
3804
  const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
3805
3805
  if (result instanceof Promise) {
3806
3806
  proms.push(result.then((result2) => handleSetResult(result2, payload)));
@@ -3825,14 +3825,14 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
3825
3825
  inst._zod.values = valuesSet;
3826
3826
  inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
3827
3827
  inst._zod.parse = (payload, _ctx) => {
3828
- const input = payload.value;
3829
- if (valuesSet.has(input)) {
3828
+ const input2 = payload.value;
3829
+ if (valuesSet.has(input2)) {
3830
3830
  return payload;
3831
3831
  }
3832
3832
  payload.issues.push({
3833
3833
  code: "invalid_value",
3834
3834
  values,
3835
- input,
3835
+ input: input2,
3836
3836
  inst
3837
3837
  });
3838
3838
  return payload;
@@ -3847,14 +3847,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
3847
3847
  inst._zod.values = values;
3848
3848
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
3849
3849
  inst._zod.parse = (payload, _ctx) => {
3850
- const input = payload.value;
3851
- if (values.has(input)) {
3850
+ const input2 = payload.value;
3851
+ if (values.has(input2)) {
3852
3852
  return payload;
3853
3853
  }
3854
3854
  payload.issues.push({
3855
3855
  code: "invalid_value",
3856
3856
  values: def.values,
3857
- input,
3857
+ input: input2,
3858
3858
  inst
3859
3859
  });
3860
3860
  return payload;
@@ -3863,13 +3863,13 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
3863
3863
  var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
3864
3864
  $ZodType.init(inst, def);
3865
3865
  inst._zod.parse = (payload, _ctx) => {
3866
- const input = payload.value;
3867
- if (input instanceof File)
3866
+ const input2 = payload.value;
3867
+ if (input2 instanceof File)
3868
3868
  return payload;
3869
3869
  payload.issues.push({
3870
3870
  expected: "file",
3871
3871
  code: "invalid_type",
3872
- input,
3872
+ input: input2,
3873
3873
  inst
3874
3874
  });
3875
3875
  return payload;
@@ -3899,8 +3899,8 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
3899
3899
  return payload;
3900
3900
  };
3901
3901
  });
3902
- function handleOptionalResult(result, input) {
3903
- if (input === void 0 && (result.issues.length || result.fallback)) {
3902
+ function handleOptionalResult(result, input2) {
3903
+ if (input2 === void 0 && (result.issues.length || result.fallback)) {
3904
3904
  return { issues: [], value: void 0 };
3905
3905
  }
3906
3906
  return result;
@@ -3918,11 +3918,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
3918
3918
  });
3919
3919
  inst._zod.parse = (payload, ctx) => {
3920
3920
  if (def.innerType._zod.optin === "optional") {
3921
- const input = payload.value;
3921
+ const input2 = payload.value;
3922
3922
  const result = def.innerType._zod.run(payload, ctx);
3923
3923
  if (result instanceof Promise)
3924
- return result.then((r) => handleOptionalResult(r, input));
3925
- return handleOptionalResult(result, input);
3924
+ return result.then((r) => handleOptionalResult(r, input2));
3925
+ return handleOptionalResult(result, input2);
3926
3926
  }
3927
3927
  if (payload.value === void 0) {
3928
3928
  return payload;
@@ -4347,20 +4347,20 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
4347
4347
  return payload;
4348
4348
  };
4349
4349
  inst._zod.check = (payload) => {
4350
- const input = payload.value;
4351
- const r = def.fn(input);
4350
+ const input2 = payload.value;
4351
+ const r = def.fn(input2);
4352
4352
  if (r instanceof Promise) {
4353
- return r.then((r2) => handleRefineResult(r2, payload, input, inst));
4353
+ return r.then((r2) => handleRefineResult(r2, payload, input2, inst));
4354
4354
  }
4355
- handleRefineResult(r, payload, input, inst);
4355
+ handleRefineResult(r, payload, input2, inst);
4356
4356
  return;
4357
4357
  };
4358
4358
  });
4359
- function handleRefineResult(result, payload, input, inst) {
4359
+ function handleRefineResult(result, payload, input2, inst) {
4360
4360
  if (!result) {
4361
4361
  const _iss = {
4362
4362
  code: "custom",
4363
- input,
4363
+ input: input2,
4364
4364
  inst,
4365
4365
  // incorporates params.error into issue reporting
4366
4366
  path: [...inst._zod.def.path ?? []],
@@ -7647,8 +7647,8 @@ function ko_default() {
7647
7647
  }
7648
7648
 
7649
7649
  // ../../../node_modules/zod/v4/locales/lt.js
7650
- var capitalizeFirstCharacter = (text) => {
7651
- return text.charAt(0).toUpperCase() + text.slice(1);
7650
+ var capitalizeFirstCharacter = (text2) => {
7651
+ return text2.charAt(0).toUpperCase() + text2.slice(1);
7652
7652
  };
7653
7653
  function getUnitTypeFromNumber(number4) {
7654
7654
  const abs = Math.abs(number4);
@@ -11048,23 +11048,23 @@ function _overwrite(tx) {
11048
11048
  }
11049
11049
  // @__NO_SIDE_EFFECTS__
11050
11050
  function _normalize(form) {
11051
- return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
11051
+ return /* @__PURE__ */ _overwrite((input2) => input2.normalize(form));
11052
11052
  }
11053
11053
  // @__NO_SIDE_EFFECTS__
11054
11054
  function _trim() {
11055
- return /* @__PURE__ */ _overwrite((input) => input.trim());
11055
+ return /* @__PURE__ */ _overwrite((input2) => input2.trim());
11056
11056
  }
11057
11057
  // @__NO_SIDE_EFFECTS__
11058
11058
  function _toLowerCase() {
11059
- return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
11059
+ return /* @__PURE__ */ _overwrite((input2) => input2.toLowerCase());
11060
11060
  }
11061
11061
  // @__NO_SIDE_EFFECTS__
11062
11062
  function _toUpperCase() {
11063
- return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
11063
+ return /* @__PURE__ */ _overwrite((input2) => input2.toUpperCase());
11064
11064
  }
11065
11065
  // @__NO_SIDE_EFFECTS__
11066
11066
  function _slugify() {
11067
- return /* @__PURE__ */ _overwrite((input) => slugify(input));
11067
+ return /* @__PURE__ */ _overwrite((input2) => slugify(input2));
11068
11068
  }
11069
11069
  // @__NO_SIDE_EFFECTS__
11070
11070
  function _array(Class2, element, params) {
@@ -11369,8 +11369,8 @@ function _stringbool(Classes, _params) {
11369
11369
  type: "pipe",
11370
11370
  in: stringSchema,
11371
11371
  out: booleanSchema,
11372
- transform: ((input, payload) => {
11373
- let data = input;
11372
+ transform: ((input2, payload) => {
11373
+ let data = input2;
11374
11374
  if (params.case !== "sensitive")
11375
11375
  data = data.toLowerCase();
11376
11376
  if (truthySet.has(data)) {
@@ -11389,8 +11389,8 @@ function _stringbool(Classes, _params) {
11389
11389
  return {};
11390
11390
  }
11391
11391
  }),
11392
- reverseTransform: ((input, _payload) => {
11393
- if (input === true) {
11392
+ reverseTransform: ((input2, _payload) => {
11393
+ if (input2 === true) {
11394
11394
  return truthyArray[0] || "true";
11395
11395
  } else {
11396
11396
  return falsyArray[0] || "false";
@@ -12286,9 +12286,9 @@ var allProcessors = {
12286
12286
  optional: optionalProcessor,
12287
12287
  lazy: lazyProcessor
12288
12288
  };
12289
- function toJSONSchema(input, params) {
12290
- if ("_idmap" in input) {
12291
- const registry2 = input;
12289
+ function toJSONSchema(input2, params) {
12290
+ if ("_idmap" in input2) {
12291
+ const registry2 = input2;
12292
12292
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
12293
12293
  const defs = {};
12294
12294
  for (const entry of registry2._idmap.entries()) {
@@ -12316,9 +12316,9 @@ function toJSONSchema(input, params) {
12316
12316
  return { schemas };
12317
12317
  }
12318
12318
  const ctx = initializeContext({ ...params, processors: allProcessors });
12319
- process2(input, ctx);
12320
- extractDefs(ctx, input);
12321
- return finalize(ctx, input);
12319
+ process2(input2, ctx);
12320
+ extractDefs(ctx, input2);
12321
+ return finalize(ctx, input2);
12322
12322
  }
12323
12323
 
12324
12324
  // ../../../node_modules/zod/v4/core/json-schema-generator.js
@@ -14595,7 +14595,7 @@ var codexhostErrorSchema = external_exports.strictObject({
14595
14595
 
14596
14596
  // ../../shared-contracts/dist/harness-presentation.js
14597
14597
  var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
14598
- var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
14598
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text2) => text2.trim().length > 0);
14599
14599
  var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
14600
14600
  label: displayText(256).optional(),
14601
14601
  description: displayText(1024).optional()
@@ -14684,7 +14684,7 @@ var usageMeasurementsSchema = external_exports.object({
14684
14684
  outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
14685
14685
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
14686
14686
  }).strict();
14687
- var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
14687
+ var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
14688
14688
  var composerIndicatorsSchema = external_exports.array(external_exports.object({
14689
14689
  kind: external_exports.literal("countdown"),
14690
14690
  id: external_exports.string().min(1).max(64),
@@ -15067,6 +15067,8 @@ var externalThreadInspectionSchema = external_exports.object({
15067
15067
  effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
15068
15068
  availableThinkingOptions: harnessThinkingOptionsSchema.optional(),
15069
15069
  effectivePermissionModeId: harnessPermissionModeIdSchema.optional(),
15070
+ /** Live Session catalog when it, not the Adapter inspection, contains `effectiveModel`. */
15071
+ catalog: harnessModelCatalogSchema.optional(),
15070
15072
  history: harnessHistoryCapabilitiesSchema,
15071
15073
  usage: threadUsageSnapshotSchema.optional(),
15072
15074
  locked: external_exports.literal(true)
@@ -15125,9 +15127,9 @@ var threadSteeringInspectParamsSchema = external_exports.object({
15125
15127
  }).strict();
15126
15128
  var threadSteeringContextSchema = external_exports.object({
15127
15129
  kind: external_exports.literal("application"),
15128
- value: external_exports.string().transform((text, context) => {
15130
+ value: external_exports.string().transform((text2, context) => {
15129
15131
  try {
15130
- return JSON.parse(text);
15132
+ return JSON.parse(text2);
15131
15133
  } catch {
15132
15134
  context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
15133
15135
  return external_exports.NEVER;
@@ -15262,8 +15264,8 @@ var desktopExtensionHttpUrlSchema = external_exports.string().trim().max(2048).r
15262
15264
  const { username, password } = new URL(value);
15263
15265
  return !username && !password && !/[\\\s]/u.test(value);
15264
15266
  }, "URL must not contain credentials, backslashes, or whitespace");
15265
- function localizedText(text) {
15266
- return external_exports.strictObject({ en: text, "zh-CN": text });
15267
+ function localizedText(text2) {
15268
+ return external_exports.strictObject({ en: text2, "zh-CN": text2 });
15267
15269
  }
15268
15270
  var desktopExtensionLocalizedTextSchema = localizedText(external_exports.string().trim().min(1));
15269
15271
  var categoriesSchema = external_exports.array(desktopExtensionCategorySchema).max(desktopExtensionCategorySchema.options.length).refine((categories) => new Set(categories).size === categories.length, "Duplicate categories");
@@ -15380,8 +15382,8 @@ var desktopExtensionTrustTierSchema = external_exports.enum(["official", "commun
15380
15382
  function isGitHubDesktopExtensionZipballUrl(url2) {
15381
15383
  return url2.origin === "https://api.github.com" && /^\/repos\/[\w-]+\/[\w.-]+\/zipball(?:\/[^/]+)?\/?$/u.test(url2.pathname);
15382
15384
  }
15383
- var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input) => {
15384
- const url2 = new URL(input);
15385
+ var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input2) => {
15386
+ const url2 = new URL(input2);
15385
15387
  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);
15386
15388
  }, "Expected a .zip download URL or a GitHub zipball URL");
15387
15389
  var desktopExtensionCatalogEntrySchema = external_exports.strictObject({
@@ -15732,6 +15734,8 @@ var CLIENT_CHANNEL_METHODS = [
15732
15734
  "codexhost/workspace/read",
15733
15735
  "codexhost/thread/tree/read",
15734
15736
  "codexhost/thread/pins/list",
15737
+ "codexhost/thread/sections/list",
15738
+ "codexhost/thread/sections/move",
15735
15739
  "codexhost/thread/pins/set",
15736
15740
  "codexhost/harness/plugins/list",
15737
15741
  "codexhost/harness/inspect",
@@ -15770,8 +15774,21 @@ var CLIENT_CHANNEL_METHODS = [
15770
15774
  "codexhost/update/check",
15771
15775
  "codexhost/update/start",
15772
15776
  "codexhost/update/status",
15777
+ "codexhost/announcement/get",
15778
+ "codexhost/announcement/acknowledge",
15773
15779
  "codexhost/sessions/loaded/list"
15774
15780
  ];
15781
+ var clientThreadSectionsSchema = external_exports.object({
15782
+ sections: external_exports.array(external_exports.object({
15783
+ id: external_exports.string().min(1),
15784
+ name: external_exports.string().min(1),
15785
+ threads: external_exports.array(jsonObjectSchema)
15786
+ }).strict())
15787
+ }).strict();
15788
+ var clientThreadSectionMoveSchema = external_exports.object({
15789
+ threadId: external_exports.string().min(1).max(1024),
15790
+ sectionId: external_exports.string().min(1).max(1024).nullable()
15791
+ }).strict();
15775
15792
  var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
15776
15793
  var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
15777
15794
  var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
@@ -16313,8 +16330,8 @@ var harnessPreferencePatchSchema = external_exports.strictObject({
16313
16330
  operations: external_exports.array(harnessPreferenceOperationSchema).min(1).max(256),
16314
16331
  initializeOnly: external_exports.boolean().optional(),
16315
16332
  expectedRevision: external_exports.number().int().nonnegative().optional()
16316
- }).superRefine((input, ctx) => {
16317
- for (const operation of input.operations) {
16333
+ }).superRefine((input2, ctx) => {
16334
+ for (const operation of input2.operations) {
16318
16335
  if (operation.kind === "newThread" && (!operation.lastHarness && !operation.configuration || Boolean(operation.harnessId) !== Boolean(operation.configuration)))
16319
16336
  ctx.addIssue({
16320
16337
  code: "custom",
@@ -16716,13 +16733,18 @@ var harnessLaunchSettingsSchema = external_exports.object({
16716
16733
  // ../../shared-contracts/dist/harness-installation.js
16717
16734
  var harnessInstallationParamsSchema = external_exports.object({
16718
16735
  harnessId: harnessIdSchema,
16719
- action: external_exports.enum(["check", "update", "install"])
16720
- }).strict();
16736
+ action: external_exports.enum(["check", "update", "install"]),
16737
+ confirmedVersion: external_exports.string().min(1).max(128).optional()
16738
+ }).strict().refine(({ action, confirmedVersion }) => action === "update" || confirmedVersion === void 0);
16721
16739
  var harnessInstallationStateSchema = external_exports.object({
16722
16740
  currentVersion: external_exports.string().min(1).max(128),
16723
16741
  latestVersion: external_exports.string().min(1).max(128),
16724
16742
  updateAvailable: external_exports.boolean(),
16725
16743
  canUpdate: external_exports.boolean(),
16744
+ /** Present when the Adapter has a verified list and the available target is outside it. */
16745
+ latestVerifiedVersion: external_exports.string().min(1).max(128).optional(),
16746
+ /** Update preflight stopped before running the installer; latestVersion needs confirmation. */
16747
+ confirmationRequired: external_exports.literal(true).optional(),
16726
16748
  /** Defaults to CLI; some Harnesses ship only inside a desktop application. */
16727
16749
  versionKind: external_exports.enum(["cli", "application"]).optional(),
16728
16750
  /** Official download opened by the user; does not imply an automatic installation. */
@@ -17052,6 +17074,38 @@ var updateStatusResultSchema = external_exports.strictObject({
17052
17074
  status: updateStatusSchema.nullable()
17053
17075
  });
17054
17076
 
17077
+ // ../../shared-contracts/dist/release-announcement.js
17078
+ var RELEASE_ANNOUNCEMENT_MAX_THEMES = 12;
17079
+ var releaseAnnouncementThemeSchema = external_exports.strictObject({
17080
+ icon: external_exports.string().min(1).max(16).optional(),
17081
+ title: external_exports.string().min(1).max(120),
17082
+ body: external_exports.string().min(1).max(1200),
17083
+ contributors: external_exports.array(external_exports.string().min(1).max(39)).max(30)
17084
+ });
17085
+ var releaseAnnouncementContentSchema = external_exports.strictObject({
17086
+ summary: external_exports.string().min(1).max(600).optional(),
17087
+ themes: external_exports.array(releaseAnnouncementThemeSchema).min(1).max(RELEASE_ANNOUNCEMENT_MAX_THEMES)
17088
+ });
17089
+ var releaseAnnouncementSchema = external_exports.strictObject({
17090
+ version: updateSemanticVersionSchema,
17091
+ publishedAt: external_exports.iso.datetime(),
17092
+ url: external_exports.string().max(300).regex(/^https:\/\/github\.com\/BytePioneer-AI\/codex-host\/releases\/tag\/v[0-9A-Za-z.+-]+$/u),
17093
+ zh: releaseAnnouncementContentSchema.nullable(),
17094
+ en: releaseAnnouncementContentSchema.nullable()
17095
+ }).refine((value) => value.zh !== null || value.en !== null, {
17096
+ message: "an announcement needs at least one language"
17097
+ });
17098
+ var releaseAnnouncementGetParamsSchema = external_exports.strictObject({
17099
+ manual: external_exports.boolean().optional()
17100
+ });
17101
+ var releaseAnnouncementGetResultSchema = external_exports.strictObject({
17102
+ announcement: releaseAnnouncementSchema.nullable(),
17103
+ unread: external_exports.boolean()
17104
+ });
17105
+ var releaseAnnouncementAcknowledgeParamsSchema = external_exports.strictObject({
17106
+ version: updateSemanticVersionSchema
17107
+ });
17108
+
17055
17109
  // ../../shared-contracts/dist/thread-watch-notice.js
17056
17110
  var THREAD_WATCH_NOTICE_OUTCOMES = [
17057
17111
  "completed",
@@ -17099,17 +17153,67 @@ var remoteSshSetupResultSchema = external_exports.object({ state: external_expor
17099
17153
 
17100
17154
  // ../../shared-contracts/dist/remote-sessions.js
17101
17155
  var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
17102
- var identity = external_exports.string().min(1).max(1024);
17156
+ var REMOTE_IDENTITY_MAX_LENGTH = 1024;
17157
+ var identity = external_exports.string().min(1).max(REMOTE_IDENTITY_MAX_LENGTH);
17103
17158
  var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
17104
17159
  var thread = { ...target, threadId: identity };
17160
+ var text = external_exports.string().min(1).max(8e3);
17161
+ var input = { text, requestId: identity };
17162
+ var remoteDeliveryReplySchema = external_exports.discriminatedUnion("accepted", [
17163
+ external_exports.object({ accepted: external_exports.literal(true), startQueuedItemId: identity.optional() }),
17164
+ external_exports.object({
17165
+ accepted: external_exports.literal(false),
17166
+ code: external_exports.enum([
17167
+ "remote/queue-unavailable",
17168
+ "remote/steer-unavailable",
17169
+ "remote/turn-changed",
17170
+ "remote/send-rejected",
17171
+ "session/queue-item-not-found",
17172
+ "session/queue-item-starting"
17173
+ ]),
17174
+ message: external_exports.string()
17175
+ })
17176
+ ]);
17177
+ var remoteQueueSnapshotSchema = external_exports.discriminatedUnion("available", [
17178
+ external_exports.object({ available: external_exports.literal(false) }),
17179
+ external_exports.object({
17180
+ available: external_exports.literal(true),
17181
+ items: external_exports.array(external_exports.object({ id: identity, clientUserMessageId: identity, preview: external_exports.string().max(801) })).max(100)
17182
+ })
17183
+ ]);
17105
17184
  var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
17106
17185
  external_exports.strictObject({ kind: external_exports.literal("hosts") }),
17186
+ external_exports.strictObject({
17187
+ kind: external_exports.literal("create"),
17188
+ ...target,
17189
+ cwd: external_exports.string().min(1).max(8192),
17190
+ epoch: identity
17191
+ }),
17192
+ external_exports.strictObject({ kind: external_exports.literal("projectHarnesses"), ...target, epoch: identity }),
17193
+ external_exports.strictObject({
17194
+ kind: external_exports.literal("inspectHarness"),
17195
+ ...target,
17196
+ epoch: identity,
17197
+ cwd: external_exports.string().min(1).max(8192),
17198
+ harnessId: identity
17199
+ }),
17200
+ external_exports.strictObject({
17201
+ kind: external_exports.literal("startSelected"),
17202
+ ...target,
17203
+ epoch: identity,
17204
+ cwd: external_exports.string().min(1).max(8192),
17205
+ harnessId: identity,
17206
+ model: external_exports.string().min(1).max(4096),
17207
+ serviceTier: external_exports.enum(["priority", "ultrafast"]).optional(),
17208
+ reasoningEffort: identity.optional()
17209
+ }),
17107
17210
  external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
17108
17211
  external_exports.strictObject({
17109
17212
  kind: external_exports.literal("list"),
17110
17213
  ...target,
17111
17214
  cursor: external_exports.string().nullable(),
17112
- archived: external_exports.boolean()
17215
+ archived: external_exports.boolean(),
17216
+ includeLoaded: external_exports.literal(true).optional()
17113
17217
  }),
17114
17218
  external_exports.strictObject({
17115
17219
  kind: external_exports.literal("read"),
@@ -17139,9 +17243,25 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
17139
17243
  kind: external_exports.literal("prompt"),
17140
17244
  ...thread,
17141
17245
  epoch: identity,
17142
- text: external_exports.string().min(1).max(8e3),
17246
+ text,
17143
17247
  requestId: identity.optional()
17144
17248
  }),
17249
+ external_exports.strictObject({ kind: external_exports.literal("queue"), ...thread, epoch: identity }),
17250
+ external_exports.strictObject({
17251
+ kind: external_exports.literal("delivery"),
17252
+ ...thread,
17253
+ epoch: identity,
17254
+ action: external_exports.discriminatedUnion("kind", [
17255
+ external_exports.strictObject({ kind: external_exports.literal("enqueue"), ...input }),
17256
+ external_exports.strictObject({ kind: external_exports.literal("steer"), ...input, turnId: identity }),
17257
+ external_exports.strictObject({ kind: external_exports.literal("remove"), itemId: identity }),
17258
+ external_exports.strictObject({
17259
+ kind: external_exports.literal("start"),
17260
+ itemId: identity,
17261
+ onlyIfHead: external_exports.literal(true).optional()
17262
+ })
17263
+ ])
17264
+ }),
17145
17265
  external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
17146
17266
  external_exports.strictObject({
17147
17267
  kind: external_exports.literal("rename"),
@@ -20238,7 +20358,7 @@ var LineBuffer = class {
20238
20358
  };
20239
20359
 
20240
20360
  // ../../../node_modules/@agentclientprotocol/sdk/dist/stream.js
20241
- function ndJsonStream(output, input) {
20361
+ function ndJsonStream(output, input2) {
20242
20362
  const textEncoder = new TextEncoder();
20243
20363
  const textDecoder = new TextDecoder();
20244
20364
  let cancelled = false;
@@ -20261,7 +20381,7 @@ function ndJsonStream(output, input) {
20261
20381
  }
20262
20382
  }
20263
20383
  };
20264
- const reader = input.getReader();
20384
+ const reader = input2.getReader();
20265
20385
  inputReader = reader;
20266
20386
  try {
20267
20387
  while (true) {
@@ -20344,8 +20464,8 @@ var zGuardCreateElicitationResponseCancel = object({
20344
20464
  });
20345
20465
 
20346
20466
  // ../../../node_modules/@agentclientprotocol/sdk/dist/acp.js
20347
- function ndJsonStream2(output, input) {
20348
- return ndJsonStream(output, input);
20467
+ function ndJsonStream2(output, input2) {
20468
+ return ndJsonStream(output, input2);
20349
20469
  }
20350
20470
  function emptyObjectResponse(response) {
20351
20471
  return response ?? {};
@@ -21840,8 +21960,8 @@ var VERSION_MANAGER_ROOTS = "<version-managers>";
21840
21960
  function installRootExtensions(platform) {
21841
21961
  return platform === "win32" ? [".exe", ".cmd"] : [""];
21842
21962
  }
21843
- function resolveHomeDirectory(input) {
21844
- return input.homeDirectory ?? environmentValue(input.environment, "HOME") ?? environmentValue(input.environment, "USERPROFILE") ?? os.homedir();
21963
+ function resolveHomeDirectory(input2) {
21964
+ return input2.homeDirectory ?? environmentValue(input2.environment, "HOME") ?? environmentValue(input2.environment, "USERPROFILE") ?? os.homedir();
21845
21965
  }
21846
21966
  function templateVariables(environment, platform, home) {
21847
21967
  const pathFlavor = targetPath(platform);
@@ -21874,36 +21994,36 @@ function expandInstallRoot(template, environment, platform, home) {
21874
21994
  });
21875
21995
  return unresolved ? void 0 : joinTemplate(platform, substituted);
21876
21996
  }
21877
- function installRootDirectories(spec, input, dependencies, platform, home) {
21997
+ function installRootDirectories(spec, input2, dependencies, platform, home) {
21878
21998
  const templates = (platform === "win32" ? spec.installRoots?.windows : spec.installRoots?.posix) ?? [];
21879
21999
  const directories = [];
21880
22000
  for (const template of templates) {
21881
22001
  if (template === VERSION_MANAGER_ROOTS) {
21882
22002
  directories.push(...versionManagerBinaryDirectories({
21883
22003
  platform,
21884
- environment: input.environment,
22004
+ environment: input2.environment,
21885
22005
  home,
21886
22006
  ...dependencies.subdirectories ? { subdirectories: dependencies.subdirectories } : {}
21887
22007
  }));
21888
22008
  continue;
21889
22009
  }
21890
- const directory = expandInstallRoot(template, input.environment, platform, home);
22010
+ const directory = expandInstallRoot(template, input2.environment, platform, home);
21891
22011
  if (directory !== void 0)
21892
22012
  directories.push(directory);
21893
22013
  }
21894
22014
  return directories;
21895
22015
  }
21896
- function harnessCandidates(spec, input, dependencies = {}) {
21897
- const platform = input.platform ?? process.platform;
22016
+ function harnessCandidates(spec, input2, dependencies = {}) {
22017
+ const platform = input2.platform ?? process.platform;
21898
22018
  const pathFlavor = targetPath(platform);
21899
- const configured = input.command ?? (spec.commandEnvironmentVariable ? environmentValue(input.environment, spec.commandEnvironmentVariable) : void 0);
22019
+ const configured = input2.command ?? (spec.commandEnvironmentVariable ? environmentValue(input2.environment, spec.commandEnvironmentVariable) : void 0);
21900
22020
  const command = configured ?? spec.command;
21901
22021
  if (pathFlavor.isAbsolute(command) || command.includes("/") || command.includes("\\")) {
21902
22022
  return [{ candidate: command, source: "configured" }];
21903
22023
  }
21904
22024
  const candidates = [];
21905
- const extensions = executableExtensions(command, platform, input.environment);
21906
- for (const directory of pathDirectories(input.environment, platform)) {
22025
+ const extensions = executableExtensions(command, platform, input2.environment);
22026
+ for (const directory of pathDirectories(input2.environment, platform)) {
21907
22027
  for (const extension of extensions) {
21908
22028
  candidates.push({
21909
22029
  candidate: pathFlavor.join(directory, command + extension),
@@ -21913,8 +22033,8 @@ function harnessCandidates(spec, input, dependencies = {}) {
21913
22033
  }
21914
22034
  if (configured !== void 0)
21915
22035
  return candidates;
21916
- const home = resolveHomeDirectory(input);
21917
- for (const directory of installRootDirectories(spec, input, dependencies, platform, home)) {
22036
+ const home = resolveHomeDirectory(input2);
22037
+ for (const directory of installRootDirectories(spec, input2, dependencies, platform, home)) {
21918
22038
  for (const extension of installRootExtensions(platform)) {
21919
22039
  candidates.push({
21920
22040
  candidate: pathFlavor.join(directory, spec.command + extension),
@@ -21924,12 +22044,12 @@ function harnessCandidates(spec, input, dependencies = {}) {
21924
22044
  }
21925
22045
  return candidates;
21926
22046
  }
21927
- function resolveHarnessExecutable(spec, input, dependencies = {}) {
21928
- const platform = input.platform ?? process.platform;
22047
+ function resolveHarnessExecutable(spec, input2, dependencies = {}) {
22048
+ const platform = input2.platform ?? process.platform;
21929
22049
  const isExecutable = dependencies.isExecutable ?? ((candidate) => isExecutableFile(candidate, platform));
21930
22050
  const runnable = spec.runnableCandidate ?? ((candidate) => candidate);
21931
22051
  const context = { platform, isExecutable };
21932
- for (const { candidate, source } of harnessCandidates(spec, input, dependencies)) {
22052
+ for (const { candidate, source } of harnessCandidates(spec, input2, dependencies)) {
21933
22053
  const executable = runnable(candidate, context);
21934
22054
  if (executable !== void 0 && isExecutable(executable))
21935
22055
  return { executable, source };
@@ -23084,13 +23204,13 @@ var DevinTransport = class {
23084
23204
  throw new Error("Devin session is not open");
23085
23205
  return this.#bounded(this.#connection.setSessionConfigOption({ sessionId: this.sessionId, configId, value }));
23086
23206
  }
23087
- async prompt(text, callbacks) {
23207
+ async prompt(text2, callbacks) {
23088
23208
  if (!this.#connection || this.#closed || this.#callbacks)
23089
23209
  throw new Error("Devin session is closed or busy");
23090
23210
  this.#callbacks = callbacks;
23091
23211
  try {
23092
23212
  return await Promise.race([
23093
- this.#connection.prompt({ sessionId: this.sessionId, prompt: [{ type: "text", text }] }),
23213
+ this.#connection.prompt({ sessionId: this.sessionId, prompt: [{ type: "text", text: text2 }] }),
23094
23214
  this.#failed
23095
23215
  ]);
23096
23216
  } finally {
@@ -23194,9 +23314,9 @@ function projectCandidate(row) {
23194
23314
  running: rowIsLocked(row)
23195
23315
  };
23196
23316
  }
23197
- async function listDevinSessionCandidates(input) {
23317
+ async function listDevinSessionCandidates(input2) {
23198
23318
  const candidates = [];
23199
- for (const row of await listDevinSessions(input.connection)) {
23319
+ for (const row of await listDevinSessions(input2.connection)) {
23200
23320
  if (typeof row.sessionId !== "string" || row.sessionId.length === 0)
23201
23321
  continue;
23202
23322
  const candidate = projectCandidate(row);
@@ -23205,8 +23325,8 @@ async function listDevinSessionCandidates(input) {
23205
23325
  }
23206
23326
  return candidates;
23207
23327
  }
23208
- async function resolveDevinSessionCandidate(input) {
23209
- const row = (await listDevinSessions(input.connection)).find(({ sessionId }) => sessionId === input.nativeSessionId);
23328
+ async function resolveDevinSessionCandidate(input2) {
23329
+ const row = (await listDevinSessions(input2.connection)).find(({ sessionId }) => sessionId === input2.nativeSessionId);
23210
23330
  if (!row)
23211
23331
  return null;
23212
23332
  const candidate = projectCandidate(row);
@@ -23619,9 +23739,9 @@ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader
23619
23739
  } }));
23620
23740
  }
23621
23741
  }
23622
- function splitLines(text) {
23623
- const hasTrailingNl = text.endsWith("\n");
23624
- const result = text.split("\n").map((line) => line + "\n");
23742
+ function splitLines(text2) {
23743
+ const hasTrailingNl = text2.endsWith("\n");
23744
+ const result = text2.split("\n").map((line) => line + "\n");
23625
23745
  if (hasTrailingNl) {
23626
23746
  result.pop();
23627
23747
  } else {
@@ -23732,11 +23852,11 @@ var DevinTurnOutput = class {
23732
23852
  const { item } = tool;
23733
23853
  if (update.content != null) {
23734
23854
  tool.changes = devinFileChanges(update.content);
23735
- const text = update.content.flatMap((content) => content.type === "content" && content.content.type === "text" ? [content.content.text] : content.type === "diff" ? [`${content.path}
23855
+ const text2 = update.content.flatMap((content) => content.type === "content" && content.content.type === "text" ? [content.content.text] : content.type === "diff" ? [`${content.path}
23736
23856
  ${content.newText}`] : []).join("\n");
23737
23857
  item.output = {
23738
- content: [{ type: "text", text: text.slice(0, TOOL_OUTPUT_LIMIT) }],
23739
- truncated: text.length > TOOL_OUTPUT_LIMIT
23858
+ content: [{ type: "text", text: text2.slice(0, TOOL_OUTPUT_LIMIT) }],
23859
+ truncated: text2.length > TOOL_OUTPUT_LIMIT
23740
23860
  };
23741
23861
  this.emit({
23742
23862
  type: "item.updated",
@@ -23809,12 +23929,12 @@ function devinSnapshot(sessionId, replay) {
23809
23929
  const key = devinReplayTurnKey(notification);
23810
23930
  if (!key)
23811
23931
  throw new Error("Devin replay user message has no stable native identity");
23812
- const text = notification.update.content.type === "text" ? notification.update.content.text : "";
23932
+ const text2 = notification.update.content.type === "text" ? notification.update.content.text : "";
23813
23933
  const last = groups.at(-1);
23814
23934
  if (last && last.key === key)
23815
- last.text += text;
23935
+ last.text += text2;
23816
23936
  else
23817
- groups.push({ key, text, events: [] });
23937
+ groups.push({ key, text: text2, events: [] });
23818
23938
  } else
23819
23939
  groups.at(-1)?.events.push(notification);
23820
23940
  }
@@ -24001,17 +24121,17 @@ function comparable(snapshot) {
24001
24121
  return { ...turn, nativeTurnKey: nativeTurnRef.nativeTurnKey };
24002
24122
  });
24003
24123
  }
24004
- async function deriveDevinHistory(input, source, options) {
24124
+ async function deriveDevinHistory(input2, source, options) {
24005
24125
  if (!source.nativeHistory)
24006
24126
  throw new DevinHistoryError("unsupported", "Devin did not negotiate the native revert extension");
24007
- const cwd = path4.resolve(input.cwd);
24127
+ const cwd = path4.resolve(input2.cwd);
24008
24128
  if (path4.resolve(source.options.cwd) !== cwd)
24009
24129
  throw new DevinHistoryError("unsupported", "Devin cross-cwd history derivation is not supported");
24010
24130
  await source.verifyCwd(cwd);
24011
24131
  const before = await readHistory(source);
24012
24132
  let count2;
24013
- if (input.kind === "fork") {
24014
- const index = before.snapshot.turns.findIndex((turn) => turn.checkpoint?.checkpointId === input.checkpoint.checkpointId);
24133
+ if (input2.kind === "fork") {
24134
+ const index = before.snapshot.turns.findIndex((turn) => turn.checkpoint?.checkpointId === input2.checkpoint.checkpointId);
24015
24135
  if (index < 0)
24016
24136
  throw new DevinHistoryError("checkpointNotFound", "Devin checkpoint is not on the source history");
24017
24137
  count2 = index + 1;
@@ -24101,16 +24221,16 @@ var DevinAdapter = class {
24101
24221
  ...this.options.timeoutMs ? { timeoutMs: this.options.timeoutMs } : {}
24102
24222
  };
24103
24223
  }
24104
- async inspect(input = {}) {
24224
+ async inspect(input2 = {}) {
24105
24225
  if (this.#closed)
24106
24226
  return {
24107
24227
  status: "unavailable",
24108
24228
  error: { code: "unavailable", message: "Devin adapter is closed", retryable: false }
24109
24229
  };
24110
- const cwd = path5.resolve(input.cwd ?? process.cwd());
24111
- const key = input.purpose === "availability" ? JSON.stringify([cwd, input.purpose]) : cwd;
24230
+ const cwd = path5.resolve(input2.cwd ?? process.cwd());
24231
+ const key = input2.purpose === "availability" ? JSON.stringify([cwd, input2.purpose]) : cwd;
24112
24232
  const cached2 = this.#inspections.get(key);
24113
- if (input.refresh) {
24233
+ if (input2.refresh) {
24114
24234
  this.#inspections.clear();
24115
24235
  if (cached2 && this.#inspectionTasks.has(cached2))
24116
24236
  this.#inspections.set(key, cached2);
@@ -24119,7 +24239,7 @@ var DevinAdapter = class {
24119
24239
  if (current)
24120
24240
  return current;
24121
24241
  const result = (async () => {
24122
- if (input.purpose === "availability") {
24242
+ if (input2.purpose === "availability") {
24123
24243
  try {
24124
24244
  return await this.#withProbeConnection(async (transport2) => {
24125
24245
  await transport2.listSessions();
@@ -24169,48 +24289,48 @@ var DevinAdapter = class {
24169
24289
  void result.finally(() => this.#inspectionTasks.delete(result));
24170
24290
  return result;
24171
24291
  }
24172
- async open(input) {
24292
+ async open(input2) {
24173
24293
  if (this.#closed)
24174
24294
  return rejected("invalidState", "Devin adapter is closed");
24175
- if (input.kind === "resume" && input.nativeRef.harnessId !== this.harnessId)
24295
+ if (input2.kind === "resume" && input2.nativeRef.harnessId !== this.harnessId)
24176
24296
  return rejected("invalidRequest", "Session belongs to another Harness");
24177
- if (input.kind === "create" && input.executionPolicy === "unattended-full-access" && input.permissionModeId !== void 0 && input.permissionModeId !== "bypass")
24297
+ if (input2.kind === "create" && input2.executionPolicy === "unattended-full-access" && input2.permissionModeId !== void 0 && input2.permissionModeId !== "bypass")
24178
24298
  return rejected("invalidRequest", "unattended-full-access requires Devin bypass mode");
24179
- const options = this.transportOptions(input.cwd, input.environment);
24299
+ const options = this.transportOptions(input2.cwd, input2.environment);
24180
24300
  let transport;
24181
24301
  let session;
24182
24302
  try {
24183
24303
  let info;
24184
- if (input.kind === "fork" || input.kind === "rollbackLastTurn") {
24185
- ({ transport, info } = await this.#derive(input));
24304
+ if (input2.kind === "fork" || input2.kind === "rollbackLastTurn") {
24305
+ ({ transport, info } = await this.#derive(input2));
24186
24306
  } else {
24187
24307
  transport = new DevinTransport(options);
24188
- info = await transport.open(input.kind === "resume" ? input.nativeRef.nativeSessionId : void 0);
24308
+ info = await transport.open(input2.kind === "resume" ? input2.nativeRef.nativeSessionId : void 0);
24189
24309
  }
24190
- if (input.kind === "resume") {
24310
+ if (input2.kind === "resume") {
24191
24311
  const sessionId = transport.sessionId;
24192
24312
  const known = new Set(devinSnapshot(transport.sessionId, transport.replay).turns.map((turn) => turn.nativeTurnRef.nativeTurnKey));
24193
- if (input.knownTurnRefs?.some((ref) => ref.harnessId !== this.harnessId || ref.nativeSessionId !== sessionId || !known.has(ref.nativeTurnKey)))
24313
+ if (input2.knownTurnRefs?.some((ref) => ref.harnessId !== this.harnessId || ref.nativeSessionId !== sessionId || !known.has(ref.nativeTurnKey)))
24194
24314
  throw new Error("Saved Devin turn identity no longer exists in native history");
24195
24315
  }
24196
24316
  const openedSession = new DevinSession(transport, info, () => {
24197
24317
  this.#sessions.delete(openedSession);
24198
- }, input.kind === "create");
24318
+ }, input2.kind === "create");
24199
24319
  session = openedSession;
24200
- if ("model" in input && input.model) {
24201
- const selected = await session.execute({ type: "model.select", model: input.model });
24320
+ if ("model" in input2 && input2.model) {
24321
+ const selected = await session.execute({ type: "model.select", model: input2.model });
24202
24322
  if (!selected.ok)
24203
24323
  throw new DevinHistoryError(selected.error.code, selected.error.message);
24204
24324
  }
24205
- if ("thinkingOptionId" in input && input.thinkingOptionId) {
24325
+ if ("thinkingOptionId" in input2 && input2.thinkingOptionId) {
24206
24326
  const selected = await session.execute({
24207
24327
  type: "thinking.select",
24208
- thinkingOptionId: input.thinkingOptionId
24328
+ thinkingOptionId: input2.thinkingOptionId
24209
24329
  });
24210
24330
  if (!selected.ok)
24211
24331
  throw new DevinHistoryError(selected.error.code, selected.error.message);
24212
24332
  }
24213
- const permissionModeId = ("permissionModeId" in input ? input.permissionModeId : void 0) ?? (input.kind === "create" && input.executionPolicy === "unattended-full-access" ? harnessPermissionModeIdSchema.parse("bypass") : void 0);
24333
+ const permissionModeId = ("permissionModeId" in input2 ? input2.permissionModeId : void 0) ?? (input2.kind === "create" && input2.executionPolicy === "unattended-full-access" ? harnessPermissionModeIdSchema.parse("bypass") : void 0);
24214
24334
  if (permissionModeId) {
24215
24335
  const selected = await session.execute({
24216
24336
  type: "permissionMode.select",
@@ -24219,9 +24339,9 @@ var DevinAdapter = class {
24219
24339
  if (!selected.ok)
24220
24340
  throw new DevinHistoryError(selected.error.code, selected.error.message);
24221
24341
  }
24222
- if (input.kind === "rollbackLastTurn") {
24342
+ if (input2.kind === "rollbackLastTurn") {
24223
24343
  const state = session.initialState;
24224
- if (input.model && !isDeepStrictEqual2(state.effectiveModel, input.model) || input.thinkingOptionId && state.effectiveThinkingOptionId !== input.thinkingOptionId || input.permissionModeId && state.effectivePermissionModeId !== input.permissionModeId)
24344
+ if (input2.model && !isDeepStrictEqual2(state.effectiveModel, input2.model) || input2.thinkingOptionId && state.effectiveThinkingOptionId !== input2.thinkingOptionId || input2.permissionModeId && state.effectivePermissionModeId !== input2.permissionModeId)
24225
24345
  throw new Error("Devin rollback did not preserve the requested configuration");
24226
24346
  }
24227
24347
  if (this.#closed)
@@ -24238,27 +24358,27 @@ var DevinAdapter = class {
24238
24358
  } catch {
24239
24359
  failure.message += "; session resource cleanup failed";
24240
24360
  }
24241
- if ((input.kind === "fork" || input.kind === "rollbackLastTurn") && transport?.sessionId)
24361
+ if ((input2.kind === "fork" || input2.kind === "rollbackLastTurn") && transport?.sessionId)
24242
24362
  failure.message += `; native child ${transport.sessionId} may remain on disk (safe deletion unavailable)`;
24243
24363
  failure.message = sanitizeDiagnosticTail(failure.message);
24244
24364
  return { ok: false, error: failure };
24245
24365
  }
24246
24366
  }
24247
- async #derive(input) {
24248
- if (input.sourceRef.harnessId !== this.harnessId)
24367
+ async #derive(input2) {
24368
+ if (input2.sourceRef.harnessId !== this.harnessId)
24249
24369
  throw new DevinHistoryError("invalidRequest", "Session belongs to another Harness");
24250
- if (input.kind === "fork" && (input.checkpoint.harnessId !== this.harnessId || input.checkpoint.nativeSessionId !== input.sourceRef.nativeSessionId))
24370
+ if (input2.kind === "fork" && (input2.checkpoint.harnessId !== this.harnessId || input2.checkpoint.nativeSessionId !== input2.sourceRef.nativeSessionId))
24251
24371
  throw new DevinHistoryError("checkpointNotFound", "Checkpoint does not belong to the source Session");
24252
- const options = this.transportOptions(input.cwd, input.environment);
24253
- const live = [...this.#sessions].find((session) => session.transport.sessionId === input.sourceRef.nativeSessionId);
24372
+ const options = this.transportOptions(input2.cwd, input2.environment);
24373
+ const live = [...this.#sessions].find((session) => session.transport.sessionId === input2.sourceRef.nativeSessionId);
24254
24374
  if (live)
24255
- return live.withHistory(() => deriveDevinHistory(input, live.transport, options));
24375
+ return live.withHistory(() => deriveDevinHistory(input2, live.transport, options));
24256
24376
  const source = new DevinTransport(options);
24257
24377
  let derived;
24258
24378
  let derivationError;
24259
24379
  try {
24260
- await source.open(input.sourceRef.nativeSessionId, true);
24261
- derived = await deriveDevinHistory(input, source, options);
24380
+ await source.open(input2.sourceRef.nativeSessionId, true);
24381
+ derived = await deriveDevinHistory(input2, source, options);
24262
24382
  return derived;
24263
24383
  } catch (error51) {
24264
24384
  derivationError = error51;