@mmmbuto/qwen-code-termux 0.16.1-termux → 0.18.0-termux

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 (185) hide show
  1. package/README.md +79 -109
  2. package/bundled/new-app/SKILL.md +22 -0
  3. package/bundled/qc-helper/SKILL.md +29 -24
  4. package/bundled/qc-helper/docs/_meta.ts +1 -0
  5. package/bundled/qc-helper/docs/configuration/_meta.ts +0 -3
  6. package/bundled/qc-helper/docs/configuration/settings.md +37 -31
  7. package/bundled/qc-helper/docs/configuration/themes.md +39 -0
  8. package/bundled/qc-helper/docs/features/_meta.ts +1 -3
  9. package/bundled/qc-helper/docs/features/approval-mode.md +35 -35
  10. package/bundled/qc-helper/docs/features/auto-mode.md +54 -9
  11. package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
  12. package/bundled/qc-helper/docs/features/channels/feishu.md +170 -0
  13. package/bundled/qc-helper/docs/features/commands.md +115 -35
  14. package/bundled/qc-helper/docs/features/followup-suggestions.md +2 -2
  15. package/bundled/qc-helper/docs/features/headless.md +32 -0
  16. package/bundled/qc-helper/docs/features/markdown-rendering.md +21 -1
  17. package/bundled/qc-helper/docs/features/memory.md +22 -5
  18. package/bundled/qc-helper/docs/features/scheduled-tasks.md +1 -1
  19. package/bundled/qc-helper/docs/features/status-line.md +168 -32
  20. package/bundled/qc-helper/docs/features/sub-agents.md +60 -0
  21. package/bundled/qc-helper/docs/features/worktree.md +345 -0
  22. package/bundled/qc-helper/docs/overview.md +4 -4
  23. package/bundled/qc-helper/docs/quickstart.md +4 -4
  24. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +221 -0
  25. package/bundled/qc-helper/docs/qwen-serve.md +234 -24
  26. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +16 -0
  27. package/bundled/qc-helper/docs/support/Uninstall.md +19 -1
  28. package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
  29. package/bundled/simplify/SKILL.md +123 -0
  30. package/chunks/agent-IDS4HMOX.js +56 -0
  31. package/chunks/agent-headless-5Q2EUSPS.js +50 -0
  32. package/chunks/{anthropicContentGenerator-SSGKR6DO.js → anthropicContentGenerator-2HBRNQ3B.js} +52 -9
  33. package/chunks/{askUserQuestion-PJWUUXKN.js → askUserQuestion-75TDJVK2.js} +45 -3
  34. package/chunks/{ca-UZ7BANMN.js → ca-BARBRL6N.js} +89 -5
  35. package/chunks/{chunk-GGNTZ2NH.js → chunk-2Y5SYSD3.js} +368 -597
  36. package/chunks/{chunk-2LA2TREA.js → chunk-3AA2DK35.js} +1448 -207
  37. package/chunks/{chunk-I2V5WXHJ.js → chunk-3AUHFMSK.js} +80 -38
  38. package/chunks/chunk-3DHXZ6EV.js +241 -0
  39. package/chunks/{chunk-PR4T27R7.js → chunk-3HTIVKZE.js} +42 -8
  40. package/chunks/chunk-3HX5LZ6R.js +1798 -0
  41. package/chunks/chunk-3PJXIDKI.js +2517 -0
  42. package/chunks/{chunk-MYAKAFEC.js → chunk-55ZMG67I.js} +7451 -3517
  43. package/chunks/{chunk-66CXYE4B.js → chunk-5IFG2VC4.js} +293 -242
  44. package/chunks/chunk-64WXLC72.js +98 -0
  45. package/chunks/{chunk-C6WMLUNB.js → chunk-72LDN5PP.js} +1 -1
  46. package/chunks/{chunk-F23NCRJ2.js → chunk-A7B4ISQP.js} +1 -1
  47. package/chunks/chunk-B7HXHOHU.js +393 -0
  48. package/chunks/{chunk-XEGHDASV.js → chunk-D3RHSPAS.js} +435 -540
  49. package/chunks/{chunk-XKS5KBFJ.js → chunk-EYENRK4D.js} +694 -384
  50. package/chunks/chunk-H6BD2ELD.js +36 -0
  51. package/chunks/{chunk-XP27SJMH.js → chunk-HR7SV7AY.js} +79 -48
  52. package/chunks/{chunk-D5NTAHYL.js → chunk-IDX6COTE.js} +7 -2
  53. package/chunks/{chunk-SHT4VJWU.js → chunk-IWKSG2AR.js} +2 -2
  54. package/chunks/chunk-J37FGIOA.js +1623 -0
  55. package/chunks/chunk-J5MDQKJL.js +2230 -0
  56. package/chunks/{chunk-USE2VQ5P.js → chunk-JTQAQBTV.js} +21 -0
  57. package/chunks/{chunk-NCTLV2NB.js → chunk-KQJMQJPI.js} +1 -1
  58. package/chunks/{chunk-5FBA5XC2.js → chunk-KRIHGKNA.js} +1 -1
  59. package/chunks/chunk-LD2XBG6Z.js +102 -0
  60. package/chunks/{chunk-MAY32HXD.js → chunk-M6VTDSVR.js} +3 -1
  61. package/chunks/chunk-MRO43B25.js +30 -0
  62. package/chunks/{chunk-N4WOREMD.js → chunk-NVFMZBX2.js} +43 -3
  63. package/chunks/chunk-OHEGWO4L.js +264 -0
  64. package/chunks/{chunk-K6O2NBMF.js → chunk-OQ7NJIY7.js} +4604 -6397
  65. package/chunks/chunk-QQDPRDVW.js +25 -0
  66. package/chunks/{chunk-KXZ4TJB4.js → chunk-SEGYWKIH.js} +1 -1
  67. package/chunks/chunk-SKBPNJEW.js +45 -0
  68. package/chunks/{chunk-4AOCVI6J.js → chunk-SNGELLWX.js} +52 -6
  69. package/chunks/{chunk-3OCRHZA3.js → chunk-TD4OPI4T.js} +56742 -44104
  70. package/chunks/{chunk-DQ4QTG7E.js → chunk-VV4F63BD.js} +11 -11
  71. package/chunks/chunk-XBY7E2FX.js +605 -0
  72. package/chunks/{chunk-JKMBWLFB.js → chunk-YILFYI5W.js} +48 -26
  73. package/chunks/chunk-YOGAOMYB.js +159 -0
  74. package/chunks/{chunk-QWSRH265.js → chunk-Z2Z3GUXZ.js} +777 -776
  75. package/chunks/{chunk-SDHRQFOS.js → chunk-ZTZ4DDQE.js} +2 -2
  76. package/chunks/computer-use-W2TYQNEE.js +825 -0
  77. package/chunks/contextCommand-6FGX3A7J.js +52 -0
  78. package/chunks/{cron-create-3ZBBN7WB.js → cron-create-APL5LU6I.js} +3 -3
  79. package/chunks/{cron-delete-NAGKKIIG.js → cron-delete-4SBJSCN4.js} +3 -3
  80. package/chunks/{cron-list-PAGRXNAI.js → cron-list-2AMGOMVO.js} +3 -3
  81. package/chunks/{de-V4IE2OOZ.js → de-YGKK2BC4.js} +89 -5
  82. package/chunks/{devtools-TWVXEJQB.js → devtools-FM6GJPYG.js} +2 -1
  83. package/chunks/{dist-4L54HRX2.js → dist-4LXD6L6X.js} +24 -5
  84. package/chunks/dist-H6ONXVLG.js +94146 -0
  85. package/chunks/{dist-XKWIWPWQ.js → dist-KAZ3SEBX.js} +1083 -3856
  86. package/chunks/{dist-BXDUQ2QY.js → dist-PK7DFCAW.js} +1 -1
  87. package/chunks/{edit-NVO3FOAK.js → edit-ZCEZC264.js} +30 -22
  88. package/chunks/{en-HGJ2SPLM.js → en-DHGYHIHX.js} +127 -6
  89. package/chunks/{enter-worktree-UEBG4WFC.js → enter-worktree-BBHCFCHG.js} +30 -20
  90. package/chunks/enterPlanMode-3M6KTD3B.js +158 -0
  91. package/chunks/{exit-worktree-UZ3MAQZN.js → exit-worktree-73YPIEQO.js} +27 -19
  92. package/chunks/exitPlanMode-TYZM6BAE.js +703 -0
  93. package/chunks/{fr-CJULI7ZX.js → fr-JXBKPJKQ.js} +89 -5
  94. package/chunks/{geminiContentGenerator-3UZFXGNT.js → geminiContentGenerator-7N2V3VW2.js} +8 -6
  95. package/chunks/{getMachineId-bsd-JXOSIJV2.js → getMachineId-bsd-4CASPIU4.js} +4 -4
  96. package/chunks/{getMachineId-darwin-TE4QRR42.js → getMachineId-darwin-HPQPEMZR.js} +4 -4
  97. package/chunks/{getMachineId-linux-S3OL52XK.js → getMachineId-linux-AUARKYHL.js} +3 -3
  98. package/chunks/{getMachineId-unsupported-DWUSBAPX.js → getMachineId-unsupported-S32ZDA2T.js} +3 -3
  99. package/chunks/{getMachineId-win-AAC5P3AP.js → getMachineId-win-4EFLHYIJ.js} +4 -4
  100. package/chunks/{glob-KNHSFFFG.js → glob-5XBCPQ2A.js} +27 -19
  101. package/chunks/{grep-LACWDZW4.js → grep-VIUU3A7X.js} +30 -19
  102. package/chunks/{ja-L7CHRQEW.js → ja-TGPZSP2B.js} +89 -5
  103. package/chunks/{keychain-token-storage-335UOLJ6.js → keychain-token-storage-6IU6ORQN.js} +3 -3
  104. package/chunks/{ls-AGXQOKSG.js → ls-JRGYIGLY.js} +4 -4
  105. package/chunks/{lsp-UDMUHNPA.js → lsp-SHMKFOAC.js} +3 -3
  106. package/chunks/{monitor-ETKWPJEH.js → monitor-6R4LIJL5.js} +40 -25
  107. package/chunks/{multipart-parser-3QWGTLK3.js → multipart-parser-AJ4WASWR.js} +2 -2
  108. package/chunks/{notebook-edit-QJJLPNYT.js → notebook-edit-5E7ULDVQ.js} +28 -20
  109. package/chunks/{openaiContentGenerator-CNNN424U.js → openaiContentGenerator-ZVHFKM3O.js} +17 -14
  110. package/chunks/{pt-M6JULLEQ.js → pt-TIBG6BIO.js} +89 -5
  111. package/chunks/{qwenContentGenerator-BOLCGK3R.js → qwenContentGenerator-B2VTVSPJ.js} +31 -23
  112. package/chunks/{qwenOAuth2-EEJGROP7.js → qwenOAuth2-2KCKWDCF.js} +6 -4
  113. package/chunks/read-file-GIT7BCDR.js +27 -0
  114. package/chunks/ripGrep-MWKFVYMS.js +48 -0
  115. package/chunks/{ru-QILM4HBC.js → ru-JBCHCK4L.js} +89 -5
  116. package/chunks/scheduler-5VOOYGBH.js +308 -0
  117. package/chunks/send-message-4QNWQJF4.js +244 -0
  118. package/chunks/{serve-OLSI7WSR.js → serve-MN6HZBWN.js} +14262 -7414
  119. package/chunks/shell-NQZQGFM2.js +56 -0
  120. package/chunks/{skill-D6YRHTTI.js → skill-WCFW4644.js} +145 -119
  121. package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
  122. package/chunks/{src-4QH4FZ6I.js → src-IHA6DTUV.js} +452 -62
  123. package/chunks/{syntheticOutput-5PVFDDJ4.js → syntheticOutput-YTYS2ZMQ.js} +4 -4
  124. package/chunks/task-create-MPORPYN6.js +19 -0
  125. package/chunks/task-list-R2YDYPZT.js +151 -0
  126. package/chunks/{task-stop-AJKPSR6R.js → task-stop-SYWJYBCM.js} +3 -3
  127. package/chunks/task-update-E4NSLKMQ.js +408 -0
  128. package/chunks/team-create-7R7KA5IP.js +314 -0
  129. package/chunks/team-delete-25OIWUPN.js +116 -0
  130. package/chunks/{todoWrite-VLAUG4CA.js → todoWrite-4YHMIF4X.js} +16 -5
  131. package/chunks/{tool-search-MZGHUUKD.js → tool-search-YBRVZCLI.js} +29 -11
  132. package/chunks/{tts-notification-K3X7X7MN.js → tts-notification-7SOEMQK4.js} +5 -4
  133. package/chunks/{web-fetch-OILB464A.js → web-fetch-MFIRHIHI.js} +5 -5
  134. package/chunks/workflow-5RIKVCIE.js +960 -0
  135. package/chunks/{write-file-BIQAA57V.js → write-file-DMQTJZOM.js} +32 -24
  136. package/chunks/{zh-PWL2NKY3.js → zh-7H5OQC4I.js} +135 -11
  137. package/chunks/{zh-TW-S3YGWICZ.js → zh-TW-P4IDHD3M.js} +128 -11
  138. package/cli.js +45402 -20570
  139. package/examples/agent/agents/diary.md +86 -0
  140. package/examples/agent/qwen-extension.json +5 -0
  141. package/examples/commands/commands/fs/grep-code.md +3 -0
  142. package/examples/commands/qwen-extension.json +5 -0
  143. package/examples/context/QWEN.md +8 -0
  144. package/examples/context/qwen-extension.json +5 -0
  145. package/examples/mcp-server/example.ts +60 -0
  146. package/examples/mcp-server/package.json +18 -0
  147. package/examples/mcp-server/qwen-extension.json +12 -0
  148. package/examples/mcp-server/tsconfig.json +13 -0
  149. package/examples/skills/qwen-extension.json +5 -0
  150. package/examples/skills/skills/synonyms/SKILL.md +48 -0
  151. package/examples/starter/QWEN.md +30 -0
  152. package/examples/starter/README.md +59 -0
  153. package/examples/starter/agents/diary.md +86 -0
  154. package/examples/starter/commands/writing/polish.md +13 -0
  155. package/examples/starter/example.ts +64 -0
  156. package/examples/starter/package.json +18 -0
  157. package/examples/starter/qwen-extension.json +12 -0
  158. package/examples/starter/skills/synonyms/SKILL.md +48 -0
  159. package/examples/starter/tsconfig.json +13 -0
  160. package/fzfWorker.js +1083 -0
  161. package/locales/ca.js +118 -5
  162. package/locales/de.js +117 -5
  163. package/locales/en.js +169 -7
  164. package/locales/fr.js +119 -5
  165. package/locales/ja.js +114 -5
  166. package/locales/pt.js +117 -5
  167. package/locales/ru.js +116 -5
  168. package/locales/zh-TW.js +161 -12
  169. package/locales/zh.js +169 -12
  170. package/package.json +4 -2
  171. package/scripts/postinstall.cjs +2 -1
  172. package/bundled/qc-helper/docs/features/checkpointing.md +0 -77
  173. package/chunks/agent-7ZN3CRHR.js +0 -48
  174. package/chunks/chunk-6PCB2DEF.js +0 -434
  175. package/chunks/chunk-EM6ETG2K.js +0 -60
  176. package/chunks/chunk-G7YTSRES.js +0 -150
  177. package/chunks/contextCommand-7IBASARL.js +0 -44
  178. package/chunks/exitPlanMode-PZAMWIRW.js +0 -227
  179. package/chunks/multipart-parser-IXGBIOIN.js +0 -384
  180. package/chunks/read-file-CCUEUFG2.js +0 -24
  181. package/chunks/ripGrep-TADOH2HK.js +0 -40
  182. package/chunks/send-message-YL44UZFC.js +0 -151
  183. package/chunks/shell-7KKKC5G7.js +0 -48
  184. package/chunks/src-IPWIHNMI.js +0 -1406
  185. package/chunks/undici-F6ZOXSS5.js +0 -8
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  createDebugLogger
5
- } from "./chunk-XP27SJMH.js";
5
+ } from "./chunk-HR7SV7AY.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-A4BMJM77.js";
@@ -2263,9 +2263,9 @@ var require_fast_deep_equal = __commonJS({
2263
2263
  }
2264
2264
  });
