@organizaone/o1-code 0.26.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +3 -2
  2. package/bundled/qc-helper/docs/features/auto-mode.md +10 -0
  3. package/chunks/{MaxSizedBox-BT4NRHBZ.js → MaxSizedBox-KRTRIJEA.js} +25 -25
  4. package/chunks/{StandaloneSessionPicker-AB5L4OIP.js → StandaloneSessionPicker-57TP44KF.js} +41 -41
  5. package/chunks/{acp-subagent-executor-J6YQDFIY.js → acp-subagent-executor-7764VWKH.js} +28 -28
  6. package/chunks/{acpAgent-UNNKQA2R.js → acpAgent-TQRW6SNF.js} +137 -80
  7. package/chunks/{agent-4JVSTPOZ.js → agent-P7LNA44U.js} +13 -13
  8. package/chunks/{agent-headless-SQ3YMNWD.js → agent-headless-FC25Z4YM.js} +13 -13
  9. package/chunks/{all-providers-A35HOOOY.js → all-providers-IMJ6QB2I.js} +2 -2
  10. package/chunks/{anthropicContentGenerator-X6IMIHOI.js → anthropicContentGenerator-V2MYNWJ3.js} +4 -4
  11. package/chunks/{artifact-tool-6QDGNGTO.js → artifact-tool-2YUI7TMU.js} +2 -1
  12. package/chunks/{askUserQuestion-YPA2ZZLO.js → askUserQuestion-CJCXE4MK.js} +1 -1
  13. package/chunks/{bridge-RP3BQEM7.js → bridge-LELJ7HU5.js} +28 -28
  14. package/chunks/{chunk-UXFP67XM.js → chunk-2GK6MYTP.js} +4 -4
  15. package/chunks/{chunk-U7EB32Z2.js → chunk-2J7VJ3WC.js} +2 -2
  16. package/chunks/{chunk-UOG4OHEQ.js → chunk-3IRUUZTV.js} +49 -33
  17. package/chunks/{chunk-DFRZXARB.js → chunk-3Q4HEGB4.js} +2 -2
  18. package/chunks/{chunk-QU2DEIX4.js → chunk-42N5UTUK.js} +1 -1
  19. package/chunks/{chunk-7TZUSRNH.js → chunk-4INACGIR.js} +1 -1
  20. package/chunks/{chunk-B5DA6HBM.js → chunk-4UZ3FFYZ.js} +1 -1
  21. package/chunks/{chunk-SJSBSQJI.js → chunk-56HGN3XV.js} +1 -1
  22. package/chunks/{chunk-SJGCHKHG.js → chunk-5DFZNI3G.js} +8 -8
  23. package/chunks/{chunk-ZQ7TCAOB.js → chunk-5N5IZTS4.js} +6 -6
  24. package/chunks/{chunk-O6GD6SFV.js → chunk-5ONKDCZM.js} +4 -0
  25. package/chunks/{chunk-MSBLDE7B.js → chunk-5P7NQWE6.js} +6 -6
  26. package/chunks/{chunk-73UYQDL3.js → chunk-5QMNIJZ2.js} +4 -4
  27. package/chunks/{chunk-ITXHD6QG.js → chunk-6A3PCAAJ.js} +5 -5
  28. package/chunks/{chunk-B6U27UHQ.js → chunk-6LRWLIIP.js} +3 -3
  29. package/chunks/{chunk-KPRGWI4Y.js → chunk-6VHB4YQZ.js} +1 -1
  30. package/chunks/{chunk-O53S3WDY.js → chunk-6VT5UW66.js} +1 -1
  31. package/chunks/{chunk-3UIMC3MD.js → chunk-7UDEBIOM.js} +4 -4
  32. package/chunks/{chunk-KRE356Z5.js → chunk-7XELAF5M.js} +2 -2
  33. package/chunks/{chunk-UW4ZP77X.js → chunk-AEVV2DGL.js} +8 -3
  34. package/chunks/{chunk-SF7RCEDN.js → chunk-AXXXWTIX.js} +1 -1
  35. package/chunks/{chunk-BWF5HABA.js → chunk-BBHBNCB5.js} +2 -2
  36. package/chunks/{chunk-YRW7SOH4.js → chunk-BNSYZYXR.js} +43 -12
  37. package/chunks/{chunk-O7BIOEV2.js → chunk-C3UOC4LM.js} +1 -1
  38. package/chunks/{chunk-BQKZFSFW.js → chunk-CBLW5IOQ.js} +3 -3
  39. package/chunks/{chunk-44NOS72H.js → chunk-CDHOAM2E.js} +2 -2
  40. package/chunks/{chunk-UA6BRUXW.js → chunk-DKBLEAGB.js} +2 -2
  41. package/chunks/{chunk-HASGT63Y.js → chunk-DQGAJLPJ.js} +5 -5
  42. package/chunks/{chunk-WIQEF7ON.js → chunk-DV2KGLEW.js} +1 -1
  43. package/chunks/{chunk-ZME3GEAN.js → chunk-EE265U33.js} +3 -3
  44. package/chunks/{chunk-5UTAX2O6.js → chunk-EEJGIKBZ.js} +3 -3
  45. package/chunks/{chunk-QIGHINXO.js → chunk-ESGMIMHJ.js} +1 -1
  46. package/chunks/{chunk-M5BPWICM.js → chunk-EVYREOIG.js} +61 -37
  47. package/chunks/{chunk-Y24XITI5.js → chunk-FX3MQOWG.js} +24 -11
  48. package/chunks/{chunk-JDMI736Y.js → chunk-FZSAZTOI.js} +2 -2
  49. package/chunks/{chunk-2B5MRPGZ.js → chunk-GVZFZZPK.js} +9 -9
  50. package/chunks/{chunk-NUUQWXXC.js → chunk-HHXRZCTN.js} +1 -1
  51. package/chunks/{chunk-WIDNRAGK.js → chunk-HKDI4HXA.js} +2 -2
  52. package/chunks/{chunk-JYZMO5E7.js → chunk-HTH6D3WU.js} +7 -7
  53. package/chunks/{chunk-GOPTB5FL.js → chunk-IASFPTGI.js} +5 -5
  54. package/chunks/{chunk-HKWXDV5S.js → chunk-IHW6SWYM.js} +1 -1
  55. package/chunks/{chunk-76FPHNLE.js → chunk-IKGD36IH.js} +19 -18
  56. package/chunks/{chunk-A3XVGA3W.js → chunk-J6UKVQX6.js} +1 -1
  57. package/chunks/{chunk-INUPQ3V2.js → chunk-JPCQCUTS.js} +3 -3
  58. package/chunks/{chunk-BBBU4UJL.js → chunk-K7C5JCE7.js} +1 -1
  59. package/chunks/{chunk-CQPBRNKG.js → chunk-KFN7QGTC.js} +1 -1
  60. package/chunks/{chunk-LDKVV42E.js → chunk-KIHOIJMQ.js} +2 -2
  61. package/chunks/{chunk-ON5CGP6B.js → chunk-KP6VAFGI.js} +1 -1
  62. package/chunks/{chunk-T4X6ZODK.js → chunk-KRTC55S6.js} +2 -2
  63. package/chunks/{chunk-UDUKUEW5.js → chunk-KSO7FXQU.js} +4 -4
  64. package/chunks/{chunk-SU4W42KU.js → chunk-LBX7KU43.js} +2 -2
  65. package/chunks/{chunk-JKBN3WM5.js → chunk-LHP2IJ7A.js} +1 -1
  66. package/chunks/{chunk-3GZRVIU2.js → chunk-LP74MLBE.js} +2 -2
  67. package/chunks/{chunk-ITHF4F4L.js → chunk-LYWFQGEQ.js} +4 -4
  68. package/chunks/{chunk-IDOFNXOM.js → chunk-MNLPYHDS.js} +59 -11
  69. package/chunks/{chunk-LU2TTE5Y.js → chunk-MNLVE24R.js} +3 -3
  70. package/chunks/{chunk-6XC7AQHT.js → chunk-MWYTSG52.js} +83 -3
  71. package/chunks/{chunk-A2MUOMJH.js → chunk-N5TOXL3M.js} +2 -2
  72. package/chunks/{chunk-ULLCJNT5.js → chunk-N5XZKWJE.js} +1 -1
  73. package/chunks/{chunk-LGFB7Z2H.js → chunk-NRDEPGVR.js} +4 -4
  74. package/chunks/{chunk-2SKOHXQM.js → chunk-OHPK6LGA.js} +3 -3
  75. package/chunks/{chunk-FVH27ARU.js → chunk-OILOGMTY.js} +8 -8
  76. package/chunks/{chunk-QJLOQHNR.js → chunk-OKSSY3ER.js} +1 -1
  77. package/chunks/{chunk-3H6ZRETK.js → chunk-OR4LJOK3.js} +2 -2
  78. package/chunks/{chunk-6VXX63QU.js → chunk-OSCUGEQY.js} +3 -3
  79. package/chunks/{chunk-HNHCMHHY.js → chunk-OZKJJI3M.js} +3 -3
  80. package/chunks/{chunk-JVRNE7NT.js → chunk-PJOCOZLX.js} +262 -73
  81. package/chunks/{chunk-MEPWN6XC.js → chunk-PMKHXJAS.js} +1 -1
  82. package/chunks/{chunk-RLV563CG.js → chunk-POWVKJJ5.js} +1 -1
  83. package/chunks/{chunk-P5EIXSKJ.js → chunk-PQGBLD36.js} +1 -1
  84. package/chunks/{chunk-YXIMD7AK.js → chunk-PVJDGMEJ.js} +4 -4
  85. package/chunks/{chunk-YMESB5YT.js → chunk-PXOBO32R.js} +3 -3
  86. package/chunks/{chunk-6HLOPCFZ.js → chunk-PYQSQFGU.js} +1 -1
  87. package/chunks/{chunk-B7QLJKM6.js → chunk-QHMLRTHD.js} +8 -5
  88. package/chunks/{chunk-F3762QZG.js → chunk-QIFODGLE.js} +1 -1
  89. package/chunks/{chunk-BNX26EYK.js → chunk-QYXH4QO6.js} +1 -1
  90. package/chunks/{chunk-ASR3UKPL.js → chunk-R2MRYCHR.js} +5 -5
  91. package/chunks/{chunk-3UZT6L3M.js → chunk-RHP5L25J.js} +3 -3
  92. package/chunks/{chunk-GLXNABTW.js → chunk-RM54W4ER.js} +1 -1
  93. package/chunks/{chunk-AOJFG2LZ.js → chunk-S5TFGSM3.js} +10 -10
  94. package/chunks/{chunk-PUBPS6I4.js → chunk-SR7O2YDD.js} +112728 -111448
  95. package/chunks/{chunk-6TAZUYYH.js → chunk-TJ7Q4T4P.js} +1 -1
  96. package/chunks/{chunk-FGV2OPGK.js → chunk-UCSYEHMM.js} +1 -1
  97. package/chunks/{chunk-6CW53FOJ.js → chunk-VBDYNBGQ.js} +33 -0
  98. package/chunks/{chunk-OWWR2OAO.js → chunk-VJ5BVYSX.js} +1 -1
  99. package/chunks/{chunk-BNJ3IJB7.js → chunk-VLTW32Z7.js} +5 -1
  100. package/chunks/{chunk-GR257V6A.js → chunk-VM3UK3TM.js} +1 -1
  101. package/chunks/{chunk-S2HJR2FT.js → chunk-VQURYS66.js} +1 -1
  102. package/chunks/{chunk-USSMX7ZA.js → chunk-W7OUXB6F.js} +7 -7
  103. package/chunks/{chunk-EJHVUZDO.js → chunk-WKC6U3JJ.js} +1 -1
  104. package/chunks/{chunk-VMWSMIAG.js → chunk-WRF5CAXN.js} +1 -1
  105. package/chunks/{chunk-QRDZ4FN6.js → chunk-WTFO7IQM.js} +3 -3
  106. package/chunks/{chunk-3GPZEENL.js → chunk-WXIXWH7M.js} +3 -3
  107. package/chunks/{chunk-SQZJGTAP.js → chunk-X2Z2Y7GS.js} +15 -15
  108. package/chunks/{chunk-IDL5E3SK.js → chunk-X5MCTTTU.js} +1 -1
  109. package/chunks/{chunk-UKUBYF44.js → chunk-XBC4ZFXH.js} +9 -9
  110. package/chunks/{chunk-ZZYIXQMV.js → chunk-YAUL5ZQW.js} +6 -6
  111. package/chunks/{chunk-JMMAXVTG.js → chunk-YCR4JZUC.js} +2 -2
  112. package/chunks/{chunk-3NWXBIE2.js → chunk-YRYQC7GO.js} +1 -1
  113. package/chunks/{chunk-4UZHVDN6.js → chunk-Z4HXY45F.js} +1 -1
  114. package/chunks/{chunk-K5Y3DMKT.js → chunk-ZGCZQZ24.js} +23 -7
  115. package/chunks/{chunk-G6PZ7ZRF.js → chunk-ZX7J6RLA.js} +1 -1
  116. package/chunks/{codex-subagent-executor-ME2J5ZAK.js → codex-subagent-executor-IBUIGPDN.js} +28 -28
  117. package/chunks/{contextCommand-G3DP2V3O.js → contextCommand-6EFJ3QJU.js} +27 -27
  118. package/chunks/{core-runtime-GHUSNSJC.js → core-runtime-2IRY3OGU.js} +25 -25
  119. package/chunks/{create-sub-session-UEQ23VBD.js → create-sub-session-7RBPOM63.js} +1 -1
  120. package/chunks/{create-sub-session-ZVGBSQEO.js → create-sub-session-YPMC7OTH.js} +26 -26
  121. package/chunks/{daemon-git-worktree-guard-JSMTW3IM.js → daemon-git-worktree-guard-O5PEMNIJ.js} +25 -25
  122. package/chunks/{daemon-status-provider-C5NDII62.js → daemon-status-provider-HV3XFWXG.js} +33 -33
  123. package/chunks/{daemon-trust-policy-22D6WDDX.js → daemon-trust-policy-NJGWWUJF.js} +31 -31
  124. package/chunks/{daemon-trust-policy-monitor-RLYT7BZS.js → daemon-trust-policy-monitor-XDGGMLUX.js} +31 -31
  125. package/chunks/{deferred-core-runtime-KWFERRTL.js → deferred-core-runtime-QJEIQQRV.js} +25 -25
  126. package/chunks/{edit-XYXDIK5B.js → edit-DAMGKYG4.js} +15 -15
  127. package/chunks/{en-ZRJL6ZFP.js → en-FVPIFYM3.js} +1 -0
  128. package/chunks/{enterPlanMode-VQQZ2UW6.js → enterPlanMode-ZVG6QCWE.js} +13 -13
  129. package/chunks/{environment-EBFJ4TH2.js → environment-N7R6TMQF.js} +27 -27
  130. package/chunks/{errors-3B4RPL2I.js → errors-4MXYEHDC.js} +27 -27
  131. package/chunks/{execution-tool-JVQOMMTE.js → execution-tool-YKY2TRGU.js} +15 -15
  132. package/chunks/{execution-worker-JMNHLRNL.js → execution-worker-65BZHXUO.js} +18 -18
  133. package/chunks/{exitPlanMode-7MZNYWO4.js → exitPlanMode-3ONQQHEA.js} +13 -13
  134. package/chunks/{fast-path-NJVM56IM.js → fast-path-OL4RWGDQ.js} +2 -2
  135. package/chunks/{foreground-runner-LQEPDOLD.js → foreground-runner-MGGMRN3K.js} +27 -27
  136. package/chunks/{gateway-models-2M6TFLX3.js → gateway-models-NFDZZXWP.js} +3 -3
  137. package/chunks/{glob-LPOYT76M.js → glob-OIDBOW4G.js} +13 -13
  138. package/chunks/{goal-tools-RUTV37TK.js → goal-tools-DMZIYTZT.js} +13 -13
  139. package/chunks/{handleAutoUpdate-FYNNYADV.js → handleAutoUpdate-I3HSNEZY.js} +28 -28
  140. package/chunks/{i18n-QOCTCT72.js → i18n-6BLWGPIF.js} +26 -26
  141. package/chunks/{initializer-VMXV3BW6.js → initializer-3NT4PSG5.js} +31 -31
  142. package/chunks/{installationInfo-ZMTB5KY4.js → installationInfo-YFS4WR5Z.js} +25 -25
  143. package/chunks/{list-HWTHYFDH.js → list-WSW25XV4.js} +33 -33
  144. package/chunks/{list-agents-QNCQCPBU.js → list-agents-YJZPHUQG.js} +12 -2
  145. package/chunks/{llm-BSHLCKRC.js → llm-DHEJE335.js} +58 -58
  146. package/chunks/{llm-content-generator-FOOFF7NM.js → llm-content-generator-LCRFLNVM.js} +4 -4
  147. package/chunks/{loadedSettingsAdapter-DVQC5LYU.js → loadedSettingsAdapter-LZEJHSTQ.js} +31 -31
  148. package/chunks/{local-execution-environment-NIQC5LCT.js → local-execution-environment-ZPGY5MSH.js} +18 -18
  149. package/chunks/{loggingContentGenerator-KMXV7FXR.js → loggingContentGenerator-OLR57SV6.js} +15 -15
  150. package/chunks/{managed-npm-update-6NXTMHIC.js → managed-npm-update-KRSAJ37W.js} +25 -25
  151. package/chunks/{mcp-B6BEFRFC.js → mcp-BQGQ7QLI.js} +31 -31
  152. package/chunks/{model-call-collection-JGJ4TLCJ.js → model-call-collection-TVSEFAQV.js} +1 -1
  153. package/chunks/{model-configuration-HSAVOFVS.js → model-configuration-GJFGTJ5Y.js} +32 -32
  154. package/chunks/{modelConfigUtils-E7WNOMPL.js → modelConfigUtils-6CWVK6HU.js} +27 -27
  155. package/chunks/{monitor-X5SXPGKJ.js → monitor-2T7KABJD.js} +15 -14
  156. package/chunks/{nonInteractiveCli-ALN7VTV2.js → nonInteractiveCli-K4JM4ENC.js} +61 -61
  157. package/chunks/{nonInteractiveToolExecutor-EP57MOQU.js → nonInteractiveToolExecutor-5GOEPWYO.js} +14 -14
  158. package/chunks/{notebook-edit-6AJJRXJE.js → notebook-edit-DAENEK5S.js} +14 -14
  159. package/chunks/{omni-X2QDE2SC.js → omni-H42BCXPX.js} +8 -8
  160. package/chunks/{openaiContentGenerator-DGFUUNP4.js → openaiContentGenerator-EH2MHLQR.js} +125 -13
  161. package/chunks/{openaiResponsesContentGenerator-QBWIVIZ3.js → openaiResponsesContentGenerator-RQROUO3C.js} +483 -381
  162. package/chunks/{processUtils-RAKPTGL4.js → processUtils-FAIS7M3Y.js} +2 -2
  163. package/chunks/{prompt-terminal-ledger-LNMBMLKZ.js → prompt-terminal-ledger-7N4QXMSN.js} +26 -26
  164. package/chunks/{pt-2EWDZAFN.js → pt-NR7K5X64.js} +1 -0
  165. package/chunks/{reactive-degrade-2R225XZN.js → reactive-degrade-SUQLWXQ6.js} +7 -7
  166. package/chunks/{read-file-PVJ2UFNR.js → read-file-XE7ME3BR.js} +2 -2
  167. package/chunks/{record-source-ZEVZHGGT.js → record-source-6XCNP6XF.js} +2 -2
  168. package/chunks/{request-shutdown-WWNRWY6N.js → request-shutdown-6M76E2KV.js} +1 -1
  169. package/chunks/{resumeHistoryUtils-7JVBU7F6.js → resumeHistoryUtils-DUYOO4BU.js} +29 -29
  170. package/chunks/{ripGrep-SGVDEPUA.js → ripGrep-3LGQ4SE4.js} +3 -3
  171. package/chunks/{run-o1-code-serve-6YBADDNM.js → run-o1-code-serve-GDYUXK5W.js} +32 -32
  172. package/chunks/{sandboxConfig-XSRSA444.js → sandboxConfig-UOOGX443.js} +25 -25
  173. package/chunks/{scheduled-tasks-I2ERGMGX.js → scheduled-tasks-J3BZWWMO.js} +31 -31
  174. package/chunks/{scheduler-DOUZC3BT.js → scheduler-EPXMQ35M.js} +27 -27
  175. package/chunks/{send-message-ZCE2ZSEV.js → send-message-B2HM2LKH.js} +1 -1
  176. package/chunks/{serve-TWF224E6.js → serve-UUAH4RD4.js} +31 -31
  177. package/chunks/{server-QM5WDSMX.js → server-JDRC2EN6.js} +64 -69
  178. package/chunks/{session-UAA3BUYD.js → session-M6GUKX2G.js} +62 -62
  179. package/chunks/{session-YILUXNUN.js → session-Q2LHHXY4.js} +1 -1
  180. package/chunks/{session-attachments-root-7SV6ROO3.js → session-attachments-root-CCIAH6U6.js} +25 -25
  181. package/chunks/{session-pr-refresh-ZQEMZUOC.js → session-pr-refresh-GTIOMUNU.js} +30 -30
  182. package/chunks/{settings-I5BT5XJA.js → settings-SBWV33ZU.js} +30 -30
  183. package/chunks/{shell-CXFG4D26.js → shell-J4HQKVRT.js} +13 -13
  184. package/chunks/{skill-XAI4BN7B.js → skill-KI27WO4D.js} +3 -3
  185. package/chunks/{skill-settings-I6V36IWY.js → skill-settings-AYZSCDA2.js} +31 -31
  186. package/chunks/{spawnChannel-A3JN3SKE.js → spawnChannel-XXWTNIFF.js} +27 -27
  187. package/chunks/{standalone-update-665KNR5K.js → standalone-update-F7SJN6QH.js} +27 -27
  188. package/chunks/{startInteractiveUI-3SDDBRSS.js → startInteractiveUI-QBRDQBKB.js} +295 -110
  189. package/chunks/{supervisor-runner-GJZ5FZ2L.js → supervisor-runner-YREQDAAR.js} +2 -2
  190. package/chunks/{task-create-7KKOP2J2.js → task-create-AJSUW4SS.js} +2 -2
  191. package/chunks/{task-update-RDNOVBEQ.js → task-update-X65AWLX3.js} +2 -2
  192. package/chunks/{team-create-B3GZHAVJ.js → team-create-AWX3WCOX.js} +13 -13
  193. package/chunks/{team-plan-approval-AA23AXBX.js → team-plan-approval-XADKQBWB.js} +13 -13
  194. package/chunks/{terminal-image-renderer-645UO3CY.js → terminal-image-renderer-3IULS2LY.js} +25 -25
  195. package/chunks/{theme-manager-Z724NWSU.js → theme-manager-S2SNBVMH.js} +25 -25
  196. package/chunks/{tool-call-BUCHKNUE.js → tool-call-BERI4DIZ.js} +2 -2
  197. package/chunks/{tool-result-media-F3GNEFYA.js → tool-result-media-SU4PKTY5.js} +8 -8
  198. package/chunks/{tool-search-ORCJKBH7.js → tool-search-YVDXMR22.js} +7 -4
  199. package/chunks/{total-session-admission-FVSADUS4.js → total-session-admission-JXG2Y7T7.js} +28 -28
  200. package/chunks/{trustedFolders-53SWJNQM.js → trustedFolders-7IPBJUC7.js} +26 -26
  201. package/chunks/{update-relaunch-TO7RIC2Z.js → update-relaunch-NN2CBTSS.js} +5 -5
  202. package/chunks/{updateCheck-ZO65M4E7.js → updateCheck-FJQDYAG6.js} +27 -27
  203. package/chunks/{upload-config-GPGQJLHV.js → upload-config-YCM5FBRA.js} +5 -5
  204. package/chunks/{useAutoAcceptIndicator-XSYAN4MD.js → useAutoAcceptIndicator-LFIUN7PN.js} +33 -33
  205. package/chunks/{validateNonInterActiveAuth-KYRPPB7L.js → validateNonInterActiveAuth-JOX24GXO.js} +58 -58
  206. package/chunks/{version-QWEY3XDL.js → version-JFJPSBUT.js} +1 -1
  207. package/chunks/{web-fetch-QKY4VT64.js → web-fetch-K5XFX4U5.js} +34 -18
  208. package/chunks/{web-search-AMRNCSP6.js → web-search-DJOLXUKE.js} +5 -5
  209. package/chunks/{workflow-QBLEKR24.js → workflow-DDRDQXO3.js} +16 -15
  210. package/chunks/{workspace-providers-status-CH7DJDKT.js → workspace-providers-status-NYUD74M7.js} +37 -37
  211. package/chunks/{workspace-registration-store-HU2UBVSE.js → workspace-registration-store-YH4N3DDV.js} +1 -1
  212. package/chunks/{workspace-registry-PKZFC4K6.js → workspace-registry-WNJX32P3.js} +28 -28
  213. package/chunks/{workspace-runtime-coordinator-HLMOBHFQ.js → workspace-runtime-coordinator-7CBX333P.js} +29 -29
  214. package/chunks/{workspace-service-CD6JZZGR.js → workspace-service-M3HENJTA.js} +36 -36
  215. package/chunks/{workspace-skills-status-ECZGFEYZ.js → workspace-skills-status-DMRJPYZD.js} +34 -34
  216. package/chunks/{workspace-trust-reconciler-NADYMCWA.js → workspace-trust-reconciler-TWROHM3Q.js} +34 -34
  217. package/chunks/{write-file-4QSLWQJN.js → write-file-NPDFTBGT.js} +15 -15
  218. package/chunks/{zoom-image-FGAGFWD3.js → zoom-image-JIHUP4HA.js} +2 -2
  219. package/cli.js +16 -16
  220. package/execution-worker.js +1 -1
  221. package/export-transcript-document.js +1 -1
  222. package/locales/en.js +2 -0
  223. package/locales/pt.js +2 -0
  224. package/package.json +2 -2
  225. package/release-notes.json +24 -0
  226. package/web-shell/assets/{abnfDiagram-VCTEODGH-CXGkTYKR.js → abnfDiagram-VCTEODGH-CmJn1PDE.js} +1 -1
  227. package/web-shell/assets/{arc-Bgtf2wGs.js → arc-BmZjGB_w.js} +1 -1
  228. package/web-shell/assets/{architectureDiagram-5GKGNRK7-CdAnFxID.js → architectureDiagram-5GKGNRK7-DX-36I_j.js} +1 -1
  229. package/web-shell/assets/{blockDiagram-NRAW4CY4-BetLLPQA.js → blockDiagram-NRAW4CY4-DxTx3zwB.js} +1 -1
  230. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BVEDlbNL.js → c4Diagram-UCG6FXSJ-rXvYjVVs.js} +1 -1
  231. package/web-shell/assets/channel-DhUh1Prc.js +1 -0
  232. package/web-shell/assets/{chunk-2Q5K7J3B-Bu_XLqIX.js → chunk-2Q5K7J3B-DBgDB2KW.js} +1 -1
  233. package/web-shell/assets/{chunk-5VM5RSS4-CuIm-L87.js → chunk-5VM5RSS4-CoxrLXwk.js} +1 -1
  234. package/web-shell/assets/{chunk-F27PBJKO-zdnqrtCA.js → chunk-F27PBJKO-DC5NQEjf.js} +1 -1
  235. package/web-shell/assets/{chunk-G27WJ6UU-DA0j2ueI.js → chunk-G27WJ6UU-Cf3GRKgO.js} +1 -1
  236. package/web-shell/assets/{chunk-JWPE2WC7-BYP9xsTl.js → chunk-JWPE2WC7-DxsEZUOD.js} +1 -1
  237. package/web-shell/assets/{chunk-LCL6LL3I-CqZfx1I5.js → chunk-LCL6LL3I-CEQc9n40.js} +1 -1
  238. package/web-shell/assets/{chunk-POPQ4Y6H-BEYiYIxG.js → chunk-POPQ4Y6H-DsiSLluJ.js} +1 -1
  239. package/web-shell/assets/{chunk-SVP7TREG-Df7kB2kI.js → chunk-SVP7TREG-CxvHOpi6.js} +1 -1
  240. package/web-shell/assets/{chunk-XXDRQBXY-DSVwWamu.js → chunk-XXDRQBXY-CGvG4BqT.js} +1 -1
  241. package/web-shell/assets/classDiagram-DTDB5LWJ-u9x7IqO_.js +1 -0
  242. package/web-shell/assets/classDiagram-v2-JRS7N3AN-u9x7IqO_.js +1 -0
  243. package/web-shell/assets/{cose-bilkent-JH36ORCC-3y3UQaAQ.js → cose-bilkent-JH36ORCC-wq1CwvXH.js} +1 -1
  244. package/web-shell/assets/{cynefin-OW5HDTMX-D5boSC-y.js → cynefin-OW5HDTMX-CCzVtrpa.js} +1 -1
  245. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-D06h0zad.js → cynefinDiagram-5FMLGOSQ-CrsY22No.js} +1 -1
  246. package/web-shell/assets/{dagre-3AP2YEHR-B5PC4pJb.js → dagre-3AP2YEHR-Bt0t_pl2.js} +1 -1
  247. package/web-shell/assets/{diagram-S7CK7UJ4-CQkjaeF5.js → diagram-S7CK7UJ4-CgFmr50g.js} +1 -1
  248. package/web-shell/assets/{diagram-UQ7AKVKN-Dp4B8BsM.js → diagram-UQ7AKVKN-F5rdharJ.js} +1 -1
  249. package/web-shell/assets/{diagram-VSXAHHWV-1WUz-IlV.js → diagram-VSXAHHWV-CLtQI9Us.js} +1 -1
  250. package/web-shell/assets/{diagram-VX7I27RA-CVOE8dqI.js → diagram-VX7I27RA-Bvcc0y0l.js} +1 -1
  251. package/web-shell/assets/{diagram-Z3DM3KII-3gYRwIVB.js → diagram-Z3DM3KII-B0Zv86Nw.js} +1 -1
  252. package/web-shell/assets/{ebnfDiagram-PWID7BFC-tVjIWybZ.js → ebnfDiagram-PWID7BFC-Ue6Kp4zy.js} +1 -1
  253. package/web-shell/assets/{erDiagram-SSCWMZ5O-DKQv6Y6l.js → erDiagram-SSCWMZ5O-EP13tHtp.js} +1 -1
  254. package/web-shell/assets/{flowDiagram-A5DVABFB-C1aZT9uy.js → flowDiagram-A5DVABFB-DKQhXSAb.js} +1 -1
  255. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-BKVpaHRR.js → ganttDiagram-EL5Y4UJY-DOM1GL3N.js} +1 -1
  256. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-BZOhM9h_.js → gitGraphDiagram-WWUBYQGX-BXWWwMVj.js} +1 -1
  257. package/web-shell/assets/{index-CB3Jrunr.js → index-B-JFgxf_.js} +1 -1
  258. package/web-shell/assets/{index-Do4y2b4t.js → index-BySRifK6.js} +3 -3
  259. package/web-shell/assets/{infoDiagram-RXCK75RN-D1uBMMVt.js → infoDiagram-RXCK75RN-C_0yC8Ij.js} +1 -1
  260. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CEucsPqw.js → ishikawaDiagram-5VMMS53U-Cb2loNBZ.js} +1 -1
  261. package/web-shell/assets/{journeyDiagram-EYS64GPL-DZzzYLoO.js → journeyDiagram-EYS64GPL-RPQBx8RB.js} +1 -1
  262. package/web-shell/assets/{kanban-definition-3QL26DDD-C9BYwkVP.js → kanban-definition-3QL26DDD-BclR2dqV.js} +1 -1
  263. package/web-shell/assets/{layout-CsgRL45r.js → layout-SQVyFkqM.js} +1 -1
  264. package/web-shell/assets/{linear-BUq0-ZDw.js → linear-DWbtI-Pa.js} +1 -1
  265. package/web-shell/assets/{mermaid.core-D3JSOWCq.js → mermaid.core-Bm1cOFEw.js} +6 -6
  266. package/web-shell/assets/{mindmap-definition-FBJOCRG2-BLHYT_f0.js → mindmap-definition-FBJOCRG2-j9RYxk62.js} +1 -1
  267. package/web-shell/assets/{pegDiagram-XKGWAZYB-B2QHW9UX.js → pegDiagram-XKGWAZYB-B6GhUCAI.js} +1 -1
  268. package/web-shell/assets/{pieDiagram-E7YTZNPT-4QDrwUVJ.js → pieDiagram-E7YTZNPT-D7co7Zdb.js} +1 -1
  269. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-CHkz8icI.js → quadrantDiagram-AXDQQJYC-WLfkJYEi.js} +1 -1
  270. package/web-shell/assets/{railroadDiagram-O6MQD6OU-Y1UZxdd7.js → railroadDiagram-O6MQD6OU-CH6JUyt5.js} +1 -1
  271. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-B2STIEs-.js → requirementDiagram-EFPCY7ZU-dqpSnQop.js} +1 -1
  272. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-QX0whSnt.js → sankeyDiagram-P5KCCOFB-Bjm20XGX.js} +1 -1
  273. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-JSPBV6Z9.js → sequenceDiagram-WJ2MYXX4-CE1HvQ3r.js} +1 -1
  274. package/web-shell/assets/{sizeCapture-X5ZJPWSS-BHR85hzV.js → sizeCapture-X5ZJPWSS-D-jc__e7.js} +1 -1
  275. package/web-shell/assets/{stateDiagram-HBIQ2CUA-5yqdcEJk.js → stateDiagram-HBIQ2CUA-D4oPWH6C.js} +1 -1
  276. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-Cj2MLX5C.js +1 -0
  277. package/web-shell/assets/{swimlanes-XN3QIQJK-DtaoSfgY.js → swimlanes-XN3QIQJK-CxwnXXV2.js} +1 -1
  278. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Ke9hgQpA.js +8 -0
  279. package/web-shell/assets/{timeline-definition-24CTP7MA-Di2q68WC.js → timeline-definition-24CTP7MA-BF9F9CDF.js} +1 -1
  280. package/web-shell/assets/{vennDiagram-4TSXK5OY-BiIN5IkG.js → vennDiagram-4TSXK5OY-CkDMgOFv.js} +1 -1
  281. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-Cjx_SM3A.js → wardleyDiagram-VM6X3IG4-DJ2f-coT.js} +1 -1
  282. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-VAFMpQ3K.js → xychartDiagram-S5SC5T6Z-tfnnRI2D.js} +1 -1
  283. package/web-shell/index.html +1 -1
  284. package/web-shell/sw.js +1 -1
  285. package/web-shell/assets/channel-qApIjhnO.js +0 -1
  286. package/web-shell/assets/classDiagram-DTDB5LWJ-DEyyr5tF.js +0 -1
  287. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DEyyr5tF.js +0 -1
  288. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BHsx9uG6.js +0 -1
  289. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-AVscCGHh.js +0 -8
