@organizaone/o1-code 0.8.0 → 0.10.4

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 (359) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +34 -7
  2. package/bundled/qc-helper/docs/features/commands.md +4 -4
  3. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +6 -0
  4. package/chunks/{MaxSizedBox-MPKA4H3S.js → MaxSizedBox-VHZXGVLW.js} +46 -45
  5. package/chunks/{StandaloneSessionPicker-UVCAOTZY.js → StandaloneSessionPicker-3EROWATU.js} +62 -61
  6. package/chunks/{acp-subagent-executor-Z7DCA5XD.js → acp-subagent-executor-GWQKAEPB.js} +47 -46
  7. package/chunks/{acpAgent-XD4HSG4S.js → acpAgent-AL6KTCSY.js} +94 -93
  8. package/chunks/{agent-4PIKN4KJ.js → agent-RU7E6G34.js} +32 -31
  9. package/chunks/{agent-headless-DE5JTWFJ.js → agent-headless-M4PN25BD.js} +32 -31
  10. package/chunks/{anthropicContentGenerator-LYCMWQZM.js → anthropicContentGenerator-6TKL2GXG.js} +8 -8
  11. package/chunks/{bridge-CDYVSTRW.js → bridge-SEYIHH6G.js} +47 -46
  12. package/chunks/{build-HLEIVF4Y.js → build-QRER4J4E.js} +2 -1
  13. package/chunks/{bwrap-execution-QFG5RQSP.js → bwrap-execution-UZAMPG6F.js} +3 -3
  14. package/chunks/{chunk-KCFOR2YE.js → chunk-2VE7AXYY.js} +11 -11
  15. package/chunks/{chunk-CMZHL55Y.js → chunk-3KUQCZUE.js} +2 -2
  16. package/chunks/{chunk-HD6YZF4W.js → chunk-3PVG3FQN.js} +7 -7
  17. package/chunks/{chunk-ZZRKSYC2.js → chunk-43427ZT3.js} +1 -1
  18. package/chunks/{chunk-OBPGYMIV.js → chunk-4ESI3MQ5.js} +43 -22
  19. package/chunks/{chunk-B64XOQ4T.js → chunk-4EYPKVHD.js} +5 -5
  20. package/chunks/{chunk-ZFZB6WC5.js → chunk-4LCUE7BN.js} +3 -198
  21. package/chunks/{chunk-Z6I4GSXT.js → chunk-4XS46ASJ.js} +2 -2
  22. package/chunks/{chunk-JOAJ57HE.js → chunk-545ROI6V.js} +1 -1
  23. package/chunks/{chunk-UWIT4O2Y.js → chunk-5CB4U6DS.js} +2 -2
  24. package/chunks/{chunk-46DFZOLD.js → chunk-5E373J3N.js} +1 -1
  25. package/chunks/{chunk-GHVRSKPO.js → chunk-5Y44KHOU.js} +1 -1
  26. package/chunks/{chunk-HNYPLSAN.js → chunk-67LZSGOU.js} +1 -1
  27. package/chunks/{chunk-BPVDOEUQ.js → chunk-6NXC4BI5.js} +3 -3
  28. package/chunks/{chunk-K5SPVYI4.js → chunk-7DQWDZUQ.js} +1 -1
  29. package/chunks/{chunk-SYCNHXV2.js → chunk-7GSPYBET.js} +1 -1
  30. package/chunks/{chunk-GNUA6XPQ.js → chunk-7H3GWNGJ.js} +1 -1
  31. package/chunks/{chunk-6IB7ZLX6.js → chunk-7JG3HELJ.js} +4 -4
  32. package/chunks/{chunk-TCME6IG6.js → chunk-7LFCBMVX.js} +1 -1
  33. package/chunks/{chunk-ZQPD7WDS.js → chunk-7M4NSLWM.js} +2 -2
  34. package/chunks/{chunk-B2FLT75F.js → chunk-7ODOX4UM.js} +2 -1
  35. package/chunks/{chunk-V5OSSYNA.js → chunk-7PYXIRCE.js} +2 -2
  36. package/chunks/{chunk-WUKHAI4J.js → chunk-7USF7X6U.js} +1 -1
  37. package/chunks/{chunk-5C5U56Q3.js → chunk-ADBL3IRA.js} +5 -5
  38. package/chunks/{chunk-L4PQEMAM.js → chunk-AGMYBSIU.js} +8 -5
  39. package/chunks/{chunk-ZFFHT6AU.js → chunk-AIGLVHBV.js} +3 -3
  40. package/chunks/{chunk-ZHTRFFVQ.js → chunk-ALIO4STD.js} +1 -1
  41. package/chunks/{chunk-ZXMW3YT5.js → chunk-BAGPD67C.js} +1 -1
  42. package/chunks/{chunk-7W7I5SEW.js → chunk-BEI5P3M7.js} +7 -7
  43. package/chunks/{chunk-OMTAQ5EZ.js → chunk-BKKZR7X4.js} +2 -2
  44. package/chunks/{chunk-APE4IW2O.js → chunk-CF5SF4G5.js} +6 -6
  45. package/chunks/{chunk-YIDTDNOF.js → chunk-CKKPLKIP.js} +1 -1
  46. package/chunks/{chunk-CVMZXRZS.js → chunk-CNOWGY7D.js} +6 -6
  47. package/chunks/{chunk-B43A45RP.js → chunk-CPWPD6SR.js} +5 -5
  48. package/chunks/{chunk-JVJT5UI7.js → chunk-CS4CELQI.js} +2 -2
  49. package/chunks/{chunk-D33JAHZW.js → chunk-DHPOSTBT.js} +24 -5
  50. package/chunks/{chunk-EHRBJ5RM.js → chunk-DVJZ2C55.js} +2 -2
  51. package/chunks/{chunk-6TWJYLJE.js → chunk-DVRWYOU6.js} +1 -1
  52. package/chunks/{chunk-773IX2FW.js → chunk-EHYUNTVE.js} +7 -7
  53. package/chunks/{chunk-TQI6ULGQ.js → chunk-ER3EHNTV.js} +1 -1
  54. package/chunks/{chunk-4LZRIWVH.js → chunk-EZCJ26MU.js} +4 -4
  55. package/chunks/{chunk-QCXAYVHY.js → chunk-FHXZKNON.js} +2 -2
  56. package/chunks/{chunk-3CVLYID6.js → chunk-FII3ST7W.js} +3 -3
  57. package/chunks/{chunk-QDZTSZTF.js → chunk-FJHDFJVI.js} +1 -1
  58. package/chunks/{chunk-FVPKPSA3.js → chunk-GGUL6GZ5.js} +1 -1
  59. package/chunks/{chunk-JS4EYSJA.js → chunk-H2DCMLIK.js} +4 -4
  60. package/chunks/{chunk-YDM2USQE.js → chunk-H75LW27M.js} +4 -4
  61. package/chunks/{chunk-EDDKKBIT.js → chunk-H7LYSOSQ.js} +1 -1
  62. package/chunks/{chunk-POHJY7RJ.js → chunk-HCE5HUQG.js} +1 -1
  63. package/chunks/{chunk-XRF3D35U.js → chunk-HD3KYIZP.js} +3 -3
  64. package/chunks/{chunk-PLWOHBC7.js → chunk-HDGYCLNB.js} +1 -1
  65. package/chunks/{chunk-4PE4SRQM.js → chunk-HDVJIXPT.js} +3 -3
  66. package/chunks/{chunk-YSNEIJMX.js → chunk-HFXEXI4S.js} +49 -40
  67. package/chunks/{chunk-XLLMQVGN.js → chunk-HOLP2BCW.js} +1 -1
  68. package/chunks/{chunk-DEULKIEJ.js → chunk-HWIVKRK4.js} +1 -1
  69. package/chunks/{chunk-4ALTAZNE.js → chunk-IK7Y64IL.js} +2 -2
  70. package/chunks/{chunk-V23Q4GBY.js → chunk-J5UW3SF4.js} +1 -1
  71. package/chunks/{chunk-DZPGLX7M.js → chunk-JQPMOOCH.js} +1 -1
  72. package/chunks/{chunk-G5L3QNEI.js → chunk-KGDJZNQC.js} +3 -3
  73. package/chunks/{chunk-VMDI4JJ3.js → chunk-KMTAGPIN.js} +2 -2
  74. package/chunks/{chunk-TEX55VSH.js → chunk-KPRPJMSP.js} +1 -1
  75. package/chunks/{chunk-YKJL5SJA.js → chunk-L4XP2BXW.js} +13 -13
  76. package/chunks/{chunk-3QJQWI46.js → chunk-LIAMHIGS.js} +2 -2
  77. package/chunks/{chunk-ZRB6OWYJ.js → chunk-ME5CDTOQ.js} +3 -3
  78. package/chunks/{chunk-NGE3GHMN.js → chunk-MWFHMYVA.js} +1 -1
  79. package/chunks/{chunk-CWDGOQ42.js → chunk-N5MLNIET.js} +44 -44
  80. package/chunks/{chunk-XKOGHPWS.js → chunk-N7NBYHMJ.js} +1 -1
  81. package/chunks/{chunk-ZBXTBSTM.js → chunk-NAKKROMI.js} +2 -2
  82. package/chunks/{chunk-3ZZ62DW7.js → chunk-NDK2PD5Y.js} +1 -1
  83. package/chunks/{chunk-BH3ZYKWI.js → chunk-NHRB3THC.js} +2 -2
  84. package/chunks/{chunk-JIE2LIL5.js → chunk-NKHM3QSK.js} +5 -5
  85. package/chunks/{chunk-4P7BNWDO.js → chunk-NSH5JHZH.js} +91 -26
  86. package/chunks/{chunk-74Q7U3NS.js → chunk-OCTSNICG.js} +2 -2
  87. package/chunks/{chunk-2USNAY6D.js → chunk-ODYKSVON.js} +1 -1
  88. package/chunks/{chunk-NGPEFWU4.js → chunk-OJSW65PQ.js} +1 -1
  89. package/chunks/{chunk-LQLXIPYI.js → chunk-OVTUMTW6.js} +4 -4
  90. package/chunks/{chunk-EEQPRAGR.js → chunk-P35MCCDH.js} +2 -2
  91. package/chunks/{chunk-MSVH2BBU.js → chunk-PF7G5TYG.js} +17 -17
  92. package/chunks/{chunk-BPYLGORC.js → chunk-PYIWZPBY.js} +6 -6
  93. package/chunks/{chunk-QBVSXKVU.js → chunk-QATTWMLJ.js} +8 -8
  94. package/chunks/{chunk-FZUEC7ES.js → chunk-QCONHGJR.js} +1 -1
  95. package/chunks/{chunk-UAFSY3G5.js → chunk-QFPNGX7U.js} +1 -1
  96. package/chunks/{chunk-V7SQBCBF.js → chunk-QLP5B3HQ.js} +1 -1
  97. package/chunks/{chunk-G2I75T4C.js → chunk-QYUMJTBP.js} +2 -2
  98. package/chunks/{chunk-DVDWT5I5.js → chunk-R7SPXY4A.js} +1 -1
  99. package/chunks/{chunk-PBD5EUD6.js → chunk-RCBGIDZU.js} +1 -1
  100. package/chunks/chunk-RIN7SNJN.js +212 -0
  101. package/chunks/{chunk-4J2EVRIE.js → chunk-RJUVWCC5.js} +1 -1
  102. package/chunks/{chunk-6QG24XPQ.js → chunk-RMWEXCAN.js} +3 -3
  103. package/chunks/{chunk-ZLKDL25I.js → chunk-RUPTHAC7.js} +3 -3
  104. package/chunks/{chunk-G5Q6NMUW.js → chunk-RX5J7HHZ.js} +2 -2
  105. package/chunks/{chunk-GELXLAFP.js → chunk-SKU7JRIS.js} +2 -2
  106. package/chunks/{chunk-AZY4TCZ7.js → chunk-SOWXEFJH.js} +492 -242
  107. package/chunks/{chunk-7QM44EGU.js → chunk-SPLQKNEP.js} +1 -1
  108. package/chunks/{chunk-BWWYSCS6.js → chunk-SWJZH7BK.js} +6 -6
  109. package/chunks/{chunk-YICEY4QV.js → chunk-T7M2HD7D.js} +1 -1
  110. package/chunks/{chunk-C656OW55.js → chunk-TAFMMFLK.js} +3 -3
  111. package/chunks/{chunk-45P7VYH4.js → chunk-TBSUV4QV.js} +2 -2
  112. package/chunks/{chunk-TNG42Z7B.js → chunk-TI76PXY3.js} +3 -3
  113. package/chunks/{chunk-C4LQ2SEV.js → chunk-TUTCCLI7.js} +3 -3
  114. package/chunks/{chunk-IBPY5AJI.js → chunk-U5KZBWKF.js} +4 -397
  115. package/chunks/{chunk-JL3XSVHA.js → chunk-UFXAWOXR.js} +1 -1
  116. package/chunks/{chunk-D37ZUISY.js → chunk-UX6ZDNDO.js} +2 -2
  117. package/chunks/{chunk-O6SXVQIJ.js → chunk-V7NIAOMT.js} +5 -5
  118. package/chunks/{chunk-DKGZJFEL.js → chunk-VCNQFVKJ.js} +9 -9
  119. package/chunks/{chunk-WDPFG2UH.js → chunk-VHIYZGUD.js} +2 -2
  120. package/chunks/{chunk-SQX3PXHY.js → chunk-VIAJ74X3.js} +2 -2
  121. package/chunks/{chunk-H73FHD45.js → chunk-VLALIFPR.js} +13 -13
  122. package/chunks/{chunk-YO5ABP3C.js → chunk-VOETOZWN.js} +1 -1
  123. package/chunks/{chunk-ELVKWFRK.js → chunk-VVF2QVSN.js} +2 -2
  124. package/chunks/{chunk-QN7NIHRH.js → chunk-VVRQLG57.js} +1 -1
  125. package/chunks/{chunk-XK4OF3J4.js → chunk-W2SFVYBK.js} +7 -7
  126. package/chunks/{chunk-S7GI7ORV.js → chunk-WCWPITU4.js} +2 -2
  127. package/chunks/{chunk-3NAWLMIE.js → chunk-WQBWL6YE.js} +10 -10
  128. package/chunks/{chunk-XCVOM2VI.js → chunk-WS3L2RKL.js} +5 -5
  129. package/chunks/{chunk-FAFSNEV5.js → chunk-WUP5273H.js} +3 -3
  130. package/chunks/{chunk-LYER2K7O.js → chunk-WWNTQFH7.js} +2 -2
  131. package/chunks/{chunk-HLWXBJCH.js → chunk-WZCKDUBO.js} +131 -15
  132. package/chunks/{chunk-Y37FNMS7.js → chunk-X427DWFD.js} +1 -1
  133. package/chunks/{chunk-35RKSP4A.js → chunk-XHYWPHWN.js} +1 -1
  134. package/chunks/{chunk-OMJU4YIQ.js → chunk-XOVXSDNN.js} +1 -1
  135. package/chunks/{chunk-W5NM2DOQ.js → chunk-XRY6XLJD.js} +16 -0
  136. package/chunks/{chunk-ZXWZU5JK.js → chunk-Y6AFQKTE.js} +14 -3
  137. package/chunks/{chunk-HQ5DN5W7.js → chunk-Y75AMWDB.js} +1 -1
  138. package/chunks/{chunk-V7HMP3JJ.js → chunk-YHWOPL2T.js} +100 -29
  139. package/chunks/{chunk-TUQW42RF.js → chunk-YXR7EEJO.js} +2 -2
  140. package/chunks/{chunk-FFMBJQC4.js → chunk-ZDBDDHSP.js} +1 -1
  141. package/chunks/{chunk-5S6C2QM3.js → chunk-ZHMOCPV6.js} +3 -3
  142. package/chunks/{chunk-UFJZ2C4R.js → chunk-ZSP6FDZ2.js} +5 -5
  143. package/chunks/{codex-subagent-executor-QPQRH7VF.js → codex-subagent-executor-UGS4BKXM.js} +47 -46
  144. package/chunks/{container-execution-environment-PO7I26HR.js → container-execution-environment-INYC74GN.js} +1 -1
  145. package/chunks/{contextCommand-MUYCLXI2.js → contextCommand-ADTFEKEK.js} +46 -45
  146. package/chunks/{core-runtime-K375FMVY.js → core-runtime-QIWPENIC.js} +44 -43
  147. package/chunks/{create-sub-session-ETVNIXD4.js → create-sub-session-IU3OMOYV.js} +45 -44
  148. package/chunks/{daemon-git-worktree-guard-URKE4X7B.js → daemon-git-worktree-guard-BLBIBY4P.js} +44 -43
  149. package/chunks/{daemon-status-provider-KBJMZ5VU.js → daemon-status-provider-QQYQA54F.js} +53 -52
  150. package/chunks/{daemon-trust-policy-5K5J5KAL.js → daemon-trust-policy-RL42K32W.js} +50 -49
  151. package/chunks/{daemon-trust-policy-monitor-KOMAIXNG.js → daemon-trust-policy-monitor-W6A2KI3R.js} +50 -49
  152. package/chunks/{deferred-core-runtime-QNITNKSR.js → deferred-core-runtime-7IMZJYKO.js} +44 -43
  153. package/chunks/dist-ID6B4BSH.js +3901 -0
  154. package/chunks/{edit-NWFXC7XD.js → edit-XEHFRLTK.js} +34 -33
  155. package/chunks/{en-HPW4HDED.js → en-2EMGSVEU.js} +106 -0
  156. package/chunks/{enter-worktree-53CUMISV.js → enter-worktree-A2WD27HQ.js} +4 -4
  157. package/chunks/{enterPlanMode-QDDMKHKN.js → enterPlanMode-TJNAVH6W.js} +32 -31
  158. package/chunks/{environment-U5DQC4TM.js → environment-EINU6SZC.js} +46 -45
  159. package/chunks/{errors-5LSM7QXJ.js → errors-2IFCUYY5.js} +46 -45
  160. package/chunks/{execution-sandbox-config-7UDTKDKF.js → execution-sandbox-config-YE2XOT56.js} +4 -4
  161. package/chunks/{execution-tool-E56GOUSU.js → execution-tool-SZ4AURPN.js} +34 -33
  162. package/chunks/{execution-worker-Z5BHN5K5.js → execution-worker-WHSC3ZGX.js} +39 -38
  163. package/chunks/{exit-worktree-CZUYCPZ3.js → exit-worktree-S7KUQ4HO.js} +4 -4
  164. package/chunks/{exitPlanMode-KGJAK2Y4.js → exitPlanMode-PAZMVUS6.js} +32 -31
  165. package/chunks/{fast-path-PJGTPCNM.js → fast-path-W6DEVJVB.js} +2 -2
  166. package/chunks/{glob-EVTXD6VF.js → glob-WJQOKIRP.js} +33 -32
  167. package/chunks/{goal-tools-AGBJACM2.js → goal-tools-CDMDPDOI.js} +32 -31
  168. package/chunks/{grep-ENZEP6KL.js → grep-VO76ZOXG.js} +4 -4
  169. package/chunks/{handleAutoUpdate-43BIPZWM.js → handleAutoUpdate-JRPITHAS.js} +48 -47
  170. package/chunks/{i18n-24CRZK22.js → i18n-4PMXKRMM.js} +45 -44
  171. package/chunks/{image-gen-72F4XQEU.js → image-gen-GRJ73O3N.js} +6 -6
  172. package/chunks/{initializer-4DVR3OFQ.js → initializer-NHTBAZUN.js} +50 -49
  173. package/chunks/{installationInfo-ZUYQ74QC.js → installationInfo-OTUBAVXR.js} +44 -43
  174. package/chunks/{list-D4DH2YUE.js → list-OIRYDK5J.js} +52 -51
  175. package/chunks/{llm-7O2S5FZZ.js → llm-CWNQ7Z4U.js} +81 -80
  176. package/chunks/{llm-content-generator-EYG44T5V.js → llm-content-generator-5662XHRK.js} +4 -4
  177. package/chunks/{loadedSettingsAdapter-6SDUBKWT.js → loadedSettingsAdapter-E7AA2YEL.js} +50 -49
  178. package/chunks/{local-execution-environment-T3BRDBZD.js → local-execution-environment-HRGLGYYE.js} +39 -38
  179. package/chunks/{loggingContentGenerator-Y4TPIBBN.js → loggingContentGenerator-S434PEH5.js} +33 -32
  180. package/chunks/{managed-npm-update-ZWNMNX4Z.js → managed-npm-update-OLKKN32W.js} +44 -43
  181. package/chunks/{mcp-7D3UDC46.js → mcp-HHJNHR4Y.js} +50 -49
  182. package/chunks/{model-call-collection-KCCY7UXB.js → model-call-collection-CQDJ77VA.js} +1 -1
  183. package/chunks/{model-configuration-6CBTIRM4.js → model-configuration-K26C67NU.js} +51 -50
  184. package/chunks/{modelConfigUtils-CPCJMZL2.js → modelConfigUtils-OME5BXU4.js} +46 -45
  185. package/chunks/{monitor-YVEEBOJ2.js → monitor-YAWMJU7P.js} +32 -31
  186. package/chunks/{nonInteractiveCli-JUQU6XOW.js → nonInteractiveCli-MPZIO64Q.js} +84 -83
  187. package/chunks/{nonInteractiveToolExecutor-7E2KS5G3.js → nonInteractiveToolExecutor-AIM44M2P.js} +33 -32
  188. package/chunks/{notebook-edit-RKCHUGBX.js → notebook-edit-FTYD3OR2.js} +33 -32
  189. package/chunks/{omni-TBNGAJHP.js → omni-RULYOVJP.js} +14 -14
  190. package/chunks/{openaiContentGenerator-W5HZYWHH.js → openaiContentGenerator-HYNXDAHQ.js} +11 -11
  191. package/chunks/{openaiResponsesContentGenerator-XFY7636U.js → openaiResponsesContentGenerator-TK2Y64AP.js} +5 -5
  192. package/chunks/{processUtils-AKEG25VQ.js → processUtils-VKDQXNAC.js} +2 -2
  193. package/chunks/{prompt-terminal-ledger-FSAFESTR.js → prompt-terminal-ledger-BAOIS32T.js} +45 -44
  194. package/chunks/{proper-lockfile-YMJYGVGR.js → proper-lockfile-IRPL2CNM.js} +2 -1
  195. package/chunks/{pt-6FF6V764.js → pt-BM6ETOUU.js} +287 -4
  196. package/chunks/{reactive-degrade-PKHNF3KO.js → reactive-degrade-L6W5KNGV.js} +9 -9
  197. package/chunks/{read-file-E57BEGBG.js → read-file-G4G5LOGO.js} +4 -4
  198. package/chunks/{read-package-up-BNFTU7FA.js → read-package-up-MAONTKXW.js} +1 -1
  199. package/chunks/{record-source-PHBQTGL4.js → record-source-ANENC5K7.js} +3 -3
  200. package/chunks/{request-shutdown-OMWHNC3R.js → request-shutdown-LRWCJOEG.js} +2 -2
  201. package/chunks/{resumeHistoryUtils-HPJKUBOD.js → resumeHistoryUtils-ECDR2CS2.js} +49 -48
  202. package/chunks/{ripGrep-EX2NI7O3.js → ripGrep-2MEBBDSU.js} +8 -8
  203. package/chunks/{run-o1-code-serve-NOBIE4OX.js → run-o1-code-serve-PH2GYSP2.js} +37 -36
  204. package/chunks/{runtime-shell-policy-QXWSET5W.js → runtime-shell-policy-Y3TGAQLT.js} +1 -1
  205. package/chunks/{sandboxConfig-A3IJTTT4.js → sandboxConfig-ZA5EE5YP.js} +46 -45
  206. package/chunks/{scheduled-tasks-2PZSPNSI.js → scheduled-tasks-MU2VVZZA.js} +50 -49
  207. package/chunks/{scheduler-CJCTKITE.js → scheduler-3GBVAF3D.js} +46 -45
  208. package/chunks/{sdk-exporters-grpc-Q2GND2QR.js → sdk-exporters-grpc-J2ILXEUS.js} +377 -127
  209. package/chunks/{sdk-exporters-http-ALEY7IPF.js → sdk-exporters-http-HGBOA62S.js} +1 -1
  210. package/chunks/{sdk-impl-CFBASVEM.js → sdk-impl-G2NWB5MF.js} +4 -4
  211. package/chunks/{send-message-NATKTKQZ.js → send-message-QOWWQKZJ.js} +2 -2
  212. package/chunks/{serve-EWPAQLW6.js → serve-2AICGZTS.js} +50 -49
  213. package/chunks/{server-NGE2FORR.js → server-2TVKATWR.js} +92 -84
  214. package/chunks/{session-PVLA7F4T.js → session-NQKO6WQB.js} +85 -84
  215. package/chunks/{session-attachments-root-JWDXTWCG.js → session-attachments-root-SSB5ARJJ.js} +44 -43
  216. package/chunks/{session-pr-refresh-KSA4SOPP.js → session-pr-refresh-YMET6WC7.js} +49 -48
  217. package/chunks/{settings-D52DDJD6.js → settings-L3QP6XRJ.js} +49 -48
  218. package/chunks/{shell-WXVQNSMT.js → shell-BUXOKE4X.js} +32 -31
  219. package/chunks/{skill-AMXJBJ77.js → skill-Y4TKTJS7.js} +8 -7
  220. package/chunks/{skill-settings-HK2TQVCB.js → skill-settings-MRFNTHGU.js} +50 -49
  221. package/chunks/{spawnChannel-2BKO2JU3.js → spawnChannel-6YZABREF.js} +46 -45
  222. package/chunks/{standalone-update-FAISIFXV.js → standalone-update-NPL3226O.js} +47 -46
  223. package/chunks/{startInteractiveUI-GGN2B6OO.js → startInteractiveUI-SK5FABV5.js} +4408 -3325
  224. package/chunks/{task-create-A3FAT34J.js → task-create-2BHPJUF3.js} +6 -5
  225. package/chunks/{task-list-FGRDSMJZ.js → task-list-6LPOL5UB.js} +3 -2
  226. package/chunks/{task-update-BE27HYCU.js → task-update-NGKKBFU5.js} +6 -5
  227. package/chunks/{team-create-YTQ2D6AQ.js → team-create-2M2ZEJK3.js} +32 -31
  228. package/chunks/{team-delete-6T2NMHDV.js → team-delete-WBSKRFVF.js} +3 -2
  229. package/chunks/{team-plan-approval-5I5VH4DM.js → team-plan-approval-AHSBAARB.js} +32 -31
  230. package/chunks/{terminal-image-renderer-PLNIOAID.js → terminal-image-renderer-6DD2LV7J.js} +44 -43
  231. package/chunks/{theme-manager-NARRJWQY.js → theme-manager-IDMOY52V.js} +44 -43
  232. package/chunks/{tool-call-7HZFNB7J.js → tool-call-GVZHLCX6.js} +3 -3
  233. package/chunks/{tool-result-media-SVT627AG.js → tool-result-media-5BM7EQS2.js} +14 -14
  234. package/chunks/{tool-search-YFKQ6DHN.js → tool-search-MCB74V2Z.js} +6 -6
  235. package/chunks/{total-session-admission-LS7DR34W.js → total-session-admission-65EGYQPO.js} +47 -46
  236. package/chunks/{trustedFolders-GDOE6W5P.js → trustedFolders-B2SE4YQI.js} +45 -44
  237. package/chunks/{undici-5EUQ6VID.js → undici-I7LHD7IT.js} +457 -166
  238. package/chunks/{update-relaunch-FEKGARQ5.js → update-relaunch-BI3KOPOU.js} +5 -5
  239. package/chunks/{updateCheck-BKJJHSTQ.js → updateCheck-KVUQB3UY.js} +47 -46
  240. package/chunks/{upload-config-2NB472QI.js → upload-config-EALPYJRO.js} +7 -7
  241. package/chunks/{useAutoAcceptIndicator-7OUYCX3A.js → useAutoAcceptIndicator-Z2DHJUGG.js} +53 -52
  242. package/chunks/{validateNonInterActiveAuth-IRRCBNZX.js → validateNonInterActiveAuth-6TSH6F5D.js} +81 -80
  243. package/chunks/{version-J4YMGCW6.js → version-T3ODOQJ3.js} +2 -2
  244. package/chunks/{web-fetch-HMJ5ZCBP.js → web-fetch-B4MFZK5W.js} +8 -8
  245. package/chunks/{web-search-7JL754Q6.js → web-search-R3JBN6A5.js} +11 -11
  246. package/chunks/{web-shell-static-3BG3MTI5.js → web-shell-static-OOIIII74.js} +2 -2
  247. package/chunks/{workflow-L2WL3ZDX.js → workflow-WUNSCM5D.js} +33 -32
  248. package/chunks/{workspace-providers-status-BDNAQ7FG.js → workspace-providers-status-LSYGM3QX.js} +56 -55
  249. package/chunks/{workspace-registration-store-BJMDZRJN.js → workspace-registration-store-XF5KJWQP.js} +3 -2
  250. package/chunks/{workspace-registry-TYAN4F7B.js → workspace-registry-JPCXXXJR.js} +47 -46
  251. package/chunks/{workspace-runtime-coordinator-ST75S32T.js → workspace-runtime-coordinator-VEVP44OL.js} +48 -47
  252. package/chunks/{workspace-service-NXC5LXSU.js → workspace-service-VCWHIBVD.js} +55 -54
  253. package/chunks/{workspace-skills-status-CXJVMP4H.js → workspace-skills-status-TVSCRWXV.js} +53 -52
  254. package/chunks/{workspace-trust-reconciler-ZPGBWKCS.js → workspace-trust-reconciler-FP7NYY7Z.js} +53 -52
  255. package/chunks/{write-file-IRIAC5H3.js → write-file-6FNRAYPO.js} +34 -33
  256. package/chunks/{zoom-image-I26GRMX4.js → zoom-image-UOWJTYWI.js} +4 -4
  257. package/cli.js +12 -12
  258. package/execution-worker.js +1 -1
  259. package/export-transcript-document.css +1 -1
  260. package/export-transcript-document.js +3 -3
  261. package/locales/en.js +117 -0
  262. package/locales/pt.js +387 -4
  263. package/package.json +3 -3
  264. package/release-notes.json +30 -0
  265. package/vendor/o1-connect/README.md +9 -4
  266. package/vendor/o1-connect/VENDOR.json +4 -4
  267. package/vendor/o1-connect/lib.d.mts +7 -1
  268. package/vendor/o1-connect/lib.mjs +4 -3
  269. package/web-shell/assets/{abnfDiagram-VCTEODGH-Bk3CX78A.js → abnfDiagram-VCTEODGH-hPR_hq_-.js} +1 -1
  270. package/web-shell/assets/{arc-BR_nvNsB.js → arc-DBIKDXMV.js} +1 -1
  271. package/web-shell/assets/architectureDiagram-5GKGNRK7-DF6ToCyK.js +36 -0
  272. package/web-shell/assets/{blockDiagram-NRAW4CY4-BtrdWykE.js → blockDiagram-NRAW4CY4-D-3ZOodq.js} +3 -3
  273. package/web-shell/assets/c4Diagram-UCG6FXSJ-Dlgo5UYL.js +38 -0
  274. package/web-shell/assets/channel-aWi28RPH.js +1 -0
  275. package/web-shell/assets/{chunk-2Q5K7J3B-Bwd9bma4.js → chunk-2Q5K7J3B-BupVKi2M.js} +1 -1
  276. package/web-shell/assets/{chunk-5VM5RSS4-DXDhytPU.js → chunk-5VM5RSS4-I7UXEM7J.js} +1 -1
  277. package/web-shell/assets/chunk-F27PBJKO-HQNLQQK-.js +1 -0
  278. package/web-shell/assets/chunk-G27WJ6UU-1o4xDSX9.js +231 -0
  279. package/web-shell/assets/{chunk-JWPE2WC7-D4UNrq92.js → chunk-JWPE2WC7-AkJIcBLE.js} +1 -1
  280. package/web-shell/assets/chunk-LCL6LL3I-nfbDS7iE.js +206 -0
  281. package/web-shell/assets/{chunk-POPQ4Y6H-DTgfcLRJ.js → chunk-POPQ4Y6H-DtEE_OdH.js} +1 -1
  282. package/web-shell/assets/{chunk-SVP7TREG-izf3rZJp.js → chunk-SVP7TREG-Cj9Lw3Gx.js} +1 -1
  283. package/web-shell/assets/{chunk-XXDRQBXY-DljhFpef.js → chunk-XXDRQBXY-CUDuWpdQ.js} +1 -1
  284. package/web-shell/assets/classDiagram-DTDB5LWJ-fHMqSd3A.js +1 -0
  285. package/web-shell/assets/classDiagram-v2-JRS7N3AN-fHMqSd3A.js +1 -0
  286. package/web-shell/assets/cose-bilkent-JH36ORCC-DQx9CBLc.js +1 -0
  287. package/web-shell/assets/{cynefin-OW5HDTMX-Dd_PEuNo.js → cynefin-OW5HDTMX-B3kEpThT.js} +8 -8
  288. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-B1iPtQOd.js → cynefinDiagram-5FMLGOSQ-Sv-FRvME.js} +1 -1
  289. package/web-shell/assets/cytoscape.esm-OyMbaexL.js +331 -0
  290. package/web-shell/assets/{dagre-3AP2YEHR-BrvQN_6z.js → dagre-3AP2YEHR-CH_Z8-Kk.js} +1 -1
  291. package/web-shell/assets/{diagram-S7CK7UJ4-PDnxya9q.js → diagram-S7CK7UJ4-C0oToNP-.js} +1 -1
  292. package/web-shell/assets/{diagram-UQ7AKVKN-BkRMXeTB.js → diagram-UQ7AKVKN-BrSK_nkR.js} +1 -1
  293. package/web-shell/assets/{diagram-VSXAHHWV-lAiZzifg.js → diagram-VSXAHHWV-Dqa3JxKx.js} +1 -1
  294. package/web-shell/assets/diagram-VX7I27RA-CMxI_svo.js +24 -0
  295. package/web-shell/assets/{diagram-Z3DM3KII-CUjAutSP.js → diagram-Z3DM3KII-ms16iRjT.js} +1 -1
  296. package/web-shell/assets/{ebnfDiagram-PWID7BFC-ByDyIWnZ.js → ebnfDiagram-PWID7BFC-DlnqAdIV.js} +1 -1
  297. package/web-shell/assets/erDiagram-SSCWMZ5O-DLsbP_rs.js +99 -0
  298. package/web-shell/assets/{flowDiagram-A5DVABFB-Cvwsq1Bo.js → flowDiagram-A5DVABFB-CUi1Sjog.js} +4 -4
  299. package/web-shell/assets/ganttDiagram-EL5Y4UJY-CE_JUTUJ.js +292 -0
  300. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DEEdlWcc.js → gitGraphDiagram-WWUBYQGX-B5AAvDsM.js} +1 -1
  301. package/web-shell/assets/index-70D1m6Hg.js +2276 -0
  302. package/web-shell/assets/{index-CGrLBpT2.js → index-BHiSoADm.js} +1 -1
  303. package/web-shell/assets/index-CL4z8Fsq.js +74 -0
  304. package/web-shell/assets/index-CNsJ4Mpd.css +36 -0
  305. package/web-shell/assets/{infoDiagram-RXCK75RN-D1VQ_kZI.js → infoDiagram-RXCK75RN-pBmlQkcV.js} +1 -1
  306. package/web-shell/assets/ishikawaDiagram-5VMMS53U-BauoqPoz.js +70 -0
  307. package/web-shell/assets/journeyDiagram-EYS64GPL-2bt-6t-1.js +139 -0
  308. package/web-shell/assets/{kanban-definition-3QL26DDD-BUVwFNEo.js → kanban-definition-3QL26DDD-BxxoBXaj.js} +3 -3
  309. package/web-shell/assets/layout-CHPDwyF0.js +1 -0
  310. package/web-shell/assets/{linear-C4Wpe0iD.js → linear-DNvAHeqC.js} +1 -1
  311. package/web-shell/assets/mermaid.core-fypPA9cT.js +312 -0
  312. package/web-shell/assets/{mindmap-definition-FBJOCRG2-BGrDRA57.js → mindmap-definition-FBJOCRG2-6QjAwCGs.js} +3 -3
  313. package/web-shell/assets/{pegDiagram-XKGWAZYB-CXhAo2be.js → pegDiagram-XKGWAZYB-CVntv99C.js} +1 -1
  314. package/web-shell/assets/{pieDiagram-E7YTZNPT-BNPT9sa7.js → pieDiagram-E7YTZNPT-BfhvtHAE.js} +1 -1
  315. package/web-shell/assets/quadrantDiagram-AXDQQJYC-MiVxa2Zt.js +7 -0
  316. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CmEaRU9P.js → railroadDiagram-O6MQD6OU-BwHFJs0H.js} +1 -1
  317. package/web-shell/assets/requirementDiagram-EFPCY7ZU-CEJ6r2cM.js +84 -0
  318. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-BoAEtGxz.js → sankeyDiagram-P5KCCOFB-D7uTdG-j.js} +3 -3
  319. package/web-shell/assets/sequenceDiagram-WJ2MYXX4-CyW16H7w.js +162 -0
  320. package/web-shell/assets/{sizeCapture-X5ZJPWSS-EAmGoIFW.js → sizeCapture-X5ZJPWSS-zoBxvlxI.js} +1 -1
  321. package/web-shell/assets/{stateDiagram-HBIQ2CUA-BDNlELRq.js → stateDiagram-HBIQ2CUA-BceIC-cJ.js} +1 -1
  322. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BsJAvg6i.js +1 -0
  323. package/web-shell/assets/swimlanes-XN3QIQJK-QgaLP8Xo.js +1 -0
  324. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DdMnIIJX.js +8 -0
  325. package/web-shell/assets/timeline-definition-24CTP7MA-pz8DGpLO.js +120 -0
  326. package/web-shell/assets/{vennDiagram-4TSXK5OY-DF4g99lN.js → vennDiagram-4TSXK5OY-BoMnG3o9.js} +4 -4
  327. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-eonsHLeg.js → wardleyDiagram-VM6X3IG4-Bkr9hvxi.js} +2 -2
  328. package/web-shell/assets/xychartDiagram-S5SC5T6Z-Ca7YvQrU.js +7 -0
  329. package/web-shell/index.html +2 -2
  330. package/web-shell/sw.js +1 -1
  331. package/chunks/esm-QGHTLT3P.js +0 -5549
  332. package/web-shell/assets/architectureDiagram-5GKGNRK7-9N6jxIjW.js +0 -36
  333. package/web-shell/assets/c4Diagram-UCG6FXSJ-D12hT1cu.js +0 -38
  334. package/web-shell/assets/channel-CBirg-LI.js +0 -1
  335. package/web-shell/assets/chunk-F27PBJKO-D2so4bRw.js +0 -1
  336. package/web-shell/assets/chunk-G27WJ6UU-QMGf_hdg.js +0 -231
  337. package/web-shell/assets/chunk-LCL6LL3I-DvzcfF9r.js +0 -206
  338. package/web-shell/assets/classDiagram-DTDB5LWJ-OPWv8k1L.js +0 -1
  339. package/web-shell/assets/classDiagram-v2-JRS7N3AN-OPWv8k1L.js +0 -1
  340. package/web-shell/assets/cose-bilkent-JH36ORCC-CpIh97Lb.js +0 -1
  341. package/web-shell/assets/cytoscape.esm-DJK6lGiH.js +0 -331
  342. package/web-shell/assets/diagram-VX7I27RA-B6MvRJIJ.js +0 -24
  343. package/web-shell/assets/erDiagram-SSCWMZ5O-CMF9JtS6.js +0 -99
  344. package/web-shell/assets/ganttDiagram-EL5Y4UJY-BDfktaDD.js +0 -292
  345. package/web-shell/assets/index-C08mPO2E.js +0 -2276
  346. package/web-shell/assets/index-DfyXIq26.css +0 -36
  347. package/web-shell/assets/index-DohPy72Z.js +0 -74
  348. package/web-shell/assets/ishikawaDiagram-5VMMS53U-C7_B_Tul.js +0 -70
  349. package/web-shell/assets/journeyDiagram-EYS64GPL-Dzeh8Ykq.js +0 -139
  350. package/web-shell/assets/layout-CHOKfXHU.js +0 -1
  351. package/web-shell/assets/mermaid.core-m4gQMm4Q.js +0 -312
  352. package/web-shell/assets/quadrantDiagram-AXDQQJYC-DiLNHUaM.js +0 -7
  353. package/web-shell/assets/requirementDiagram-EFPCY7ZU-CTiKG6rg.js +0 -84
  354. package/web-shell/assets/sequenceDiagram-WJ2MYXX4-GBchxwdW.js +0 -162
  355. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-CQuU4s5n.js +0 -1
  356. package/web-shell/assets/swimlanes-XN3QIQJK-CBOzrWrz.js +0 -1
  357. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Bf4cDpVo.js +0 -8
  358. package/web-shell/assets/timeline-definition-24CTP7MA-0zGAApyZ.js +0 -120
  359. package/web-shell/assets/xychartDiagram-S5SC5T6Z-Cq-H1yjY.js +0 -7
