@organizaone/o1-code 0.23.3 → 0.23.5

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 (267) hide show
  1. package/bundled/qc-helper/docs/configuration/model-providers.md +8 -7
  2. package/bundled/qc-helper/docs/features/mcp.md +1 -1
  3. package/chunks/{MaxSizedBox-PNOKV5XB.js → MaxSizedBox-Y5JCEY4B.js} +19 -19
  4. package/chunks/{StandaloneSessionPicker-DI2PPRCG.js → StandaloneSessionPicker-UHM4GXTV.js} +35 -35
  5. package/chunks/{acp-subagent-executor-J5IOC3T2.js → acp-subagent-executor-AW7LLFBL.js} +21 -21
  6. package/chunks/{acpAgent-Q3ES6XUH.js → acpAgent-FPMFLCZ4.js} +61 -61
  7. package/chunks/{agent-VXBORFU5.js → agent-T5ECJIDQ.js} +11 -11
  8. package/chunks/{agent-headless-F7X4H6AT.js → agent-headless-HG3UJUVK.js} +11 -11
  9. package/chunks/{all-providers-UJJNWFBU.js → all-providers-L277CLKM.js} +2 -2
  10. package/chunks/{anthropicContentGenerator-PXN4JHYG.js → anthropicContentGenerator-TUB4JPOW.js} +7 -7
  11. package/chunks/{bridge-OHMXMD6B.js → bridge-JTW746A2.js} +21 -21
  12. package/chunks/{chunk-FE2ZH6WW.js → chunk-22S35Z2A.js} +49 -49
  13. package/chunks/{chunk-4OV5UWWQ.js → chunk-2DEMKCA3.js} +2 -2
  14. package/chunks/{chunk-CQL2XFY3.js → chunk-2IXO5RK4.js} +3 -3
  15. package/chunks/{chunk-WOUHB7ZU.js → chunk-3IBFHWDD.js} +3 -3
  16. package/chunks/{chunk-UBWDDULS.js → chunk-3JIR3HJ3.js} +1 -1
  17. package/chunks/{chunk-HA5FHKHP.js → chunk-3OPD6SKW.js} +1 -1
  18. package/chunks/{chunk-6LJBRLNS.js → chunk-3UKSVMSW.js} +7 -7
  19. package/chunks/{chunk-MNPMZBSO.js → chunk-3WP3RMOU.js} +7 -7
  20. package/chunks/{chunk-TQXNST6Y.js → chunk-5ALKH4T6.js} +2 -2
  21. package/chunks/{chunk-IJLB54SO.js → chunk-5SNTDD6E.js} +4 -4
  22. package/chunks/{chunk-AK6UP3LA.js → chunk-5Z5RTNDX.js} +1 -1
  23. package/chunks/{chunk-Q2LPAA7C.js → chunk-727PKWWT.js} +1 -1
  24. package/chunks/{chunk-K7OVGWJS.js → chunk-7L6BSUDE.js} +1 -1
  25. package/chunks/{chunk-2VH7GPPV.js → chunk-7S2TZJSA.js} +1 -1
  26. package/chunks/{chunk-63BWCBL5.js → chunk-7TNAQYHG.js} +5 -5
  27. package/chunks/{chunk-GJKIVVOK.js → chunk-A2IANOXW.js} +2 -2
  28. package/chunks/{chunk-L37WQYHD.js → chunk-AH6UEJG7.js} +3 -3
  29. package/chunks/{chunk-2JVMVD6L.js → chunk-AQWORTGA.js} +13 -13
  30. package/chunks/{chunk-FIPT36QW.js → chunk-BFKUFH5E.js} +2 -2
  31. package/chunks/{chunk-HFYFYN7B.js → chunk-BGKS5YWL.js} +2 -2
  32. package/chunks/{chunk-QEYB4PDO.js → chunk-BTYVM6ZC.js} +5 -5
  33. package/chunks/{chunk-YQN4NZ4S.js → chunk-BVB5IEMS.js} +4 -4
  34. package/chunks/{chunk-P3K3UIUL.js → chunk-CFSRNNR5.js} +1 -1
  35. package/chunks/{chunk-RRRI34RZ.js → chunk-CILCRE6P.js} +8 -8
  36. package/chunks/{chunk-HBVBJLFL.js → chunk-D54VYWTE.js} +1 -1
  37. package/chunks/{chunk-RHOOOMUK.js → chunk-DPOBWX3I.js} +2 -2
  38. package/chunks/{chunk-X3KJPJFI.js → chunk-DX4MWIW6.js} +2 -2
  39. package/chunks/{chunk-LRLHFEMZ.js → chunk-E4WPALJR.js} +1 -1
  40. package/chunks/{chunk-PMFVBLGB.js → chunk-ESKSQ3M3.js} +4 -4
  41. package/chunks/{chunk-G7TCNWW4.js → chunk-ESU7M5WY.js} +2 -2
  42. package/chunks/{chunk-SE4AX4Z4.js → chunk-EW3XDNFC.js} +2 -2
  43. package/chunks/{chunk-T636IYGV.js → chunk-FHMJMSOO.js} +1 -1
  44. package/chunks/{chunk-DHXBIFA3.js → chunk-FTU7SEM7.js} +1 -1
  45. package/chunks/{chunk-R66LP4MO.js → chunk-GCCIW37K.js} +1 -1
  46. package/chunks/{chunk-QSSYZQUP.js → chunk-GLJADLD4.js} +2 -2
  47. package/chunks/{chunk-ZIWDO6UP.js → chunk-HCS5KYV3.js} +5 -5
  48. package/chunks/{chunk-ZSCKJRVS.js → chunk-HDORUVYD.js} +8 -8
  49. package/chunks/{chunk-GQSJRXHV.js → chunk-HFYL2VZG.js} +1 -1
  50. package/chunks/{chunk-7GCSNYB5.js → chunk-HRNTNKIC.js} +3 -3
  51. package/chunks/{chunk-RXSGUX7U.js → chunk-HTGKR37W.js} +1 -1
  52. package/chunks/{chunk-FMWQ43OS.js → chunk-HVRWA3JT.js} +2 -2
  53. package/chunks/{chunk-GRSBNB75.js → chunk-HZVNNGBY.js} +4 -4
  54. package/chunks/{chunk-5UZNF6UX.js → chunk-IMJBEMCL.js} +1 -1
  55. package/chunks/{chunk-4Q5LZTPI.js → chunk-J5GTBVSO.js} +3 -3
  56. package/chunks/{chunk-R5IR75RD.js → chunk-J5HQL7OD.js} +1 -1
  57. package/chunks/{chunk-ODSKG77G.js → chunk-JLG6AGKE.js} +2 -2
  58. package/chunks/{chunk-AEQNNEHI.js → chunk-JXFXEX4P.js} +1 -1
  59. package/chunks/{chunk-NWRMBNPA.js → chunk-KWG7RVEM.js} +1 -1
  60. package/chunks/{chunk-JCWIHPJ2.js → chunk-M4GF5INW.js} +2 -2
  61. package/chunks/{chunk-BBQWOOBL.js → chunk-MG4UP6O7.js} +8 -8
  62. package/chunks/{chunk-4FKNGLMA.js → chunk-MQUTGFIN.js} +4 -4
  63. package/chunks/{chunk-BEGSPMH3.js → chunk-MRHLCYR6.js} +4 -4
  64. package/chunks/{chunk-ER7RIWYZ.js → chunk-MVDHOUTF.js} +1 -1
  65. package/chunks/{chunk-LOWKYYPU.js → chunk-MY6XO77V.js} +2 -2
  66. package/chunks/{chunk-5UX4INNV.js → chunk-NH4A72RN.js} +13 -13
  67. package/chunks/{chunk-QUTCQFWY.js → chunk-O6O3M6E6.js} +7 -7
  68. package/chunks/{chunk-IOWEOCTW.js → chunk-OFZF2URE.js} +3 -3
  69. package/chunks/{chunk-MZ4ZQ5JN.js → chunk-OND4U6MO.js} +2 -2
  70. package/chunks/{chunk-MRDYGSEU.js → chunk-OX6A5GJG.js} +298 -83
  71. package/chunks/{chunk-F5XJP6CK.js → chunk-PEWWTG65.js} +1 -1
  72. package/chunks/{chunk-V7K34NU3.js → chunk-PN2COYMC.js} +1 -1
  73. package/chunks/{chunk-6RIH5HJL.js → chunk-QPA2QFBW.js} +2 -2
  74. package/chunks/{chunk-W42YGWDC.js → chunk-RCFRL7TU.js} +29 -29
  75. package/chunks/{chunk-MDRVMHR5.js → chunk-RNZUPQGL.js} +1 -1
  76. package/chunks/{chunk-MDZE3I5B.js → chunk-RY72YSAA.js} +3 -3
  77. package/chunks/{chunk-7DHQ5FE7.js → chunk-S5PANTPK.js} +1 -1
  78. package/chunks/{chunk-IQS3YNFT.js → chunk-SVAHXLCJ.js} +1 -1
  79. package/chunks/{chunk-SY5UOOLE.js → chunk-TKUUQQPJ.js} +2 -2
  80. package/chunks/{chunk-45LWV5IN.js → chunk-TMHIHFIQ.js} +3 -3
  81. package/chunks/{chunk-KH547BMV.js → chunk-TUG27SFT.js} +1 -1
  82. package/chunks/{chunk-Z35PMMFQ.js → chunk-TYKTMI53.js} +2 -2
  83. package/chunks/{chunk-MLMRVKRY.js → chunk-UMXXMSBY.js} +1 -1
  84. package/chunks/{chunk-GHFDVXXW.js → chunk-UYHFZIP7.js} +2 -2
  85. package/chunks/{chunk-VCUEXE3H.js → chunk-UZ2FQHDY.js} +2 -2
  86. package/chunks/{chunk-Y77F2ZSE.js → chunk-UZRJREKO.js} +2 -2
  87. package/chunks/{chunk-MEHOIUQO.js → chunk-WBPDZZK6.js} +1 -1
  88. package/chunks/{chunk-SQRKCXPM.js → chunk-WGCCUTSJ.js} +2 -2
  89. package/chunks/{chunk-35WHEBW3.js → chunk-WQRIF2GW.js} +5 -5
  90. package/chunks/{chunk-HV7DTSIC.js → chunk-WX4F4LQB.js} +1 -1
  91. package/chunks/{chunk-756Q43CP.js → chunk-X7CIK4K3.js} +3 -3
  92. package/chunks/{chunk-FQZNP6Z5.js → chunk-XLPVS4VE.js} +2 -2
  93. package/chunks/{chunk-MYLH5UBR.js → chunk-XNIKIVSI.js} +2 -2
  94. package/chunks/{chunk-NO5DFAGI.js → chunk-XYM4OCYT.js} +1 -1
  95. package/chunks/{chunk-XOT6SBGY.js → chunk-XZBGYXOF.js} +30 -30
  96. package/chunks/{chunk-7BEB4OCA.js → chunk-YYEX5AY7.js} +3 -3
  97. package/chunks/{chunk-2SJEYSJ5.js → chunk-YZGJCZRP.js} +2 -2
  98. package/chunks/{chunk-K3QLKXBZ.js → chunk-Z3J2KLHF.js} +1 -1
  99. package/chunks/{chunk-GXQSKSIX.js → chunk-ZUZPYKGD.js} +3 -3
  100. package/chunks/{codex-subagent-executor-NKIAVWGC.js → codex-subagent-executor-DEVZQMPB.js} +21 -21
  101. package/chunks/{contextCommand-5JWT6VQL.js → contextCommand-DGKWM4NZ.js} +21 -21
  102. package/chunks/{core-runtime-7DRPFC35.js → core-runtime-7J4OKDR6.js} +19 -19
  103. package/chunks/{create-sub-session-3YQEERSH.js → create-sub-session-OGTRQHSU.js} +20 -20
  104. package/chunks/{daemon-git-worktree-guard-VFOGBZHD.js → daemon-git-worktree-guard-CEZNAR3Z.js} +19 -19
  105. package/chunks/{daemon-status-provider-IIFM5IM6.js → daemon-status-provider-LF3B6UXU.js} +25 -25
  106. package/chunks/{daemon-trust-policy-AVBAHIIT.js → daemon-trust-policy-IB6AAVWQ.js} +25 -25
  107. package/chunks/{daemon-trust-policy-monitor-KKXFYM52.js → daemon-trust-policy-monitor-DEQXLLV6.js} +25 -25
  108. package/chunks/{deferred-core-runtime-3MIPB4S7.js → deferred-core-runtime-BR3RV72S.js} +19 -19
  109. package/chunks/{edit-PPJLVA5I.js → edit-IJHH2VAZ.js} +13 -13
  110. package/chunks/{en-V375KBHU.js → en-QZTJJ53G.js} +1 -1
  111. package/chunks/{enterPlanMode-YJTR3OC2.js → enterPlanMode-VN5F3JAN.js} +11 -11
  112. package/chunks/{environment-PQMV73WH.js → environment-SYBREZPQ.js} +21 -21
  113. package/chunks/{errors-YXLBIGK2.js → errors-GKHUBG6I.js} +21 -21
  114. package/chunks/{execution-tool-PRN55ECE.js → execution-tool-TYE46Z36.js} +13 -13
  115. package/chunks/{execution-worker-5VUJKVPI.js → execution-worker-ITSXGSFL.js} +16 -16
  116. package/chunks/{exitPlanMode-3SOHTPAM.js → exitPlanMode-F5PBD2OY.js} +11 -11
  117. package/chunks/{fast-path-KKKMA4OP.js → fast-path-AIZYBU4W.js} +2 -2
  118. package/chunks/{foreground-runner-G3TYGJAE.js → foreground-runner-2S5RTRTB.js} +21 -21
  119. package/chunks/{gateway-content-generator-URNHKQ6P.js → gateway-content-generator-GVS3RBAF.js} +3 -12
  120. package/chunks/{gateway-models-UR5GHR6N.js → gateway-models-AVIGEUZM.js} +4 -4
  121. package/chunks/{gateway-transfer-OASSZYSK.js → gateway-transfer-TGIGDUAO.js} +2 -2
  122. package/chunks/{glob-5AEFGOMN.js → glob-F3357FLD.js} +11 -11
  123. package/chunks/{goal-tools-O5TA2PQY.js → goal-tools-4R5NLGMM.js} +11 -11
  124. package/chunks/{handleAutoUpdate-JAQEKGA7.js → handleAutoUpdate-5FT4LAN5.js} +22 -22
  125. package/chunks/{i18n-SKUHM5IJ.js → i18n-EFQST3HJ.js} +20 -20
  126. package/chunks/{initializer-XZ6MXFUA.js → initializer-5BM7GHYR.js} +25 -25
  127. package/chunks/{installationInfo-YXI3S52N.js → installationInfo-L6VPE6M6.js} +19 -19
  128. package/chunks/{list-K3KSNZSU.js → list-P6KNGAPT.js} +27 -27
  129. package/chunks/{llm-DMR52SHW.js → llm-4VX7ZXA5.js} +50 -50
  130. package/chunks/{llm-content-generator-UWKSCTYE.js → llm-content-generator-QH27IAD4.js} +4 -4
  131. package/chunks/{loadedSettingsAdapter-TW2IMB6V.js → loadedSettingsAdapter-D2TYDE27.js} +25 -25
  132. package/chunks/{local-execution-environment-KH5EESSY.js → local-execution-environment-W6B5BQT2.js} +16 -16
  133. package/chunks/{loggingContentGenerator-T2W2WRJJ.js → loggingContentGenerator-FOXNBVTQ.js} +11 -11
  134. package/chunks/{managed-npm-update-6RQYY3YZ.js → managed-npm-update-WNHUJE4K.js} +19 -19
  135. package/chunks/{mcp-64G5H2OG.js → mcp-BRXFJJXC.js} +25 -25
  136. package/chunks/{model-call-collection-Z4NJZHIV.js → model-call-collection-EFM4RWYK.js} +1 -1
  137. package/chunks/{model-configuration-Q36E3EFG.js → model-configuration-DFJ3NVS4.js} +26 -26
  138. package/chunks/{modelConfigUtils-7LRIWH6S.js → modelConfigUtils-PIQRTO2E.js} +21 -21
  139. package/chunks/{monitor-VT7Z5NIW.js → monitor-HXQGZ63J.js} +11 -11
  140. package/chunks/{nonInteractiveCli-YTRGNVIT.js → nonInteractiveCli-JZAS6MYI.js} +53 -53
  141. package/chunks/{nonInteractiveToolExecutor-KCT5X3VP.js → nonInteractiveToolExecutor-32SJO66K.js} +12 -12
  142. package/chunks/{notebook-edit-BTEP4ZZF.js → notebook-edit-RIX66WFO.js} +12 -12
  143. package/chunks/{omni-J52AX5TE.js → omni-TL2SR2VT.js} +11 -11
  144. package/chunks/{openaiContentGenerator-I2O3ZSYA.js → openaiContentGenerator-MWZADHRS.js} +8 -8
  145. package/chunks/{openaiResponsesContentGenerator-FUJIJGE2.js → openaiResponsesContentGenerator-GUROOEXJ.js} +6 -6
  146. package/chunks/{processUtils-BPHUSEPE.js → processUtils-RZ25HNGW.js} +2 -2
  147. package/chunks/{prompt-terminal-ledger-JAMNBNXB.js → prompt-terminal-ledger-I2ZCR7LT.js} +20 -20
  148. package/chunks/{pt-554PEF6Z.js → pt-KE77XTFU.js} +1 -1
  149. package/chunks/{reactive-degrade-XI6MKZZ5.js → reactive-degrade-S6QGOIYE.js} +10 -10
  150. package/chunks/{read-file-TXVD2R3P.js → read-file-WPFI7W7W.js} +1 -1
  151. package/chunks/{resumeHistoryUtils-2SRSXIHZ.js → resumeHistoryUtils-KC3VSBOK.js} +23 -23
  152. package/chunks/{ripGrep-IZ3IBKVF.js → ripGrep-ITJVTSBB.js} +1 -1
  153. package/chunks/{run-o1-code-serve-XO4BHKDA.js → run-o1-code-serve-DMNOFL5I.js} +32 -32
  154. package/chunks/{sandboxConfig-YTUMPCXL.js → sandboxConfig-UREZLNY5.js} +19 -19
  155. package/chunks/{scheduled-tasks-KJYPVS4M.js → scheduled-tasks-4TSJRI7L.js} +24 -24
  156. package/chunks/{scheduler-IAQQQQYN.js → scheduler-YEXV6FWX.js} +21 -21
  157. package/chunks/{serve-3LSIZROT.js → serve-P6ZWBYLD.js} +25 -25
  158. package/chunks/{server-2YOZRQDZ.js → server-IDLNSTVU.js} +50 -50
  159. package/chunks/{session-JVXNBIG2.js → session-AGIGE566.js} +2 -2
  160. package/chunks/{session-G6BRGHF4.js → session-V7W2CO63.js} +54 -54
  161. package/chunks/{session-attachments-root-57AW3DJA.js → session-attachments-root-RMQY3RSU.js} +19 -19
  162. package/chunks/{session-pr-refresh-KVCFM7XO.js → session-pr-refresh-INWCF25W.js} +23 -23
  163. package/chunks/{settings-LEYMP47D.js → settings-F7HNDOI3.js} +24 -24
  164. package/chunks/{shell-IZZXIZEA.js → shell-YI3EZVFU.js} +11 -11
  165. package/chunks/{skill-VKY4NL3S.js → skill-T4SHC5YA.js} +1 -1
  166. package/chunks/{skill-settings-II2S2X4N.js → skill-settings-XQZBNWPU.js} +24 -24
  167. package/chunks/{spawnChannel-5ZGURNUI.js → spawnChannel-QG5LME3U.js} +20 -20
  168. package/chunks/{standalone-update-3WGDHWYQ.js → standalone-update-XKSN524Y.js} +21 -21
  169. package/chunks/{startInteractiveUI-ILJJTRGB.js → startInteractiveUI-DOTLRPJU.js} +63 -63
  170. package/chunks/{supervisor-runner-JTBZ6TKM.js → supervisor-runner-F5EFU77L.js} +2 -2
  171. package/chunks/{team-create-OB7H2J22.js → team-create-NU3EEP3T.js} +11 -11
  172. package/chunks/{team-plan-approval-IWAVB7GG.js → team-plan-approval-4PRDOAZS.js} +11 -11
  173. package/chunks/{terminal-image-renderer-TKSJWK74.js → terminal-image-renderer-SES2LRY5.js} +19 -19
  174. package/chunks/{theme-manager-PMVUV6N4.js → theme-manager-QP6OSTOL.js} +19 -19
  175. package/chunks/{tool-result-media-YXNXZVPE.js → tool-result-media-DSD3N5M2.js} +11 -11
  176. package/chunks/{tool-search-MCUYQHXS.js → tool-search-Q6SZNELK.js} +1 -1
  177. package/chunks/{total-session-admission-47PQOJF4.js → total-session-admission-WVGZBP2Q.js} +21 -21
  178. package/chunks/{trustedFolders-YQXN7ZK7.js → trustedFolders-QGOF5WSJ.js} +20 -20
  179. package/chunks/{update-relaunch-IJ2CZAKA.js → update-relaunch-RQZLENGZ.js} +5 -5
  180. package/chunks/{updateCheck-ZLTZQV3Q.js → updateCheck-ITHNHYMP.js} +21 -21
  181. package/chunks/{upload-config-P5BLCB72.js → upload-config-DTS35OJ4.js} +8 -8
  182. package/chunks/{useAutoAcceptIndicator-KS6UQLAF.js → useAutoAcceptIndicator-HD5PM3HU.js} +27 -27
  183. package/chunks/{validateNonInterActiveAuth-JFHD2CGM.js → validateNonInterActiveAuth-6GZS5P3T.js} +50 -50
  184. package/chunks/{version-JYHYRKC2.js → version-PQRVHSN5.js} +1 -1
  185. package/chunks/{web-fetch-QS7AL72Y.js → web-fetch-2FF46GWO.js} +1 -1
  186. package/chunks/{web-search-M5YLCDCJ.js → web-search-4NPXD5EX.js} +8 -8
  187. package/chunks/{workflow-QIHDEVAH.js → workflow-5UNTQYCA.js} +12 -12
  188. package/chunks/{workspace-providers-status-BBQTHMSA.js → workspace-providers-status-QCWYNTE4.js} +29 -29
  189. package/chunks/{workspace-registration-store-X3UYZFNJ.js → workspace-registration-store-GI4BDHWO.js} +1 -1
  190. package/chunks/{workspace-registry-FFHZ2EVX.js → workspace-registry-5CEMAFKO.js} +21 -21
  191. package/chunks/{workspace-runtime-coordinator-BAGT7DSO.js → workspace-runtime-coordinator-VO4CAZTJ.js} +21 -21
  192. package/chunks/{workspace-service-J24VVFZM.js → workspace-service-WDRYATAD.js} +28 -28
  193. package/chunks/{workspace-skills-status-UZ54UGI2.js → workspace-skills-status-4EJ55OP3.js} +25 -25
  194. package/chunks/{workspace-trust-reconciler-GTJFOGCS.js → workspace-trust-reconciler-4WGSO4Y2.js} +27 -27
  195. package/chunks/{write-file-4WGBKBGB.js → write-file-SQRFRCMF.js} +13 -13
  196. package/chunks/{zoom-image-OYRRFO65.js → zoom-image-A7AQXESI.js} +1 -1
  197. package/cli.js +15 -15
  198. package/execution-worker.js +1 -1
  199. package/export-transcript-document.js +1 -1
  200. package/locales/en.js +2 -2
  201. package/locales/pt.js +2 -2
  202. package/package.json +2 -2
  203. package/release-notes.json +11 -0
  204. package/web-shell/assets/{abnfDiagram-VCTEODGH-D-bBdnGb.js → abnfDiagram-VCTEODGH-CqwAa90O.js} +1 -1
  205. package/web-shell/assets/{arc-B2SS2QTX.js → arc-CdZs0B8K.js} +1 -1
  206. package/web-shell/assets/{architectureDiagram-5GKGNRK7-DFVuGyYx.js → architectureDiagram-5GKGNRK7-BGpvcFmB.js} +1 -1
  207. package/web-shell/assets/{blockDiagram-NRAW4CY4-CS2hSeXi.js → blockDiagram-NRAW4CY4-DKvD1wqe.js} +1 -1
  208. package/web-shell/assets/{c4Diagram-UCG6FXSJ-DQShkkBR.js → c4Diagram-UCG6FXSJ-B5kMpVzV.js} +1 -1
  209. package/web-shell/assets/channel-spBLS8re.js +1 -0
  210. package/web-shell/assets/{chunk-2Q5K7J3B-BwTtOt8R.js → chunk-2Q5K7J3B-CarbSU5U.js} +1 -1
  211. package/web-shell/assets/{chunk-5VM5RSS4-Bj6h0Dwa.js → chunk-5VM5RSS4-C97rHSe6.js} +1 -1
  212. package/web-shell/assets/{chunk-F27PBJKO-kC66vkrG.js → chunk-F27PBJKO-KY1lLlss.js} +1 -1
  213. package/web-shell/assets/{chunk-G27WJ6UU-Cgvg9nvk.js → chunk-G27WJ6UU-STMMZ9uf.js} +1 -1
  214. package/web-shell/assets/{chunk-JWPE2WC7-EzC494sa.js → chunk-JWPE2WC7-DNGql86v.js} +1 -1
  215. package/web-shell/assets/{chunk-LCL6LL3I-utra0L7l.js → chunk-LCL6LL3I-g7ggXfgF.js} +1 -1
  216. package/web-shell/assets/{chunk-POPQ4Y6H-xUBwWPMI.js → chunk-POPQ4Y6H-DiIvjobg.js} +1 -1
  217. package/web-shell/assets/{chunk-SVP7TREG-CSs6ULGi.js → chunk-SVP7TREG-CQi6FlDq.js} +1 -1
  218. package/web-shell/assets/{chunk-XXDRQBXY-CWPn3dOd.js → chunk-XXDRQBXY-CCF9kf76.js} +1 -1
  219. package/web-shell/assets/classDiagram-DTDB5LWJ-DHfBY3bU.js +1 -0
  220. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DHfBY3bU.js +1 -0
  221. package/web-shell/assets/{cose-bilkent-JH36ORCC-Dp7POI99.js → cose-bilkent-JH36ORCC-BFqNsB9d.js} +1 -1
  222. package/web-shell/assets/{cynefin-OW5HDTMX-CnqWFq9t.js → cynefin-OW5HDTMX-foxY48wq.js} +1 -1
  223. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BtgoKTG2.js → cynefinDiagram-5FMLGOSQ-BF0MhsB1.js} +1 -1
  224. package/web-shell/assets/{dagre-3AP2YEHR-BkDKcnoQ.js → dagre-3AP2YEHR-BVhyHdgG.js} +1 -1
  225. package/web-shell/assets/{diagram-S7CK7UJ4-CoCStDfp.js → diagram-S7CK7UJ4-DlPbu_2C.js} +1 -1
  226. package/web-shell/assets/{diagram-UQ7AKVKN-D6a6j3_H.js → diagram-UQ7AKVKN-BrRGdIBC.js} +1 -1
  227. package/web-shell/assets/{diagram-VSXAHHWV-Da_ctgX_.js → diagram-VSXAHHWV-DIIdnWOZ.js} +1 -1
  228. package/web-shell/assets/{diagram-VX7I27RA-CoToXRBH.js → diagram-VX7I27RA-DKJ4Hon5.js} +1 -1
  229. package/web-shell/assets/{diagram-Z3DM3KII-DlRPF3da.js → diagram-Z3DM3KII-BMh79L6v.js} +1 -1
  230. package/web-shell/assets/{ebnfDiagram-PWID7BFC-B0owtdgg.js → ebnfDiagram-PWID7BFC-6COU12BY.js} +1 -1
  231. package/web-shell/assets/{erDiagram-SSCWMZ5O-DZv1xcIp.js → erDiagram-SSCWMZ5O-CcLzeuuu.js} +1 -1
  232. package/web-shell/assets/{flowDiagram-A5DVABFB-DqXIgApm.js → flowDiagram-A5DVABFB-CrlfzZ82.js} +1 -1
  233. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-hp-3Nfao.js → ganttDiagram-EL5Y4UJY-BpsX2Vkk.js} +1 -1
  234. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-pHy6E6Jm.js → gitGraphDiagram-WWUBYQGX-D903Adso.js} +1 -1
  235. package/web-shell/assets/{index-BM9Xm2Dz.js → index-CM0Kvf-S.js} +1 -1
  236. package/web-shell/assets/{index-zRWCDwX8.js → index-CWv95sAh.js} +3 -3
  237. package/web-shell/assets/{infoDiagram-RXCK75RN-DQlz-0GH.js → infoDiagram-RXCK75RN-CZMYe1jg.js} +1 -1
  238. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-BA43ebt4.js → ishikawaDiagram-5VMMS53U-DoKU-MJp.js} +1 -1
  239. package/web-shell/assets/{journeyDiagram-EYS64GPL-DDlU7qPX.js → journeyDiagram-EYS64GPL-CcVcGXwY.js} +1 -1
  240. package/web-shell/assets/{kanban-definition-3QL26DDD-DaT1T9VO.js → kanban-definition-3QL26DDD-DNJWHXd2.js} +1 -1
  241. package/web-shell/assets/{layout-CGoDE0Jk.js → layout-WbjoWWSC.js} +1 -1
  242. package/web-shell/assets/{linear-Dlcix00h.js → linear-B2bPgk9B.js} +1 -1
  243. package/web-shell/assets/{mermaid.core-CTrkfnVV.js → mermaid.core-TSPqR9Dd.js} +6 -6
  244. package/web-shell/assets/{mindmap-definition-FBJOCRG2-CKlmCDs2.js → mindmap-definition-FBJOCRG2-BRdNba8K.js} +1 -1
  245. package/web-shell/assets/{pegDiagram-XKGWAZYB-C-81xWvj.js → pegDiagram-XKGWAZYB-BbbExfML.js} +1 -1
  246. package/web-shell/assets/{pieDiagram-E7YTZNPT-DkWgCGEs.js → pieDiagram-E7YTZNPT-DSOyG0Za.js} +1 -1
  247. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-B8ItQsl-.js → quadrantDiagram-AXDQQJYC-DuJwS5Rt.js} +1 -1
  248. package/web-shell/assets/{railroadDiagram-O6MQD6OU-BZMa6PzJ.js → railroadDiagram-O6MQD6OU-DeiuEObW.js} +1 -1
  249. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-BGNIJd20.js → requirementDiagram-EFPCY7ZU-B5Ryx9ZO.js} +1 -1
  250. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-BfD9Ralh.js → sankeyDiagram-P5KCCOFB-Bcsx8xY3.js} +1 -1
  251. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BHv0Frcl.js → sequenceDiagram-WJ2MYXX4-DiQoUwbA.js} +1 -1
  252. package/web-shell/assets/{sizeCapture-X5ZJPWSS-Dz7SvtQb.js → sizeCapture-X5ZJPWSS-DzlgtBvm.js} +1 -1
  253. package/web-shell/assets/{stateDiagram-HBIQ2CUA-CgkD_KYa.js → stateDiagram-HBIQ2CUA-DzSMfPik.js} +1 -1
  254. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BDaNtSQo.js +1 -0
  255. package/web-shell/assets/{swimlanes-XN3QIQJK-Bv1d8x7Q.js → swimlanes-XN3QIQJK-UmIPzcU2.js} +1 -1
  256. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-D7IQzeGE.js +8 -0
  257. package/web-shell/assets/{timeline-definition-24CTP7MA-B_3E6jPw.js → timeline-definition-24CTP7MA-CfUnj6Hp.js} +1 -1
  258. package/web-shell/assets/{vennDiagram-4TSXK5OY-OX4OfnpL.js → vennDiagram-4TSXK5OY-6f56tVPB.js} +1 -1
  259. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-agygocEg.js → wardleyDiagram-VM6X3IG4-BxKmrtwR.js} +1 -1
  260. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-Dlre674O.js → xychartDiagram-S5SC5T6Z-CJZBmbK2.js} +1 -1
  261. package/web-shell/index.html +1 -1
  262. package/web-shell/sw.js +1 -1
  263. package/web-shell/assets/channel-DV-9kalP.js +0 -1
  264. package/web-shell/assets/classDiagram-DTDB5LWJ-DN5tETa4.js +0 -1
  265. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DN5tETa4.js +0 -1
  266. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-uPaEMeEa.js +0 -1
  267. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DClL59AS.js +0 -8
