@organizaone/o1-code 0.27.0 → 0.28.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 (267) hide show
  1. package/bundled/qc-helper/docs/configuration/auth.md +13 -1
  2. package/bundled/qc-helper/docs/features/commands.md +2 -0
  3. package/chunks/{MaxSizedBox-KRTRIJEA.js → MaxSizedBox-UGM4WNJZ.js} +15 -15
  4. package/chunks/{StandaloneSessionPicker-57TP44KF.js → StandaloneSessionPicker-LNBEBZCV.js} +31 -31
  5. package/chunks/{acp-subagent-executor-7764VWKH.js → acp-subagent-executor-6SLQGZBW.js} +17 -17
  6. package/chunks/{acpAgent-TQRW6SNF.js → acpAgent-AZRWMHQS.js} +57 -56
  7. package/chunks/{agent-P7LNA44U.js → agent-SW6B5GXR.js} +7 -7
  8. package/chunks/{agent-headless-FC25Z4YM.js → agent-headless-4T56G4HD.js} +7 -7
  9. package/chunks/{all-providers-IMJ6QB2I.js → all-providers-7XOONDDH.js} +2 -2
  10. package/chunks/{anthropicContentGenerator-V2MYNWJ3.js → anthropicContentGenerator-PCGLXAN2.js} +4 -4
  11. package/chunks/{bridge-LELJ7HU5.js → bridge-MMSBIFUO.js} +17 -17
  12. package/chunks/{chunk-MNLVE24R.js → chunk-2RXC7SUB.js} +2 -2
  13. package/chunks/{chunk-LBX7KU43.js → chunk-34DGARAI.js} +2 -2
  14. package/chunks/{chunk-7XELAF5M.js → chunk-4RJLQH7V.js} +2 -2
  15. package/chunks/{chunk-DKBLEAGB.js → chunk-4S3RAGV6.js} +2 -2
  16. package/chunks/{chunk-W7OUXB6F.js → chunk-5BFVYOZU.js} +7 -7
  17. package/chunks/{chunk-EVYREOIG.js → chunk-5GPXFBUV.js} +899 -435
  18. package/chunks/{chunk-KSO7FXQU.js → chunk-5T7HH4QY.js} +2 -2
  19. package/chunks/{chunk-N5TOXL3M.js → chunk-65WJP4PQ.js} +2 -2
  20. package/chunks/{chunk-IASFPTGI.js → chunk-6OYKQCEN.js} +4 -4
  21. package/chunks/{chunk-PMKHXJAS.js → chunk-6P2HD4R3.js} +1 -1
  22. package/chunks/{chunk-RHP5L25J.js → chunk-6RBLQ2FL.js} +2 -2
  23. package/chunks/{chunk-KRTC55S6.js → chunk-7OTIZIFD.js} +2 -2
  24. package/chunks/{chunk-6LRWLIIP.js → chunk-A2IU6TBE.js} +3 -3
  25. package/chunks/{chunk-3Q4HEGB4.js → chunk-ALTTOY55.js} +2 -2
  26. package/chunks/{chunk-OZKJJI3M.js → chunk-APDBWTCU.js} +1 -1
  27. package/chunks/{chunk-UCSYEHMM.js → chunk-CFDP4DA7.js} +1 -1
  28. package/chunks/{chunk-X2Z2Y7GS.js → chunk-CGQA3YUE.js} +13 -13
  29. package/chunks/{chunk-QHMLRTHD.js → chunk-CPGFB67A.js} +4 -4
  30. package/chunks/{chunk-EE265U33.js → chunk-DN5T6AO6.js} +12 -3
  31. package/chunks/{chunk-S5TFGSM3.js → chunk-DOYXO67V.js} +8 -8
  32. package/chunks/{chunk-OSCUGEQY.js → chunk-DVF2XU6V.js} +3 -3
  33. package/chunks/{chunk-FX3MQOWG.js → chunk-E7IFCC56.js} +2 -2
  34. package/chunks/{chunk-TJ7Q4T4P.js → chunk-ECVYOBZB.js} +1 -1
  35. package/chunks/{chunk-LP74MLBE.js → chunk-G4WEER2E.js} +1 -1
  36. package/chunks/{chunk-5N5IZTS4.js → chunk-GGY4LV75.js} +5 -5
  37. package/chunks/{chunk-YRYQC7GO.js → chunk-GTEXKLUX.js} +1 -1
  38. package/chunks/{chunk-EEJGIKBZ.js → chunk-HFVFJKSG.js} +2 -2
  39. package/chunks/{chunk-OILOGMTY.js → chunk-IKTZAG3N.js} +8 -8
  40. package/chunks/{chunk-5P7NQWE6.js → chunk-INL5DBBY.js} +2 -2
  41. package/chunks/{chunk-K7C5JCE7.js → chunk-IX3QKVUR.js} +1 -1
  42. package/chunks/{chunk-2J7VJ3WC.js → chunk-J6C5LOZU.js} +1 -1
  43. package/chunks/{chunk-IHW6SWYM.js → chunk-JNDU22G5.js} +1 -1
  44. package/chunks/{chunk-JPCQCUTS.js → chunk-KBQIWWPG.js} +2 -2
  45. package/chunks/{chunk-WXIXWH7M.js → chunk-KE2WGNUQ.js} +3 -3
  46. package/chunks/{chunk-VJ5BVYSX.js → chunk-L7HW4A3Y.js} +1 -1
  47. package/chunks/{chunk-GVZFZZPK.js → chunk-LFNFDXBQ.js} +7 -7
  48. package/chunks/{chunk-4UZ3FFYZ.js → chunk-LMZTL6BD.js} +1 -1
  49. package/chunks/{chunk-J6UKVQX6.js → chunk-LPAIZXYK.js} +1 -1
  50. package/chunks/{chunk-VM3UK3TM.js → chunk-LTDEWYQR.js} +1 -1
  51. package/chunks/{chunk-OR4LJOK3.js → chunk-LXGCQKEU.js} +2 -2
  52. package/chunks/{chunk-KIHOIJMQ.js → chunk-M57Y7TXE.js} +2 -2
  53. package/chunks/{chunk-R2MRYCHR.js → chunk-MRH3SYVM.js} +4 -4
  54. package/chunks/{chunk-ZX7J6RLA.js → chunk-O6IXKCOG.js} +1 -1
  55. package/chunks/{chunk-5QMNIJZ2.js → chunk-P2S3W72W.js} +4 -4
  56. package/chunks/{chunk-Z4HXY45F.js → chunk-PB7WGTEV.js} +1 -1
  57. package/chunks/{chunk-LYWFQGEQ.js → chunk-PMYMZZOL.js} +2 -2
  58. package/chunks/{chunk-CDHOAM2E.js → chunk-PPK5GYKF.js} +4 -4
  59. package/chunks/{chunk-C3UOC4LM.js → chunk-PQJUGWAL.js} +1 -1
  60. package/chunks/{chunk-NRDEPGVR.js → chunk-PVV4PS73.js} +3 -3
  61. package/chunks/{chunk-N5XZKWJE.js → chunk-QER5OBZQ.js} +1 -1
  62. package/chunks/{chunk-WTFO7IQM.js → chunk-QGSX4KMO.js} +3 -3
  63. package/chunks/{chunk-56HGN3XV.js → chunk-QNXMP5ZZ.js} +1 -1
  64. package/chunks/{chunk-4INACGIR.js → chunk-QPIQLU5S.js} +1 -1
  65. package/chunks/{chunk-6VT5UW66.js → chunk-R2EUGEY3.js} +1 -1
  66. package/chunks/{chunk-7UDEBIOM.js → chunk-R4MYRZBH.js} +4 -4
  67. package/chunks/{chunk-2GK6MYTP.js → chunk-R6KPCIC7.js} +2 -2
  68. package/chunks/{chunk-WRF5CAXN.js → chunk-RP5IWKTY.js} +1 -1
  69. package/chunks/{chunk-BNSYZYXR.js → chunk-S2J5OVPG.js} +2 -2
  70. package/chunks/{chunk-6A3PCAAJ.js → chunk-SNF3LRCO.js} +5 -5
  71. package/chunks/{chunk-PVJDGMEJ.js → chunk-T7AVLAAZ.js} +3 -3
  72. package/chunks/{chunk-DQGAJLPJ.js → chunk-TNDQQXZG.js} +5 -5
  73. package/chunks/{chunk-PQGBLD36.js → chunk-TQREMT4H.js} +1 -1
  74. package/chunks/{chunk-OKSSY3ER.js → chunk-TRRPP67K.js} +1 -1
  75. package/chunks/{chunk-ZGCZQZ24.js → chunk-U33LK6H3.js} +2 -2
  76. package/chunks/{chunk-OHPK6LGA.js → chunk-U3ALLY3C.js} +3 -3
  77. package/chunks/{chunk-SR7O2YDD.js → chunk-URV7VB5I.js} +62 -47
  78. package/chunks/{chunk-HTH6D3WU.js → chunk-UU6DJDI6.js} +3 -3
  79. package/chunks/{chunk-KP6VAFGI.js → chunk-VGL4QINZ.js} +1 -1
  80. package/chunks/{chunk-IKGD36IH.js → chunk-WEGKPUVT.js} +13 -13
  81. package/chunks/{chunk-YCR4JZUC.js → chunk-WIU4UVDX.js} +2 -2
  82. package/chunks/{chunk-BBHBNCB5.js → chunk-WLOIRIGM.js} +2 -2
  83. package/chunks/{chunk-RM54W4ER.js → chunk-WNPJDCZG.js} +1 -1
  84. package/chunks/{chunk-6VHB4YQZ.js → chunk-X2C52LE7.js} +1 -1
  85. package/chunks/{chunk-5DFZNI3G.js → chunk-XFHJCR6Q.js} +7 -7
  86. package/chunks/{chunk-LHP2IJ7A.js → chunk-XGQNWLJE.js} +1 -1
  87. package/chunks/{chunk-HKDI4HXA.js → chunk-XPR26FUE.js} +2 -2
  88. package/chunks/{chunk-CBLW5IOQ.js → chunk-XYWNIKCP.js} +3 -3
  89. package/chunks/{chunk-PXOBO32R.js → chunk-YO56DYD6.js} +3 -3
  90. package/chunks/{chunk-42N5UTUK.js → chunk-YRZLD3UC.js} +1 -1
  91. package/chunks/{chunk-FZSAZTOI.js → chunk-YSIQBGKE.js} +1 -1
  92. package/chunks/{chunk-3IRUUZTV.js → chunk-Z2FVI2QE.js} +29 -28
  93. package/chunks/{chunk-XBC4ZFXH.js → chunk-ZFFEGZQP.js} +7 -7
  94. package/chunks/{chunk-YAUL5ZQW.js → chunk-ZXEMQEIR.js} +5 -5
  95. package/chunks/{codex-subagent-executor-IBUIGPDN.js → codex-subagent-executor-IG3FMD7C.js} +17 -17
  96. package/chunks/{contextCommand-6EFJ3QJU.js → contextCommand-V52TZ7WC.js} +17 -17
  97. package/chunks/{core-runtime-2IRY3OGU.js → core-runtime-2W7PZ32G.js} +15 -15
  98. package/chunks/{create-sub-session-YPMC7OTH.js → create-sub-session-7F6RQ63I.js} +16 -16
  99. package/chunks/{daemon-git-worktree-guard-O5PEMNIJ.js → daemon-git-worktree-guard-XEYAHZKE.js} +15 -15
  100. package/chunks/{daemon-status-provider-HV3XFWXG.js → daemon-status-provider-3PGG4SFQ.js} +21 -21
  101. package/chunks/{daemon-trust-policy-NJGWWUJF.js → daemon-trust-policy-4GR6OQIW.js} +21 -21
  102. package/chunks/{daemon-trust-policy-monitor-XDGGMLUX.js → daemon-trust-policy-monitor-ZYBKKGWV.js} +21 -21
  103. package/chunks/{deferred-core-runtime-QJEIQQRV.js → deferred-core-runtime-EFVOFPFW.js} +15 -15
  104. package/chunks/{edit-DAMGKYG4.js → edit-ERIYX7VL.js} +9 -9
  105. package/chunks/{en-FVPIFYM3.js → en-AHX4A3X4.js} +18 -0
  106. package/chunks/{enterPlanMode-ZVG6QCWE.js → enterPlanMode-ESSALZKU.js} +7 -7
  107. package/chunks/{environment-N7R6TMQF.js → environment-GJ4BXV6M.js} +17 -17
  108. package/chunks/{errors-4MXYEHDC.js → errors-TIRL2U2V.js} +17 -17
  109. package/chunks/{execution-tool-YKY2TRGU.js → execution-tool-S776S6AA.js} +9 -9
  110. package/chunks/{execution-worker-65BZHXUO.js → execution-worker-EORKZE7B.js} +12 -12
  111. package/chunks/{exitPlanMode-3ONQQHEA.js → exitPlanMode-O5IF7SIB.js} +7 -7
  112. package/chunks/{fast-path-OL4RWGDQ.js → fast-path-IUBXHYB5.js} +2 -2
  113. package/chunks/{foreground-runner-MGGMRN3K.js → foreground-runner-5PAXAU7Q.js} +17 -17
  114. package/chunks/{gateway-models-NFDZZXWP.js → gateway-models-NK4WGZPX.js} +3 -3
  115. package/chunks/{glob-OIDBOW4G.js → glob-PTGLSNFV.js} +7 -7
  116. package/chunks/{goal-tools-DMZIYTZT.js → goal-tools-7XAPEACG.js} +7 -7
  117. package/chunks/{handleAutoUpdate-I3HSNEZY.js → handleAutoUpdate-LB3EXOSL.js} +18 -18
  118. package/chunks/{i18n-6BLWGPIF.js → i18n-2HPFDRCM.js} +16 -16
  119. package/chunks/{initializer-3NT4PSG5.js → initializer-YIPVTBD4.js} +21 -21
  120. package/chunks/{installationInfo-YFS4WR5Z.js → installationInfo-JEVGNV5S.js} +15 -15
  121. package/chunks/{list-WSW25XV4.js → list-Q43RN5XQ.js} +23 -23
  122. package/chunks/{llm-DHEJE335.js → llm-ACGE4OPC.js} +46 -46
  123. package/chunks/{llm-content-generator-LCRFLNVM.js → llm-content-generator-N67V7IMO.js} +4 -4
  124. package/chunks/{loadedSettingsAdapter-LZEJHSTQ.js → loadedSettingsAdapter-PCSL2RHU.js} +21 -21
  125. package/chunks/{local-execution-environment-ZPGY5MSH.js → local-execution-environment-QPSZFUKG.js} +12 -12
  126. package/chunks/{loggingContentGenerator-OLR57SV6.js → loggingContentGenerator-XIBC3H5T.js} +7 -7
  127. package/chunks/{managed-npm-update-KRSAJ37W.js → managed-npm-update-3C5UV3UA.js} +15 -15
  128. package/chunks/{mcp-BQGQ7QLI.js → mcp-WJH2PRLP.js} +21 -21
  129. package/chunks/{model-call-collection-TVSEFAQV.js → model-call-collection-FCU2E3DK.js} +1 -1
  130. package/chunks/{model-configuration-GJFGTJ5Y.js → model-configuration-LWZ6AN7O.js} +22 -22
  131. package/chunks/{modelConfigUtils-6CWVK6HU.js → modelConfigUtils-NF2XXNHK.js} +17 -17
  132. package/chunks/{monitor-2T7KABJD.js → monitor-AUGWTFPN.js} +7 -7
  133. package/chunks/{nonInteractiveCli-K4JM4ENC.js → nonInteractiveCli-ICHDPCXZ.js} +50 -48
  134. package/chunks/{nonInteractiveToolExecutor-5GOEPWYO.js → nonInteractiveToolExecutor-MEFA3XG6.js} +8 -8
  135. package/chunks/{notebook-edit-DAENEK5S.js → notebook-edit-3FTHMUPG.js} +8 -8
  136. package/chunks/{omni-H42BCXPX.js → omni-OB2XIDP6.js} +8 -8
  137. package/chunks/{openaiContentGenerator-EH2MHLQR.js → openaiContentGenerator-OVNPJ45X.js} +5 -5
  138. package/chunks/{openaiResponsesContentGenerator-RQROUO3C.js → openaiResponsesContentGenerator-LDEWDIIO.js} +3 -3
  139. package/chunks/{processUtils-FAIS7M3Y.js → processUtils-ACE5MNN5.js} +2 -2
  140. package/chunks/{prompt-terminal-ledger-7N4QXMSN.js → prompt-terminal-ledger-7AQNYK6B.js} +16 -16
  141. package/chunks/{pt-NR7K5X64.js → pt-K4HAS53U.js} +18 -0
  142. package/chunks/{reactive-degrade-SUQLWXQ6.js → reactive-degrade-FLQPZB4E.js} +7 -7
  143. package/chunks/{read-file-XE7ME3BR.js → read-file-UAKMF6YY.js} +1 -1
  144. package/chunks/{resumeHistoryUtils-DUYOO4BU.js → resumeHistoryUtils-SFAPPPBU.js} +19 -19
  145. package/chunks/{ripGrep-3LGQ4SE4.js → ripGrep-2V6G4VY4.js} +1 -1
  146. package/chunks/{run-o1-code-serve-GDYUXK5W.js → run-o1-code-serve-Y6CZ4WSK.js} +32 -32
  147. package/chunks/{sandboxConfig-UOOGX443.js → sandboxConfig-5OYKJA5H.js} +15 -15
  148. package/chunks/{scheduled-tasks-J3BZWWMO.js → scheduled-tasks-YDANC666.js} +20 -20
  149. package/chunks/{scheduler-EPXMQ35M.js → scheduler-3RSBLGO5.js} +17 -17
  150. package/chunks/{serve-UUAH4RD4.js → serve-GPPUJF7A.js} +21 -21
  151. package/chunks/{server-JDRC2EN6.js → server-QSYUPWC4.js} +46 -46
  152. package/chunks/{session-M6GUKX2G.js → session-RYM42HON.js} +51 -49
  153. package/chunks/{session-Q2LHHXY4.js → session-YX6EADY3.js} +1 -1
  154. package/chunks/{session-attachments-root-CCIAH6U6.js → session-attachments-root-ONU4OCIH.js} +15 -15
  155. package/chunks/{session-pr-refresh-GTIOMUNU.js → session-pr-refresh-PJMHSQS3.js} +19 -19
  156. package/chunks/{settings-SBWV33ZU.js → settings-QUPXDEE4.js} +20 -20
  157. package/chunks/{shell-J4HQKVRT.js → shell-CBB5CVAS.js} +7 -7
  158. package/chunks/{skill-KI27WO4D.js → skill-6GBBXV3Y.js} +1 -1
  159. package/chunks/{skill-settings-AYZSCDA2.js → skill-settings-4KLNZO7M.js} +20 -20
  160. package/chunks/{spawnChannel-XXWTNIFF.js → spawnChannel-77A66ZTS.js} +16 -16
  161. package/chunks/{standalone-update-F7SJN6QH.js → standalone-update-Y6CLALFV.js} +17 -17
  162. package/chunks/{startInteractiveUI-QBRDQBKB.js → startInteractiveUI-LDCEYD4E.js} +2005 -2246
  163. package/chunks/{supervisor-runner-YREQDAAR.js → supervisor-runner-UNQRYYHF.js} +2 -2
  164. package/chunks/{team-create-AWX3WCOX.js → team-create-FETEWNIH.js} +7 -7
  165. package/chunks/{team-plan-approval-XADKQBWB.js → team-plan-approval-NGV34RBG.js} +7 -7
  166. package/chunks/{terminal-image-renderer-3IULS2LY.js → terminal-image-renderer-QMHATNDT.js} +15 -15
  167. package/chunks/{theme-manager-S2SNBVMH.js → theme-manager-LNPRQP4D.js} +15 -15
  168. package/chunks/{tool-result-media-SU4PKTY5.js → tool-result-media-BV3MLBOV.js} +8 -8
  169. package/chunks/{tool-search-YVDXMR22.js → tool-search-WXUEK4Y4.js} +1 -1
  170. package/chunks/{total-session-admission-JXG2Y7T7.js → total-session-admission-GUPN7ETO.js} +17 -17
  171. package/chunks/{trustedFolders-7IPBJUC7.js → trustedFolders-7N5EEZQZ.js} +16 -16
  172. package/chunks/{update-relaunch-NN2CBTSS.js → update-relaunch-XEXPWCS3.js} +5 -5
  173. package/chunks/{updateCheck-FJQDYAG6.js → updateCheck-24QAZMCF.js} +17 -17
  174. package/chunks/{upload-config-YCM5FBRA.js → upload-config-R7KD3TYE.js} +5 -5
  175. package/chunks/{useAutoAcceptIndicator-LFIUN7PN.js → useAutoAcceptIndicator-5JIRDUHE.js} +23 -23
  176. package/chunks/{validateNonInterActiveAuth-JOX24GXO.js → validateNonInterActiveAuth-NCIZ27CP.js} +47 -45
  177. package/chunks/{version-JFJPSBUT.js → version-ON5MXG2T.js} +1 -1
  178. package/chunks/{web-fetch-K5XFX4U5.js → web-fetch-MXP24DZ5.js} +1 -1
  179. package/chunks/{web-search-DJOLXUKE.js → web-search-VHBFC7UE.js} +5 -5
  180. package/chunks/{workflow-DDRDQXO3.js → workflow-W53REJII.js} +8 -8
  181. package/chunks/{workspace-providers-status-NYUD74M7.js → workspace-providers-status-MQ4ORT4E.js} +25 -25
  182. package/chunks/{workspace-registration-store-YH4N3DDV.js → workspace-registration-store-AMXMOPWO.js} +1 -1
  183. package/chunks/{workspace-registry-WNJX32P3.js → workspace-registry-RCQ4IEK3.js} +17 -17
  184. package/chunks/{workspace-runtime-coordinator-7CBX333P.js → workspace-runtime-coordinator-6OTMUMU3.js} +17 -17
  185. package/chunks/{workspace-service-M3HENJTA.js → workspace-service-ZIE2JRN3.js} +24 -24
  186. package/chunks/{workspace-skills-status-DMRJPYZD.js → workspace-skills-status-FQPWMSLR.js} +21 -21
  187. package/chunks/{workspace-trust-reconciler-TWROHM3Q.js → workspace-trust-reconciler-TLAP6FPV.js} +23 -23
  188. package/chunks/{write-file-NPDFTBGT.js → write-file-6ALKQRAE.js} +9 -9
  189. package/chunks/{zh-JJGCFWTL.js → zh-RF4IW7H6.js} +18 -0
  190. package/chunks/{zh-TW-7LWX7CCJ.js → zh-TW-65FIGD7M.js} +18 -0
  191. package/chunks/{zoom-image-JIHUP4HA.js → zoom-image-S5EHXDCZ.js} +1 -1
  192. package/cli.js +15 -15
  193. package/execution-worker.js +1 -1
  194. package/export-transcript-document.js +1 -1
  195. package/locales/en.js +25 -0
  196. package/locales/pt.js +26 -0
  197. package/locales/zh-TW.js +24 -0
  198. package/locales/zh.js +24 -0
  199. package/package.json +2 -2
  200. package/release-notes.json +7 -0
  201. package/vendor/tree-sitter/tree-sitter-bash.wasm +0 -0
  202. package/vendor/tree-sitter/tree-sitter.wasm +0 -0
  203. package/web-shell/assets/{abnfDiagram-VCTEODGH-CmJn1PDE.js → abnfDiagram-VCTEODGH-DUjEqeft.js} +1 -1
  204. package/web-shell/assets/{arc-BmZjGB_w.js → arc-W0jfDngQ.js} +1 -1
  205. package/web-shell/assets/{architectureDiagram-5GKGNRK7-DX-36I_j.js → architectureDiagram-5GKGNRK7-DyF3Ulps.js} +1 -1
  206. package/web-shell/assets/{blockDiagram-NRAW4CY4-DxTx3zwB.js → blockDiagram-NRAW4CY4-_rS4wVsL.js} +1 -1
  207. package/web-shell/assets/{c4Diagram-UCG6FXSJ-rXvYjVVs.js → c4Diagram-UCG6FXSJ-Ba_maCcq.js} +1 -1
  208. package/web-shell/assets/channel-MNzhF6WL.js +1 -0
  209. package/web-shell/assets/{chunk-2Q5K7J3B-DBgDB2KW.js → chunk-2Q5K7J3B-Dp-kK_66.js} +1 -1
  210. package/web-shell/assets/{chunk-5VM5RSS4-CoxrLXwk.js → chunk-5VM5RSS4-BReLjFMB.js} +1 -1
  211. package/web-shell/assets/{chunk-F27PBJKO-DC5NQEjf.js → chunk-F27PBJKO-CyfDw0xH.js} +1 -1
  212. package/web-shell/assets/{chunk-G27WJ6UU-Cf3GRKgO.js → chunk-G27WJ6UU-BD-E3vyG.js} +1 -1
  213. package/web-shell/assets/{chunk-JWPE2WC7-DxsEZUOD.js → chunk-JWPE2WC7-BNg2LZ1b.js} +1 -1
  214. package/web-shell/assets/{chunk-LCL6LL3I-CEQc9n40.js → chunk-LCL6LL3I-CD6sIbXP.js} +1 -1
  215. package/web-shell/assets/{chunk-POPQ4Y6H-DsiSLluJ.js → chunk-POPQ4Y6H-biiydq96.js} +1 -1
  216. package/web-shell/assets/{chunk-SVP7TREG-CxvHOpi6.js → chunk-SVP7TREG-DSAy-8IK.js} +1 -1
  217. package/web-shell/assets/{chunk-XXDRQBXY-CGvG4BqT.js → chunk-XXDRQBXY-CQsQoyx5.js} +1 -1
  218. package/web-shell/assets/classDiagram-DTDB5LWJ-DK4qave1.js +1 -0
  219. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DK4qave1.js +1 -0
  220. package/web-shell/assets/{cose-bilkent-JH36ORCC-wq1CwvXH.js → cose-bilkent-JH36ORCC-cY73mmYw.js} +1 -1
  221. package/web-shell/assets/{cynefin-OW5HDTMX-CCzVtrpa.js → cynefin-OW5HDTMX-BTO6WVz1.js} +1 -1
  222. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CrsY22No.js → cynefinDiagram-5FMLGOSQ-VDQcZUqd.js} +1 -1
  223. package/web-shell/assets/{dagre-3AP2YEHR-Bt0t_pl2.js → dagre-3AP2YEHR-Bv2vVLCG.js} +1 -1
  224. package/web-shell/assets/{diagram-S7CK7UJ4-CgFmr50g.js → diagram-S7CK7UJ4-BqJUJmzm.js} +1 -1
  225. package/web-shell/assets/{diagram-UQ7AKVKN-F5rdharJ.js → diagram-UQ7AKVKN-BnLr2eEw.js} +1 -1
  226. package/web-shell/assets/{diagram-VSXAHHWV-CLtQI9Us.js → diagram-VSXAHHWV-D6XN-3Ym.js} +1 -1
  227. package/web-shell/assets/{diagram-VX7I27RA-Bvcc0y0l.js → diagram-VX7I27RA-Ci66ZVMg.js} +1 -1
  228. package/web-shell/assets/{diagram-Z3DM3KII-B0Zv86Nw.js → diagram-Z3DM3KII-CdKapkP8.js} +1 -1
  229. package/web-shell/assets/{ebnfDiagram-PWID7BFC-Ue6Kp4zy.js → ebnfDiagram-PWID7BFC-BMaAVNO9.js} +1 -1
  230. package/web-shell/assets/{erDiagram-SSCWMZ5O-EP13tHtp.js → erDiagram-SSCWMZ5O-tJDW3Qos.js} +1 -1
  231. package/web-shell/assets/{flowDiagram-A5DVABFB-DKQhXSAb.js → flowDiagram-A5DVABFB-CkeFnWh8.js} +1 -1
  232. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DOM1GL3N.js → ganttDiagram-EL5Y4UJY-BhdRaGW7.js} +1 -1
  233. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-BXWWwMVj.js → gitGraphDiagram-WWUBYQGX-_3xhVP9s.js} +1 -1
  234. package/web-shell/assets/{index-B-JFgxf_.js → index-CL6noNpm.js} +1 -1
  235. package/web-shell/assets/{index-BySRifK6.js → index-JJUratVS.js} +3 -3
  236. package/web-shell/assets/{infoDiagram-RXCK75RN-C_0yC8Ij.js → infoDiagram-RXCK75RN-Ct5KstKl.js} +1 -1
  237. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-Cb2loNBZ.js → ishikawaDiagram-5VMMS53U-CaWQH0FX.js} +1 -1
  238. package/web-shell/assets/{journeyDiagram-EYS64GPL-RPQBx8RB.js → journeyDiagram-EYS64GPL-wL4IPDN7.js} +1 -1
  239. package/web-shell/assets/{kanban-definition-3QL26DDD-BclR2dqV.js → kanban-definition-3QL26DDD-zF6R7MCX.js} +1 -1
  240. package/web-shell/assets/{layout-SQVyFkqM.js → layout-BHURDNhy.js} +1 -1
  241. package/web-shell/assets/{linear-DWbtI-Pa.js → linear-BSG9T8Eq.js} +1 -1
  242. package/web-shell/assets/{mermaid.core-Bm1cOFEw.js → mermaid.core-CN3wMJE1.js} +6 -6
  243. package/web-shell/assets/{mindmap-definition-FBJOCRG2-j9RYxk62.js → mindmap-definition-FBJOCRG2-C0-g1D9W.js} +1 -1
  244. package/web-shell/assets/{pegDiagram-XKGWAZYB-B6GhUCAI.js → pegDiagram-XKGWAZYB-1cBE4q6f.js} +1 -1
  245. package/web-shell/assets/{pieDiagram-E7YTZNPT-D7co7Zdb.js → pieDiagram-E7YTZNPT-BsHzVeMb.js} +1 -1
  246. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-WLfkJYEi.js → quadrantDiagram-AXDQQJYC-CeW8aBeN.js} +1 -1
  247. package/web-shell/assets/{railroadDiagram-O6MQD6OU-CH6JUyt5.js → railroadDiagram-O6MQD6OU-BOCp1FXY.js} +1 -1
  248. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-dqpSnQop.js → requirementDiagram-EFPCY7ZU-Xq9keBxz.js} +1 -1
  249. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-Bjm20XGX.js → sankeyDiagram-P5KCCOFB-Ce8E1MlF.js} +1 -1
  250. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-CE1HvQ3r.js → sequenceDiagram-WJ2MYXX4-Cf1g7Rf3.js} +1 -1
  251. package/web-shell/assets/{sizeCapture-X5ZJPWSS-D-jc__e7.js → sizeCapture-X5ZJPWSS-S2-ACap9.js} +1 -1
  252. package/web-shell/assets/{stateDiagram-HBIQ2CUA-D4oPWH6C.js → stateDiagram-HBIQ2CUA-DAqItqGd.js} +1 -1
  253. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BAK1hNnl.js +1 -0
  254. package/web-shell/assets/{swimlanes-XN3QIQJK-CxwnXXV2.js → swimlanes-XN3QIQJK-DhvAaL9i.js} +1 -1
  255. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-3m_PeoO-.js +8 -0
  256. package/web-shell/assets/{timeline-definition-24CTP7MA-BF9F9CDF.js → timeline-definition-24CTP7MA-CxSAzpJr.js} +1 -1
  257. package/web-shell/assets/{vennDiagram-4TSXK5OY-CkDMgOFv.js → vennDiagram-4TSXK5OY-BsZKmoYt.js} +1 -1
  258. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-DJ2f-coT.js → wardleyDiagram-VM6X3IG4-B8cw7lrk.js} +1 -1
  259. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-tfnnRI2D.js → xychartDiagram-S5SC5T6Z-DwM0RAy-.js} +1 -1
  260. package/web-shell/index.html +1 -1
  261. package/web-shell/sw.js +1 -1
  262. package/vendor/o1-connect/.lintstagedrc.mjs +0 -7
  263. package/web-shell/assets/channel-DhUh1Prc.js +0 -1
  264. package/web-shell/assets/classDiagram-DTDB5LWJ-u9x7IqO_.js +0 -1
  265. package/web-shell/assets/classDiagram-v2-JRS7N3AN-u9x7IqO_.js +0 -1
  266. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-Cj2MLX5C.js +0 -1
  267. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Ke9hgQpA.js +0 -8