2265
2265
 
2266
- // packages/core/node_modules/json-schema-traverse/index.js
2266
+ // node_modules/json-schema-traverse/index.js
2267
2267
  var require_json_schema_traverse = __commonJS({
2268
- "packages/core/node_modules/json-schema-traverse/index.js"(exports, module) {
2268
+ "node_modules/json-schema-traverse/index.js"(exports, module) {
2269
2269
  "use strict";
2270
2270
  init_esbuild_shims();
2271
2271
  var traverse = module.exports = function(schema, opts, cb) {
@@ -2286,10 +2286,7 @@ var require_json_schema_traverse = __commonJS({
2286
2286
  contains: true,
2287
2287
  additionalProperties: true,
2288
2288
  propertyNames: true,
2289
- not: true,
2290
- if: true,
2291
- then: true,
2292
- else: true
2289
+ not: true
2293
2290
  };
2294
2291
  traverse.arrayKeywords = {
2295
2292
  items: true,
@@ -2298,7 +2295,6 @@ var require_json_schema_traverse = __commonJS({
2298
2295
  oneOf: true
2299
2296
  };
2300
2297
  traverse.propsKeywords = {
2301
- $defs: true,
2302
2298
  definitions: true,
2303
2299
  properties: true,
2304
2300
  patternProperties: true,
@@ -3367,69 +3363,97 @@ var require_data = __commonJS({
3367
3363
  }
3368
3364
  });
3369
3365
 
3366
+ // node_modules/fast-uri/lib/scopedChars.js
3367
+ var require_scopedChars = __commonJS({
3368
+ "node_modules/fast-uri/lib/scopedChars.js"(exports, module) {
3369
+ "use strict";
3370
+ init_esbuild_shims();
3371
+ var HEX = {
3372
+ 0: 0,
3373
+ 1: 1,
3374
+ 2: 2,
3375
+ 3: 3,
3376
+ 4: 4,
3377
+ 5: 5,
3378
+ 6: 6,
3379
+ 7: 7,
3380
+ 8: 8,
3381
+ 9: 9,
3382
+ a: 10,
3383
+ A: 10,
3384
+ b: 11,
3385
+ B: 11,
3386
+ c: 12,
3387
+ C: 12,
3388
+ d: 13,
3389
+ D: 13,
3390
+ e: 14,
3391
+ E: 14,
3392
+ f: 15,
3393
+ F: 15
3394
+ };
3395
+ module.exports = {
3396
+ HEX
3397
+ };
3398
+ }
3399
+ });
3400
+
3370
3401
  // node_modules/fast-uri/lib/utils.js
3371
3402
  var require_utils = __commonJS({
3372
3403
  "node_modules/fast-uri/lib/utils.js"(exports, module) {
3373
3404
  "use strict";
3374
3405
  init_esbuild_shims();
3375
- var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3376
- var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
3377
- var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3378
- var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3379
- var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
3380
- function stringArrayToHexStripped(input) {
3381
- let acc = "";
3382
- let code = 0;
3383
- let i = 0;
3384
- for (i = 0; i < input.length; i++) {
3385
- code = input[i].charCodeAt(0);
3386
- if (code === 48) {
3387
- continue;
3388
- }
3389
- if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3390
- return "";
3391
- }
3392
- acc += input[i];
3393
- break;
3406
+ var { HEX } = require_scopedChars();
3407
+ var IPV4_REG = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;
3408
+ function normalizeIPv4(host) {
3409
+ if (findToken(host, ".") < 3) {
3410
+ return { host, isIPV4: false };
3394
3411
  }
3395
- for (i += 1; i < input.length; i++) {
3396
- code = input[i].charCodeAt(0);
3397
- if (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) {
3398
- return "";
3399
- }
3400
- acc += input[i];
3412
+ const matches = host.match(IPV4_REG) || [];
3413
+ const [address] = matches;
3414
+ if (address) {
3415
+ return { host: stripLeadingZeros(address, "."), isIPV4: true };
3416
+ } else {
3417
+ return { host, isIPV4: false };
3401
3418
  }
3402
- return acc;
3403
3419
  }
3404
- __name(stringArrayToHexStripped, "stringArrayToHexStripped");
3405
- var nonSimpleDomain = RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);
3406
- function consumeIsZone(buffer) {
3407
- buffer.length = 0;
3408
- return true;
3409
- }
3410
- __name(consumeIsZone, "consumeIsZone");
3411
- function consumeHextets(buffer, address, output) {
3412
- if (buffer.length) {
3413
- const hex = stringArrayToHexStripped(buffer);
3414
- if (hex !== "") {
3415
- address.push(hex);
3416
- } else {
3417
- output.error = true;
3418
- return false;
3419
- }
3420
- buffer.length = 0;
3420
+ __name(normalizeIPv4, "normalizeIPv4");
3421
+ function stringArrayToHexStripped(input, keepZero = false) {
3422
+ let acc = "";
3423
+ let strip = true;
3424
+ for (const c of input) {
3425
+ if (HEX[c] === void 0) return void 0;
3426
+ if (c !== "0" && strip === true) strip = false;
3427
+ if (!strip) acc += c;
3421
3428
  }
3422
- return true;
3429
+ if (keepZero && acc.length === 0) acc = "0";
3430
+ return acc;
3423
3431
  }
3424
- __name(consumeHextets, "consumeHextets");
3432
+ __name(stringArrayToHexStripped, "stringArrayToHexStripped");
3425
3433
  function getIPV6(input) {
3426
3434
  let tokenCount = 0;
3427
3435
  const output = { error: false, address: "", zone: "" };
3428
3436
  const address = [];
3429
3437
  const buffer = [];
3438
+ let isZone = false;
3430
3439
  let endipv6Encountered = false;
3431
3440
  let endIpv6 = false;
3432
- let consume = consumeHextets;
3441
+ function consume() {
3442
+ if (buffer.length) {
3443
+ if (isZone === false) {
3444
+ const hex = stringArrayToHexStripped(buffer);
3445
+ if (hex !== void 0) {
3446
+ address.push(hex);
3447
+ } else {
3448
+ output.error = true;
3449
+ return false;
3450
+ }
3451
+ }
3452
+ buffer.length = 0;
3453
+ }
3454
+ return true;
3455
+ }
3456
+ __name(consume, "consume");
3433
3457
  for (let i = 0; i < input.length; i++) {
3434
3458
  const cursor = input[i];
3435
3459
  if (cursor === "[" || cursor === "]") {
@@ -3439,30 +3463,31 @@ var require_utils = __commonJS({
3439
3463
  if (endipv6Encountered === true) {
3440
3464
  endIpv6 = true;
3441
3465
  }
3442
- if (!consume(buffer, address, output)) {
3466
+ if (!consume()) {
3443
3467
  break;
3444
3468
  }
3445
- if (++tokenCount > 7) {
3469
+ tokenCount++;
3470
+ address.push(":");
3471
+ if (tokenCount > 7) {
3446
3472
  output.error = true;
3447
3473
  break;
3448
3474
  }
3449
- if (i > 0 && input[i - 1] === ":") {
3475
+ if (i - 1 >= 0 && input[i - 1] === ":") {
3450
3476
  endipv6Encountered = true;
3451
3477
  }
3452
- address.push(":");
3453
3478
  continue;
3454
3479
  } else if (cursor === "%") {
3455
- if (!consume(buffer, address, output)) {
3480
+ if (!consume()) {
3456
3481
  break;
3457
3482
  }
3458
- consume = consumeIsZone;
3483
+ isZone = true;
3459
3484
  } else {
3460
3485
  buffer.push(cursor);
3461
3486
  continue;
3462
3487
  }
3463
3488
  }
3464
3489
  if (buffer.length) {
3465
- if (consume === consumeIsZone) {
3490
+ if (isZone) {
3466
3491
  output.zone = buffer.join("");
3467
3492
  } else if (endIpv6) {
3468
3493
  address.push(buffer.join(""));
@@ -3486,12 +3511,35 @@ var require_utils = __commonJS({
3486
3511
  newHost += "%" + ipv6.zone;
3487
3512
  escapedHost += "%25" + ipv6.zone;
3488
3513
  }
3489
- return { host: newHost, isIPV6: true, escapedHost };
3514
+ return { host: newHost, escapedHost, isIPV6: true };
3490
3515
  } else {
3491
3516
  return { host, isIPV6: false };
3492
3517
  }
3493
3518
  }
3494
3519
  __name(normalizeIPv6, "normalizeIPv6");
3520
+ function stripLeadingZeros(str, token) {
3521
+ let out = "";
3522
+ let skip = true;
3523
+ const l = str.length;
3524
+ for (let i = 0; i < l; i++) {
3525
+ const c = str[i];
3526
+ if (c === "0" && skip) {
3527
+ if (i + 1 <= l && str[i + 1] === token || i + 1 === l) {
3528
+ out += c;
3529
+ skip = false;
3530
+ }
3531
+ } else {
3532
+ if (c === token) {
3533
+ skip = true;
3534
+ } else {
3535
+ skip = false;
3536
+ }
3537
+ out += c;
3538
+ }
3539
+ }
3540
+ return out;
3541
+ }
3542
+ __name(stripLeadingZeros, "stripLeadingZeros");
3495
3543
  function findToken(str, token) {
3496
3544
  let ind = 0;
3497
3545
  for (let i = 0; i < str.length; i++) {
@@ -3500,193 +3548,92 @@ var require_utils = __commonJS({
3500
3548
  return ind;
3501
3549
  }
3502
3550
  __name(findToken, "findToken");
3503
- function removeDotSegments(path) {
3504
- let input = path;
3551
+ var RDS1 = /^\.\.?\//u;
3552
+ var RDS2 = /^\/\.(?:\/|$)/u;
3553
+ var RDS3 = /^\/\.\.(?:\/|$)/u;
3554
+ var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u;
3555
+ function removeDotSegments(input) {
3505
3556
  const output = [];
3506
- let nextSlash = -1;
3507
- let len = 0;
3508
- while (len = input.length) {
3509
- if (len === 1) {
3510
- if (input === ".") {
3511
- break;
3512
- } else if (input === "/") {
3513
- output.push("/");
3514
- break;
3557
+ while (input.length) {
3558
+ if (input.match(RDS1)) {
3559
+ input = input.replace(RDS1, "");
3560
+ } else if (input.match(RDS2)) {
3561
+ input = input.replace(RDS2, "/");
3562
+ } else if (input.match(RDS3)) {
3563
+ input = input.replace(RDS3, "/");
3564
+ output.pop();
3565
+ } else if (input === "." || input === "..") {
3566
+ input = "";
3567
+ } else {
3568
+ const im = input.match(RDS5);
3569
+ if (im) {
3570
+ const s = im[0];
3571
+ input = input.slice(s.length);
3572
+ output.push(s);
3515
3573
  } else {
3516
- output.push(input);
3517
- break;
3518
- }
3519
- } else if (len === 2) {
3520
- if (input[0] === ".") {
3521
- if (input[1] === ".") {
3522
- break;
3523
- } else if (input[1] === "/") {
3524
- input = input.slice(2);
3525
- continue;
3526
- }
3527
- } else if (input[0] === "/") {
3528
- if (input[1] === "." || input[1] === "/") {
3529
- output.push("/");
3530
- break;
3531
- }
3532
- }
3533
- } else if (len === 3) {
3534
- if (input === "/..") {
3535
- if (output.length !== 0) {
3536
- output.pop();
3537
- }
3538
- output.push("/");
3539
- break;
3574
+ throw new Error("Unexpected dot segment condition");
3540
3575
  }
3541
3576
  }
3542
- if (input[0] === ".") {
3543
- if (input[1] === ".") {
3544
- if (input[2] === "/") {
3545
- input = input.slice(3);
3546
- continue;
3547
- }
3548
- } else if (input[1] === "/") {
3549
- input = input.slice(2);
3550
- continue;
3551
- }
3552
- } else if (input[0] === "/") {
3553
- if (input[1] === ".") {
3554
- if (input[2] === "/") {
3555
- input = input.slice(2);
3556
- continue;
3557
- } else if (input[2] === ".") {
3558
- if (input[3] === "/") {
3559
- input = input.slice(3);
3560
- if (output.length !== 0) {
3561
- output.pop();
3562
- }
3563
- continue;
3564
- }
3565
- }
3566
- }
3567
- }
3568
- if ((nextSlash = input.indexOf("/", 1)) === -1) {
3569
- output.push(input);
3570
- break;
3571
- } else {
3572
- output.push(input.slice(0, nextSlash));
3573
- input = input.slice(nextSlash);
3574
- }
3575
3577
  }
3576
3578
  return output.join("");
3577
3579
  }
3578
3580
  __name(removeDotSegments, "removeDotSegments");
3579
- var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
3580
- var HOST_DELIM_RE = /[@/?#:]/g;
3581
- var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
3582
- function reescapeHostDelimiters(host, isIP) {
3583
- const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
3584
- re.lastIndex = 0;
3585
- return host.replace(re, (ch) => HOST_DELIMS[ch]);
3586
- }
3587
- __name(reescapeHostDelimiters, "reescapeHostDelimiters");
3588
- function normalizePercentEncoding(input, decodeUnreserved = false) {
3589
- if (input.indexOf("%") === -1) {
3590
- return input;
3591
- }
3592
- let output = "";
3593
- for (let i = 0; i < input.length; i++) {
3594
- if (input[i] === "%" && i + 2 < input.length) {
3595
- const hex = input.slice(i + 1, i + 3);
3596
- if (isHexPair(hex)) {
3597
- const normalizedHex = hex.toUpperCase();
3598
- const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
3599
- if (decodeUnreserved && isUnreserved(decoded)) {
3600
- output += decoded;
3601
- } else {
3602
- output += "%" + normalizedHex;
3603
- }
3604
- i += 2;
3605
- continue;
3606
- }
3607
- }
3608
- output += input[i];
3581
+ function normalizeComponentEncoding(components, esc) {
3582
+ const func = esc !== true ? escape : unescape;
3583
+ if (components.scheme !== void 0) {
3584
+ components.scheme = func(components.scheme);
3609
3585
  }
3610
- return output;
3611
- }
3612
- __name(normalizePercentEncoding, "normalizePercentEncoding");
3613
- function normalizePathEncoding(input) {
3614
- let output = "";
3615
- for (let i = 0; i < input.length; i++) {
3616
- if (input[i] === "%" && i + 2 < input.length) {
3617
- const hex = input.slice(i + 1, i + 3);
3618
- if (isHexPair(hex)) {
3619
- const normalizedHex = hex.toUpperCase();
3620
- const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
3621
- if (decoded !== "." && isUnreserved(decoded)) {
3622
- output += decoded;
3623
- } else {
3624
- output += "%" + normalizedHex;
3625
- }
3626
- i += 2;
3627
- continue;
3628
- }
3629
- }
3630
- if (isPathCharacter(input[i])) {
3631
- output += input[i];
3632
- } else {
3633
- output += escape(input[i]);
3634
- }
3586
+ if (components.userinfo !== void 0) {
3587
+ components.userinfo = func(components.userinfo);
3635
3588
  }
3636
- return output;
3637
- }
3638
- __name(normalizePathEncoding, "normalizePathEncoding");
3639
- function escapePreservingEscapes(input) {
3640
- let output = "";
3641
- for (let i = 0; i < input.length; i++) {
3642
- if (input[i] === "%" && i + 2 < input.length) {
3643
- const hex = input.slice(i + 1, i + 3);
3644
- if (isHexPair(hex)) {
3645
- output += "%" + hex.toUpperCase();
3646
- i += 2;
3647
- continue;
3648
- }
3649
- }
3650
- output += escape(input[i]);
3589
+ if (components.host !== void 0) {
3590
+ components.host = func(components.host);
3651
3591
  }
3652
- return output;
3592
+ if (components.path !== void 0) {
3593
+ components.path = func(components.path);
3594
+ }
3595
+ if (components.query !== void 0) {
3596
+ components.query = func(components.query);
3597
+ }
3598
+ if (components.fragment !== void 0) {
3599
+ components.fragment = func(components.fragment);
3600
+ }
3601
+ return components;
3653
3602
  }
3654
- __name(escapePreservingEscapes, "escapePreservingEscapes");
3655
- function recomposeAuthority(component) {
3603
+ __name(normalizeComponentEncoding, "normalizeComponentEncoding");
3604
+ function recomposeAuthority(components) {
3656
3605
  const uriTokens = [];
3657
- if (component.userinfo !== void 0) {
3658
- uriTokens.push(component.userinfo);
3606
+ if (components.userinfo !== void 0) {
3607
+ uriTokens.push(components.userinfo);
3659
3608
  uriTokens.push("@");
3660
3609
  }
3661
- if (component.host !== void 0) {
3662
- let host = unescape(component.host);
3663
- if (!isIPv4(host)) {
3664
- const ipV6res = normalizeIPv6(host);
3610
+ if (components.host !== void 0) {
3611
+ let host = unescape(components.host);
3612
+ const ipV4res = normalizeIPv4(host);
3613
+ if (ipV4res.isIPV4) {
3614
+ host = ipV4res.host;
3615
+ } else {
3616
+ const ipV6res = normalizeIPv6(ipV4res.host);
3665
3617
  if (ipV6res.isIPV6 === true) {
3666
3618
  host = `[${ipV6res.escapedHost}]`;
3667
3619
  } else {
3668
- host = reescapeHostDelimiters(host, false);
3620
+ host = components.host;
3669
3621
  }
3670
3622
  }
3671
3623
  uriTokens.push(host);
3672
3624
  }
3673
- if (typeof component.port === "number" || typeof component.port === "string") {
3625
+ if (typeof components.port === "number" || typeof components.port === "string") {
3674
3626
  uriTokens.push(":");
3675
- uriTokens.push(String(component.port));
3627
+ uriTokens.push(String(components.port));
3676
3628
  }
3677
3629
  return uriTokens.length ? uriTokens.join("") : void 0;
3678
3630
  }
3679
3631
  __name(recomposeAuthority, "recomposeAuthority");
3680
3632
  module.exports = {
3681
- nonSimpleDomain,
3682
3633
  recomposeAuthority,
3683
- reescapeHostDelimiters,
3684
- normalizePercentEncoding,
3685
- normalizePathEncoding,
3686
- escapePreservingEscapes,
3634
+ normalizeComponentEncoding,
3687
3635
  removeDotSegments,
3688
- isIPv4,
3689
- isUUID,
3636
+ normalizeIPv4,
3690
3637
  normalizeIPv6,
3691
3638
  stringArrayToHexStripped
3692
3639
  };
@@ -3698,220 +3645,154 @@ var require_schemes = __commonJS({
3698
3645
  "node_modules/fast-uri/lib/schemes.js"(exports, module) {
3699
3646
  "use strict";
3700
3647
  init_esbuild_shims();
3701
- var { isUUID } = require_utils();
3648
+ var UUID_REG = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu;
3702
3649
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
3703
- var supportedSchemeNames = (
3704
- /** @type {const} */
3705
- [
3706
- "http",
3707
- "https",
3708
- "ws",
3709
- "wss",
3710
- "urn",
3711
- "urn:uuid"
3712
- ]
3713
- );
3714
- function isValidSchemeName(name) {
3715
- return supportedSchemeNames.indexOf(
3716
- /** @type {*} */
3717
- name
3718
- ) !== -1;
3719
- }
3720
- __name(isValidSchemeName, "isValidSchemeName");
3721
- function wsIsSecure(wsComponent) {
3722
- if (wsComponent.secure === true) {
3723
- return true;
3724
- } else if (wsComponent.secure === false) {
3725
- return false;
3726
- } else if (wsComponent.scheme) {
3727
- return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === "w" || wsComponent.scheme[0] === "W") && (wsComponent.scheme[1] === "s" || wsComponent.scheme[1] === "S") && (wsComponent.scheme[2] === "s" || wsComponent.scheme[2] === "S");
3728
- } else {
3729
- return false;
3730
- }
3650
+ function isSecure(wsComponents) {
3651
+ return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
3731
3652
  }
3732
- __name(wsIsSecure, "wsIsSecure");
3733
- function httpParse(component) {
3734
- if (!component.host) {
3735
- component.error = component.error || "HTTP URIs must have a host.";
3653
+ __name(isSecure, "isSecure");
3654
+ function httpParse(components) {
3655
+ if (!components.host) {
3656
+ components.error = components.error || "HTTP URIs must have a host.";
3736
3657
  }
3737
- return component;
3658
+ return components;
3738
3659
  }
3739
3660
  __name(httpParse, "httpParse");
3740
- function httpSerialize(component) {
3741
- const secure = String(component.scheme).toLowerCase() === "https";
3742
- if (component.port === (secure ? 443 : 80) || component.port === "") {
3743
- component.port = void 0;
3661
+ function httpSerialize(components) {
3662
+ const secure = String(components.scheme).toLowerCase() === "https";
3663
+ if (components.port === (secure ? 443 : 80) || components.port === "") {
3664
+ components.port = void 0;
3744
3665
  }
3745
- if (!component.path) {
3746
- component.path = "/";
3666
+ if (!components.path) {
3667
+ components.path = "/";
3747
3668
  }
3748
- return component;
3669
+ return components;
3749
3670
  }
3750
3671
  __name(httpSerialize, "httpSerialize");
3751
- function wsParse(wsComponent) {
3752
- wsComponent.secure = wsIsSecure(wsComponent);
3753
- wsComponent.resourceName = (wsComponent.path || "/") + (wsComponent.query ? "?" + wsComponent.query : "");
3754
- wsComponent.path = void 0;
3755
- wsComponent.query = void 0;
3756
- return wsComponent;
3672
+ function wsParse(wsComponents) {
3673
+ wsComponents.secure = isSecure(wsComponents);
3674
+ wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
3675
+ wsComponents.path = void 0;
3676
+ wsComponents.query = void 0;
3677
+ return wsComponents;
3757
3678
  }
3758
3679
  __name(wsParse, "wsParse");
3759
- function wsSerialize(wsComponent) {
3760
- if (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === "") {
3761
- wsComponent.port = void 0;
3680
+ function wsSerialize(wsComponents) {
3681
+ if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
3682
+ wsComponents.port = void 0;
3762
3683
  }
3763
- if (typeof wsComponent.secure === "boolean") {
3764
- wsComponent.scheme = wsComponent.secure ? "wss" : "ws";
3765
- wsComponent.secure = void 0;
3684
+ if (typeof wsComponents.secure === "boolean") {
3685
+ wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
3686
+ wsComponents.secure = void 0;
3766
3687
  }
3767
- if (wsComponent.resourceName) {
3768
- const [path, query] = wsComponent.resourceName.split("?");
3769
- wsComponent.path = path && path !== "/" ? path : void 0;
3770
- wsComponent.query = query;
3771
- wsComponent.resourceName = void 0;
3688
+ if (wsComponents.resourceName) {
3689
+ const [path, query] = wsComponents.resourceName.split("?");
3690
+ wsComponents.path = path && path !== "/" ? path : void 0;
3691
+ wsComponents.query = query;
3692
+ wsComponents.resourceName = void 0;
3772
3693
  }
3773
- wsComponent.fragment = void 0;
3774
- return wsComponent;
3694
+ wsComponents.fragment = void 0;
3695
+ return wsComponents;
3775
3696
  }
3776
3697
  __name(wsSerialize, "wsSerialize");
3777
- function urnParse(urnComponent, options) {
3778
- if (!urnComponent.path) {
3779
- urnComponent.error = "URN can not be parsed";
3780
- return urnComponent;
3698
+ function urnParse(urnComponents, options) {
3699
+ if (!urnComponents.path) {
3700
+ urnComponents.error = "URN can not be parsed";
3701
+ return urnComponents;
3781
3702
  }
3782
- const matches = urnComponent.path.match(URN_REG);
3703
+ const matches = urnComponents.path.match(URN_REG);
3783
3704
  if (matches) {
3784
- const scheme = options.scheme || urnComponent.scheme || "urn";
3785
- urnComponent.nid = matches[1].toLowerCase();
3786
- urnComponent.nss = matches[2];
3787
- const urnScheme = `${scheme}:${options.nid || urnComponent.nid}`;
3788
- const schemeHandler = getSchemeHandler(urnScheme);
3789
- urnComponent.path = void 0;
3705
+ const scheme = options.scheme || urnComponents.scheme || "urn";
3706
+ urnComponents.nid = matches[1].toLowerCase();
3707
+ urnComponents.nss = matches[2];
3708
+ const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`;
3709
+ const schemeHandler = SCHEMES[urnScheme];
3710
+ urnComponents.path = void 0;
3790
3711
  if (schemeHandler) {
3791
- urnComponent = schemeHandler.parse(urnComponent, options);
3712
+ urnComponents = schemeHandler.parse(urnComponents, options);
3792
3713
  }
3793
3714
  } else {
3794
- urnComponent.error = urnComponent.error || "URN can not be parsed.";
3715
+ urnComponents.error = urnComponents.error || "URN can not be parsed.";
3795
3716
  }
3796
- return urnComponent;
3717
+ return urnComponents;
3797
3718
  }
3798
3719
  __name(urnParse, "urnParse");
3799
- function urnSerialize(urnComponent, options) {
3800
- if (urnComponent.nid === void 0) {
3801
- throw new Error("URN without nid cannot be serialized");
3802
- }
3803
- const scheme = options.scheme || urnComponent.scheme || "urn";
3804
- const nid = urnComponent.nid.toLowerCase();
3720
+ function urnSerialize(urnComponents, options) {
3721
+ const scheme = options.scheme || urnComponents.scheme || "urn";
3722
+ const nid = urnComponents.nid.toLowerCase();
3805
3723
  const urnScheme = `${scheme}:${options.nid || nid}`;
3806
- const schemeHandler = getSchemeHandler(urnScheme);
3724
+ const schemeHandler = SCHEMES[urnScheme];
3807
3725
  if (schemeHandler) {
3808
- urnComponent = schemeHandler.serialize(urnComponent, options);
3726
+ urnComponents = schemeHandler.serialize(urnComponents, options);
3809
3727
  }
3810
- const uriComponent = urnComponent;
3811
- const nss = urnComponent.nss;
3812
- uriComponent.path = `${nid || options.nid}:${nss}`;
3728
+ const uriComponents = urnComponents;
3729
+ const nss = urnComponents.nss;
3730
+ uriComponents.path = `${nid || options.nid}:${nss}`;
3813
3731
  options.skipEscape = true;
3814
- return uriComponent;
3732
+ return uriComponents;
3815
3733
  }
3816
3734
  __name(urnSerialize, "urnSerialize");
3817
- function urnuuidParse(urnComponent, options) {
3818
- const uuidComponent = urnComponent;
3819
- uuidComponent.uuid = uuidComponent.nss;
3820
- uuidComponent.nss = void 0;
3821
- if (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) {
3822
- uuidComponent.error = uuidComponent.error || "UUID is not valid.";
3735
+ function urnuuidParse(urnComponents, options) {
3736
+ const uuidComponents = urnComponents;
3737
+ uuidComponents.uuid = uuidComponents.nss;
3738
+ uuidComponents.nss = void 0;
3739
+ if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
3740
+ uuidComponents.error = uuidComponents.error || "UUID is not valid.";
3823
3741
  }
3824
- return uuidComponent;
3742
+ return uuidComponents;
3825
3743
  }
3826
3744
  __name(urnuuidParse, "urnuuidParse");
3827
- function urnuuidSerialize(uuidComponent) {
3828
- const urnComponent = uuidComponent;
3829
- urnComponent.nss = (uuidComponent.uuid || "").toLowerCase();
3830
- return urnComponent;
3745
+ function urnuuidSerialize(uuidComponents) {
3746
+ const urnComponents = uuidComponents;
3747
+ urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
3748
+ return urnComponents;
3831
3749
  }
3832
3750
  __name(urnuuidSerialize, "urnuuidSerialize");
3833
- var http = (
3834
- /** @type {SchemeHandler} */
3835
- {
3836
- scheme: "http",
3837
- domainHost: true,
3838
- parse: httpParse,
3839
- serialize: httpSerialize
3840
- }
3841
- );
3842
- var https = (
3843
- /** @type {SchemeHandler} */
3844
- {
3845
- scheme: "https",
3846
- domainHost: http.domainHost,
3847
- parse: httpParse,
3848
- serialize: httpSerialize
3849
- }
3850
- );
3851
- var ws = (
3852
- /** @type {SchemeHandler} */
3853
- {
3854
- scheme: "ws",
3855
- domainHost: true,
3856
- parse: wsParse,
3857
- serialize: wsSerialize
3858
- }
3859
- );
3860
- var wss = (
3861
- /** @type {SchemeHandler} */
3862
- {
3863
- scheme: "wss",
3864
- domainHost: ws.domainHost,
3865
- parse: ws.parse,
3866
- serialize: ws.serialize
3867
- }
3868
- );
3869
- var urn = (
3870
- /** @type {SchemeHandler} */
3871
- {
3872
- scheme: "urn",
3873
- parse: urnParse,
3874
- serialize: urnSerialize,
3875
- skipNormalize: true
3876
- }
3877
- );
3878
- var urnuuid = (
3879
- /** @type {SchemeHandler} */
3880
- {
3881
- scheme: "urn:uuid",
3882
- parse: urnuuidParse,
3883
- serialize: urnuuidSerialize,
3884
- skipNormalize: true
3885
- }
3886
- );
3887
- var SCHEMES = (
3888
- /** @type {Record<SchemeName, SchemeHandler>} */
3889
- {
3890
- http,
3891
- https,
3892
- ws,
3893
- wss,
3894
- urn,
3895
- "urn:uuid": urnuuid
3896
- }
3897
- );
3898
- Object.setPrototypeOf(SCHEMES, null);
3899
- function getSchemeHandler(scheme) {
3900
- return scheme && (SCHEMES[
3901
- /** @type {SchemeName} */
3902
- scheme
3903
- ] || SCHEMES[
3904
- /** @type {SchemeName} */
3905
- scheme.toLowerCase()
3906
- ]) || void 0;
3907
- }
3908
- __name(getSchemeHandler, "getSchemeHandler");
3909
- module.exports = {
3910
- wsIsSecure,
3911
- SCHEMES,
3912
- isValidSchemeName,
3913
- getSchemeHandler
3914
- };
3751
+ var http = {
3752
+ scheme: "http",
3753
+ domainHost: true,
3754
+ parse: httpParse,
3755
+ serialize: httpSerialize
3756
+ };
3757
+ var https = {
3758
+ scheme: "https",
3759
+ domainHost: http.domainHost,
3760
+ parse: httpParse,
3761
+ serialize: httpSerialize
3762
+ };
3763
+ var ws = {
3764
+ scheme: "ws",
3765
+ domainHost: true,
3766
+ parse: wsParse,
3767
+ serialize: wsSerialize
3768
+ };
3769
+ var wss = {
3770
+ scheme: "wss",
3771
+ domainHost: ws.domainHost,
3772
+ parse: ws.parse,
3773
+ serialize: ws.serialize
3774
+ };
3775
+ var urn = {
3776
+ scheme: "urn",
3777
+ parse: urnParse,
3778
+ serialize: urnSerialize,
3779
+ skipNormalize: true
3780
+ };
3781
+ var urnuuid = {
3782
+ scheme: "urn:uuid",
3783
+ parse: urnuuidParse,
3784
+ serialize: urnuuidSerialize,
3785
+ skipNormalize: true
3786
+ };
3787
+ var SCHEMES = {
3788
+ http,
3789
+ https,
3790
+ ws,
3791
+ wss,
3792
+ urn,
3793
+ "urn:uuid": urnuuid
3794
+ };
3795
+ module.exports = SCHEMES;
3915
3796
  }
3916
3797
  });
3917
3798
 
@@ -3920,27 +3801,24 @@ var require_fast_uri = __commonJS({
3920
3801
  "node_modules/fast-uri/index.js"(exports, module) {
3921
3802
  "use strict";
3922
3803
  init_esbuild_shims();
3923
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3924
- var { SCHEMES, getSchemeHandler } = require_schemes();
3804
+ var { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require_utils();
3805
+ var SCHEMES = require_schemes();
3925
3806
  function normalize(uri, options) {
3926
3807
  if (typeof uri === "string") {
3927
- uri = /** @type {T} */
3928
- normalizeString(uri, options);
3808
+ uri = serialize(parse(uri, options), options);
3929
3809
  } else if (typeof uri === "object") {
3930
- uri = /** @type {T} */
3931
- parse(serialize(uri, options), options);
3810
+ uri = parse(serialize(uri, options), options);
3932
3811
  }
3933
3812
  return uri;
3934
3813
  }
3935
3814
  __name(normalize, "normalize");
3936
3815
  function resolve(baseURI, relativeURI, options) {
3937
- const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
3938
- const resolved = resolveComponent(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
3939
- schemelessOptions.skipEscape = true;
3940
- return serialize(resolved, schemelessOptions);
3816
+ const schemelessOptions = Object.assign({ scheme: "null" }, options);
3817
+ const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
3818
+ return serialize(resolved, { ...schemelessOptions, skipEscape: true });
3941
3819
  }
3942
3820
  __name(resolve, "resolve");
3943
- function resolveComponent(base, relative, options, skipNormalization) {
3821
+ function resolveComponents(base, relative, options, skipNormalization) {
3944
3822
  const target = {};
3945
3823
  if (!skipNormalization) {
3946
3824
  base = parse(serialize(base, options), options);
@@ -3970,7 +3848,7 @@ var require_fast_uri = __commonJS({
3970
3848
  target.query = base.query;
3971
3849
  }
3972
3850
  } else {
3973
- if (relative.path[0] === "/") {
3851
+ if (relative.path.charAt(0) === "/") {
3974
3852
  target.path = removeDotSegments(relative.path);
3975
3853
  } else {
3976
3854
  if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
@@ -3993,15 +3871,25 @@ var require_fast_uri = __commonJS({
3993
3871
  target.fragment = relative.fragment;
3994
3872
  return target;
3995
3873
  }
3996
- __name(resolveComponent, "resolveComponent");
3874
+ __name(resolveComponents, "resolveComponents");
3997
3875
  function equal(uriA, uriB, options) {
3998
- const normalizedA = normalizeComparableURI(uriA, options);
3999
- const normalizedB = normalizeComparableURI(uriB, options);
4000
- return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
3876
+ if (typeof uriA === "string") {
3877
+ uriA = unescape(uriA);
3878
+ uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true });
3879
+ } else if (typeof uriA === "object") {
3880
+ uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
3881
+ }
3882
+ if (typeof uriB === "string") {
3883
+ uriB = unescape(uriB);
3884
+ uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true });
3885
+ } else if (typeof uriB === "object") {
3886
+ uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
3887
+ }
3888
+ return uriA.toLowerCase() === uriB.toLowerCase();
4001
3889
  }
4002
3890
  __name(equal, "equal");
4003
3891
  function serialize(cmpts, opts) {
4004
- const component = {
3892
+ const components = {
4005
3893
  host: cmpts.host,
4006
3894
  scheme: cmpts.scheme,
4007
3895
  userinfo: cmpts.userinfo,
@@ -4019,62 +3907,64 @@ var require_fast_uri = __commonJS({
4019
3907
  };
4020
3908
  const options = Object.assign({}, opts);
4021
3909
  const uriTokens = [];
4022
- const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
4023
- if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
4024
- if (component.path !== void 0) {
3910
+ const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
3911
+ if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
3912
+ if (components.path !== void 0) {
4025
3913
  if (!options.skipEscape) {
4026
- component.path = escapePreservingEscapes(component.path);
4027
- if (component.scheme !== void 0) {
4028
- component.path = component.path.split("%3A").join(":");
3914
+ components.path = escape(components.path);
3915
+ if (components.scheme !== void 0) {
3916
+ components.path = components.path.split("%3A").join(":");
4029
3917
  }
4030
3918
  } else {
4031
- component.path = normalizePercentEncoding(component.path);
3919
+ components.path = unescape(components.path);
4032
3920
  }
4033
3921
  }
4034
- if (options.reference !== "suffix" && component.scheme) {
4035
- uriTokens.push(component.scheme, ":");
3922
+ if (options.reference !== "suffix" && components.scheme) {
3923
+ uriTokens.push(components.scheme, ":");
4036
3924
  }
4037
- const authority = recomposeAuthority(component);
3925
+ const authority = recomposeAuthority(components);
4038
3926
  if (authority !== void 0) {
4039
3927
  if (options.reference !== "suffix") {
4040
3928
  uriTokens.push("//");
4041
3929
  }
4042
3930
  uriTokens.push(authority);
4043
- if (component.path && component.path[0] !== "/") {
3931
+ if (components.path && components.path.charAt(0) !== "/") {
4044
3932
  uriTokens.push("/");
4045
3933
  }
4046
3934
  }
4047
- if (component.path !== void 0) {
4048
- let s = component.path;
3935
+ if (components.path !== void 0) {
3936
+ let s = components.path;
4049
3937
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
4050
3938
  s = removeDotSegments(s);
4051
3939
  }
4052
- if (authority === void 0 && s[0] === "/" && s[1] === "/") {
4053
- s = "/%2F" + s.slice(2);
3940
+ if (authority === void 0) {
3941
+ s = s.replace(/^\/\//u, "/%2F");
4054
3942
  }
4055
3943
  uriTokens.push(s);
4056
3944
  }
4057
- if (component.query !== void 0) {
4058
- uriTokens.push("?", component.query);
3945
+ if (components.query !== void 0) {
3946
+ uriTokens.push("?", components.query);
4059
3947
  }
4060
- if (component.fragment !== void 0) {
4061
- uriTokens.push("#", component.fragment);
3948
+ if (components.fragment !== void 0) {
3949
+ uriTokens.push("#", components.fragment);
4062
3950
  }
4063
3951
  return uriTokens.join("");
4064
3952
  }
4065
3953
  __name(serialize, "serialize");
4066
- var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
4067
- function getParseError(parsed, matches) {
4068
- if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
4069
- return 'URI path must start with "/" when authority is present.';
4070
- }
4071
- if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
4072
- return "URI port is malformed.";
3954
+ var hexLookUp = Array.from({ length: 127 }, (_v, k) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k)));
3955
+ function nonSimpleDomain(value) {
3956
+ let code = 0;
3957
+ for (let i = 0, len = value.length; i < len; ++i) {
3958
+ code = value.charCodeAt(i);
3959
+ if (code > 126 || hexLookUp[code]) {
3960
+ return true;
3961
+ }
4073
3962
  }
4074
- return void 0;
3963
+ return false;
4075
3964
  }
4076
- __name(getParseError, "getParseError");
4077
- function parseWithStatus(uri, opts) {
3965
+ __name(nonSimpleDomain, "nonSimpleDomain");
3966
+ var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3967
+ function parse(uri, opts) {
4078
3968
  const options = Object.assign({}, opts);
4079
3969
  const parsed = {
4080
3970
  scheme: void 0,
@@ -4085,15 +3975,9 @@ var require_fast_uri = __commonJS({
4085
3975
  query: void 0,
4086
3976
  fragment: void 0
4087
3977
  };
4088
- let malformedAuthorityOrPort = false;
3978
+ const gotEncoding = uri.indexOf("%") !== -1;
4089
3979
  let isIP = false;
4090
- if (options.reference === "suffix") {
4091
- if (options.scheme) {
4092
- uri = options.scheme + ":" + uri;
4093
- } else {
4094
- uri = "//" + uri;
4095
- }
4096
- }
3980
+ if (options.reference === "suffix") uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri;
4097
3981
  const matches = uri.match(URI_PARSE);
4098
3982
  if (matches) {
4099
3983
  parsed.scheme = matches[1];
@@ -4106,18 +3990,14 @@ var require_fast_uri = __commonJS({
4106
3990
  if (isNaN(parsed.port)) {
4107
3991
  parsed.port = matches[5];
4108
3992
  }
4109
- const parseError = getParseError(parsed, matches);
4110
- if (parseError !== void 0) {
4111
- parsed.error = parsed.error || parseError;
4112
- malformedAuthorityOrPort = true;
4113
- }
4114
3993
  if (parsed.host) {
4115
- const ipv4result = isIPv4(parsed.host);
4116
- if (ipv4result === false) {
4117
- const ipv6result = normalizeIPv6(parsed.host);
3994
+ const ipv4result = normalizeIPv4(parsed.host);
3995
+ if (ipv4result.isIPV4 === false) {
3996
+ const ipv6result = normalizeIPv6(ipv4result.host);
4118
3997
  parsed.host = ipv6result.host.toLowerCase();
4119
3998
  isIP = ipv6result.isIPV6;
4120
3999
  } else {
4000
+ parsed.host = ipv4result.host;
4121
4001
  isIP = true;
4122
4002
  }
4123
4003
  }
@@ -4133,7 +4013,7 @@ var require_fast_uri = __commonJS({
4133
4013
  if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
4134
4014
  parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
4135
4015
  }
4136
- const schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);
4016
+ const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
4137
4017
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
4138
4018
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
4139
4019
  try {
@@ -4144,23 +4024,17 @@ var require_fast_uri = __commonJS({
4144
4024
  }
4145
4025
  }
4146
4026
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
4147
- if (uri.indexOf("%") !== -1) {
4148
- if (parsed.scheme !== void 0) {
4149
- parsed.scheme = unescape(parsed.scheme);
4150
- }
4151
- if (parsed.host !== void 0) {
4152
- parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
4153
- }
4027
+ if (gotEncoding && parsed.scheme !== void 0) {
4028
+ parsed.scheme = unescape(parsed.scheme);
4029
+ }
4030
+ if (gotEncoding && parsed.host !== void 0) {
4031
+ parsed.host = unescape(parsed.host);
4154
4032
  }
4155
4033
  if (parsed.path) {
4156
- parsed.path = normalizePathEncoding(parsed.path);
4034
+ parsed.path = escape(unescape(parsed.path));
4157
4035
  }
4158
4036
  if (parsed.fragment) {
4159
- try {
4160
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
4161
- } catch {
4162
- parsed.error = parsed.error || "URI malformed";
4163
- }
4037
+ parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
4164
4038
  }
4165
4039
  }
4166
4040
  if (schemeHandler && schemeHandler.parse) {
@@ -4169,40 +4043,14 @@ var require_fast_uri = __commonJS({
4169
4043
  } else {
4170
4044
  parsed.error = parsed.error || "URI can not be parsed.";
4171
4045
  }
4172
- return { parsed, malformedAuthorityOrPort };
4173
- }
4174
- __name(parseWithStatus, "parseWithStatus");
4175
- function parse(uri, opts) {
4176
- return parseWithStatus(uri, opts).parsed;
4046
+ return parsed;
4177
4047
  }
4178
4048
  __name(parse, "parse");
4179
- function normalizeString(uri, opts) {
4180
- return normalizeStringWithStatus(uri, opts).normalized;
4181
- }
4182
- __name(normalizeString, "normalizeString");
4183
- function normalizeStringWithStatus(uri, opts) {
4184
- const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
4185
- return {
4186
- normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
4187
- malformedAuthorityOrPort
4188
- };
4189
- }
4190
- __name(normalizeStringWithStatus, "normalizeStringWithStatus");
4191
- function normalizeComparableURI(uri, opts) {
4192
- if (typeof uri === "string") {
4193
- const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
4194
- return malformedAuthorityOrPort ? void 0 : normalized;
4195
- }
4196
- if (typeof uri === "object") {
4197
- return serialize(uri, opts);
4198
- }
4199
- }
4200
- __name(normalizeComparableURI, "normalizeComparableURI");
4201
4049
  var fastUri = {
4202
4050
  SCHEMES,
4203
4051
  normalize,
4204
4052
  resolve,
4205
- resolveComponent,
4053
+ resolveComponents,
4206
4054
  equal,
4207
4055
  serialize,
4208
4056
  parse
@@ -4342,7 +4190,7 @@ var require_core = __commonJS({
4342
4190
  constructor(opts = {}) {
4343
4191
  this.schemas = {};
4344
4192
  this.refs = {};
4345
- this.formats = /* @__PURE__ */ Object.create(null);
4193
+ this.formats = {};
4346
4194
  this._compilations = /* @__PURE__ */ new Set();
4347
4195
  this._loading = {};
4348
4196
  this._cache = /* @__PURE__ */ new Map();
@@ -5159,7 +5007,6 @@ var require_pattern = __commonJS({
5159
5007
  init_esbuild_shims();
5160
5008
  Object.defineProperty(exports, "__esModule", { value: true });
5161
5009
  var code_1 = require_code2();
5162
- var util_1 = require_util();
5163
5010
  var codegen_1 = require_codegen();
5164
5011
  var error = {
5165
5012
  message: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, "message"),
@@ -5172,18 +5019,10 @@ var require_pattern = __commonJS({
5172
5019
  $data: true,
5173
5020
  error,
5174
5021
  code(cxt) {
5175
- const { gen, data, $data, schema, schemaCode, it } = cxt;
5022
+ const { data, $data, schema, schemaCode, it } = cxt;
5176
5023
  const u = it.opts.unicodeRegExp ? "u" : "";
5177
- if ($data) {
5178
- const { regExp } = it.opts.code;
5179
- const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
5180
- const valid = gen.let("valid");
5181
- gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
5182
- cxt.fail$data((0, codegen_1._)`!${valid}`);
5183
- } else {
5184
- const regExp = (0, code_1.usePattern)(cxt, schema);
5185
- cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
5186
- }
5024
+ const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);
5025
+ cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
5187
5026
  }
5188
5027
  };
5189
5028
  exports.default = def;
@@ -11520,7 +11359,7 @@ var require_core4 = __commonJS({
11520
11359
  constructor(opts = {}) {
11521
11360
  this.schemas = {};
11522
11361
  this.refs = {};
11523
- this.formats = /* @__PURE__ */ Object.create(null);
11362
+ this.formats = {};
11524
11363
  this._compilations = /* @__PURE__ */ new Set();
11525
11364
  this._loading = {};
11526
11365
  this._cache = /* @__PURE__ */ new Map();
@@ -12337,7 +12176,6 @@ var require_pattern2 = __commonJS({
12337
12176
  init_esbuild_shims();
12338
12177
  Object.defineProperty(exports, "__esModule", { value: true });
12339
12178
  var code_1 = require_code4();
12340
- var util_1 = require_util2();
12341
12179
  var codegen_1 = require_codegen2();
12342
12180
  var error = {
12343
12181
  message: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, "message"),
@@ -12350,18 +12188,10 @@ var require_pattern2 = __commonJS({
12350
12188
  $data: true,
12351
12189
  error,
12352
12190
  code(cxt) {
12353
- const { gen, data, $data, schema, schemaCode, it } = cxt;
12191
+ const { data, $data, schema, schemaCode, it } = cxt;
12354
12192
  const u = it.opts.unicodeRegExp ? "u" : "";
12355
- if ($data) {
12356
- const { regExp } = it.opts.code;
12357
- const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
12358
- const valid = gen.let("valid");
12359
- gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
12360
- cxt.fail$data((0, codegen_1._)`!${valid}`);
12361
- } else {
12362
- const regExp = (0, code_1.usePattern)(cxt, schema);
12363
- cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
12364
- }
12193
+ const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);
12194
+ cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
12365
12195
  }
12366
12196
  };
12367
12197
  exports.default = def;
@@ -14452,7 +14282,10 @@ var SchemaValidator = class {
14452
14282
  }
14453
14283
  let valid = validate(data);
14454
14284
  if (!valid && validate.errors) {
14455
- fixBooleanValues(data);
14285
+ fixBooleanValues(
14286
+ data,
14287
+ anySchema
14288
+ );
14456
14289
  fixStringifiedJsonValues(
14457
14290
  data,
14458
14291
  anySchema
@@ -14516,19 +14349,27 @@ function fixStringifiedJsonValues(data, schema) {
14516
14349
  }
14517
14350
  }
14518
14351
  __name(fixStringifiedJsonValues, "fixStringifiedJsonValues");
14519
- function fixBooleanValues(data) {
14352
+ function fixBooleanValues(data, schema) {
14353
+ const properties = schema?.["properties"];
14354
+ const items = schema?.["items"];
14520
14355
  for (const key of Object.keys(data)) {
14521
14356
  if (!(key in data)) continue;
14522
14357
  const value = data[key];
14358
+ const childSchema = Array.isArray(data) ? items : properties?.[key];
14523
14359
  if (typeof value === "object" && value !== null) {
14524
- fixBooleanValues(value);
14525
- } else if (typeof value === "string") {
14526
- const lower = value.toLowerCase();
14527
- if (lower === "true") {
14528
- data[key] = true;
14529
- } else if (lower === "false") {
14530
- data[key] = false;
14531
- }
14360
+ fixBooleanValues(value, childSchema);
14361
+ continue;
14362
+ }
14363
+ if (typeof value !== "string") continue;
14364
+ const accepted = childSchema ? getAcceptedTypes(childSchema) : null;
14365
+ if (!accepted || accepted.has("string") || !accepted.has("boolean")) {
14366
+ continue;
14367
+ }
14368
+ const lower = value.toLowerCase();
14369
+ if (lower === "true") {
14370
+ data[key] = true;
14371
+ } else if (lower === "false") {
14372
+ data[key] = false;
14532
14373
  }
14533
14374
  }
14534
14375
  }
@@ -14782,6 +14623,25 @@ var DeclarativeTool = class {
14782
14623
  parametersJsonSchema: this.parameterSchema
14783
14624
  };
14784
14625
  }
14626
+ /**
14627
+ * Max model-facing characters for this tool's output before the scheduler
14628
+ * spills it to disk (mirrors Claude Code's per-tool `maxResultSizeChars`).
14629
+ * - `undefined` → use the global truncation threshold.
14630
+ * - `Infinity` → self-managed (the tool does its own size control, e.g.
14631
+ * ReadFile's line-based paging), exempt from scheduler char truncation.
14632
+ * Override in subclasses to opt into a per-tool budget.
14633
+ */
14634
+ get maxOutputChars() {
14635
+ return void 0;
14636
+ }
14637
+ /**
14638
+ * Direction kept when this tool's oversized output is truncated: `'head'`
14639
+ * (beginning, e.g. shell), `'tail'` (end, e.g. background agents), or
14640
+ * `'both'` (first + last, the default).
14641
+ */
14642
+ get truncateKeep() {
14643
+ return "both";
14644
+ }
14785
14645
  /**
14786
14646
  * Projects tool params for the AUTO approval mode classifier.
14787
14647
  *
@@ -15020,6 +14880,7 @@ var ToolNames = {
15020
14880
  AGENT: "agent",
15021
14881
  SKILL: "skill",
15022
14882
  EXIT_PLAN_MODE: "exit_plan_mode",
14883
+ ENTER_PLAN_MODE: "enter_plan_mode",
15023
14884
  WEB_FETCH: "web_fetch",
15024
14885
  LS: "list_directory",
15025
14886
  LSP: "lsp",
@@ -15029,13 +14890,31 @@ var ToolNames = {
15029
14890
  CRON_DELETE: "cron_delete",
15030
14891
  TTS_NOTIFICATION: "tts_notification",
15031
14892
  TASK_STOP: "task_stop",
14893
+ TASK_CREATE: "task_create",
14894
+ TASK_UPDATE: "task_update",
14895
+ TASK_LIST: "task_list",
14896
+ TEAM_CREATE: "team_create",
14897
+ TEAM_DELETE: "team_delete",
15032
14898
  SEND_MESSAGE: "send_message",
15033
14899
  STRUCTURED_OUTPUT: "structured_output",
15034
14900
  MONITOR: "monitor",
15035
14901
  NOTEBOOK_EDIT: "notebook_edit",
15036
14902
  TOOL_SEARCH: "tool_search",
15037
14903
  ENTER_WORKTREE: "enter_worktree",
15038
- EXIT_WORKTREE: "exit_worktree"
14904
+ EXIT_WORKTREE: "exit_worktree",
14905
+ // Computer Use tools — built-in but backed by an upstream MCP server.
14906
+ // All deferred; revealed only when the user-initiated request triggers
14907
+ // a computer-use action. See packages/core/src/tools/computer-use/.
14908
+ COMPUTER_USE_LIST_APPS: "computer_use__list_apps",
14909
+ COMPUTER_USE_GET_APP_STATE: "computer_use__get_app_state",
14910
+ COMPUTER_USE_CLICK: "computer_use__click",
14911
+ COMPUTER_USE_PERFORM_SECONDARY_ACTION: "computer_use__perform_secondary_action",
14912
+ COMPUTER_USE_SCROLL: "computer_use__scroll",
14913
+ COMPUTER_USE_DRAG: "computer_use__drag",
14914
+ COMPUTER_USE_TYPE_TEXT: "computer_use__type_text",
14915
+ COMPUTER_USE_PRESS_KEY: "computer_use__press_key",
14916
+ COMPUTER_USE_SET_VALUE: "computer_use__set_value",
14917
+ WORKFLOW: "workflow"
15039
14918
  };
15040
14919
  var ToolDisplayNames = {
15041
14920
  EDIT: "Edit",
@@ -15049,6 +14928,7 @@ var ToolDisplayNames = {
15049
14928
  AGENT: "Agent",
15050
14929
  SKILL: "Skill",
15051
14930
  EXIT_PLAN_MODE: "ExitPlanMode",
14931
+ ENTER_PLAN_MODE: "EnterPlanMode",
15052
14932
  WEB_FETCH: "WebFetch",
15053
14933
  LS: "ListFiles",
15054
14934
  LSP: "Lsp",
@@ -15058,13 +14938,28 @@ var ToolDisplayNames = {
15058
14938
  CRON_DELETE: "CronDelete",
15059
14939
  TTS_NOTIFICATION: "TTS Notification",
15060
14940
  TASK_STOP: "TaskStop",
14941
+ TASK_CREATE: "TaskCreate",
14942
+ TASK_UPDATE: "TaskUpdate",
14943
+ TASK_LIST: "TaskList",
14944
+ TEAM_CREATE: "TeamCreate",
14945
+ TEAM_DELETE: "TeamDelete",
15061
14946
  SEND_MESSAGE: "SendMessage",
15062
14947
  STRUCTURED_OUTPUT: "StructuredOutput",
15063
14948
  MONITOR: "Monitor",
15064
14949
  NOTEBOOK_EDIT: "NotebookEdit",
15065
14950
  TOOL_SEARCH: "ToolSearch",
15066
14951
  ENTER_WORKTREE: "EnterWorktree",
15067
- EXIT_WORKTREE: "ExitWorktree"
14952
+ EXIT_WORKTREE: "ExitWorktree",
14953
+ COMPUTER_USE_LIST_APPS: "computer_use__list_apps",
14954
+ COMPUTER_USE_GET_APP_STATE: "computer_use__get_app_state",
14955
+ COMPUTER_USE_CLICK: "computer_use__click",
14956
+ COMPUTER_USE_PERFORM_SECONDARY_ACTION: "computer_use__perform_secondary_action",
14957
+ COMPUTER_USE_SCROLL: "computer_use__scroll",
14958
+ COMPUTER_USE_DRAG: "computer_use__drag",
14959
+ COMPUTER_USE_TYPE_TEXT: "computer_use__type_text",
14960
+ COMPUTER_USE_PRESS_KEY: "computer_use__press_key",
14961
+ COMPUTER_USE_SET_VALUE: "computer_use__set_value",
14962
+ WORKFLOW: "Workflow"
15068
14963
  };
15069
14964
  var ToolNamesMigration = {
15070
14965
  search_file_content: ToolNames.GREP,