@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
@@ -3315,27 +3315,27 @@ var require_utils = __commonJS({
3315
3315
  var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3316
3316
  var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3317
3317
  var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
3318
- function stringArrayToHexStripped(input) {
3318
+ function stringArrayToHexStripped(input2) {
3319
3319
  let acc = "";
3320
3320
  let code = 0;
3321
3321
  let i = 0;
3322
- for (i = 0; i < input.length; i++) {
3323
- code = input[i].charCodeAt(0);
3322
+ for (i = 0; i < input2.length; i++) {
3323
+ code = input2[i].charCodeAt(0);
3324
3324
  if (code === 48) {
3325
3325
  continue;
3326
3326
  }
3327
3327
  if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3328
3328
  return "";
3329
3329
  }
3330
- acc += input[i];
3330
+ acc += input2[i];
3331
3331
  break;
3332
3332
  }
3333
- for (i += 1; i < input.length; i++) {
3334
- code = input[i].charCodeAt(0);
3333
+ for (i += 1; i < input2.length; i++) {
3334
+ code = input2[i].charCodeAt(0);
3335
3335
  if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3336
3336
  return "";
3337
3337
  }
3338
- acc += input[i];
3338
+ acc += input2[i];
3339
3339
  }
3340
3340
  return acc;
3341
3341
  }
@@ -3357,7 +3357,7 @@ var require_utils = __commonJS({
3357
3357
  }
3358
3358
  return true;
3359
3359
  }
3360
- function getIPV6(input) {
3360
+ function getIPV6(input2) {
3361
3361
  let tokenCount = 0;
3362
3362
  const output = { error: false, address: "", zone: "" };
3363
3363
  const address = [];
@@ -3365,8 +3365,8 @@ var require_utils = __commonJS({
3365
3365
  let endipv6Encountered = false;
3366
3366
  let endIpv6 = false;
3367
3367
  let consume = consumeHextets;
3368
- for (let i = 0; i < input.length; i++) {
3369
- const cursor = input[i];
3368
+ for (let i = 0; i < input2.length; i++) {
3369
+ const cursor = input2[i];
3370
3370
  if (cursor === "[" || cursor === "]") {
3371
3371
  continue;
3372
3372
  }
@@ -3381,7 +3381,7 @@ var require_utils = __commonJS({
3381
3381
  output.error = true;
3382
3382
  break;
3383
3383
  }
3384
- if (i > 0 && input[i - 1] === ":") {
3384
+ if (i > 0 && input2[i - 1] === ":") {
3385
3385
  endipv6Encountered = true;
3386
3386
  }
3387
3387
  address.push(":");
@@ -3433,37 +3433,37 @@ var require_utils = __commonJS({
3433
3433
  return ind;
3434
3434
  }
3435
3435
  function removeDotSegments(path6) {
3436
- let input = path6;
3436
+ let input2 = path6;
3437
3437
  const output = [];
3438
3438
  let nextSlash = -1;
3439
3439
  let len = 0;
3440
- while (len = input.length) {
3440
+ while (len = input2.length) {
3441
3441
  if (len === 1) {
3442
- if (input === ".") {
3442
+ if (input2 === ".") {
3443
3443
  break;
3444
- } else if (input === "/") {
3444
+ } else if (input2 === "/") {
3445
3445
  output.push("/");
3446
3446
  break;
3447
3447
  } else {
3448
- output.push(input);
3448
+ output.push(input2);
3449
3449
  break;
3450
3450
  }
3451
3451
  } else if (len === 2) {
3452
- if (input[0] === ".") {
3453
- if (input[1] === ".") {
3452
+ if (input2[0] === ".") {
3453
+ if (input2[1] === ".") {
3454
3454
  break;
3455
- } else if (input[1] === "/") {
3456
- input = input.slice(2);
3455
+ } else if (input2[1] === "/") {
3456
+ input2 = input2.slice(2);
3457
3457
  continue;
3458
3458
  }
3459
- } else if (input[0] === "/") {
3460
- if (input[1] === "." || input[1] === "/") {
3459
+ } else if (input2[0] === "/") {
3460
+ if (input2[1] === "." || input2[1] === "/") {
3461
3461
  output.push("/");
3462
3462
  break;
3463
3463
  }
3464
3464
  }
3465
3465
  } else if (len === 3) {
3466
- if (input === "/..") {
3466
+ if (input2 === "/..") {
3467
3467
  if (output.length !== 0) {
3468
3468
  output.pop();
3469
3469
  }
@@ -3471,24 +3471,24 @@ var require_utils = __commonJS({
3471
3471
  break;
3472
3472
  }
3473
3473
  }
3474
- if (input[0] === ".") {
3475
- if (input[1] === ".") {
3476
- if (input[2] === "/") {
3477
- input = input.slice(3);
3474
+ if (input2[0] === ".") {
3475
+ if (input2[1] === ".") {
3476
+ if (input2[2] === "/") {
3477
+ input2 = input2.slice(3);
3478
3478
  continue;
3479
3479
  }
3480
- } else if (input[1] === "/") {
3481
- input = input.slice(2);
3480
+ } else if (input2[1] === "/") {
3481
+ input2 = input2.slice(2);
3482
3482
  continue;
3483
3483
  }
3484
- } else if (input[0] === "/") {
3485
- if (input[1] === ".") {
3486
- if (input[2] === "/") {
3487
- input = input.slice(2);
3484
+ } else if (input2[0] === "/") {
3485
+ if (input2[1] === ".") {
3486
+ if (input2[2] === "/") {
3487
+ input2 = input2.slice(2);
3488
3488
  continue;
3489
- } else if (input[2] === ".") {
3490
- if (input[3] === "/") {
3491
- input = input.slice(3);
3489
+ } else if (input2[2] === ".") {
3490
+ if (input2[3] === "/") {
3491
+ input2 = input2.slice(3);
3492
3492
  if (output.length !== 0) {
3493
3493
  output.pop();
3494
3494
  }
@@ -3497,12 +3497,12 @@ var require_utils = __commonJS({
3497
3497
  }
3498
3498
  }
3499
3499
  }
3500
- if ((nextSlash = input.indexOf("/", 1)) === -1) {
3501
- output.push(input);
3500
+ if ((nextSlash = input2.indexOf("/", 1)) === -1) {
3501
+ output.push(input2);
3502
3502
  break;
3503
3503
  } else {
3504
- output.push(input.slice(0, nextSlash));
3505
- input = input.slice(nextSlash);
3504
+ output.push(input2.slice(0, nextSlash));
3505
+ input2 = input2.slice(nextSlash);
3506
3506
  }
3507
3507
  }
3508
3508
  return output.join("");
@@ -3515,14 +3515,14 @@ var require_utils = __commonJS({
3515
3515
  re2.lastIndex = 0;
3516
3516
  return host.replace(re2, (ch) => HOST_DELIMS[ch]);
3517
3517
  }
3518
- function normalizePercentEncoding(input, decodeUnreserved = false) {
3519
- if (input.indexOf("%") === -1) {
3520
- return input;
3518
+ function normalizePercentEncoding(input2, decodeUnreserved = false) {
3519
+ if (input2.indexOf("%") === -1) {
3520
+ return input2;
3521
3521
  }
3522
3522
  let output = "";
3523
- for (let i = 0; i < input.length; i++) {
3524
- if (input[i] === "%" && i + 2 < input.length) {
3525
- const hex3 = input.slice(i + 1, i + 3);
3523
+ for (let i = 0; i < input2.length; i++) {
3524
+ if (input2[i] === "%" && i + 2 < input2.length) {
3525
+ const hex3 = input2.slice(i + 1, i + 3);
3526
3526
  if (isHexPair(hex3)) {
3527
3527
  const normalizedHex = hex3.toUpperCase();
3528
3528
  const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
@@ -3535,15 +3535,15 @@ var require_utils = __commonJS({
3535
3535
  continue;
3536
3536
  }
3537
3537
  }
3538
- output += input[i];
3538
+ output += input2[i];
3539
3539
  }
3540
3540
  return output;
3541
3541
  }
3542
- function normalizePathEncoding(input) {
3542
+ function normalizePathEncoding(input2) {
3543
3543
  let output = "";
3544
- for (let i = 0; i < input.length; i++) {
3545
- if (input[i] === "%" && i + 2 < input.length) {
3546
- const hex3 = input.slice(i + 1, i + 3);
3544
+ for (let i = 0; i < input2.length; i++) {
3545
+ if (input2[i] === "%" && i + 2 < input2.length) {
3546
+ const hex3 = input2.slice(i + 1, i + 3);
3547
3547
  if (isHexPair(hex3)) {
3548
3548
  const normalizedHex = hex3.toUpperCase();
3549
3549
  const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
@@ -3556,26 +3556,26 @@ var require_utils = __commonJS({
3556
3556
  continue;
3557
3557
  }
3558
3558
  }
3559
- if (isPathCharacter(input[i])) {
3560
- output += input[i];
3559
+ if (isPathCharacter(input2[i])) {
3560
+ output += input2[i];
3561
3561
  } else {
3562
- output += escape(input[i]);
3562
+ output += escape(input2[i]);
3563
3563
  }
3564
3564
  }
3565
3565
  return output;
3566
3566
  }
3567
- function escapePreservingEscapes(input) {
3567
+ function escapePreservingEscapes(input2) {
3568
3568
  let output = "";
3569
- for (let i = 0; i < input.length; i++) {
3570
- if (input[i] === "%" && i + 2 < input.length) {
3571
- const hex3 = input.slice(i + 1, i + 3);
3569
+ for (let i = 0; i < input2.length; i++) {
3570
+ if (input2[i] === "%" && i + 2 < input2.length) {
3571
+ const hex3 = input2.slice(i + 1, i + 3);
3572
3572
  if (isHexPair(hex3)) {
3573
3573
  output += "%" + hex3.toUpperCase();
3574
3574
  i += 2;
3575
3575
  continue;
3576
3576
  }
3577
3577
  }
3578
- output += escape(input[i]);
3578
+ output += escape(input2[i]);
3579
3579
  }
3580
3580
  return output;
3581
3581
  }
@@ -4524,7 +4524,7 @@ var require_core = __commonJS({
4524
4524
  errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
4525
4525
  if (!errors || errors.length === 0)
4526
4526
  return "No errors";
4527
- return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);
4527
+ return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text2, msg) => text2 + separator + msg);
4528
4528
  }
4529
4529
  $dataMetaSchema(metaSchema, keywordsJsonPointers) {
4530
4530
  const rules = this.RULES.all;
@@ -7604,8 +7604,8 @@ function cached(getter) {
7604
7604
  }
7605
7605
  };
7606
7606
  }
7607
- function nullish(input) {
7608
- return input === null || input === void 0;
7607
+ function nullish(input2) {
7608
+ return input2 === null || input2 === void 0;
7609
7609
  }
7610
7610
  function cleanRegex(source) {
7611
7611
  const start = source.startsWith("^") ? 1 : 0;
@@ -7692,8 +7692,8 @@ function randomString(length = 10) {
7692
7692
  function esc(str) {
7693
7693
  return JSON.stringify(str);
7694
7694
  }
7695
- function slugify(input) {
7696
- return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
7695
+ function slugify(input2) {
7696
+ return input2.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
7697
7697
  }
7698
7698
  var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
7699
7699
  };
@@ -8098,19 +8098,19 @@ function finalizeIssue(iss, ctx, config2) {
8098
8098
  }
8099
8099
  return rest;
8100
8100
  }
8101
- function getSizableOrigin(input) {
8102
- if (input instanceof Set)
8101
+ function getSizableOrigin(input2) {
8102
+ if (input2 instanceof Set)
8103
8103
  return "set";
8104
- if (input instanceof Map)
8104
+ if (input2 instanceof Map)
8105
8105
  return "map";
8106
- if (input instanceof File)
8106
+ if (input2 instanceof File)
8107
8107
  return "file";
8108
8108
  return "unknown";
8109
8109
  }
8110
- function getLengthableOrigin(input) {
8111
- if (Array.isArray(input))
8110
+ function getLengthableOrigin(input2) {
8111
+ if (Array.isArray(input2))
8112
8112
  return "array";
8113
- if (typeof input === "string")
8113
+ if (typeof input2 === "string")
8114
8114
  return "string";
8115
8115
  return "unknown";
8116
8116
  }
@@ -8136,12 +8136,12 @@ function parsedType(data) {
8136
8136
  return t;
8137
8137
  }
8138
8138
  function issue(...args) {
8139
- const [iss, input, inst] = args;
8139
+ const [iss, input2, inst] = args;
8140
8140
  if (typeof iss === "string") {
8141
8141
  return {
8142
8142
  message: iss,
8143
8143
  code: "custom",
8144
- input,
8144
+ input: input2,
8145
8145
  inst
8146
8146
  };
8147
8147
  }
@@ -8685,23 +8685,23 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
8685
8685
  bag.pattern = integer;
8686
8686
  });
8687
8687
  inst._zod.check = (payload) => {
8688
- const input = payload.value;
8688
+ const input2 = payload.value;
8689
8689
  if (isInt) {
8690
- if (!Number.isInteger(input)) {
8690
+ if (!Number.isInteger(input2)) {
8691
8691
  payload.issues.push({
8692
8692
  expected: origin,
8693
8693
  format: def.format,
8694
8694
  code: "invalid_type",
8695
8695
  continue: false,
8696
- input,
8696
+ input: input2,
8697
8697
  inst
8698
8698
  });
8699
8699
  return;
8700
8700
  }
8701
- if (!Number.isSafeInteger(input)) {
8702
- if (input > 0) {
8701
+ if (!Number.isSafeInteger(input2)) {
8702
+ if (input2 > 0) {
8703
8703
  payload.issues.push({
8704
- input,
8704
+ input: input2,
8705
8705
  code: "too_big",
8706
8706
  maximum: Number.MAX_SAFE_INTEGER,
8707
8707
  note: "Integers must be within the safe integer range.",
@@ -8712,7 +8712,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
8712
8712
  });
8713
8713
  } else {
8714
8714
  payload.issues.push({
8715
- input,
8715
+ input: input2,
8716
8716
  code: "too_small",
8717
8717
  minimum: Number.MIN_SAFE_INTEGER,
8718
8718
  note: "Integers must be within the safe integer range.",
@@ -8725,10 +8725,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
8725
8725
  return;
8726
8726
  }
8727
8727
  }
8728
- if (input < minimum) {
8728
+ if (input2 < minimum) {
8729
8729
  payload.issues.push({
8730
8730
  origin: "number",
8731
- input,
8731
+ input: input2,
8732
8732
  code: "too_small",
8733
8733
  minimum,
8734
8734
  inclusive: true,
@@ -8736,10 +8736,10 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
8736
8736
  continue: !def.abort
8737
8737
  });
8738
8738
  }
8739
- if (input > maximum) {
8739
+ if (input2 > maximum) {
8740
8740
  payload.issues.push({
8741
8741
  origin: "number",
8742
- input,
8742
+ input: input2,
8743
8743
  code: "too_big",
8744
8744
  maximum,
8745
8745
  inclusive: true,
@@ -8759,11 +8759,11 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
8759
8759
  bag.maximum = maximum;
8760
8760
  });
8761
8761
  inst._zod.check = (payload) => {
8762
- const input = payload.value;
8763
- if (input < minimum) {
8762
+ const input2 = payload.value;
8763
+ if (input2 < minimum) {
8764
8764
  payload.issues.push({
8765
8765
  origin: "bigint",
8766
- input,
8766
+ input: input2,
8767
8767
  code: "too_small",
8768
8768
  minimum,
8769
8769
  inclusive: true,
@@ -8771,10 +8771,10 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
8771
8771
  continue: !def.abort
8772
8772
  });
8773
8773
  }
8774
- if (input > maximum) {
8774
+ if (input2 > maximum) {
8775
8775
  payload.issues.push({
8776
8776
  origin: "bigint",
8777
- input,
8777
+ input: input2,
8778
8778
  code: "too_big",
8779
8779
  maximum,
8780
8780
  inclusive: true,
@@ -8797,16 +8797,16 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
8797
8797
  inst2._zod.bag.maximum = def.maximum;
8798
8798
  });
8799
8799
  inst._zod.check = (payload) => {
8800
- const input = payload.value;
8801
- const size = input.size;
8800
+ const input2 = payload.value;
8801
+ const size = input2.size;
8802
8802
  if (size <= def.maximum)
8803
8803
  return;
8804
8804
  payload.issues.push({
8805
- origin: getSizableOrigin(input),
8805
+ origin: getSizableOrigin(input2),
8806
8806
  code: "too_big",
8807
8807
  maximum: def.maximum,
8808
8808
  inclusive: true,
8809
- input,
8809
+ input: input2,
8810
8810
  inst,
8811
8811
  continue: !def.abort
8812
8812
  });
@@ -8825,16 +8825,16 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
8825
8825
  inst2._zod.bag.minimum = def.minimum;
8826
8826
  });
8827
8827
  inst._zod.check = (payload) => {
8828
- const input = payload.value;
8829
- const size = input.size;
8828
+ const input2 = payload.value;
8829
+ const size = input2.size;
8830
8830
  if (size >= def.minimum)
8831
8831
  return;
8832
8832
  payload.issues.push({
8833
- origin: getSizableOrigin(input),
8833
+ origin: getSizableOrigin(input2),
8834
8834
  code: "too_small",
8835
8835
  minimum: def.minimum,
8836
8836
  inclusive: true,
8837
- input,
8837
+ input: input2,
8838
8838
  inst,
8839
8839
  continue: !def.abort
8840
8840
  });
@@ -8854,13 +8854,13 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
8854
8854
  bag.size = def.size;
8855
8855
  });
8856
8856
  inst._zod.check = (payload) => {
8857
- const input = payload.value;
8858
- const size = input.size;
8857
+ const input2 = payload.value;
8858
+ const size = input2.size;
8859
8859
  if (size === def.size)
8860
8860
  return;
8861
8861
  const tooBig = size > def.size;
8862
8862
  payload.issues.push({
8863
- origin: getSizableOrigin(input),
8863
+ origin: getSizableOrigin(input2),
8864
8864
  ...tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size },
8865
8865
  inclusive: true,
8866
8866
  exact: true,
@@ -8883,17 +8883,17 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
8883
8883
  inst2._zod.bag.maximum = def.maximum;
8884
8884
  });
8885
8885
  inst._zod.check = (payload) => {
8886
- const input = payload.value;
8887
- const length = input.length;
8886
+ const input2 = payload.value;
8887
+ const length = input2.length;
8888
8888
  if (length <= def.maximum)
8889
8889
  return;
8890
- const origin = getLengthableOrigin(input);
8890
+ const origin = getLengthableOrigin(input2);
8891
8891
  payload.issues.push({
8892
8892
  origin,
8893
8893
  code: "too_big",
8894
8894
  maximum: def.maximum,
8895
8895
  inclusive: true,
8896
- input,
8896
+ input: input2,
8897
8897
  inst,
8898
8898
  continue: !def.abort
8899
8899
  });
@@ -8912,17 +8912,17 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
8912
8912
  inst2._zod.bag.minimum = def.minimum;
8913
8913
  });
8914
8914
  inst._zod.check = (payload) => {
8915
- const input = payload.value;
8916
- const length = input.length;
8915
+ const input2 = payload.value;
8916
+ const length = input2.length;
8917
8917
  if (length >= def.minimum)
8918
8918
  return;
8919
- const origin = getLengthableOrigin(input);
8919
+ const origin = getLengthableOrigin(input2);
8920
8920
  payload.issues.push({
8921
8921
  origin,
8922
8922
  code: "too_small",
8923
8923
  minimum: def.minimum,
8924
8924
  inclusive: true,
8925
- input,
8925
+ input: input2,
8926
8926
  inst,
8927
8927
  continue: !def.abort
8928
8928
  });
@@ -8942,11 +8942,11 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
8942
8942
  bag.length = def.length;
8943
8943
  });
8944
8944
  inst._zod.check = (payload) => {
8945
- const input = payload.value;
8946
- const length = input.length;
8945
+ const input2 = payload.value;
8946
+ const length = input2.length;
8947
8947
  if (length === def.length)
8948
8948
  return;
8949
- const origin = getLengthableOrigin(input);
8949
+ const origin = getLengthableOrigin(input2);
8950
8950
  const tooBig = length > def.length;
8951
8951
  payload.issues.push({
8952
8952
  origin,
@@ -9617,15 +9617,15 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
9617
9617
  payload.value = Number(payload.value);
9618
9618
  } catch (_) {
9619
9619
  }
9620
- const input = payload.value;
9621
- if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
9620
+ const input2 = payload.value;
9621
+ if (typeof input2 === "number" && !Number.isNaN(input2) && Number.isFinite(input2)) {
9622
9622
  return payload;
9623
9623
  }
9624
- const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
9624
+ const received = typeof input2 === "number" ? Number.isNaN(input2) ? "NaN" : !Number.isFinite(input2) ? "Infinity" : void 0 : void 0;
9625
9625
  payload.issues.push({
9626
9626
  expected: "number",
9627
9627
  code: "invalid_type",
9628
- input,
9628
+ input: input2,
9629
9629
  inst,
9630
9630
  ...received ? { received } : {}
9631
9631
  });
@@ -9645,13 +9645,13 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
9645
9645
  payload.value = Boolean(payload.value);
9646
9646
  } catch (_) {
9647
9647
  }
9648
- const input = payload.value;
9649
- if (typeof input === "boolean")
9648
+ const input2 = payload.value;
9649
+ if (typeof input2 === "boolean")
9650
9650
  return payload;
9651
9651
  payload.issues.push({
9652
9652
  expected: "boolean",
9653
9653
  code: "invalid_type",
9654
- input,
9654
+ input: input2,
9655
9655
  inst
9656
9656
  });
9657
9657
  return payload;
@@ -9684,13 +9684,13 @@ var $ZodBigIntFormat = /* @__PURE__ */ $constructor("$ZodBigIntFormat", (inst, d
9684
9684
  var $ZodSymbol = /* @__PURE__ */ $constructor("$ZodSymbol", (inst, def) => {
9685
9685
  $ZodType.init(inst, def);
9686
9686
  inst._zod.parse = (payload, _ctx) => {
9687
- const input = payload.value;
9688
- if (typeof input === "symbol")
9687
+ const input2 = payload.value;
9688
+ if (typeof input2 === "symbol")
9689
9689
  return payload;
9690
9690
  payload.issues.push({
9691
9691
  expected: "symbol",
9692
9692
  code: "invalid_type",
9693
- input,
9693
+ input: input2,
9694
9694
  inst
9695
9695
  });
9696
9696
  return payload;
@@ -9701,13 +9701,13 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
9701
9701
  inst._zod.pattern = _undefined;
9702
9702
  inst._zod.values = /* @__PURE__ */ new Set([void 0]);
9703
9703
  inst._zod.parse = (payload, _ctx) => {
9704
- const input = payload.value;
9705
- if (typeof input === "undefined")
9704
+ const input2 = payload.value;
9705
+ if (typeof input2 === "undefined")
9706
9706
  return payload;
9707
9707
  payload.issues.push({
9708
9708
  expected: "undefined",
9709
9709
  code: "invalid_type",
9710
- input,
9710
+ input: input2,
9711
9711
  inst
9712
9712
  });
9713
9713
  return payload;
@@ -9718,13 +9718,13 @@ var $ZodNull = /* @__PURE__ */ $constructor("$ZodNull", (inst, def) => {
9718
9718
  inst._zod.pattern = _null;
9719
9719
  inst._zod.values = /* @__PURE__ */ new Set([null]);
9720
9720
  inst._zod.parse = (payload, _ctx) => {
9721
- const input = payload.value;
9722
- if (input === null)
9721
+ const input2 = payload.value;
9722
+ if (input2 === null)
9723
9723
  return payload;
9724
9724
  payload.issues.push({
9725
9725
  expected: "null",
9726
9726
  code: "invalid_type",
9727
- input,
9727
+ input: input2,
9728
9728
  inst
9729
9729
  });
9730
9730
  return payload;
@@ -9753,13 +9753,13 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
9753
9753
  var $ZodVoid = /* @__PURE__ */ $constructor("$ZodVoid", (inst, def) => {
9754
9754
  $ZodType.init(inst, def);
9755
9755
  inst._zod.parse = (payload, _ctx) => {
9756
- const input = payload.value;
9757
- if (typeof input === "undefined")
9756
+ const input2 = payload.value;
9757
+ if (typeof input2 === "undefined")
9758
9758
  return payload;
9759
9759
  payload.issues.push({
9760
9760
  expected: "void",
9761
9761
  code: "invalid_type",
9762
- input,
9762
+ input: input2,
9763
9763
  inst
9764
9764
  });
9765
9765
  return payload;
@@ -9774,15 +9774,15 @@ var $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
9774
9774
  } catch (_err) {
9775
9775
  }
9776
9776
  }
9777
- const input = payload.value;
9778
- const isDate = input instanceof Date;
9779
- const isValidDate = isDate && !Number.isNaN(input.getTime());
9777
+ const input2 = payload.value;
9778
+ const isDate = input2 instanceof Date;
9779
+ const isValidDate = isDate && !Number.isNaN(input2.getTime());
9780
9780
  if (isValidDate)
9781
9781
  return payload;
9782
9782
  payload.issues.push({
9783
9783
  expected: "date",
9784
9784
  code: "invalid_type",
9785
- input,
9785
+ input: input2,
9786
9786
  ...isDate ? { received: "Invalid Date" } : {},
9787
9787
  inst
9788
9788
  });
@@ -9798,20 +9798,20 @@ function handleArrayResult(result, final, index) {
9798
9798
  var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
9799
9799
  $ZodType.init(inst, def);
9800
9800
  inst._zod.parse = (payload, ctx) => {
9801
- const input = payload.value;
9802
- if (!Array.isArray(input)) {
9801
+ const input2 = payload.value;
9802
+ if (!Array.isArray(input2)) {
9803
9803
  payload.issues.push({
9804
9804
  expected: "array",
9805
9805
  code: "invalid_type",
9806
- input,
9806
+ input: input2,
9807
9807
  inst
9808
9808
  });
9809
9809
  return payload;
9810
9810
  }
9811
- payload.value = Array(input.length);
9811
+ payload.value = Array(input2.length);
9812
9812
  const proms = [];
9813
- for (let i = 0; i < input.length; i++) {
9814
- const item = input[i];
9813
+ for (let i = 0; i < input2.length; i++) {
9814
+ const item = input2[i];
9815
9815
  const result = def.element._zod.run({
9816
9816
  value: item,
9817
9817
  issues: []
@@ -9828,8 +9828,8 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
9828
9828
  return payload;
9829
9829
  };
9830
9830
  });
9831
- function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
9832
- const isPresent = key in input;
9831
+ function handlePropertyResult(result, final, key, input2, isOptionalIn, isOptionalOut) {
9832
+ const isPresent = key in input2;
9833
9833
  if (result.issues.length) {
9834
9834
  if (isOptionalIn && isOptionalOut && !isPresent) {
9835
9835
  return;
@@ -9871,14 +9871,14 @@ function normalizeDef(def) {
9871
9871
  optionalKeys: new Set(okeys)
9872
9872
  };
9873
9873
  }
9874
- function handleCatchall(proms, input, payload, ctx, def, inst) {
9874
+ function handleCatchall(proms, input2, payload, ctx, def, inst) {
9875
9875
  const unrecognized = [];
9876
9876
  const keySet = def.keySet;
9877
9877
  const _catchall = def.catchall._zod;
9878
9878
  const t = _catchall.def.type;
9879
9879
  const isOptionalIn = _catchall.optin === "optional";
9880
9880
  const isOptionalOut = _catchall.optout === "optional";
9881
- for (const key in input) {
9881
+ for (const key in input2) {
9882
9882
  if (key === "__proto__")
9883
9883
  continue;
9884
9884
  if (keySet.has(key))
@@ -9887,18 +9887,18 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
9887
9887
  unrecognized.push(key);
9888
9888
  continue;
9889
9889
  }
9890
- const r = _catchall.run({ value: input[key], issues: [] }, ctx);
9890
+ const r = _catchall.run({ value: input2[key], issues: [] }, ctx);
9891
9891
  if (r instanceof Promise) {
9892
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
9892
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
9893
9893
  } else {
9894
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
9894
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
9895
9895
  }
9896
9896
  }
9897
9897
  if (unrecognized.length) {
9898
9898
  payload.issues.push({
9899
9899
  code: "unrecognized_keys",
9900
9900
  keys: unrecognized,
9901
- input,
9901
+ input: input2,
9902
9902
  inst
9903
9903
  });
9904
9904
  }
@@ -9942,12 +9942,12 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
9942
9942
  let value;
9943
9943
  inst._zod.parse = (payload, ctx) => {
9944
9944
  value ?? (value = _normalized.value);
9945
- const input = payload.value;
9946
- if (!isObject2(input)) {
9945
+ const input2 = payload.value;
9946
+ if (!isObject2(input2)) {
9947
9947
  payload.issues.push({
9948
9948
  expected: "object",
9949
9949
  code: "invalid_type",
9950
- input,
9950
+ input: input2,
9951
9951
  inst
9952
9952
  });
9953
9953
  return payload;
@@ -9959,17 +9959,17 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
9959
9959
  const el = shape[key];
9960
9960
  const isOptionalIn = el._zod.optin === "optional";
9961
9961
  const isOptionalOut = el._zod.optout === "optional";
9962
- const r = el._zod.run({ value: input[key], issues: [] }, ctx);
9962
+ const r = el._zod.run({ value: input2[key], issues: [] }, ctx);
9963
9963
  if (r instanceof Promise) {
9964
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
9964
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input2, isOptionalIn, isOptionalOut)));
9965
9965
  } else {
9966
- handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
9966
+ handlePropertyResult(r, payload, key, input2, isOptionalIn, isOptionalOut);
9967
9967
  }
9968
9968
  }
9969
9969
  if (!catchall) {
9970
9970
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
9971
9971
  }
9972
- return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
9972
+ return handleCatchall(proms, input2, payload, ctx, _normalized.value, inst);
9973
9973
  };
9974
9974
  });
9975
9975
  var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
@@ -10078,12 +10078,12 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
10078
10078
  let value;
10079
10079
  inst._zod.parse = (payload, ctx) => {
10080
10080
  value ?? (value = _normalized.value);
10081
- const input = payload.value;
10082
- if (!isObject2(input)) {
10081
+ const input2 = payload.value;
10082
+ if (!isObject2(input2)) {
10083
10083
  payload.issues.push({
10084
10084
  expected: "object",
10085
10085
  code: "invalid_type",
10086
- input,
10086
+ input: input2,
10087
10087
  inst
10088
10088
  });
10089
10089
  return payload;
@@ -10094,7 +10094,7 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
10094
10094
  payload = fastpass(payload, ctx);
10095
10095
  if (!catchall)
10096
10096
  return payload;
10097
- return handleCatchall([], input, payload, ctx, value, inst);
10097
+ return handleCatchall([], input2, payload, ctx, value, inst);
10098
10098
  }
10099
10099
  return superParse(payload, ctx);
10100
10100
  };
@@ -10254,17 +10254,17 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
10254
10254
  return map2;
10255
10255
  });
10256
10256
  inst._zod.parse = (payload, ctx) => {
10257
- const input = payload.value;
10258
- if (!isObject(input)) {
10257
+ const input2 = payload.value;
10258
+ if (!isObject(input2)) {
10259
10259
  payload.issues.push({
10260
10260
  code: "invalid_type",
10261
10261
  expected: "object",
10262
- input,
10262
+ input: input2,
10263
10263
  inst
10264
10264
  });
10265
10265
  return payload;
10266
10266
  }
10267
- const opt = disc.value.get(input?.[def.discriminator]);
10267
+ const opt = disc.value.get(input2?.[def.discriminator]);
10268
10268
  if (opt) {
10269
10269
  return opt._zod.run(payload, ctx);
10270
10270
  }
@@ -10277,7 +10277,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
10277
10277
  note: "No matching discriminator",
10278
10278
  discriminator: def.discriminator,
10279
10279
  options: Array.from(disc.value.keys()),
10280
- input,
10280
+ input: input2,
10281
10281
  path: [def.discriminator],
10282
10282
  inst
10283
10283
  });
@@ -10287,9 +10287,9 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
10287
10287
  var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
10288
10288
  $ZodType.init(inst, def);
10289
10289
  inst._zod.parse = (payload, ctx) => {
10290
- const input = payload.value;
10291
- const left = def.left._zod.run({ value: input, issues: [] }, ctx);
10292
- const right = def.right._zod.run({ value: input, issues: [] }, ctx);
10290
+ const input2 = payload.value;
10291
+ const left = def.left._zod.run({ value: input2, issues: [] }, ctx);
10292
+ const right = def.right._zod.run({ value: input2, issues: [] }, ctx);
10293
10293
  const async = left instanceof Promise || right instanceof Promise;
10294
10294
  if (async) {
10295
10295
  return Promise.all([left, right]).then(([left2, right2]) => {
@@ -10386,10 +10386,10 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
10386
10386
  $ZodType.init(inst, def);
10387
10387
  const items = def.items;
10388
10388
  inst._zod.parse = (payload, ctx) => {
10389
- const input = payload.value;
10390
- if (!Array.isArray(input)) {
10389
+ const input2 = payload.value;
10390
+ if (!Array.isArray(input2)) {
10391
10391
  payload.issues.push({
10392
- input,
10392
+ input: input2,
10393
10393
  inst,
10394
10394
  expected: "tuple",
10395
10395
  code: "invalid_type"
@@ -10401,23 +10401,23 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
10401
10401
  const optinStart = getTupleOptStart(items, "optin");
10402
10402
  const optoutStart = getTupleOptStart(items, "optout");
10403
10403
  if (!def.rest) {
10404
- if (input.length < optinStart) {
10404
+ if (input2.length < optinStart) {
10405
10405
  payload.issues.push({
10406
10406
  code: "too_small",
10407
10407
  minimum: optinStart,
10408
10408
  inclusive: true,
10409
- input,
10409
+ input: input2,
10410
10410
  inst,
10411
10411
  origin: "array"
10412
10412
  });
10413
10413
  return payload;
10414
10414
  }
10415
- if (input.length > items.length) {
10415
+ if (input2.length > items.length) {
10416
10416
  payload.issues.push({
10417
10417
  code: "too_big",
10418
10418
  maximum: items.length,
10419
10419
  inclusive: true,
10420
- input,
10420
+ input: input2,
10421
10421
  inst,
10422
10422
  origin: "array"
10423
10423
  });
@@ -10425,7 +10425,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
10425
10425
  }
10426
10426
  const itemResults = new Array(items.length);
10427
10427
  for (let i = 0; i < items.length; i++) {
10428
- const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
10428
+ const r = items[i]._zod.run({ value: input2[i], issues: [] }, ctx);
10429
10429
  if (r instanceof Promise) {
10430
10430
  proms.push(r.then((rr2) => {
10431
10431
  itemResults[i] = rr2;
@@ -10436,7 +10436,7 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
10436
10436
  }
10437
10437
  if (def.rest) {
10438
10438
  let i = items.length - 1;
10439
- const rest = input.slice(items.length);
10439
+ const rest = input2.slice(items.length);
10440
10440
  for (const el of rest) {
10441
10441
  i++;
10442
10442
  const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
@@ -10448,9 +10448,9 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
10448
10448
  }
10449
10449
  }
10450
10450
  if (proms.length) {
10451
- return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
10451
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input2, optoutStart));
10452
10452
  }
10453
- return handleTupleResults(itemResults, payload, items, input, optoutStart);
10453
+ return handleTupleResults(itemResults, payload, items, input2, optoutStart);
10454
10454
  };
10455
10455
  });
10456
10456
  function getTupleOptStart(items, key) {
@@ -10466,10 +10466,10 @@ function handleTupleResult(result, final, index) {
10466
10466
  }
10467
10467
  final.value[index] = result.value;
10468
10468
  }
10469
- function handleTupleResults(itemResults, final, items, input, optoutStart) {
10469
+ function handleTupleResults(itemResults, final, items, input2, optoutStart) {
10470
10470
  for (let i = 0; i < items.length; i++) {
10471
10471
  const r = itemResults[i];
10472
- const isPresent = i < input.length;
10472
+ const isPresent = i < input2.length;
10473
10473
  if (r.issues.length) {
10474
10474
  if (!isPresent && i >= optoutStart) {
10475
10475
  final.value.length = i;
@@ -10479,7 +10479,7 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
10479
10479
  }
10480
10480
  final.value[i] = r.value;
10481
10481
  }
10482
- for (let i = final.value.length - 1; i >= input.length; i--) {
10482
+ for (let i = final.value.length - 1; i >= input2.length; i--) {
10483
10483
  if (items[i]._zod.optout === "optional" && final.value[i] === void 0) {
10484
10484
  final.value.length = i;
10485
10485
  } else {
@@ -10491,12 +10491,12 @@ function handleTupleResults(itemResults, final, items, input, optoutStart) {
10491
10491
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10492
10492
  $ZodType.init(inst, def);
10493
10493
  inst._zod.parse = (payload, ctx) => {
10494
- const input = payload.value;
10495
- if (!isPlainObject(input)) {
10494
+ const input2 = payload.value;
10495
+ if (!isPlainObject(input2)) {
10496
10496
  payload.issues.push({
10497
10497
  expected: "record",
10498
10498
  code: "invalid_type",
10499
- input,
10499
+ input: input2,
10500
10500
  inst
10501
10501
  });
10502
10502
  return payload;
@@ -10525,7 +10525,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10525
10525
  continue;
10526
10526
  }
10527
10527
  const outKey = keyResult.value;
10528
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
10528
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
10529
10529
  if (result instanceof Promise) {
10530
10530
  proms.push(result.then((result2) => {
10531
10531
  if (result2.issues.length) {
@@ -10542,7 +10542,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10542
10542
  }
10543
10543
  }
10544
10544
  let unrecognized;
10545
- for (const key in input) {
10545
+ for (const key in input2) {
10546
10546
  if (!recordKeys.has(key)) {
10547
10547
  unrecognized = unrecognized ?? [];
10548
10548
  unrecognized.push(key);
@@ -10551,17 +10551,17 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10551
10551
  if (unrecognized && unrecognized.length > 0) {
10552
10552
  payload.issues.push({
10553
10553
  code: "unrecognized_keys",
10554
- input,
10554
+ input: input2,
10555
10555
  inst,
10556
10556
  keys: unrecognized
10557
10557
  });
10558
10558
  }
10559
10559
  } else {
10560
10560
  payload.value = {};
10561
- for (const key of Reflect.ownKeys(input)) {
10561
+ for (const key of Reflect.ownKeys(input2)) {
10562
10562
  if (key === "__proto__")
10563
10563
  continue;
10564
- if (!Object.prototype.propertyIsEnumerable.call(input, key))
10564
+ if (!Object.prototype.propertyIsEnumerable.call(input2, key))
10565
10565
  continue;
10566
10566
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
10567
10567
  if (keyResult instanceof Promise) {
@@ -10579,7 +10579,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10579
10579
  }
10580
10580
  if (keyResult.issues.length) {
10581
10581
  if (def.mode === "loose") {
10582
- payload.value[key] = input[key];
10582
+ payload.value[key] = input2[key];
10583
10583
  } else {
10584
10584
  payload.issues.push({
10585
10585
  code: "invalid_key",
@@ -10592,7 +10592,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10592
10592
  }
10593
10593
  continue;
10594
10594
  }
10595
- const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
10595
+ const result = def.valueType._zod.run({ value: input2[key], issues: [] }, ctx);
10596
10596
  if (result instanceof Promise) {
10597
10597
  proms.push(result.then((result2) => {
10598
10598
  if (result2.issues.length) {
@@ -10617,27 +10617,27 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
10617
10617
  var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
10618
10618
  $ZodType.init(inst, def);
10619
10619
  inst._zod.parse = (payload, ctx) => {
10620
- const input = payload.value;
10621
- if (!(input instanceof Map)) {
10620
+ const input2 = payload.value;
10621
+ if (!(input2 instanceof Map)) {
10622
10622
  payload.issues.push({
10623
10623
  expected: "map",
10624
10624
  code: "invalid_type",
10625
- input,
10625
+ input: input2,
10626
10626
  inst
10627
10627
  });
10628
10628
  return payload;
10629
10629
  }
10630
10630
  const proms = [];
10631
10631
  payload.value = /* @__PURE__ */ new Map();
10632
- for (const [key, value] of input) {
10632
+ for (const [key, value] of input2) {
10633
10633
  const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
10634
10634
  const valueResult = def.valueType._zod.run({ value, issues: [] }, ctx);
10635
10635
  if (keyResult instanceof Promise || valueResult instanceof Promise) {
10636
10636
  proms.push(Promise.all([keyResult, valueResult]).then(([keyResult2, valueResult2]) => {
10637
- handleMapResult(keyResult2, valueResult2, payload, key, input, inst, ctx);
10637
+ handleMapResult(keyResult2, valueResult2, payload, key, input2, inst, ctx);
10638
10638
  }));
10639
10639
  } else {
10640
- handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
10640
+ handleMapResult(keyResult, valueResult, payload, key, input2, inst, ctx);
10641
10641
  }
10642
10642
  }
10643
10643
  if (proms.length)
@@ -10645,7 +10645,7 @@ var $ZodMap = /* @__PURE__ */ $constructor("$ZodMap", (inst, def) => {
10645
10645
  return payload;
10646
10646
  };
10647
10647
  });
10648
- function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
10648
+ function handleMapResult(keyResult, valueResult, final, key, input2, inst, ctx) {
10649
10649
  if (keyResult.issues.length) {
10650
10650
  if (propertyKeyTypes.has(typeof key)) {
10651
10651
  final.issues.push(...prefixIssues(key, keyResult.issues));
@@ -10653,7 +10653,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
10653
10653
  final.issues.push({
10654
10654
  code: "invalid_key",
10655
10655
  origin: "map",
10656
- input,
10656
+ input: input2,
10657
10657
  inst,
10658
10658
  issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
10659
10659
  });
@@ -10666,7 +10666,7 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
10666
10666
  final.issues.push({
10667
10667
  origin: "map",
10668
10668
  code: "invalid_element",
10669
- input,
10669
+ input: input2,
10670
10670
  inst,
10671
10671
  key,
10672
10672
  issues: valueResult.issues.map((iss) => finalizeIssue(iss, ctx, config()))
@@ -10678,10 +10678,10 @@ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
10678
10678
  var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
10679
10679
  $ZodType.init(inst, def);
10680
10680
  inst._zod.parse = (payload, ctx) => {
10681
- const input = payload.value;
10682
- if (!(input instanceof Set)) {
10681
+ const input2 = payload.value;
10682
+ if (!(input2 instanceof Set)) {
10683
10683
  payload.issues.push({
10684
- input,
10684
+ input: input2,
10685
10685
  inst,
10686
10686
  expected: "set",
10687
10687
  code: "invalid_type"
@@ -10690,7 +10690,7 @@ var $ZodSet = /* @__PURE__ */ $constructor("$ZodSet", (inst, def) => {
10690
10690
  }
10691
10691
  const proms = [];
10692
10692
  payload.value = /* @__PURE__ */ new Set();
10693
- for (const item of input) {
10693
+ for (const item of input2) {
10694
10694
  const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
10695
10695
  if (result instanceof Promise) {
10696
10696
  proms.push(result.then((result2) => handleSetResult(result2, payload)));
@@ -10715,14 +10715,14 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
10715
10715
  inst._zod.values = valuesSet;
10716
10716
  inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
10717
10717
  inst._zod.parse = (payload, _ctx) => {
10718
- const input = payload.value;
10719
- if (valuesSet.has(input)) {
10718
+ const input2 = payload.value;
10719
+ if (valuesSet.has(input2)) {
10720
10720
  return payload;
10721
10721
  }
10722
10722
  payload.issues.push({
10723
10723
  code: "invalid_value",
10724
10724
  values,
10725
- input,
10725
+ input: input2,
10726
10726
  inst
10727
10727
  });
10728
10728
  return payload;
@@ -10737,14 +10737,14 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
10737
10737
  inst._zod.values = values;
10738
10738
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
10739
10739
  inst._zod.parse = (payload, _ctx) => {
10740
- const input = payload.value;
10741
- if (values.has(input)) {
10740
+ const input2 = payload.value;
10741
+ if (values.has(input2)) {
10742
10742
  return payload;
10743
10743
  }
10744
10744
  payload.issues.push({
10745
10745
  code: "invalid_value",
10746
10746
  values: def.values,
10747
- input,
10747
+ input: input2,
10748
10748
  inst
10749
10749
  });
10750
10750
  return payload;
@@ -10753,13 +10753,13 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
10753
10753
  var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
10754
10754
  $ZodType.init(inst, def);
10755
10755
  inst._zod.parse = (payload, _ctx) => {
10756
- const input = payload.value;
10757
- if (input instanceof File)
10756
+ const input2 = payload.value;
10757
+ if (input2 instanceof File)
10758
10758
  return payload;
10759
10759
  payload.issues.push({
10760
10760
  expected: "file",
10761
10761
  code: "invalid_type",
10762
- input,
10762
+ input: input2,
10763
10763
  inst
10764
10764
  });
10765
10765
  return payload;
@@ -10789,8 +10789,8 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
10789
10789
  return payload;
10790
10790
  };
10791
10791
  });
10792
- function handleOptionalResult(result, input) {
10793
- if (input === void 0 && (result.issues.length || result.fallback)) {
10792
+ function handleOptionalResult(result, input2) {
10793
+ if (input2 === void 0 && (result.issues.length || result.fallback)) {
10794
10794
  return { issues: [], value: void 0 };
10795
10795
  }
10796
10796
  return result;
@@ -10808,11 +10808,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
10808
10808
  });
10809
10809
  inst._zod.parse = (payload, ctx) => {
10810
10810
  if (def.innerType._zod.optin === "optional") {
10811
- const input = payload.value;
10811
+ const input2 = payload.value;
10812
10812
  const result = def.innerType._zod.run(payload, ctx);
10813
10813
  if (result instanceof Promise)
10814
- return result.then((r) => handleOptionalResult(r, input));
10815
- return handleOptionalResult(result, input);
10814
+ return result.then((r) => handleOptionalResult(r, input2));
10815
+ return handleOptionalResult(result, input2);
10816
10816
  }
10817
10817
  if (payload.value === void 0) {
10818
10818
  return payload;
@@ -11237,20 +11237,20 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
11237
11237
  return payload;
11238
11238
  };
11239
11239
  inst._zod.check = (payload) => {
11240
- const input = payload.value;
11241
- const r = def.fn(input);
11240
+ const input2 = payload.value;
11241
+ const r = def.fn(input2);
11242
11242
  if (r instanceof Promise) {
11243
- return r.then((r2) => handleRefineResult(r2, payload, input, inst));
11243
+ return r.then((r2) => handleRefineResult(r2, payload, input2, inst));
11244
11244
  }
11245
- handleRefineResult(r, payload, input, inst);
11245
+ handleRefineResult(r, payload, input2, inst);
11246
11246
  return;
11247
11247
  };
11248
11248
  });
11249
- function handleRefineResult(result, payload, input, inst) {
11249
+ function handleRefineResult(result, payload, input2, inst) {
11250
11250
  if (!result) {
11251
11251
  const _iss = {
11252
11252
  code: "custom",
11253
- input,
11253
+ input: input2,
11254
11254
  inst,
11255
11255
  // incorporates params.error into issue reporting
11256
11256
  path: [...inst._zod.def.path ?? []],
@@ -14537,8 +14537,8 @@ function ko_default() {
14537
14537
  }
14538
14538
 
14539
14539
  // ../../../node_modules/zod/v4/locales/lt.js
14540
- var capitalizeFirstCharacter = (text) => {
14541
- return text.charAt(0).toUpperCase() + text.slice(1);
14540
+ var capitalizeFirstCharacter = (text2) => {
14541
+ return text2.charAt(0).toUpperCase() + text2.slice(1);
14542
14542
  };
14543
14543
  function getUnitTypeFromNumber(number4) {
14544
14544
  const abs = Math.abs(number4);
@@ -17938,23 +17938,23 @@ function _overwrite(tx) {
17938
17938
  }
17939
17939
  // @__NO_SIDE_EFFECTS__
17940
17940
  function _normalize(form) {
17941
- return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
17941
+ return /* @__PURE__ */ _overwrite((input2) => input2.normalize(form));
17942
17942
  }
17943
17943
  // @__NO_SIDE_EFFECTS__
17944
17944
  function _trim() {
17945
- return /* @__PURE__ */ _overwrite((input) => input.trim());
17945
+ return /* @__PURE__ */ _overwrite((input2) => input2.trim());
17946
17946
  }
17947
17947
  // @__NO_SIDE_EFFECTS__
17948
17948
  function _toLowerCase() {
17949
- return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
17949
+ return /* @__PURE__ */ _overwrite((input2) => input2.toLowerCase());
17950
17950
  }
17951
17951
  // @__NO_SIDE_EFFECTS__
17952
17952
  function _toUpperCase() {
17953
- return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
17953
+ return /* @__PURE__ */ _overwrite((input2) => input2.toUpperCase());
17954
17954
  }
17955
17955
  // @__NO_SIDE_EFFECTS__
17956
17956
  function _slugify() {
17957
- return /* @__PURE__ */ _overwrite((input) => slugify(input));
17957
+ return /* @__PURE__ */ _overwrite((input2) => slugify(input2));
17958
17958
  }
17959
17959
  // @__NO_SIDE_EFFECTS__
17960
17960
  function _array(Class2, element, params) {
@@ -18259,8 +18259,8 @@ function _stringbool(Classes, _params) {
18259
18259
  type: "pipe",
18260
18260
  in: stringSchema,
18261
18261
  out: booleanSchema,
18262
- transform: ((input, payload) => {
18263
- let data = input;
18262
+ transform: ((input2, payload) => {
18263
+ let data = input2;
18264
18264
  if (params.case !== "sensitive")
18265
18265
  data = data.toLowerCase();
18266
18266
  if (truthySet.has(data)) {
@@ -18279,8 +18279,8 @@ function _stringbool(Classes, _params) {
18279
18279
  return {};
18280
18280
  }
18281
18281
  }),
18282
- reverseTransform: ((input, _payload) => {
18283
- if (input === true) {
18282
+ reverseTransform: ((input2, _payload) => {
18283
+ if (input2 === true) {
18284
18284
  return truthyArray[0] || "true";
18285
18285
  } else {
18286
18286
  return falsyArray[0] || "false";
@@ -19176,9 +19176,9 @@ var allProcessors = {
19176
19176
  optional: optionalProcessor,
19177
19177
  lazy: lazyProcessor
19178
19178
  };
19179
- function toJSONSchema(input, params) {
19180
- if ("_idmap" in input) {
19181
- const registry2 = input;
19179
+ function toJSONSchema(input2, params) {
19180
+ if ("_idmap" in input2) {
19181
+ const registry2 = input2;
19182
19182
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
19183
19183
  const defs = {};
19184
19184
  for (const entry of registry2._idmap.entries()) {
@@ -19206,9 +19206,9 @@ function toJSONSchema(input, params) {
19206
19206
  return { schemas };
19207
19207
  }
19208
19208
  const ctx = initializeContext({ ...params, processors: allProcessors });
19209
- process2(input, ctx);
19210
- extractDefs(ctx, input);
19211
- return finalize(ctx, input);
19209
+ process2(input2, ctx);
19210
+ extractDefs(ctx, input2);
19211
+ return finalize(ctx, input2);
19212
19212
  }
19213
19213
 
19214
19214
  // ../../../node_modules/zod/v4/core/json-schema-generator.js
@@ -21485,7 +21485,7 @@ var codexhostErrorSchema = external_exports.strictObject({
21485
21485
 
21486
21486
  // ../../shared-contracts/dist/harness-presentation.js
21487
21487
  var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
21488
- var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
21488
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text2) => text2.trim().length > 0);
21489
21489
  var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
21490
21490
  label: displayText(256).optional(),
21491
21491
  description: displayText(1024).optional()
@@ -21574,7 +21574,7 @@ var usageMeasurementsSchema = external_exports.object({
21574
21574
  outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
21575
21575
  timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
21576
21576
  }).strict();
21577
- var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
21577
+ var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
21578
21578
  var composerIndicatorsSchema = external_exports.array(external_exports.object({
21579
21579
  kind: external_exports.literal("countdown"),
21580
21580
  id: external_exports.string().min(1).max(64),
@@ -21957,6 +21957,8 @@ var externalThreadInspectionSchema = external_exports.object({
21957
21957
  effectiveThinkingOptionId: harnessThinkingOptionIdSchema.optional(),
21958
21958
  availableThinkingOptions: harnessThinkingOptionsSchema.optional(),
21959
21959
  effectivePermissionModeId: harnessPermissionModeIdSchema.optional(),
21960
+ /** Live Session catalog when it, not the Adapter inspection, contains `effectiveModel`. */
21961
+ catalog: harnessModelCatalogSchema.optional(),
21960
21962
  history: harnessHistoryCapabilitiesSchema,
21961
21963
  usage: threadUsageSnapshotSchema.optional(),
21962
21964
  locked: external_exports.literal(true)
@@ -22015,9 +22017,9 @@ var threadSteeringInspectParamsSchema = external_exports.object({
22015
22017
  }).strict();
22016
22018
  var threadSteeringContextSchema = external_exports.object({
22017
22019
  kind: external_exports.literal("application"),
22018
- value: external_exports.string().transform((text, context) => {
22020
+ value: external_exports.string().transform((text2, context) => {
22019
22021
  try {
22020
- return JSON.parse(text);
22022
+ return JSON.parse(text2);
22021
22023
  } catch {
22022
22024
  context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
22023
22025
  return external_exports.NEVER;
@@ -22152,8 +22154,8 @@ var desktopExtensionHttpUrlSchema = external_exports.string().trim().max(2048).r
22152
22154
  const { username, password } = new URL(value);
22153
22155
  return !username && !password && !/[\\\s]/u.test(value);
22154
22156
  }, "URL must not contain credentials, backslashes, or whitespace");
22155
- function localizedText(text) {
22156
- return external_exports.strictObject({ en: text, "zh-CN": text });
22157
+ function localizedText(text2) {
22158
+ return external_exports.strictObject({ en: text2, "zh-CN": text2 });
22157
22159
  }
22158
22160
  var desktopExtensionLocalizedTextSchema = localizedText(external_exports.string().trim().min(1));
22159
22161
  var categoriesSchema = external_exports.array(desktopExtensionCategorySchema).max(desktopExtensionCategorySchema.options.length).refine((categories) => new Set(categories).size === categories.length, "Duplicate categories");
@@ -22270,8 +22272,8 @@ var desktopExtensionTrustTierSchema = external_exports.enum(["official", "commun
22270
22272
  function isGitHubDesktopExtensionZipballUrl(url2) {
22271
22273
  return url2.origin === "https://api.github.com" && /^\/repos\/[\w-]+\/[\w.-]+\/zipball(?:\/[^/]+)?\/?$/u.test(url2.pathname);
22272
22274
  }
22273
- var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input) => {
22274
- const url2 = new URL(input);
22275
+ var desktopExtensionZipUrlSchema = desktopExtensionHttpUrlSchema.refine((input2) => {
22276
+ const url2 = new URL(input2);
22275
22277
  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);
22276
22278
  }, "Expected a .zip download URL or a GitHub zipball URL");
22277
22279
  var desktopExtensionCatalogEntrySchema = external_exports.strictObject({
@@ -22622,6 +22624,8 @@ var CLIENT_CHANNEL_METHODS = [
22622
22624
  "codexhost/workspace/read",
22623
22625
  "codexhost/thread/tree/read",
22624
22626
  "codexhost/thread/pins/list",
22627
+ "codexhost/thread/sections/list",
22628
+ "codexhost/thread/sections/move",
22625
22629
  "codexhost/thread/pins/set",
22626
22630
  "codexhost/harness/plugins/list",
22627
22631
  "codexhost/harness/inspect",
@@ -22660,8 +22664,21 @@ var CLIENT_CHANNEL_METHODS = [
22660
22664
  "codexhost/update/check",
22661
22665
  "codexhost/update/start",
22662
22666
  "codexhost/update/status",
22667
+ "codexhost/announcement/get",
22668
+ "codexhost/announcement/acknowledge",
22663
22669
  "codexhost/sessions/loaded/list"
22664
22670
  ];
22671
+ var clientThreadSectionsSchema = external_exports.object({
22672
+ sections: external_exports.array(external_exports.object({
22673
+ id: external_exports.string().min(1),
22674
+ name: external_exports.string().min(1),
22675
+ threads: external_exports.array(jsonObjectSchema)
22676
+ }).strict())
22677
+ }).strict();
22678
+ var clientThreadSectionMoveSchema = external_exports.object({
22679
+ threadId: external_exports.string().min(1).max(1024),
22680
+ sectionId: external_exports.string().min(1).max(1024).nullable()
22681
+ }).strict();
22665
22682
  var clientThreadPinsSchema = external_exports.object({ threadIds: external_exports.array(external_exports.string().min(1)) }).strict();
22666
22683
  var clientThreadPinParamsSchema = external_exports.object({ threadId: external_exports.string().min(1).max(1024), pinned: external_exports.boolean() }).strict();
22667
22684
  var clientThreadTreeReadParamsSchema = external_exports.object({}).strict();
@@ -23203,8 +23220,8 @@ var harnessPreferencePatchSchema = external_exports.strictObject({
23203
23220
  operations: external_exports.array(harnessPreferenceOperationSchema).min(1).max(256),
23204
23221
  initializeOnly: external_exports.boolean().optional(),
23205
23222
  expectedRevision: external_exports.number().int().nonnegative().optional()
23206
- }).superRefine((input, ctx) => {
23207
- for (const operation of input.operations) {
23223
+ }).superRefine((input2, ctx) => {
23224
+ for (const operation of input2.operations) {
23208
23225
  if (operation.kind === "newThread" && (!operation.lastHarness && !operation.configuration || Boolean(operation.harnessId) !== Boolean(operation.configuration)))
23209
23226
  ctx.addIssue({
23210
23227
  code: "custom",
@@ -23606,13 +23623,18 @@ var harnessLaunchSettingsSchema = external_exports.object({
23606
23623
  // ../../shared-contracts/dist/harness-installation.js
23607
23624
  var harnessInstallationParamsSchema = external_exports.object({
23608
23625
  harnessId: harnessIdSchema,
23609
- action: external_exports.enum(["check", "update", "install"])
23610
- }).strict();
23626
+ action: external_exports.enum(["check", "update", "install"]),
23627
+ confirmedVersion: external_exports.string().min(1).max(128).optional()
23628
+ }).strict().refine(({ action, confirmedVersion }) => action === "update" || confirmedVersion === void 0);
23611
23629
  var harnessInstallationStateSchema = external_exports.object({
23612
23630
  currentVersion: external_exports.string().min(1).max(128),
23613
23631
  latestVersion: external_exports.string().min(1).max(128),
23614
23632
  updateAvailable: external_exports.boolean(),
23615
23633
  canUpdate: external_exports.boolean(),
23634
+ /** Present when the Adapter has a verified list and the available target is outside it. */
23635
+ latestVerifiedVersion: external_exports.string().min(1).max(128).optional(),
23636
+ /** Update preflight stopped before running the installer; latestVersion needs confirmation. */
23637
+ confirmationRequired: external_exports.literal(true).optional(),
23616
23638
  /** Defaults to CLI; some Harnesses ship only inside a desktop application. */
23617
23639
  versionKind: external_exports.enum(["cli", "application"]).optional(),
23618
23640
  /** Official download opened by the user; does not imply an automatic installation. */
@@ -23940,6 +23962,38 @@ var updateStatusResultSchema = external_exports.strictObject({
23940
23962
  status: updateStatusSchema.nullable()
23941
23963
  });
23942
23964
 
23965
+ // ../../shared-contracts/dist/release-announcement.js
23966
+ var RELEASE_ANNOUNCEMENT_MAX_THEMES = 12;
23967
+ var releaseAnnouncementThemeSchema = external_exports.strictObject({
23968
+ icon: external_exports.string().min(1).max(16).optional(),
23969
+ title: external_exports.string().min(1).max(120),
23970
+ body: external_exports.string().min(1).max(1200),
23971
+ contributors: external_exports.array(external_exports.string().min(1).max(39)).max(30)
23972
+ });
23973
+ var releaseAnnouncementContentSchema = external_exports.strictObject({
23974
+ summary: external_exports.string().min(1).max(600).optional(),
23975
+ themes: external_exports.array(releaseAnnouncementThemeSchema).min(1).max(RELEASE_ANNOUNCEMENT_MAX_THEMES)
23976
+ });
23977
+ var releaseAnnouncementSchema = external_exports.strictObject({
23978
+ version: updateSemanticVersionSchema,
23979
+ publishedAt: external_exports.iso.datetime(),
23980
+ url: external_exports.string().max(300).regex(/^https:\/\/github\.com\/BytePioneer-AI\/codex-host\/releases\/tag\/v[0-9A-Za-z.+-]+$/u),
23981
+ zh: releaseAnnouncementContentSchema.nullable(),
23982
+ en: releaseAnnouncementContentSchema.nullable()
23983
+ }).refine((value) => value.zh !== null || value.en !== null, {
23984
+ message: "an announcement needs at least one language"
23985
+ });
23986
+ var releaseAnnouncementGetParamsSchema = external_exports.strictObject({
23987
+ manual: external_exports.boolean().optional()
23988
+ });
23989
+ var releaseAnnouncementGetResultSchema = external_exports.strictObject({
23990
+ announcement: releaseAnnouncementSchema.nullable(),
23991
+ unread: external_exports.boolean()
23992
+ });
23993
+ var releaseAnnouncementAcknowledgeParamsSchema = external_exports.strictObject({
23994
+ version: updateSemanticVersionSchema
23995
+ });
23996
+
23943
23997
  // ../../shared-contracts/dist/thread-watch-notice.js
23944
23998
  var THREAD_WATCH_NOTICE_OUTCOMES = [
23945
23999
  "completed",
@@ -23987,17 +24041,67 @@ var remoteSshSetupResultSchema = external_exports.object({ state: external_expor
23987
24041
 
23988
24042
  // ../../shared-contracts/dist/remote-sessions.js
23989
24043
  var REMOTE_CONTROLLER_REQUEST_MAX_BYTES = 16 * 1024;
23990
- var identity = external_exports.string().min(1).max(1024);
24044
+ var REMOTE_IDENTITY_MAX_LENGTH = 1024;
24045
+ var identity = external_exports.string().min(1).max(REMOTE_IDENTITY_MAX_LENGTH);
23991
24046
  var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
23992
24047
  var thread = { ...target, threadId: identity };
24048
+ var text = external_exports.string().min(1).max(8e3);
24049
+ var input = { text, requestId: identity };
24050
+ var remoteDeliveryReplySchema = external_exports.discriminatedUnion("accepted", [
24051
+ external_exports.object({ accepted: external_exports.literal(true), startQueuedItemId: identity.optional() }),
24052
+ external_exports.object({
24053
+ accepted: external_exports.literal(false),
24054
+ code: external_exports.enum([
24055
+ "remote/queue-unavailable",
24056
+ "remote/steer-unavailable",
24057
+ "remote/turn-changed",
24058
+ "remote/send-rejected",
24059
+ "session/queue-item-not-found",
24060
+ "session/queue-item-starting"
24061
+ ]),
24062
+ message: external_exports.string()
24063
+ })
24064
+ ]);
24065
+ var remoteQueueSnapshotSchema = external_exports.discriminatedUnion("available", [
24066
+ external_exports.object({ available: external_exports.literal(false) }),
24067
+ external_exports.object({
24068
+ available: external_exports.literal(true),
24069
+ items: external_exports.array(external_exports.object({ id: identity, clientUserMessageId: identity, preview: external_exports.string().max(801) })).max(100)
24070
+ })
24071
+ ]);
23993
24072
  var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
23994
24073
  external_exports.strictObject({ kind: external_exports.literal("hosts") }),
24074
+ external_exports.strictObject({
24075
+ kind: external_exports.literal("create"),
24076
+ ...target,
24077
+ cwd: external_exports.string().min(1).max(8192),
24078
+ epoch: identity
24079
+ }),
24080
+ external_exports.strictObject({ kind: external_exports.literal("projectHarnesses"), ...target, epoch: identity }),
24081
+ external_exports.strictObject({
24082
+ kind: external_exports.literal("inspectHarness"),
24083
+ ...target,
24084
+ epoch: identity,
24085
+ cwd: external_exports.string().min(1).max(8192),
24086
+ harnessId: identity
24087
+ }),
24088
+ external_exports.strictObject({
24089
+ kind: external_exports.literal("startSelected"),
24090
+ ...target,
24091
+ epoch: identity,
24092
+ cwd: external_exports.string().min(1).max(8192),
24093
+ harnessId: identity,
24094
+ model: external_exports.string().min(1).max(4096),
24095
+ serviceTier: external_exports.enum(["priority", "ultrafast"]).optional(),
24096
+ reasoningEffort: identity.optional()
24097
+ }),
23995
24098
  external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
23996
24099
  external_exports.strictObject({
23997
24100
  kind: external_exports.literal("list"),
23998
24101
  ...target,
23999
24102
  cursor: external_exports.string().nullable(),
24000
- archived: external_exports.boolean()
24103
+ archived: external_exports.boolean(),
24104
+ includeLoaded: external_exports.literal(true).optional()
24001
24105
  }),
24002
24106
  external_exports.strictObject({
24003
24107
  kind: external_exports.literal("read"),
@@ -24027,9 +24131,25 @@ var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
24027
24131
  kind: external_exports.literal("prompt"),
24028
24132
  ...thread,
24029
24133
  epoch: identity,
24030
- text: external_exports.string().min(1).max(8e3),
24134
+ text,
24031
24135
  requestId: identity.optional()
24032
24136
  }),
24137
+ external_exports.strictObject({ kind: external_exports.literal("queue"), ...thread, epoch: identity }),
24138
+ external_exports.strictObject({
24139
+ kind: external_exports.literal("delivery"),
24140
+ ...thread,
24141
+ epoch: identity,
24142
+ action: external_exports.discriminatedUnion("kind", [
24143
+ external_exports.strictObject({ kind: external_exports.literal("enqueue"), ...input }),
24144
+ external_exports.strictObject({ kind: external_exports.literal("steer"), ...input, turnId: identity }),
24145
+ external_exports.strictObject({ kind: external_exports.literal("remove"), itemId: identity }),
24146
+ external_exports.strictObject({
24147
+ kind: external_exports.literal("start"),
24148
+ itemId: identity,
24149
+ onlyIfHead: external_exports.literal(true).optional()
24150
+ })
24151
+ ])
24152
+ }),
24033
24153
  external_exports.strictObject({ kind: external_exports.literal("interrupt"), ...thread, epoch: identity, turnId: identity }),
24034
24154
  external_exports.strictObject({
24035
24155
  kind: external_exports.literal("rename"),
@@ -28580,8 +28700,8 @@ var VERSION_MANAGER_ROOTS = "<version-managers>";
28580
28700
  function installRootExtensions(platform) {
28581
28701
  return platform === "win32" ? [".exe", ".cmd"] : [""];
28582
28702
  }
28583
- function resolveHomeDirectory(input) {
28584
- return input.homeDirectory ?? environmentValue(input.environment, "HOME") ?? environmentValue(input.environment, "USERPROFILE") ?? os.homedir();
28703
+ function resolveHomeDirectory(input2) {
28704
+ return input2.homeDirectory ?? environmentValue(input2.environment, "HOME") ?? environmentValue(input2.environment, "USERPROFILE") ?? os.homedir();
28585
28705
  }
28586
28706
  function templateVariables(environment, platform, home) {
28587
28707
  const pathFlavor = targetPath(platform);
@@ -28614,36 +28734,36 @@ function expandInstallRoot(template, environment, platform, home) {
28614
28734
  });
28615
28735
  return unresolved ? void 0 : joinTemplate(platform, substituted);
28616
28736
  }
28617
- function installRootDirectories(spec, input, dependencies, platform, home) {
28737
+ function installRootDirectories(spec, input2, dependencies, platform, home) {
28618
28738
  const templates = (platform === "win32" ? spec.installRoots?.windows : spec.installRoots?.posix) ?? [];
28619
28739
  const directories = [];
28620
28740
  for (const template of templates) {
28621
28741
  if (template === VERSION_MANAGER_ROOTS) {
28622
28742
  directories.push(...versionManagerBinaryDirectories({
28623
28743
  platform,
28624
- environment: input.environment,
28744
+ environment: input2.environment,
28625
28745
  home,
28626
28746
  ...dependencies.subdirectories ? { subdirectories: dependencies.subdirectories } : {}
28627
28747
  }));
28628
28748
  continue;
28629
28749
  }
28630
- const directory = expandInstallRoot(template, input.environment, platform, home);
28750
+ const directory = expandInstallRoot(template, input2.environment, platform, home);
28631
28751
  if (directory !== void 0)
28632
28752
  directories.push(directory);
28633
28753
  }
28634
28754
  return directories;
28635
28755
  }
28636
- function harnessCandidates(spec, input, dependencies = {}) {
28637
- const platform = input.platform ?? process.platform;
28756
+ function harnessCandidates(spec, input2, dependencies = {}) {
28757
+ const platform = input2.platform ?? process.platform;
28638
28758
  const pathFlavor = targetPath(platform);
28639
- const configured = input.command ?? (spec.commandEnvironmentVariable ? environmentValue(input.environment, spec.commandEnvironmentVariable) : void 0);
28759
+ const configured = input2.command ?? (spec.commandEnvironmentVariable ? environmentValue(input2.environment, spec.commandEnvironmentVariable) : void 0);
28640
28760
  const command = configured ?? spec.command;
28641
28761
  if (pathFlavor.isAbsolute(command) || command.includes("/") || command.includes("\\")) {
28642
28762
  return [{ candidate: command, source: "configured" }];
28643
28763
  }
28644
28764
  const candidates = [];
28645
- const extensions = executableExtensions(command, platform, input.environment);
28646
- for (const directory of pathDirectories(input.environment, platform)) {
28765
+ const extensions = executableExtensions(command, platform, input2.environment);
28766
+ for (const directory of pathDirectories(input2.environment, platform)) {
28647
28767
  for (const extension of extensions) {
28648
28768
  candidates.push({
28649
28769
  candidate: pathFlavor.join(directory, command + extension),
@@ -28653,8 +28773,8 @@ function harnessCandidates(spec, input, dependencies = {}) {
28653
28773
  }
28654
28774
  if (configured !== void 0)
28655
28775
  return candidates;
28656
- const home = resolveHomeDirectory(input);
28657
- for (const directory of installRootDirectories(spec, input, dependencies, platform, home)) {
28776
+ const home = resolveHomeDirectory(input2);
28777
+ for (const directory of installRootDirectories(spec, input2, dependencies, platform, home)) {
28658
28778
  for (const extension of installRootExtensions(platform)) {
28659
28779
  candidates.push({
28660
28780
  candidate: pathFlavor.join(directory, spec.command + extension),
@@ -28664,12 +28784,12 @@ function harnessCandidates(spec, input, dependencies = {}) {
28664
28784
  }
28665
28785
  return candidates;
28666
28786
  }
28667
- function resolveHarnessExecutable(spec, input, dependencies = {}) {
28668
- const platform = input.platform ?? process.platform;
28787
+ function resolveHarnessExecutable(spec, input2, dependencies = {}) {
28788
+ const platform = input2.platform ?? process.platform;
28669
28789
  const isExecutable = dependencies.isExecutable ?? ((candidate) => isExecutableFile(candidate, platform));
28670
28790
  const runnable = spec.runnableCandidate ?? ((candidate) => candidate);
28671
28791
  const context = { platform, isExecutable };
28672
- for (const { candidate, source } of harnessCandidates(spec, input, dependencies)) {
28792
+ for (const { candidate, source } of harnessCandidates(spec, input2, dependencies)) {
28673
28793
  const executable = runnable(candidate, context);
28674
28794
  if (executable !== void 0 && isExecutable(executable))
28675
28795
  return { executable, source };
@@ -28748,12 +28868,12 @@ var qwenCodeDiscoverySpec = {
28748
28868
  return isExecutable(entrypoint) ? entrypoint : void 0;
28749
28869
  }
28750
28870
  };
28751
- function resolveQwenCodeExecutable(input = {}, dependencies = {}) {
28752
- const platform = input.platform ?? process.platform;
28871
+ function resolveQwenCodeExecutable(input2 = {}, dependencies = {}) {
28872
+ const platform = input2.platform ?? process.platform;
28753
28873
  const resolution = resolveHarnessExecutable(qwenCodeDiscoverySpec, {
28754
- ...input.command ? { command: input.command } : {},
28755
- environment: input.environment ?? process.env,
28756
- ...input.homeDirectory ? { homeDirectory: input.homeDirectory } : {},
28874
+ ...input2.command ? { command: input2.command } : {},
28875
+ environment: input2.environment ?? process.env,
28876
+ ...input2.homeDirectory ? { homeDirectory: input2.homeDirectory } : {},
28757
28877
  platform
28758
28878
  }, dependencies);
28759
28879
  if (!resolution)
@@ -28799,22 +28919,22 @@ function qwenCodeCommand(kind, rawInput) {
28799
28919
  return void 0;
28800
28920
  return stringField(rawInput, "command");
28801
28921
  }
28802
- function startQwenCodeToolItem(input) {
28803
- const command = qwenCodeCommand(input.kind ?? void 0, input.rawInput);
28922
+ function startQwenCodeToolItem(input2) {
28923
+ const command = qwenCodeCommand(input2.kind ?? void 0, input2.rawInput);
28804
28924
  if (command) {
28805
- const rawCwd = stringField(input.rawInput, "cwd");
28925
+ const rawCwd = stringField(input2.rawInput, "cwd");
28806
28926
  return {
28807
28927
  type: "commandExecution",
28808
- itemId: input.itemId,
28928
+ itemId: input2.itemId,
28809
28929
  command,
28810
- cwd: rawCwd ?? input.cwd
28930
+ cwd: rawCwd ?? input2.cwd
28811
28931
  };
28812
28932
  }
28813
28933
  return {
28814
28934
  type: "toolExecution",
28815
- itemId: input.itemId,
28816
- toolName: qwenCodeToolName(input.name, input.title),
28817
- arguments: qwenCodeToolArguments(input.rawInput)
28935
+ itemId: input2.itemId,
28936
+ toolName: qwenCodeToolName(input2.name, input2.title),
28937
+ arguments: qwenCodeToolArguments(input2.rawInput)
28818
28938
  };
28819
28939
  }
28820
28940
  function acpContentText(content) {
@@ -28858,9 +28978,9 @@ function rawOutputProjection(rawOutput) {
28858
28978
  const exitCode = numberField(rawOutput, "exit_code") ?? numberField(rawOutput, "exitCode");
28859
28979
  const output = rawOutput.output;
28860
28980
  const outputText = typeof output === "string" ? output : void 0;
28861
- const text = outputText ?? stringField(rawOutput, "content") ?? stringField(rawOutput, "text") ?? stringField(rawOutput, "tool_result") ?? stringField(rawOutput, "raw_output");
28862
- if (text || exitCode !== void 0) {
28863
- return { ...text ? { text } : {}, ...exitCode !== void 0 ? { exitCode } : {} };
28981
+ const text2 = outputText ?? stringField(rawOutput, "content") ?? stringField(rawOutput, "text") ?? stringField(rawOutput, "tool_result") ?? stringField(rawOutput, "raw_output");
28982
+ if (text2 || exitCode !== void 0) {
28983
+ return { ...text2 ? { text: text2 } : {}, ...exitCode !== void 0 ? { exitCode } : {} };
28864
28984
  }
28865
28985
  return {};
28866
28986
  }
@@ -28868,33 +28988,33 @@ function projectQwenCodeToolOutput(content, rawOutput, limit = DEFAULT_QWEN_CODE
28868
28988
  if (!Number.isSafeInteger(limit) || limit <= 0)
28869
28989
  return {};
28870
28990
  const fromRaw = rawOutputProjection(rawOutput);
28871
- const text = acpContentText(content) || fromRaw.text || "";
28991
+ const text2 = acpContentText(content) || fromRaw.text || "";
28872
28992
  const parts = [];
28873
- if (text.length > 0) {
28874
- const truncated = text.length > limit;
28875
- parts.push({ type: "text", text: truncated ? text.slice(0, limit) : text });
28993
+ if (text2.length > 0) {
28994
+ const truncated = text2.length > limit;
28995
+ parts.push({ type: "text", text: truncated ? text2.slice(0, limit) : text2 });
28876
28996
  }
28877
- parts.push(...acpContentImages(content, Math.max(0, limit - text.length)));
28997
+ parts.push(...acpContentImages(content, Math.max(0, limit - text2.length)));
28878
28998
  return {
28879
28999
  ...parts.length > 0 ? {
28880
29000
  output: {
28881
29001
  content: parts,
28882
- ...text.length > limit ? { truncated: true } : {}
29002
+ ...text2.length > limit ? { truncated: true } : {}
28883
29003
  }
28884
29004
  } : {},
28885
29005
  ...fromRaw.exitCode !== void 0 ? { exitCode: fromRaw.exitCode } : {}
28886
29006
  };
28887
29007
  }
28888
29008
  function qwenCodeToolOutputText(output) {
28889
- return output?.content.filter((entry) => entry.type === "text").map(({ text }) => text).join("") ?? "";
29009
+ return output?.content.filter((entry) => entry.type === "text").map(({ text: text2 }) => text2).join("") ?? "";
28890
29010
  }
28891
29011
  function applyQwenCodeToolProjection(item, projection) {
28892
29012
  if (item.type === "commandExecution") {
28893
- const text = qwenCodeToolOutputText(projection.output);
29013
+ const text2 = qwenCodeToolOutputText(projection.output);
28894
29014
  return {
28895
29015
  ...item,
28896
29016
  ...projection.output ? {
28897
- output: text,
29017
+ output: text2,
28898
29018
  outputTruncated: projection.output.truncated === true
28899
29019
  } : {},
28900
29020
  ...projection.exitCode !== void 0 ? { exitCode: projection.exitCode } : {}
@@ -28967,19 +29087,19 @@ function errorText(error51) {
28967
29087
  function classifyError(error51, stage = "startup") {
28968
29088
  if (error51 instanceof QwenCodeTransportError)
28969
29089
  return error51;
28970
- const text = errorText(error51);
28971
- const lower = text.toLowerCase();
29090
+ const text2 = errorText(error51);
29091
+ const lower = text2.toLowerCase();
28972
29092
  const code = error51?.code;
28973
29093
  if (stage === "startup" && (code === "ENOENT" || lower.includes("executable file not found"))) {
28974
29094
  return new QwenCodeTransportError("notInstalled", "Qwen Code CLI is not installed", {
28975
29095
  cause: error51,
28976
- diagnostic: text
29096
+ diagnostic: text2
28977
29097
  });
28978
29098
  }
28979
29099
  if (lower.includes("auth_required") || lower.includes("auth type") || lower.includes("authentication") || lower.includes("not logged in") || lower.includes("sign in")) {
28980
- return new QwenCodeTransportError("authenticationRequired", "Qwen Code CLI authentication is required", { cause: error51, diagnostic: text });
29100
+ return new QwenCodeTransportError("authenticationRequired", "Qwen Code CLI authentication is required", { cause: error51, diagnostic: text2 });
28981
29101
  }
28982
- return new QwenCodeTransportError("unavailable", text, {
29102
+ return new QwenCodeTransportError("unavailable", text2, {
28983
29103
  cause: error51
28984
29104
  });
28985
29105
  }
@@ -28988,8 +29108,8 @@ function rawToolOutput(content) {
28988
29108
  return content;
28989
29109
  if (!Array.isArray(content))
28990
29110
  return void 0;
28991
- const text = content.flatMap((block) => isRecord3(block) && block.type === "text" && typeof block.text === "string" ? [block.text] : []).join("\n");
28992
- return text.length > 0 ? text : void 0;
29111
+ const text2 = content.flatMap((block) => isRecord3(block) && block.type === "text" && typeof block.text === "string" ? [block.text] : []).join("\n");
29112
+ return text2.length > 0 ? text2 : void 0;
28993
29113
  }
28994
29114
  var QwenCodeSdkTransport = class {
28995
29115
  #options;
@@ -29017,15 +29137,15 @@ var QwenCodeSdkTransport = class {
29017
29137
  await this.close();
29018
29138
  }
29019
29139
  }
29020
- async open(input) {
29021
- await this.#start(input);
29140
+ async open(input2) {
29141
+ await this.#start(input2);
29022
29142
  return {
29023
29143
  sessionId: this.sessionId,
29024
29144
  models: await this.#models(),
29025
- resumed: input.kind === "resume"
29145
+ resumed: input2.kind === "resume"
29026
29146
  };
29027
29147
  }
29028
- async runTurn(text, onEvent, onPermission) {
29148
+ async runTurn(text2, onEvent, onPermission) {
29029
29149
  if (this.#failure)
29030
29150
  throw this.#failure;
29031
29151
  if (!this.#input || !this.#sessionId || this.#closed) {
@@ -29039,7 +29159,7 @@ var QwenCodeSdkTransport = class {
29039
29159
  this.#input?.push({
29040
29160
  type: "user",
29041
29161
  session_id: this.#sessionId,
29042
- message: { role: "user", content: text },
29162
+ message: { role: "user", content: text2 },
29043
29163
  parent_tool_use_id: null
29044
29164
  });
29045
29165
  } catch (error51) {
@@ -29081,27 +29201,27 @@ var QwenCodeSdkTransport = class {
29081
29201
  this.#query = null;
29082
29202
  const abortController = this.#abortController;
29083
29203
  this.#abortController = null;
29084
- const input = this.#input;
29204
+ const input2 = this.#input;
29085
29205
  this.#input = null;
29086
29206
  const active2 = this.#active;
29087
29207
  this.#active = null;
29088
29208
  active2?.resolve({ status: "cancelled" });
29089
29209
  await query?.close().catch(() => void 0);
29090
29210
  abortController?.abort();
29091
- input?.fail(new Error("Qwen Code SDK input closed"));
29211
+ input2?.fail(new Error("Qwen Code SDK input closed"));
29092
29212
  }
29093
- async #start(input) {
29213
+ async #start(input2) {
29094
29214
  if (this.#query || this.#closed)
29095
29215
  throw new Error("Qwen Code SDK Transport cannot be opened twice");
29096
- const resumeSessionId = input.kind === "resume" ? input.sessionId : void 0;
29097
- if (input.kind === "resume" && !resumeSessionId) {
29216
+ const resumeSessionId = input2.kind === "resume" ? input2.sessionId : void 0;
29217
+ if (input2.kind === "resume" && !resumeSessionId) {
29098
29218
  throw new QwenCodeTransportError("protocolError", "Qwen Code resume requires a Session identity");
29099
29219
  }
29100
29220
  const inputStream = new PushableInput();
29101
29221
  const abortController = new AbortController();
29102
29222
  const queryFactory = this.#options.queryFactory ?? ma;
29103
29223
  const sessionId = resumeSessionId ?? randomUUID();
29104
- const permissionMode = decodeQwenCodePermissionModeId(input.permissionMode);
29224
+ const permissionMode = decodeQwenCodePermissionModeId(input2.permissionMode);
29105
29225
  const environment = this.#environment();
29106
29226
  try {
29107
29227
  const executable = resolveQwenCodeExecutable({
@@ -29112,7 +29232,7 @@ var QwenCodeSdkTransport = class {
29112
29232
  prompt: inputStream,
29113
29233
  options: {
29114
29234
  cwd: this.#options.cwd,
29115
- ...input.model ? { model: input.model } : {},
29235
+ ...input2.model ? { model: input2.model } : {},
29116
29236
  ...this.#options.commandTimeoutMs ? { timeout: { controlRequest: this.#options.commandTimeoutMs } } : {},
29117
29237
  env: environment,
29118
29238
  abortController,
@@ -29150,15 +29270,15 @@ var QwenCodeSdkTransport = class {
29150
29270
  const environment = withNodeRuntimeOnPath({ ...process.env, ...this.#options.environment });
29151
29271
  return Object.fromEntries(Object.entries(environment).filter((entry) => typeof entry[1] === "string"));
29152
29272
  }
29153
- #canUseTool = async (toolName, input) => {
29273
+ #canUseTool = async (toolName, input2) => {
29154
29274
  const active2 = this.#active;
29155
29275
  if (!active2)
29156
29276
  return { behavior: "deny", message: "No active codexhost Turn" };
29157
- const response = await active2.onPermission({ toolName, input });
29277
+ const response = await active2.onPermission({ toolName, input: input2 });
29158
29278
  if (response.behavior === "allow") {
29159
29279
  return {
29160
29280
  behavior: "allow",
29161
- updatedInput: response.updatedInput ?? input
29281
+ updatedInput: response.updatedInput ?? input2
29162
29282
  };
29163
29283
  }
29164
29284
  return { behavior: "deny", message: "Denied by user" };
@@ -29451,7 +29571,7 @@ function stableItemId(kind, turn, index) {
29451
29571
  }
29452
29572
  function projectHistory(records, harnessId, sessionId, cwd, knownTurnRefs, toolOutputLimit) {
29453
29573
  const turns = [];
29454
- let input = "";
29574
+ let input2 = "";
29455
29575
  let items = [];
29456
29576
  let agent = null;
29457
29577
  let reasoning = null;
@@ -29471,7 +29591,7 @@ function projectHistory(records, harnessId, sessionId, cwd, knownTurnRefs, toolO
29471
29591
  reasoning = null;
29472
29592
  };
29473
29593
  const finishTurn = () => {
29474
- if (input.length === 0)
29594
+ if (input2.length === 0)
29475
29595
  return;
29476
29596
  finishReasoning();
29477
29597
  finishAgent();
@@ -29486,11 +29606,11 @@ function projectHistory(records, harnessId, sessionId, cwd, knownTurnRefs, toolO
29486
29606
  nativeTurnKey: qwenCodeTurnKey(ordinal),
29487
29607
  formatVersion: 1
29488
29608
  }),
29489
- input: [{ type: "text", text: input }],
29609
+ input: [{ type: "text", text: input2 }],
29490
29610
  items,
29491
29611
  outcome
29492
29612
  });
29493
- input = "";
29613
+ input2 = "";
29494
29614
  items = [];
29495
29615
  agent = null;
29496
29616
  reasoning = null;
@@ -29515,7 +29635,7 @@ function projectHistory(records, harnessId, sessionId, cwd, knownTurnRefs, toolO
29515
29635
  if (subtype === "notification" || subtype === "cron" || subtype === "mid_turn_user_message")
29516
29636
  continue;
29517
29637
  finishTurn();
29518
- input = messageText(record3);
29638
+ input2 = messageText(record3);
29519
29639
  continue;
29520
29640
  }
29521
29641
  if (record3.type === "tool_result") {
@@ -29528,7 +29648,7 @@ function projectHistory(records, harnessId, sessionId, cwd, knownTurnRefs, toolO
29528
29648
  }
29529
29649
  continue;
29530
29650
  }
29531
- if (record3.type !== "assistant" || input.length === 0)
29651
+ if (record3.type !== "assistant" || input2.length === 0)
29532
29652
  continue;
29533
29653
  for (const candidate of messageParts(record3)) {
29534
29654
  if (!isRecord5(candidate))
@@ -29698,8 +29818,8 @@ function normalizeError(error51, fallback) {
29698
29818
  retryable: fallback === "unavailable" || fallback === "nativeFailure"
29699
29819
  };
29700
29820
  }
29701
- function qwenQuestions(input) {
29702
- const questions = input.questions;
29821
+ function qwenQuestions(input2) {
29822
+ const questions = input2.questions;
29703
29823
  if (!Array.isArray(questions))
29704
29824
  return null;
29705
29825
  const parsed = questions.flatMap((candidate) => {
@@ -29852,8 +29972,8 @@ var QwenCodeHarnessSession = class {
29852
29972
  }
29853
29973
  };
29854
29974
  }
29855
- const text = command.input.map(({ text: text2 }) => text2).join("\n");
29856
- if (text.length === 0) {
29975
+ const text2 = command.input.map(({ text: text3 }) => text3).join("\n");
29976
+ if (text2.length === 0) {
29857
29977
  return {
29858
29978
  ok: false,
29859
29979
  error: {
@@ -29880,7 +30000,7 @@ var QwenCodeHarnessSession = class {
29880
30000
  };
29881
30001
  this.#active = active2;
29882
30002
  this.#event({ type: "turn.started", turnId: command.turnId });
29883
- void this.#transport.runTurn(text, (event) => this.#handleEvent(active2, event), (request) => this.#requestPermission(active2, request)).then((response) => this.#finish(active2, terminalOutcome(response, active2.cancellationRequested)), (error51) => this.#finish(active2, { status: "failed", error: normalizeError(error51, "nativeFailure") }));
30003
+ void this.#transport.runTurn(text2, (event) => this.#handleEvent(active2, event), (request) => this.#requestPermission(active2, request)).then((response) => this.#finish(active2, terminalOutcome(response, active2.cancellationRequested)), (error51) => this.#finish(active2, { status: "failed", error: normalizeError(error51, "nativeFailure") }));
29884
30004
  return { ok: true, value: { turnId: command.turnId } };
29885
30005
  }
29886
30006
  async #selectModel(command) {
@@ -30082,7 +30202,7 @@ var QwenCodeHarnessSession = class {
30082
30202
  else if (event.type === "tool.update")
30083
30203
  this.#updateTool(active2, event);
30084
30204
  }
30085
- #appendAgent(active2, text) {
30205
+ #appendAgent(active2, text2) {
30086
30206
  if (!active2.agent) {
30087
30207
  this.#completeReasoning(active2, { status: "succeeded" });
30088
30208
  active2.agent = {
@@ -30092,15 +30212,15 @@ var QwenCodeHarnessSession = class {
30092
30212
  };
30093
30213
  this.#event({ type: "item.started", turnId: active2.command.turnId, item: active2.agent });
30094
30214
  }
30095
- active2.agent = { ...active2.agent, text: active2.agent.text + text };
30215
+ active2.agent = { ...active2.agent, text: active2.agent.text + text2 };
30096
30216
  this.#event({
30097
30217
  type: "item.updated",
30098
30218
  turnId: active2.command.turnId,
30099
30219
  itemId: active2.agent.itemId,
30100
- update: { type: "text.append", text }
30220
+ update: { type: "text.append", text: text2 }
30101
30221
  });
30102
30222
  }
30103
- #appendReasoning(active2, text) {
30223
+ #appendReasoning(active2, text2) {
30104
30224
  if (!active2.reasoning) {
30105
30225
  active2.reasoning = {
30106
30226
  type: "reasoning",
@@ -30109,12 +30229,12 @@ var QwenCodeHarnessSession = class {
30109
30229
  };
30110
30230
  this.#event({ type: "item.started", turnId: active2.command.turnId, item: active2.reasoning });
30111
30231
  }
30112
- active2.reasoning = { ...active2.reasoning, text: active2.reasoning.text + text };
30232
+ active2.reasoning = { ...active2.reasoning, text: active2.reasoning.text + text2 };
30113
30233
  this.#event({
30114
30234
  type: "item.updated",
30115
30235
  turnId: active2.command.turnId,
30116
30236
  itemId: active2.reasoning.itemId,
30117
- update: { type: "text.append", text }
30237
+ update: { type: "text.append", text: text2 }
30118
30238
  });
30119
30239
  }
30120
30240
  #startTool(active2, event) {
@@ -30349,12 +30469,12 @@ var QwenCodeAdapter = class {
30349
30469
  createTransport: (transportOptions) => new QwenCodeSdkTransport({ ...options, ...transportOptions })
30350
30470
  };
30351
30471
  }
30352
- async inspect(input = {}) {
30472
+ async inspect(input2 = {}) {
30353
30473
  if (this.#closePromise) {
30354
30474
  return { status: "unavailable", error: invalidState("Qwen Code Adapter is closed") };
30355
30475
  }
30356
- const cwd = path5.resolve(input.cwd ?? process.cwd());
30357
- if (input.refresh) {
30476
+ const cwd = path5.resolve(input2.cwd ?? process.cwd());
30477
+ if (input2.refresh) {
30358
30478
  this.#inspectionCache.clear();
30359
30479
  this.#inspectionGeneration++;
30360
30480
  }
@@ -30400,11 +30520,11 @@ var QwenCodeAdapter = class {
30400
30520
  };
30401
30521
  }
30402
30522
  }
30403
- async open(input) {
30523
+ async open(input2) {
30404
30524
  if (this.#closePromise) {
30405
30525
  return { ok: false, error: invalidState("Qwen Code Adapter is closed") };
30406
30526
  }
30407
- if (input.cwd.length === 0) {
30527
+ if (input2.cwd.length === 0) {
30408
30528
  return {
30409
30529
  ok: false,
30410
30530
  error: {
@@ -30414,7 +30534,7 @@ var QwenCodeAdapter = class {
30414
30534
  }
30415
30535
  };
30416
30536
  }
30417
- if (input.kind === "fork" || input.kind === "rollbackLastTurn") {
30537
+ if (input2.kind === "fork" || input2.kind === "rollbackLastTurn") {
30418
30538
  return {
30419
30539
  ok: false,
30420
30540
  error: {
@@ -30424,14 +30544,14 @@ var QwenCodeAdapter = class {
30424
30544
  }
30425
30545
  };
30426
30546
  }
30427
- const cwd = path5.resolve(input.cwd);
30428
- const sessionEnvironment = mergeEnvironment(this.#environment, input.environment);
30547
+ const cwd = path5.resolve(input2.cwd);
30548
+ const sessionEnvironment = mergeEnvironment(this.#environment, input2.environment);
30429
30549
  let initialPermissionModeId = QWEN_CODE_DEFAULT_PERMISSION_MODE_ID;
30430
- if (input.kind === "create") {
30431
- const requested = input.permissionModeId ?? (input.executionPolicy === "unattended-full-access" ? qwenCodeUnattendedPermissionModeId : QWEN_CODE_DEFAULT_PERMISSION_MODE_ID);
30550
+ if (input2.kind === "create") {
30551
+ const requested = input2.permissionModeId ?? (input2.executionPolicy === "unattended-full-access" ? qwenCodeUnattendedPermissionModeId : QWEN_CODE_DEFAULT_PERMISSION_MODE_ID);
30432
30552
  try {
30433
30553
  const permissionMode = decodeQwenCodePermissionModeId(requested);
30434
- if (input.executionPolicy === "unattended-full-access" && permissionMode !== "yolo") {
30554
+ if (input2.executionPolicy === "unattended-full-access" && permissionMode !== "yolo") {
30435
30555
  return {
30436
30556
  ok: false,
30437
30557
  error: {
@@ -30452,9 +30572,9 @@ var QwenCodeAdapter = class {
30452
30572
  };
30453
30573
  }
30454
30574
  initialPermissionModeId = requested;
30455
- } else if (input.permissionModeId) {
30575
+ } else if (input2.permissionModeId) {
30456
30576
  try {
30457
- decodeQwenCodePermissionModeId(input.permissionModeId);
30577
+ decodeQwenCodePermissionModeId(input2.permissionModeId);
30458
30578
  } catch {
30459
30579
  return {
30460
30580
  ok: false,
@@ -30465,11 +30585,11 @@ var QwenCodeAdapter = class {
30465
30585
  }
30466
30586
  };
30467
30587
  }
30468
- initialPermissionModeId = input.permissionModeId;
30588
+ initialPermissionModeId = input2.permissionModeId;
30469
30589
  }
30470
30590
  let parsedRef = null;
30471
- if (input.kind === "resume") {
30472
- parsedRef = nativeSessionRefSchema.safeParse(input.nativeRef);
30591
+ if (input2.kind === "resume") {
30592
+ parsedRef = nativeSessionRefSchema.safeParse(input2.nativeRef);
30473
30593
  if (!parsedRef.success || parsedRef.data.harnessId !== this.harnessId) {
30474
30594
  return {
30475
30595
  ok: false,
@@ -30495,7 +30615,7 @@ var QwenCodeAdapter = class {
30495
30615
  });
30496
30616
  try {
30497
30617
  let opened;
30498
- if (input.kind === "create") {
30618
+ if (input2.kind === "create") {
30499
30619
  opened = await transport.open({ kind: "create", permissionMode: initialPermissionModeId });
30500
30620
  } else {
30501
30621
  const resumeRef = parsedRef;
@@ -30512,20 +30632,20 @@ var QwenCodeAdapter = class {
30512
30632
  if (!modelState) {
30513
30633
  throw new QwenCodeTransportError("protocolError", "Qwen Code returned an invalid Model catalog");
30514
30634
  }
30515
- const selectedModel = input.kind === "create" ? input.model ?? modelState.currentModel : modelState.currentModel;
30635
+ const selectedModel = input2.kind === "create" ? input2.model ?? modelState.currentModel : modelState.currentModel;
30516
30636
  if (!catalogModelForRef(modelState.catalog, selectedModel)) {
30517
30637
  throw new QwenCodeTransportError("protocolError", "Requested Qwen Code Model is unavailable");
30518
30638
  }
30519
30639
  await transport.setModel(selectedModel.id);
30520
30640
  modelState.currentModel = selectedModel;
30521
- const history = input.kind === "resume" ? (await readQwenCodeHistory(cwd, this.harnessId, opened.sessionId, input.knownTurnRefs, this.#toolOutputLimit, sessionEnvironment)).turns : [];
30641
+ const history = input2.kind === "resume" ? (await readQwenCodeHistory(cwd, this.harnessId, opened.sessionId, input2.knownTurnRefs, this.#toolOutputLimit, sessionEnvironment)).turns : [];
30522
30642
  const initialUsage = null;
30523
30643
  if (pendingTransportFault)
30524
30644
  throw pendingTransportFault;
30525
30645
  const openedSession = new QwenCodeHarnessSession(cwd, transport, opened, modelState, () => this.#sessions.delete(openedSession), {
30526
30646
  closeTimeoutMs: this.#closeTimeoutMs,
30527
30647
  history,
30528
- turnCount: input.kind === "resume" ? Math.max(nextQwenCodeTurnOrdinal(input.knownTurnRefs ?? []), history.length) : 0,
30648
+ turnCount: input2.kind === "resume" ? Math.max(nextQwenCodeTurnOrdinal(input2.knownTurnRefs ?? []), history.length) : 0,
30529
30649
  initialUsage,
30530
30650
  initialPermissionModeId,
30531
30651
  randomUUID: this.#dependencies.randomUUID,