@@ -3,13 +3,14 @@
3
3
  import {
4
4
  ExtensionRefreshState,
5
5
  clearSkillArgs,
6
+ logoutProvider,
6
7
  resolveHookSettingsForConfig,
7
8
  skillArgsNote,
8
9
  skillArgsPath,
9
10
  staleArgsWarning,
10
11
  validateAuthMethod,
11
12
  writeSkillArgs
12
- } from "./chunk-3IRUUZTV.js";
13
+ } from "./chunk-Z2FVI2QE.js";
13
14
  import {
14
15
  calculateCost,
15
16
  commandRestrictionNames,
@@ -24,11 +25,11 @@ import {
24
25
  getSystemInfoFields,
25
26
  newIssueUrl,
26
27
  skillOriginLabel
27
- } from "./chunk-NRDEPGVR.js";
28
+ } from "./chunk-PVV4PS73.js";
28
29
  import {
29
30
  formatDuration,
30
31
  formatTokenCount
31
- } from "./chunk-VM3UK3TM.js";
32
+ } from "./chunk-LTDEWYQR.js";
32
33
  import {
33
34
  isKittyProtocolEnabled
34
35
  } from "./chunk-AYSIXE44.js";
@@ -36,19 +37,22 @@ import {
36
37
  VSCODE_SHIFT_ENTER_SEQUENCE,
37
38
  isWaylandSession,
38
39
  writeOsc52
39
- } from "./chunk-PMKHXJAS.js";
40
+ } from "./chunk-6P2HD4R3.js";
40
41
  import {
41
42
  contextCommand
42
- } from "./chunk-LYWFQGEQ.js";
43
+ } from "./chunk-PMYMZZOL.js";
44
+ import {
45
+ require_react
46
+ } from "./chunk-2KK65OQ6.js";
43
47
  import {
44
48
  rollbackStandaloneUpdate
45
- } from "./chunk-LBX7KU43.js";
49
+ } from "./chunk-34DGARAI.js";
46
50
  import {
47
51
  updateEventEmitter
48
52
  } from "./chunk-KD7GIK2D.js";