@@ -2036,22 +2036,157 @@ __name(forget, "forget");
2036
2036
 
2037
2037
  // packages/core/src/mcp/token-storage/file-token-storage.ts
2038
2038
  init_esbuild_shims();
2039
+ import { promises as fs2 } from "node:fs";
2040
+ import * as path2 from "node:path";
2041
+ import * as crypto2 from "node:crypto";
2042
+
2043
+ // packages/core/src/mcp/token-storage/secret-key.ts
2044
+ init_esbuild_shims();
2039
2045
  import { promises as fs } from "node:fs";
2040
2046
  import * as path from "node:path";
2041
2047
  import * as os from "node:os";
2042
2048
  import * as crypto from "node:crypto";
2049
+ var SECRET_KEY_FILE_NAME = "secret-key-v1.json";
2050
+ var KEY_FILE_VERSION = 1;
2051
+ var KEY_BYTES = 32;
2052
+ var CHECK_LABEL = "o1-code-secret-key-check";
2053
+ var DamagedSecretKeyError = class extends Error {
2054
+ static {
2055
+ __name(this, "DamagedSecretKeyError");
2056
+ }
2057
+ filePath;
2058
+ constructor(filePath, options) {
2059
+ super(
2060
+ `${filePath} failed its integrity check: the secret key was modified or damaged`,
2061
+ options
2062
+ );
2063
+ this.name = "DamagedSecretKeyError";
2064
+ this.filePath = filePath;
2065
+ }
2066
+ };
2067
+ function checkValue(key) {
2068
+ return crypto.createHmac("sha256", key).update(CHECK_LABEL).digest("hex");
2069
+ }
2070
+ __name(checkValue, "checkValue");
2071
+ function keyId(check) {
2072
+ return check.slice(0, 16);
2073
+ }
2074
+ __name(keyId, "keyId");
2075
+ function serialize(key) {
2076
+ const file = {
2077
+ version: KEY_FILE_VERSION,
2078
+ key: key.toString("base64"),
2079
+ check: checkValue(key)
2080
+ };
2081
+ return `${JSON.stringify(file, null, 2)}
2082
+ `;
2083
+ }
2084
+ __name(serialize, "serialize");
2085
+ function parse(filePath, data) {
2086
+ let file;
2087
+ try {
2088
+ file = JSON.parse(data);
2089
+ } catch (error) {
2090
+ throw new DamagedSecretKeyError(filePath, { cause: error });
2091
+ }
2092
+ if (file === null || typeof file !== "object" || file.version !== KEY_FILE_VERSION || typeof file.key !== "string" || typeof file.check !== "string") {
2093
+ throw new DamagedSecretKeyError(filePath);
2094
+ }
2095
+ const key = Buffer.from(file.key, "base64");
2096
+ const check = checkValue(key);
2097
+ if (key.length !== KEY_BYTES || file.check.length !== check.length || !crypto.timingSafeEqual(Buffer.from(file.check), Buffer.from(check))) {
2098
+ throw new DamagedSecretKeyError(filePath);
2099
+ }
2100
+ return { key, id: keyId(check), filePath };
2101
+ }
2102
+ __name(parse, "parse");
2103
+ async function read(filePath) {
2104
+ let data;
2105
+ try {
2106
+ data = await fs.readFile(filePath, "utf-8");
2107
+ } catch (error) {
2108
+ if (error.code === "ENOENT") return null;
2109
+ throw error;
2110
+ }
2111
+ return parse(filePath, data);
2112
+ }
2113
+ __name(read, "read");
2114
+ async function create(filePath) {
2115
+ const dir = path.dirname(filePath);
2116
+ await fs.mkdir(dir, { recursive: true, mode: 448 });
2117
+ const content = serialize(crypto.randomBytes(KEY_BYTES));
2118
+ const tmpPath = path.join(
2119
+ dir,
2120
+ `.${SECRET_KEY_FILE_NAME}.${process.pid}.${crypto.randomBytes(6).toString("hex")}.tmp`
2121
+ );
2122
+ await fs.writeFile(tmpPath, content, { mode: 384, flag: "wx" });
2123
+ try {
2124
+ await fs.link(tmpPath, filePath);
2125
+ } catch (error) {
2126
+ const code = error.code;
2127
+ if (code !== "EEXIST") {
2128
+ await fs.writeFile(filePath, content, { mode: 384, flag: "wx" });
2129
+ }
2130
+ } finally {
2131
+ await fs.unlink(tmpPath).catch(() => void 0);
2132
+ }
2133
+ const key = await read(filePath);
2134
+ if (!key) throw new DamagedSecretKeyError(filePath);
2135
+ return key;
2136
+ }
2137
+ __name(create, "create");
2138
+ var cache = /* @__PURE__ */ new Map();
2139
+ async function loadSecretKey(configDir, options) {
2140
+ const filePath = path.join(configDir, SECRET_KEY_FILE_NAME);
2141
+ const cached = cache.get(filePath);
2142
+ if (cached) return cached;
2143
+ let key = await read(filePath);
2144
+ if (!key && options.create) {
2145
+ key = await create(filePath);
2146
+ }
2147
+ if (key) cache.set(filePath, key);
2148
+ return key;
2149
+ }
2150
+ __name(loadSecretKey, "loadSecretKey");
2151
+ function legacySecretKey() {
2152
+ const salt = `${os.hostname()}-${os.userInfo().username}-o1-code`;
2153
+ return crypto.scryptSync("o1-code-oauth", salt, 32);
2154
+ }
2155
+ __name(legacySecretKey, "legacySecretKey");
2156
+
2157
+ // packages/core/src/mcp/token-storage/file-token-storage.ts
2158
+ var SEALED_PREFIX = "o1s2";
2159
+ var AUTH_TAG_BYTES = 16;
2160
+ function describeReason(filePath, reason) {
2161
+ switch (reason) {
2162
+ case "other-machine":
2163
+ return `${filePath} cannot be decrypted here: an earlier version saved it under another host name or user, or it is damaged`;
2164
+ case "other-key":
2165
+ return `${filePath} was sealed with another secret key: the key file of this o1-code home was replaced or recreated`;
2166
+ case "modified":
2167
+ return `${filePath} failed its integrity check: it was modified or damaged`;
2168
+ case "key-damaged":
2169
+ return `${filePath} failed its integrity check: the secret key was modified or damaged`;
2170
+ default:
2171
+ return `${filePath} cannot be read`;
2172
+ }
2173
+ }
2174
+ __name(describeReason, "describeReason");
2043
2175
  var UnreadableSecretFileError = class extends Error {
2044
2176
  static {
2045
2177
  __name(this, "UnreadableSecretFileError");
2046
2178
  }
2047
2179
  filePath;
2180
+ reason;
2048
2181
  constructor(filePath, options) {
2182
+ const reason = options?.reason ?? "other-machine";
2049
2183
  super(
2050
- `${filePath} cannot be decrypted on this machine: it was saved under another host name or user, or it is damaged`,
2051
- options
2184
+ describeReason(filePath, reason),
2185
+ options?.cause === void 0 ? void 0 : { cause: options.cause }
2052
2186
  );
2053
2187
  this.name = "UnreadableSecretFileError";
2054
2188
  this.filePath = filePath;
2189
+ this.reason = reason;
2055
2190
  }
2056
2191
  };