@@ -20,7 +20,7 @@ import "./chunk-WDBSTICZ.js";
20
20
  import {
21
21
  getEffectiveReasoning,
22
22
  resolveReasoningForModel
23
- } from "./chunk-B5DA6HBM.js";
23
+ } from "./chunk-4UZ3FFYZ.js";
24
24
  import "./chunk-WQU5EWE3.js";
25
25
  import "./chunk-EYKEQPKF.js";
26
26
  import {
@@ -40,7 +40,7 @@ import {
40
40
  O1CODE_STREAM_MAX_LIFETIME_MS_ENV,
41
41
  normalizeOpenAiWireBaseUrl,
42
42
  resolveRequestTimeout
43
- } from "./chunk-ZME3GEAN.js";
43
+ } from "./chunk-EE265U33.js";
44
44
  import {
45
45
  reconcileMaxTokens
46
46
  } from "./chunk-XFIAS7A6.js";
@@ -52,7 +52,7 @@ import {
52
52
  } from "./chunk-VYRPAY75.js";
53
53
  import "./chunk-S7GOFMLU.js";
54
54
  import "./chunk-RC67CA5Z.js";
55
- import "./chunk-USSMX7ZA.js";
55
+ import "./chunk-W7OUXB6F.js";
56
56
  import "./chunk-LEXKU5FI.js";