49
53
  import {
50
54
  getErrorMessage as getErrorMessage2
51
- } from "./chunk-OSCUGEQY.js";
55
+ } from "./chunk-DVF2XU6V.js";
52
56
  import {
53
57
  INSIGHT_CSS,
54
58
  INSIGHT_JS,
@@ -59,7 +63,7 @@ import {
59
63
  toJson,
60
64
  toJsonl,
61
65
  toMarkdown
62
- } from "./chunk-S5TFGSM3.js";
66
+ } from "./chunk-DOYXO67V.js";
63
67
  import {
64
68
  stripUnsafeCharacters,
65
69
  toCodePoints,
@@ -75,23 +79,26 @@ import {
75
79
  isVoiceEnabled,
76
80
  readVoiceMode,
77
81
  readVoiceModel
78
- } from "./chunk-OKSSY3ER.js";
82
+ } from "./chunk-TRRPP67K.js";
79
83
  import {
80
84
  REASONING_EFFORT_DEFAULT,
81
85
  getReasoningEffortsForConfig
82
- } from "./chunk-YCR4JZUC.js";
86
+ } from "./chunk-WIU4UVDX.js";
87
+ import {
88
+ createLoadedSettingsAdapter
89
+ } from "./chunk-P2S3W72W.js";
83
90
  import {
84
91
  getExtendedSystemInfo,
85
92
  getGitVersion,
86
93
  getNpmVersion
87
- } from "./chunk-PXOBO32R.js";
94
+ } from "./chunk-YO56DYD6.js";
88
95
  import {
89
96
  SERVE_CONTROL_EXT_METHODS
90
97
  } from "./chunk-PYQSQFGU.js";
91
98
  import {
92
99
  isInlineModelOverrideAllowed,
93
100
  parseAcpModelOption
94
- } from "./chunk-K7C5JCE7.js";
101
+ } from "./chunk-IX3QKVUR.js";
95
102
  import {
96
103
  getInstallationInfo
97
104
  } from "./chunk-HFH6267M.js";
@@ -114,12 +121,12 @@ import {
114
121
  resolveOutputLanguageOrPreserveAuto,
115
122
  validateSettingValue,
116
123
  writeOutputLanguageAndRegisterPath
117
- } from "./chunk-DQGAJLPJ.js";
124
+ } from "./chunk-TNDQQXZG.js";
118
125
  import {
119
126
  getCurrentLanguage,
120
127
  setLanguageAsync,
121
128
  t
122
- } from "./chunk-CDHOAM2E.js";
129
+ } from "./chunk-PPK5GYKF.js";
123
130
  import {
124
131
  SUPPORTED_LANGUAGES,
125
132
  getSupportedLanguageIds,
@@ -127,11 +134,11 @@ import {
127
134
  } from "./chunk-Q2V34OV7.js";
128
135
  import {
129
136
  getCliVersion
130
- } from "./chunk-RM54W4ER.js";
137
+ } from "./chunk-WNPJDCZG.js";
131
138
  import {
132
139
  isFolderTrustEnabled,
133
140
  loadTrustedFolders
134
- } from "./chunk-PQGBLD36.js";
141
+ } from "./chunk-TQREMT4H.js";
135
142
  import {
136
143
  require_strip_json_comments,
137
144
  stripUtf8Bom
@@ -161,7 +168,7 @@ import {
161
168
  parseLearnVideoInput,
162
169
  readPathFromWorkspace,
163
170
  removePeerController
164
- } from "./chunk-5P7NQWE6.js";
171
+ } from "./chunk-INL5DBBY.js";
165
172
  import {
166
173
  canonicalizeMsgId,
167
174
  describeHoldCause
@@ -171,7 +178,7 @@ import {
171
178
  } from "./chunk-A7JWEUTB.js";
172
179
  import {
173
180
  listWorkflowSnapshots
174
- } from "./chunk-KSO7FXQU.js";
181
+ } from "./chunk-5T7HH4QY.js";
175
182
  import {
176
183
  resolveOpenAILogDir
177
184
  } from "./chunk-AXXXWTIX.js";
@@ -212,7 +219,7 @@ import {
212
219
  require_toml,
213
220
  runForkedAgent,
214
221
  tryGenerateSessionTitle
215
- } from "./chunk-SR7O2YDD.js";
222
+ } from "./chunk-URV7VB5I.js";
216
223
  import {
217
224
  shellResultText
218
225
  } from "./chunk-GYGA6V6B.js";