@@ -7650,7 +7650,7 @@ var require_client_h1 = __commonJS({
7650
7650
  __name(onSocketClose, "onSocketClose");
7651
7651
  function clearIdleSocketValidation(socket) {
7652
7652
  if (socket[kIdleSocketValidationTimeout]) {
7653
- clearTimeout(socket[kIdleSocketValidationTimeout]);
7653
+ clearImmediate(socket[kIdleSocketValidationTimeout]);
7654
7654
  socket[kIdleSocketValidationTimeout] = null;
7655
7655
  }
7656
7656
  socket[kIdleSocketValidation] = 0;
@@ -7658,14 +7658,13 @@ var require_client_h1 = __commonJS({
7658
7658
  __name(clearIdleSocketValidation, "clearIdleSocketValidation");
7659
7659
  function scheduleIdleSocketValidation(client, socket) {
7660
7660
  socket[kIdleSocketValidation] = 1;
7661
- socket[kIdleSocketValidationTimeout] = setTimeout(() => {
7661
+ socket[kIdleSocketValidationTimeout] = setImmediate(() => {
7662
7662
  socket[kIdleSocketValidationTimeout] = null;
7663
7663
  socket[kIdleSocketValidation] = 2;
7664
7664
  if (client[kSocket] === socket && !socket.destroyed) {
7665
7665
  client[kResume]();
7666
7666
  }
7667
- }, 0);
7668
- socket[kIdleSocketValidationTimeout].unref?.();
7667
+ });
7669
7668
  }
7670
7669
  __name(scheduleIdleSocketValidation, "scheduleIdleSocketValidation");
7671
7670
  function resumeH1(client) {
@@ -8168,7 +8167,9 @@ var require_client_h2 = __commonJS({
8168
8167
  RequestAbortedError,
8169
8168
  SocketError,
8170
8169
  InformationalError,
8171
- InvalidArgumentError
8170
+ InvalidArgumentError,
8171
+ HeadersTimeoutError,
8172
+ BodyTimeoutError
8172
8173
  } = require_errors();
8173
8174
  var {
8174
8175
  kUrl,
@@ -8193,6 +8194,7 @@ var require_client_h2 = __commonJS({
8193
8194
  kHTTPContext,
8194
8195
  kClosed,
8195
8196
  kBodyTimeout,
8197
+ kHeadersTimeout,
8196
8198
  kEnableConnectProtocol,
8197
8199
  kRemoteSettings,
8198
8200
  kHTTP2Stream,
@@ -8331,7 +8333,7 @@ var require_client_h2 = __commonJS({
8331
8333
  function resumeH2(client) {
8332
8334
  const socket = client[kSocket];
8333
8335
  if (socket?.destroyed === false) {
8334
- if (client[kSize] === 0 || client[kMaxConcurrentStreams] === 0) {
8336
+ if (client[kSize] === 0) {
8335
8337
  socket.unref();
8336
8338
  client[kHTTP2Session].unref();
8337
8339
  } else {
@@ -8405,6 +8407,25 @@ var require_client_h2 = __commonJS({
8405
8407
  util.destroy(this[kSocket], err);
8406
8408
  }
8407
8409
  __name(onHttp2SessionEnd, "onHttp2SessionEnd");
8410
+ function completeRequest(client, request, resetPendingIdx = false) {
8411
+ const queue = client[kQueue];
8412
+ const runningIdx = client[kRunningIdx];
8413
+ if (runningIdx < client[kPendingIdx] && queue[runningIdx] === request) {
8414
+ queue[runningIdx] = null;
8415
+ client[kRunningIdx] = runningIdx + 1;
8416
+ return;
8417
+ }
8418
+ const index = queue.indexOf(request, runningIdx);
8419
+ if (index === -1 || index >= client[kPendingIdx]) {
8420
+ return;
8421
+ }
8422
+ queue.splice(index, 1);
8423
+ client[kPendingIdx]--;
8424
+ if (resetPendingIdx && client[kPendingIdx] < client[kRunningIdx]) {
8425
+ client[kPendingIdx] = client[kRunningIdx];
8426
+ }
8427
+ }
8428
+ __name(completeRequest, "completeRequest");
8408
8429
  function onHttp2SessionGoAway(errorCode) {
8409
8430
  const err = this[kError] || new SocketError(`HTTP/2: "GOAWAY" frame received with code ${errorCode}`, util.getSocketInfo(this[kSocket]));
8410
8431
  const client = this[kClient];
@@ -8416,7 +8437,9 @@ var require_client_h2 = __commonJS({
8416
8437
  if (client[kRunningIdx] < client[kQueue].length) {
8417
8438
  const request = client[kQueue][client[kRunningIdx]];
8418
8439
  client[kQueue][client[kRunningIdx]++] = null;
8419
- util.errorRequest(client, request, err);
8440
+ if (request != null) {
8441
+ util.errorRequest(client, request, err);
8442
+ }
8420
8443
  client[kPendingIdx] = client[kRunningIdx];
8421
8444
  }
8422
8445
  assert(client[kRunning] === 0);
@@ -8440,7 +8463,9 @@ var require_client_h2 = __commonJS({
8440
8463
  const requests = client[kQueue].splice(client[kRunningIdx]);
8441
8464
  for (let i = 0; i < requests.length; i++) {
8442
8465
  const request = requests[i];
8443
- util.errorRequest(client, request, err);
8466
+ if (request != null) {
8467
+ util.errorRequest(client, request, err);
8468
+ }
8444
8469
  }
8445
8470
  }
8446
8471
  }
@@ -8478,7 +8503,8 @@ var require_client_h2 = __commonJS({
8478
8503
  }
8479
8504
  __name(shouldSendContentLength, "shouldSendContentLength");
8480
8505
  function writeH2(client, request) {
8481
- const requestTimeout = request.bodyTimeout ?? client[kBodyTimeout];
8506
+ const headersTimeout = request.headersTimeout ?? client[kHeadersTimeout];
8507
+ const bodyTimeout = request.bodyTimeout ?? client[kBodyTimeout];
8482
8508
  const session = client[kHTTP2Session];
8483
8509
  const { method, path, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request;
8484
8510
  let { body } = request;
@@ -8526,6 +8552,7 @@ var require_client_h2 = __commonJS({
8526
8552
  stream.removeAllListeners("data");
8527
8553
  stream.close();
8528
8554
  client[kOnError](err);
8555
+ completeRequest(client, request);
8529
8556
  client[kResume]();
8530
8557
  }
8531
8558
  util.destroy(body, err);
@@ -8560,7 +8587,7 @@ var require_client_h2 = __commonJS({
8560
8587
  const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2;
8561
8588
  request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream);
8562
8589
  ++session[kOpenStreams];
8563
- client[kQueue][client[kRunningIdx]++] = null;
8590
+ completeRequest(client, request);
8564
8591
  });
8565
8592
  stream.on("error", () => {
8566
8593
  if (stream.rstCode === NGHTTP2_REFUSED_STREAM || stream.rstCode === NGHTTP2_CANCEL) {
@@ -8571,7 +8598,7 @@ var require_client_h2 = __commonJS({
8571
8598
  session[kOpenStreams] -= 1;
8572
8599
  if (session[kOpenStreams] === 0) session.unref();
8573
8600
  });
8574
- stream.setTimeout(requestTimeout);
8601
+ stream.setTimeout(headersTimeout);
8575
8602
  return true;
8576
8603
  }
8577
8604
  stream = session.request(headers, { endStream: false, signal });
@@ -8580,13 +8607,14 @@ var require_client_h2 = __commonJS({
8580
8607
  const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2;
8581
8608
  request.onUpgrade(statusCode, parseH2Headers(realHeaders), stream);
8582
8609
  ++session[kOpenStreams];
8583
- client[kQueue][client[kRunningIdx]++] = null;
8610
+ completeRequest(client, request);
8584
8611
  });
8612
+ stream.on("error", abort);
8585
8613
  stream.once("close", () => {
8586
8614
  session[kOpenStreams] -= 1;
8587
8615
  if (session[kOpenStreams] === 0) session.unref();
8588
8616
  });
8589
- stream.setTimeout(requestTimeout);
8617
+ stream.setTimeout(headersTimeout);
8590
8618
  return true;
8591
8619
  }
8592
8620
  headers[HTTP2_HEADER_PATH] = path;
@@ -8644,12 +8672,13 @@ var require_client_h2 = __commonJS({
8644
8672
  writeBodyH2();
8645
8673
  }
8646
8674
  ++session[kOpenStreams];
8647
- stream.setTimeout(requestTimeout);
8675
+ stream.setTimeout(headersTimeout);
8648
8676
  let responseReceived = false;
8649
8677
  stream.once("response", (headers2) => {
8650
8678
  const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2;
8651
8679
  request.onResponseStarted();
8652
8680
  responseReceived = true;
8681
+ stream.setTimeout(bodyTimeout);
8653
8682
  if (request.aborted) {
8654
8683
  stream.removeAllListeners("data");
8655
8684
  return;
@@ -8672,12 +8701,11 @@ var require_client_h2 = __commonJS({
8672
8701
  if (!request.aborted && !request.completed) {
8673
8702
  request.onComplete({});
8674
8703
  }
8675
- client[kQueue][client[kRunningIdx]++] = null;
8704
+ completeRequest(client, request);
8676
8705
  client[kResume]();
8677
8706
  } else {
8678
8707
  abort(new InformationalError("HTTP/2: stream half-closed (remote)"));
8679
- client[kQueue][client[kRunningIdx]++] = null;
8680
- client[kPendingIdx] = client[kRunningIdx];
8708
+ completeRequest(client, request, true);
8681
8709
  client[kResume]();
8682
8710
  }
8683
8711
  });
@@ -8687,6 +8715,9 @@ var require_client_h2 = __commonJS({
8687
8715
  if (session[kOpenStreams] === 0) {
8688
8716
  session.unref();
8689
8717
  }
8718
+ if (!request.aborted && !request.completed) {
8719
+ abort(new InformationalError("HTTP/2: stream closed before the response was complete"));
8720
+ }
8690
8721
  });
8691
8722
  stream.once("error", function(err) {
8692
8723
  stream.removeAllListeners("data");
@@ -8700,7 +8731,7 @@ var require_client_h2 = __commonJS({
8700
8731
  stream.removeAllListeners("data");
8701
8732
  });
8702
8733
  stream.on("timeout", () => {
8703
- const err = new InformationalError(`HTTP/2: "stream timeout after ${requestTimeout}"`);
8734
+ const err = responseReceived ? new BodyTimeoutError(`HTTP/2: "body timeout after ${bodyTimeout}"`) : new HeadersTimeoutError(`HTTP/2: "headers timeout after ${headersTimeout}"`);
8704
8735
  stream.removeAllListeners("data");
8705
8736
  session[kOpenStreams] -= 1;
8706
8737
  if (session[kOpenStreams] === 0) {
@@ -9211,7 +9242,9 @@ var require_client = __commonJS({
9211
9242
  const requests = this[kQueue].splice(this[kPendingIdx]);
9212
9243
  for (let i = 0; i < requests.length; i++) {
9213
9244
  const request = requests[i];
9214
- util.errorRequest(this, request, err);
9245
+ if (request != null) {
9246
+ util.errorRequest(this, request, err);
9247
+ }
9215
9248
  }
9216
9249
  const callback = /* @__PURE__ */ __name(() => {
9217
9250
  if (this[kClosedResolve]) {
@@ -9236,7 +9269,9 @@ var require_client = __commonJS({
9236
9269
  const requests = client[kQueue].splice(client[kRunningIdx]);
9237
9270
  for (let i = 0; i < requests.length; i++) {
9238
9271
  const request = requests[i];
9239
- util.errorRequest(client, request, err);
9272
+ if (request != null) {
9273
+ util.errorRequest(client, request, err);
9274
+ }
9240
9275
  }
9241
9276
  assert(client[kSize] === 0);
9242
9277
  }
@@ -9857,12 +9892,14 @@ var require_balanced_pool = __commonJS({
9857
9892
  static {
9858
9893
  __name(this, "BalancedPool");
9859
9894
  }
9860
- constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) {
9895
+ constructor(upstreams = [], { factory = defaultFactory, connect, tls, ...opts } = {}) {
9861
9896
  if (typeof factory !== "function") {
9862
9897
  throw new InvalidArgumentError("factory must be a function.");
9863
9898
  }
9864
9899
  super(opts);
9865
- this[kOptions] = { ...util.deepClone(opts) };
9900
+ if (connect && typeof connect !== "function") connect = { ...connect };
9901
+ if (tls && typeof tls !== "function") tls = { ...tls };
9902
+ this[kOptions] = { ...util.deepClone(opts), connect, tls };
9866
9903
  this[kOptions].interceptors = opts.interceptors ? { ...opts.interceptors } : void 0;
9867
9904
  this[kIndex] = -1;
9868
9905
  this[kCurrentWeight] = 0;
@@ -11430,8 +11467,13 @@ var require_retry_handler = __commonJS({
11430
11467
  onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err) {
11431
11468
  if (this.retryOpts.throwOnError) {
11432
11469
  if (this.retryOpts.statusCodes.includes(statusCode) === false) {
11433
- this.headersSent = true;
11434
- this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
11470
+ if (this.headersSent) {
11471
+ this.handler.onResponseError?.(controller, err);
11472
+ } else {
11473
+ this.headersSent = true;
11474
+ this.checkpointResponseEnd(headers);
11475
+ this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
11476
+ }
11435
11477
  } else {
11436
11478
  this.error = err;
11437
11479
  }
@@ -11439,13 +11481,19 @@ var require_retry_handler = __commonJS({
11439
11481
  }
11440
11482
  if (isDisturbed(this.opts.body)) {
11441
11483
  this.headersSent = true;
11484
+ this.checkpointResponseEnd(headers);
11442
11485
  this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
11443
11486
  return;
11444
11487
  }
11445
11488
  function shouldRetry(passedErr) {
11446
11489
  if (passedErr) {
11447
- this.headersSent = true;
11448
- this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
11490
+ if (this.headersSent) {
11491
+ this.handler.onResponseError?.(controller, passedErr);
11492
+ } else {
11493
+ this.headersSent = true;
11494
+ this.checkpointResponseEnd(headers);
11495
+ this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage);
11496
+ }
11449
11497
  controller.resume();
11450
11498
  return;
11451
11499
  }
@@ -11463,6 +11511,17 @@ var require_retry_handler = __commonJS({
11463
11511
  shouldRetry.bind(this)
11464
11512
  );
11465
11513
  }
11514
+ checkpointResponseEnd(headers) {
11515
+ if (this.end == null && this.opts.method !== "HEAD") {
11516
+ const contentLength = headers["content-length"];
11517
+ this.end = contentLength != null ? Number(contentLength) - 1 : null;
11518
+ assert(
11519
+ this.end == null || Number.isFinite(this.end),
11520
+ "invalid content-length"
11521
+ );
11522
+ this.resume = this.end != null;
11523
+ }
11524
+ }
11466
11525
  onRequestStart(controller, context) {
11467
11526
  if (!this.headersSent) {
11468
11527
  this.handler.onRequestStart?.(controller, context);
@@ -11543,8 +11602,12 @@ var require_retry_handler = __commonJS({
11543
11602
  }
11544
11603
  validatePartialResponseContentLength(headers, contentRange, statusCode, this.retryCount);
11545
11604
  const { start, size, end = size ? size - 1 : null } = contentRange;
11546
- assert(this.start === start, "content-range mismatch");
11547
- assert(this.end == null || this.end === end, "content-range mismatch");
11605
+ if (this.start !== start || this.end != null && this.end !== end) {
11606
+ throw new RequestRetryError("Content-Range mismatch", statusCode, {
11607
+ headers,
11608
+ data: { count: this.retryCount }
11609
+ });
11610
+ }
11548
11611
  return;
11549
11612
  }
11550
11613
  if (this.end == null) {
@@ -11637,7 +11700,7 @@ var require_retry_handler = __commonJS({
11637
11700
  }
11638
11701
  }
11639
11702
  onResponseError(controller, err) {
11640
- if (controller?.aborted || isDisturbed(this.opts.body)) {
11703
+ if (controller?.aborted || isDisturbed(this.opts.body) || this.headersSent && !this.resume) {
11641
11704
  this.handler.onResponseError?.(controller, err);
11642
11705
  return;
11643
11706
  }
@@ -15415,7 +15478,6 @@ var require_dump = __commonJS({
15415
15478
  #maxSize = 1024 * 1024;
15416
15479
  #dumped = false;
15417
15480
  #size = 0;
15418
- #controller = null;
15419
15481
  aborted = false;
15420
15482
  reason = false;
15421
15483
  constructor({ maxSize, signal }, handler) {
@@ -15431,7 +15493,6 @@ var require_dump = __commonJS({
15431
15493
  }
15432
15494
  onRequestStart(controller, context) {
15433
15495
  controller.abort = this.#abort.bind(this);
15434
- this.#controller = controller;
15435
15496
  return super.onRequestStart(controller, context);
15436
15497
  }
15437
15498
  onResponseStart(controller, statusCode, headers, statusMessage) {
@@ -15447,33 +15508,26 @@ var require_dump = __commonJS({
15447
15508
  return super.onResponseStart(controller, statusCode, headers, statusMessage);
15448
15509
  }
15449
15510
  onResponseError(controller, err) {
15450
- if (this.#dumped) {
15451
- return;
15452
- }
15453
- err = this.#controller?.reason ?? err;
15454
- super.onResponseError(controller, err);
15511
+ super.onResponseError(controller, this.aborted === true ? this.reason : err);
15455
15512
  }
15456
15513
  onResponseData(controller, chunk) {
15457
15514
  this.#size = this.#size + chunk.length;
15458
- if (this.#size >= this.#maxSize) {
15515
+ if (this.#size > this.#maxSize) {
15516
+ throw new RequestAbortedError(
15517
+ `Response size (${this.#size}) larger than maxSize (${this.#maxSize})`
15518
+ );
15519
+ }
15520
+ if (this.#size === this.#maxSize) {
15459
15521
  this.#dumped = true;
15460
- if (this.aborted === true) {
15461
- super.onResponseError(controller, this.reason);
15462
- } else {
15463
- super.onResponseEnd(controller, {});
15464
- }
15465
15522
  }
15466
15523
  return true;
15467
15524
  }
15468
15525
  onResponseEnd(controller, trailers) {
15469
- if (this.#dumped) {
15470
- return;
15471
- }
15472
- if (this.#controller.aborted === true) {
15526
+ if (this.aborted === true) {
15473
15527
  super.onResponseError(controller, this.reason);
15474
15528
  return;
15475
15529
  }
15476
- super.onResponseEnd(controller, trailers);
15530
+ super.onResponseEnd(controller, this.#dumped ? {} : trailers);
15477
15531
  }
15478
15532
  };
15479
15533
  function createDumpInterceptor({ maxSize: defaultMaxSize } = {
@@ -17143,6 +17197,11 @@ var require_cache_handler = __commonJS({
17143
17197
  return downstreamOnHeaders();
17144
17198
  }
17145
17199
  const cacheControlHeader = resHeaders["cache-control"];
17200
+ const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {};
17201
+ if (revalidationResponseDisallowsCachedReuse(this.#cacheType, resHeaders, cacheControlDirectives)) {
17202
+ deleteCachedValue(this.#store, this.#cacheKey);
17203
+ return downstreamOnHeaders();
17204
+ }
17146
17205
  const heuristicallyCacheable = resHeaders["last-modified"] && arrayIncludes(HEURISTICALLY_CACHEABLE_STATUS_CODES, statusCode);
17147
17206
  if (!cacheControlHeader && !resHeaders["expires"] && !heuristicallyCacheable && !this.#cacheByDefault) {
17148
17207
  if (statusCode === 304 && resHeaders.vary && isInvalidOrWildcardVaryHeader(resHeaders.vary)) {
@@ -17150,8 +17209,7 @@ var require_cache_handler = __commonJS({
17150
17209
  }
17151
17210
  return downstreamOnHeaders();
17152
17211
  }
17153
- const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {};
17154
- if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives, this.#cacheKey.headers)) {
17212
+ if (!canCacheResponse(this.#cacheType, this.#cacheKey.method, statusCode, resHeaders, cacheControlDirectives, this.#cacheKey.headers)) {
17155
17213
  if (statusCode === 304 && (cacheControlHeader || revalidationResponseDisallowsCachedReuse(this.#cacheType, resHeaders, cacheControlDirectives))) {
17156
17214
  deleteCachedValue(this.#store, this.#cacheKey);
17157
17215
  }
@@ -17316,10 +17374,13 @@ var require_cache_handler = __commonJS({
17316
17374
  }
17317
17375
  __name(deleteCachedValueIfNotModified, "deleteCachedValueIfNotModified");
17318
17376
  function revalidationResponseDisallowsCachedReuse(cacheType, resHeaders, cacheControlDirectives) {
17319
- return cacheControlDirectives["no-store"] === true || cacheType === "shared" && cacheControlDirectives.private === true || (resHeaders.vary ? isInvalidOrWildcardVaryHeader(resHeaders.vary) : false);
17377
+ return cacheControlDirectives["no-store"] === true || cacheType === "shared" && (cacheControlDirectives.private === true || Object.hasOwn(resHeaders, "set-cookie")) || (resHeaders.vary ? isInvalidOrWildcardVaryHeader(resHeaders.vary) : false);
17320
17378
  }
17321
17379
  __name(revalidationResponseDisallowsCachedReuse, "revalidationResponseDisallowsCachedReuse");
17322
- function canCacheResponse(cacheType, statusCode, resHeaders, cacheControlDirectives, reqHeaders) {
17380
+ function canCacheResponse(cacheType, method, statusCode, resHeaders, cacheControlDirectives, reqHeaders) {
17381
+ if (!arrayIncludes(util.safeHTTPMethods, method)) {
17382
+ return false;
17383
+ }
17323
17384
  if (statusCode < 200 || arrayIncludes(NOT_UNDERSTOOD_STATUS_CODES, statusCode)) {
17324
17385
  return false;
17325
17386
  }
@@ -17330,7 +17391,7 @@ var require_cache_handler = __commonJS({
17330
17391
  if (cacheControlDirectives["no-store"]) {
17331
17392
  return false;
17332
17393
  }
17333
- if (cacheType === "shared" && cacheControlDirectives.private === true) {
17394
+ if (cacheType === "shared" && (cacheControlDirectives.private === true || Object.hasOwn(resHeaders, "set-cookie"))) {
17334
17395
  return false;
17335
17396
  }
17336
17397
  if (resHeaders.vary && hasVaryStar(resHeaders.vary)) {
@@ -17887,7 +17948,7 @@ var require_cache2 = __commonJS({
17887
17948
  }
17888
17949
  __name(staleResponseRequiresRevalidation, "staleResponseRequiresRevalidation");
17889
17950
  function revalidationResponseDisallowsCachedReuse(cacheType, headers) {
17890
- if (headers.vary && isInvalidOrWildcardVaryHeader(headers.vary)) {
17951
+ if (headers.vary && isInvalidOrWildcardVaryHeader(headers.vary) || cacheType === "shared" && Object.hasOwn(headers, "set-cookie")) {
17891
17952
  return true;
17892
17953
  }
17893
17954
  const cacheControl = headers["cache-control"];
@@ -18051,6 +18112,13 @@ var require_cache2 = __commonJS({
18051
18112
  if (!result) {
18052
18113
  return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl);
18053
18114
  }
18115
+ if (globalOpts.type === "shared" && Object.hasOwn(result.headers, "set-cookie")) {
18116
+ if (util.isStream(result.body)) {
18117
+ result.body.on("error", nop).destroy();
18118
+ }
18119
+ deleteCachedValue(globalOpts.store, cacheKey);
18120
+ return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl);
18121
+ }
18054
18122
  const now = Date.now();
18055
18123
  if (now > result.deleteAt) {
18056
18124
  return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
@@ -18201,6 +18269,9 @@ var require_cache2 = __commonJS({
18201
18269
  return dispatch(opts2, handler);
18202
18270
  }
18203
18271
  const cacheKey = makeCacheKey(opts2);
18272
+ if (!arrayIncludes(util.safeHTTPMethods, opts2.method)) {
18273
+ return dispatch(opts2, new CacheHandler(globalOpts, cacheKey, handler));
18274
+ }
18204
18275
  const result = store.get(cacheKey);
18205
18276
  if (result && typeof result.then === "function") {
18206
18277
  return result.then((result2) => handleResult(
@@ -18235,7 +18306,8 @@ var require_decompress = __commonJS({
18235
18306
  "use strict";
18236
18307
  init_esbuild_shims();
18237
18308
  var { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = __require("node:zlib");
18238
- var { pipeline } = __require("node:stream");
18309
+ var { pipeline, Transform: TransformStream2 } = __require("node:stream");
18310
+ var { InvalidArgumentError, ResponseExceededMaxSizeError } = require_errors();
18239
18311
  var DecoratorHandler = require_decorator_handler();
18240
18312
  var { runtimeFeatures } = require_runtime_features();
18241
18313
  var supportedEncodings = {
@@ -18251,6 +18323,24 @@ var require_decompress = __commonJS({
18251
18323
  /** @type {const} */
18252
18324
  [204, 304]
18253
18325
  );
18326
+ var defaultMaxSize = 64 * 1024 * 1024;
18327
+ function createMaxSizeLimiter(maxSize) {
18328
+ let size = 0;
18329
+ return new TransformStream2({
18330
+ transform(chunk, _encoding, callback) {
18331
+ const decompressedSize = size + chunk.length;
18332
+ if (decompressedSize > maxSize) {
18333
+ callback(new ResponseExceededMaxSizeError(
18334
+ `Decompressed response size (${decompressedSize}) exceeded maxSize (${maxSize})`
18335
+ ));
18336
+ return;
18337
+ }
18338
+ size = decompressedSize;
18339
+ callback(null, chunk);
18340
+ }
18341
+ });
18342
+ }
18343
+ __name(createMaxSizeLimiter, "createMaxSizeLimiter");
18254
18344
  var warningEmitted = (
18255
18345
  /** @type {boolean} */
18256
18346
  false
@@ -18261,14 +18351,28 @@ var require_decompress = __commonJS({
18261
18351
  }
18262
18352
  /** @type {Transform[]} */
18263
18353
  #decompressors = [];
18354
+ /** @type {Record<string, string | string[]> | undefined} */
18355
+ #trailers;
18264
18356
  /** @type {Readonly<number[]>} */
18265
18357
  #skipStatusCodes;
18266
18358
  /** @type {boolean} */
18267
18359
  #skipErrorResponses;
18268
- constructor(handler, { skipStatusCodes = defaultSkipStatusCodes, skipErrorResponses = true } = {}) {
18360
+ /** @type {number} */
18361
+ #maxSize;
18362
+ /** @type {number} */
18363
+ #decompressedSize = 0;
18364
+ /** @type {boolean} */
18365
+ #terminated = false;
18366
+ /** @type {boolean} */
18367
+ #inputEnded = false;
18368
+ constructor(handler, { skipStatusCodes = defaultSkipStatusCodes, skipErrorResponses = true, maxSize = defaultMaxSize } = {}) {
18369
+ if (!Number.isSafeInteger(maxSize) || maxSize < 1) {
18370
+ throw new InvalidArgumentError("maxSize must be a positive integer");
18371
+ }
18269
18372
  super(handler);
18270
18373
  this.#skipStatusCodes = skipStatusCodes;
18271
18374
  this.#skipErrorResponses = skipErrorResponses;
18375
+ this.#maxSize = maxSize;
18272
18376
  }
18273
18377
  /**
18274
18378
  * Determines if decompression should be skipped based on encoding and status code
@@ -18286,7 +18390,7 @@ var require_decompress = __commonJS({
18286
18390
  * Creates a chain of decompressors for multiple content encodings
18287
18391
  *
18288
18392
  * @param {string} encodings - Comma-separated list of content encodings
18289
- * @returns {Array<DecompressorStream>} - Array of decompressor streams
18393
+ * @returns {Array<Transform>} - Array of decompressor and limiting streams
18290
18394
  * @throws {Error} - If the number of content-encodings exceeds the maximum allowed
18291
18395
  */
18292
18396
  #createDecompressionChain(encodings) {
@@ -18305,7 +18409,33 @@ var require_decompress = __commonJS({
18305
18409
  }
18306
18410
  decompressors.push(supportedEncodings[encoding]());
18307
18411
  }
18308
- return decompressors;
18412
+ if (decompressors.length < 2) {
18413
+ return decompressors;
18414
+ }
18415
+ const streams = [];
18416
+ for (let i = 0; i < decompressors.length; i++) {
18417
+ streams.push(decompressors[i]);
18418
+ if (i < decompressors.length - 1) {
18419
+ streams.push(createMaxSizeLimiter(this.#maxSize));
18420
+ }
18421
+ }
18422
+ return streams;
18423
+ }
18424
+ /**
18425
+ * Stops decompression and reports an error.
18426
+ * @param {Controller} controller - The controller to coordinate with
18427
+ * @param {Error} error - The decompression error
18428
+ * @returns {void}
18429
+ */
18430
+ #fail(controller, error) {
18431
+ if (this.#terminated) {
18432
+ return;
18433
+ }
18434
+ if (this.#inputEnded) {
18435
+ this.onResponseError(controller, error);
18436
+ } else {
18437
+ controller.abort(error);
18438
+ }
18309
18439
  }
18310
18440
  /**
18311
18441
  * Sets up event handlers for a decompressor stream using readable events
@@ -18315,8 +18445,19 @@ var require_decompress = __commonJS({
18315
18445
  */
18316
18446
  #setupDecompressorEvents(decompressor, controller) {
18317
18447
  decompressor.on("readable", () => {
18448
+ if (this.#terminated) {
18449
+ return;
18450
+ }
18318
18451
  let chunk;
18319
18452
  while ((chunk = decompressor.read()) !== null) {
18453
+ const decompressedSize = this.#decompressedSize + chunk.length;
18454
+ if (decompressedSize > this.#maxSize) {
18455
+ this.#fail(controller, new ResponseExceededMaxSizeError(
18456
+ `Decompressed response size (${decompressedSize}) exceeded maxSize (${this.#maxSize})`
18457
+ ));
18458
+ return;
18459
+ }
18460
+ this.#decompressedSize = decompressedSize;
18320
18461
  const result = super.onResponseData(controller, chunk);
18321
18462
  if (result === false) {
18322
18463
  break;
@@ -18324,7 +18465,7 @@ var require_decompress = __commonJS({
18324
18465
  }
18325
18466
  });
18326
18467
  decompressor.on("error", (error) => {
18327
- super.onResponseError(controller, error);
18468
+ this.#fail(controller, error);
18328
18469
  });
18329
18470
  }
18330
18471
  /**
@@ -18336,7 +18477,12 @@ var require_decompress = __commonJS({
18336
18477
  const decompressor = this.#decompressors[0];
18337
18478
  this.#setupDecompressorEvents(decompressor, controller);
18338
18479
  decompressor.on("end", () => {
18339
- super.onResponseEnd(controller, {});
18480
+ if (this.#terminated) {
18481
+ return;
18482
+ }
18483
+ this.#terminated = true;
18484
+ this.#cleanupDecompressors();
18485
+ super.onResponseEnd(controller, this.#trailers);
18340
18486
  });
18341
18487
  }
18342
18488
  /**
@@ -18348,11 +18494,16 @@ var require_decompress = __commonJS({
18348
18494
  const lastDecompressor = this.#decompressors[this.#decompressors.length - 1];
18349
18495
  this.#setupDecompressorEvents(lastDecompressor, controller);
18350
18496
  pipeline(this.#decompressors, (err) => {
18497
+ if (this.#terminated) {
18498
+ return;
18499
+ }
18351
18500
  if (err) {
18352
- super.onResponseError(controller, err);
18501
+ this.#fail(controller, err);
18353
18502
  return;
18354
18503
  }
18355
- super.onResponseEnd(controller, {});
18504
+ this.#terminated = true;
18505
+ this.#cleanupDecompressors();
18506
+ super.onResponseEnd(controller, this.#trailers);
18356
18507
  });
18357
18508
  }
18358
18509
  /**
@@ -18381,6 +18532,29 @@ var require_decompress = __commonJS({
18381
18532
  }
18382
18533
  this.#decompressors = decompressors;
18383
18534
  const { "content-encoding": _, "content-length": __, ...newHeaders } = headers;
18535
+ if (controller?.rawHeaders) {
18536
+ const rawHeaders = controller.rawHeaders;
18537
+ if (Array.isArray(rawHeaders)) {
18538
+ const filteredHeaders = [];
18539
+ for (let i = 0; i < rawHeaders.length; i += 2) {
18540
+ const headerName = rawHeaders[i];
18541
+ const name = Buffer.isBuffer(headerName) ? headerName.toString("latin1") : `${headerName}`;
18542
+ const lowerName = name.toLowerCase();
18543
+ if (lowerName === "content-encoding" || lowerName === "content-length") {
18544
+ continue;
18545
+ }
18546
+ filteredHeaders.push(rawHeaders[i], rawHeaders[i + 1]);
18547
+ }
18548
+ rawHeaders.splice(0, rawHeaders.length, ...filteredHeaders);
18549
+ } else if (typeof rawHeaders === "object") {
18550
+ for (const name of Object.keys(rawHeaders)) {
18551
+ const lowerName = name.toLowerCase();
18552
+ if (lowerName === "content-encoding" || lowerName === "content-length") {
18553
+ delete rawHeaders[name];
18554
+ }
18555
+ }
18556
+ }
18557
+ }
18384
18558
  if (this.#decompressors.length === 1) {
18385
18559
  this.#setupSingleDecompressor(controller);
18386
18560
  } else {
@@ -18407,8 +18581,9 @@ var require_decompress = __commonJS({
18407
18581
  */
18408
18582
  onResponseEnd(controller, trailers) {
18409
18583
  if (this.#decompressors.length > 0) {
18584
+ this.#inputEnded = true;
18585
+ this.#trailers = trailers;
18410
18586
  this.#decompressors[0].end();
18411
- this.#cleanupDecompressors();
18412
18587
  return;
18413
18588
  }
18414
18589
  super.onResponseEnd(controller, trailers);
@@ -18419,12 +18594,14 @@ var require_decompress = __commonJS({
18419
18594
  * @returns {void}
18420
18595
  */
18421
18596
  onResponseError(controller, err) {
18422
- if (this.#decompressors.length > 0) {
18423
- for (const decompressor of this.#decompressors) {
18424
- decompressor.destroy(err);
18425
- }
18426
- this.#cleanupDecompressors();
18597
+ if (this.#terminated) {
18598
+ return;
18599
+ }
18600
+ this.#terminated = true;
18601
+ for (const decompressor of this.#decompressors) {
18602
+ decompressor.destroy();
18427
18603
  }
18604
+ this.#cleanupDecompressors();
18428
18605
  super.onResponseError(controller, err);
18429
18606
  }
18430
18607
  };
@@ -24189,7 +24366,7 @@ var require_connection = __commonJS({
24189
24366
  const secProtocol = response.headersList.get("Sec-WebSocket-Protocol");
24190
24367
  if (secProtocol !== null) {
24191
24368
  const requestProtocols = getDecodeSplit("sec-websocket-protocol", request.headersList);
24192
- if (!requestProtocols.includes(secProtocol)) {
24369
+ if (requestProtocols === null || !requestProtocols.includes(secProtocol)) {
24193
24370
  failWebsocketConnection(handler, 1002, "Protocol was not set in the opening handshake.");
24194
24371
  return;
24195
24372
  }
@@ -24314,6 +24491,7 @@ var require_permessage_deflate = __commonJS({
24314
24491
  if (this.#maxPayloadSize > 0 && this.#inflate[kLength] > this.#maxPayloadSize) {
24315
24492
  callback(new MessageSizeExceededError());
24316
24493
  this.#inflate.removeAllListeners();
24494
+ this.#inflate.destroy();
24317
24495
  this.#inflate = null;
24318
24496
  return;
24319
24497
  }
@@ -25418,9 +25596,9 @@ var require_websocketstream = __commonJS({
25418
25596
  #readableStream;
25419
25597
  /** @type {ReadableStreamDefaultController} */
25420
25598
  #readableStreamController;
25421
- // Each WebSocketStream object has an associated writable stream , which is a WritableStream .
25422
- /** @type {WritableStream} */
25423
- #writableStream;
25599
+ // Retain the controller so the writable stream can be errored while locked.
25600
+ /** @type {WritableStreamDefaultController} */
25601
+ #writableStreamController;
25424
25602
  // Each WebSocketStream object has an associated boolean handshake aborted , which is initially false.
25425
25603
  #handshakeAborted = false;
25426
25604
  /** @type {import('../websocket').Handler} */
@@ -25575,12 +25753,14 @@ var require_websocketstream = __commonJS({
25575
25753
  cancel: /* @__PURE__ */ __name((reason) => this.#cancel(reason), "cancel")
25576
25754
  });
25577
25755
  const writable = new WritableStream({
25756
+ start: /* @__PURE__ */ __name((controller) => {
25757
+ this.#writableStreamController = controller;
25758
+ }, "start"),
25578
25759
  write: /* @__PURE__ */ __name((chunk) => this.#write(chunk), "write"),
25579
25760
  close: /* @__PURE__ */ __name(() => closeWebSocketConnection(this.#handler, null, null), "close"),
25580
25761
  abort: /* @__PURE__ */ __name((reason) => this.#closeUsingReason(reason), "abort")
25581
25762
  });
25582
25763
  this.#readableStream = readable;
25583
- this.#writableStream = writable;
25584
25764
  this.#openedPromise.resolve({
25585
25765
  extensions,
25586
25766
  protocol,
@@ -25624,9 +25804,7 @@ var require_websocketstream = __commonJS({
25624
25804
  const reason = result?.reason == null ? "" : utf8DecodeBytes(Buffer.from(result.reason));
25625
25805
  if (wasClean) {
25626
25806
  this.#readableStreamController.close();
25627
- if (!this.#writableStream.locked) {
25628
- this.#writableStream.abort(new DOMException("A closed WebSocketStream cannot be written to", "InvalidStateError"));
25629
- }
25807
+ this.#writableStreamController.error(new DOMException("A closed WebSocketStream cannot be written to", "InvalidStateError"));
25630
25808
  this.#closedPromise.resolve({
25631
25809
  closeCode: code,
25632
25810
  reason
@@ -25634,7 +25812,7 @@ var require_websocketstream = __commonJS({
25634
25812
  } else {
25635
25813
  const error = createUnvalidatedWebSocketError("unclean close", code, reason);
25636
25814
  this.#readableStreamController?.error(error);
25637
- this.#writableStream?.abort(error);
25815
+ this.#writableStreamController?.error(error);
25638
25816
  this.#closedPromise.reject(error);
25639
25817
  }
25640
25818
  }
@@ -25733,6 +25911,43 @@ var require_eventsource_stream = __commonJS({
25733
25911
  var CR = 13;
25734
25912
  var COLON = 58;
25735
25913
  var SPACE = 32;
25914
+ var DATA = Buffer.from("data");
25915
+ var EVENT = Buffer.from("event");
25916
+ var ID = Buffer.from("id");
25917
+ var RETRY = Buffer.from("retry");
25918
+ function isASCIINumberBytes(buffer, start) {
25919
+ if (start >= buffer.length) {
25920
+ return false;
25921
+ }
25922
+ for (let i = start; i < buffer.length; i++) {
25923
+ if (buffer[i] < 48 || buffer[i] > 57) {
25924
+ return false;
25925
+ }
25926
+ }
25927
+ return true;
25928
+ }
25929
+ __name(isASCIINumberBytes, "isASCIINumberBytes");
25930
+ function isValidLastEventIdBytes(buffer, start) {
25931
+ for (let i = start; i < buffer.length; i++) {
25932
+ if (buffer[i] === 0) {
25933
+ return false;
25934
+ }
25935
+ }
25936
+ return true;
25937
+ }
25938
+ __name(isValidLastEventIdBytes, "isValidLastEventIdBytes");
25939
+ function isFieldName(line, length, field) {
25940
+ if (length !== field.length) {
25941
+ return false;
25942
+ }
25943
+ for (let i = 0; i < length; i++) {
25944
+ if (line[i] !== field[i]) {
25945
+ return false;
25946
+ }
25947
+ }
25948
+ return true;
25949
+ }
25950
+ __name(isFieldName, "isFieldName");
25736
25951
  var EventSourceStream = class extends Transform {
25737
25952
  static {
25738
25953
  __name(this, "EventSourceStream");
@@ -25755,10 +25970,13 @@ var require_eventsource_stream = __commonJS({
25755
25970
  */
25756
25971
  eventEndCheck = false;
25757
25972
  /**
25758
- * @type {Buffer|null}
25973
+ * @type {Buffer[]}
25759
25974
  */
25760
- buffer = null;
25975
+ chunks = [];
25976
+ chunkIndex = 0;
25761
25977
  pos = 0;
25978
+ lineChunkIndex = 0;
25979
+ linePos = 0;
25762
25980
  event = {
25763
25981
  data: void 0,
25764
25982
  event: void 0,
@@ -25790,63 +26008,30 @@ var require_eventsource_stream = __commonJS({
25790
26008
  callback();
25791
26009
  return;
25792
26010
  }
25793
- if (this.buffer) {
25794
- this.buffer = Buffer.concat([this.buffer, chunk]);
25795
- } else {
25796
- this.buffer = chunk;
25797
- }
26011
+ this.chunks.push(chunk);
25798
26012
  if (this.checkBOM) {
25799
- switch (this.buffer.length) {
25800
- case 1:
25801
- if (this.buffer[0] === BOM[0]) {
25802
- callback();
25803
- return;
25804
- }
25805
- this.checkBOM = false;
25806
- callback();
25807
- return;
25808
- case 2:
25809
- if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) {
25810
- callback();
25811
- return;
25812
- }
25813
- this.checkBOM = false;
25814
- break;
25815
- case 3:
25816
- if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) {
25817
- this.buffer = Buffer.alloc(0);
25818
- this.checkBOM = false;
25819
- callback();
25820
- return;
25821
- }
25822
- this.checkBOM = false;
25823
- break;
25824
- default:
25825
- if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) {
25826
- this.buffer = this.buffer.subarray(3);
25827
- }
25828
- this.checkBOM = false;
25829
- break;
26013
+ if (this.handleBOM()) {
26014
+ callback();
26015
+ return;
25830
26016
  }
25831
26017
  }
25832
- while (this.pos < this.buffer.length) {
26018
+ while (this.hasCurrentByte()) {
26019
+ const byte = this.currentByte();
25833
26020
  if (this.eventEndCheck) {
25834
26021
  if (this.crlfCheck) {
25835
- if (this.buffer[this.pos] === LF) {
25836
- this.buffer = this.buffer.subarray(this.pos + 1);
25837
- this.pos = 0;
26022
+ if (byte === LF) {
25838
26023
  this.crlfCheck = false;
26024
+ this.consumeCurrentByte();
25839
26025
  continue;
25840
26026
  }
25841
26027
  this.crlfCheck = false;
25842
26028
  }
25843
- if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {
25844
- if (this.buffer[this.pos] === CR) {
26029
+ if (byte === LF || byte === CR) {
26030
+ if (byte === CR) {
25845
26031
  this.crlfCheck = true;
25846
26032
  }
25847
- this.buffer = this.buffer.subarray(this.pos + 1);
25848
- this.pos = 0;
25849
- if (this.event.data !== void 0 || this.event.event || this.event.id !== void 0 || this.event.retry) {
26033
+ this.consumeCurrentByte();
26034
+ if (this.hasPendingEvent()) {
25850
26035
  this.processEvent(this.event);
25851
26036
  }
25852
26037
  this.clearEvent();
@@ -25855,17 +26040,16 @@ var require_eventsource_stream = __commonJS({
25855
26040
  this.eventEndCheck = false;
25856
26041
  continue;
25857
26042
  }
25858
- if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {
25859
- if (this.buffer[this.pos] === CR) {
26043
+ if (byte === LF || byte === CR) {
26044
+ if (byte === CR) {
25860
26045
  this.crlfCheck = true;
25861
26046
  }
25862
- this.parseLine(this.buffer.subarray(0, this.pos), this.event);
25863
- this.buffer = this.buffer.subarray(this.pos + 1);
25864
- this.pos = 0;
26047
+ this.parseLine(this.readLine(), this.event);
26048
+ this.consumeCurrentByte();
25865
26049
  this.eventEndCheck = true;
25866
26050
  continue;
25867
26051
  }
25868
- this.pos++;
26052
+ this.advanceCursor();
25869
26053
  }
25870
26054
  callback();
25871
26055
  }
@@ -25881,43 +26065,42 @@ var require_eventsource_stream = __commonJS({
25881
26065
  if (colonPosition === 0) {
25882
26066
  return;
25883
26067
  }
25884
- let field = "";
25885
- let value = "";
26068
+ let fieldLength = line.length;
26069
+ let valueStart = line.length;
25886
26070
  if (colonPosition !== -1) {
25887
- field = line.subarray(0, colonPosition).toString("utf8");
25888
- let valueStart = colonPosition + 1;
26071
+ fieldLength = colonPosition;
26072
+ valueStart = colonPosition + 1;
25889
26073
  if (line[valueStart] === SPACE) {
25890
26074
  ++valueStart;
25891
26075
  }
25892
- value = line.subarray(valueStart).toString("utf8");
25893
- } else {
25894
- field = line.toString("utf8");
25895
- value = "";
25896
26076
  }
25897
- switch (field) {
25898
- case "data":
25899
- if (event[field] === void 0) {
25900
- event[field] = value;
25901
- } else {
25902
- event[field] += `
26077
+ if (isFieldName(line, fieldLength, DATA)) {
26078
+ const value = line.toString("utf8", valueStart);
26079
+ if (event.data === void 0) {
26080
+ event.data = value;
26081
+ } else {
26082
+ event.data += `
25903
26083
  ${value}`;
25904
- }
25905
- break;
25906
- case "retry":
25907
- if (isASCIINumber(value)) {
25908
- event[field] = value;
25909
- }
25910
- break;
25911
- case "id":
25912
- if (isValidLastEventId(value)) {
25913
- event[field] = value;
25914
- }
25915
- break;
25916
- case "event":
25917
- if (value.length > 0) {
25918
- event[field] = value;
25919
- }
25920
- break;
26084
+ }
26085
+ return;
26086
+ }
26087
+ if (isFieldName(line, fieldLength, RETRY)) {
26088
+ if (isASCIINumberBytes(line, valueStart)) {
26089
+ event.retry = line.toString("utf8", valueStart);
26090
+ }
26091
+ return;
26092
+ }
26093
+ if (isFieldName(line, fieldLength, ID)) {
26094
+ if (isValidLastEventIdBytes(line, valueStart)) {
26095
+ event.id = line.toString("utf8", valueStart);
26096
+ }
26097
+ return;
26098
+ }
26099
+ if (isFieldName(line, fieldLength, EVENT)) {
26100
+ const value = line.toString("utf8", valueStart);
26101
+ if (value.length > 0) {
26102
+ event.event = value;
26103
+ }
25921
26104
  }
25922
26105
  }
25923
26106
  /**
@@ -25942,12 +26125,120 @@ ${value}`;
25942
26125
  }
25943
26126
  }
25944
26127
  clearEvent() {
25945
- this.event = {
25946
- data: void 0,
25947
- event: void 0,
25948
- id: void 0,
25949
- retry: void 0
25950
- };
26128
+ this.event.data = void 0;
26129
+ this.event.event = void 0;
26130
+ this.event.id = void 0;
26131
+ this.event.retry = void 0;
26132
+ }
26133
+ hasPendingEvent() {
26134
+ return this.event.data !== void 0 || this.event.event !== void 0 || this.event.id !== void 0 || this.event.retry !== void 0;
26135
+ }
26136
+ hasCurrentByte() {
26137
+ return this.chunkIndex < this.chunks.length && this.pos < this.chunks[this.chunkIndex].length;
26138
+ }
26139
+ currentByte() {
26140
+ return this.chunks[this.chunkIndex][this.pos];
26141
+ }
26142
+ consumeCurrentByte() {
26143
+ this.advanceCursor();
26144
+ this.syncLineStartToCursor();
26145
+ }
26146
+ advanceCursor() {
26147
+ this.pos++;
26148
+ while (this.chunkIndex < this.chunks.length && this.pos >= this.chunks[this.chunkIndex].length) {
26149
+ this.chunkIndex++;
26150
+ this.pos = 0;
26151
+ }
26152
+ }
26153
+ syncLineStartToCursor() {
26154
+ this.lineChunkIndex = this.chunkIndex;
26155
+ this.linePos = this.pos;
26156
+ this.dropConsumedChunks();
26157
+ }
26158
+ dropConsumedChunks() {
26159
+ while (this.lineChunkIndex > 0) {
26160
+ this.chunks.shift();
26161
+ this.lineChunkIndex--;
26162
+ this.chunkIndex--;
26163
+ }
26164
+ if (this.chunkIndex === this.chunks.length) {
26165
+ this.chunks.length = 0;
26166
+ this.chunkIndex = 0;
26167
+ this.pos = 0;
26168
+ this.lineChunkIndex = 0;
26169
+ this.linePos = 0;
26170
+ }
26171
+ }
26172
+ readLine() {
26173
+ if (this.lineChunkIndex === this.chunkIndex) {
26174
+ return this.chunks[this.chunkIndex].subarray(this.linePos, this.pos);
26175
+ }
26176
+ const chunks = [];
26177
+ let length = 0;
26178
+ for (let i = this.lineChunkIndex; i <= this.chunkIndex; i++) {
26179
+ const chunk = this.chunks[i];
26180
+ const start = i === this.lineChunkIndex ? this.linePos : 0;
26181
+ const end = i === this.chunkIndex ? this.pos : chunk.length;
26182
+ const slice = chunk.subarray(start, end);
26183
+ length += slice.length;
26184
+ chunks.push(slice);
26185
+ }
26186
+ return Buffer.concat(chunks, length);
26187
+ }
26188
+ peekBufferedByte(offset) {
26189
+ let chunkIndex = this.lineChunkIndex;
26190
+ let pos = this.linePos;
26191
+ while (chunkIndex < this.chunks.length) {
26192
+ const chunk = this.chunks[chunkIndex];
26193
+ const remaining = chunk.length - pos;
26194
+ if (offset < remaining) {
26195
+ return chunk[pos + offset];
26196
+ }
26197
+ offset -= remaining;
26198
+ chunkIndex++;
26199
+ pos = 0;
26200
+ }
26201
+ }
26202
+ discardLeadingBytes(count) {
26203
+ while (count > 0 && this.lineChunkIndex < this.chunks.length) {
26204
+ const chunk = this.chunks[this.lineChunkIndex];
26205
+ const remaining = chunk.length - this.linePos;
26206
+ if (count < remaining) {
26207
+ this.linePos += count;
26208
+ count = 0;
26209
+ } else {
26210
+ count -= remaining;
26211
+ this.lineChunkIndex++;
26212
+ this.linePos = 0;
26213
+ }
26214
+ }
26215
+ this.chunkIndex = this.lineChunkIndex;
26216
+ this.pos = this.linePos;
26217
+ this.dropConsumedChunks();
26218
+ }
26219
+ handleBOM() {
26220
+ const first = this.peekBufferedByte(0);
26221
+ const second = this.peekBufferedByte(1);
26222
+ const third = this.peekBufferedByte(2);
26223
+ if (second === void 0) {
26224
+ if (first === BOM[0]) {
26225
+ return true;
26226
+ }
26227
+ this.checkBOM = false;
26228
+ return true;
26229
+ }
26230
+ if (third === void 0) {
26231
+ if (first === BOM[0] && second === BOM[1]) {
26232
+ return true;
26233
+ }
26234
+ this.checkBOM = false;
26235
+ return false;
26236
+ }
26237
+ if (first === BOM[0] && second === BOM[1] && third === BOM[2]) {
26238
+ this.discardLeadingBytes(3);
26239
+ }
26240
+ this.checkBOM = false;
26241
+ return !this.hasCurrentByte();
25951
26242
  }
25952
26243
  };
25953
26244
  module.exports = {