57
57
  import {
58
58
  reachesOrganizaOne
@@ -84,7 +84,379 @@ init_esbuild_shims();
84
84
 
85
85
  // packages/core/src/core/openaiResponsesContentGenerator/responses-converter.ts
86
86
  init_esbuild_shims();
87
- var debugLogger = createDebugLogger("RESPONSES_CONVERTER");
87
+
88
+ // packages/core/src/core/openaiResponsesContentGenerator/responses-reasoning-rejection.ts
89
+ init_esbuild_shims();
90
+ var debugLogger = createDebugLogger("RESPONSES_REASONING_REJECTION");
91
+ var TOOL_MEDIA_CAPTION = "(attached media from previous tool call)";
92
+ function isToolMediaFollowUp(item) {
93
+ if (typeof item !== "object" || item === null || item.type !== "message" || item.role !== "user") {
94
+ return false;
95
+ }
96
+ const content = item.content;
97
+ if (!Array.isArray(content) || content.length === 0) return false;
98
+ const first = content[0];
99
+ return isPlainObject(first) && first["type"] === "input_text" && first["text"] === TOOL_MEDIA_CAPTION;
100
+ }
101
+ __name(isToolMediaFollowUp, "isToolMediaFollowUp");
102
+ function followingCallGroup(items, index) {
103
+ const callIds = [];
104
+ for (let i = index + 1; i < items.length; i++) {
105
+ const item = items[i];
106
+ if (typeof item !== "object" || item === null || item.type !== "function_call") {
107
+ break;
108
+ }
109
+ callIds.push(item.call_id);
110
+ }
111
+ return callIds;
112
+ }
113
+ __name(followingCallGroup, "followingCallGroup");
114
+ var REJECTION_CODE = "string_above_max_length";
115
+ var PARAM_PATTERN = /^input\[(\d+)\]\.id$/;
116
+ var PARAM_REFERENCE_PATTERN = /input\[\d+\]\.id/g;
117
+ var MAXIMUM_LENGTH_PATTERN = /maximum length \d+/gi;
118
+ var SIMPLE_ESCAPES = {
119
+ '"': '"',
120
+ "\\": "\\",
121
+ "/": "/",
122
+ b: "\b",
123
+ f: "\f",
124
+ n: "\n",
125
+ r: "\r",
126
+ t: " "
127
+ };
128
+ var REPAIRABLE_CONTROLS = /* @__PURE__ */ new Set(["\n", " ", "\r"]);
129
+ var MAX_BODY_CHARS = 64e3;
130
+ var MAX_OBJECT_CANDIDATES = 32;
131
+ function parseReasoningIdRejection(status, responseBody) {
132
+ if (status !== 400) return void 0;
133
+ try {
134
+ return classify(responseBody);
135
+ } catch {
136
+ return void 0;
137
+ }
138
+ }
139
+ __name(parseReasoningIdRejection, "parseReasoningIdRejection");
140
+ function classify(responseBody) {
141
+ const text = toEnvelopeText(responseBody);
142
+ if (text === void 0) return void 0;
143
+ const envelope = readEnvelope(text, MAX_OBJECT_CANDIDATES, true);
144
+ if (!envelope) return void 0;
145
+ const error = readErrorMember(envelope.value);
146
+ if (!error) return void 0;
147
+ return matchRejection(error) ?? matchQuotedRejection(error, MAX_OBJECT_CANDIDATES - envelope.objects);
148
+ }
149
+ __name(classify, "classify");
150
+ function matchRejection(error) {
151
+ if (error["code"] !== REJECTION_CODE) return void 0;
152
+ const param = error["param"];
153
+ if (typeof param !== "string") return void 0;
154
+ const named = PARAM_PATTERN.exec(param);
155
+ if (!named) return void 0;
156
+ const index = Number(named[1]);
157
+ if (!Number.isSafeInteger(index) || index < 0) return void 0;
158
+ const message = error["message"];
159
+ return {
160
+ namedIndex: index,
161
+ maxLength: extractMaxLength(
162
+ typeof message === "string" ? message : void 0,
163
+ param
164
+ )
165
+ };
166
+ }
167
+ __name(matchRejection, "matchRejection");
168
+ function matchQuotedRejection(error, budget) {
169
+ const message = error["message"];
170
+ if (typeof message !== "string") return void 0;
171
+ const start = message.indexOf("{");
172
+ if (start < 0) return void 0;
173
+ const quoted = readEnvelope(message.slice(start), budget, false);
174
+ if (!quoted) return void 0;
175
+ const inner = readErrorMember(quoted.value);
176
+ return inner ? matchRejection(inner) : void 0;
177
+ }
178
+ __name(matchQuotedRejection, "matchQuotedRejection");
179
+ function readErrorMember(value) {
180
+ if (!isPlainObject(value)) return void 0;
181
+ const error = value["error"];
182
+ return isPlainObject(error) ? error : void 0;
183
+ }
184
+ __name(readErrorMember, "readErrorMember");
185
+ function isPlainObject(value) {
186
+ return typeof value === "object" && value !== null && !Array.isArray(value);
187
+ }
188
+ __name(isPlainObject, "isPlainObject");
189
+ function downgradeRejectedReasoningItems(items, rejection) {
190
+ const named = items[rejection.namedIndex];
191
+ if (!isReasoningItem(named)) return items;
192
+ const { maxLength } = rejection;
193
+ if (maxLength !== null && named.id.length <= maxLength) return items;
194
+ const rewritten = [];
195
+ let changed = false;
196
+ const droppedCallIds = /* @__PURE__ */ new Set();
197
+ const unitDroppedOriginals = /* @__PURE__ */ new Set();
198
+ let droppedUnits = 0;
199
+ let justDroppedUnit = false;
200
+ for (let i = 0; i < items.length; i++) {
201
+ const item = items[i];
202
+ if (typeof item === "object" && item !== null && item.type === "function_call_output" && droppedCallIds.has(item.call_id)) {
203
+ changed = true;
204
+ continue;
205
+ }
206
+ if (justDroppedUnit && isToolMediaFollowUp(item)) {
207
+ changed = true;
208
+ justDroppedUnit = false;
209
+ continue;
210
+ }
211
+ justDroppedUnit = false;
212
+ if (!isReasoningItem(item) || !exceedsMax(item, maxLength)) {
213
+ rewritten.push(item);
214
+ continue;
215
+ }
216
+ changed = true;
217
+ const summary = readSummaryTexts(item);
218
+ const unitCallIds = followingCallGroup(items, i);
219
+ if (unitCallIds.length > 0) {
220
+ for (let k = 1; k <= unitCallIds.length; k++) {
221
+ droppedCallIds.add(unitCallIds[k - 1]);
222
+ unitDroppedOriginals.add(items[i + k]);
223
+ }
224
+ i += unitCallIds.length;
225
+ droppedUnits++;
226
+ justDroppedUnit = true;
227
+ }
228
+ if (summary.length === 0) {
229
+ if (unitCallIds.length > 0) unitDroppedOriginals.add(item);
230
+ continue;
231
+ }
232
+ rewritten.push({
233
+ type: "message",
234
+ role: "assistant",
235
+ content: summary.join("\n")
236
+ });
237
+ }
238
+ const finalized = [];
239
+ for (let j = rewritten.length - 1; j >= 0; j--) {
240
+ const item = rewritten[j];
241
+ if (!isReasoningItem(item)) {
242
+ finalized.push(item);
243
+ continue;
244
+ }
245
+ const successor = items[items.indexOf(item) + 1];
246
+ if (successor === void 0 || !unitDroppedOriginals.has(successor)) {
247
+ finalized.push(item);
248
+ continue;
249
+ }
250
+ changed = true;
251
+ const summary = readSummaryTexts(item);
252
+ if (summary.length > 0) {
253
+ finalized.push({
254
+ type: "message",
255
+ role: "assistant",
256
+ content: summary.join("\n")
257
+ });
258
+ } else {
259
+ unitDroppedOriginals.add(item);
260
+ }
261
+ }
262
+ finalized.reverse();
263
+ if (droppedUnits > 0) {
264
+ debugLogger.debug(
265
+ `Downgrade removed ${droppedUnits} reasoning/call unit(s); their tool calls and results are not part of the retry.`
266
+ );
267
+ }
268
+ return changed ? finalized : items;
269
+ }
270
+ __name(downgradeRejectedReasoningItems, "downgradeRejectedReasoningItems");
271
+ function exceedsMax(item, maxLength) {
272
+ return maxLength === null || item.id.length > maxLength;
273
+ }
274
+ __name(exceedsMax, "exceedsMax");
275
+ function isReasoningItem(item) {
276
+ return typeof item === "object" && item !== null && item.type === "reasoning" && typeof item.id === "string";
277
+ }
278
+ __name(isReasoningItem, "isReasoningItem");
279
+ function readSummaryTexts(item) {
280
+ if (!Array.isArray(item.summary)) return [];
281
+ const texts = [];
282
+ for (const entry of item.summary) {
283
+ if (typeof entry === "object" && entry !== null && entry.type === "summary_text" && typeof entry.text === "string" && entry.text.length > 0) {
284
+ texts.push(entry.text);
285
+ }
286
+ }
287
+ return texts;
288
+ }
289
+ __name(readSummaryTexts, "readSummaryTexts");
290
+ function extractMaxLength(message, param) {
291
+ if (!message) return null;
292
+ const references = message.match(PARAM_REFERENCE_PATTERN);
293
+ if (!references || references.length !== 1 || references[0] !== param) {
294
+ return null;
295
+ }
296
+ const maxima = message.match(MAXIMUM_LENGTH_PATTERN);
297
+ if (!maxima || maxima.length !== 1) return null;
298
+ const digits = /\d+/.exec(maxima[0]);
299
+ if (!digits) return null;
300
+ const value = Number(digits[0]);
301
+ if (!Number.isSafeInteger(value) || value <= 0) return null;
302
+ return value;
303
+ }
304
+ __name(extractMaxLength, "extractMaxLength");
305
+ function toEnvelopeText(responseBody) {
306
+ let text;
307
+ if (typeof responseBody === "string") {
308
+ text = responseBody;
309
+ } else if (typeof responseBody === "object" && responseBody !== null && !Array.isArray(responseBody)) {
310
+ try {
311
+ text = JSON.stringify(responseBody);
312
+ } catch {
313
+ return void 0;
314
+ }
315
+ if (typeof text !== "string") return void 0;
316
+ } else {
317
+ return void 0;
318
+ }
319
+ if (text.length > MAX_BODY_CHARS) return void 0;
320
+ let start = 0;
321
+ while (start < text.length && isJsonWhitespace(text[start])) start++;
322
+ return text[start] === "{" ? text.slice(start) : void 0;
323
+ }
324
+ __name(toEnvelopeText, "toEnvelopeText");
325
+ function readEnvelope(text, budget, repairErrorMessage) {
326
+ const normalized = normalizeEnvelope(text, budget, repairErrorMessage);
327
+ if (!normalized) return void 0;
328
+ try {
329
+ return { value: JSON.parse(normalized.json), objects: normalized.objects };
330
+ } catch {
331
+ return void 0;
332
+ }
333
+ }
334
+ __name(readEnvelope, "readEnvelope");
335
+ function normalizeEnvelope(text, budget, repairErrorMessage) {
336
+ const out = [];
337
+ const stack = [];
338
+ let objects = 0;
339
+ let closed = false;
340
+ let i = 0;
341
+ while (i < text.length) {
342
+ const ch = text[i];
343
+ if (closed) {
344
+ if (!isJsonWhitespace(ch)) return void 0;
345
+ i++;
346
+ continue;
347
+ }
348
+ if (ch === '"') {
349
+ const top = stack[stack.length - 1];
350
+ const atKey = top?.object === true && top.atKey;
351
+ const repairable = repairErrorMessage && top?.object === true && !atKey && top.recognizedError && top.key === "message";
352
+ const literal = readStringLiteral(text, i, repairable);
353
+ if (!literal) return void 0;
354
+ if (top?.object && top.atKey) {
355
+ if (top.keys.has(literal.value)) return void 0;
356
+ top.keys.add(literal.value);
357
+ top.atKey = false;
358
+ top.key = literal.value;
359
+ }
360
+ out.push(literal.json);
361
+ i = literal.next;
362
+ continue;
363
+ }
364
+ if (ch === "{" || ch === "[") {
365
+ const object = ch === "{";
366
+ if (object && ++objects > budget) return void 0;
367
+ const parent = stack[stack.length - 1];
368
+ stack.push({
369
+ object,
370
+ keys: /* @__PURE__ */ new Set(),
371
+ recognizedError: object && stack.length === 1 && parent?.object === true && parent.key === "error",
372
+ atKey: object,
373
+ key: void 0
374
+ });
375
+ } else if (ch === "}" || ch === "]") {
376
+ const top = stack.pop();
377
+ if (!top || top.object !== (ch === "}")) return void 0;
378
+ if (stack.length === 0) closed = true;
379
+ } else if (ch === ",") {
380
+ const top = stack[stack.length - 1];
381
+ if (top?.object) {
382
+ top.atKey = true;
383
+ top.key = void 0;
384
+ }
385
+ }
386
+ out.push(ch);
387
+ i++;
388
+ }
389
+ if (!closed || stack.length > 0) return void 0;
390
+ return { json: out.join(""), objects };
391
+ }
392
+ __name(normalizeEnvelope, "normalizeEnvelope");
393
+ function isJsonWhitespace(ch) {
394
+ return ch === " " || ch === " " || ch === "\n" || ch === "\r";
395
+ }
396
+ __name(isJsonWhitespace, "isJsonWhitespace");
397
+ function readStringLiteral(text, start, repairable) {
398
+ let value = "";
399
+ let json = '"';
400
+ let i = start + 1;
401
+ while (i < text.length) {
402
+ const ch = text[i];
403
+ if (ch === '"') return { value, json: `${json}"`, next: i + 1 };
404
+ if (ch === "\\") {
405
+ const escape = text[i + 1];
406
+ if (escape === "u") {
407
+ const hex = text.slice(i + 2, i + 6);
408
+ if (!/^[0-9a-fA-F]{4}$/.test(hex)) return void 0;
409
+ value += String.fromCharCode(parseInt(hex, 16));
410
+ json += text.slice(i, i + 6);
411
+ i += 6;
412
+ continue;
413
+ }
414
+ const simple = escape === void 0 ? void 0 : SIMPLE_ESCAPES[escape];
415
+ if (simple === void 0) return void 0;
416
+ value += simple;
417
+ json += `\\${escape}`;
418
+ i += 2;
419
+ continue;
420
+ }
421
+ const code = ch.charCodeAt(0);
422
+ if (code < 32) {
423
+ if (!repairable || !REPAIRABLE_CONTROLS.has(ch)) return void 0;
424
+ value += ch;
425
+ json += `\\u${code.toString(16).padStart(4, "0")}`;
426
+ i++;
427
+ continue;
428
+ }
429
+ value += ch;
430
+ json += ch;
431
+ i++;
432
+ }
433
+ return void 0;
434
+ }
435
+ __name(readStringLiteral, "readStringLiteral");
436
+ function countReasoningItems(items) {
437
+ return items.filter(isReasoningItem).length;
438
+ }
439
+ __name(countReasoningItems, "countReasoningItems");
440
+ function isEncryptedReasoningRejection(status, responseBody) {
441
+ if (status !== 400 || responseBody.length > MAX_BODY_CHARS) return false;
442
+ const text = toEnvelopeText(responseBody.replace(/^data: ?/, ""));
443
+ if (!text) return false;
444
+ const envelope = readEnvelope(text, MAX_OBJECT_CANDIDATES, false);
445
+ if (!envelope || !isPlainObject(envelope.value)) return false;
446
+ const direct = readErrorMember(envelope.value);
447
+ return direct?.["code"] === "invalid_encrypted_content";
448
+ }
449
+ __name(isEncryptedReasoningRejection, "isEncryptedReasoningRejection");
450
+ function downgradeEncryptedReasoningItems(items) {
451
+ return downgradeRejectedReasoningItems(items, {
452
+ namedIndex: items.findIndex(isReasoningItem),
453
+ maxLength: null
454
+ });
455
+ }
456
+ __name(downgradeEncryptedReasoningItems, "downgradeEncryptedReasoningItems");
457
+
458
+ // packages/core/src/core/openaiResponsesContentGenerator/responses-converter.ts
459
+ var debugLogger2 = createDebugLogger("RESPONSES_CONVERTER");
88
460
  var SUPPORTED_RESPONSE_IMAGE_MIME_TYPES = /* @__PURE__ */ new Set([
89
461
  "image/jpeg",
90
462
  "image/png",
@@ -417,7 +789,7 @@ function convertGeminiContentsToResponsesInput(request, options = {}) {
417
789
  summary: part.text ? [{ type: "summary_text", text: part.text }] : []
418
790
  });
419
791
  } else if (part.text) {
420
- debugLogger.warn(
792
+ debugLogger2.warn(
421
793
  "Dropping unreplayable reasoning signature; preserving summary text as a plain message"
422
794
  );
423
795
  items.push({
@@ -474,7 +846,7 @@ function convertGeminiContentsToResponsesInput(request, options = {}) {
474
846
  });
475
847
  } else {
476
848
  const placeholderMime = placeholderMimeType(mimeType);
477
- debugLogger.warn(
849
+ debugLogger2.warn(
478
850
  `Dropping unsupported tool-result inline media type: ${placeholderMime}`
479
851
  );
480
852
  pendingToolMediaParts.push({
@@ -486,7 +858,7 @@ function convertGeminiContentsToResponsesInput(request, options = {}) {
486
858
  const placeholderMime = placeholderMimeType(
487
859
  frPart.fileData.mimeType
488
860
  );
489
- debugLogger.warn(
861
+ debugLogger2.warn(
490
862
  `Dropping unsupported tool-result file reference: ${placeholderMime}`
491
863
  );
492
864
  pendingToolMediaParts.push({
@@ -536,400 +908,130 @@ function convertGeminiContentsToResponsesInput(request, options = {}) {
536
908
  content: [
537
909
  {
538
910
  type: "input_text",
539
- text: "(attached media from previous tool call)"
911
+ text: TOOL_MEDIA_CAPTION
540
912
  },
541
913
  ...pendingToolMediaParts
542
914
  ]
543
- });
544
- }
545
- }
546
- return { instructions, input: items };
547
- }
548
- __name(convertGeminiContentsToResponsesInput, "convertGeminiContentsToResponsesInput");
549
- function cleanOrphanedFunctionCalls(items) {
550
- const callIds = /* @__PURE__ */ new Set();
551
- const outputCallIds = /* @__PURE__ */ new Set();
552
- for (const item of items) {
553
- if (typeof item !== "object" || item === null || !("type" in item)) {
554
- continue;
555
- }
556
- if (item.type === "function_call" && "call_id" in item) {
557
- callIds.add(item.call_id);
558
- } else if (item.type === "function_call_output" && "call_id" in item) {
559
- outputCallIds.add(item.call_id);
560
- }
561
- }
562
- return items.filter((item) => {
563
- if (typeof item !== "object" || item === null || !("type" in item)) {
564
- return true;
565
- }
566
- if (item.type === "function_call" && "call_id" in item) {
567
- return outputCallIds.has(item.call_id);
568
- }
569
- if (item.type === "function_call_output" && "call_id" in item) {
570
- return callIds.has(item.call_id);
571
- }
572
- return true;
573
- });
574
- }
575
- __name(cleanOrphanedFunctionCalls, "cleanOrphanedFunctionCalls");
576
- function convertGeminiToolsToResponsesTools(request) {
577
- const tools = request.config?.tools;
578
- if (!tools || !Array.isArray(tools)) return void 0;
579
- const result = [];
580
- for (const tool of tools) {
581
- if (typeof tool !== "object" || tool === null) continue;
582
- const funcDecls = "functionDeclarations" in tool ? tool.functionDeclarations : void 0;
583
- if (!Array.isArray(funcDecls)) continue;
584
- for (const func of funcDecls) {
585
- if (!func.name) continue;
586
- result.push({
587
- type: "function",
588
- name: func.name,
589
- description: func.description,
590
- parameters: normalizeResponsesParameters(
591
- // Prefer parametersJsonSchema (raw JSON Schema, e.g. MCP/extension
592
- // tools) and fall back to parameters, matching the Chat and
593
- // Anthropic sibling wires — @google/genai allows both fields at
594
- // once, and preferring `parameters` here would send a different,
595
- // potentially lossier schema than the siblings for identical config.
596
- func.parametersJsonSchema ?? func.parameters
597
- )
598
- });
599
- }
600
- }
601
- return result.length > 0 ? result : void 0;
602
- }
603
- __name(convertGeminiToolsToResponsesTools, "convertGeminiToolsToResponsesTools");
604
- function normalizeResponsesParameters(schema) {
605
- if (schema === void 0) return void 0;
606
- if (schema === null || typeof schema !== "object") return schema;
607
- return normalizeResponsesSchemaNode(schema);
608
- }
609
- __name(normalizeResponsesParameters, "normalizeResponsesParameters");
610
- function normalizeResponsesSchemaNode(node) {
611
- if (Array.isArray(node)) {
612
- return node.map((item) => normalizeResponsesSchemaNode(item));
613
- }
614
- if (!node || typeof node !== "object") return node;
615
- const out = {
616
- ...node
617
- };
618
- if (out["properties"] && typeof out["properties"] === "object") {
619
- const props = out["properties"];
620
- const nextProps = {};
621
- for (const [k, v] of Object.entries(props)) {
622
- nextProps[k] = normalizeResponsesSchemaNode(v);
623
- }
624
- out["properties"] = nextProps;
625
- }
626
- if (out["items"]) {
627
- out["items"] = normalizeResponsesSchemaNode(out["items"]);
628
- }
629
- for (const key of ["anyOf", "oneOf", "allOf"]) {
630
- const v = out[key];
631
- if (Array.isArray(v)) {
632
- out[key] = v.map((item) => normalizeResponsesSchemaNode(item));
633
- }
634
- }
635
- if (out["type"] === "object" && out["properties"] === void 0) {
636
- out["properties"] = {};
637
- }
638
- return out;
639
- }
640
- __name(normalizeResponsesSchemaNode, "normalizeResponsesSchemaNode");
641
-
642
- // packages/core/src/core/openaiResponsesContentGenerator/responses-reasoning-rejection.ts
643
- init_esbuild_shims();
644
- var REJECTION_CODE = "string_above_max_length";
645
- var PARAM_PATTERN = /^input\[(\d+)\]\.id$/;
646
- var PARAM_REFERENCE_PATTERN = /input\[\d+\]\.id/g;
647
- var MAXIMUM_LENGTH_PATTERN = /maximum length \d+/gi;
648
- var SIMPLE_ESCAPES = {
649
- '"': '"',
650
- "\\": "\\",
651
- "/": "/",
652
- b: "\b",
653
- f: "\f",
654
- n: "\n",
655
- r: "\r",
656
- t: " "
657
- };
658
- var REPAIRABLE_CONTROLS = /* @__PURE__ */ new Set(["\n", " ", "\r"]);
659
- var MAX_BODY_CHARS = 64e3;
660
- var MAX_OBJECT_CANDIDATES = 32;
661
- function parseReasoningIdRejection(status, responseBody) {
662
- if (status !== 400) return void 0;
663
- try {
664
- return classify(responseBody);
665
- } catch {
666
- return void 0;
667
- }
668
- }
669
- __name(parseReasoningIdRejection, "parseReasoningIdRejection");
670
- function classify(responseBody) {
671
- const text = toEnvelopeText(responseBody);
672
- if (text === void 0) return void 0;
673
- const envelope = readEnvelope(text, MAX_OBJECT_CANDIDATES, true);
674
- if (!envelope) return void 0;
675
- const error = readErrorMember(envelope.value);
676
- if (!error) return void 0;
677
- return matchRejection(error) ?? matchQuotedRejection(error, MAX_OBJECT_CANDIDATES - envelope.objects);
678
- }
679
- __name(classify, "classify");
680
- function matchRejection(error) {
681
- if (error["code"] !== REJECTION_CODE) return void 0;
682
- const param = error["param"];
683
- if (typeof param !== "string") return void 0;
684
- const named = PARAM_PATTERN.exec(param);
685
- if (!named) return void 0;
686
- const index = Number(named[1]);
687
- if (!Number.isSafeInteger(index) || index < 0) return void 0;
688
- const message = error["message"];
689
- return {
690
- namedIndex: index,
691
- maxLength: extractMaxLength(
692
- typeof message === "string" ? message : void 0,
693
- param
694
- )
695
- };
696
- }
697
- __name(matchRejection, "matchRejection");
698
- function matchQuotedRejection(error, budget) {
699
- const message = error["message"];
700
- if (typeof message !== "string") return void 0;
701
- const start = message.indexOf("{");
702
- if (start < 0) return void 0;
703
- const quoted = readEnvelope(message.slice(start), budget, false);
704
- if (!quoted) return void 0;
705
- const inner = readErrorMember(quoted.value);
706
- return inner ? matchRejection(inner) : void 0;
707
- }
708
- __name(matchQuotedRejection, "matchQuotedRejection");
709
- function readErrorMember(value) {
710
- if (!isPlainObject(value)) return void 0;
711
- const error = value["error"];
712
- return isPlainObject(error) ? error : void 0;
713
- }
714
- __name(readErrorMember, "readErrorMember");
715
- function isPlainObject(value) {
716
- return typeof value === "object" && value !== null && !Array.isArray(value);
717
- }
718
- __name(isPlainObject, "isPlainObject");
719
- function downgradeRejectedReasoningItems(items, rejection) {
720
- const named = items[rejection.namedIndex];
721
- if (!isReasoningItem(named)) return items;
722
- const { maxLength } = rejection;
723
- if (maxLength !== null && named.id.length <= maxLength) return items;
724
- const rewritten = [];
725
- let changed = false;
726
- for (const item of items) {
727
- if (!isReasoningItem(item) || !exceedsMax(item, maxLength)) {
728
- rewritten.push(item);
729
- continue;
915
+ });
730
916
  }
731
- changed = true;
732
- const summary = readSummaryTexts(item);
733
- if (summary.length === 0) continue;
734
- rewritten.push({
735
- type: "message",
736
- role: "assistant",
737
- content: summary.join("\n")
738
- });
739
917
  }
740
- return changed ? rewritten : items;
741
- }
742
- __name(downgradeRejectedReasoningItems, "downgradeRejectedReasoningItems");
743
- function exceedsMax(item, maxLength) {
744
- return maxLength === null || item.id.length > maxLength;
745
- }
746
- __name(exceedsMax, "exceedsMax");
747
- function isReasoningItem(item) {
748
- return typeof item === "object" && item !== null && item.type === "reasoning" && typeof item.id === "string";
918
+ return { instructions, input: items };
749
919
  }
750
- __name(isReasoningItem, "isReasoningItem");
751
- function readSummaryTexts(item) {
752
- if (!Array.isArray(item.summary)) return [];
753
- const texts = [];
754
- for (const entry of item.summary) {
755
- if (typeof entry === "object" && entry !== null && entry.type === "summary_text" && typeof entry.text === "string" && entry.text.length > 0) {
756
- texts.push(entry.text);
920
+ __name(convertGeminiContentsToResponsesInput, "convertGeminiContentsToResponsesInput");
921
+ function cleanOrphanedFunctionCalls(items) {
922
+ const callIds = /* @__PURE__ */ new Set();
923
+ const outputCallIds = /* @__PURE__ */ new Set();
924
+ for (const item of items) {
925
+ if (typeof item !== "object" || item === null || !("type" in item)) {
926
+ continue;
757
927
  }
758
- }
759
- return texts;
760
- }
761
- __name(readSummaryTexts, "readSummaryTexts");
762
- function extractMaxLength(message, param) {
763
- if (!message) return null;
764
- const references = message.match(PARAM_REFERENCE_PATTERN);
765
- if (!references || references.length !== 1 || references[0] !== param) {
766
- return null;
767
- }
768
- const maxima = message.match(MAXIMUM_LENGTH_PATTERN);
769
- if (!maxima || maxima.length !== 1) return null;
770
- const digits = /\d+/.exec(maxima[0]);
771
- if (!digits) return null;
772
- const value = Number(digits[0]);
773
- if (!Number.isSafeInteger(value) || value <= 0) return null;
774
- return value;
775
- }
776
- __name(extractMaxLength, "extractMaxLength");
777
- function toEnvelopeText(responseBody) {
778
- let text;
779
- if (typeof responseBody === "string") {
780
- text = responseBody;
781
- } else if (typeof responseBody === "object" && responseBody !== null && !Array.isArray(responseBody)) {
782
- try {
783
- text = JSON.stringify(responseBody);
784
- } catch {
785
- return void 0;
928
+ if (item.type === "function_call" && "call_id" in item) {
929
+ callIds.add(item.call_id);
930
+ } else if (item.type === "function_call_output" && "call_id" in item) {
931
+ outputCallIds.add(item.call_id);
786
932
  }
787
- if (typeof text !== "string") return void 0;
788
- } else {
789
- return void 0;
790
- }
791
- if (text.length > MAX_BODY_CHARS) return void 0;
792
- let start = 0;
793
- while (start < text.length && isJsonWhitespace(text[start])) start++;
794
- return text[start] === "{" ? text.slice(start) : void 0;
795
- }
796
- __name(toEnvelopeText, "toEnvelopeText");
797
- function readEnvelope(text, budget, repairErrorMessage) {
798
- const normalized = normalizeEnvelope(text, budget, repairErrorMessage);
799
- if (!normalized) return void 0;
800
- try {
801
- return { value: JSON.parse(normalized.json), objects: normalized.objects };
802
- } catch {
803
- return void 0;
804
933
  }
805
- }
806
- __name(readEnvelope, "readEnvelope");
807
- function normalizeEnvelope(text, budget, repairErrorMessage) {
808
- const out = [];
809
- const stack = [];
810
- let objects = 0;
811
- let closed = false;
812
- let i = 0;
813
- while (i < text.length) {
814
- const ch = text[i];
815
- if (closed) {
816
- if (!isJsonWhitespace(ch)) return void 0;
817
- i++;
934
+ const isReasoning = /* @__PURE__ */ __name((item) => typeof item === "object" && item !== null && "type" in item && item.type === "reasoning", "isReasoning");
935
+ const kept = [];
936
+ for (let i = 0; i < items.length; i++) {
937
+ const item = items[i];
938
+ if (typeof item !== "object" || item === null || !("type" in item)) {
939
+ kept.push(item);
818
940
  continue;
819
941
  }
820
- if (ch === '"') {
821
- const top = stack[stack.length - 1];
822
- const atKey = top?.object === true && top.atKey;
823
- const repairable = repairErrorMessage && top?.object === true && !atKey && top.recognizedError && top.key === "message";
824
- const literal = readStringLiteral(text, i, repairable);
825
- if (!literal) return void 0;
826
- if (top?.object && top.atKey) {
827
- if (top.keys.has(literal.value)) return void 0;
828
- top.keys.add(literal.value);
829
- top.atKey = false;
830
- top.key = literal.value;
942
+ if (item.type === "function_call" && "call_id" in item) {
943
+ if (outputCallIds.has(item.call_id)) {
944
+ kept.push(item);
831
945
  }
832
- out.push(literal.json);
833
- i = literal.next;
834
946
  continue;
835
947
  }
836
- if (ch === "{" || ch === "[") {
837
- const object = ch === "{";
838
- if (object && ++objects > budget) return void 0;
839
- const parent = stack[stack.length - 1];
840
- stack.push({
841
- object,
842
- keys: /* @__PURE__ */ new Set(),
843
- recognizedError: object && stack.length === 1 && parent?.object === true && parent.key === "error",
844
- atKey: object,
845
- key: void 0
846
- });
847
- } else if (ch === "}" || ch === "]") {
848
- const top = stack.pop();
849
- if (!top || top.object !== (ch === "}")) return void 0;
850
- if (stack.length === 0) closed = true;
851
- } else if (ch === ",") {
852
- const top = stack[stack.length - 1];
853
- if (top?.object) {
854
- top.atKey = true;
855
- top.key = void 0;
948
+ if (item.type === "function_call_output" && "call_id" in item) {
949
+ if (callIds.has(item.call_id)) {
950
+ kept.push(item);
856
951
  }
952
+ continue;
857
953
  }
858
- out.push(ch);
859
- i++;
860
- }
861
- if (!closed || stack.length > 0) return void 0;
862
- return { json: out.join(""), objects };
863
- }
864
- __name(normalizeEnvelope, "normalizeEnvelope");
865
- function isJsonWhitespace(ch) {
866
- return ch === " " || ch === " " || ch === "\n" || ch === "\r";
867
- }
868
- __name(isJsonWhitespace, "isJsonWhitespace");
869
- function readStringLiteral(text, start, repairable) {
870
- let value = "";
871
- let json = '"';
872
- let i = start + 1;
873
- while (i < text.length) {
874
- const ch = text[i];
875
- if (ch === '"') return { value, json: `${json}"`, next: i + 1 };
876
- if (ch === "\\") {
877
- const escape = text[i + 1];
878
- if (escape === "u") {
879
- const hex = text.slice(i + 2, i + 6);
880
- if (!/^[0-9a-fA-F]{4}$/.test(hex)) return void 0;
881
- value += String.fromCharCode(parseInt(hex, 16));
882
- json += text.slice(i, i + 6);
883
- i += 6;
954
+ if (item.type === "reasoning") {
955
+ const unitCallIds = followingCallGroup(items, i);
956
+ if (unitCallIds.length > 0 && !unitCallIds.some((callId) => outputCallIds.has(callId))) {
957
+ while (isReasoning(kept[kept.length - 1])) kept.pop();
884
958
  continue;
885
959
  }
886
- const simple = escape === void 0 ? void 0 : SIMPLE_ESCAPES[escape];
887
- if (simple === void 0) return void 0;
888
- value += simple;
889
- json += `\\${escape}`;
890
- i += 2;
891
- continue;
892
- }
893
- const code = ch.charCodeAt(0);
894
- if (code < 32) {
895
- if (!repairable || !REPAIRABLE_CONTROLS.has(ch)) return void 0;
896
- value += ch;
897
- json += `\\u${code.toString(16).padStart(4, "0")}`;
898
- i++;
899
- continue;
900
960
  }
901
- value += ch;
902
- json += ch;
903
- i++;
961
+ kept.push(item);
904
962
  }
905
- return void 0;
963
+ return kept;
906
964
  }
907
- __name(readStringLiteral, "readStringLiteral");
908
- function countReasoningItems(items) {
909
- return items.filter(isReasoningItem).length;
965
+ __name(cleanOrphanedFunctionCalls, "cleanOrphanedFunctionCalls");
966
+ function convertGeminiToolsToResponsesTools(request) {
967
+ const tools = request.config?.tools;
968
+ if (!tools || !Array.isArray(tools)) return void 0;
969
+ const result = [];
970
+ for (const tool of tools) {
971
+ if (typeof tool !== "object" || tool === null) continue;
972
+ const funcDecls = "functionDeclarations" in tool ? tool.functionDeclarations : void 0;
973
+ if (!Array.isArray(funcDecls)) continue;
974
+ for (const func of funcDecls) {
975
+ if (!func.name) continue;
976
+ result.push({
977
+ type: "function",
978
+ name: func.name,
979
+ description: func.description,
980
+ parameters: normalizeResponsesParameters(
981
+ // Prefer parametersJsonSchema (raw JSON Schema, e.g. MCP/extension
982
+ // tools) and fall back to parameters, matching the Chat and
983
+ // Anthropic sibling wires — @google/genai allows both fields at
984
+ // once, and preferring `parameters` here would send a different,
985
+ // potentially lossier schema than the siblings for identical config.
986
+ func.parametersJsonSchema ?? func.parameters
987
+ )
988
+ });
989
+ }
990
+ }
991
+ return result.length > 0 ? result : void 0;
910
992
  }
911
- __name(countReasoningItems, "countReasoningItems");
912
- function isEncryptedReasoningRejection(status, responseBody) {
913
- if (status !== 400 || responseBody.length > MAX_BODY_CHARS) return false;
914
- const text = toEnvelopeText(responseBody.replace(/^data: ?/, ""));
915
- if (!text) return false;
916
- const envelope = readEnvelope(text, MAX_OBJECT_CANDIDATES, false);
917
- if (!envelope || !isPlainObject(envelope.value)) return false;
918
- const direct = readErrorMember(envelope.value);
919
- return direct?.["code"] === "invalid_encrypted_content";
993
+ __name(convertGeminiToolsToResponsesTools, "convertGeminiToolsToResponsesTools");
994
+ function normalizeResponsesParameters(schema) {
995
+ if (schema === void 0) return void 0;
996
+ if (schema === null || typeof schema !== "object") return schema;
997
+ return normalizeResponsesSchemaNode(schema);
920
998
  }
921
- __name(isEncryptedReasoningRejection, "isEncryptedReasoningRejection");
922
- function downgradeEncryptedReasoningItems(items) {
923
- return downgradeRejectedReasoningItems(items, {
924
- namedIndex: items.findIndex(isReasoningItem),
925
- maxLength: null
926
- });
999
+ __name(normalizeResponsesParameters, "normalizeResponsesParameters");
1000
+ function normalizeResponsesSchemaNode(node) {
1001
+ if (Array.isArray(node)) {
1002
+ return node.map((item) => normalizeResponsesSchemaNode(item));
1003
+ }
1004
+ if (!node || typeof node !== "object") return node;
1005
+ const out = {
1006
+ ...node
1007
+ };
1008
+ if (out["properties"] && typeof out["properties"] === "object") {
1009
+ const props = out["properties"];
1010
+ const nextProps = {};
1011
+ for (const [k, v] of Object.entries(props)) {
1012
+ nextProps[k] = normalizeResponsesSchemaNode(v);
1013
+ }
1014
+ out["properties"] = nextProps;
1015
+ }
1016
+ if (out["items"]) {
1017
+ out["items"] = normalizeResponsesSchemaNode(out["items"]);
1018
+ }
1019
+ for (const key of ["anyOf", "oneOf", "allOf"]) {
1020
+ const v = out[key];
1021
+ if (Array.isArray(v)) {
1022
+ out[key] = v.map((item) => normalizeResponsesSchemaNode(item));
1023
+ }
1024
+ }
1025
+ if (out["type"] === "object" && out["properties"] === void 0) {
1026
+ out["properties"] = {};
1027
+ }
1028
+ return out;
927
1029
  }
928
- __name(downgradeEncryptedReasoningItems, "downgradeEncryptedReasoningItems");
1030
+ __name(normalizeResponsesSchemaNode, "normalizeResponsesSchemaNode");
929
1031
 
930
1032
  // packages/core/src/core/openaiResponsesContentGenerator/responses-pipeline.ts
931
1033
  import { createHash } from "node:crypto";
932
- var debugLogger2 = createDebugLogger("RESPONSES_PIPELINE");
1034
+ var debugLogger3 = createDebugLogger("RESPONSES_PIPELINE");
933
1035
  var StreamInactivityTimeoutError = class extends Error {
934
1036
  constructor(idleMs, chunksReceived) {
935
1037
  super(
@@ -1114,7 +1216,7 @@ var ResponsesPipeline = class {
1114
1216
  const input = rejection ? downgradeRejectedReasoningItems(apiRequest.input, rejection) : encryptedRejected ? downgradeEncryptedReasoningItems(apiRequest.input) : apiRequest.input;
1115
1217
  if (input === apiRequest.input) return void 0;
1116
1218
  const reasoningItems = countReasoningItems(apiRequest.input);
1117
- debugLogger2.debug(
1219
+ debugLogger3.debug(
1118
1220
  "Retrying once with downgraded reasoning replay",
1119
1221
  `namedIndex=${rejection?.namedIndex ?? "all"}`,
1120
1222
  `maxLengthReported=${rejection?.maxLength != null}`,
@@ -1281,7 +1383,7 @@ var ResponsesPipeline = class {
1281
1383
  }
1282
1384
  }
1283
1385
  const body = JSON.stringify(apiRequest);
1284
- debugLogger2.debug(
1386
+ debugLogger3.debug(
1285
1387
  `POST ${redactProxyCredentials(url)}`,
1286
1388
  `bodyBytes=${body.length}`,
1287
1389
  `inputItems=${summarizeInputItemTypes(apiRequest.input)}`
@@ -1557,7 +1659,7 @@ var ResponsesPipeline = class {
1557
1659
  return convertParsedFrame(eventType, data);
1558
1660
  } catch (err) {
1559
1661
  if (err instanceof SyntaxError) {
1560
- debugLogger2.debug(
1662
+ debugLogger3.debug(
1561
1663
  `Failed to parse SSE data: ${dataStr.substring(0, 200)}`
1562
1664
  );
1563
1665
  return null;
@@ -1600,7 +1702,7 @@ var ResponsesPipeline = class {
1600
1702
  }
1601
1703
  } catch (err) {
1602
1704
  if (err instanceof SyntaxError) {
1603
- debugLogger2.debug(
1705
+ debugLogger3.debug(
1604
1706
  `Failed to parse SSE data: ${dataContent.substring(0, 200)}`
1605
1707
  );
1606
1708
  } else {
@@ -1640,7 +1742,7 @@ var ResponsesPipeline = class {
1640
1742
  }
1641
1743
  } catch (err) {
1642
1744
  if (err instanceof SyntaxError) {
1643
- debugLogger2.debug(
1745
+ debugLogger3.debug(
1644
1746
  `Failed to parse SSE data: ${dataContent.substring(0, 200)}`
1645
1747
  );
1646
1748
  } else {
@@ -1710,7 +1812,7 @@ function mergeStreamResponses(chunks) {
1710
1812
  __name(mergeStreamResponses, "mergeStreamResponses");
1711
1813
 
1712
1814
  // packages/core/src/core/openaiResponsesContentGenerator/index.ts
1713
- var debugLogger3 = createDebugLogger("RESPONSES");
1815
+ var debugLogger4 = createDebugLogger("RESPONSES");
1714
1816
  var OpenAIResponsesContentGenerator = class {
1715
1817
  static {
1716
1818
  __name(this, "OpenAIResponsesContentGenerator");
@@ -1784,7 +1886,7 @@ var OpenAIResponsesContentGenerator = class {
1784
1886
  };
1785
1887
  } catch (error) {
1786
1888
  const redactedError = redactProxyError(error);
1787
- debugLogger3.error("Embedding error:", redactedError);
1889
+ debugLogger4.error("Embedding error:", redactedError);
1788
1890
  throw new Error(
1789
1891
  `Embedding error: ${redactedError instanceof Error ? redactedError.message : String(redactedError)}`
1790
1892
  );