@@ -265,12 +272,14 @@ import {
265
272
  resolveMainSessionOutputStyle
266
273
  } from "./chunk-AEVV2DGL.js";
267
274
  import {
275
+ AuthEvent,
268
276
  COMBINED_PASS_TOLERANCE_FACTOR,
269
277
  IdeConnectionEvent,
270
278
  formatTokenUsageSummaryAsCsv,
271
279
  formatTokenUsageSummaryAsJson,
272
280
  getMCPServerStatus,
273
281
  isImageCapable,
282
+ logAuth,
274
283
  logIdeConnection,
275
284
  queryTokenUsage,
276
285
  read,
@@ -311,7 +320,8 @@ import {
311
320
  KEY_LIMIT_USAGE,
312
321
  OWN_CAP_USAGE,
313
322
  fetchKeyInfo,
314
- getLatestRateLimits
323
+ getLatestRateLimits,
324
+ onLowRateLimit
315
325
  } from "./chunk-WQU5EWE3.js";
316
326
  import {
317
327
  resolveSlimmingConfig
@@ -325,11 +335,20 @@ import {
325
335
  redactUrlCredentials
326
336
  } from "./chunk-EB4VOVOS.js";
327
337
  import {
338
+ applyProviderInstallPlan,
339
+ buildInstallPlan,
328
340
  buildRuntimeSnapshotId,
341
+ credentialIdForProvider,
342
+ customProvider,
329
343
  findProviderByCredentials,
344
+ getModelsForProviderProtocol,
345
+ isExportedCredentialEnv,
330
346
  isImageGenerationCapable,
331
- stripRuntimeSnapshotPrefix
332
- } from "./chunk-EE265U33.js";
347
+ isValidCredentialId,
348
+ readCredential,
349
+ stripRuntimeSnapshotPrefix,
350
+ withdrawExportedCredential
351
+ } from "./chunk-DN5T6AO6.js";
333
352
  import {
334
353
  REASONING_EFFORT_TIERS,
335
354
  applyReasoningEffort,
@@ -348,9 +367,13 @@ import {
348
367
  isCpuProfileRecording,
349
368
  startCpuProfile,
350
369
  stopCpuProfile
351
- } from "./chunk-WRF5CAXN.js";
370
+ } from "./chunk-RP5IWKTY.js";
371
+ import {
372
+ forgetO1Connect
373
+ } from "./chunk-OX6A5GJG.js";
352
374
  import {
353
375
  AuthType,
376
+ organizaoneProvider,
354
377
  reachesOrganizaOne
355
378
  } from "./chunk-VTIYMCRG.js";
356
379
  import {
@@ -2639,7 +2662,7 @@ var approvalModeCommand = {
2639
2662
  };
2640
2663
  }
2641
2664
  }
2642
- const autoModeNotices = mode === "auto" /* AUTO */ && priorMode !== "auto" /* AUTO */ && config ? await import("./useAutoAcceptIndicator-LFIUN7PN.js") : void 0;
2665
+ const autoModeNotices = mode === "auto" /* AUTO */ && priorMode !== "auto" /* AUTO */ && config ? await import("./useAutoAcceptIndicator-5JIRDUHE.js") : void 0;
2643
2666
  if (config) {
2644
2667
  try {
2645
2668
  config.setApprovalMode(mode);
@@ -7847,7 +7870,7 @@ var expandNowCommand = {
7847
7870
  content: t("History is already expanded in this session.")
7848
7871
  };
7849
7872
  }
7850
- const { expandCollapsedHistory } = await import("./resumeHistoryUtils-DUYOO4BU.js");
7873
+ const { expandCollapsedHistory } = await import("./resumeHistoryUtils-SFAPPPBU.js");
7851
7874
  const updated = expandCollapsedHistory(history);
7852
7875
  loadHistory(updated);
7853
7876
  refreshStatic();
@@ -10012,222 +10035,861 @@ var languageCommand = {
10012
10035
  ]
10013
10036
  };
10014
10037
 
10015
- // packages/cli/src/ui/commands/mcpCommand.ts
10016
- init_esbuild_shims();
10017
- var mcpCommand = {
10018
- name: "mcp",
10019
- get description() {
10020
- return t("Open MCP management dialog");
10021
- },
10022
- argumentHint: "desc|nodesc|schema",
10023
- kind: "built-in" /* BUILT_IN */,
10024
- supportedModes: ["interactive"],
10025
- action: /* @__PURE__ */ __name(async (_context, args = "") => {
10026
- const [subcommand, serverName] = args.trim().split(/\s+/);
10027
- if (subcommand === "auth" || subcommand === "noauth") {
10028
- return {
10029
- type: "message",
10030
- messageType: "warning",
10031
- content: serverName ? t(
10032
- "MCP OAuth is now managed in the /mcp dialog. Open /mcp, select '{{serverName}}', then use the Auth actions there.",
10033
- { serverName }
10034
- ) : t(
10035
- "MCP OAuth is now managed in the /mcp dialog. Open /mcp, select a server, then use the Auth actions there."
10036
- )
10037
- };
10038
- }
10039
- return {
10040
- type: "dialog",
10041
- dialog: "mcp"
10042
- };
10043
- }, "action")
10044
- };
10045
-
10046
- // packages/cli/src/ui/commands/dreamCommand.ts
10047
- init_esbuild_shims();
10048
- import * as path10 from "node:path";
10049
- var dreamCommand = {
10050
- name: "dream",
10051
- get description() {
10052
- return t("Consolidate managed auto-memory topic files.");
10053
- },
10054
- kind: "built-in" /* BUILT_IN */,
10055
- supportedModes: ["interactive", "acp"],
10056
- action: /* @__PURE__ */ __name(async (context) => {
10057
- const config = context.services.config;
10058
- if (!config) {
10059
- return {
10060
- type: "message",
10061
- messageType: "error",
10062
- content: t("Config not loaded.")
10063
- };
10064
- }
10065
- try {
10066
- const projectRoot = config.getProjectRoot();
10067
- const memoryRoot = getAutoMemoryRoot(projectRoot);
10068
- const transcriptDir = path10.join(
10069
- new Storage(projectRoot).getProjectDir(),
10070
- "chats"
10071
- );
10072
- const prompt = config.getMemoryManager().buildConsolidationPrompt(
10073
- memoryRoot,
10074
- transcriptDir,
10075
- config.getAgentShellConfiguration?.()
10076
- );
10077
- const recordDream = /* @__PURE__ */ __name(async () => config.getMemoryManager().writeDreamManualRun(projectRoot, config.getSessionId()), "recordDream");
10078
- if (context.executionMode === "acp") {
10079
- recordDream().catch(() => {
10080
- });
10081
- return { type: "submit_prompt", content: prompt };
10082
- }
10083
- return {
10084
- type: "submit_prompt",
10085
- content: prompt,
10086
- onComplete: recordDream
10087
- };
10088
- } catch (error) {
10089
- return {
10090
- type: "message",
10091
- messageType: "error",
10092
- content: t("Failed to process /dream: {{message}}", {
10093
- message: error instanceof Error ? error.message : String(error)
10094
- })
10095
- };
10096
- }
10097
- }, "action")
10098
- };
10099
-
10100
- // packages/cli/src/ui/commands/forgetCommand.ts
10038
+ // packages/cli/src/ui/commands/logout-command.ts
10101
10039
  init_esbuild_shims();
10102
- var forgetCommand = {
10103
- name: "forget",
10104
- get description() {
10105
- return t("Remove matching entries from managed auto-memory.");
10106
- },
10107
- kind: "built-in" /* BUILT_IN */,
10108
- supportedModes: ["interactive", "acp"],
10109
- argumentHint: "<memory text to remove>",
10110
- acceptsInput: true,
10111
- action: /* @__PURE__ */ __name(async (context, args) => {
10112
- const query = args.trim();
10113
- if (!query) {
10114
- return {
10115
- type: "message",
10116
- messageType: "error",
10117
- content: t("Usage: /forget <memory text to remove>")
10118
- };
10119
- }
10120
- const config = context.services.config;
10121
- if (!config) {
10122
- return {
10123
- type: "message",
10124
- messageType: "error",
10125
- content: t("Config not loaded.")
10126
- };
10127
- }
10128
- try {
10129
- const selection = await config.getMemoryManager().selectForgetCandidates(config.getProjectRoot(), query, { config });
10130
- const result = await config.getMemoryManager().forgetMatches(config.getProjectRoot(), selection.matches);
10131
- return {
10132
- type: "message",
10133
- messageType: "info",
10134
- content: result.systemMessage ?? t("No managed auto-memory entries matched: {{query}}", { query })
10135
- };
10136
- } catch (error) {
10137
- return {
10138
- type: "message",
10139
- messageType: "error",
10140
- content: t("Failed to process /forget: {{message}}", {
10141
- message: error instanceof Error ? error.message : String(error)
10142
- })
10143
- };
10144
- }
10145
- }, "action")
10146
- };
10147
10040
 
10148
- // packages/cli/src/ui/commands/memoryCommand.ts
10041
+ // packages/cli/src/ui/auth/sign-out.ts
10149
10042
  init_esbuild_shims();
10150
- var memoryCommand = {
10151
- name: "memory",
10152
- get description() {
10153
- return t("Open the memory manager.");
10154
- },
10155
- kind: "built-in" /* BUILT_IN */,
10156
- supportedModes: ["interactive"],
10157
- action: /* @__PURE__ */ __name(async () => ({
10158
- type: "dialog",
10159
- dialog: "memory"
10160
- }), "action")
10161
- };
10162
10043
 
10163
- // packages/cli/src/ui/commands/modelCommand.ts
10044
+ // packages/cli/src/ui/auth/useAuth.ts
10164
10045
  init_esbuild_shims();
10046
+ var import_react = __toESM(require_react(), 1);
10165
10047
 
10166
- // packages/cli/src/ui/voice/voice-model.ts
10048
+ // packages/cli/src/ui/auth/organizaone-limits-summary.ts
10167
10049
  init_esbuild_shims();