2057
2192
  function isUnreadableSecretFileError(error) {
@@ -2065,91 +2200,177 @@ function backupStamp(date) {
2065
2200
  __name(backupStamp, "backupStamp");
2066
2201
  async function setAsideUnreadableSecretFile(filePath, now = /* @__PURE__ */ new Date()) {
2067
2202
  const backupPath = `${filePath}.unreadable-${backupStamp(now)}.bak`;
2068
- await fs.rename(filePath, backupPath);
2203
+ await fs2.rename(filePath, backupPath);
2069
2204
  return backupPath;
2070
2205
  }
2071
2206
  __name(setAsideUnreadableSecretFile, "setAsideUnreadableSecretFile");
2072
- var FileTokenStorage = class extends BaseTokenStorage {
2207
+ var FileTokenStorage = class _FileTokenStorage extends BaseTokenStorage {
2073
2208
  static {
2074
2209
  __name(this, "FileTokenStorage");
2075
2210
  }
2211
+ configDir;
2076
2212
  tokenFilePath;
2077
2213
  secretFilePath;
2078
- encryptionKey;
2079
2214
  constructor(serviceName) {
2080
2215
  super(serviceName);
2081
- const configDir = Storage.getGlobalO1CodeDir();
2082
- this.tokenFilePath = path.join(configDir, "mcp-oauth-tokens-v2.json");
2083
- this.secretFilePath = path.join(configDir, "extension-secrets-v1.json");
2084
- this.encryptionKey = this.deriveEncryptionKey();
2085
- }
2086
- deriveEncryptionKey() {
2087
- const salt = `${os.hostname()}-${os.userInfo().username}-o1-code`;
2088
- return crypto.scryptSync("o1-code-oauth", salt, 32);
2089
- }
2090
- encrypt(text) {
2091
- const iv = crypto.randomBytes(16);
2092
- const cipher = crypto.createCipheriv("aes-256-gcm", this.encryptionKey, iv);
2093
- let encrypted = cipher.update(text, "utf8", "hex");
2094
- encrypted += cipher.final("hex");
2095
- const authTag = cipher.getAuthTag();
2096
- return iv.toString("hex") + ":" + authTag.toString("hex") + ":" + encrypted;
2097
- }
2098
- decrypt(encryptedData) {
2099
- const parts = encryptedData.split(":");
2100
- if (parts.length !== 3) {
2101
- throw new Error("Invalid encrypted data format");
2216
+ this.configDir = Storage.getGlobalO1CodeDir();
2217
+ this.tokenFilePath = path2.join(this.configDir, "mcp-oauth-tokens-v2.json");
2218
+ this.secretFilePath = path2.join(
2219
+ this.configDir,
2220
+ "extension-secrets-v1.json"
2221
+ );
2222
+ }
2223
+ async secretKey(create2) {
2224
+ try {
2225
+ return await loadSecretKey(this.configDir, { create: create2 });
2226
+ } catch (error) {
2227
+ if (error instanceof DamagedSecretKeyError) {
2228
+ throw new UnreadableSecretFileError(error.filePath, {
2229
+ reason: "key-damaged",
2230
+ cause: error
2231
+ });
2232
+ }
2233
+ throw error;
2234
+ }
2235
+ }
2236
+ // Binds the ciphertext to the file it was written to, so a sealed file
2237
+ // moved under another sealed file's name fails its integrity check.
2238
+ static associatedData(filePath) {
2239
+ return Buffer.from(`o1-code:${path2.basename(filePath)}`, "utf8");
2240
+ }
2241
+ async encrypt(text, filePath) {
2242
+ const secretKey = await this.secretKey(true);
2243
+ if (!secretKey) {
2244
+ throw new Error("The secret key could not be created");
2245
+ }
2246
+ const iv = crypto2.randomBytes(16);
2247
+ const cipher = crypto2.createCipheriv("aes-256-gcm", secretKey.key, iv, {
2248
+ authTagLength: AUTH_TAG_BYTES
2249
+ });
2250
+ cipher.setAAD(_FileTokenStorage.associatedData(filePath));
2251
+ const encrypted = cipher.update(text, "utf8", "hex") + cipher.final("hex");
2252
+ return [
2253
+ SEALED_PREFIX,
2254
+ secretKey.id,
2255
+ iv.toString("hex"),
2256
+ cipher.getAuthTag().toString("hex"),
2257
+ encrypted
2258
+ ].join(":");
2259
+ }
2260
+ /**
2261
+ * Opens a sealed file. `legacy` is set when it was sealed under the host-bound
2262
+ * key of an earlier version, so the caller seals it again under the new key.
2263
+ */
2264
+ async decrypt(sealed, filePath) {
2265
+ const parts = sealed.trim().split(":");
2266
+ if (parts.length === 3) {
2267
+ try {
2268
+ return {
2269
+ text: _FileTokenStorage.open(legacySecretKey(), parts, null),
2270
+ legacy: true
2271
+ };
2272
+ } catch (error) {
2273
+ throw new UnreadableSecretFileError(filePath, {
2274
+ reason: "other-machine",
2275
+ cause: error
2276
+ });
2277
+ }
2278
+ }
2279
+ if (parts.length !== 5 || parts[0] !== SEALED_PREFIX) {
2280
+ throw new UnreadableSecretFileError(filePath, { reason: "modified" });
2102
2281
  }
2103
- const iv = Buffer.from(parts[0], "hex");
2104
- const authTag = Buffer.from(parts[1], "hex");
2105
- const encrypted = parts[2];
2106
- const decipher = crypto.createDecipheriv(
2282
+ const secretKey = await this.secretKey(false);
2283
+ if (!secretKey || secretKey.id !== parts[1]) {
2284
+ throw new UnreadableSecretFileError(filePath, { reason: "other-key" });
2285
+ }
2286
+ try {
2287
+ return {
2288
+ text: _FileTokenStorage.open(
2289
+ secretKey.key,
2290
+ parts.slice(2),
2291
+ _FileTokenStorage.associatedData(filePath)
2292
+ ),
2293
+ legacy: false
2294
+ };
2295
+ } catch (error) {
2296
+ throw new UnreadableSecretFileError(filePath, {
2297
+ reason: "modified",
2298
+ cause: error
2299
+ });
2300
+ }
2301
+ }
2302
+ static open(key, [iv, authTag, encrypted], associatedData) {
2303
+ const decipher = crypto2.createDecipheriv(
2107
2304
  "aes-256-gcm",
2108
- this.encryptionKey,
2109
- iv
2305
+ key,
2306
+ Buffer.from(iv, "hex"),
2307
+ { authTagLength: AUTH_TAG_BYTES }
2110
2308
  );
2111
- decipher.setAuthTag(authTag);
2112
- let decrypted = decipher.update(encrypted, "hex", "utf8");
2113
- decrypted += decipher.final("utf8");
2114
- return decrypted;
2115
- }
2116
- async ensureDirectoryExists() {
2117
- const dir = path.dirname(this.tokenFilePath);
2118
- await fs.mkdir(dir, { recursive: true, mode: 448 });
2309
+ decipher.setAuthTag(Buffer.from(authTag, "hex"));
2310
+ if (associatedData) decipher.setAAD(associatedData);
2311
+ return decipher.update(encrypted, "hex", "utf8") + decipher.final("utf8");
2119
2312
  }
2120
- async loadTokens(allowMissing = false) {
2313
+ /** Reads and opens a sealed file; null when it does not exist. */
2314
+ async readSealed(filePath) {
2315
+ let data;
2121
2316
  try {
2122
- const data = await fs.readFile(this.tokenFilePath, "utf-8");
2123
- const decrypted = this.decrypt(data);
2124
- const tokens = JSON.parse(decrypted);
2125
- return new Map(Object.entries(tokens));
2317
+ data = await fs2.readFile(filePath, "utf-8");
2126
2318
  } catch (error) {
2127
- const err = error;
2128
- if (err.code === "ENOENT") {
2129
- if (allowMissing) {
2130
- return /* @__PURE__ */ new Map();
2131
- }
2132
- throw new Error("Token file does not exist");
2133
- }
2134
- if (err.message?.includes("Invalid encrypted data format") || err.message?.includes(
2135
- "Unsupported state or unable to authenticate data"
2136
- )) {
2137
- throw new Error("Token file corrupted");
2319
+ if (error.code === "ENOENT") {
2320
+ return null;
2138
2321
  }
2139
2322
  throw error;
2140
2323
  }
2324
+ return this.decrypt(data, filePath);
2141
2325
  }
2142
- async saveTokens(tokens) {
2326
+ async writeSealed(filePath, text) {
2143
2327
  await this.ensureDirectoryExists();
2144
- const data = Object.fromEntries(tokens);
2145
- const json = JSON.stringify(data, null, 2);
2146
- const encrypted = this.encrypt(json);
2147
- await atomicWriteFile(this.tokenFilePath, encrypted, {
2328
+ const encrypted = await this.encrypt(text, filePath);
2329
+ await atomicWriteFile(filePath, encrypted, {
2148
2330
  mode: 384,
2149
2331
  forceMode: true,
2150
2332
  noFollow: true
2151
2333
  });
2152
2334
  }
2335
+ // Moving a file sealed by an earlier version onto the new key is best
2336
+ // effort: the content was read, and the next write seals it anyway.
2337
+ async migrate(filePath, text) {
2338
+ await this.writeSealed(filePath, text).catch(() => void 0);
2339
+ }
2340
+ async ensureDirectoryExists() {
2341
+ await fs2.mkdir(this.configDir, { recursive: true, mode: 448 });
2342
+ }
2343
+ async loadTokens(allowMissing = false) {
2344
+ let opened;
2345
+ try {
2346
+ opened = await this.readSealed(this.tokenFilePath);
2347
+ } catch (error) {
2348
+ if (isUnreadableSecretFileError(error)) {
2349
+ throw new Error("Token file corrupted", { cause: error });
2350
+ }
2351
+ throw error;
2352
+ }
2353
+ if (!opened) {
2354
+ if (allowMissing) {
2355
+ return /* @__PURE__ */ new Map();
2356
+ }
2357
+ throw new Error("Token file does not exist");
2358
+ }
2359
+ let tokens;
2360
+ try {
2361
+ tokens = JSON.parse(opened.text);
2362
+ } catch (error) {
2363
+ throw new Error("Token file corrupted", { cause: error });
2364
+ }
2365
+ if (opened.legacy) {
2366
+ await this.migrate(this.tokenFilePath, opened.text);
2367
+ }
2368
+ return new Map(Object.entries(tokens));
2369
+ }
2370
+ async saveTokens(tokens) {
2371
+ const data = Object.fromEntries(tokens);
2372
+ await this.writeSealed(this.tokenFilePath, JSON.stringify(data, null, 2));
2373
+ }
2153
2374
  async getCredentials(serverName) {
2154
2375
  const tokens = await this.loadTokens();
2155
2376
  const credentials = tokens.get(serverName);
@@ -2179,7 +2400,7 @@ var FileTokenStorage = class extends BaseTokenStorage {
2179
2400
  tokens.delete(serverName);
2180
2401
  if (tokens.size === 0) {
2181
2402
  try {
2182
- await fs.unlink(this.tokenFilePath);
2403
+ await fs2.unlink(this.tokenFilePath);
2183
2404
  } catch (error) {
2184
2405
  const err = error;
2185
2406
  if (err.code !== "ENOENT") {
@@ -2206,7 +2427,7 @@ var FileTokenStorage = class extends BaseTokenStorage {
2206
2427
  }
2207
2428
  async clearAll() {
2208
2429
  try {
2209
- await fs.unlink(this.tokenFilePath);
2430
+ await fs2.unlink(this.tokenFilePath);
2210
2431
  } catch (error) {
2211
2432
  const err = error;
2212
2433
  if (err.code !== "ENOENT") {
@@ -2215,32 +2436,26 @@ var FileTokenStorage = class extends BaseTokenStorage {
2215
2436
  }
2216
2437
  }
2217
2438
  async loadSecrets() {
2218
- let data;
2219
- try {
2220
- data = await fs.readFile(this.secretFilePath, "utf-8");
2221
- } catch (error) {
2222
- const err = error;
2223
- if (err.code === "ENOENT") {
2224
- return {};
2225
- }
2226
- throw error;
2439
+ const opened = await this.readSealed(this.secretFilePath);
2440
+ if (!opened) {
2441
+ return {};
2227
2442
  }
2443
+ let secrets;
2228
2444
  try {
2229
- return JSON.parse(this.decrypt(data));
2445
+ secrets = JSON.parse(opened.text);
2230
2446
  } catch (error) {
2231
2447
  throw new UnreadableSecretFileError(this.secretFilePath, {
2448
+ reason: "modified",
2232
2449
  cause: error
2233
2450
  });
2234
2451
  }
2452
+ if (opened.legacy) {
2453
+ await this.migrate(this.secretFilePath, opened.text);
2454
+ }
2455
+ return secrets;
2235
2456
  }
2236
2457
  async saveSecrets(secrets) {
2237
- await this.ensureDirectoryExists();
2238
- const encrypted = this.encrypt(JSON.stringify(secrets));
2239
- await atomicWriteFile(this.secretFilePath, encrypted, {
2240
- mode: 384,
2241
- forceMode: true,
2242
- noFollow: true
2243
- });
2458
+ await this.writeSealed(this.secretFilePath, JSON.stringify(secrets));
2244
2459
  }
2245
2460
  // The encrypted file is always usable, so the file backend is always available.
2246
2461
  async isAvailable() {
@@ -2454,7 +2669,7 @@ __name(isO1ConnectError, "isO1ConnectError");
2454
2669
  function describeO1ConnectError(error) {
2455
2670
  if (isO1ConnectError(error) && error.code === "store_failed" && isUnreadableSecretFileError(error.cause)) {
2456
2671
  return {
2457
- message: `The secret store at ${error.cause.filePath} cannot be decrypted on this machine: it was saved under another host name or user, or it is damaged. Setting up the connection code again offers to keep it as a .bak and start a new one.`,
2672
+ message: `The secret store cannot be read: ${error.cause.message}. Setting up the connection code again offers to keep it as a .bak and start a new one.`,
2458
2673
  forgetAndSetUpAgain: false,
2459
2674
  unreadableSecretFile: error.cause.filePath
2460
2675
  };
@@ -2544,11 +2759,11 @@ export {
2544
2759
  };
2545
2760
  /**
2546
2761
  * @license
2547
- * Copyright 2025 Google LLC
2762
+ * Copyright 2026 o1-code contributors
2548
2763
  * SPDX-License-Identifier: Apache-2.0
2549
2764
  */
2550
2765
  /**
2551
2766
  * @license
2552
- * Copyright 2026 o1-code contributors
2767
+ * Copyright 2025 Google LLC
2553
2768
  * SPDX-License-Identifier: Apache-2.0
2554
2769
  */
@@ -2,7 +2,7 @@
2
2
  "use strict";
3
3
  import {
4
4
  DashScopeOpenAICompatibleProvider
5
- } from "./chunk-756Q43CP.js";
5
+ } from "./chunk-X7CIK4K3.js";
6
6
  import {
7
7
  init_esbuild_shims
8
8
  } from "./chunk-S2467S6L.js";
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-FGRVF6H3.js";
17
17
  import {
18
18
  MAX_REGISTERED_WORKSPACES
19
- } from "./chunk-Q2LPAA7C.js";
19
+ } from "./chunk-727PKWWT.js";
20
20
  import {
21
21
  CLIENT_MCP_OVER_WS_CONFIG_FLAG
22
22
  } from "./chunk-QTAUA6ED.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-LOWKYYPU.js";
11
+ } from "./chunk-MY6XO77V.js";
12
12
  import {
13
13
  resolveOpenAILogDir
14
14
  } from "./chunk-PZ5JMLBW.js";
15
15
  import {
16
16
  FILE_HISTORY_DIR,
17
17
  getSubagentsRootDir
18
- } from "./chunk-FE2ZH6WW.js";
18
+ } from "./chunk-22S35Z2A.js";
19
19
  import {
20
20
  createDebugLogger,
21
21
  sessionIdContext