@codexhost/cli-darwin-x64 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.
Files changed (52) 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.app/Contents/Info.plist +30 -0
  47. package/libexec/CodexHost.app/Contents/MacOS/CodexHost +0 -0
  48. package/libexec/CodexHost.app/Contents/PkgInfo +1 -0
  49. package/libexec/CodexHost.app/Contents/Resources/AppIcon.icns +0 -0
  50. package/libexec/codexhost-shim +0 -0
  51. package/libexec/codexhost-updater +0 -0
  52. package/package.json +1 -1
@@ -3112,27 +3112,27 @@ var require_utils = __commonJS({
3112
3112
  var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3113
3113
  var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3114
3114
  var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
3115
- function stringArrayToHexStripped(input) {
3115
+ function stringArrayToHexStripped(input2) {
3116
3116
  let acc = "";
3117
3117
  let code = 0;
3118
3118
  let i = 0;
3119
- for (i = 0; i < input.length; i++) {
3120
- code = input[i].charCodeAt(0);
3119
+ for (i = 0; i < input2.length; i++) {
3120
+ code = input2[i].charCodeAt(0);
3121
3121
  if (code === 48) {
3122
3122
  continue;
3123
3123
  }
3124
3124
  if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3125
3125
  return "";
3126
3126
  }
3127
- acc += input[i];
3127
+ acc += input2[i];
3128
3128
  break;
3129
3129
  }
3130
- for (i += 1; i < input.length; i++) {
3131
- code = input[i].charCodeAt(0);
3130
+ for (i += 1; i < input2.length; i++) {
3131
+ code = input2[i].charCodeAt(0);
3132
3132
  if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3133
3133
  return "";
3134
3134
  }
3135
- acc += input[i];
3135
+ acc += input2[i];
3136
3136
  }
3137
3137
  return acc;
3138
3138
  }
@@ -3154,7 +3154,7 @@ var require_utils = __commonJS({
3154
3154
  }
3155
3155
  return true;
3156
3156
  }
3157
- function getIPV6(input) {
3157
+ function getIPV6(input2) {
3158
3158
  let tokenCount2 = 0;
3159
3159
  const output = { error: false, address: "", zone: "" };
3160
3160
  const address = [];
@@ -3162,8 +3162,8 @@ var require_utils = __commonJS({
3162
3162
  let endipv6Encountered = false;
3163
3163
  let endIpv6 = false;
3164
3164
  let consume = consumeHextets;
3165
- for (let i = 0; i < input.length; i++) {
3166
- const cursor = input[i];
3165
+ for (let i = 0; i < input2.length; i++) {
3166
+ const cursor = input2[i];
3167
3167
  if (cursor === "[" || cursor === "]") {
3168
3168
  continue;
3169
3169
  }
@@ -3178,7 +3178,7 @@ var require_utils = __commonJS({
3178
3178
  output.error = true;
3179
3179
  break;
3180
3180
  }
3181
- if (i > 0 && input[i - 1] === ":") {
3181
+ if (i > 0 && input2[i - 1] === ":") {
3182
3182
  endipv6Encountered = true;
3183
3183
  }
3184
3184
  address.push(":");
@@ -3230,37 +3230,37 @@ var require_utils = __commonJS({
3230
3230
  return ind;
3231
3231
  }
3232
3232
  function removeDotSegments(path10) {
3233
- let input = path10;
3233
+ let input2 = path10;
3234
3234
  const output = [];
3235
3235
  let nextSlash = -1;
3236
3236
  let len = 0;
3237
- while (len = input.length) {
3237
+ while (len = input2.length) {
3238
3238
  if (len === 1) {
3239
- if (input === ".") {
3239
+ if (input2 === ".") {
3240
3240
  break;
3241
- } else if (input === "/") {
3241
+ } else if (input2 === "/") {
3242
3242
  output.push("/");
3243
3243
  break;
3244
3244
  } else {
3245
- output.push(input);
3245
+ output.push(input2);
3246
3246
  break;
3247
3247
  }
3248
3248
  } else if (len === 2) {
3249
- if (input[0] === ".") {
3250
- if (input[1] === ".") {
3249
+ if (input2[0] === ".") {
3250
+ if (input2[1] === ".") {
3251
3251
  break;
3252
- } else if (input[1] === "/") {
3253
- input = input.slice(2);
3252
+ } else if (input2[1] === "/") {
3253
+ input2 = input2.slice(2);
3254
3254
  continue;
3255
3255
  }
3256
- } else if (input[0] === "/") {
3257
- if (input[1] === "." || input[1] === "/") {
3256
+ } else if (input2[0] === "/") {
3257
+ if (input2[1] === "." || input2[1] === "/") {
3258
3258
  output.push("/");
3259
3259
  break;
3260
3260
  }
3261
3261
  }
3262
3262
  } else if (len === 3) {
3263
- if (input === "/..") {
3263
+ if (input2 === "/..") {
3264
3264
  if (output.length !== 0) {
3265
3265
  output.pop();
3266
3266
  }
@@ -3268,24 +3268,24 @@ var require_utils = __commonJS({
3268
3268
  break;
3269
3269
  }
3270
3270
  }
3271
- if (input[0] === ".") {
3272
- if (input[1] === ".") {
3273
- if (input[2] === "/") {
3274
- input = input.slice(3);
3271
+ if (input2[0] === ".") {
3272
+ if (input2[1] === ".") {
3273
+ if (input2[2] === "/") {
3274
+ input2 = input2.slice(3);
3275
3275
  continue;
3276
3276
  }
3277
- } else if (input[1] === "/") {
3278
- input = input.slice(2);
3277
+ } else if (input2[1] === "/") {
3278
+ input2 = input2.slice(2);
3279
3279
  continue;
3280
3280
  }
3281
- } else if (input[0] === "/") {
3282
- if (input[1] === ".") {
3283
- if (input[2] === "/") {
3284
- input = input.slice(2);
3281
+ } else if (input2[0] === "/") {
3282
+ if (input2[1] === ".") {
3283
+ if (input2[2] === "/") {
3284
+ input2 = input2.slice(2);
3285
3285
  continue;
3286
- } else if (input[2] === ".") {
3287
- if (input[3] === "/") {
3288
- input = input.slice(3);
3286
+ } else if (input2[2] === ".") {
3287
+ if (input2[3] === "/") {
3288
+ input2 = input2.slice(3);
3289
3289
  if (output.length !== 0) {
3290
3290
  output.pop();
3291
3291
  }
@@ -3294,12 +3294,12 @@ var require_utils = __commonJS({
3294
3294
  }
3295
3295
  }
3296
3296
  }
3297
- if ((nextSlash = input.indexOf("/", 1)) === -1) {
3298
- output.push(input);
3297
+ if ((nextSlash = input2.indexOf("/", 1)) === -1) {
3298
+ output.push(input2);
3299
3299
  break;
3300
3300
  } else {
3301
- output.push(input.slice(0, nextSlash));
3302
- input = input.slice(nextSlash);
3301
+ output.push(input2.slice(0, nextSlash));
3302
+ input2 = input2.slice(nextSlash);
3303
3303
  }
3304
3304
  }
3305
3305
  return output.join("");
@@ -3312,14 +3312,14 @@ var require_utils = __commonJS({
3312
3312
  re.lastIndex = 0;
3313
3313
  return host.replace(re, (ch) => HOST_DELIMS[ch]);
3314
3314
  }
3315
- function normalizePercentEncoding(input, decodeUnreserved = false) {
3316
- if (input.indexOf("%") === -1) {
3317
- return input;
3315
+ function normalizePercentEncoding(input2, decodeUnreserved = false) {
3316
+ if (input2.indexOf("%") === -1) {
3317
+ return input2;
3318
3318
  }
3319
3319
  let output = "";
3320
- for (let i = 0; i < input.length; i++) {
3321
- if (input[i] === "%" && i + 2 < input.length) {
3322
- const hex3 = input.slice(i + 1, i + 3);
3320
+ for (let i = 0; i < input2.length; i++) {
3321
+ if (input2[i] === "%" && i + 2 < input2.length) {
3322
+ const hex3 = input2.slice(i + 1, i + 3);
3323
3323
  if (isHexPair(hex3)) {
3324
3324
  const normalizedHex = hex3.toUpperCase();
3325
3325
  const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
@@ -3332,15 +3332,15 @@ var require_utils = __commonJS({
3332
3332
  continue;
3333
3333
  }
3334
3334
  }
3335
- output += input[i];
3335
+ output += input2[i];
3336
3336
  }
3337
3337
  return output;
3338
3338
  }
3339
- function normalizePathEncoding(input) {
3339
+ function normalizePathEncoding(input2) {
3340
3340
  let output = "";
3341
- for (let i = 0; i < input.length; i++) {
3342
- if (input[i] === "%" && i + 2 < input.length) {
3343
- const hex3 = input.slice(i + 1, i + 3);
3341
+ for (let i = 0; i < input2.length; i++) {
3342
+ if (input2[i] === "%" && i + 2 < input2.length) {
3343
+ const hex3 = input2.slice(i + 1, i + 3);
3344
3344
  if (isHexPair(hex3)) {
3345
3345
  const normalizedHex = hex3.toUpperCase();
3346
3346
  const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
@@ -3353,26 +3353,26 @@ var require_utils = __commonJS({
3353
3353
  continue;
3354
3354
  }
3355
3355
  }
3356
- if (isPathCharacter(input[i])) {
3357
- output += input[i];
3356
+ if (isPathCharacter(input2[i])) {
3357
+ output += input2[i];
3358
3358
  } else {
3359
- output += escape(input[i]);
3359
+ output += escape(input2[i]);
3360
3360
  }
3361
3361
  }
3362
3362
  return output;
3363
3363
  }
3364
- function escapePreservingEscapes(input) {
3364
+ function escapePreservingEscapes(input2) {
3365
3365
  let output = "";
3366
- for (let i = 0; i < input.length; i++) {
3367
- if (input[i] === "%" && i + 2 < input.length) {
3368
- const hex3 = input.slice(i + 1, i + 3);
3366
+ for (let i = 0; i < input2.length; i++) {
3367
+ if (input2[i] === "%" && i + 2 < input2.length) {
3368
+ const hex3 = input2.slice(i + 1, i + 3);
3369
3369
  if (isHexPair(hex3)) {
3370
3370
  output += "%" + hex3.toUpperCase();
3371
3371
  i += 2;
3372
3372
  continue;
3373
3373
  }
3374
3374
  }
3375
- output += escape(input[i]);
3375
+ output += escape(input2[i]);
3376
3376
  }
3377
3377
  return output;
3378
3378
  }
@@ -4321,7 +4321,7 @@ var require_core = __commonJS({
4321
4321
  errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
4322
4322
  if (!errors || errors.length === 0)
4323
4323
  return "No errors";
4324
- return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
4324
+ return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text2, msg) => text2 + separator + msg);
4325
4325
  }
4326
4326
  $dataMetaSchema(metaSchema, keywordsJsonPointers) {
4327
4327
  const rules = this.RULES.all;
@@ -10219,7 +10219,7 @@ var require_core3 = __commonJS({
10219
10219
  errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
10220
10220
  if (!errors || errors.length === 0)
10221
10221
  return "No errors";
10222
- return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
10222
+ return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text2, msg) => text2 + separator + msg);
10223
10223
  }
10224
10224
  $dataMetaSchema(metaSchema, keywordsJsonPointers) {
10225
10225
  const rules = this.RULES.all;
@@ -13299,8 +13299,8 @@ function cached(getter) {
13299
13299
  }
13300
13300
  };
13301
13301
  }
13302
- function nullish(input) {
13303
- return input === null || input === void 0;
13302
+ function nullish(input2) {
13303
+ return input2 === null || input2 === void 0;
13304
13304
  }
13305
13305
  function cleanRegex(source) {
13306
13306
  const start = source.startsWith("^") ? 1 : 0;
@@ -13387,8 +13387,8 @@ function randomString(length = 10) {
13387
13387
  function esc(str) {
13388
13388
  return JSON.stringify(str);
13389
13389
  }
13390
- function slugify(input) {
13391
- return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
13390
+ function slugify(input2) {
13391
+ return input2.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
13392
13392
  }
13393
13393
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
13394
13394
  };
@@ -13793,19 +13793,19 @@ function finalizeIssue(iss, ctx, config2) {
13793
13793
  }
13794
13794
  return rest;
13795
13795
  }
13796
- function getSizableOrigin(input) {
13797
- if (input instanceof Set)
13796
+ function getSizableOrigin(input2) {
13797
+ if (input2 instanceof Set)
13798
13798
  return "set";
13799
- if (input instanceof Map)
13799
+ if (input2 instanceof Map)
13800
13800
  return "map";
13801
- if (input instanceof File)
13801
+ if (input2 instanceof File)
13802
13802
  return "file";
13803
13803
  return "unknown";
13804
13804
  }
13805
- function getLengthableOrigin(input) {
13806
- if (Array.isArray(input))
13805
+ function getLengthableOrigin(input2) {
13806
+ if (Array.isArray(input2))
13807
13807
  return "array";
13808
- if (typeof input === "string")
13808
+ if (typeof input2 === "string")
13809
13809
  return "string";
13810
13810
  return "unknown";
13811
13811
  }
@@ -13831,12 +13831,12 @@ function parsedType(data) {
13831
13831
  return t9;
13832
13832
  }
13833
13833
  function issue(...args) {
13834
- const [iss, input, inst] = args;
13834
+ const [iss, input2, inst] = args;
13835
13835
  if (typeof iss === "string") {
13836
13836
  return {
13837
13837
  message: iss,
13838
13838
  code: "custom",
13839
- input,
13839
+ input: input2,
13840
13840
  inst
13841
13841
  };
13842
13842
  }
@@ -14380,23 +14380,23 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14380
14380
  bag.pattern = integer;
14381
14381
  });
14382
14382
  inst._zod.check = (payload) => {
14383
- const input = payload.value;
14383
+ const input2 = payload.value;
14384
14384
  if (isInt) {
14385
- if (!Number.isInteger(input)) {
14385
+ if (!Number.isInteger(input2)) {
14386
14386
  payload.issues.push({
14387
14387
  expected: origin,
14388
14388
  format: def.format,
14389
14389
  code: "invalid_type",
14390
14390
  continue: false,
14391
- input,
14391
+ input: input2,
14392
14392
  inst
14393
14393
  });
14394
14394
  return;
14395
14395
  }
14396
- if (!Number.isSafeInteger(input)) {
14397
- if (input > 0) {
14396
+ if (!Number.isSafeInteger(input2)) {
14397
+ if (input2 > 0) {
14398
14398
  payload.issues.push({
14399
- input,
14399
+ input: input2,
14400
14400
  code: "too_big",
14401
14401
  maximum: Number.MAX_SAFE_INTEGER,
14402
14402
  note: "Integers must be within the safe integer range.",
@@ -14407,7 +14407,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14407
14407
  });
14408
14408
  } else {
14409
14409
  payload.issues.push({
14410
- input,
14410
+ input: input2,
14411
14411
  code: "too_small",
14412
14412
  minimum: Number.MIN_SAFE_INTEGER,
14413
14413
  note: "Integers must be within the safe integer range.",
@@ -14420,10 +14420,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14420
14420
  return;
14421
14421
  }
14422
14422
  }
14423
- if (input < minimum) {
14423
+ if (input2 < minimum) {
14424
14424
  payload.issues.push({
14425
14425
  origin: "number",
14426
- input,
14426
+ input: input2,
14427
14427
  code: "too_small",
14428
14428
  minimum,
14429
14429
  inclusive: true,
@@ -14431,10 +14431,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
14431
14431
  continue: !def.abort
14432
14432
  });
14433
14433
  }
14434
- if (input > maximum) {
14434
+ if (input2 > maximum) {
14435
14435
  payload.issues.push({
14436
14436
  origin: "number",
14437
- input,
14437
+ input: input2,
14438
14438
  code: "too_big",
14439
14439
  maximum,
14440
14440
  inclusive: true,
@@ -14454,11 +14454,11 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
14454
14454
  bag.maximum = maximum;
14455
14455
  });
14456
14456
  inst._zod.check = (payload) => {
14457
- const input = payload.value;
14458
- if (input < minimum) {
14457
+ const input2 = payload.value;
14458
+ if (input2 < minimum) {
14459
14459
  payload.issues.push({
14460
14460
  origin: "bigint",
14461
- input,
14461
+ input: input2,
14462
14462
  code: "too_small",
14463
14463
  minimum,
14464
14464
  inclusive: true,
@@ -14466,10 +14466,10 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
14466
14466
  continue: !def.abort
14467
14467
  });
14468
14468
  }
14469
- if (input > maximum) {
14469
+ if (input2 > maximum) {
14470
14470
  payload.issues.push({
14471
14471
  origin: "bigint",
14472
- input,
14472
+ input: input2,
14473
14473
  code: "too_big",
14474
14474
  maximum,
14475
14475
  inclusive: true,
@@ -14492,16 +14492,16 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
14492
14492
  inst2._zod.bag.maximum = def.maximum;
14493
14493
  });
14494
14494
  inst._zod.check = (payload) => {
14495
- const input = payload.value;
14496
- const size = input.size;
14495
+ const input2 = payload.value;
14496
+ const size = input2.size;
14497
14497
  if (size <= def.maximum)
14498
14498
  return;
14499
14499
  payload.issues.push({
14500
- origin: getSizableOrigin(input),
14500
+ origin: getSizableOrigin(input2),
14501
14501
  code: "too_big",
14502
14502
  maximum: def.maximum,
14503
14503
  inclusive: true,
14504
- input,
14504
+ input: input2,
14505
14505
  inst,
14506
14506
  continue: !def.abort
14507
14507
  });
@@ -14520,16 +14520,16 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
14520
14520
  inst2._zod.bag.minimum = def.minimum;
14521
14521
  });
14522
14522
  inst._zod.check = (payload) => {
14523
- const input = payload.value;
14524
- const size = input.size;
14523
+ const input2 = payload.value;
14524
+ const size = input2.size;
14525
14525
  if (size >= def.minimum)
14526
14526
  return;
14527
14527
  payload.issues.push({
14528
- origin: getSizableOrigin(input),
14528
+ origin: getSizableOrigin(input2),
14529
14529
  code: "too_small",
14530
14530
  minimum: def.minimum,
14531
14531
  inclusive: true,
14532
- input,
14532
+ input: input2,
14533
14533
  inst,
14534
14534
  continue: !def.abort
14535
14535
  });
@@ -14549,13 +14549,13 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
14549
14549
  bag.size = def.size;
14550
14550
  });
14551
14551
  inst._zod.check = (payload) => {
14552
- const input = payload.value;
14553
- const size = input.size;
14552
+ const input2 = payload.value;
14553
+ const size = input2.size;
14554
14554
  if (size === def.size)
14555
14555
  return;
14556
14556
  const tooBig = size > def.size;
14557
14557
  payload.issues.push({
14558
- origin: getSizableOrigin(input),
14558
+ origin: getSizableOrigin(input2),
14559
14559
  ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
14560
14560
  inclusive: true,
14561
14561
  exact: true,
@@ -14578,17 +14578,17 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
14578
14578
  inst2._zod.bag.maximum = def.maximum;
14579
14579
  });
14580
14580
  inst._zod.check = (payload) => {
14581
- const input = payload.value;
14582
- const length = input.length;
14581
+ const input2 = payload.value;
14582
+ const length = input2.length;
14583
14583
  if (length <= def.maximum)
14584
14584
  return;
14585
- const origin = getLengthableOrigin(input);
14585
+ const origin = getLengthableOrigin(input2);
14586
14586
  payload.issues.push({
14587
14587
  origin,
14588
14588
  code: "too_big",
14589
14589
  maximum: def.maximum,
14590
14590
  inclusive: true,
14591
- input,
14591
+ input: input2,
14592
14592
  inst,
14593
14593
  continue: !def.abort
14594
14594
  });
@@ -14607,17 +14607,17 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
14607
14607
  inst2._zod.bag.minimum = def.minimum;
14608
14608
  });
14609
14609
  inst._zod.check = (payload) => {
14610
- const input = payload.value;
14611
- const length = input.length;
14610
+ const input2 = payload.value;
14611
+ const length = input2.length;
14612
14612
  if (length >= def.minimum)
14613
14613
  return;
14614
- const origin = getLengthableOrigin(input);
14614
+ const origin = getLengthableOrigin(input2);
14615
14615
  payload.issues.push({
14616
14616
  origin,
14617
14617
  code: "too_small",
14618
14618
  minimum: def.minimum,
14619
14619
  inclusive: true,
14620
- input,
14620
+ input: input2,
14621
14621
  inst,
14622
14622
  continue: !def.abort
14623
14623
  });
@@ -14637,11 +14637,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
14637
14637
  bag.length = def.length;
14638
14638
  });
14639
14639
  inst._zod.check = (payload) => {
14640
- const input = payload.value;
14641
- const length = input.length;
14640
+ const input2 = payload.value;
14641
+ const length = input2.length;
14642
14642
  if (length === def.length)
14643
14643
  return;
14644
- const origin = getLengthableOrigin(input);
14644
+ const origin = getLengthableOrigin(input2);
14645
14645
  const tooBig = length > def.length;
14646
14646
  payload.issues.push({
14647
14647
  origin,
@@ -15312,15 +15312,15 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
15312
15312
  payload.value = Number(payload.value);
15313
15313
  } catch (_) {
15314
15314
  }
15315
- const input = payload.value;
15316
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
15315
+ const input2 = payload.value;
15316
+ if (typeof input2 === "number" && !Number.isNaN(input2) && Number.isFinite(input2)) {
15317
15317
  return payload;
15318
15318
  }
15319
- const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
15319
+ const received = typeof input2 === "number" ? Number.isNaN(input2) ? "NaN" : !Number.isFinite(input2) ? "Infinity" : void 0 : void 0;
15320
15320
  payload.issues.push({
15321
15321
  expected: "number",
15322
15322
  code: "invalid_type",
15323
- input,
15323
+ input: input2,
15324
15324
  inst,
15325
15325
  ...received ? { received } : {}
15326
15326
  });
@@ -15340,13 +15340,13 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
15340
15340
  payload.value = Boolean(payload.value);
15341
15341
  } catch (_) {
15342
15342
  }
15343
- const input = payload.value;
15344
- if (typeof input === "boolean")
15343
+ const input2 = payload.value;
15344
+ if (typeof input2 === "boolean")
15345
15345
  return payload;
15346
15346
  payload.issues.push({
15347
15347
  expected: "boolean",
15348
15348
  code: "invalid_type",
15349
- input,
15349
+ input: input2,
15350
15350
  inst
15351
15351
  });
15352
15352
  return payload;
@@ -15379,13 +15379,13 @@ var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, d
15379
15379
  var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
15380
15380
  $ZodType.init(inst, def);
15381
15381
  inst._zod.parse = (payload, _ctx) => {
15382
- const input = payload.value;
15383
- if (typeof input === "symbol")
15382
+ const input2 = payload.value;
15383
+ if (typeof input2 === "symbol")
15384
15384
  return payload;
15385
15385
  payload.issues.push({
15386
15386
  expected: "symbol",
15387
15387
  code: "invalid_type",
15388
- input,
15388
+ input: input2,
15389
15389
  inst
15390
15390
  });
15391
15391
  return payload;
@@ -15396,13 +15396,13 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
15396
15396
  inst._zod.pattern = _undefined;
15397
15397
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
15398
15398
  inst._zod.parse = (payload, _ctx) => {
15399
- const input = payload.value;
15400
- if (typeof input === "undefined")
15399
+ const input2 = payload.value;
15400
+ if (typeof input2 === "undefined")
15401
15401
  return payload;
15402
15402
  payload.issues.push({
15403
15403
  expected: "undefined",
15404
15404
  code: "invalid_type",
15405
- input,
15405
+ input: input2,
15406
15406
  inst
15407
15407
  });
15408
15408
  return payload;
@@ -15413,13 +15413,13 @@ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
15413
15413
  inst._zod.pattern = _null;
15414
15414
  inst._zod.values = /* @__PURE__ */ new Set([null]);
15415
15415
  inst._zod.parse = (payload, _ctx) => {
15416
- const input = payload.value;
15417
- if (input === null)
15416
+ const input2 = payload.value;
15417
+ if (input2 === null)
15418
15418
  return payload;
15419
15419
  payload.issues.push({
15420
15420
  expected: "null",
15421
15421
  code: "invalid_type",
15422
- input,
15422
+ input: input2,
15423
15423
  inst
15424
15424
  });
15425
15425
  return payload;
@@ -15448,13 +15448,13 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
15448
15448
  var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
15449
15449
  $ZodType.init(inst, def);
15450
15450
  inst._zod.parse = (payload, _ctx) => {
15451
- const input = payload.value;
15452
- if (typeof input === "undefined")
15451
+ const input2 = payload.value;
15452
+ if (typeof input2 === "undefined")
15453
15453
  return payload;
15454
15454
  payload.issues.push({
15455
15455
  expected: "void",
15456
15456
  code: "invalid_type",
15457
- input,
15457
+ input: input2,
15458
15458
  inst
15459
15459
  });
15460
15460
  return payload;
@@ -15469,15 +15469,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
15469
15469
  } catch (_err) {
15470
15470
  }
15471
15471
  }
15472
- const input = payload.value;
15473
- const isDate = input instanceof Date;
15474
- const isValidDate = isDate && !Number.isNaN(input.getTime());
15472
+ const input2 = payload.value;
15473
+ const isDate = input2 instanceof Date;
15474
+ const isValidDate = isDate && !Number.isNaN(input2.getTime());
15475
15475
  if (isValidDate)
15476
15476
  return payload;
15477
15477
  payload.issues.push({
15478
15478
  expected: "date",
15479
15479
  code: "invalid_type",
15480
- input,
15480
+ input: input2,
15481
15481
  ...isDate ? { received: "Invalid Date" } : {},
15482
15482
  inst
15483
15483
  });
@@ -15493,20 +15493,20 @@ function handleArrayResult(result, final, index) {
15493
15493
  var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
15494
15494
  $ZodType.init(inst, def);
15495
15495
  inst._zod.parse = (payload, ctx) => {
15496
- const input = payload.value;
15497
- if (!Array.isArray(input)) {
15496
+ const input2 = payload.value;
15497
+ if (!Array.isArray(input2)) {
15498
15498
  payload.issues.push({
15499
15499
  expected: "array",
15500
15500
  code: "invalid_type",
15501
- input,
15501
+ input: input2,
15502
15502
  inst
15503
15503
  });
15504
15504
  return payload;
15505
15505
  }
15506
- payload.value = Array(input.length);
15506
+ payload.value = Array(input2.length);
15507
15507
  const proms = [];
15508
- for (let i = 0; i < input.length; i++) {
15509
- const item = input[i];
15508
+ for (let i = 0; i < input2.length; i++) {
15509
+ const item = input2[i];
15510
15510
  const result = def.element._zod.run({
15511
15511
  value: item,
15512
15512
  issues: []
@@ -15523,8 +15523,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
15523
15523
  return payload;
15524
15524
  };
15525
15525
  });
15526
- function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
15527
- const isPresent = key in input;
15526
+ function handlePropertyResult(result, final, key, input2, isOptionalIn, isOptionalOut) {
15527
+ const isPresent = key in input2;
15528
15528
  if (result.issues.length) {
15529
15529
  if (isOptionalIn && isOptionalOut && !isPresent) {
15530
15530
  return;
@@ -15566,14 +15566,14 @@ function normalizeDef(def) {
15566
15566
  optionalKeys: new Set(okeys)
15567
15567
  };
15568
15568
  }
15569
- function handleCatchall(proms, input, payload, ctx, def, inst) {
15569
+ function handleCatchall(proms, input2, payload, ctx, def, inst) {
15570
15570
  const unrecognized = [];
15571
15571
  const keySet = def.keySet;
15572
15572
  const _catchall = def.catchall._zod;
15573
15573
  const t9 = _catchall.def.type;
15574
15574
  const isOptionalIn = _catchall.optin === "optional";
15575
15575
  const isOptionalOut = _catchall.optout === "optional";
15576
- for (const key in input) {
15576
+ for (const key in input2) {
15577
15577
  if (key === "__proto__")
15578
15578
  continue;
15579
15579
  if (keySet.has(key))
@@ -15582,18 +15582,18 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
15582
15582
  unrecognized.push(key);
15583
15583
  continue;
15584
15584
  }
15585
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
15585
+ const r = _catchall.run({ value: input2[key], issues: [] }, ctx);
15586
15586
  if (r instanceof Promise) {
15587
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
15587
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
15588
15588
  } else {
15589
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
15589
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
15590
15590
  }
15591
15591
  }
15592
15592
  if (unrecognized.length) {
15593
15593
  payload.issues.push({
15594
15594
  code: "unrecognized_keys",
15595
15595
  keys: unrecognized,
15596
- input,
15596
+ input: input2,
15597
15597
  inst
15598
15598
  });
15599
15599
  }
@@ -15637,12 +15637,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
15637
15637
  let value;
15638
15638
  inst._zod.parse = (payload, ctx) => {
15639
15639
  value ?? (value = _normalized.value);
15640
- const input = payload.value;
15641
- if (!isObject2(input)) {
15640
+ const input2 = payload.value;
15641
+ if (!isObject2(input2)) {
15642
15642
  payload.issues.push({
15643
15643
  expected: "object",
15644
15644
  code: "invalid_type",
15645
- input,
15645
+ input: input2,
15646
15646
  inst
15647
15647
  });
15648
15648
  return payload;
@@ -15654,17 +15654,17 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
15654
15654
  const el3 = shape[key];
15655
15655
  const isOptionalIn = el3._zod.optin === "optional";
15656
15656
  const isOptionalOut = el3._zod.optout === "optional";
15657
- const r = el3._zod.run({ value: input[key], issues: [] }, ctx);
15657
+ const r = el3._zod.run({ value: input2[key], issues: [] }, ctx);
15658
15658
  if (r instanceof Promise) {
15659
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
15659
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
15660
15660
  } else {
15661
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
15661
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
15662
15662
  }
15663
15663
  }
15664
15664
  if (!catchall) {
15665
15665
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
15666
15666
  }
15667
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
15667
+ return handleCatchall(proms, input2, payload, ctx, _normalized.value, inst);
15668
15668
  };
15669
15669
  });
15670
15670
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -15773,12 +15773,12 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
15773
15773
  let value;
15774
15774
  inst._zod.parse = (payload, ctx) => {
15775
15775
  value ?? (value = _normalized.value);
15776
- const input = payload.value;
15777
- if (!isObject2(input)) {
15776
+ const input2 = payload.value;
15777
+ if (!isObject2(input2)) {
15778
15778
  payload.issues.push({
15779
15779
  expected: "object",
15780
15780
  code: "invalid_type",
15781
- input,
15781
+ input: input2,
15782
15782
  inst
15783
15783
  });
15784
15784
  return payload;
@@ -15789,7 +15789,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
15789
15789
  payload = fastpass(payload, ctx);
15790
15790
  if (!catchall)
15791
15791
  return payload;
15792
- return handleCatchall([], input, payload, ctx, value, inst);
15792
+ return handleCatchall([], input2, payload, ctx, value, inst);
15793
15793
  }
15794
15794
  return superParse(payload, ctx);
15795
15795
  };
@@ -15949,17 +15949,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
15949
15949
  return map2;
15950
15950
  });
15951
15951
  inst._zod.parse = (payload, ctx) => {
15952
- const input = payload.value;
15953
- if (!isObject(input)) {
15952
+ const input2 = payload.value;
15953
+ if (!isObject(input2)) {
15954
15954
  payload.issues.push({
15955
15955
  code: "invalid_type",
15956
15956
  expected: "object",
15957
- input,
15957
+ input: input2,
15958
15958
  inst
15959
15959
  });
15960
15960
  return payload;
15961
15961
  }
15962
- const opt = disc.value.get(input?.[def.discriminator]);
15962
+ const opt = disc.value.get(input2?.[def.discriminator]);
15963
15963
  if (opt) {
15964
15964
  return opt._zod.run(payload, ctx);
15965
15965
  }
@@ -15972,7 +15972,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
15972
15972
  note: "No matching discriminator",
15973
15973
  discriminator: def.discriminator,
15974
15974
  options: Array.from(disc.value.keys()),
15975
- input,
15975
+ input: input2,
15976
15976
  path: [def.discriminator],
15977
15977
  inst
15978
15978
  });
@@ -15982,9 +15982,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
15982
15982
  var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
15983
15983
  $ZodType.init(inst, def);
15984
15984
  inst._zod.parse = (payload, ctx) => {
15985
- const input = payload.value;
15986
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
15987
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
15985
+ const input2 = payload.value;
15986
+ const left = def.left._zod.run({ value: input2, issues: [] }, ctx);
15987
+ const right = def.right._zod.run({ value: input2, issues: [] }, ctx);
15988
15988
  const async = left instanceof Promise || right instanceof Promise;
15989
15989
  if (async) {
15990
15990
  return Promise.all([left, right]).then(([left2, right2]) => {
@@ -16081,10 +16081,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16081
16081
  $ZodType.init(inst, def);
16082
16082
  const items = def.items;
16083
16083
  inst._zod.parse = (payload, ctx) => {
16084
- const input = payload.value;
16085
- if (!Array.isArray(input)) {
16084
+ const input2 = payload.value;
16085
+ if (!Array.isArray(input2)) {
16086
16086
  payload.issues.push({
16087
- input,
16087
+ input: input2,
16088
16088
  inst,
16089
16089
  expected: "tuple",
16090
16090
  code: "invalid_type"
@@ -16096,23 +16096,23 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16096
16096
  const optinStart = getTupleOptStart(items, "optin");
16097
16097
  const optoutStart = getTupleOptStart(items, "optout");
16098
16098
  if (!def.rest) {
16099
- if (input.length < optinStart) {
16099
+ if (input2.length < optinStart) {
16100
16100
  payload.issues.push({
16101
16101
  code: "too_small",
16102
16102
  minimum: optinStart,
16103
16103
  inclusive: true,
16104
- input,
16104
+ input: input2,
16105
16105
  inst,
16106
16106
  origin: "array"
16107
16107
  });
16108
16108
  return payload;
16109
16109
  }
16110
- if (input.length > items.length) {
16110
+ if (input2.length > items.length) {
16111
16111
  payload.issues.push({
16112
16112
  code: "too_big",
16113
16113
  maximum: items.length,
16114
16114
  inclusive: true,
16115
- input,
16115
+ input: input2,
16116
16116
  inst,
16117
16117
  origin: "array"
16118
16118
  });
@@ -16120,7 +16120,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16120
16120
  }
16121
16121
  const itemResults = new Array(items.length);
16122
16122
  for (let i = 0; i < items.length; i++) {
16123
- const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
16123
+ const r = items[i]._zod.run({ value: input2[i], issues: [] }, ctx);
16124
16124
  if (r instanceof Promise) {
16125
16125
  proms.push(r.then((rr3) => {
16126
16126
  itemResults[i] = rr3;
@@ -16131,7 +16131,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16131
16131
  }
16132
16132
  if (def.rest) {
16133
16133
  let i = items.length - 1;
16134
- const rest = input.slice(items.length);
16134
+ const rest = input2.slice(items.length);
16135
16135
  for (const el3 of rest) {
16136
16136
  i++;
16137
16137
  const result = def.rest._zod.run({ value: el3, issues: [] }, ctx);
@@ -16143,9 +16143,9 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
16143
16143
  }
16144
16144
  }
16145
16145
  if (proms.length) {
16146
- return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
16146
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input2, optoutStart));
16147
16147
  }
16148
- return handleTupleResults(itemResults, payload, items, input, optoutStart);
16148
+ return handleTupleResults(itemResults, payload, items, input2, optoutStart);
16149
16149
  };
16150
16150
  });
16151
16151
  function getTupleOptStart(items, key) {
@@ -16161,10 +16161,10 @@ function handleTupleResult(result, final, index) {
16161
16161
  }
16162
16162
  final.value[index] = result.value;
16163
16163
  }
16164
- function handleTupleResults(itemResults, final, items, input, optoutStart) {
16164
+ function handleTupleResults(itemResults, final, items, input2, optoutStart) {
16165
16165
  for (let i = 0; i < items.length; i++) {
16166
16166
  const r = itemResults[i];
16167
- const isPresent = i < input.length;
16167
+ const isPresent = i < input2.length;
16168
16168
  if (r.issues.length) {
16169
16169
  if (!isPresent && i >= optoutStart) {
16170
16170
  final.value.length = i;
@@ -16174,7 +16174,7 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
16174
16174
  }
16175
16175
  final.value[i] = r.value;
16176
16176
  }
16177
- for (let i = final.value.length - 1; i >= input.length; i--) {
16177
+ for (let i = final.value.length - 1; i >= input2.length; i--) {
16178
16178
  if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
16179
16179
  final.value.length = i;
16180
16180
  } else {
@@ -16186,12 +16186,12 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
16186
16186
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16187
16187
  $ZodType.init(inst, def);
16188
16188
  inst._zod.parse = (payload, ctx) => {
16189
- const input = payload.value;
16190
- if (!isPlainObject(input)) {
16189
+ const input2 = payload.value;
16190
+ if (!isPlainObject(input2)) {
16191
16191
  payload.issues.push({
16192
16192
  expected: "record",
16193
16193
  code: "invalid_type",
16194
- input,
16194
+ input: input2,
16195
16195
  inst
16196
16196
  });
16197
16197
  return payload;
@@ -16220,7 +16220,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16220
16220
  continue;
16221
16221
  }
16222
16222
  const outKey = keyResult.value;
16223
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
16223
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
16224
16224
  if (result instanceof Promise) {
16225
16225
  proms.push(result.then((result2) => {
16226
16226
  if (result2.issues.length) {
@@ -16237,7 +16237,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16237
16237
  }
16238
16238
  }
16239
16239
  let unrecognized;
16240
- for (const key in input) {
16240
+ for (const key in input2) {
16241
16241
  if (!recordKeys.has(key)) {
16242
16242
  unrecognized = unrecognized ?? [];
16243
16243
  unrecognized.push(key);
@@ -16246,17 +16246,17 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16246
16246
  if (unrecognized && unrecognized.length > 0) {
16247
16247
  payload.issues.push({
16248
16248
  code: "unrecognized_keys",
16249
- input,
16249
+ input: input2,
16250
16250
  inst,
16251
16251
  keys: unrecognized
16252
16252
  });
16253
16253
  }
16254
16254
  } else {
16255
16255
  payload.value = {};
16256
- for (const key of Reflect.ownKeys(input)) {
16256
+ for (const key of Reflect.ownKeys(input2)) {
16257
16257
  if (key === "__proto__")
16258
16258
  continue;
16259
- if (!Object.prototype.propertyIsEnumerable.call(input, key))
16259
+ if (!Object.prototype.propertyIsEnumerable.call(input2, key))
16260
16260
  continue;
16261
16261
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
16262
16262
  if (keyResult instanceof Promise) {
@@ -16274,7 +16274,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16274
16274
  }
16275
16275
  if (keyResult.issues.length) {
16276
16276
  if (def.mode === "loose") {
16277
- payload.value[key] = input[key];
16277
+ payload.value[key] = input2[key];
16278
16278
  } else {
16279
16279
  payload.issues.push({
16280
16280
  code: "invalid_key",
@@ -16287,7 +16287,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16287
16287
  }
16288
16288
  continue;
16289
16289
  }
16290
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
16290
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
16291
16291
  if (result instanceof Promise) {
16292
16292
  proms.push(result.then((result2) => {
16293
16293
  if (result2.issues.length) {
@@ -16312,27 +16312,27 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
16312
16312
  var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
16313
16313
  $ZodType.init(inst, def);
16314
16314
  inst._zod.parse = (payload, ctx) => {
16315
- const input = payload.value;
16316
- if (!(input instanceof Map)) {
16315
+ const input2 = payload.value;
16316
+ if (!(input2 instanceof Map)) {
16317
16317
  payload.issues.push({
16318
16318
  expected: "map",
16319
16319
  code: "invalid_type",
16320
- input,
16320
+ input: input2,
16321
16321
  inst
16322
16322
  });
16323
16323
  return payload;
16324
16324
  }
16325
16325
  const proms = [];
16326
16326
  payload.value = /* @__PURE__ */ new Map();
16327
- for (const [key, value] of input) {
16327
+ for (const [key, value] of input2) {
16328
16328
  const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
16329
16329
  const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
16330
16330
  if (keyResult instanceof Promise || valueResult instanceof Promise) {
16331
16331
  proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
16332
- handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx);
16332
+ handleMapResult(keyResult2, valueResult2, payload, key, input2, inst, ctx);
16333
16333
  }));
16334
16334
  } else {
16335
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
16335
+ handleMapResult(keyResult, valueResult, payload, key, input2, inst, ctx);
16336
16336
  }
16337
16337
  }
16338
16338
  if (proms.length)
@@ -16340,7 +16340,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
16340
16340
  return payload;
16341
16341
  };
16342
16342
  });
16343
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
16343
+ function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
16344
16344
  if (keyResult.issues.length) {
16345
16345
  if (propertyKeyTypes.has(typeof key)) {
16346
16346
  final.issues.push(...prefixIssues(key, keyResult.issues));
@@ -16348,7 +16348,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
16348
16348
  final.issues.push({
16349
16349
  code: "invalid_key",
16350
16350
  origin: "map",
16351
- input,
16351
+ input: input2,
16352
16352
  inst,
16353
16353
  issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
16354
16354
  });
@@ -16361,7 +16361,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
16361
16361
  final.issues.push({
16362
16362
  origin: "map",
16363
16363
  code: "invalid_element",
16364
- input,
16364
+ input: input2,
16365
16365
  inst,
16366
16366
  key,
16367
16367
  issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
@@ -16373,10 +16373,10 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
16373
16373
  var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
16374
16374
  $ZodType.init(inst, def);
16375
16375
  inst._zod.parse = (payload, ctx) => {
16376
- const input = payload.value;
16377
- if (!(input instanceof Set)) {
16376
+ const input2 = payload.value;
16377
+ if (!(input2 instanceof Set)) {
16378
16378
  payload.issues.push({
16379
- input,
16379
+ input: input2,
16380
16380
  inst,
16381
16381
  expected: "set",
16382
16382
  code: "invalid_type"
@@ -16385,7 +16385,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
16385
16385
  }
16386
16386
  const proms = [];
16387
16387
  payload.value = /* @__PURE__ */ new Set();
16388
- for (const item of input) {
16388
+ for (const item of input2) {
16389
16389
  const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
16390
16390
  if (result instanceof Promise) {
16391
16391
  proms.push(result.then((result2) => handleSetResult(result2, payload)));
@@ -16410,14 +16410,14 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
16410
16410
  inst._zod.values = valuesSet;
16411
16411
  inst._zod.pattern = new RegExp(`^(${values.filter((k3) => propertyKeyTypes.has(typeof k3)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
16412
16412
  inst._zod.parse = (payload, _ctx) => {
16413
- const input = payload.value;
16414
- if (valuesSet.has(input)) {
16413
+ const input2 = payload.value;
16414
+ if (valuesSet.has(input2)) {
16415
16415
  return payload;
16416
16416
  }
16417
16417
  payload.issues.push({
16418
16418
  code: "invalid_value",
16419
16419
  values,
16420
- input,
16420
+ input: input2,
16421
16421
  inst
16422
16422
  });
16423
16423
  return payload;
@@ -16432,14 +16432,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
16432
16432
  inst._zod.values = values;
16433
16433
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
16434
16434
  inst._zod.parse = (payload, _ctx) => {
16435
- const input = payload.value;
16436
- if (values.has(input)) {
16435
+ const input2 = payload.value;
16436
+ if (values.has(input2)) {
16437
16437
  return payload;
16438
16438
  }
16439
16439
  payload.issues.push({
16440
16440
  code: "invalid_value",
16441
16441
  values: def.values,
16442
- input,
16442
+ input: input2,
16443
16443
  inst
16444
16444
  });
16445
16445
  return payload;
@@ -16448,13 +16448,13 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
16448
16448
  var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
16449
16449
  $ZodType.init(inst, def);
16450
16450
  inst._zod.parse = (payload, _ctx) => {
16451
- const input = payload.value;
16452
- if (input instanceof File)
16451
+ const input2 = payload.value;
16452
+ if (input2 instanceof File)
16453
16453
  return payload;
16454
16454
  payload.issues.push({
16455
16455
  expected: "file",
16456
16456
  code: "invalid_type",
16457
- input,
16457
+ input: input2,
16458
16458
  inst
16459
16459
  });
16460
16460
  return payload;
@@ -16484,8 +16484,8 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
16484
16484
  return payload;
16485
16485
  };
16486
16486
  });
16487
- function handleOptionalResult(result, input) {
16488
- if (input === void 0 && (result.issues.length || result.fallback)) {
16487
+ function handleOptionalResult(result, input2) {
16488
+ if (input2 === void 0 && (result.issues.length || result.fallback)) {
16489
16489
  return { issues: [], value: void 0 };
16490
16490
  }
16491
16491
  return result;
@@ -16503,11 +16503,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
16503
16503
  });
16504
16504
  inst._zod.parse = (payload, ctx) => {
16505
16505
  if (def.innerType._zod.optin === "optional") {
16506
- const input = payload.value;
16506
+ const input2 = payload.value;
16507
16507
  const result = def.innerType._zod.run(payload, ctx);
16508
16508
  if (result instanceof Promise)
16509
- return result.then((r) => handleOptionalResult(r, input));
16510
- return handleOptionalResult(result, input);
16509
+ return result.then((r) => handleOptionalResult(r, input2));
16510
+ return handleOptionalResult(result, input2);
16511
16511
  }
16512
16512
  if (payload.value === void 0) {
16513
16513
  return payload;
@@ -16932,20 +16932,20 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
16932
16932
  return payload;
16933
16933
  };
16934
16934
  inst._zod.check = (payload) => {
16935
- const input = payload.value;
16936
- const r = def.fn(input);
16935
+ const input2 = payload.value;
16936
+ const r = def.fn(input2);
16937
16937
  if (r instanceof Promise) {
16938
- return r.then((r2) => handleRefineResult(r2, payload, input, inst));
16938
+ return r.then((r2) => handleRefineResult(r2, payload, input2, inst));
16939
16939
  }
16940
- handleRefineResult(r, payload, input, inst);
16940
+ handleRefineResult(r, payload, input2, inst);
16941
16941
  return;
16942
16942
  };
16943
16943
  });
16944
- function handleRefineResult(result, payload, input, inst) {
16944
+ function handleRefineResult(result, payload, input2, inst) {
16945
16945
  if (!result) {
16946
16946
  const _iss = {
16947
16947
  code: "custom",
16948
- input,
16948
+ input: input2,
16949
16949
  inst,
16950
16950
  // incorporates params.error into issue reporting
16951
16951
  path: [...inst._zod.def.path ?? []],
@@ -20232,8 +20232,8 @@ function ko_default() {
20232
20232
  }
20233
20233
 
20234
20234
  // ../../../node_modules/zod/v4/locales/lt.js
20235
- var capitalizeFirstCharacter = (text) => {
20236
- return text.charAt(0).toUpperCase() + text.slice(1);
20235
+ var capitalizeFirstCharacter = (text2) => {
20236
+ return text2.charAt(0).toUpperCase() + text2.slice(1);
20237
20237
  };
20238
20238
  function getUnitTypeFromNumber(number4) {
20239
20239
  const abs = Math.abs(number4);
@@ -23633,23 +23633,23 @@ function _overwrite(tx) {
23633
23633
  }
23634
23634
  // @__NO_SIDE_EFFECTS__
23635
23635
  function _normalize(form) {
23636
- return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
23636
+ return /* @__PURE__ */ _overwrite((input2) => input2.normalize(form));
23637
23637
  }
23638
23638
  // @__NO_SIDE_EFFECTS__
23639
23639
  function _trim() {
23640
- return /* @__PURE__ */ _overwrite((input) => input.trim());
23640
+ return /* @__PURE__ */ _overwrite((input2) => input2.trim());
23641
23641
  }
23642
23642
  // @__NO_SIDE_EFFECTS__
23643
23643
  function _toLowerCase() {
23644
- return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
23644
+ return /* @__PURE__ */ _overwrite((input2) => input2.toLowerCase());
23645
23645
  }
23646
23646
  // @__NO_SIDE_EFFECTS__
23647
23647
  function _toUpperCase() {
23648
- return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
23648
+ return /* @__PURE__ */ _overwrite((input2) => input2.toUpperCase());
23649
23649
  }
23650
23650
  // @__NO_SIDE_EFFECTS__
23651
23651
  function _slugify() {
23652
- return /* @__PURE__ */ _overwrite((input) => slugify(input));
23652
+ return /* @__PURE__ */ _overwrite((input2) => slugify(input2));
23653
23653
  }
23654
23654
  // @__NO_SIDE_EFFECTS__
23655
23655
  function _array(Class2, element, params) {
@@ -23954,8 +23954,8 @@ function _stringbool(Classes, _params) {
23954
23954
  type: "pipe",
23955
23955
  in: stringSchema,
23956
23956
  out: booleanSchema,
23957
- transform: ((input, payload) => {
23958
- let data = input;
23957
+ transform: ((input2, payload) => {
23958
+ let data = input2;
23959
23959
  if (params.case !== "sensitive")
23960
23960
  data = data.toLowerCase();
23961
23961
  if (truthySet.has(data)) {
@@ -23974,8 +23974,8 @@ function _stringbool(Classes, _params) {
23974
23974
  return {};
23975
23975
  }
23976
23976
  }),
23977
- reverseTransform: ((input, _payload) => {
23978
- if (input === true) {
23977
+ reverseTransform: ((input2, _payload) => {
23978
+ if (input2 === true) {
23979
23979
  return truthyArray[0] || "true";
23980
23980
  } else {
23981
23981
  return falsyArray[0] || "false";
@@ -24871,9 +24871,9 @@ var allProcessors = {
24871
24871
  optional: optionalProcessor,
24872
24872
  lazy: lazyProcessor
24873
24873
  };
24874
- function toJSONSchema(input, params) {
24875
- if ("_idmap" in input) {
24876
- const registry2 = input;
24874
+ function toJSONSchema(input2, params) {
24875
+ if ("_idmap" in input2) {
24876
+ const registry2 = input2;
24877
24877
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
24878
24878
  const defs = {};
24879
24879
  for (const entry of registry2._idmap.entries()) {
@@ -24901,9 +24901,9 @@ function toJSONSchema(input, params) {
24901
24901
  return { schemas };
24902
24902
  }
24903
24903
  const ctx = initializeContext({ ...params, processors: allProcessors });
24904
- process2(input, ctx);
24905
- extractDefs(ctx, input);
24906
- return finalize(ctx, input);
24904
+ process2(input2, ctx);
24905
+ extractDefs(ctx, input2);
24906
+ return finalize(ctx, input2);
24907
24907
  }
24908
24908
 
24909
24909
  // ../../../node_modules/zod/v4/core/json-schema-generator.js
@@ -27180,7 +27180,7 @@ var codexhostErrorSchema = external_exports.strictObject({
27180
27180
 
27181
27181
  // ../../shared-contracts/dist/harness-presentation.js
27182
27182
  var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
27183
- var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
27183
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text2) => text2.trim().length > 0);
27184
27184
  var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
27185
27185
  label: displayText(256).optional(),
27186
27186
  description: displayText(1024).optional()
@@ -27269,7 +27269,7 @@ var usageMeasurementsSchema = external_exports.object({
27269
27269
  outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
27270
27270
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
27271
27271
  }).strict();
27272
- var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
27272
+ var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
27273
27273
  var composerIndicatorsSchema = external_exports.array(external_exports.object({
27274
27274
  kind: external_exports.literal("countdown"),
27275
27275
  id: external_exports.string().min(1).max(64),
@@ -27652,6 +27652,8 @@ var externalThreadInspectionSchema = external_exports.object({
27652
27652
  effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
27653
27653
  availableThinkingOptions: harnessThinkingOptionsSchema.optional(),
27654
27654
  effectivePermissionModeId: harnessPermissionModeIdSchema.optional(),
27655
+ /** Live Session catalog when it, not the Adapter inspection, contains `effectiveModel`. */
27656
+ catalog: harnessModelCatalogSchema.optional(),
27655
27657
  history: harnessHistoryCapabilitiesSchema,
27656
27658
  usage: threadUsageSnapshotSchema.optional(),
27657
27659
  locked: external_exports.literal(true)
@@ -27710,9 +27712,9 @@ var threadSteeringInspectParamsSchema = external_exports.object({
27710
27712
  }).strict();
27711
27713
  var threadSteeringContextSchema = external_exports.object({
27712
27714
  kind: external_exports.literal("application"),
27713
- value: external_exports.string().transform((text, context) => {
27715
+ value: external_exports.string().transform((text2, context) => {
27714
27716
  try {
27715
- return JSON.parse(text);
27717
+ return JSON.parse(text2);
27716
27718
  } catch {
27717
27719
  context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
27718
27720
  return external_exports.NEVER;
@@ -27847,8 +27849,8 @@ var desktopExtensionHttpUrlSchema = external_exports.string().trim().max(2048).r
27847
27849
  const { username, password } = new URL(value);
27848
27850
  return !username && !password && !/[\\\s]/u.test(value);
27849
27851
  }, "URL must not contain credentials, backslashes, or whitespace");
27850
- function localizedText(text) {
27851
- return external_exports.strictObject({ en: text, "zh-CN": text });
27852
+ function localizedText(text2) {
27853
+ return external_exports.strictObject({ en: text2, "zh-CN": text2 });
27852
27854
  }
27853
27855
  var desktopExtensionLocalizedTextSchema = localizedText(external_exports.string().trim().min(1));
27854
27856
  var categoriesSchema = external_exports.array(desktopExtensionCategorySchema).max(desktopExtensionCategorySchema.options.length).refine((categories) => new Set(categories).size === categories.length, "Duplicate categories");
@@ -27965,8 +27967,8 @@ var desktopExtensionTrustTierSchema = external_exports.enum(["official", "commun
27965
27967
  function isGitHubDesktopExtensionZipballUrl(url2) {
27966
27968
  return url2.origin === "https://api.github.com" && /^\/repos\/[\w-]+\/[\w.-]+\/zipball(?:\/[^/]+)?\/?$/u.test(url2.pathname);
27967
27969
  }
27968
- var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input) => {
27969
- const url2 = new URL(input);
27970
+ var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input2) => {
27971
+ const url2 = new URL(input2);
27970
27972
  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);
27971
27973
  }, "Expected a .zip download URL or a GitHub zipball URL");
27972
27974
  var desktopExtensionCatalogEntrySchema = external_exports.strictObject({
@@ -28317,6 +28319,8 @@ var CLIENT_CHANNEL_METHODS = [
28317
28319
  "codexhost/workspace/read",
28318
28320
  "codexhost/thread/tree/read",
28319
28321
  "codexhost/thread/pins/list",
28322
+ "codexhost/thread/sections/list",
28323
+ "codexhost/thread/sections/move",
28320
28324
  "codexhost/thread/pins/set",
28321
28325
  "codexhost/harness/plugins/list",
28322
28326
  "codexhost/harness/inspect",
@@ -28355,8 +28359,21 @@ var CLIENT_CHANNEL_METHODS = [
28355
28359
  "codexhost/update/check",
28356
28360
  "codexhost/update/start",
28357
28361
  "codexhost/update/status",
28362
+ "codexhost/announcement/get",
28363
+ "codexhost/announcement/acknowledge",
28358
28364
  "codexhost/sessions/loaded/list"
28359
28365
  ];
28366
+ var clientThreadSectionsSchema = external_exports.object({
28367
+ sections: external_exports.array(external_exports.object({
28368
+ id: external_exports.string().min(1),
28369
+ name: external_exports.string().min(1),
28370
+ threads: external_exports.array(jsonObjectSchema)
28371
+ }).strict())
28372
+ }).strict();
28373
+ var clientThreadSectionMoveSchema = external_exports.object({
28374
+ threadId: external_exports.string().min(1).max(1024),
28375
+ sectionId: external_exports.string().min(1).max(1024).nullable()
28376
+ }).strict();
28360
28377
  var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
28361
28378
  var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
28362
28379
  var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
@@ -28898,8 +28915,8 @@ var harnessPreferencePatchSchema = external_exports.strictObject({
28898
28915
  operations: external_exports.array(harnessPreferenceOperationSchema).min(1).max(256),
28899
28916
  initializeOnly: external_exports.boolean().optional(),
28900
28917
  expectedRevision: external_exports.number().int().nonnegative().optional()
28901
- }).superRefine((input, ctx) => {
28902
- for (const operation of input.operations) {
28918
+ }).superRefine((input2, ctx) => {
28919
+ for (const operation of input2.operations) {
28903
28920
  if (operation.kind === "newThread" && (!operation.lastHarness && !operation.configuration || Boolean(operation.harnessId) !== Boolean(operation.configuration)))
28904
28921
  ctx.addIssue({
28905
28922
  code: "custom",
@@ -29301,13 +29318,18 @@ var harnessLaunchSettingsSchema = external_exports.object({
29301
29318
  // ../../shared-contracts/dist/harness-installation.js
29302
29319
  var harnessInstallationParamsSchema = external_exports.object({
29303
29320
  harnessId: harnessIdSchema,
29304
- action: external_exports.enum(["check", "update", "install"])
29305
- }).strict();
29321
+ action: external_exports.enum(["check", "update", "install"]),
29322
+ confirmedVersion: external_exports.string().min(1).max(128).optional()
29323
+ }).strict().refine(({ action, confirmedVersion }) => action === "update" || confirmedVersion === void 0);
29306
29324
  var harnessInstallationStateSchema = external_exports.object({
29307
29325
  currentVersion: external_exports.string().min(1).max(128),
29308
29326
  latestVersion: external_exports.string().min(1).max(128),
29309
29327
  updateAvailable: external_exports.boolean(),
29310
29328
  canUpdate: external_exports.boolean(),
29329
+ /** Present when the Adapter has a verified list and the available target is outside it. */
29330
+ latestVerifiedVersion: external_exports.string().min(1).max(128).optional(),
29331
+ /** Update preflight stopped before running the installer; latestVersion needs confirmation. */
29332
+ confirmationRequired: external_exports.literal(true).optional(),
29311
29333
  /** Defaults to CLI; some Harnesses ship only inside a desktop application. */
29312
29334
  versionKind: external_exports.enum(["cli", "application"]).optional(),
29313
29335
  /** Official download opened by the user; does not imply an automatic installation. */
@@ -29637,6 +29659,38 @@ var updateStatusResultSchema = external_exports.strictObject({
29637
29659
  status: updateStatusSchema.nullable()
29638
29660
  });
29639
29661
 
29662
+ // ../../shared-contracts/dist/release-announcement.js
29663
+ var RELEASE_ANNOUNCEMENT_MAX_THEMES = 12;
29664
+ var releaseAnnouncementThemeSchema = external_exports.strictObject({
29665
+ icon: external_exports.string().min(1).max(16).optional(),
29666
+ title: external_exports.string().min(1).max(120),
29667
+ body: external_exports.string().min(1).max(1200),
29668
+ contributors: external_exports.array(external_exports.string().min(1).max(39)).max(30)
29669
+ });
29670
+ var releaseAnnouncementContentSchema = external_exports.strictObject({
29671
+ summary: external_exports.string().min(1).max(600).optional(),
29672
+ themes: external_exports.array(releaseAnnouncementThemeSchema).min(1).max(RELEASE_ANNOUNCEMENT_MAX_THEMES)
29673
+ });
29674
+ var releaseAnnouncementSchema = external_exports.strictObject({
29675
+ version: updateSemanticVersionSchema,
29676
+ publishedAt: external_exports.iso.datetime(),
29677
+ url: external_exports.string().max(300).regex(/^https:\/\/github\.com\/BytePioneer-AI\/codex-host\/releases\/tag\/v[0-9A-Za-z.+-]+$/u),
29678
+ zh: releaseAnnouncementContentSchema.nullable(),
29679
+ en: releaseAnnouncementContentSchema.nullable()
29680
+ }).refine((value) => value.zh !== null || value.en !== null, {
29681
+ message: "an announcement needs at least one language"
29682
+ });
29683
+ var releaseAnnouncementGetParamsSchema = external_exports.strictObject({
29684
+ manual: external_exports.boolean().optional()
29685
+ });
29686
+ var releaseAnnouncementGetResultSchema = external_exports.strictObject({
29687
+ announcement: releaseAnnouncementSchema.nullable(),
29688
+ unread: external_exports.boolean()
29689
+ });
29690
+ var releaseAnnouncementAcknowledgeParamsSchema = external_exports.strictObject({
29691
+ version: updateSemanticVersionSchema
29692
+ });
29693
+
29640
29694
  // ../../shared-contracts/dist/thread-watch-notice.js
29641
29695
  var THREAD_WATCH_NOTICE_OUTCOMES = [
29642
29696
  "completed",
@@ -29684,17 +29738,67 @@ var remoteSshSetupResultSchema = external_exports.object({ state: external_expor
29684
29738
 
29685
29739
  // ../../shared-contracts/dist/remote-sessions.js
29686
29740
  var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
29687
- var identity = external_exports.string().min(1).max(1024);
29741
+ var REMOTE_IDENTITY_MAX_LENGTH = 1024;
29742
+ var identity = external_exports.string().min(1).max(REMOTE_IDENTITY_MAX_LENGTH);
29688
29743
  var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
29689
29744
  var thread = { ...target, threadId: identity };
29745
+ var text = external_exports.string().min(1).max(8e3);
29746
+ var input = { text, requestId: identity };
29747
+ var remoteDeliveryReplySchema = external_exports.discriminatedUnion("accepted", [
29748
+ external_exports.object({ accepted: external_exports.literal(true), startQueuedItemId: identity.optional() }),
29749
+ external_exports.object({
29750
+ accepted: external_exports.literal(false),
29751
+ code: external_exports.enum([
29752
+ "remote/queue-unavailable",
29753
+ "remote/steer-unavailable",
29754
+ "remote/turn-changed",
29755
+ "remote/send-rejected",
29756
+ "session/queue-item-not-found",
29757
+ "session/queue-item-starting"
29758
+ ]),
29759
+ message: external_exports.string()
29760
+ })
29761
+ ]);
29762
+ var remoteQueueSnapshotSchema = external_exports.discriminatedUnion("available", [
29763
+ external_exports.object({ available: external_exports.literal(false) }),
29764
+ external_exports.object({
29765
+ available: external_exports.literal(true),
29766
+ items: external_exports.array(external_exports.object({ id: identity, clientUserMessageId: identity, preview: external_exports.string().max(801) })).max(100)
29767
+ })
29768
+ ]);
29690
29769
  var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
29691
29770
  external_exports.strictObject({ kind: external_exports.literal("hosts") }),
29771
+ external_exports.strictObject({
29772
+ kind: external_exports.literal("create"),
29773
+ ...target,
29774
+ cwd: external_exports.string().min(1).max(8192),
29775
+ epoch: identity
29776
+ }),
29777
+ external_exports.strictObject({ kind: external_exports.literal("projectHarnesses"), ...target, epoch: identity }),
29778
+ external_exports.strictObject({
29779
+ kind: external_exports.literal("inspectHarness"),
29780
+ ...target,
29781
+ epoch: identity,
29782
+ cwd: external_exports.string().min(1).max(8192),
29783
+ harnessId: identity
29784
+ }),
29785
+ external_exports.strictObject({
29786
+ kind: external_exports.literal("startSelected"),
29787
+ ...target,
29788
+ epoch: identity,
29789
+ cwd: external_exports.string().min(1).max(8192),
29790
+ harnessId: identity,
29791
+ model: external_exports.string().min(1).max(4096),
29792
+ serviceTier: external_exports.enum(["priority", "ultrafast"]).optional(),
29793
+ reasoningEffort: identity.optional()
29794
+ }),
29692
29795
  external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
29693
29796
  external_exports.strictObject({
29694
29797
  kind: external_exports.literal("list"),
29695
29798
  ...target,
29696
29799
  cursor: external_exports.string().nullable(),
29697
- archived: external_exports.boolean()
29800
+ archived: external_exports.boolean(),
29801
+ includeLoaded: external_exports.literal(true).optional()
29698
29802
  }),
29699
29803
  external_exports.strictObject({
29700
29804
  kind: external_exports.literal("read"),
@@ -29724,9 +29828,25 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
29724
29828
  kind: external_exports.literal("prompt"),
29725
29829
  ...thread,
29726
29830
  epoch: identity,
29727
- text: external_exports.string().min(1).max(8e3),
29831
+ text,
29728
29832
  requestId: identity.optional()
29729
29833
  }),
29834
+ external_exports.strictObject({ kind: external_exports.literal("queue"), ...thread, epoch: identity }),
29835
+ external_exports.strictObject({
29836
+ kind: external_exports.literal("delivery"),
29837
+ ...thread,
29838
+ epoch: identity,
29839
+ action: external_exports.discriminatedUnion("kind", [
29840
+ external_exports.strictObject({ kind: external_exports.literal("enqueue"), ...input }),
29841
+ external_exports.strictObject({ kind: external_exports.literal("steer"), ...input, turnId: identity }),
29842
+ external_exports.strictObject({ kind: external_exports.literal("remove"), itemId: identity }),
29843
+ external_exports.strictObject({
29844
+ kind: external_exports.literal("start"),
29845
+ itemId: identity,
29846
+ onlyIfHead: external_exports.literal(true).optional()
29847
+ })
29848
+ ])
29849
+ }),
29730
29850
  external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
29731
29851
  external_exports.strictObject({
29732
29852
  kind: external_exports.literal("rename"),
@@ -29987,8 +30107,8 @@ var VERSION_MANAGER_ROOTS = "<version-managers>";
29987
30107
  function installRootExtensions(platform) {
29988
30108
  return platform === "win32" ? [".exe", ".cmd"] : [""];
29989
30109
  }
29990
- function resolveHomeDirectory(input) {
29991
- return input.homeDirectory ?? environmentValue(input.environment, "HOME") ?? environmentValue(input.environment, "USERPROFILE") ?? os.homedir();
30110
+ function resolveHomeDirectory(input2) {
30111
+ return input2.homeDirectory ?? environmentValue(input2.environment, "HOME") ?? environmentValue(input2.environment, "USERPROFILE") ?? os.homedir();
29992
30112
  }
29993
30113
  function templateVariables(environment, platform, home) {
29994
30114
  const pathFlavor = targetPath(platform);
@@ -30021,36 +30141,36 @@ function expandInstallRoot(template, environment, platform, home) {
30021
30141
  });
30022
30142
  return unresolved ? void 0 : joinTemplate(platform, substituted);
30023
30143
  }
30024
- function installRootDirectories(spec, input, dependencies, platform, home) {
30144
+ function installRootDirectories(spec, input2, dependencies, platform, home) {
30025
30145
  const templates = (platform === "win32" ? spec.installRoots?.windows : spec.installRoots?.posix) ?? [];
30026
30146
  const directories = [];
30027
30147
  for (const template of templates) {
30028
30148
  if (template === VERSION_MANAGER_ROOTS) {
30029
30149
  directories.push(...versionManagerBinaryDirectories({
30030
30150
  platform,
30031
- environment: input.environment,
30151
+ environment: input2.environment,
30032
30152
  home,
30033
30153
  ...dependencies.subdirectories ? { subdirectories: dependencies.subdirectories } : {}
30034
30154
  }));
30035
30155
  continue;
30036
30156
  }
30037
- const directory = expandInstallRoot(template, input.environment, platform, home);
30157
+ const directory = expandInstallRoot(template, input2.environment, platform, home);
30038
30158
  if (directory !== void 0)
30039
30159
  directories.push(directory);
30040
30160
  }
30041
30161
  return directories;
30042
30162
  }
30043
- function harnessCandidates(spec, input, dependencies = {}) {
30044
- const platform = input.platform ?? process.platform;
30163
+ function harnessCandidates(spec, input2, dependencies = {}) {
30164
+ const platform = input2.platform ?? process.platform;
30045
30165
  const pathFlavor = targetPath(platform);
30046
- const configured = input.command ?? (spec.commandEnvironmentVariable ? environmentValue(input.environment, spec.commandEnvironmentVariable) : void 0);
30166
+ const configured = input2.command ?? (spec.commandEnvironmentVariable ? environmentValue(input2.environment, spec.commandEnvironmentVariable) : void 0);
30047
30167
  const command = configured ?? spec.command;
30048
30168
  if (pathFlavor.isAbsolute(command) || command.includes("/") || command.includes("\\")) {
30049
30169
  return [{ candidate: command, source: "configured" }];
30050
30170
  }
30051
30171
  const candidates = [];
30052
- const extensions = executableExtensions(command, platform, input.environment);
30053
- for (const directory of pathDirectories(input.environment, platform)) {
30172
+ const extensions = executableExtensions(command, platform, input2.environment);
30173
+ for (const directory of pathDirectories(input2.environment, platform)) {
30054
30174
  for (const extension of extensions) {
30055
30175
  candidates.push({
30056
30176
  candidate: pathFlavor.join(directory, command + extension),
@@ -30060,8 +30180,8 @@ function harnessCandidates(spec, input, dependencies = {}) {
30060
30180
  }
30061
30181
  if (configured !== void 0)
30062
30182
  return candidates;
30063
- const home = resolveHomeDirectory(input);
30064
- for (const directory of installRootDirectories(spec, input, dependencies, platform, home)) {
30183
+ const home = resolveHomeDirectory(input2);
30184
+ for (const directory of installRootDirectories(spec, input2, dependencies, platform, home)) {
30065
30185
  for (const extension of installRootExtensions(platform)) {
30066
30186
  candidates.push({
30067
30187
  candidate: pathFlavor.join(directory, spec.command + extension),
@@ -30071,12 +30191,12 @@ function harnessCandidates(spec, input, dependencies = {}) {
30071
30191
  }
30072
30192
  return candidates;
30073
30193
  }
30074
- function resolveHarnessExecutable(spec, input, dependencies = {}) {
30075
- const platform = input.platform ?? process.platform;
30194
+ function resolveHarnessExecutable(spec, input2, dependencies = {}) {
30195
+ const platform = input2.platform ?? process.platform;
30076
30196
  const isExecutable = dependencies.isExecutable ?? ((candidate) => isExecutableFile(candidate, platform));
30077
30197
  const runnable = spec.runnableCandidate ?? ((candidate) => candidate);
30078
30198
  const context = { platform, isExecutable };
30079
- for (const { candidate, source } of harnessCandidates(spec, input, dependencies)) {
30199
+ for (const { candidate, source } of harnessCandidates(spec, input2, dependencies)) {
30080
30200
  const executable = runnable(candidate, context);
30081
30201
  if (executable !== void 0 && isExecutable(executable))
30082
30202
  return { executable, source };
@@ -30087,13 +30207,13 @@ function resolveHarnessExecutable(spec, input, dependencies = {}) {
30087
30207
  // ../../harness-discovery/dist/installation.js
30088
30208
  import { execFile } from "node:child_process";
30089
30209
  import { homedir } from "node:os";
30090
- function runInstallationCommand(command, args, environment, timeout = 3e4) {
30210
+ function runInstallationCommand(command, args, environment, timeout = 3e4, cwd) {
30091
30211
  const env = withNodeRuntimeOnPath(environment);
30092
30212
  const invocation = /\.[cm]?js$/i.test(command) ? commandInvocation(process.execPath, [command, ...args], env) : commandInvocation(command, args, env);
30093
30213
  return new Promise((resolve, reject) => {
30094
30214
  const child = execFile(invocation.command, invocation.arguments, {
30095
30215
  env,
30096
- cwd: env.HOME ?? env.USERPROFILE ?? homedir(),
30216
+ cwd: cwd ?? env.HOME ?? env.USERPROFILE ?? homedir(),
30097
30217
  encoding: "utf8",
30098
30218
  timeout,
30099
30219
  killSignal: "SIGKILL",
@@ -30156,7 +30276,7 @@ function createInstallationManager(options) {
30156
30276
  const check2 = () => checking ??= options.check().finally(() => {
30157
30277
  checking = void 0;
30158
30278
  });
30159
- return (action) => {
30279
+ return (action, confirmedVersion) => {
30160
30280
  if (updating)
30161
30281
  return updating;
30162
30282
  if (action === "check")
@@ -30167,6 +30287,8 @@ function createInstallationManager(options) {
30167
30287
  return before;
30168
30288
  if (!before.canUpdate)
30169
30289
  throw new Error(before.message ?? "This installation cannot be updated automatically");
30290
+ if ((before.latestVerifiedVersion !== void 0 || confirmedVersion !== void 0) && before.latestVersion !== confirmedVersion)
30291
+ return { ...before, confirmationRequired: true };
30170
30292
  await options.update(before);
30171
30293
  const after = await check2();
30172
30294
  if (after.currentVersion === before.currentVersion)
@@ -30301,14 +30423,14 @@ function discoverySpec(variant) {
30301
30423
  }
30302
30424
  var qoderDiscoverySpec = discoverySpec("global");
30303
30425
  var qoderCnDiscoverySpec = discoverySpec("cn");
30304
- function resolveQoderExecutable(input = {}, dependencies = {}) {
30305
- const platform = input.platform ?? process.platform;
30306
- const cn3 = input.variant === "cn";
30426
+ function resolveQoderExecutable(input2 = {}, dependencies = {}) {
30427
+ const platform = input2.platform ?? process.platform;
30428
+ const cn3 = input2.variant === "cn";
30307
30429
  const spec = cn3 ? qoderCnDiscoverySpec : qoderDiscoverySpec;
30308
30430
  const resolution = resolveHarnessExecutable(spec, {
30309
- ...input.command ? { command: input.command } : {},
30310
- environment: input.environment ?? process.env,
30311
- ...input.homeDirectory ? { homeDirectory: input.homeDirectory } : {},
30431
+ ...input2.command ? { command: input2.command } : {},
30432
+ environment: input2.environment ?? process.env,
30433
+ ...input2.homeDirectory ? { homeDirectory: input2.homeDirectory } : {},
30312
30434
  platform
30313
30435
  }, dependencies);
30314
30436
  if (!resolution)
@@ -30508,8 +30630,8 @@ function mapQoderException(error51) {
30508
30630
 
30509
30631
  // ../qoder/dist/qoder-login-check.js
30510
30632
  import { execFile as execFile2 } from "node:child_process";
30511
- function qoderLoginRequired(text) {
30512
- return /\bnot logged in\b|\bauthentication (?:required|expired)\b/i.test(text);
30633
+ function qoderLoginRequired(text2) {
30634
+ return /\bnot logged in\b|\bauthentication (?:required|expired)\b/i.test(text2);
30513
30635
  }
30514
30636
  function checkQoderLogin(executable, environment, cwd) {
30515
30637
  return new Promise((resolve) => {
@@ -30993,8 +31115,8 @@ function parseQoderCommandInvocation(command, catalog = QODER_FALLBACK_COMMAND_C
30993
31115
  };
30994
31116
  }
30995
31117
  }
30996
- const text = typeof args?.text === "string" ? args.text.trim() : "";
30997
- const prompt = text.length > 0 ? `${descriptor.invocation} ${text}` : descriptor.invocation;
31118
+ const text2 = typeof args?.text === "string" ? args.text.trim() : "";
31119
+ const prompt = text2.length > 0 ? `${descriptor.invocation} ${text2}` : descriptor.invocation;
30998
31120
  return {
30999
31121
  ok: true,
31000
31122
  value: {
@@ -31008,9 +31130,9 @@ function parseQoderCommandInvocation(command, catalog = QODER_FALLBACK_COMMAND_C
31008
31130
  var qoderHarnessId = harnessIdSchema.parse("qoder");
31009
31131
  function extractUserText(message) {
31010
31132
  const raw = message.message?.content;
31011
- let text = "";
31133
+ let text2 = "";
31012
31134
  if (typeof raw === "string") {
31013
- text = raw;
31135
+ text2 = raw;
31014
31136
  } else if (Array.isArray(raw)) {
31015
31137
  const parts = [];
31016
31138
  for (const block of raw) {
@@ -31021,18 +31143,18 @@ function extractUserText(message) {
31021
31143
  }
31022
31144
  }
31023
31145
  }
31024
- text = parts.join("\n");
31146
+ text2 = parts.join("\n");
31025
31147
  }
31026
- text = text.replace(/<local-command-caveat>[\s\S]*?<\/local-command-caveat>/gu, "").trim();
31027
- const cmdNameMatch = /<command-name>\s*(\/[^\s<]+)\s*<\/command-name>/u.exec(text);
31148
+ text2 = text2.replace(/<local-command-caveat>[\s\S]*?<\/local-command-caveat>/gu, "").trim();
31149
+ const cmdNameMatch = /<command-name>\s*(\/[^\s<]+)\s*<\/command-name>/u.exec(text2);
31028
31150
  if (cmdNameMatch?.[1]) {
31029
31151
  return cmdNameMatch[1];
31030
31152
  }
31031
- const cmdMsgMatch = /<command-message>([\s\S]*?)<\/command-message>/u.exec(text);
31153
+ const cmdMsgMatch = /<command-message>([\s\S]*?)<\/command-message>/u.exec(text2);
31032
31154
  if (cmdMsgMatch?.[1]) {
31033
31155
  return cmdMsgMatch[1].trim();
31034
31156
  }
31035
- return text;
31157
+ return text2;
31036
31158
  }
31037
31159
  function isHumanUser(message) {
31038
31160
  if (message.type !== "user")
@@ -31047,8 +31169,8 @@ function isHumanUser(message) {
31047
31169
  return false;
31048
31170
  }
31049
31171
  }
31050
- const text = extractUserText(message);
31051
- return text.trim().length > 0;
31172
+ const text2 = extractUserText(message);
31173
+ return text2.trim().length > 0;
31052
31174
  }
31053
31175
  function collectToolResults(messages) {
31054
31176
  const results = /* @__PURE__ */ new Map();
@@ -31110,7 +31232,7 @@ function mapQoderSnapshot(messages, sessionId, harnessId = qoderHarnessId) {
31110
31232
  formatVersion: 1
31111
31233
  });
31112
31234
  const userText = extractUserText(user);
31113
- const input = userText.length > 0 ? [{ type: "text", text: userText }] : [];
31235
+ const input2 = userText.length > 0 ? [{ type: "text", text: userText }] : [];
31114
31236
  const hasError = turnMessages.some((m) => m.type === "assistant" && (m.isApiErrorMessage || typeof m.message === "object" && m.message !== null && Boolean(m.message.error)));
31115
31237
  const lastAssistant = checkpointMessage?.message;
31116
31238
  const hasIncompleteTool = turnMessages.some((message) => {
@@ -31245,7 +31367,7 @@ function mapQoderSnapshot(messages, sessionId, harnessId = qoderHarnessId) {
31245
31367
  turns.push({
31246
31368
  nativeTurnRef,
31247
31369
  ...checkpoint ? { checkpoint } : {},
31248
- input,
31370
+ input: input2,
31249
31371
  items,
31250
31372
  outcome
31251
31373
  });
@@ -32241,41 +32363,41 @@ var ZodType2 = class {
32241
32363
  get description() {
32242
32364
  return this._def.description;
32243
32365
  }
32244
- _getType(input) {
32245
- return getParsedType2(input.data);
32366
+ _getType(input2) {
32367
+ return getParsedType2(input2.data);
32246
32368
  }
32247
- _getOrReturnCtx(input, ctx) {
32369
+ _getOrReturnCtx(input2, ctx) {
32248
32370
  return ctx || {
32249
- common: input.parent.common,
32250
- data: input.data,
32251
- parsedType: getParsedType2(input.data),
32371
+ common: input2.parent.common,
32372
+ data: input2.data,
32373
+ parsedType: getParsedType2(input2.data),
32252
32374
  schemaErrorMap: this._def.errorMap,
32253
- path: input.path,
32254
- parent: input.parent
32375
+ path: input2.path,
32376
+ parent: input2.parent
32255
32377
  };
32256
32378
  }
32257
- _processInputParams(input) {
32379
+ _processInputParams(input2) {
32258
32380
  return {
32259
32381
  status: new ParseStatus(),
32260
32382
  ctx: {
32261
- common: input.parent.common,
32262
- data: input.data,
32263
- parsedType: getParsedType2(input.data),
32383
+ common: input2.parent.common,
32384
+ data: input2.data,
32385
+ parsedType: getParsedType2(input2.data),
32264
32386
  schemaErrorMap: this._def.errorMap,
32265
- path: input.path,
32266
- parent: input.parent
32387
+ path: input2.path,
32388
+ parent: input2.parent
32267
32389
  }
32268
32390
  };
32269
32391
  }
32270
- _parseSync(input) {
32271
- const result = this._parse(input);
32392
+ _parseSync(input2) {
32393
+ const result = this._parse(input2);
32272
32394
  if (isAsync(result)) {
32273
32395
  throw new Error("Synchronous parse encountered promise.");
32274
32396
  }
32275
32397
  return result;
32276
32398
  }
32277
- _parseAsync(input) {
32278
- const result = this._parse(input);
32399
+ _parseAsync(input2) {
32400
+ const result = this._parse(input2);
32279
32401
  return Promise.resolve(result);
32280
32402
  }
32281
32403
  parse(data, params) {
@@ -32601,13 +32723,13 @@ function isValidCidr(ip, version2) {
32601
32723
  return false;
32602
32724
  }
32603
32725
  var ZodString2 = class _ZodString2 extends ZodType2 {
32604
- _parse(input) {
32726
+ _parse(input2) {
32605
32727
  if (this._def.coerce) {
32606
- input.data = String(input.data);
32728
+ input2.data = String(input2.data);
32607
32729
  }
32608
- const parsedType2 = this._getType(input);
32730
+ const parsedType2 = this._getType(input2);
32609
32731
  if (parsedType2 !== ZodParsedType.string) {
32610
- const ctx2 = this._getOrReturnCtx(input);
32732
+ const ctx2 = this._getOrReturnCtx(input2);
32611
32733
  addIssueToContext(ctx2, {
32612
32734
  code: ZodIssueCode2.invalid_type,
32613
32735
  expected: ZodParsedType.string,
@@ -32619,8 +32741,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32619
32741
  let ctx = void 0;
32620
32742
  for (const check2 of this._def.checks) {
32621
32743
  if (check2.kind === "min") {
32622
- if (input.data.length < check2.value) {
32623
- ctx = this._getOrReturnCtx(input, ctx);
32744
+ if (input2.data.length < check2.value) {
32745
+ ctx = this._getOrReturnCtx(input2, ctx);
32624
32746
  addIssueToContext(ctx, {
32625
32747
  code: ZodIssueCode2.too_small,
32626
32748
  minimum: check2.value,
@@ -32632,8 +32754,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32632
32754
  status.dirty();
32633
32755
  }
32634
32756
  } else if (check2.kind === "max") {
32635
- if (input.data.length > check2.value) {
32636
- ctx = this._getOrReturnCtx(input, ctx);
32757
+ if (input2.data.length > check2.value) {
32758
+ ctx = this._getOrReturnCtx(input2, ctx);
32637
32759
  addIssueToContext(ctx, {
32638
32760
  code: ZodIssueCode2.too_big,
32639
32761
  maximum: check2.value,
@@ -32645,10 +32767,10 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32645
32767
  status.dirty();
32646
32768
  }
32647
32769
  } else if (check2.kind === "length") {
32648
- const tooBig = input.data.length > check2.value;
32649
- const tooSmall = input.data.length < check2.value;
32770
+ const tooBig = input2.data.length > check2.value;
32771
+ const tooSmall = input2.data.length < check2.value;
32650
32772
  if (tooBig || tooSmall) {
32651
- ctx = this._getOrReturnCtx(input, ctx);
32773
+ ctx = this._getOrReturnCtx(input2, ctx);
32652
32774
  if (tooBig) {
32653
32775
  addIssueToContext(ctx, {
32654
32776
  code: ZodIssueCode2.too_big,
@@ -32671,8 +32793,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32671
32793
  status.dirty();
32672
32794
  }
32673
32795
  } else if (check2.kind === "email") {
32674
- if (!emailRegex.test(input.data)) {
32675
- ctx = this._getOrReturnCtx(input, ctx);
32796
+ if (!emailRegex.test(input2.data)) {
32797
+ ctx = this._getOrReturnCtx(input2, ctx);
32676
32798
  addIssueToContext(ctx, {
32677
32799
  validation: "email",
32678
32800
  code: ZodIssueCode2.invalid_string,
@@ -32684,8 +32806,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32684
32806
  if (!emojiRegex) {
32685
32807
  emojiRegex = new RegExp(_emojiRegex, "u");
32686
32808
  }
32687
- if (!emojiRegex.test(input.data)) {
32688
- ctx = this._getOrReturnCtx(input, ctx);
32809
+ if (!emojiRegex.test(input2.data)) {
32810
+ ctx = this._getOrReturnCtx(input2, ctx);
32689
32811
  addIssueToContext(ctx, {
32690
32812
  validation: "emoji",
32691
32813
  code: ZodIssueCode2.invalid_string,
@@ -32694,8 +32816,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32694
32816
  status.dirty();
32695
32817
  }
32696
32818
  } else if (check2.kind === "uuid") {
32697
- if (!uuidRegex.test(input.data)) {
32698
- ctx = this._getOrReturnCtx(input, ctx);
32819
+ if (!uuidRegex.test(input2.data)) {
32820
+ ctx = this._getOrReturnCtx(input2, ctx);
32699
32821
  addIssueToContext(ctx, {
32700
32822
  validation: "uuid",
32701
32823
  code: ZodIssueCode2.invalid_string,
@@ -32704,8 +32826,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32704
32826
  status.dirty();
32705
32827
  }
32706
32828
  } else if (check2.kind === "nanoid") {
32707
- if (!nanoidRegex.test(input.data)) {
32708
- ctx = this._getOrReturnCtx(input, ctx);
32829
+ if (!nanoidRegex.test(input2.data)) {
32830
+ ctx = this._getOrReturnCtx(input2, ctx);
32709
32831
  addIssueToContext(ctx, {
32710
32832
  validation: "nanoid",
32711
32833
  code: ZodIssueCode2.invalid_string,
@@ -32714,8 +32836,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32714
32836
  status.dirty();
32715
32837
  }
32716
32838
  } else if (check2.kind === "cuid") {
32717
- if (!cuidRegex.test(input.data)) {
32718
- ctx = this._getOrReturnCtx(input, ctx);
32839
+ if (!cuidRegex.test(input2.data)) {
32840
+ ctx = this._getOrReturnCtx(input2, ctx);
32719
32841
  addIssueToContext(ctx, {
32720
32842
  validation: "cuid",
32721
32843
  code: ZodIssueCode2.invalid_string,
@@ -32724,8 +32846,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32724
32846
  status.dirty();
32725
32847
  }
32726
32848
  } else if (check2.kind === "cuid2") {
32727
- if (!cuid2Regex.test(input.data)) {
32728
- ctx = this._getOrReturnCtx(input, ctx);
32849
+ if (!cuid2Regex.test(input2.data)) {
32850
+ ctx = this._getOrReturnCtx(input2, ctx);
32729
32851
  addIssueToContext(ctx, {
32730
32852
  validation: "cuid2",
32731
32853
  code: ZodIssueCode2.invalid_string,
@@ -32734,8 +32856,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32734
32856
  status.dirty();
32735
32857
  }
32736
32858
  } else if (check2.kind === "ulid") {
32737
- if (!ulidRegex.test(input.data)) {
32738
- ctx = this._getOrReturnCtx(input, ctx);
32859
+ if (!ulidRegex.test(input2.data)) {
32860
+ ctx = this._getOrReturnCtx(input2, ctx);
32739
32861
  addIssueToContext(ctx, {
32740
32862
  validation: "ulid",
32741
32863
  code: ZodIssueCode2.invalid_string,
@@ -32745,9 +32867,9 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32745
32867
  }
32746
32868
  } else if (check2.kind === "url") {
32747
32869
  try {
32748
- new URL(input.data);
32870
+ new URL(input2.data);
32749
32871
  } catch {
32750
- ctx = this._getOrReturnCtx(input, ctx);
32872
+ ctx = this._getOrReturnCtx(input2, ctx);
32751
32873
  addIssueToContext(ctx, {
32752
32874
  validation: "url",
32753
32875
  code: ZodIssueCode2.invalid_string,
@@ -32757,9 +32879,9 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32757
32879
  }
32758
32880
  } else if (check2.kind === "regex") {
32759
32881
  check2.regex.lastIndex = 0;
32760
- const testResult = check2.regex.test(input.data);
32882
+ const testResult = check2.regex.test(input2.data);
32761
32883
  if (!testResult) {
32762
- ctx = this._getOrReturnCtx(input, ctx);
32884
+ ctx = this._getOrReturnCtx(input2, ctx);
32763
32885
  addIssueToContext(ctx, {
32764
32886
  validation: "regex",
32765
32887
  code: ZodIssueCode2.invalid_string,
@@ -32768,10 +32890,10 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32768
32890
  status.dirty();
32769
32891
  }
32770
32892
  } else if (check2.kind === "trim") {
32771
- input.data = input.data.trim();
32893
+ input2.data = input2.data.trim();
32772
32894
  } else if (check2.kind === "includes") {
32773
- if (!input.data.includes(check2.value, check2.position)) {
32774
- ctx = this._getOrReturnCtx(input, ctx);
32895
+ if (!input2.data.includes(check2.value, check2.position)) {
32896
+ ctx = this._getOrReturnCtx(input2, ctx);
32775
32897
  addIssueToContext(ctx, {
32776
32898
  code: ZodIssueCode2.invalid_string,
32777
32899
  validation: { includes: check2.value, position: check2.position },
@@ -32780,12 +32902,12 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32780
32902
  status.dirty();
32781
32903
  }
32782
32904
  } else if (check2.kind === "toLowerCase") {
32783
- input.data = input.data.toLowerCase();
32905
+ input2.data = input2.data.toLowerCase();
32784
32906
  } else if (check2.kind === "toUpperCase") {
32785
- input.data = input.data.toUpperCase();
32907
+ input2.data = input2.data.toUpperCase();
32786
32908
  } else if (check2.kind === "startsWith") {
32787
- if (!input.data.startsWith(check2.value)) {
32788
- ctx = this._getOrReturnCtx(input, ctx);
32909
+ if (!input2.data.startsWith(check2.value)) {
32910
+ ctx = this._getOrReturnCtx(input2, ctx);
32789
32911
  addIssueToContext(ctx, {
32790
32912
  code: ZodIssueCode2.invalid_string,
32791
32913
  validation: { startsWith: check2.value },
@@ -32794,8 +32916,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32794
32916
  status.dirty();
32795
32917
  }
32796
32918
  } else if (check2.kind === "endsWith") {
32797
- if (!input.data.endsWith(check2.value)) {
32798
- ctx = this._getOrReturnCtx(input, ctx);
32919
+ if (!input2.data.endsWith(check2.value)) {
32920
+ ctx = this._getOrReturnCtx(input2, ctx);
32799
32921
  addIssueToContext(ctx, {
32800
32922
  code: ZodIssueCode2.invalid_string,
32801
32923
  validation: { endsWith: check2.value },
@@ -32805,8 +32927,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32805
32927
  }
32806
32928
  } else if (check2.kind === "datetime") {
32807
32929
  const regex = datetimeRegex(check2);
32808
- if (!regex.test(input.data)) {
32809
- ctx = this._getOrReturnCtx(input, ctx);
32930
+ if (!regex.test(input2.data)) {
32931
+ ctx = this._getOrReturnCtx(input2, ctx);
32810
32932
  addIssueToContext(ctx, {
32811
32933
  code: ZodIssueCode2.invalid_string,
32812
32934
  validation: "datetime",
@@ -32816,8 +32938,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32816
32938
  }
32817
32939
  } else if (check2.kind === "date") {
32818
32940
  const regex = dateRegex;
32819
- if (!regex.test(input.data)) {
32820
- ctx = this._getOrReturnCtx(input, ctx);
32941
+ if (!regex.test(input2.data)) {
32942
+ ctx = this._getOrReturnCtx(input2, ctx);
32821
32943
  addIssueToContext(ctx, {
32822
32944
  code: ZodIssueCode2.invalid_string,
32823
32945
  validation: "date",
@@ -32827,8 +32949,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32827
32949
  }
32828
32950
  } else if (check2.kind === "time") {
32829
32951
  const regex = timeRegex(check2);
32830
- if (!regex.test(input.data)) {
32831
- ctx = this._getOrReturnCtx(input, ctx);
32952
+ if (!regex.test(input2.data)) {
32953
+ ctx = this._getOrReturnCtx(input2, ctx);
32832
32954
  addIssueToContext(ctx, {
32833
32955
  code: ZodIssueCode2.invalid_string,
32834
32956
  validation: "time",
@@ -32837,8 +32959,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32837
32959
  status.dirty();
32838
32960
  }
32839
32961
  } else if (check2.kind === "duration") {
32840
- if (!durationRegex.test(input.data)) {
32841
- ctx = this._getOrReturnCtx(input, ctx);
32962
+ if (!durationRegex.test(input2.data)) {
32963
+ ctx = this._getOrReturnCtx(input2, ctx);
32842
32964
  addIssueToContext(ctx, {
32843
32965
  validation: "duration",
32844
32966
  code: ZodIssueCode2.invalid_string,
@@ -32847,8 +32969,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32847
32969
  status.dirty();
32848
32970
  }
32849
32971
  } else if (check2.kind === "ip") {
32850
- if (!isValidIP(input.data, check2.version)) {
32851
- ctx = this._getOrReturnCtx(input, ctx);
32972
+ if (!isValidIP(input2.data, check2.version)) {
32973
+ ctx = this._getOrReturnCtx(input2, ctx);
32852
32974
  addIssueToContext(ctx, {
32853
32975
  validation: "ip",
32854
32976
  code: ZodIssueCode2.invalid_string,
@@ -32857,8 +32979,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32857
32979
  status.dirty();
32858
32980
  }
32859
32981
  } else if (check2.kind === "jwt") {
32860
- if (!isValidJWT2(input.data, check2.alg)) {
32861
- ctx = this._getOrReturnCtx(input, ctx);
32982
+ if (!isValidJWT2(input2.data, check2.alg)) {
32983
+ ctx = this._getOrReturnCtx(input2, ctx);
32862
32984
  addIssueToContext(ctx, {
32863
32985
  validation: "jwt",
32864
32986
  code: ZodIssueCode2.invalid_string,
@@ -32867,8 +32989,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32867
32989
  status.dirty();
32868
32990
  }
32869
32991
  } else if (check2.kind === "cidr") {
32870
- if (!isValidCidr(input.data, check2.version)) {
32871
- ctx = this._getOrReturnCtx(input, ctx);
32992
+ if (!isValidCidr(input2.data, check2.version)) {
32993
+ ctx = this._getOrReturnCtx(input2, ctx);
32872
32994
  addIssueToContext(ctx, {
32873
32995
  validation: "cidr",
32874
32996
  code: ZodIssueCode2.invalid_string,
@@ -32877,8 +32999,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32877
32999
  status.dirty();
32878
33000
  }
32879
33001
  } else if (check2.kind === "base64") {
32880
- if (!base64Regex.test(input.data)) {
32881
- ctx = this._getOrReturnCtx(input, ctx);
33002
+ if (!base64Regex.test(input2.data)) {
33003
+ ctx = this._getOrReturnCtx(input2, ctx);
32882
33004
  addIssueToContext(ctx, {
32883
33005
  validation: "base64",
32884
33006
  code: ZodIssueCode2.invalid_string,
@@ -32887,8 +33009,8 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32887
33009
  status.dirty();
32888
33010
  }
32889
33011
  } else if (check2.kind === "base64url") {
32890
- if (!base64urlRegex.test(input.data)) {
32891
- ctx = this._getOrReturnCtx(input, ctx);
33012
+ if (!base64urlRegex.test(input2.data)) {
33013
+ ctx = this._getOrReturnCtx(input2, ctx);
32892
33014
  addIssueToContext(ctx, {
32893
33015
  validation: "base64url",
32894
33016
  code: ZodIssueCode2.invalid_string,
@@ -32900,7 +33022,7 @@ var ZodString2 = class _ZodString2 extends ZodType2 {
32900
33022
  util.assertNever(check2);
32901
33023
  }
32902
33024
  }
32903
- return { status: status.value, value: input.data };
33025
+ return { status: status.value, value: input2.data };
32904
33026
  }
32905
33027
  _regex(regex, validation, message) {
32906
33028
  return this.refinement((data) => regex.test(data), {
@@ -33161,13 +33283,13 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33161
33283
  this.max = this.lte;
33162
33284
  this.step = this.multipleOf;
33163
33285
  }
33164
- _parse(input) {
33286
+ _parse(input2) {
33165
33287
  if (this._def.coerce) {
33166
- input.data = Number(input.data);
33288
+ input2.data = Number(input2.data);
33167
33289
  }
33168
- const parsedType2 = this._getType(input);
33290
+ const parsedType2 = this._getType(input2);
33169
33291
  if (parsedType2 !== ZodParsedType.number) {
33170
- const ctx2 = this._getOrReturnCtx(input);
33292
+ const ctx2 = this._getOrReturnCtx(input2);
33171
33293
  addIssueToContext(ctx2, {
33172
33294
  code: ZodIssueCode2.invalid_type,
33173
33295
  expected: ZodParsedType.number,
@@ -33179,8 +33301,8 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33179
33301
  const status = new ParseStatus();
33180
33302
  for (const check2 of this._def.checks) {
33181
33303
  if (check2.kind === "int") {
33182
- if (!util.isInteger(input.data)) {
33183
- ctx = this._getOrReturnCtx(input, ctx);
33304
+ if (!util.isInteger(input2.data)) {
33305
+ ctx = this._getOrReturnCtx(input2, ctx);
33184
33306
  addIssueToContext(ctx, {
33185
33307
  code: ZodIssueCode2.invalid_type,
33186
33308
  expected: "integer",
@@ -33190,9 +33312,9 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33190
33312
  status.dirty();
33191
33313
  }
33192
33314
  } else if (check2.kind === "min") {
33193
- const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
33315
+ const tooSmall = check2.inclusive ? input2.data < check2.value : input2.data <= check2.value;
33194
33316
  if (tooSmall) {
33195
- ctx = this._getOrReturnCtx(input, ctx);
33317
+ ctx = this._getOrReturnCtx(input2, ctx);
33196
33318
  addIssueToContext(ctx, {
33197
33319
  code: ZodIssueCode2.too_small,
33198
33320
  minimum: check2.value,
@@ -33204,9 +33326,9 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33204
33326
  status.dirty();
33205
33327
  }
33206
33328
  } else if (check2.kind === "max") {
33207
- const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
33329
+ const tooBig = check2.inclusive ? input2.data > check2.value : input2.data >= check2.value;
33208
33330
  if (tooBig) {
33209
- ctx = this._getOrReturnCtx(input, ctx);
33331
+ ctx = this._getOrReturnCtx(input2, ctx);
33210
33332
  addIssueToContext(ctx, {
33211
33333
  code: ZodIssueCode2.too_big,
33212
33334
  maximum: check2.value,
@@ -33218,8 +33340,8 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33218
33340
  status.dirty();
33219
33341
  }
33220
33342
  } else if (check2.kind === "multipleOf") {
33221
- if (floatSafeRemainder2(input.data, check2.value) !== 0) {
33222
- ctx = this._getOrReturnCtx(input, ctx);
33343
+ if (floatSafeRemainder2(input2.data, check2.value) !== 0) {
33344
+ ctx = this._getOrReturnCtx(input2, ctx);
33223
33345
  addIssueToContext(ctx, {
33224
33346
  code: ZodIssueCode2.not_multiple_of,
33225
33347
  multipleOf: check2.value,
@@ -33228,8 +33350,8 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33228
33350
  status.dirty();
33229
33351
  }
33230
33352
  } else if (check2.kind === "finite") {
33231
- if (!Number.isFinite(input.data)) {
33232
- ctx = this._getOrReturnCtx(input, ctx);
33353
+ if (!Number.isFinite(input2.data)) {
33354
+ ctx = this._getOrReturnCtx(input2, ctx);
33233
33355
  addIssueToContext(ctx, {
33234
33356
  code: ZodIssueCode2.not_finite,
33235
33357
  message: check2.message
@@ -33240,7 +33362,7 @@ var ZodNumber2 = class _ZodNumber extends ZodType2 {
33240
33362
  util.assertNever(check2);
33241
33363
  }
33242
33364
  }
33243
- return { status: status.value, value: input.data };
33365
+ return { status: status.value, value: input2.data };
33244
33366
  }
33245
33367
  gte(value, message) {
33246
33368
  return this.setLimit("min", value, true, errorUtil.toString(message));
@@ -33392,25 +33514,25 @@ var ZodBigInt2 = class _ZodBigInt extends ZodType2 {
33392
33514
  this.min = this.gte;
33393
33515
  this.max = this.lte;
33394
33516
  }
33395
- _parse(input) {
33517
+ _parse(input2) {
33396
33518
  if (this._def.coerce) {
33397
33519
  try {
33398
- input.data = BigInt(input.data);
33520
+ input2.data = BigInt(input2.data);
33399
33521
  } catch {
33400
- return this._getInvalidInput(input);
33522
+ return this._getInvalidInput(input2);
33401
33523
  }
33402
33524
  }
33403
- const parsedType2 = this._getType(input);
33525
+ const parsedType2 = this._getType(input2);
33404
33526
  if (parsedType2 !== ZodParsedType.bigint) {
33405
- return this._getInvalidInput(input);
33527
+ return this._getInvalidInput(input2);
33406
33528
  }
33407
33529
  let ctx = void 0;
33408
33530
  const status = new ParseStatus();
33409
33531
  for (const check2 of this._def.checks) {
33410
33532
  if (check2.kind === "min") {
33411
- const tooSmall = check2.inclusive ? input.data < check2.value : input.data <= check2.value;
33533
+ const tooSmall = check2.inclusive ? input2.data < check2.value : input2.data <= check2.value;
33412
33534
  if (tooSmall) {
33413
- ctx = this._getOrReturnCtx(input, ctx);
33535
+ ctx = this._getOrReturnCtx(input2, ctx);
33414
33536
  addIssueToContext(ctx, {
33415
33537
  code: ZodIssueCode2.too_small,
33416
33538
  type: "bigint",
@@ -33421,9 +33543,9 @@ var ZodBigInt2 = class _ZodBigInt extends ZodType2 {
33421
33543
  status.dirty();
33422
33544
  }
33423
33545
  } else if (check2.kind === "max") {
33424
- const tooBig = check2.inclusive ? input.data > check2.value : input.data >= check2.value;
33546
+ const tooBig = check2.inclusive ? input2.data > check2.value : input2.data >= check2.value;
33425
33547
  if (tooBig) {
33426
- ctx = this._getOrReturnCtx(input, ctx);
33548
+ ctx = this._getOrReturnCtx(input2, ctx);
33427
33549
  addIssueToContext(ctx, {
33428
33550
  code: ZodIssueCode2.too_big,
33429
33551
  type: "bigint",
@@ -33434,8 +33556,8 @@ var ZodBigInt2 = class _ZodBigInt extends ZodType2 {
33434
33556
  status.dirty();
33435
33557
  }
33436
33558
  } else if (check2.kind === "multipleOf") {
33437
- if (input.data % check2.value !== BigInt(0)) {
33438
- ctx = this._getOrReturnCtx(input, ctx);
33559
+ if (input2.data % check2.value !== BigInt(0)) {
33560
+ ctx = this._getOrReturnCtx(input2, ctx);
33439
33561
  addIssueToContext(ctx, {
33440
33562
  code: ZodIssueCode2.not_multiple_of,
33441
33563
  multipleOf: check2.value,
@@ -33447,10 +33569,10 @@ var ZodBigInt2 = class _ZodBigInt extends ZodType2 {
33447
33569
  util.assertNever(check2);
33448
33570
  }
33449
33571
  }
33450
- return { status: status.value, value: input.data };
33572
+ return { status: status.value, value: input2.data };
33451
33573
  }
33452
- _getInvalidInput(input) {
33453
- const ctx = this._getOrReturnCtx(input);
33574
+ _getInvalidInput(input2) {
33575
+ const ctx = this._getOrReturnCtx(input2);
33454
33576
  addIssueToContext(ctx, {
33455
33577
  code: ZodIssueCode2.invalid_type,
33456
33578
  expected: ZodParsedType.bigint,
@@ -33559,13 +33681,13 @@ ZodBigInt2.create = (params) => {
33559
33681
  });
33560
33682
  };
33561
33683
  var ZodBoolean2 = class extends ZodType2 {
33562
- _parse(input) {
33684
+ _parse(input2) {
33563
33685
  if (this._def.coerce) {
33564
- input.data = Boolean(input.data);
33686
+ input2.data = Boolean(input2.data);
33565
33687
  }
33566
- const parsedType2 = this._getType(input);
33688
+ const parsedType2 = this._getType(input2);
33567
33689
  if (parsedType2 !== ZodParsedType.boolean) {
33568
- const ctx = this._getOrReturnCtx(input);
33690
+ const ctx = this._getOrReturnCtx(input2);
33569
33691
  addIssueToContext(ctx, {
33570
33692
  code: ZodIssueCode2.invalid_type,
33571
33693
  expected: ZodParsedType.boolean,
@@ -33573,7 +33695,7 @@ var ZodBoolean2 = class extends ZodType2 {
33573
33695
  });
33574
33696
  return INVALID;
33575
33697
  }
33576
- return OK(input.data);
33698
+ return OK(input2.data);
33577
33699
  }
33578
33700
  };
33579
33701
  ZodBoolean2.create = (params) => {
@@ -33584,13 +33706,13 @@ ZodBoolean2.create = (params) => {
33584
33706
  });
33585
33707
  };
33586
33708
  var ZodDate2 = class _ZodDate extends ZodType2 {
33587
- _parse(input) {
33709
+ _parse(input2) {
33588
33710
  if (this._def.coerce) {
33589
- input.data = new Date(input.data);
33711
+ input2.data = new Date(input2.data);
33590
33712
  }
33591
- const parsedType2 = this._getType(input);
33713
+ const parsedType2 = this._getType(input2);
33592
33714
  if (parsedType2 !== ZodParsedType.date) {
33593
- const ctx2 = this._getOrReturnCtx(input);
33715
+ const ctx2 = this._getOrReturnCtx(input2);
33594
33716
  addIssueToContext(ctx2, {
33595
33717
  code: ZodIssueCode2.invalid_type,
33596
33718
  expected: ZodParsedType.date,
@@ -33598,8 +33720,8 @@ var ZodDate2 = class _ZodDate extends ZodType2 {
33598
33720
  });
33599
33721
  return INVALID;
33600
33722
  }
33601
- if (Number.isNaN(input.data.getTime())) {
33602
- const ctx2 = this._getOrReturnCtx(input);
33723
+ if (Number.isNaN(input2.data.getTime())) {
33724
+ const ctx2 = this._getOrReturnCtx(input2);
33603
33725
  addIssueToContext(ctx2, {
33604
33726
  code: ZodIssueCode2.invalid_date
33605
33727
  });
@@ -33609,8 +33731,8 @@ var ZodDate2 = class _ZodDate extends ZodType2 {
33609
33731
  let ctx = void 0;
33610
33732
  for (const check2 of this._def.checks) {
33611
33733
  if (check2.kind === "min") {
33612
- if (input.data.getTime() < check2.value) {
33613
- ctx = this._getOrReturnCtx(input, ctx);
33734
+ if (input2.data.getTime() < check2.value) {
33735
+ ctx = this._getOrReturnCtx(input2, ctx);
33614
33736
  addIssueToContext(ctx, {
33615
33737
  code: ZodIssueCode2.too_small,
33616
33738
  message: check2.message,
@@ -33622,8 +33744,8 @@ var ZodDate2 = class _ZodDate extends ZodType2 {
33622
33744
  status.dirty();
33623
33745
  }
33624
33746
  } else if (check2.kind === "max") {
33625
- if (input.data.getTime() > check2.value) {
33626
- ctx = this._getOrReturnCtx(input, ctx);
33747
+ if (input2.data.getTime() > check2.value) {
33748
+ ctx = this._getOrReturnCtx(input2, ctx);
33627
33749
  addIssueToContext(ctx, {
33628
33750
  code: ZodIssueCode2.too_big,
33629
33751
  message: check2.message,
@@ -33640,7 +33762,7 @@ var ZodDate2 = class _ZodDate extends ZodType2 {
33640
33762
  }
33641
33763
  return {
33642
33764
  status: status.value,
33643
- value: new Date(input.data.getTime())
33765
+ value: new Date(input2.data.getTime())
33644
33766
  };
33645
33767
  }
33646
33768
  _addCheck(check2) {
@@ -33693,10 +33815,10 @@ ZodDate2.create = (params) => {
33693
33815
  });
33694
33816
  };
33695
33817
  var ZodSymbol2 = class extends ZodType2 {
33696
- _parse(input) {
33697
- const parsedType2 = this._getType(input);
33818
+ _parse(input2) {
33819
+ const parsedType2 = this._getType(input2);
33698
33820
  if (parsedType2 !== ZodParsedType.symbol) {
33699
- const ctx = this._getOrReturnCtx(input);
33821
+ const ctx = this._getOrReturnCtx(input2);
33700
33822
  addIssueToContext(ctx, {
33701
33823
  code: ZodIssueCode2.invalid_type,
33702
33824
  expected: ZodParsedType.symbol,
@@ -33704,7 +33826,7 @@ var ZodSymbol2 = class extends ZodType2 {
33704
33826
  });
33705
33827
  return INVALID;
33706
33828
  }
33707
- return OK(input.data);
33829
+ return OK(input2.data);
33708
33830
  }
33709
33831
  };
33710
33832
  ZodSymbol2.create = (params) => {
@@ -33714,10 +33836,10 @@ ZodSymbol2.create = (params) => {
33714
33836
  });
33715
33837
  };
33716
33838
  var ZodUndefined2 = class extends ZodType2 {
33717
- _parse(input) {
33718
- const parsedType2 = this._getType(input);
33839
+ _parse(input2) {
33840
+ const parsedType2 = this._getType(input2);
33719
33841
  if (parsedType2 !== ZodParsedType.undefined) {
33720
- const ctx = this._getOrReturnCtx(input);
33842
+ const ctx = this._getOrReturnCtx(input2);
33721
33843
  addIssueToContext(ctx, {
33722
33844
  code: ZodIssueCode2.invalid_type,
33723
33845
  expected: ZodParsedType.undefined,
@@ -33725,7 +33847,7 @@ var ZodUndefined2 = class extends ZodType2 {
33725
33847
  });
33726
33848
  return INVALID;
33727
33849
  }
33728
- return OK(input.data);
33850
+ return OK(input2.data);
33729
33851
  }
33730
33852
  };
33731
33853
  ZodUndefined2.create = (params) => {
@@ -33735,10 +33857,10 @@ ZodUndefined2.create = (params) => {
33735
33857
  });
33736
33858
  };
33737
33859
  var ZodNull2 = class extends ZodType2 {
33738
- _parse(input) {
33739
- const parsedType2 = this._getType(input);
33860
+ _parse(input2) {
33861
+ const parsedType2 = this._getType(input2);
33740
33862
  if (parsedType2 !== ZodParsedType.null) {
33741
- const ctx = this._getOrReturnCtx(input);
33863
+ const ctx = this._getOrReturnCtx(input2);
33742
33864
  addIssueToContext(ctx, {
33743
33865
  code: ZodIssueCode2.invalid_type,
33744
33866
  expected: ZodParsedType.null,
@@ -33746,7 +33868,7 @@ var ZodNull2 = class extends ZodType2 {
33746
33868
  });
33747
33869
  return INVALID;
33748
33870
  }
33749
- return OK(input.data);
33871
+ return OK(input2.data);
33750
33872
  }
33751
33873
  };
33752
33874
  ZodNull2.create = (params) => {
@@ -33760,8 +33882,8 @@ var ZodAny2 = class extends ZodType2 {
33760
33882
  super(...arguments);
33761
33883
  this._any = true;
33762
33884
  }
33763
- _parse(input) {
33764
- return OK(input.data);
33885
+ _parse(input2) {
33886
+ return OK(input2.data);
33765
33887
  }
33766
33888
  };
33767
33889
  ZodAny2.create = (params) => {
@@ -33775,8 +33897,8 @@ var ZodUnknown2 = class extends ZodType2 {
33775
33897
  super(...arguments);
33776
33898
  this._unknown = true;
33777
33899
  }
33778
- _parse(input) {
33779
- return OK(input.data);
33900
+ _parse(input2) {
33901
+ return OK(input2.data);
33780
33902
  }
33781
33903
  };
33782
33904
  ZodUnknown2.create = (params) => {
@@ -33786,8 +33908,8 @@ ZodUnknown2.create = (params) => {
33786
33908
  });
33787
33909
  };
33788
33910
  var ZodNever2 = class extends ZodType2 {
33789
- _parse(input) {
33790
- const ctx = this._getOrReturnCtx(input);
33911
+ _parse(input2) {
33912
+ const ctx = this._getOrReturnCtx(input2);
33791
33913
  addIssueToContext(ctx, {
33792
33914
  code: ZodIssueCode2.invalid_type,
33793
33915
  expected: ZodParsedType.never,
@@ -33803,10 +33925,10 @@ ZodNever2.create = (params) => {
33803
33925
  });
33804
33926
  };
33805
33927
  var ZodVoid2 = class extends ZodType2 {
33806
- _parse(input) {
33807
- const parsedType2 = this._getType(input);
33928
+ _parse(input2) {
33929
+ const parsedType2 = this._getType(input2);
33808
33930
  if (parsedType2 !== ZodParsedType.undefined) {
33809
- const ctx = this._getOrReturnCtx(input);
33931
+ const ctx = this._getOrReturnCtx(input2);
33810
33932
  addIssueToContext(ctx, {
33811
33933
  code: ZodIssueCode2.invalid_type,
33812
33934
  expected: ZodParsedType.void,
@@ -33814,7 +33936,7 @@ var ZodVoid2 = class extends ZodType2 {
33814
33936
  });
33815
33937
  return INVALID;
33816
33938
  }
33817
- return OK(input.data);
33939
+ return OK(input2.data);
33818
33940
  }
33819
33941
  };
33820
33942
  ZodVoid2.create = (params) => {
@@ -33824,8 +33946,8 @@ ZodVoid2.create = (params) => {
33824
33946
  });
33825
33947
  };
33826
33948
  var ZodArray2 = class _ZodArray extends ZodType2 {
33827
- _parse(input) {
33828
- const { ctx, status } = this._processInputParams(input);
33949
+ _parse(input2) {
33950
+ const { ctx, status } = this._processInputParams(input2);
33829
33951
  const def = this._def;
33830
33952
  if (ctx.parsedType !== ZodParsedType.array) {
33831
33953
  addIssueToContext(ctx, {
@@ -33965,10 +34087,10 @@ var ZodObject2 = class _ZodObject extends ZodType2 {
33965
34087
  this._cached = { shape, keys };
33966
34088
  return this._cached;
33967
34089
  }
33968
- _parse(input) {
33969
- const parsedType2 = this._getType(input);
34090
+ _parse(input2) {
34091
+ const parsedType2 = this._getType(input2);
33970
34092
  if (parsedType2 !== ZodParsedType.object) {
33971
- const ctx2 = this._getOrReturnCtx(input);
34093
+ const ctx2 = this._getOrReturnCtx(input2);
33972
34094
  addIssueToContext(ctx2, {
33973
34095
  code: ZodIssueCode2.invalid_type,
33974
34096
  expected: ZodParsedType.object,
@@ -33976,7 +34098,7 @@ var ZodObject2 = class _ZodObject extends ZodType2 {
33976
34098
  });
33977
34099
  return INVALID;
33978
34100
  }
33979
- const { status, ctx } = this._processInputParams(input);
34101
+ const { status, ctx } = this._processInputParams(input2);
33980
34102
  const { shape, keys: shapeKeys } = this._getCached();
33981
34103
  const extraKeys = [];
33982
34104
  if (!(this._def.catchall instanceof ZodNever2 && this._def.unknownKeys === "strip")) {
@@ -34289,8 +34411,8 @@ ZodObject2.lazycreate = (shape, params) => {
34289
34411
  });
34290
34412
  };
34291
34413
  var ZodUnion2 = class extends ZodType2 {
34292
- _parse(input) {
34293
- const { ctx } = this._processInputParams(input);
34414
+ _parse(input2) {
34415
+ const { ctx } = this._processInputParams(input2);
34294
34416
  const options = this._def.options;
34295
34417
  function handleResults(results) {
34296
34418
  for (const result of results) {
@@ -34411,8 +34533,8 @@ var getDiscriminator = (type) => {
34411
34533
  }
34412
34534
  };
34413
34535
  var ZodDiscriminatedUnion2 = class _ZodDiscriminatedUnion extends ZodType2 {
34414
- _parse(input) {
34415
- const { ctx } = this._processInputParams(input);
34536
+ _parse(input2) {
34537
+ const { ctx } = this._processInputParams(input2);
34416
34538
  if (ctx.parsedType !== ZodParsedType.object) {
34417
34539
  addIssueToContext(ctx, {
34418
34540
  code: ZodIssueCode2.invalid_type,
@@ -34525,8 +34647,8 @@ function mergeValues2(a, b) {
34525
34647
  }
34526
34648
  }
34527
34649
  var ZodIntersection2 = class extends ZodType2 {
34528
- _parse(input) {
34529
- const { status, ctx } = this._processInputParams(input);
34650
+ _parse(input2) {
34651
+ const { status, ctx } = this._processInputParams(input2);
34530
34652
  const handleParsed = (parsedLeft, parsedRight) => {
34531
34653
  if (isAborted(parsedLeft) || isAborted(parsedRight)) {
34532
34654
  return INVALID;
@@ -34578,8 +34700,8 @@ ZodIntersection2.create = (left, right, params) => {
34578
34700
  });
34579
34701
  };
34580
34702
  var ZodTuple2 = class _ZodTuple extends ZodType2 {
34581
- _parse(input) {
34582
- const { status, ctx } = this._processInputParams(input);
34703
+ _parse(input2) {
34704
+ const { status, ctx } = this._processInputParams(input2);
34583
34705
  if (ctx.parsedType !== ZodParsedType.array) {
34584
34706
  addIssueToContext(ctx, {
34585
34707
  code: ZodIssueCode2.invalid_type,
@@ -34651,8 +34773,8 @@ var ZodRecord2 = class _ZodRecord extends ZodType2 {
34651
34773
  get valueSchema() {
34652
34774
  return this._def.valueType;
34653
34775
  }
34654
- _parse(input) {
34655
- const { status, ctx } = this._processInputParams(input);
34776
+ _parse(input2) {
34777
+ const { status, ctx } = this._processInputParams(input2);
34656
34778
  if (ctx.parsedType !== ZodParsedType.object) {
34657
34779
  addIssueToContext(ctx, {
34658
34780
  code: ZodIssueCode2.invalid_type,
@@ -34704,8 +34826,8 @@ var ZodMap2 = class extends ZodType2 {
34704
34826
  get valueSchema() {
34705
34827
  return this._def.valueType;
34706
34828
  }
34707
- _parse(input) {
34708
- const { status, ctx } = this._processInputParams(input);
34829
+ _parse(input2) {
34830
+ const { status, ctx } = this._processInputParams(input2);
34709
34831
  if (ctx.parsedType !== ZodParsedType.map) {
34710
34832
  addIssueToContext(ctx, {
34711
34833
  code: ZodIssueCode2.invalid_type,
@@ -34764,8 +34886,8 @@ ZodMap2.create = (keyType, valueType, params) => {
34764
34886
  });
34765
34887
  };
34766
34888
  var ZodSet2 = class _ZodSet extends ZodType2 {
34767
- _parse(input) {
34768
- const { status, ctx } = this._processInputParams(input);
34889
+ _parse(input2) {
34890
+ const { status, ctx } = this._processInputParams(input2);
34769
34891
  if (ctx.parsedType !== ZodParsedType.set) {
34770
34892
  addIssueToContext(ctx, {
34771
34893
  code: ZodIssueCode2.invalid_type,
@@ -34853,8 +34975,8 @@ var ZodFunction2 = class _ZodFunction extends ZodType2 {
34853
34975
  super(...arguments);
34854
34976
  this.validate = this.implement;
34855
34977
  }
34856
- _parse(input) {
34857
- const { ctx } = this._processInputParams(input);
34978
+ _parse(input2) {
34979
+ const { ctx } = this._processInputParams(input2);
34858
34980
  if (ctx.parsedType !== ZodParsedType.function) {
34859
34981
  addIssueToContext(ctx, {
34860
34982
  code: ZodIssueCode2.invalid_type,
@@ -34957,8 +35079,8 @@ var ZodLazy2 = class extends ZodType2 {
34957
35079
  get schema() {
34958
35080
  return this._def.getter();
34959
35081
  }
34960
- _parse(input) {
34961
- const { ctx } = this._processInputParams(input);
35082
+ _parse(input2) {
35083
+ const { ctx } = this._processInputParams(input2);
34962
35084
  const lazySchema = this._def.getter();
34963
35085
  return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });
34964
35086
  }
@@ -34971,9 +35093,9 @@ ZodLazy2.create = (getter, params) => {
34971
35093
  });
34972
35094
  };
34973
35095
  var ZodLiteral2 = class extends ZodType2 {
34974
- _parse(input) {
34975
- if (input.data !== this._def.value) {
34976
- const ctx = this._getOrReturnCtx(input);
35096
+ _parse(input2) {
35097
+ if (input2.data !== this._def.value) {
35098
+ const ctx = this._getOrReturnCtx(input2);
34977
35099
  addIssueToContext(ctx, {
34978
35100
  received: ctx.data,
34979
35101
  code: ZodIssueCode2.invalid_literal,
@@ -34981,7 +35103,7 @@ var ZodLiteral2 = class extends ZodType2 {
34981
35103
  });
34982
35104
  return INVALID;
34983
35105
  }
34984
- return { status: "valid", value: input.data };
35106
+ return { status: "valid", value: input2.data };
34985
35107
  }
34986
35108
  get value() {
34987
35109
  return this._def.value;
@@ -35002,9 +35124,9 @@ function createZodEnum(values, params) {
35002
35124
  });
35003
35125
  }
35004
35126
  var ZodEnum2 = class _ZodEnum extends ZodType2 {
35005
- _parse(input) {
35006
- if (typeof input.data !== "string") {
35007
- const ctx = this._getOrReturnCtx(input);
35127
+ _parse(input2) {
35128
+ if (typeof input2.data !== "string") {
35129
+ const ctx = this._getOrReturnCtx(input2);
35008
35130
  const expectedValues = this._def.values;
35009
35131
  addIssueToContext(ctx, {
35010
35132
  expected: util.joinValues(expectedValues),
@@ -35016,8 +35138,8 @@ var ZodEnum2 = class _ZodEnum extends ZodType2 {
35016
35138
  if (!this._cache) {
35017
35139
  this._cache = new Set(this._def.values);
35018
35140
  }
35019
- if (!this._cache.has(input.data)) {
35020
- const ctx = this._getOrReturnCtx(input);
35141
+ if (!this._cache.has(input2.data)) {
35142
+ const ctx = this._getOrReturnCtx(input2);
35021
35143
  const expectedValues = this._def.values;
35022
35144
  addIssueToContext(ctx, {
35023
35145
  received: ctx.data,
@@ -35026,7 +35148,7 @@ var ZodEnum2 = class _ZodEnum extends ZodType2 {
35026
35148
  });
35027
35149
  return INVALID;
35028
35150
  }
35029
- return OK(input.data);
35151
+ return OK(input2.data);
35030
35152
  }
35031
35153
  get options() {
35032
35154
  return this._def.values;
@@ -35067,9 +35189,9 @@ var ZodEnum2 = class _ZodEnum extends ZodType2 {
35067
35189
  };
35068
35190
  ZodEnum2.create = createZodEnum;
35069
35191
  var ZodNativeEnum = class extends ZodType2 {
35070
- _parse(input) {
35192
+ _parse(input2) {
35071
35193
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
35072
- const ctx = this._getOrReturnCtx(input);
35194
+ const ctx = this._getOrReturnCtx(input2);
35073
35195
  if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {
35074
35196
  const expectedValues = util.objectValues(nativeEnumValues);
35075
35197
  addIssueToContext(ctx, {
@@ -35082,7 +35204,7 @@ var ZodNativeEnum = class extends ZodType2 {
35082
35204
  if (!this._cache) {
35083
35205
  this._cache = new Set(util.getValidEnumValues(this._def.values));
35084
35206
  }
35085
- if (!this._cache.has(input.data)) {
35207
+ if (!this._cache.has(input2.data)) {
35086
35208
  const expectedValues = util.objectValues(nativeEnumValues);
35087
35209
  addIssueToContext(ctx, {
35088
35210
  received: ctx.data,
@@ -35091,7 +35213,7 @@ var ZodNativeEnum = class extends ZodType2 {
35091
35213
  });
35092
35214
  return INVALID;
35093
35215
  }
35094
- return OK(input.data);
35216
+ return OK(input2.data);
35095
35217
  }
35096
35218
  get enum() {
35097
35219
  return this._def.values;
@@ -35108,8 +35230,8 @@ var ZodPromise2 = class extends ZodType2 {
35108
35230
  unwrap() {
35109
35231
  return this._def.type;
35110
35232
  }
35111
- _parse(input) {
35112
- const { ctx } = this._processInputParams(input);
35233
+ _parse(input2) {
35234
+ const { ctx } = this._processInputParams(input2);
35113
35235
  if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {
35114
35236
  addIssueToContext(ctx, {
35115
35237
  code: ZodIssueCode2.invalid_type,
@@ -35141,8 +35263,8 @@ var ZodEffects = class extends ZodType2 {
35141
35263
  sourceType() {
35142
35264
  return this._def.schema._def.typeName === ZodFirstPartyTypeKind2.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
35143
35265
  }
35144
- _parse(input) {
35145
- const { status, ctx } = this._processInputParams(input);
35266
+ _parse(input2) {
35267
+ const { status, ctx } = this._processInputParams(input2);
35146
35268
  const effect = this._def.effect || null;
35147
35269
  const checkCtx = {
35148
35270
  addIssue: (arg) => {
@@ -35274,12 +35396,12 @@ ZodEffects.createWithPreprocess = (preprocess2, schema, params) => {
35274
35396
  });
35275
35397
  };
35276
35398
  var ZodOptional2 = class extends ZodType2 {
35277
- _parse(input) {
35278
- const parsedType2 = this._getType(input);
35399
+ _parse(input2) {
35400
+ const parsedType2 = this._getType(input2);
35279
35401
  if (parsedType2 === ZodParsedType.undefined) {
35280
35402
  return OK(void 0);
35281
35403
  }
35282
- return this._def.innerType._parse(input);
35404
+ return this._def.innerType._parse(input2);
35283
35405
  }
35284
35406
  unwrap() {
35285
35407
  return this._def.innerType;
@@ -35293,12 +35415,12 @@ ZodOptional2.create = (type, params) => {
35293
35415
  });
35294
35416
  };
35295
35417
  var ZodNullable2 = class extends ZodType2 {
35296
- _parse(input) {
35297
- const parsedType2 = this._getType(input);
35418
+ _parse(input2) {
35419
+ const parsedType2 = this._getType(input2);
35298
35420
  if (parsedType2 === ZodParsedType.null) {
35299
35421
  return OK(null);
35300
35422
  }
35301
- return this._def.innerType._parse(input);
35423
+ return this._def.innerType._parse(input2);
35302
35424
  }
35303
35425
  unwrap() {
35304
35426
  return this._def.innerType;
@@ -35312,8 +35434,8 @@ ZodNullable2.create = (type, params) => {
35312
35434
  });
35313
35435
  };
35314
35436
  var ZodDefault2 = class extends ZodType2 {
35315
- _parse(input) {
35316
- const { ctx } = this._processInputParams(input);
35437
+ _parse(input2) {
35438
+ const { ctx } = this._processInputParams(input2);
35317
35439
  let data = ctx.data;
35318
35440
  if (ctx.parsedType === ZodParsedType.undefined) {
35319
35441
  data = this._def.defaultValue();
@@ -35337,8 +35459,8 @@ ZodDefault2.create = (type, params) => {
35337
35459
  });
35338
35460
  };
35339
35461
  var ZodCatch2 = class extends ZodType2 {
35340
- _parse(input) {
35341
- const { ctx } = this._processInputParams(input);
35462
+ _parse(input2) {
35463
+ const { ctx } = this._processInputParams(input2);
35342
35464
  const newCtx = {
35343
35465
  ...ctx,
35344
35466
  common: {
@@ -35390,10 +35512,10 @@ ZodCatch2.create = (type, params) => {
35390
35512
  });
35391
35513
  };
35392
35514
  var ZodNaN2 = class extends ZodType2 {
35393
- _parse(input) {
35394
- const parsedType2 = this._getType(input);
35515
+ _parse(input2) {
35516
+ const parsedType2 = this._getType(input2);
35395
35517
  if (parsedType2 !== ZodParsedType.nan) {
35396
- const ctx = this._getOrReturnCtx(input);
35518
+ const ctx = this._getOrReturnCtx(input2);
35397
35519
  addIssueToContext(ctx, {
35398
35520
  code: ZodIssueCode2.invalid_type,
35399
35521
  expected: ZodParsedType.nan,
@@ -35401,7 +35523,7 @@ var ZodNaN2 = class extends ZodType2 {
35401
35523
  });
35402
35524
  return INVALID;
35403
35525
  }
35404
- return { status: "valid", value: input.data };
35526
+ return { status: "valid", value: input2.data };
35405
35527
  }
35406
35528
  };
35407
35529
  ZodNaN2.create = (params) => {
@@ -35411,8 +35533,8 @@ ZodNaN2.create = (params) => {
35411
35533
  });
35412
35534
  };
35413
35535
  var ZodBranded = class extends ZodType2 {
35414
- _parse(input) {
35415
- const { ctx } = this._processInputParams(input);
35536
+ _parse(input2) {
35537
+ const { ctx } = this._processInputParams(input2);
35416
35538
  const data = ctx.data;
35417
35539
  return this._def.type._parse({
35418
35540
  data,
@@ -35425,8 +35547,8 @@ var ZodBranded = class extends ZodType2 {
35425
35547
  }
35426
35548
  };
35427
35549
  var ZodPipeline = class _ZodPipeline extends ZodType2 {
35428
- _parse(input) {
35429
- const { status, ctx } = this._processInputParams(input);
35550
+ _parse(input2) {
35551
+ const { status, ctx } = this._processInputParams(input2);
35430
35552
  if (ctx.common.async) {
35431
35553
  const handleAsync = async () => {
35432
35554
  const inResult = await this._def.in._parseAsync({
@@ -35480,8 +35602,8 @@ var ZodPipeline = class _ZodPipeline extends ZodType2 {
35480
35602
  }
35481
35603
  };
35482
35604
  var ZodReadonly2 = class extends ZodType2 {
35483
- _parse(input) {
35484
- const result = this._def.innerType._parse(input);
35605
+ _parse(input2) {
35606
+ const result = this._def.innerType._parse(input2);
35485
35607
  const freeze = (data) => {
35486
35608
  if (isValid(data)) {
35487
35609
  data.value = Object.freeze(data.value);
@@ -39649,12 +39771,12 @@ var AjvJsonSchemaValidator = class {
39649
39771
  */
39650
39772
  getValidator(schema) {
39651
39773
  const ajvValidator = "$id" in schema && typeof schema.$id === "string" ? this._ajv.getSchema(schema.$id) ?? this._ajv.compile(schema) : this._ajv.compile(schema);
39652
- return (input) => {
39653
- const valid = ajvValidator(input);
39774
+ return (input2) => {
39775
+ const valid = ajvValidator(input2);
39654
39776
  if (valid) {
39655
39777
  return {
39656
39778
  valid: true,
39657
- data: input,
39779
+ data: input2,
39658
39780
  errorMessage: void 0
39659
39781
  };
39660
39782
  } else {
@@ -53896,9 +54018,9 @@ var QoderSession = class {
53896
54018
  for (const [index, block] of content.entries()) {
53897
54019
  if (message.uuid && typeof block === "object" && block !== null) {
53898
54020
  const raw = block;
53899
- const text = raw.type === "text" ? raw.text : raw.type === "thinking" ? raw.thinking : void 0;
53900
- if (typeof text === "string") {
53901
- const key = JSON.stringify([message.uuid, index, raw.type, text]);
54021
+ const text2 = raw.type === "text" ? raw.text : raw.type === "thinking" ? raw.thinking : void 0;
54022
+ if (typeof text2 === "string") {
54023
+ const key = JSON.stringify([message.uuid, index, raw.type, text2]);
53902
54024
  if (this.#activeTurn.projectedTextSnapshots.has(key))
53903
54025
  continue;
53904
54026
  this.#activeTurn.projectedTextSnapshots.add(key);
@@ -54233,19 +54355,19 @@ var QoderSession = class {
54233
54355
  });
54234
54356
  }
54235
54357
  }
54236
- async #handleCanUseTool(toolName, input, context) {
54358
+ async #handleCanUseTool(toolName, input2, context) {
54237
54359
  if (this.#closed || !this.#activeTurn || this.#activeTurn.cancellationRequested) {
54238
54360
  return { behavior: "deny", message: "Session is not active", interrupt: true };
54239
54361
  }
54240
54362
  const interactionId = hostInteractionIdSchema.parse(randomUUID());
54241
54363
  const turnId = this.#activeTurn.turnId;
54242
54364
  if (toolName === "AskUserQuestion") {
54243
- return this.#bridgeAskUserQuestion(interactionId, turnId, input, context);
54365
+ return this.#bridgeAskUserQuestion(interactionId, turnId, input2, context);
54244
54366
  }
54245
- return this.#bridgeToolApproval(interactionId, turnId, toolName, input, context);
54367
+ return this.#bridgeToolApproval(interactionId, turnId, toolName, input2, context);
54246
54368
  }
54247
- async #bridgeAskUserQuestion(interactionId, turnId, input, context) {
54248
- const raw = input;
54369
+ async #bridgeAskUserQuestion(interactionId, turnId, input2, context) {
54370
+ const raw = input2;
54249
54371
  const rawQuestions = Array.isArray(raw?.questions) ? raw.questions : [];
54250
54372
  const questionPrompts = [];
54251
54373
  const questions = rawQuestions.map((qItem, idx) => {
@@ -54315,7 +54437,7 @@ var QoderSession = class {
54315
54437
  id: interactionId,
54316
54438
  interaction,
54317
54439
  questionPrompts,
54318
- rawInput: input,
54440
+ rawInput: input2,
54319
54441
  toolUseID: context.toolUseID,
54320
54442
  resolve: (result) => {
54321
54443
  cleanup();
@@ -54325,7 +54447,7 @@ var QoderSession = class {
54325
54447
  this.#emitInteraction(interaction);
54326
54448
  });
54327
54449
  }
54328
- async #bridgeToolApproval(interactionId, turnId, toolName, input, context) {
54450
+ async #bridgeToolApproval(interactionId, turnId, toolName, input2, context) {
54329
54451
  const actions = [
54330
54452
  { id: "allowOnce", label: "Allow", effect: "allowOnce" },
54331
54453
  { id: "deny", label: "Deny", effect: "deny" }
@@ -54335,7 +54457,7 @@ var QoderSession = class {
54335
54457
  interactionId,
54336
54458
  turnId,
54337
54459
  title: `Approve tool: ${toolName}`,
54338
- description: typeof input === "object" && input !== null ? JSON.stringify(input) : String(input),
54460
+ description: typeof input2 === "object" && input2 !== null ? JSON.stringify(input2) : String(input2),
54339
54461
  subject: { type: "nativeAction" },
54340
54462
  actions
54341
54463
  };
@@ -54362,7 +54484,7 @@ var QoderSession = class {
54362
54484
  this.#pendingInteractions.set(interactionId, {
54363
54485
  id: interactionId,
54364
54486
  interaction,
54365
- rawInput: input,
54487
+ rawInput: input2,
54366
54488
  toolUseID: context.toolUseID,
54367
54489
  resolve: (result) => {
54368
54490
  cleanup();
@@ -55122,15 +55244,15 @@ function sessionImportTitle(value, maxLength = HARNESS_SESSION_IMPORT_TITLE_MAX_
55122
55244
  return normalized;
55123
55245
  return `${characters.slice(0, maxLength - 1).join("").trimEnd()}…`;
55124
55246
  }
55125
- function sessionImportCandidate(input) {
55126
- const time3 = typeof input.updatedAt === "number" ? input.updatedAt : typeof input.updatedAt === "string" ? Date.parse(input.updatedAt) : Number.NaN;
55247
+ function sessionImportCandidate(input2) {
55248
+ const time3 = typeof input2.updatedAt === "number" ? input2.updatedAt : typeof input2.updatedAt === "string" ? Date.parse(input2.updatedAt) : Number.NaN;
55127
55249
  const parsed = harnessSessionImportCandidateSchema.safeParse({
55128
- nativeSessionId: input.nativeSessionId,
55129
- cwd: input.cwd,
55130
- title: typeof input.title === "string" && input.title.trim().length > 0 ? input.title : null,
55250
+ nativeSessionId: input2.nativeSessionId,
55251
+ cwd: input2.cwd,
55252
+ title: typeof input2.title === "string" && input2.title.trim().length > 0 ? input2.title : null,
55131
55253
  updatedAt: Math.floor(time3),
55132
55254
  // Unknown must stay unknown; only an explicit boolean is a native statement.
55133
- running: typeof input.running === "boolean" ? input.running : null
55255
+ running: typeof input2.running === "boolean" ? input2.running : null
55134
55256
  });
55135
55257
  return parsed.success ? parsed.data : null;
55136
55258
  }
@@ -55502,22 +55624,22 @@ async function readQoderUsage(file2, signal) {
55502
55624
  messages.set(id4, message);
55503
55625
  if (!isRecord2(usage) || message.at === null)
55504
55626
  continue;
55505
- const input = usage.input_tokens;
55627
+ const input2 = usage.input_tokens;
55506
55628
  const output = usage.output_tokens;
55507
55629
  const cached2 = usage.cache_read_input_tokens;
55508
55630
  const written = usage.cache_creation_input_tokens;
55509
- if (!count2(input) || !count2(output) || !count2(cached2) || !count2(written))
55631
+ if (!count2(input2) || !count2(output) || !count2(cached2) || !count2(written))
55510
55632
  continue;
55511
55633
  const split = isRecord2(usage.cache_creation) ? usage.cache_creation : null;
55512
55634
  const oneHour = split?.ephemeral_1h_input_tokens;
55513
55635
  const details = isRecord2(usage.output_tokens_details) ? usage.output_tokens_details : null;
55514
55636
  const thinking = details?.thinking_tokens;
55515
- const unreported = input === 0 && output === 0 && cached2 === 0 && written === 0;
55637
+ const unreported = input2 === 0 && output === 0 && cached2 === 0 && written === 0;
55516
55638
  const entry = parseHarnessUsageEntry({
55517
55639
  id: id4,
55518
55640
  occurredAtMs: message.at,
55519
55641
  ...typeof model2 === "string" && model2 ? { model: model2 } : {},
55520
- inputTokens: input + cached2 + written,
55642
+ inputTokens: input2 + cached2 + written,
55521
55643
  cachedInputTokens: cached2,
55522
55644
  cacheWriteInputTokens: written,
55523
55645
  ...count2(oneHour) ? { cacheWrite1hInputTokens: oneHour } : {},
@@ -55579,7 +55701,7 @@ var QoderAdapter = class {
55579
55701
  this.#platform = options.platform ?? process.platform;
55580
55702
  const startDaemon = options.startDaemon ?? (options.queryFactory === void 0 && typeof runtime.sdk.startDaemon === "function" ? (config2) => runtime.sdk.startDaemon(config2) : void 0);
55581
55703
  this.#daemons = startDaemon ? new QoderDaemonPool(startDaemon) : void 0;
55582
- this.#queryFactory = options.queryFactory ?? ((input) => runtime.sdk.query(input));
55704
+ this.#queryFactory = options.queryFactory ?? ((input2) => runtime.sdk.query(input2));
55583
55705
  this.#forkSession = options.forkSession ?? runtime.sdk.forkSession;
55584
55706
  this.#getSessionMessages = options.getSessionMessages ?? runtime.sdk.getSessionMessages;
55585
55707
  this.#getSessionInfo = options.getSessionInfo ?? runtime.sdk.getSessionInfo;
@@ -55590,16 +55712,16 @@ var QoderAdapter = class {
55590
55712
  getSessionInfo: this.#getSessionInfo
55591
55713
  });
55592
55714
  this.#getAvailableModels = options.getAvailableModels;
55593
- this.#resolveExecutable = options.resolveExecutable ?? ((input, dependencies) => resolveQoderExecutable({ ...input, variant: this.#variant }, dependencies));
55715
+ this.#resolveExecutable = options.resolveExecutable ?? ((input2, dependencies) => resolveQoderExecutable({ ...input2, variant: this.#variant }, dependencies));
55594
55716
  }
55595
55717
  /** Leases a daemon owning this launch config, or undefined when daemons are not managed. */
55596
- async #leaseDaemon(input) {
55718
+ async #leaseDaemon(input2) {
55597
55719
  if (!this.#daemons)
55598
55720
  return void 0;
55599
55721
  return this.#daemons.acquire({
55600
- auth: qoderAuthForEnvironment(this.#variant, input.environment),
55601
- env: input.environment,
55602
- ...input.pathToQoderCLIExecutable ? { pathToQoderCLIExecutable: input.pathToQoderCLIExecutable } : {}
55722
+ auth: qoderAuthForEnvironment(this.#variant, input2.environment),
55723
+ env: input2.environment,
55724
+ ...input2.pathToQoderCLIExecutable ? { pathToQoderCLIExecutable: input2.pathToQoderCLIExecutable } : {}
55603
55725
  });
55604
55726
  }
55605
55727
  /** Query options for a probe; launch config goes to the daemon when one is leased. */
@@ -55650,15 +55772,15 @@ var QoderAdapter = class {
55650
55772
  await lease?.release();
55651
55773
  }
55652
55774
  }
55653
- async inspect(input) {
55654
- const cacheKey = input?.cwd ?? "";
55775
+ async inspect(input2) {
55776
+ const cacheKey = input2?.cwd ?? "";
55655
55777
  if (this.#closed) {
55656
55778
  return {
55657
55779
  status: "unavailable",
55658
55780
  error: { code: "invalidState", message: "Qoder adapter is closed", retryable: false }
55659
55781
  };
55660
55782
  }
55661
- if (input?.refresh) {
55783
+ if (input2?.refresh) {
55662
55784
  this.#inspections.clear();
55663
55785
  this.#inFlightInspections.clear();
55664
55786
  } else {
@@ -55695,7 +55817,7 @@ var QoderAdapter = class {
55695
55817
  const probeQuery = this.#queryFactory({
55696
55818
  prompt: "",
55697
55819
  options: {
55698
- cwd: input?.cwd ?? process.cwd(),
55820
+ cwd: input2?.cwd ?? process.cwd(),
55699
55821
  abortController: controller,
55700
55822
  stderr: (chunk) => {
55701
55823
  stderr = (stderr + chunk).slice(-8192);
@@ -55716,7 +55838,7 @@ var QoderAdapter = class {
55716
55838
  }
55717
55839
  }
55718
55840
  } catch (error51) {
55719
- const needsLogin = qoderLoginRequired(stderr + (lease?.stderr() ?? "")) || error51 instanceof Error && error51.message === "Transport closed" && qoderAuthForEnvironment(this.#variant, this.#environment).type === "qodercli" && await checkQoderLogin(executable, this.#environment, input?.cwd);
55841
+ const needsLogin = qoderLoginRequired(stderr + (lease?.stderr() ?? "")) || error51 instanceof Error && error51.message === "Transport closed" && qoderAuthForEnvironment(this.#variant, this.#environment).type === "qodercli" && await checkQoderLogin(executable, this.#environment, input2?.cwd);
55720
55842
  const result2 = {
55721
55843
  status: "unavailable",
55722
55844
  error: needsLogin ? {
@@ -55774,14 +55896,14 @@ var QoderAdapter = class {
55774
55896
  this.#inFlightInspections.set(cacheKey, task);
55775
55897
  return task;
55776
55898
  }
55777
- async open(input) {
55778
- if ("model" in input && input.model && !qoderModelValue(input.model)) {
55899
+ async open(input2) {
55900
+ if ("model" in input2 && input2.model && !qoderModelValue(input2.model)) {
55779
55901
  return {
55780
55902
  ok: false,
55781
55903
  error: { code: "invalidRequest", message: "Invalid Qoder Model Ref", retryable: false }
55782
55904
  };
55783
55905
  }
55784
- if ("permissionModeId" in input && input.permissionModeId && !mapToQoderPermissionMode(input.permissionModeId)) {
55906
+ if ("permissionModeId" in input2 && input2.permissionModeId && !mapToQoderPermissionMode(input2.permissionModeId)) {
55785
55907
  return {
55786
55908
  ok: false,
55787
55909
  error: {
@@ -55791,8 +55913,8 @@ var QoderAdapter = class {
55791
55913
  }
55792
55914
  };
55793
55915
  }
55794
- let permissionModeId = "permissionModeId" in input ? input.permissionModeId : void 0;
55795
- if (input.kind === "create" && input.executionPolicy === "unattended-full-access") {
55916
+ let permissionModeId = "permissionModeId" in input2 ? input2.permissionModeId : void 0;
55917
+ if (input2.kind === "create" && input2.executionPolicy === "unattended-full-access") {
55796
55918
  if (permissionModeId && !["bypassPermissions", "yolo"].includes(permissionModeId)) {
55797
55919
  return {
55798
55920
  ok: false,
@@ -55805,7 +55927,7 @@ var QoderAdapter = class {
55805
55927
  }
55806
55928
  permissionModeId = harnessPermissionModeIdSchema.parse("bypassPermissions");
55807
55929
  }
55808
- const environment = qoderEnvironment(input.environment ?? this.#environment);
55930
+ const environment = qoderEnvironment(input2.environment ?? this.#environment);
55809
55931
  let pathToQoderCLIExecutable;
55810
55932
  try {
55811
55933
  pathToQoderCLIExecutable = this.#resolveExecutable({
@@ -55817,11 +55939,11 @@ var QoderAdapter = class {
55817
55939
  }
55818
55940
  let sessionId;
55819
55941
  let openResumeId;
55820
- if (input.kind === "create") {
55942
+ if (input2.kind === "create") {
55821
55943
  sessionId = randomUUID2();
55822
- } else if (input.kind === "resume") {
55823
- const id4 = input.nativeRef?.nativeSessionId;
55824
- if (!id4 || typeof id4 !== "string" || input.nativeRef.harnessId !== this.harnessId) {
55944
+ } else if (input2.kind === "resume") {
55945
+ const id4 = input2.nativeRef?.nativeSessionId;
55946
+ if (!id4 || typeof id4 !== "string" || input2.nativeRef.harnessId !== this.harnessId) {
55825
55947
  return {
55826
55948
  ok: false,
55827
55949
  error: {
@@ -55833,9 +55955,9 @@ var QoderAdapter = class {
55833
55955
  }
55834
55956
  sessionId = id4;
55835
55957
  openResumeId = id4;
55836
- } else if (input.kind === "fork") {
55837
- const sourceRef = nativeSessionRefSchema.safeParse(input.sourceRef);
55838
- const checkpoint = nativeCheckpointRefSchema.safeParse(input.checkpoint);
55958
+ } else if (input2.kind === "fork") {
55959
+ const sourceRef = nativeSessionRefSchema.safeParse(input2.sourceRef);
55960
+ const checkpoint = nativeCheckpointRefSchema.safeParse(input2.checkpoint);
55839
55961
  if (!sourceRef.success || sourceRef.data.harnessId !== this.harnessId || !checkpoint.success || checkpoint.data.harnessId !== this.harnessId || checkpoint.data.nativeSessionId !== sourceRef.data.nativeSessionId) {
55840
55962
  return {
55841
55963
  ok: false,
@@ -55848,10 +55970,10 @@ var QoderAdapter = class {
55848
55970
  }
55849
55971
  let sourceInfo;
55850
55972
  try {
55851
- sourceInfo = await this.#getSessionInfo(sourceRef.data.nativeSessionId, { dir: input.cwd });
55973
+ sourceInfo = await this.#getSessionInfo(sourceRef.data.nativeSessionId, { dir: input2.cwd });
55852
55974
  } catch {
55853
55975
  }
55854
- if (sourceInfo?.cwd && path9.resolve(sourceInfo.cwd) !== path9.resolve(input.cwd)) {
55976
+ if (sourceInfo?.cwd && path9.resolve(sourceInfo.cwd) !== path9.resolve(input2.cwd)) {
55855
55977
  return {
55856
55978
  ok: false,
55857
55979
  error: {
@@ -55864,7 +55986,7 @@ var QoderAdapter = class {
55864
55986
  let derivedSessionId;
55865
55987
  try {
55866
55988
  const forked = await this.#forkSession(sourceRef.data.nativeSessionId, {
55867
- dir: input.cwd,
55989
+ dir: input2.cwd,
55868
55990
  upToMessageId: checkpoint.data.checkpointId
55869
55991
  });
55870
55992
  derivedSessionId = forked.sessionId;
@@ -55882,8 +56004,8 @@ var QoderAdapter = class {
55882
56004
  }
55883
56005
  sessionId = derivedSessionId;
55884
56006
  openResumeId = derivedSessionId;
55885
- } else if (input.kind === "rollbackLastTurn") {
55886
- const sourceRef = nativeSessionRefSchema.safeParse(input.sourceRef);
56007
+ } else if (input2.kind === "rollbackLastTurn") {
56008
+ const sourceRef = nativeSessionRefSchema.safeParse(input2.sourceRef);
55887
56009
  if (!sourceRef.success || sourceRef.data.harnessId !== this.harnessId) {
55888
56010
  return {
55889
56011
  ok: false,
@@ -55897,7 +56019,7 @@ var QoderAdapter = class {
55897
56019
  let sourceMessages;
55898
56020
  try {
55899
56021
  sourceMessages = await this.#getSessionMessages(sourceRef.data.nativeSessionId, {
55900
- dir: input.cwd,
56022
+ dir: input2.cwd,
55901
56023
  view: "historical"
55902
56024
  });
55903
56025
  } catch (error51) {
@@ -55940,7 +56062,7 @@ var QoderAdapter = class {
55940
56062
  let derivedSessionId;
55941
56063
  try {
55942
56064
  const forked = await this.#forkSession(sourceRef.data.nativeSessionId, {
55943
- dir: input.cwd,
56065
+ dir: input2.cwd,
55944
56066
  upToMessageId: checkpointId
55945
56067
  });
55946
56068
  derivedSessionId = forked.sessionId;
@@ -55969,7 +56091,7 @@ var QoderAdapter = class {
55969
56091
  }
55970
56092
  };
55971
56093
  }
55972
- const inspection = await this.inspect({ cwd: input.cwd });
56094
+ const inspection = await this.inspect({ cwd: input2.cwd });
55973
56095
  if (inspection.status !== "ready")
55974
56096
  return { ok: false, error: inspection.error };
55975
56097
  const catalog = inspection.catalog;
@@ -55986,11 +56108,11 @@ var QoderAdapter = class {
55986
56108
  session = new QoderSession({
55987
56109
  variant: this.#variant,
55988
56110
  sessionId,
55989
- cwd: input.cwd,
56111
+ cwd: input2.cwd,
55990
56112
  environment,
55991
- ..."model" in input && input.model ? { model: input.model } : {},
56113
+ ..."model" in input2 && input2.model ? { model: input2.model } : {},
55992
56114
  ...permissionModeId ? { permissionModeId } : {},
55993
- ..."thinkingOptionId" in input && input.thinkingOptionId ? { thinkingOptionId: input.thinkingOptionId } : {},
56115
+ ..."thinkingOptionId" in input2 && input2.thinkingOptionId ? { thinkingOptionId: input2.thinkingOptionId } : {},
55994
56116
  ...catalog ? { catalog } : {},
55995
56117
  ...openResumeId ? { resume: openResumeId } : {},
55996
56118
  queryFactory: this.#queryFactory,