10168
-
10169
- // packages/cli/src/ui/commands/modelCommand.ts
10170
- var MAIN_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model without arguments to choose from configured models.";
10171
- var FAST_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model --fast without a model to choose from configured models.";
10172
- var VISION_MODEL_CONFIGURATION_HINT = "Configure an image-capable model in settings.modelProviders and ensure the required environment variables are set. Run /model --vision <model-id> to set it, or leave it unset to auto-pick a same-provider vision model.";
10173
- var COMPACTION_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model --compaction without a model to choose from configured models.";
10174
- var IMAGE_MODEL_CONFIGURATION_HINT = "Configure a model with supportsImageGeneration: true (or legacy imageOnly: true), baseUrl, and envKey in settings.modelProviders. Run /model --image <model-id> to select it.";
10175
- var MODEL_PICKER_FLAGS = [
10176
- "fast",
10177
- "voice",
10178
- "vision",
10179
- "compaction",
10180
- "image",
10181
- "project",
10182
- "global"
10183
- ];
10184
- var MODEL_PICKER_FLAG_PATTERN = `(?:${MODEL_PICKER_FLAGS.join("|")})`;
10185
- var MODEL_PICKER_ONLY_PATTERN = new RegExp(
10186
- `^(?:\\s*--${MODEL_PICKER_FLAG_PATTERN})*\\s*$`
10187
- );
10188
- function isPickerOnlyModelInvocation(args) {
10189
- return MODEL_PICKER_ONLY_PATTERN.test(args);
10190
- }
10191
- __name(isPickerOnlyModelInvocation, "isPickerOnlyModelInvocation");
10192
- function parseScopeFlags(args) {
10193
- let scopeOverride;
10194
- let remaining = args;
10195
- const hasProject = /(?:^|\s)--project(?:\s|$)/.test(remaining);
10196
- const hasGlobal = /(?:^|\s)--global(?:\s|$)/.test(remaining);
10197
- if (hasProject) {
10198
- scopeOverride = "Workspace" /* Workspace */;
10199
- remaining = remaining.replace(/(?:^|\s)--project(?:\s|$)/, " ").trim();
10200
- } else if (hasGlobal) {
10201
- scopeOverride = "User" /* User */;
10202
- remaining = remaining.replace(/(?:^|\s)--global(?:\s|$)/, " ").trim();
10203
- }
10204
- return { scopeOverride, remaining, hasProject, hasGlobal };
10050
+ function count(value) {
10051
+ return new Intl.NumberFormat(getCurrentLanguage()).format(value);
10205
10052
  }
10206
- __name(parseScopeFlags, "parseScopeFlags");
10207
- function resolveScope(settings, scopeOverride) {
10208
- return scopeOverride ?? getPersistScopeForModelSelection(settings);
10053
+ __name(count, "count");
10054
+ function dollars(micros) {
10055
+ return new Intl.NumberFormat(getCurrentLanguage(), {
10056
+ style: "currency",
10057
+ currency: "USD"
10058
+ }).format(micros / 1e6);
10209
10059
  }
10210
- __name(resolveScope, "resolveScope");
10211
- function persistScopeSpread(scopeOverride) {
10212
- if (scopeOverride === "Workspace" /* Workspace */)
10213
- return { persistScope: "workspace" };
10214
- if (scopeOverride === "User" /* User */)
10215
- return { persistScope: "user" };
10216
- return {};
10060
+ __name(dollars, "dollars");
10061
+ function duration(ms) {
10062
+ return formatDuration(ms, { hideTrailingZeros: true });
10217
10063
  }
10218
- __name(persistScopeSpread, "persistScopeSpread");
10219
- function formatVisionModelSettingForDisplay(setting) {
10220
- const parsed = parseVisionModelSetting(setting);
10221
- if (!parsed) return setting.replace(/\0/g, "\\0");
10222
- return parsed.baseUrl ? `${parsed.selector} (${redactProxyCredentials(parsed.baseUrl)})` : parsed.selector;
10064
+ __name(duration, "duration");
10065
+ function limitLabel(name, used, limit) {
10066
+ switch (name) {
10067
+ case "requests_per_minute":
10068
+ return t("{{used}}/{{limit}} requests per minute", { used, limit });
10069
+ case "tokens_per_minute":
10070
+ return t("{{used}}/{{limit}} tokens per minute", { used, limit });
10071
+ case "requests_per_day":
10072
+ return t("{{used}}/{{limit}} requests today", { used, limit });
10073
+ case "tokens_per_day":
10074
+ return t("{{used}}/{{limit}} tokens today", { used, limit });
10075
+ case "concurrent":
10076
+ return t("{{used}}/{{limit}} at once", { used, limit });
10077
+ case "spend_per_day_micros":
10078
+ return t("{{used}}/{{limit}} spent today", { used, limit });
10079
+ case "spend_per_month_micros":
10080
+ return t("{{used}}/{{limit}} spent this month", { used, limit });
10081
+ default:
10082
+ return `${used}/${limit} ${name}`;
10083
+ }
10223
10084
  }
10224
- __name(formatVisionModelSettingForDisplay, "formatVisionModelSettingForDisplay");
10225
- function persistSetting(settings, path19, value, scopeOverride) {
10226
- settings.setValue(resolveScope(settings, scopeOverride), path19, value);
10085
+ __name(limitLabel, "limitLabel");
10086
+ function limitParts(limits, usage2, usageKeys) {
10087
+ const parts = [];
10088
+ for (const [name, usageKey] of Object.entries(usageKeys)) {
10089
+ const limit = limits[name];
10090
+ if (limit === null || limit === void 0) continue;
10091
+ const used = usage2[usageKey] ?? 0;
10092
+ const isSpend = name.endsWith("_micros");
10093
+ parts.push(
10094
+ limitLabel(
10095
+ name,
10096
+ isSpend ? dollars(used) : count(used),
10097
+ isSpend ? dollars(limit) : count(limit)
10098
+ )
10099
+ );
10100
+ }
10101
+ return parts;
10227
10102
  }
10228
- __name(persistSetting, "persistSetting");
10229
- async function switchMainModel(config, settings, currentAuthType, modelArg, scopeOverride, persistSelection = true, isBusy) {
10230
- const parsed = parseAcpModelOption(modelArg);
10103
+ __name(limitParts, "limitParts");
10104
+ function resetLine(iso, now) {
10105
+ const at = iso ? Date.parse(iso) : NaN;
10106
+ if (!Number.isFinite(at)) return void 0;
10107
+ return t("Daily limits reset at {{time}} (in {{wait}}).", {
10108
+ time: new Date(at).toLocaleTimeString(getCurrentLanguage(), {
10109
+ hour: "2-digit",
10110
+ minute: "2-digit"
10111
+ }),
10112
+ wait: duration(Math.max(0, at - now))
10113
+ });
10114
+ }
10115
+ __name(resetLine, "resetLine");
10116
+ function windowLine(snapshot) {
10117
+ if (!snapshot) return [];
10118
+ const parts = [];
10119
+ if (snapshot.requests) {
10120
+ parts.push(
10121
+ t("{{remaining}} of {{limit}} requests left", {
10122
+ remaining: count(snapshot.requests.remaining),
10123
+ limit: count(snapshot.requests.limit)
10124
+ })
10125
+ );
10126
+ }
10127
+ if (snapshot.tokens) {
10128
+ parts.push(
10129
+ t("{{remaining}} of {{limit}} tokens left", {
10130
+ remaining: count(snapshot.tokens.remaining),
10131
+ limit: count(snapshot.tokens.limit)
10132
+ })
10133
+ );
10134
+ }
10135
+ return [t("Last request: {{windows}}", { windows: parts.join(" \xB7 ") })];
10136
+ }
10137
+ __name(windowLine, "windowLine");
10138
+ function modelQuotaLines(info, now) {
10139
+ const quota = info.modelQuota;
10140
+ if (!quota) return [];
10141
+ const heading = quota.source === "own" ? t("Your own account") : t("Your plan");
10142
+ const parts = quota.windows.map((window) => {
10143
+ let value;
10144
+ if (window.usedPercent !== void 0 && window.usedPercent !== null) {
10145
+ value = t("{{percent}}% used", {
10146
+ percent: String(Math.round(window.usedPercent * 10) / 10)
10147
+ });
10148
+ } else if (window.limitMicros !== void 0 && window.usedMicros !== void 0) {
10149
+ value = t("{{used}} of {{limit}}", {
10150
+ used: dollars(window.usedMicros),
10151
+ limit: dollars(window.limitMicros)
10152
+ });
10153
+ } else {
10154
+ value = t("usage unavailable");
10155
+ }
10156
+ const reset = window.resetsAt ? Date.parse(window.resetsAt) : NaN;
10157
+ return Number.isFinite(reset) ? `${window.name}: ${value} (${t("resets in {{wait}}", { wait: duration(Math.max(0, reset - now)) })})` : `${window.name}: ${value}`;
10158
+ });
10159
+ return parts.length ? [`${heading}: ${parts.join(" \xB7 ")}`] : [];
10160
+ }
10161
+ __name(modelQuotaLines, "modelQuotaLines");
10162
+ function formatOrganizaOneKeyInfo(info, latest, now = Date.now()) {
10163
+ const heading = [
10164
+ "OrganizaOne",
10165
+ info.plan?.name ? t("plan {{name}}", { name: info.plan.name }) : void 0,
10166
+ info.device?.name
10167
+ ].filter(Boolean).join(" \xB7 ");
10168
+ const lines = [heading];
10169
+ const spend = info.plan?.spend;
10170
+ if (spend) {
10171
+ lines.push(
10172
+ spend.included === null ? t("Spent this period: {{used}}", { used: dollars(spend.used) }) : t("Spent this period: {{used}} of {{included}}", {
10173
+ used: dollars(spend.used),
10174
+ included: dollars(spend.included)
10175
+ })
10176
+ );
10177
+ }
10178
+ if (info.plan?.maxOutputTokens) {
10179
+ lines.push(
10180
+ t("Output per request: up to {{tokens}} tokens", {
10181
+ tokens: count(info.plan.maxOutputTokens)
10182
+ })
10183
+ );
10184
+ }
10185
+ let anyLimit = false;
10186
+ for (const scope of info.scopes) {
10187
+ const parts = limitParts(scope.limits, scope.usage, KEY_LIMIT_USAGE);
10188
+ if (parts.length === 0) continue;
10189
+ anyLimit = true;
10190
+ lines.push(
10191
+ `${t("Limits ({{scope}})", { scope: scope.scope })}: ${parts.join(" \xB7 ")}`
10192
+ );
10193
+ }
10194
+ if (!anyLimit) lines.push(t("No request or token limits on this key."));
10195
+ if (info.own?.enabled) {
10196
+ const parts = limitParts(info.own.caps, info.own.usage, OWN_CAP_USAGE);
10197
+ if (parts.length > 0) {
10198
+ lines.push(`${t("Own credentials")}: ${parts.join(" \xB7 ")}`);
10199
+ }
10200
+ }
10201
+ lines.push(...modelQuotaLines(info, now));
10202
+ const reset = resetLine(info.dayReset, now);
10203
+ if (reset) lines.push(reset);
10204
+ lines.push(...windowLine(latest));
10205
+ return lines.join("\n");
10206
+ }
10207
+ __name(formatOrganizaOneKeyInfo, "formatOrganizaOneKeyInfo");
10208
+ async function loadOrganizaOneKeySummary(config, signal) {
10209
+ const generator = config.getContentGeneratorConfig();
10210
+ if (!generator || !reachesOrganizaOne(generator)) {
10211
+ return { status: "not-organizaone" };
10212
+ }
10213
+ const info = await fetchKeyInfo({
10214
+ baseUrl: generator.baseUrl ?? "",
10215
+ apiKey: generator.apiKey ?? "",
10216
+ signal,
10217
+ clientVersion: config.getCliVersion(),
10218
+ model: generator.model
10219
+ });
10220
+ if (!info) return { status: "unavailable" };
10221
+ return {
10222
+ status: "ok",
10223
+ text: formatOrganizaOneKeyInfo(info, getLatestRateLimits())
10224
+ };
10225
+ }
10226
+ __name(loadOrganizaOneKeySummary, "loadOrganizaOneKeySummary");
10227
+ function formatLowRateLimit(low) {
10228
+ const values = {
10229
+ remaining: count(low.remaining),
10230
+ limit: count(low.limit),
10231
+ wait: low.resetMs === void 0 ? "" : duration(low.resetMs)
10232
+ };
10233
+ if (low.kind === "requests") {
10234
+ return low.resetMs === void 0 ? t("OrganizaOne: {{remaining}} of {{limit}} requests left.", values) : t(
10235
+ "OrganizaOne: {{remaining}} of {{limit}} requests left; the window refills in {{wait}}.",
10236
+ values
10237
+ );
10238
+ }
10239
+ return low.resetMs === void 0 ? t("OrganizaOne: {{remaining}} of {{limit}} tokens left.", values) : t(
10240
+ "OrganizaOne: {{remaining}} of {{limit}} tokens left; the window refills in {{wait}}.",
10241
+ values
10242
+ );
10243
+ }
10244
+ __name(formatLowRateLimit, "formatLowRateLimit");
10245
+
10246
+ // packages/cli/src/ui/auth/useAuth.ts
10247
+ function normalizeModelIds(modelIdsInput) {
10248
+ return modelIdsInput.split(",").map((id) => id.trim()).filter((id, index, array) => id.length > 0 && array.indexOf(id) === index);
10249
+ }
10250
+ __name(normalizeModelIds, "normalizeModelIds");
10251
+ function maskApiKey(apiKey) {
10252
+ const trimmed = apiKey.trim();
10253
+ if (trimmed.length === 0) return "(not set)";
10254
+ if (trimmed.length <= 12) return "***";
10255
+ return `${trimmed.slice(0, 3)}...${trimmed.slice(-4)}`;
10256
+ }
10257
+ __name(maskApiKey, "maskApiKey");
10258
+ var useAuthCommand = /* @__PURE__ */ __name((settings, config, addItem, onAuthChange) => {
10259
+ const unAuthenticated = config.getAuthType() === void 0;
10260
+ const [authState, setAuthState] = (0, import_react.useState)(
10261
+ unAuthenticated ? "updating" /* Updating */ : "unauthenticated" /* Unauthenticated */
10262
+ );
10263
+ const [authError, setAuthError] = (0, import_react.useState)(null);
10264
+ const [isAuthenticating, setIsAuthenticating] = (0, import_react.useState)(false);
10265
+ const [isAuthDialogOpen, setIsAuthDialogOpen] = (0, import_react.useState)(unAuthenticated);
10266
+ const [choosingDisplayMode, setChoosingDisplayMode] = (0, import_react.useState)(false);
10267
+ const [pendingAuthType, setPendingAuthType] = (0, import_react.useState)(
10268
+ void 0
10269
+ );
10270
+ const [externalAuthState, setExternalAuthState] = (0, import_react.useState)(null);
10271
+ const openedViaCommandRef = (0, import_react.useRef)(false);
10272
+ (0, import_react.useEffect)(
10273
+ () => onLowRateLimit(
10274
+ (low) => addItem(
10275
+ { type: "warning" /* WARNING */, text: formatLowRateLimit(low) },
10276
+ Date.now()
10277
+ )
10278
+ ),
10279
+ [addItem]
10280
+ );
10281
+ const onAuthError = (0, import_react.useCallback)(
10282
+ (error) => {
10283
+ setAuthError(error);
10284
+ if (error) {
10285
+ setAuthState("updating" /* Updating */);
10286
+ setIsAuthDialogOpen(true);
10287
+ }
10288
+ },
10289
+ [setAuthError, setAuthState]
10290
+ );
10291
+ const handleAuthFailure = (0, import_react.useCallback)(
10292
+ (error, protocolForTelemetry) => {
10293
+ setIsAuthenticating(false);
10294
+ setExternalAuthState(null);
10295
+ const msg = t("Failed to authenticate. Message: {{message}}", {
10296
+ message: getErrorMessage(error)
10297
+ });
10298
+ onAuthError(msg);
10299
+ const effectiveProtocol = protocolForTelemetry ?? pendingAuthType;
10300
+ if (effectiveProtocol) {
10301
+ logAuth(
10302
+ config,
10303
+ new AuthEvent(effectiveProtocol, "manual", "error", msg)
10304
+ );
10305
+ }
10306
+ },
10307
+ [onAuthError, pendingAuthType, config]
10308
+ );
10309
+ const completeAuthentication = (0, import_react.useCallback)(() => {
10310
+ setAuthError(null);
10311
+ setAuthState("authenticated" /* Authenticated */);
10312
+ setPendingAuthType(void 0);
10313
+ const choose = settings.forScope("User" /* User */).settings.ui?.displayMode === void 0;
10314
+ setChoosingDisplayMode(choose);
10315
+ if (!choose) setIsAuthDialogOpen(false);
10316
+ setIsAuthenticating(false);
10317
+ onAuthChange?.();
10318
+ }, [onAuthChange, settings]);
10319
+ const finishDisplayModeStep = (0, import_react.useCallback)(() => {
10320
+ setChoosingDisplayMode(false);
10321
+ setIsAuthDialogOpen(false);
10322
+ }, []);
10323
+ const chooseDisplayMode = (0, import_react.useCallback)(
10324
+ (mode) => {
10325
+ settings.setValue("User" /* User */, "ui.displayMode", mode);
10326
+ finishDisplayModeStep();
10327
+ },
10328
+ [settings, finishDisplayModeStep]
10329
+ );
10330
+ const handleProviderSubmit = (0, import_react.useCallback)(
10331
+ async (providerConfig, inputs) => {
10332
+ let protocol = inputs.protocol ?? providerConfig.protocol;
10333
+ try {
10334
+ setPendingAuthType(protocol);
10335
+ setIsAuthenticating(true);
10336
+ setAuthError(null);
10337
+ const plan = buildInstallPlan(
10338
+ providerConfig,
10339
+ inputs,
10340
+ getModelsForProviderProtocol(
10341
+ settings.merged.modelProviders,
10342
+ inputs.protocol ?? providerConfig.protocol,
10343
+ settings.merged.providerProtocol
10344
+ ),
10345
+ {
10346
+ authType: settings.merged.security?.auth?.selectedType,
10347
+ id: settings.merged.model?.name,
10348
+ baseUrl: settings.merged.model?.baseUrl
10349
+ }
10350
+ );
10351
+ protocol = plan.authType;
10352
+ setPendingAuthType(protocol);
10353
+ await applyProviderInstallPlan(plan, {
10354
+ settings: createLoadedSettingsAdapter(settings),
10355
+ reloadModelProviders: /* @__PURE__ */ __name((mp) => config.reloadModelProvidersConfig(mp), "reloadModelProviders"),
10356
+ syncAuthState: /* @__PURE__ */ __name((authType, modelId, baseUrl) => config.syncModelSelection(authType, modelId, baseUrl), "syncAuthState"),
10357
+ refreshAuth: /* @__PURE__ */ __name((authType) => config.refreshAuth(authType), "refreshAuth")
10358
+ });
10359
+ if (!plan.modelSelection && !config.getAuthType()) {
10360
+ setIsAuthenticating(false);
10361
+ setPendingAuthType(void 0);
10362
+ onAuthError(
10363
+ t(
10364
+ "Service models saved. Configure a conversation model to start chatting."
10365
+ )
10366
+ );
10367
+ return;
10368
+ }
10369
+ completeAuthentication();
10370
+ const feedbackItem = {
10371
+ type: "info" /* INFO */,
10372
+ text: !plan.modelSelection ? t("Service models saved.") : t(
10373
+ "Successfully configured {{provider}}. Use /model to switch models.",
10374
+ { provider: providerConfig.label }
10375
+ )
10376
+ };
10377
+ addItem(feedbackItem, Date.now());
10378
+ if (plan.modelSelection) {
10379
+ void loadOrganizaOneKeySummary(config).then((summary) => {
10380
+ if (summary.status === "ok") {
10381
+ addItem(
10382
+ { type: "info" /* INFO */, text: summary.text },
10383
+ Date.now()
10384
+ );
10385
+ }
10386
+ }).catch(() => void 0);
10387
+ }
10388
+ if (openedViaCommandRef.current) {
10389
+ openedViaCommandRef.current = false;
10390
+ config.getChatRecordingService?.()?.recordSlashCommand({
10391
+ phase: "result",
10392
+ rawCommand: "/auth",
10393
+ outputHistoryItems: [feedbackItem]
10394
+ });
10395
+ }
10396
+ if (plan.modelSelection)
10397
+ logAuth(config, new AuthEvent(protocol, "manual", "success"));
10398
+ } catch (error) {
10399
+ handleAuthFailure(error, protocol);
10400
+ }
10401
+ },
10402
+ [
10403
+ settings,
10404
+ config,
10405
+ completeAuthentication,
10406
+ addItem,
10407
+ handleAuthFailure,
10408
+ onAuthError
10409
+ ]
10410
+ );
10411
+ const openAuthDialog = (0, import_react.useCallback)(() => {
10412
+ openedViaCommandRef.current = true;
10413
+ setIsAuthDialogOpen(true);
10414
+ }, []);
10415
+ const closeAuthDialog = (0, import_react.useCallback)(() => {
10416
+ openedViaCommandRef.current = false;
10417
+ setIsAuthDialogOpen(false);
10418
+ setChoosingDisplayMode(false);
10419
+ setAuthError(null);
10420
+ }, []);
10421
+ const cancelAuthentication = (0, import_react.useCallback)(() => {
10422
+ if (isAuthenticating && pendingAuthType) {
10423
+ logAuth(config, new AuthEvent(pendingAuthType, "manual", "cancelled"));
10424
+ }
10425
+ setIsAuthenticating(false);
10426
+ setExternalAuthState(null);
10427
+ setIsAuthDialogOpen(true);
10428
+ setAuthError(null);
10429
+ }, [isAuthenticating, pendingAuthType, config]);
10430
+ (0, import_react.useEffect)(() => {
10431
+ const val = process.env["O1CODE_DEFAULT_AUTH_TYPE"];
10432
+ const valid = [
10433
+ "openai" /* USE_OPENAI */,
10434
+ "openai-responses" /* USE_OPENAI_RESPONSES */,
10435
+ "anthropic" /* USE_ANTHROPIC */,
10436
+ "gemini" /* USE_GEMINI */,
10437
+ "vertex-ai" /* USE_VERTEX_AI */
10438
+ ];
10439
+ if (val && !valid.includes(val)) {
10440
+ onAuthError(
10441
+ t(
10442
+ 'Invalid O1CODE_DEFAULT_AUTH_TYPE value: "{{value}}". Valid values are: {{validValues}}',
10443
+ { value: val, validValues: valid.join(", ") }
10444
+ )
10445
+ );
10446
+ }
10447
+ }, [onAuthError]);
10448
+ const state = (0, import_react.useMemo)(
10449
+ () => ({
10450
+ authError,
10451
+ isAuthDialogOpen,
10452
+ isAuthenticating,
10453
+ choosingDisplayMode,
10454
+ pendingAuthType,
10455
+ externalAuthState
10456
+ }),
10457
+ [
10458
+ authError,
10459
+ isAuthDialogOpen,
10460
+ isAuthenticating,
10461
+ choosingDisplayMode,
10462
+ pendingAuthType,
10463
+ externalAuthState
10464
+ ]
10465
+ );
10466
+ const actions = (0, import_react.useMemo)(
10467
+ () => ({
10468
+ setAuthState,
10469
+ onAuthError,
10470
+ closeAuthDialog,
10471
+ handleProviderSubmit,
10472
+ openAuthDialog,
10473
+ cancelAuthentication,
10474
+ chooseDisplayMode,
10475
+ skipDisplayModeChoice: finishDisplayModeStep
10476
+ }),
10477
+ [
10478
+ setAuthState,
10479
+ onAuthError,
10480
+ closeAuthDialog,
10481
+ handleProviderSubmit,
10482
+ openAuthDialog,
10483
+ cancelAuthentication,
10484
+ chooseDisplayMode,
10485
+ finishDisplayModeStep
10486
+ ]
10487
+ );
10488
+ return {
10489
+ authState,
10490
+ setAuthState,
10491
+ authError,
10492
+ onAuthError,
10493
+ isAuthDialogOpen,
10494
+ isAuthenticating,
10495
+ pendingAuthType,
10496
+ externalAuthState,
10497
+ closeAuthDialog,
10498
+ handleProviderSubmit,
10499
+ openAuthDialog,
10500
+ cancelAuthentication,
10501
+ state,
10502
+ actions
10503
+ };
10504
+ }, "useAuthCommand");
10505
+
10506
+ // packages/cli/src/ui/auth/sign-out.ts
10507
+ function hostOf(baseUrl) {
10508
+ if (!baseUrl) return void 0;
10509
+ try {
10510
+ return new URL(baseUrl).host;
10511
+ } catch {
10512
+ return baseUrl;
10513
+ }
10514
+ }
10515
+ __name(hostOf, "hostOf");
10516
+ function describeActiveLogin(config) {
10517
+ const generator = config.getContentGeneratorConfig();
10518
+ const authType = generator?.authType;
10519
+ if (!generator || !authType) return void 0;
10520
+ const models = config.getModelsConfig();
10521
+ const resolved = models.getResolvedModel(
10522
+ authType,
10523
+ generator.model,
10524
+ models.getCurrentRegistryBaseUrl()
10525
+ );
10526
+ const tunnel = (resolved?.connection ?? generator.connection) === "o1-connect";
10527
+ const baseUrl = resolved?.baseUrl ?? generator.baseUrl;
10528
+ const envKey = (resolved?.envKey ?? generator.apiKeyEnvKey) || void 0;
10529
+ const preset = findProviderByCredentials(baseUrl, envKey);
10530
+ const organizaOne = reachesOrganizaOne({
10531
+ baseUrl,
10532
+ connection: tunnel ? "o1-connect" : void 0,
10533
+ model: generator.model
10534
+ });
10535
+ const credentialIds = [
10536
+ .../* @__PURE__ */ new Set([
10537
+ ...resolved?.credential ? [resolved.credential] : [],
10538
+ ...preset ? [credentialIdForProvider(preset.id)] : []
10539
+ ])
10540
+ ].filter((id) => isValidCredentialId(id) && readCredential(id));
10541
+ const saved = credentialIds[0] ? readCredential(credentialIds[0]) : void 0;
10542
+ const external = envKey && process.env[envKey] && !isExportedCredentialEnv(envKey);
10543
+ return {
10544
+ provider: organizaOne ? organizaoneProvider.label : preset && preset.id !== customProvider.id ? t(preset.label) : hostOf(baseUrl) ?? authType,
10545
+ organizaOne,
10546
+ ...preset?.uiGroup === "local" ? { local: true } : {},
10547
+ credentialIds,
10548
+ tunnel,
10549
+ ...envKey ? { envKey } : {},
10550
+ ...external ? { externalEnvKey: envKey } : {},
10551
+ ...tunnel && config.getO1ConnectSession()?.device ? { deviceName: config.getO1ConnectSession()?.device } : saved?.deviceName ? { deviceName: saved.deviceName } : {},
10552
+ ...saved ? { maskedKey: maskApiKey(saved.apiKey) } : {}
10553
+ };
10554
+ }
10555
+ __name(describeActiveLogin, "describeActiveLogin");
10556
+ function describeSignOutEffect(login) {
10557
+ const saved = login.credentialIds.length > 0;
10558
+ const removed = login.local ? t(
10559
+ "The connection saved on this machine is removed and this session is disconnected."
10560
+ ) : saved ? t(
10561
+ "The saved key is removed from this machine and this session is disconnected."
10562
+ ) : login.tunnel ? t(
10563
+ "The connection saved on this machine is removed and this session is disconnected."
10564
+ ) : t("This session is disconnected.");
10565
+ const kept = login.externalEnvKey ? t(
10566
+ "The environment variable {{envKey}} is set outside O1-Code and stays as it is.",
10567
+ { envKey: login.externalEnvKey }
10568
+ ) : login.organizaOne && (saved || login.tunnel) ? t("The device stays on your account page until you remove it there.") : login.local ? t("The server on this machine is not changed.") : saved ? t("The key itself stays valid until you revoke it at the provider.") : t("No key is saved for this provider.");
10569
+ return `${removed} ${kept}`;
10570
+ }
10571
+ __name(describeSignOutEffect, "describeSignOutEffect");
10572
+ function formatSignOutPrompt(login) {
10573
+ const lines = [
10574
+ `**${t("Sign out of {{provider}}?", { provider: login.provider })}**`,
10575
+ ""
10576
+ ];
10577
+ if (login.deviceName) {
10578
+ lines.push(`- ${t("Device: {{name}}", { name: login.deviceName })}`);
10579
+ }
10580
+ if (login.externalEnvKey) {
10581
+ lines.push(
10582
+ `- ${t("Key: {{key}}", {
10583
+ key: t("environment variable {{envKey}}", {
10584
+ envKey: login.externalEnvKey
10585
+ })
10586
+ })}`
10587
+ );
10588
+ } else if (login.maskedKey && !login.local) {
10589
+ lines.push(`- ${t("Key: {{key}}", { key: login.maskedKey })}`);
10590
+ }
10591
+ if (login.tunnel) {
10592
+ lines.push(
10593
+ `- ${t("Connection: {{name}}", { name: t("o1-gateway device code") })}`
10594
+ );
10595
+ }
10596
+ lines.push("", describeSignOutEffect(login));
10597
+ return lines.join("\n");
10598
+ }
10599
+ __name(formatSignOutPrompt, "formatSignOutPrompt");
10600
+ var SELECTED_AUTH_TYPE = "security.auth.selectedType";
10601
+ async function signOut(login, {
10602
+ config,
10603
+ settings,
10604
+ forgetTunnel = forgetO1Connect
10605
+ }) {
10606
+ for (const id of login.credentialIds) logoutProvider(id, settings);
10607
+ if (login.envKey) withdrawExportedCredential(login.envKey);
10608
+ for (const scope of ["User" /* User */, "Workspace" /* Workspace */]) {
10609
+ const selected = settings.forScope(scope).originalSettings.security?.auth?.selectedType;
10610
+ if (selected !== void 0) {
10611
+ settings.setValue(scope, SELECTED_AUTH_TYPE, void 0);
10612
+ }
10613
+ }
10614
+ await config.clearAuth();
10615
+ if (login.tunnel) await forgetTunnel();
10616
+ }
10617
+ __name(signOut, "signOut");
10618
+
10619
+ // packages/cli/src/ui/commands/logout-command.ts
10620
+ var logoutCommand = {
10621
+ name: "logout",
10622
+ altNames: ["disconnect"],
10623
+ get description() {
10624
+ return t("Sign out of the connected provider");
10625
+ },
10626
+ kind: "built-in" /* BUILT_IN */,
10627
+ supportedModes: ["interactive"],
10628
+ action: /* @__PURE__ */ __name(async (context) => {
10629
+ const { config, settings } = context.services;
10630
+ if (!config) {
10631
+ return {
10632
+ type: "message",
10633
+ messageType: "error",
10634
+ content: t("Configuration not available.")
10635
+ };
10636
+ }
10637
+ const login = describeActiveLogin(config);
10638
+ if (!login) {
10639
+ return {
10640
+ type: "message",
10641
+ messageType: "info",
10642
+ content: t("No provider is connected. Use /auth to connect one.")
10643
+ };
10644
+ }
10645
+ if (!context.overwriteConfirmed) {
10646
+ return {
10647
+ type: "confirm_action",
10648
+ prompt: formatSignOutPrompt(login),
10649
+ confirmLabel: t("Sign out"),
10650
+ cancelLabel: t("Cancel"),
10651
+ defaultDeny: true,
10652
+ originalInvocation: { raw: context.invocation?.raw || "/logout" }
10653
+ };
10654
+ }
10655
+ try {
10656
+ await signOut(login, { config, settings });
10657
+ } catch (error) {
10658
+ return {
10659
+ type: "message",
10660
+ messageType: "error",
10661
+ content: t("Could not sign out: {{message}}", {
10662
+ message: getErrorMessage(error)
10663
+ })
10664
+ };
10665
+ }
10666
+ context.ui.addItem(
10667
+ {
10668
+ type: "info" /* INFO */,
10669
+ text: t("Signed out of {{provider}}.", { provider: login.provider })
10670
+ },
10671
+ Date.now()
10672
+ );
10673
+ return { type: "dialog", dialog: "auth" };
10674
+ }, "action")
10675
+ };
10676
+
10677
+ // packages/cli/src/ui/commands/mcpCommand.ts
10678
+ init_esbuild_shims();
10679
+ var mcpCommand = {
10680
+ name: "mcp",
10681
+ get description() {
10682
+ return t("Open MCP management dialog");
10683
+ },
10684
+ argumentHint: "desc|nodesc|schema",
10685
+ kind: "built-in" /* BUILT_IN */,
10686
+ supportedModes: ["interactive"],
10687
+ action: /* @__PURE__ */ __name(async (_context, args = "") => {
10688
+ const [subcommand, serverName] = args.trim().split(/\s+/);
10689
+ if (subcommand === "auth" || subcommand === "noauth") {
10690
+ return {
10691
+ type: "message",
10692
+ messageType: "warning",
10693
+ content: serverName ? t(
10694
+ "MCP OAuth is now managed in the /mcp dialog. Open /mcp, select '{{serverName}}', then use the Auth actions there.",
10695
+ { serverName }
10696
+ ) : t(
10697
+ "MCP OAuth is now managed in the /mcp dialog. Open /mcp, select a server, then use the Auth actions there."
10698
+ )
10699
+ };
10700
+ }
10701
+ return {
10702
+ type: "dialog",
10703
+ dialog: "mcp"
10704
+ };
10705
+ }, "action")
10706
+ };
10707
+
10708
+ // packages/cli/src/ui/commands/dreamCommand.ts
10709
+ init_esbuild_shims();
10710
+ import * as path10 from "node:path";
10711
+ var dreamCommand = {
10712
+ name: "dream",
10713
+ get description() {
10714
+ return t("Consolidate managed auto-memory topic files.");
10715
+ },
10716
+ kind: "built-in" /* BUILT_IN */,
10717
+ supportedModes: ["interactive", "acp"],
10718
+ action: /* @__PURE__ */ __name(async (context) => {
10719
+ const config = context.services.config;
10720
+ if (!config) {
10721
+ return {
10722
+ type: "message",
10723
+ messageType: "error",
10724
+ content: t("Config not loaded.")
10725
+ };
10726
+ }
10727
+ try {
10728
+ const projectRoot = config.getProjectRoot();
10729
+ const memoryRoot = getAutoMemoryRoot(projectRoot);
10730
+ const transcriptDir = path10.join(
10731
+ new Storage(projectRoot).getProjectDir(),
10732
+ "chats"
10733
+ );
10734
+ const prompt = config.getMemoryManager().buildConsolidationPrompt(
10735
+ memoryRoot,
10736
+ transcriptDir,
10737
+ config.getAgentShellConfiguration?.()
10738
+ );
10739
+ const recordDream = /* @__PURE__ */ __name(async () => config.getMemoryManager().writeDreamManualRun(projectRoot, config.getSessionId()), "recordDream");
10740
+ if (context.executionMode === "acp") {
10741
+ recordDream().catch(() => {
10742
+ });
10743
+ return { type: "submit_prompt", content: prompt };
10744
+ }
10745
+ return {
10746
+ type: "submit_prompt",
10747
+ content: prompt,
10748
+ onComplete: recordDream
10749
+ };
10750
+ } catch (error) {
10751
+ return {
10752
+ type: "message",
10753
+ messageType: "error",
10754
+ content: t("Failed to process /dream: {{message}}", {
10755
+ message: error instanceof Error ? error.message : String(error)
10756
+ })
10757
+ };
10758
+ }
10759
+ }, "action")
10760
+ };
10761
+
10762
+ // packages/cli/src/ui/commands/forgetCommand.ts
10763
+ init_esbuild_shims();
10764
+ var forgetCommand = {
10765
+ name: "forget",
10766
+ get description() {
10767
+ return t("Remove matching entries from managed auto-memory.");
10768
+ },
10769
+ kind: "built-in" /* BUILT_IN */,
10770
+ supportedModes: ["interactive", "acp"],
10771
+ argumentHint: "<memory text to remove>",
10772
+ acceptsInput: true,
10773
+ action: /* @__PURE__ */ __name(async (context, args) => {
10774
+ const query = args.trim();
10775
+ if (!query) {
10776
+ return {
10777
+ type: "message",
10778
+ messageType: "error",
10779
+ content: t("Usage: /forget <memory text to remove>")
10780
+ };
10781
+ }
10782
+ const config = context.services.config;
10783
+ if (!config) {
10784
+ return {
10785
+ type: "message",
10786
+ messageType: "error",
10787
+ content: t("Config not loaded.")
10788
+ };
10789
+ }
10790
+ try {
10791
+ const selection = await config.getMemoryManager().selectForgetCandidates(config.getProjectRoot(), query, { config });
10792
+ const result = await config.getMemoryManager().forgetMatches(config.getProjectRoot(), selection.matches);
10793
+ return {
10794
+ type: "message",
10795
+ messageType: "info",
10796
+ content: result.systemMessage ?? t("No managed auto-memory entries matched: {{query}}", { query })
10797
+ };
10798
+ } catch (error) {
10799
+ return {
10800
+ type: "message",
10801
+ messageType: "error",
10802
+ content: t("Failed to process /forget: {{message}}", {
10803
+ message: error instanceof Error ? error.message : String(error)
10804
+ })
10805
+ };
10806
+ }
10807
+ }, "action")
10808
+ };
10809
+
10810
+ // packages/cli/src/ui/commands/memoryCommand.ts
10811
+ init_esbuild_shims();
10812
+ var memoryCommand = {
10813
+ name: "memory",
10814
+ get description() {
10815
+ return t("Open the memory manager.");
10816
+ },
10817
+ kind: "built-in" /* BUILT_IN */,
10818
+ supportedModes: ["interactive"],
10819
+ action: /* @__PURE__ */ __name(async () => ({
10820
+ type: "dialog",
10821
+ dialog: "memory"
10822
+ }), "action")
10823
+ };
10824
+
10825
+ // packages/cli/src/ui/commands/modelCommand.ts
10826
+ init_esbuild_shims();
10827
+
10828
+ // packages/cli/src/ui/voice/voice-model.ts
10829
+ init_esbuild_shims();
10830
+
10831
+ // packages/cli/src/ui/commands/modelCommand.ts
10832
+ var MAIN_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model without arguments to choose from configured models.";
10833
+ var FAST_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model --fast without a model to choose from configured models.";
10834
+ var VISION_MODEL_CONFIGURATION_HINT = "Configure an image-capable model in settings.modelProviders and ensure the required environment variables are set. Run /model --vision <model-id> to set it, or leave it unset to auto-pick a same-provider vision model.";
10835
+ var COMPACTION_MODEL_CONFIGURATION_HINT = "Configure models in settings.modelProviders and ensure the required environment variables are set. In interactive mode, run /auth to configure or switch providers, or run /model --compaction without a model to choose from configured models.";
10836
+ var IMAGE_MODEL_CONFIGURATION_HINT = "Configure a model with supportsImageGeneration: true (or legacy imageOnly: true), baseUrl, and envKey in settings.modelProviders. Run /model --image <model-id> to select it.";
10837
+ var MODEL_PICKER_FLAGS = [
10838
+ "fast",
10839
+ "voice",
10840
+ "vision",
10841
+ "compaction",
10842
+ "image",
10843
+ "project",
10844
+ "global"
10845
+ ];
10846
+ var MODEL_PICKER_FLAG_PATTERN = `(?:${MODEL_PICKER_FLAGS.join("|")})`;
10847
+ var MODEL_PICKER_ONLY_PATTERN = new RegExp(
10848
+ `^(?:\\s*--${MODEL_PICKER_FLAG_PATTERN})*\\s*$`
10849
+ );
10850
+ function isPickerOnlyModelInvocation(args) {
10851
+ return MODEL_PICKER_ONLY_PATTERN.test(args);
10852
+ }
10853
+ __name(isPickerOnlyModelInvocation, "isPickerOnlyModelInvocation");
10854
+ function parseScopeFlags(args) {
10855
+ let scopeOverride;
10856
+ let remaining = args;
10857
+ const hasProject = /(?:^|\s)--project(?:\s|$)/.test(remaining);
10858
+ const hasGlobal = /(?:^|\s)--global(?:\s|$)/.test(remaining);
10859
+ if (hasProject) {
10860
+ scopeOverride = "Workspace" /* Workspace */;
10861
+ remaining = remaining.replace(/(?:^|\s)--project(?:\s|$)/, " ").trim();
10862
+ } else if (hasGlobal) {
10863
+ scopeOverride = "User" /* User */;
10864
+ remaining = remaining.replace(/(?:^|\s)--global(?:\s|$)/, " ").trim();
10865
+ }
10866
+ return { scopeOverride, remaining, hasProject, hasGlobal };
10867
+ }
10868
+ __name(parseScopeFlags, "parseScopeFlags");
10869
+ function resolveScope(settings, scopeOverride) {
10870
+ return scopeOverride ?? getPersistScopeForModelSelection(settings);
10871
+ }
10872
+ __name(resolveScope, "resolveScope");
10873
+ function persistScopeSpread(scopeOverride) {
10874
+ if (scopeOverride === "Workspace" /* Workspace */)
10875
+ return { persistScope: "workspace" };
10876
+ if (scopeOverride === "User" /* User */)
10877
+ return { persistScope: "user" };
10878
+ return {};
10879
+ }
10880
+ __name(persistScopeSpread, "persistScopeSpread");
10881
+ function formatVisionModelSettingForDisplay(setting) {
10882
+ const parsed = parseVisionModelSetting(setting);
10883
+ if (!parsed) return setting.replace(/\0/g, "\\0");
10884
+ return parsed.baseUrl ? `${parsed.selector} (${redactProxyCredentials(parsed.baseUrl)})` : parsed.selector;
10885
+ }
10886
+ __name(formatVisionModelSettingForDisplay, "formatVisionModelSettingForDisplay");
10887
+ function persistSetting(settings, path19, value, scopeOverride) {
10888
+ settings.setValue(resolveScope(settings, scopeOverride), path19, value);
10889
+ }
10890
+ __name(persistSetting, "persistSetting");
10891
+ async function switchMainModel(config, settings, currentAuthType, modelArg, scopeOverride, persistSelection = true, isBusy) {
10892
+ const parsed = parseAcpModelOption(modelArg);
10231
10893
  const selectedAuthType = parsed.authType ?? currentAuthType;
10232
10894
  const selectedModel = parsed.authType ? parsed.modelId : modelArg;
10233
10895
  const before = config.getContentGeneratorConfig();
@@ -12352,206 +13014,6 @@ init_esbuild_shims();
12352
13014
  import * as fs10 from "node:fs/promises";
12353
13015
  import { randomUUID } from "node:crypto";
12354
13016
  import path12 from "node:path";
12355
-
12356
- // packages/cli/src/ui/auth/organizaone-limits-summary.ts
12357
- init_esbuild_shims();
12358
- function count(value) {
12359
- return new Intl.NumberFormat(getCurrentLanguage()).format(value);
12360
- }
12361
- __name(count, "count");
12362
- function dollars(micros) {
12363
- return new Intl.NumberFormat(getCurrentLanguage(), {
12364
- style: "currency",
12365
- currency: "USD"
12366
- }).format(micros / 1e6);
12367
- }
12368
- __name(dollars, "dollars");
12369
- function duration(ms) {
12370
- return formatDuration(ms, { hideTrailingZeros: true });
12371
- }
12372
- __name(duration, "duration");
12373
- function limitLabel(name, used, limit) {
12374
- switch (name) {
12375
- case "requests_per_minute":
12376
- return t("{{used}}/{{limit}} requests per minute", { used, limit });
12377
- case "tokens_per_minute":
12378
- return t("{{used}}/{{limit}} tokens per minute", { used, limit });
12379
- case "requests_per_day":
12380
- return t("{{used}}/{{limit}} requests today", { used, limit });
12381
- case "tokens_per_day":
12382
- return t("{{used}}/{{limit}} tokens today", { used, limit });
12383
- case "concurrent":
12384
- return t("{{used}}/{{limit}} at once", { used, limit });
12385
- case "spend_per_day_micros":
12386
- return t("{{used}}/{{limit}} spent today", { used, limit });
12387
- case "spend_per_month_micros":
12388
- return t("{{used}}/{{limit}} spent this month", { used, limit });
12389
- default:
12390
- return `${used}/${limit} ${name}`;
12391
- }
12392
- }
12393
- __name(limitLabel, "limitLabel");
12394
- function limitParts(limits, usage2, usageKeys) {
12395
- const parts = [];
12396
- for (const [name, usageKey] of Object.entries(usageKeys)) {
12397
- const limit = limits[name];
12398
- if (limit === null || limit === void 0) continue;
12399
- const used = usage2[usageKey] ?? 0;
12400
- const isSpend = name.endsWith("_micros");
12401
- parts.push(
12402
- limitLabel(
12403
- name,
12404
- isSpend ? dollars(used) : count(used),
12405
- isSpend ? dollars(limit) : count(limit)
12406
- )
12407
- );
12408
- }
12409
- return parts;
12410
- }
12411
- __name(limitParts, "limitParts");
12412
- function resetLine(iso, now) {
12413
- const at = iso ? Date.parse(iso) : NaN;
12414
- if (!Number.isFinite(at)) return void 0;
12415
- return t("Daily limits reset at {{time}} (in {{wait}}).", {
12416
- time: new Date(at).toLocaleTimeString(getCurrentLanguage(), {
12417
- hour: "2-digit",
12418
- minute: "2-digit"
12419
- }),
12420
- wait: duration(Math.max(0, at - now))
12421
- });
12422
- }
12423
- __name(resetLine, "resetLine");
12424
- function windowLine(snapshot) {
12425
- if (!snapshot) return [];
12426
- const parts = [];
12427
- if (snapshot.requests) {
12428
- parts.push(
12429
- t("{{remaining}} of {{limit}} requests left", {
12430
- remaining: count(snapshot.requests.remaining),
12431
- limit: count(snapshot.requests.limit)
12432
- })
12433
- );
12434
- }
12435
- if (snapshot.tokens) {
12436
- parts.push(
12437
- t("{{remaining}} of {{limit}} tokens left", {
12438
- remaining: count(snapshot.tokens.remaining),
12439
- limit: count(snapshot.tokens.limit)
12440
- })
12441
- );
12442
- }
12443
- return [t("Last request: {{windows}}", { windows: parts.join(" \xB7 ") })];
12444
- }
12445
- __name(windowLine, "windowLine");
12446
- function modelQuotaLines(info, now) {
12447
- const quota = info.modelQuota;
12448
- if (!quota) return [];
12449
- const heading = quota.source === "own" ? t("Your own account") : t("Your plan");
12450
- const parts = quota.windows.map((window) => {
12451
- let value;
12452
- if (window.usedPercent !== void 0 && window.usedPercent !== null) {
12453
- value = t("{{percent}}% used", {
12454
- percent: String(Math.round(window.usedPercent * 10) / 10)
12455
- });
12456
- } else if (window.limitMicros !== void 0 && window.usedMicros !== void 0) {
12457
- value = t("{{used}} of {{limit}}", {
12458
- used: dollars(window.usedMicros),
12459
- limit: dollars(window.limitMicros)
12460
- });
12461
- } else {
12462
- value = t("usage unavailable");
12463
- }
12464
- const reset = window.resetsAt ? Date.parse(window.resetsAt) : NaN;
12465
- return Number.isFinite(reset) ? `${window.name}: ${value} (${t("resets in {{wait}}", { wait: duration(Math.max(0, reset - now)) })})` : `${window.name}: ${value}`;
12466
- });
12467
- return parts.length ? [`${heading}: ${parts.join(" \xB7 ")}`] : [];
12468
- }
12469
- __name(modelQuotaLines, "modelQuotaLines");
12470
- function formatOrganizaOneKeyInfo(info, latest, now = Date.now()) {
12471
- const heading = [
12472
- "OrganizaOne",
12473
- info.plan?.name ? t("plan {{name}}", { name: info.plan.name }) : void 0,
12474
- info.device?.name
12475
- ].filter(Boolean).join(" \xB7 ");
12476
- const lines = [heading];
12477
- const spend = info.plan?.spend;
12478
- if (spend) {
12479
- lines.push(
12480
- spend.included === null ? t("Spent this period: {{used}}", { used: dollars(spend.used) }) : t("Spent this period: {{used}} of {{included}}", {
12481
- used: dollars(spend.used),
12482
- included: dollars(spend.included)
12483
- })
12484
- );
12485
- }
12486
- if (info.plan?.maxOutputTokens) {
12487
- lines.push(
12488
- t("Output per request: up to {{tokens}} tokens", {
12489
- tokens: count(info.plan.maxOutputTokens)
12490
- })
12491
- );
12492
- }
12493
- let anyLimit = false;
12494
- for (const scope of info.scopes) {
12495
- const parts = limitParts(scope.limits, scope.usage, KEY_LIMIT_USAGE);
12496
- if (parts.length === 0) continue;
12497
- anyLimit = true;
12498
- lines.push(
12499
- `${t("Limits ({{scope}})", { scope: scope.scope })}: ${parts.join(" \xB7 ")}`
12500
- );
12501
- }
12502
- if (!anyLimit) lines.push(t("No request or token limits on this key."));
12503
- if (info.own?.enabled) {
12504
- const parts = limitParts(info.own.caps, info.own.usage, OWN_CAP_USAGE);
12505
- if (parts.length > 0) {
12506
- lines.push(`${t("Own credentials")}: ${parts.join(" \xB7 ")}`);
12507
- }
12508
- }
12509
- lines.push(...modelQuotaLines(info, now));
12510
- const reset = resetLine(info.dayReset, now);
12511
- if (reset) lines.push(reset);
12512
- lines.push(...windowLine(latest));
12513
- return lines.join("\n");
12514
- }
12515
- __name(formatOrganizaOneKeyInfo, "formatOrganizaOneKeyInfo");
12516
- async function loadOrganizaOneKeySummary(config, signal) {
12517
- const generator = config.getContentGeneratorConfig();
12518
- if (!generator || !reachesOrganizaOne(generator)) {
12519
- return { status: "not-organizaone" };
12520
- }
12521
- const info = await fetchKeyInfo({
12522
- baseUrl: generator.baseUrl ?? "",
12523
- apiKey: generator.apiKey ?? "",
12524
- signal,
12525
- clientVersion: config.getCliVersion(),
12526
- model: generator.model
12527
- });
12528
- if (!info) return { status: "unavailable" };
12529
- return {
12530
- status: "ok",
12531
- text: formatOrganizaOneKeyInfo(info, getLatestRateLimits())
12532
- };
12533
- }
12534
- __name(loadOrganizaOneKeySummary, "loadOrganizaOneKeySummary");
12535
- function formatLowRateLimit(low) {
12536
- const values = {
12537
- remaining: count(low.remaining),
12538
- limit: count(low.limit),
12539
- wait: low.resetMs === void 0 ? "" : duration(low.resetMs)
12540
- };
12541
- if (low.kind === "requests") {
12542
- return low.resetMs === void 0 ? t("OrganizaOne: {{remaining}} of {{limit}} requests left.", values) : t(
12543
- "OrganizaOne: {{remaining}} of {{limit}} requests left; the window refills in {{wait}}.",
12544
- values
12545
- );
12546
- }
12547
- return low.resetMs === void 0 ? t("OrganizaOne: {{remaining}} of {{limit}} tokens left.", values) : t(
12548
- "OrganizaOne: {{remaining}} of {{limit}} tokens left; the window refills in {{wait}}.",
12549
- values
12550
- );
12551
- }
12552
- __name(formatLowRateLimit, "formatLowRateLimit");
12553
-
12554
- // packages/cli/src/ui/commands/statsCommand.ts
12555
13017
  var VALID_EXPORT_FORMATS = /* @__PURE__ */ new Set(["csv", "json"]);
12556
13018
  var EMPTY_SKILL_METRICS = {
12557
13019
  totalCalls: 0,
@@ -16052,10 +16514,10 @@ var updateCommand = {
16052
16514
  { performStandaloneUpdate },
16053
16515
  installationInfo
16054
16516
  ] = await Promise.all([
16055
- import("./updateCheck-FJQDYAG6.js"),
16056
- import("./processUtils-FAIS7M3Y.js"),
16057
- import("./standalone-update-F7SJN6QH.js"),
16058
- import("./installationInfo-YFS4WR5Z.js")
16517
+ import("./updateCheck-24QAZMCF.js"),
16518
+ import("./processUtils-ACE5MNN5.js"),
16519
+ import("./standalone-update-Y6CLALFV.js"),
16520
+ import("./installationInfo-JEVGNV5S.js")
16059
16521
  ]);
16060
16522
  const { formatUpdateInstructions, getInstallationInfo: getInstallationInfo2 } = installationInfo;
16061
16523
  const settings = context.services.settings;
@@ -16257,6 +16719,7 @@ var BuiltinCommandLoader = class {
16257
16719
  initCommand,
16258
16720
  languageCommand,
16259
16721
  learnCommand,
16722
+ logoutCommand,
16260
16723
  mcpCommand,
16261
16724
  ...this.config?.isManagedMemoryAvailable() ? [dreamCommand, forgetCommand] : [],
16262
16725
  goalCommand,
@@ -18477,6 +18940,9 @@ export {
18477
18940
  createEmptyHookEventInfo,
18478
18941
  addConfigToMatcherGroup,
18479
18942
  getAllConfigs,
18943
+ normalizeModelIds,
18944
+ maskApiKey,
18945
+ useAuthCommand,
18480
18946
  recordDaemonSessionModel,
18481
18947
  restoreSessionModelThenAuthenticate,
18482
18948
  isPickerOnlyModelInvocation,
@@ -18487,8 +18953,6 @@ export {
18487
18953
  describeRemoteSnapshot,
18488
18954
  describeRemoteOutcome,
18489
18955
  refreshExtensionContentRuntime,
18490
- loadOrganizaOneKeySummary,
18491
- formatLowRateLimit,
18492
18956
  pLimit,
18493
18957
  dayKey,
18494
18958
  parseDayKey,