@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
@@ -4,6 +4,9 @@ import {
4
4
  convertSchema,
5
5
  relaxSchemaForFunctionCalling
6
6
  } from "./chunk-2LYPPV2R.js";
7
+ import {
8
+ markToolCallArgumentsIncomplete
9
+ } from "./chunk-VBDYNBGQ.js";
7
10
  import {
8
11
  isDisclosureText
9
12
  } from "./chunk-HX6AICAX.js";
@@ -170,6 +173,109 @@ function evictOldestImagesBeyondCap(messages, cap = DEFAULT_MAX_REQUEST_IMAGES)
170
173
  }
171
174
  __name(evictOldestImagesBeyondCap, "evictOldestImagesBeyondCap");
172
175
 
176
+ // packages/core/src/core/openaiContentGenerator/trailing-thinking-tag-filter.ts
177
+ init_esbuild_shims();
178
+ var CLOSING_TAG_LINE = /\r?\n[ \t]*<\/(think|thinking)[ \t]*>[ \t\r\n]*$/i;
179
+ var CLOSING_MARKUP = /<\//;
180
+ var LITERAL_OPENING_MARKUP = /<(?!(?:t|th|thi|thin|thinki|thinkin)\s*(?=<|$)|think(?=$)|thinking(?=$))[a-z!?]/i;
181
+ var MAX_PENDING_LENGTH = 128;
182
+ var TAIL_LENGTH = 12;
183
+ var TrailingThinkingTagFilter = class {
184
+ static {
185
+ __name(this, "TrailingThinkingTagFilter");
186
+ }
187
+ pending = "";
188
+ hasVisibleText = false;
189
+ literalContent = false;
190
+ markerTail = "";
191
+ emittedTail = "";
192
+ previousLineBlank = true;
193
+ currentLineBlank = true;
194
+ lineIndent = 0;
195
+ /** Set when a call removed a tag; the caller reads and clears it. */
196
+ sanitizedTagName;
197
+ /**
198
+ * @param final no more text follows; nothing stays withheld after this call.
199
+ * @param completed the response ended normally, so a trailing tag is an
200
+ * artifact and not the edge of a cut answer.
201
+ */
202
+ parse(text, final, completed) {
203
+ this.pending += text;
204
+ const markers = this.markerTail + text;
205
+ this.literalContent ||= /`|~{3}/.test(markers) || LITERAL_OPENING_MARKUP.test(markers);
206
+ this.markerTail = markers.replace(/\s+$/, " ").slice(-TAIL_LENGTH);
207
+ this.trackIndentedCode(text);
208
+ const closing = CLOSING_TAG_LINE.exec(this.pending);
209
+ let candidateStart = closing?.index ?? this.pending.lastIndexOf("\n");
210
+ if (!closing && this.pending.endsWith("\r")) {
211
+ candidateStart = Math.max(candidateStart, this.pending.length - 1);
212
+ } else if (!closing && this.pending[candidateStart - 1] === "\r") {
213
+ candidateStart--;
214
+ }
215
+ if (!closing && candidateStart >= 0) {
216
+ const candidate = this.pending.slice(candidateStart).trimStart();
217
+ const lowered = candidate.toLowerCase();
218
+ if (!["</think>", "</thinking>"].some((tag) => tag.startsWith(lowered)) && !/^<\/(?:think|thinking)[ \t]*>?[ \t\r\n]*$/i.test(candidate)) {
219
+ candidateStart = -1;
220
+ }
221
+ }
222
+ const prefix = candidateStart >= 0 ? this.pending.slice(0, candidateStart) : this.pending;
223
+ this.literalContent ||= CLOSING_MARKUP.test(this.emittedTail + prefix);
224
+ const eligible = !this.literalContent && candidateStart >= 0 && (this.hasVisibleText || /\S/.test(prefix)) && this.pending.length - candidateStart <= MAX_PENDING_LENGTH;
225
+ if (eligible && (!final || completed && closing)) {
226
+ if (final && closing) {
227
+ this.sanitizedTagName = closing[1].toLowerCase();
228
+ }
229
+ this.pending = final ? "" : this.pending.slice(candidateStart);
230
+ this.hasVisibleText ||= /\S/.test(prefix);
231
+ this.noteReleased(prefix);
232
+ return prefix;
233
+ }
234
+ const result = this.pending;
235
+ this.pending = "";
236
+ this.literalContent ||= CLOSING_MARKUP.test(this.emittedTail + result);
237
+ this.hasVisibleText ||= /\S/.test(result);
238
+ this.noteReleased(result);
239
+ return result;
240
+ }
241
+ /**
242
+ * Hands back a hold that is only whitespace, for a caller that is about to
243
+ * stop using this filter. A held tag fragment stays held.
244
+ */
245
+ drainWhitespace() {
246
+ if (!/^\s+$/.test(this.pending)) return "";
247
+ const held = this.pending;
248
+ this.pending = "";
249
+ this.noteReleased(held);
250
+ return held;
251
+ }
252
+ // A line indented by four columns after a blank line is a code block. After
253
+ // a paragraph line it is not, so one newline and four spaces before the tag
254
+ // must still let it be removed.
255
+ trackIndentedCode(text) {
256
+ for (const character of text) {
257
+ if (character === "\n") {
258
+ this.previousLineBlank = this.currentLineBlank;
259
+ this.currentLineBlank = true;
260
+ this.lineIndent = 0;
261
+ } else if (this.currentLineBlank && /[ \t\r]/.test(character)) {
262
+ if (character !== "\r") {
263
+ this.lineIndent = Math.min(
264
+ 4,
265
+ this.lineIndent + (character === " " ? 4 - this.lineIndent % 4 : 1)
266
+ );
267
+ }
268
+ } else {
269
+ this.literalContent ||= this.currentLineBlank && this.previousLineBlank && this.lineIndent >= 4;
270
+ this.currentLineBlank = false;
271
+ }
272
+ }
273
+ }
274
+ noteReleased(text) {
275
+ this.emittedTail = (this.emittedTail + text).slice(-TAIL_LENGTH);
276
+ }
277
+ };
278
+
173
279
  // packages/core/src/core/openaiContentGenerator/converter.ts
174
280
  var debugLogger2 = createDebugLogger("CONVERTER");
175
281
  var SPLIT_TOOL_MEDIA_TEXT = "(attached media from previous tool call)";
@@ -371,10 +477,10 @@ function convertLlmRequestToOpenAI(request, requestContext, options = { cleanOrp
371
477
  let messages = [];
372
478
  addSystemInstructionMessage(request, messages);
373
479
  processContents(request.contents, messages, requestContext);
374
- messages = mergeConsecutiveAssistantMessages(messages);
480
+ messages = normalizeAssistantMessages(messages);
375
481
  if (options.cleanOrphanToolCalls) {
376
482
  messages = cleanOrphanedToolCalls(messages);
377
- messages = mergeConsecutiveAssistantMessages(messages);
483
+ messages = normalizeAssistantMessages(messages);
378
484
  }
379
485
  evictOldestImagesBeyondCap(messages);
380
486
  return messages;
@@ -489,6 +595,33 @@ function processContent(content, messages, requestContext) {
489
595
  const emittedFunctionCallIds = /* @__PURE__ */ new Set();
490
596
  const emittedFunctionResponseIds = /* @__PURE__ */ new Set();
491
597
  const accumulatedSplitMedia = [];
598
+ const flushAssistantMessage = /* @__PURE__ */ __name(() => {
599
+ if (contentParts.length === 0 && toolCalls.length === 0 && reasoningParts.length === 0) {
600
+ return;
601
+ }
602
+ const assistantTextContent = contentParts.filter(
603
+ (part) => part.type === "text"
604
+ ).map((part) => part.text).join("");
605
+ const assistantMessage = {
606
+ role: "assistant",
607
+ // When there is reasoning content but no text, use "" instead of null.
608
+ // Some OpenAI-compatible providers (e.g. Ollama) reject content: null
609
+ // when reasoning_content is present, returning HTTP 400.
610
+ // For tool-call-only messages we keep null to stay spec-compliant.
611
+ content: assistantTextContent || (reasoningParts.length > 0 ? "" : null)
612
+ };
613
+ if (toolCalls.length > 0) {
614
+ assistantMessage.tool_calls = [...toolCalls];
615
+ }
616
+ const reasoningContent = reasoningParts.join("");
617
+ if (reasoningContent) {
618
+ assistantMessage.reasoning_content = reasoningContent;
619
+ }
620
+ messages.push(assistantMessage);
621
+ contentParts.length = 0;
622
+ reasoningParts.length = 0;
623
+ toolCalls.length = 0;
624
+ }, "flushAssistantMessage");
492
625
  for (const part of parts) {
493
626
  if (typeof part === "string") {
494
627
  contentParts.push({ type: "text", text: part });
@@ -496,6 +629,9 @@ function processContent(content, messages, requestContext) {
496
629
  }
497
630
  if ("text" in part && "thought" in part && part.thought) {
498
631
  if (role === "assistant" && part.text) {
632
+ if (contentParts.length > 0 || toolCalls.length > 0) {
633
+ flushAssistantMessage();
634
+ }
499
635
  reasoningParts.push(part.text);
500
636
  }
501
637
  }
@@ -587,28 +723,7 @@ function processContent(content, messages, requestContext) {
587
723
  });
588
724
  }
589
725
  if (role === "assistant") {
590
- if (contentParts.length === 0 && toolCalls.length === 0 && reasoningParts.length === 0) {
591
- return;
592
- }
593
- const assistantTextContent = contentParts.filter(
594
- (part) => part.type === "text"
595
- ).map((part) => part.text).join("");
596
- const assistantMessage = {
597
- role: "assistant",
598
- // When there is reasoning content but no text, use "" instead of null.
599
- // Some OpenAI-compatible providers (e.g. Ollama) reject content: null
600
- // when reasoning_content is present, returning HTTP 400.
601
- // For tool-call-only messages we keep null to stay spec-compliant.
602
- content: assistantTextContent || (reasoningParts.length > 0 ? "" : null)
603
- };
604
- if (toolCalls.length > 0) {
605
- assistantMessage.tool_calls = toolCalls;
606
- }
607
- const reasoningContent = reasoningParts.join("");
608
- if (reasoningContent) {
609
- assistantMessage.reasoning_content = reasoningContent;
610
- }
611
- messages.push(assistantMessage);
726
+ flushAssistantMessage();
612
727
  return;
613
728
  }
614
729
  if (contentParts.length > 0) {
@@ -895,8 +1010,23 @@ function extractTextFromContentUnion(contentUnion) {
895
1010
  return "";
896
1011
  }
897
1012
  __name(extractTextFromContentUnion, "extractTextFromContentUnion");
898
- function convertOpenAITextToParts(text, requestContext, final = true) {
1013
+ function convertOpenAITextToParts(text, requestContext, final, completed) {
899
1014
  if (!requestContext.responseParsingOptions?.taggedThinkingTags && !requestContext.taggedThinkingParser) {
1015
+ if (requestContext.responseParsingOptions?.contentOnlyThinkingTagLeaks) {
1016
+ const filter = requestContext.trailingThinkingTagFilter ??= new TrailingThinkingTagFilter();
1017
+ text = filter.parse(
1018
+ text,
1019
+ final || requestContext.hasThinkingTagInReasoning === true,
1020
+ completed && !requestContext.hasThinkingTagInReasoning
1021
+ );
1022
+ if (filter.sanitizedTagName) {
1023
+ requestContext.protocolTagSanitized = {
1024
+ tagName: filter.sanitizedTagName,
1025
+ toolCallCount: 0
1026
+ };
1027
+ filter.sanitizedTagName = void 0;
1028
+ }
1029
+ }
900
1030
  return text ? [{ text }] : [];
901
1031
  }
902
1032
  if (requestContext.taggedThinkingParser) {
@@ -916,6 +1046,10 @@ var LEADING_THINKING_TAG_PATTERN = /^\s*<\/?think(?:ing)?\s*>/i;
916
1046
  var STANDALONE_CLOSING_THINKING_TAG_PATTERN = /^\s*<\/(think|thinking)\s*>\s*$/i;
917
1047
  var STANDALONE_OPENING_THINKING_TAG_PATTERN = /^\s*<(think|thinking)\s*>\s*$/i;
918
1048
  var MAX_THINKING_TAG_CANDIDATE_LENGTH = 128;
1049
+ function completedNormally(finishReason, reasoningText) {
1050
+ return mapOpenAIFinishReasonToLlm(finishReason || "stop") === FinishReason.STOP && !THINKING_TAG_PATTERN.test(reasoningText ?? "");
1051
+ }
1052
+ __name(completedNormally, "completedNormally");
919
1053
  function canBeStandaloneThinkingTagPrefix(text) {
920
1054
  const candidate = text.trimStart().toLowerCase();
921
1055
  if (!candidate) return true;
@@ -983,7 +1117,12 @@ function convertOpenAIResponseToLlm(openaiResponse, requestContext) {
983
1117
  const response = new GenerateContentResponse();
984
1118
  if (choice) {
985
1119
  const parts = [];
986
- const textParts = choice.message.content ? convertOpenAITextToParts(choice.message.content, requestContext) : [];
1120
+ const textParts = choice.message.content ? convertOpenAITextToParts(
1121
+ choice.message.content,
1122
+ requestContext,
1123
+ true,
1124
+ completedNormally(choice.finish_reason, reasoningText)
1125
+ ) : [];
987
1126
  if (reasoningText && !hasThoughtPart(textParts)) {
988
1127
  parts.push(createOpenAIReasoningThoughtPart(reasoningText));
989
1128
  }
@@ -1085,6 +1224,9 @@ function convertOpenAIChunkToLlm(chunk, requestContext) {
1085
1224
  let parts = [];
1086
1225
  let contentParts = [];
1087
1226
  const reasoningText = choice.delta?.reasoning_content ?? choice.delta?.reasoning;
1227
+ if (!requestContext.responseParsingOptions?.taggedThinkingTags && THINKING_TAG_PATTERN.test(reasoningText ?? "")) {
1228
+ requestContext.hasThinkingTagInReasoning = true;
1229
+ }
1088
1230
  if (typeof choice.delta?.content === "string") {
1089
1231
  const rawContent = choice.delta.content;
1090
1232
  const replayState = requestContext.textDeltaState;
@@ -1106,19 +1248,26 @@ function convertOpenAIChunkToLlm(chunk, requestContext) {
1106
1248
  if (requestContext.responseParsingOptions?.taggedThinkingTagsAfterReasoning && (requestContext.hasStructuredReasoningContent || reasoningText) && LEADING_THINKING_TAG_PATTERN.test(taggedThinkingCandidate) && !taggedThinkingCandidate.trimStart().startsWith("</")) {
1107
1249
  requestContext.taggedThinkingParser ??= new TaggedThinkingParser();
1108
1250
  requestContext.pendingThinkingTagCandidate = void 0;
1251
+ const drainedWhitespace = requestContext.trailingThinkingTagFilter?.drainWhitespace() ?? "";
1109
1252
  contentParts = requestContext.taggedThinkingParser.parse(
1110
- taggedThinkingCandidate,
1253
+ drainedWhitespace + taggedThinkingCandidate,
1111
1254
  Boolean(choice.finish_reason)
1112
1255
  );
1113
1256
  } else if (normalizedContent || choice.finish_reason) {
1114
1257
  contentParts = convertOpenAITextToParts(
1115
1258
  normalizedContent,
1116
1259
  requestContext,
1117
- Boolean(choice.finish_reason)
1260
+ Boolean(choice.finish_reason),
1261
+ completedNormally(choice.finish_reason, reasoningText)
1118
1262
  );
1119
1263
  }
1120
1264
  } else if (choice.finish_reason) {
1121
- contentParts = convertOpenAITextToParts("", requestContext, true);
1265
+ contentParts = convertOpenAITextToParts(
1266
+ "",
1267
+ requestContext,
1268
+ true,
1269
+ completedNormally(choice.finish_reason, reasoningText)
1270
+ );
1122
1271
  }
1123
1272
  if (choice.finish_reason && requestContext.responseParsingOptions?.taggedThinkingTagsAfterReasoning && requestContext.taggedThinkingParser?.hasUnclosedThought()) {
1124
1273
  throwProtocolTagLeak(requestContext);
@@ -1296,6 +1445,9 @@ function convertOpenAIChunkToLlm(chunk, requestContext) {
1296
1445
  const toolCallWithoutName = toolCallParser.hasNamelessToolCall();
1297
1446
  const completedToolCalls = choice.finish_reason ? toolCallParser.getCompletedToolCalls() : [];
1298
1447
  const toolCallsTruncated = choice.finish_reason ? toolCallParser.hasIncompleteToolCalls() : false;
1448
+ if (choice.finish_reason && requestContext.protocolTagSanitized) {
1449
+ requestContext.protocolTagSanitized.toolCallCount = completedToolCalls.length;
1450
+ }
1299
1451
  if (choice.finish_reason && requestContext.pendingThinkingTagCandidate?.closingTagName) {
1300
1452
  if (requestContext.hasThinkingTagInReasoning === true || choice.finish_reason !== "tool_calls" || completedToolCalls.length === 0 || toolCallWithoutName || toolCallParser.hasConflictingToolCallIdentity() || toolCallsTruncated || toolCallParser.hasInvalidToolCallArguments()) {
1301
1453
  throwProtocolTagLeak(requestContext);
@@ -1334,7 +1486,28 @@ function convertOpenAIChunkToLlm(chunk, requestContext) {
1334
1486
  }
1335
1487
  }
1336
1488
  }
1337
- const effectiveFinishReason = toolCallsTruncated && choice.finish_reason !== "length" ? "length" : choice.finish_reason;
1489
+ const suspectTruncation = toolCallsTruncated && choice.finish_reason !== "length";
1490
+ const usageVerdict = corroborateTruncationFromCompletionTokens(
1491
+ chunk.usage?.completion_tokens,
1492
+ requestContext.maxOutputTokens
1493
+ );
1494
+ if (suspectTruncation) {
1495
+ debugLogger2.debug("Truncated tool-call finish_reason override", {
1496
+ providerFinishReason: choice.finish_reason,
1497
+ completionTokens: chunk.usage?.completion_tokens ?? null,
1498
+ maxOutputTokens: requestContext.maxOutputTokens ?? null,
1499
+ verdict: usageVerdict
1500
+ });
1501
+ }
1502
+ const effectiveFinishReason = suspectTruncation && usageVerdict !== "disproved" ? "length" : choice.finish_reason;
1503
+ if (suspectTruncation && usageVerdict === "unknown") {
1504
+ requestContext.pendingTruncationOverride = {
1505
+ finishReason: mapOpenAIFinishReasonToLlm(choice.finish_reason)
1506
+ };
1507
+ }
1508
+ if (suspectTruncation && usageVerdict === "disproved") {
1509
+ markToolCallArgumentsIncomplete(parts);
1510
+ }
1338
1511
  const candidate = {
1339
1512
  content: {
1340
1513
  parts,
@@ -1394,6 +1567,14 @@ function convertOpenAIChunkToLlm(chunk, requestContext) {
1394
1567
  return response;
1395
1568
  }
1396
1569
  __name(convertOpenAIChunkToLlm, "convertOpenAIChunkToLlm");
1570
+ var TRUNCATION_COMPLETION_TOKEN_RATIO_THRESHOLD = 0.5;
1571
+ function corroborateTruncationFromCompletionTokens(completionTokens, maxOutputTokens) {
1572
+ if (typeof completionTokens !== "number" || !Number.isFinite(completionTokens) || completionTokens <= 0 || maxOutputTokens === void 0 || maxOutputTokens <= 0) {
1573
+ return "unknown";
1574
+ }
1575
+ return completionTokens >= maxOutputTokens * TRUNCATION_COMPLETION_TOKEN_RATIO_THRESHOLD ? "corroborated" : "disproved";
1576
+ }
1577
+ __name(corroborateTruncationFromCompletionTokens, "corroborateTruncationFromCompletionTokens");
1397
1578
  function mapOpenAIFinishReasonToLlm(openaiReason) {
1398
1579
  if (typeof openaiReason !== "string") {
1399
1580
  return FinishReason.FINISH_REASON_UNSPECIFIED;
@@ -1496,9 +1677,6 @@ function cleanOrphanedToolCalls(messages) {
1496
1677
  }
1497
1678
  continue;
1498
1679
  }
1499
- if (nextMessage.role === "assistant" && !hasToolCalls(nextMessage)) {
1500
- continue;
1501
- }
1502
1680
  break;
1503
1681
  }
1504
1682
  const validToolCalls = candidateToolCalls.filter(
@@ -1564,50 +1742,55 @@ function cleanOrphanedToolCalls(messages) {
1564
1742
  return cleaned;
1565
1743
  }
1566
1744
  __name(cleanOrphanedToolCalls, "cleanOrphanedToolCalls");
1567
- function mergeConsecutiveAssistantMessages(messages) {
1568
- const merged = [];
1745
+ function normalizeAssistantMessages(messages) {
1746
+ const normalized = [];
1747
+ let toolCalls = [];
1748
+ const flushToolCalls = /* @__PURE__ */ __name(() => {
1749
+ if (toolCalls.length === 0) return;
1750
+ const last = normalized.at(-1);
1751
+ if (last?.role === "assistant") {
1752
+ last.tool_calls = toolCalls;
1753
+ } else {
1754
+ normalized.push({
1755
+ role: "assistant",
1756
+ content: null,
1757
+ tool_calls: toolCalls
1758
+ });
1759
+ }
1760
+ toolCalls = [];
1761
+ }, "flushToolCalls");
1569
1762
  for (const message of messages) {
1570
- if (message.role === "assistant" && merged.length > 0) {
1571
- const lastMessage = merged[merged.length - 1];
1572
- if (lastMessage.role === "assistant") {
1573
- const lastToolCalls = "tool_calls" in lastMessage ? lastMessage.tool_calls || [] : [];
1574
- const currentToolCalls = "tool_calls" in message ? message.tool_calls || [] : [];
1575
- const lastContent = lastMessage.content;
1576
- const currentContent = message.content;
1577
- const useArrayFormat = Array.isArray(lastContent) || Array.isArray(currentContent);
1578
- let combinedContent;
1579
- if (useArrayFormat) {
1580
- const lastParts = Array.isArray(lastContent) ? lastContent : typeof lastContent === "string" && lastContent ? [{ type: "text", text: lastContent }] : [];
1581
- const currentParts = Array.isArray(currentContent) ? currentContent : typeof currentContent === "string" && currentContent ? [{ type: "text", text: currentContent }] : [];
1582
- combinedContent = [
1583
- ...lastParts,
1584
- ...currentParts
1585
- ];
1586
- } else {
1587
- const lastText = typeof lastContent === "string" ? lastContent : "";
1588
- const currentText = typeof currentContent === "string" ? currentContent : "";
1589
- const mergedText = [lastText, currentText].filter(Boolean).join("");
1590
- combinedContent = mergedText || null;
1591
- }
1592
- const combinedToolCalls = [...lastToolCalls, ...currentToolCalls];
1593
- lastMessage.content = combinedContent || null;
1594
- if (combinedToolCalls.length > 0) {
1595
- lastMessage.tool_calls = combinedToolCalls;
1596
- }
1597
- const lastReasoning = lastMessage.reasoning_content;
1598
- const currentReasoning = message.reasoning_content;
1599
- const combinedReasoning = [lastReasoning, currentReasoning].filter(Boolean).join("");
1600
- if (combinedReasoning) {
1601
- lastMessage.reasoning_content = combinedReasoning;
1602
- }
1603
- continue;
1604
- }
1763
+ if (message.role !== "assistant") {
1764
+ flushToolCalls();
1765
+ normalized.push(message);
1766
+ continue;
1767
+ }
1768
+ const { tool_calls: calls = [], ...next } = message;
1769
+ const last = normalized.at(-1);
1770
+ const lastAssistant = last?.role === "assistant" ? last : void 0;
1771
+ toolCalls.push(...calls);
1772
+ if (!next.content && !next.reasoning_content && calls.length > 0) {
1773
+ continue;
1774
+ }
1775
+ if (!lastAssistant || next.reasoning_content) {
1776
+ normalized.push(next);
1777
+ continue;
1778
+ }
1779
+ if (Array.isArray(lastAssistant.content) || Array.isArray(next.content)) {
1780
+ const asParts = /* @__PURE__ */ __name((content) => Array.isArray(content) ? content : content ? [{ type: "text", text: content }] : [], "asParts");
1781
+ lastAssistant.content = [
1782
+ ...asParts(lastAssistant.content),
1783
+ ...asParts(next.content)
1784
+ ];
1785
+ } else {
1786
+ const text = (lastAssistant.content || "") + (next.content || "");
1787
+ lastAssistant.content = text || (lastAssistant.reasoning_content ? "" : null);
1605
1788
  }
1606
- merged.push(message);
1607
1789
  }
1608
- return merged;
1790
+ flushToolCalls();
1791
+ return normalized;
1609
1792
  }
1610
- __name(mergeConsecutiveAssistantMessages, "mergeConsecutiveAssistantMessages");
1793
+ __name(normalizeAssistantMessages, "normalizeAssistantMessages");
1611
1794
  var OpenAIContentConverter = {
1612
1795
  convertLlmToolParametersToOpenAI,
1613
1796
  convertLlmToolsToOpenAI,
@@ -1624,6 +1807,7 @@ var openaiRequestCaptureContext = new AsyncLocalStorage();
1624
1807
 
1625
1808
  export {
1626
1809
  TaggedThinkingParser,
1810
+ corroborateTruncationFromCompletionTokens,
1627
1811
  OpenAIContentConverter,
1628
1812
  openaiRequestCaptureContext
1629
1813
  };
@@ -1637,3 +1821,8 @@ export {
1637
1821
  * Copyright 2025 Google LLC
1638
1822
  * SPDX-License-Identifier: Apache-2.0
1639
1823
  */
1824
+ /**
1825
+ * @license
1826
+ * Copyright 2026 o1-code contributors
1827
+ * SPDX-License-Identifier: Apache-2.0
1828
+ */
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  wrapForMultiplexer
5
- } from "./chunk-MSBLDE7B.js";
5
+ } from "./chunk-5P7NQWE6.js";
6
6
  import {
7
7
  resolveBundleDir
8
8
  } from "./chunk-Z2IHOXIK.js";
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  SERVE_CONTROL_EXT_METHODS,
9
9
  STATUS_SCHEMA_VERSION
10
- } from "./chunk-6HLOPCFZ.js";
10
+ } from "./chunk-PYQSQFGU.js";
11
11
  import {
12
12
  init_esbuild_shims
13
13
  } from "./chunk-S2467S6L.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-RSFKGHXZ.js";
16
16
  import {
17
17
  ideContextStore
18
- } from "./chunk-PUBPS6I4.js";
18
+ } from "./chunk-SR7O2YDD.js";
19
19
  import {
20
20
  require_proper_lockfile
21
21
  } from "./chunk-4LCUE7BN.js";
@@ -2,24 +2,24 @@
2
2
  "use strict";
3
3
  import {
4
4
  functionResponsePartsToString
5
- } from "./chunk-M5BPWICM.js";
5
+ } from "./chunk-EVYREOIG.js";
6
6
  import {
7
7
  observeHeadlessToolResultProjection,
8
8
  observeHeadlessToolResultWire,
9
9
  projectJsonStringToByteBudget
10
- } from "./chunk-AOJFG2LZ.js";
10
+ } from "./chunk-S5TFGSM3.js";
11
11
  import {
12
12
  createNotStartedToolErrorResponse,
13
13
  parseAndFormatApiError,
14
14
  toolResultBoundaryArtifact
15
- } from "./chunk-PUBPS6I4.js";
15
+ } from "./chunk-SR7O2YDD.js";
16
16
  import {
17
17
  shellResultText
18
18
  } from "./chunk-GYGA6V6B.js";
19
19
  import {
20
20
  formatVisionBridgeNoticeDisplay,
21
21
  isVisionBridgeNoticeDisplay
22
- } from "./chunk-IDOFNXOM.js";
22
+ } from "./chunk-MNLPYHDS.js";
23
23
  import {
24
24
  init_esbuild_shims
25
25
  } from "./chunk-S2467S6L.js";
@@ -2,13 +2,13 @@
2
2
  "use strict";
3
3
  import {
4
4
  GIT_COMMIT_INFO
5
- } from "./chunk-KRE356Z5.js";
5
+ } from "./chunk-7XELAF5M.js";
6
6
  import {
7
7
  getCliVersion
8
- } from "./chunk-GLXNABTW.js";
8
+ } from "./chunk-RM54W4ER.js";
9
9
  import {
10
10
  IdeClient
11
- } from "./chunk-PUBPS6I4.js";
11
+ } from "./chunk-SR7O2YDD.js";
12
12
  import {
13
13
  formatMemoryUsage
14
14
  } from "./chunk-M7AWQAB7.js";
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  SkillError
5
- } from "./chunk-WIQEF7ON.js";
5
+ } from "./chunk-DV2KGLEW.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-S2467S6L.js";
@@ -4,10 +4,10 @@ import {
4
4
  buildScheduledTaskRunPrompt,
5
5
  scheduledTaskRunSessionName,
6
6
  scheduledTaskRunSourceId
7
- } from "./chunk-LDKVV42E.js";
7
+ } from "./chunk-KIHOIJMQ.js";
8
8
  import {
9
9
  createSessionOrganizationService
10
- } from "./chunk-3NWXBIE2.js";
10
+ } from "./chunk-YRYQC7GO.js";
11
11
  import {
12
12
  parseCallerSuppliedSessionId
13
13
  } from "./chunk-KQCQCJBL.js";
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-H4HNRIFK.js";
17
17
  import {
18
18
  SCHEDULED_TASK_RUN_SOURCE_TYPE
19
- } from "./chunk-YRW7SOH4.js";
19
+ } from "./chunk-BNSYZYXR.js";
20
20
  import {
21
21
  SessionNotFoundError
22
22
  } from "./chunk-HLQLPLTQ.js";
@@ -29,7 +29,7 @@ import {
29
29
  import {
30
30
  SessionService,
31
31
  stripTerminalControlSequences
32
- } from "./chunk-PUBPS6I4.js";
32
+ } from "./chunk-SR7O2YDD.js";
33
33
  import {
34
34
  MAX_JOBS,
35
35
  nextDurableFireMs
@@ -1544,7 +1544,10 @@ function registerScheduledTaskCrudRoutes(app, deps) {
1544
1544
  try {
1545
1545
  await runWithScheduledTaskTarget(
1546
1546
  target,
1547
- () => bridge.closeSession(boundSessionId)
1547
+ () => bridge.closeSession(boundSessionId, void 0, {
1548
+ closeIfUnheld: true,
1549
+ reason: "scheduled_task_deleted"
1550
+ })
1548
1551
  );
1549
1552
  } catch (error) {
1550
1553
  if (sendActivityGateError(res, error)) return;
@@ -8,7 +8,7 @@ import {
8
8
  isPlanLifecycleToolUnavailableInSubagent,
9
9
  isSubagentLikeExecutionContext,
10
10
  isToolExcludedForCurrentContext
11
- } from "./chunk-6XC7AQHT.js";
11
+ } from "./chunk-MWYTSG52.js";
12
12
  import {
13
13
  BaseDeclarativeTool,
14
14
  BaseToolInvocation
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  parseRule
5
- } from "./chunk-6XC7AQHT.js";
5
+ } from "./chunk-MWYTSG52.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-S2467S6L.js";
@@ -7,18 +7,18 @@ import {
7
7
  jsonStringPayloadByteLength,
8
8
  observeAcpToolResultProjection,
9
9
  truncateJsonStringPayload
10
- } from "./chunk-AOJFG2LZ.js";
10
+ } from "./chunk-S5TFGSM3.js";
11
11
  import {
12
12
  isA2uiToolMeta
13
- } from "./chunk-YRW7SOH4.js";
13
+ } from "./chunk-BNSYZYXR.js";
14
14
  import {
15
15
  redactLogCredentials
16
- } from "./chunk-JDMI736Y.js";
16
+ } from "./chunk-FZSAZTOI.js";
17
17
  import {
18
18
  getResponseText,
19
19
  lastHistoryContentFromRecords,
20
20
  restorableAskUserQuestionCallIds
21
- } from "./chunk-PUBPS6I4.js";
21
+ } from "./chunk-SR7O2YDD.js";
22
22
  import {
23
23
  isShellResultDisplay,
24
24
  mapShellResultText
@@ -26,7 +26,7 @@ import {
26
26
  import {
27
27
  parseGoalSnapshotV2,
28
28
  parseGoalStateCause
29
- } from "./chunk-WIQEF7ON.js";
29
+ } from "./chunk-DV2KGLEW.js";
30
30
  import {
31
31
  init_esbuild_shims
32
32
  } from "./chunk-S2467S6L.js";
@@ -8,14 +8,14 @@ import {
8
8
  } from "./chunk-KQCQCJBL.js";
9
9
  import {
10
10
  DEFAULT_OPENAI_LOG_RETENTION_DAYS
11
- } from "./chunk-UXFP67XM.js";
11
+ } from "./chunk-2GK6MYTP.js";
12
12
  import {
13
13
  resolveOpenAILogDir
14
- } from "./chunk-SF7RCEDN.js";
14
+ } from "./chunk-AXXXWTIX.js";
15
15
  import {
16
16
  FILE_HISTORY_DIR,
17
17
  getSubagentsRootDir
18
- } from "./chunk-PUBPS6I4.js";
18
+ } from "./chunk-SR7O2YDD.js";
19
19
  import {
20
20
  createDebugLogger,
21
21
  sessionIdContext