@namzu/cli 44.1.1 → 45.0.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 (602) hide show
  1. package/CHANGELOG.md +179 -0
  2. package/README.md +4 -2
  3. package/dist/bin.js +1 -1
  4. package/dist/chunks/acp-XSAUUT2D.js +7648 -0
  5. package/dist/chunks/acp-XSAUUT2D.js.map +6 -0
  6. package/dist/chunks/{activity-command-Y5ZLCQ63.js → activity-command-DB4DREW7.js} +16 -15
  7. package/dist/chunks/activity-command-DB4DREW7.js.map +6 -0
  8. package/dist/chunks/{add-F7M57FGR.js → add-NVXRVUGY.js} +27 -21
  9. package/dist/chunks/add-NVXRVUGY.js.map +6 -0
  10. package/dist/chunks/{agent-AFX2UZU5.js → agent-6TD66IMV.js} +43 -34
  11. package/dist/chunks/agent-session-3A5K5VK3.js +69 -0
  12. package/dist/chunks/{archive-6NM6DYAT.js → archive-A3X7KX2U.js} +11 -10
  13. package/dist/chunks/archive-A3X7KX2U.js.map +6 -0
  14. package/dist/chunks/{bin-main-I6CHRYYQ.js → bin-main-5PYV7WYI.js} +11 -11
  15. package/dist/chunks/binding-EMMG5PAE.js +17 -0
  16. package/dist/chunks/{browser-OPMOTWTV.js → browser-FUFFJBRR.js} +6 -6
  17. package/dist/chunks/{chat-KGVPXQS6.js → chat-M653DEAF.js} +20 -19
  18. package/dist/chunks/chat-M653DEAF.js.map +6 -0
  19. package/dist/chunks/{chunk-TX2PUHTP.js → chunk-24FBGXYR.js} +3 -3
  20. package/dist/chunks/{chunk-2NGXQQPP.js → chunk-2OAD3CZE.js} +3 -3
  21. package/dist/chunks/chunk-2YCPLLUW.js +61 -0
  22. package/dist/chunks/chunk-2YCPLLUW.js.map +6 -0
  23. package/dist/chunks/{chunk-JCUPTKQY.js → chunk-325X27UO.js} +4 -4
  24. package/dist/chunks/{chunk-REDD2WY7.js → chunk-43HR3AF5.js} +2 -2
  25. package/dist/chunks/{chunk-DESOZLEL.js → chunk-43PTHA5N.js} +2 -2
  26. package/dist/chunks/{chunk-T5POXPXY.js → chunk-46OOPRR6.js} +3 -3
  27. package/dist/chunks/chunk-4DVCHAWN.js +219 -0
  28. package/dist/chunks/chunk-4DVCHAWN.js.map +6 -0
  29. package/dist/chunks/chunk-667W6Z5W.js +309 -0
  30. package/dist/chunks/chunk-667W6Z5W.js.map +6 -0
  31. package/dist/chunks/chunk-6HTC5TQ3.js +89 -0
  32. package/dist/chunks/chunk-6HTC5TQ3.js.map +6 -0
  33. package/dist/chunks/chunk-6PDIDZGX.js +363 -0
  34. package/dist/chunks/chunk-6PDIDZGX.js.map +6 -0
  35. package/dist/chunks/{chunk-UHPRMPWX.js → chunk-6TT7NXLP.js} +182 -139
  36. package/dist/chunks/chunk-6TT7NXLP.js.map +6 -0
  37. package/dist/chunks/{chunk-EFQ6FUFZ.js → chunk-6ZEHXLF7.js} +2 -2
  38. package/dist/chunks/{chunk-RSRJQB6Q.js → chunk-7DR7EU3J.js} +2078 -850
  39. package/dist/chunks/chunk-7DR7EU3J.js.map +6 -0
  40. package/dist/chunks/chunk-7NJAEWFK.js +153 -0
  41. package/dist/chunks/chunk-7NJAEWFK.js.map +6 -0
  42. package/dist/chunks/{chunk-I32JTWDW.js → chunk-7TBETDTX.js} +2 -2
  43. package/dist/chunks/{chunk-465CVUN4.js → chunk-ADCVLGQO.js} +3 -3
  44. package/dist/chunks/{chunk-W5QFVC74.js → chunk-AHNXQAYZ.js} +91 -56
  45. package/dist/chunks/chunk-AHNXQAYZ.js.map +6 -0
  46. package/dist/chunks/{chunk-W4E2N7TY.js → chunk-ANHFJD66.js} +4 -4
  47. package/dist/chunks/{chunk-UGAT33T5.js → chunk-B6INWHLR.js} +3 -3
  48. package/dist/chunks/{chunk-Y44FAVKA.js → chunk-BICC735N.js} +3 -3
  49. package/dist/chunks/{chunk-UC3ZACVN.js → chunk-BOM64EUQ.js} +2 -2
  50. package/dist/chunks/{chunk-RFMODICJ.js → chunk-C4MAQ64X.js} +84 -42
  51. package/dist/chunks/chunk-C4MAQ64X.js.map +6 -0
  52. package/dist/chunks/chunk-CDDS3UKB.js +425 -0
  53. package/dist/chunks/chunk-CDDS3UKB.js.map +6 -0
  54. package/dist/chunks/{chunk-CTN4O42X.js → chunk-D23EJNO5.js} +3 -3
  55. package/dist/chunks/{chunk-G5RAECIB.js → chunk-E2MNVA3X.js} +2 -2
  56. package/dist/chunks/{chunk-BR6EWAKQ.js → chunk-E3FA5H3Q.js} +5 -5
  57. package/dist/chunks/{chunk-LUSUJZR2.js → chunk-EFU2OFEK.js} +2 -2
  58. package/dist/chunks/chunk-EXFSMYH4.js +83 -0
  59. package/dist/chunks/chunk-EXFSMYH4.js.map +6 -0
  60. package/dist/chunks/{chunk-EFEZWLZC.js → chunk-FUJSGQYW.js} +17 -13
  61. package/dist/chunks/chunk-FUJSGQYW.js.map +6 -0
  62. package/dist/chunks/{chunk-FPLDTTM2.js → chunk-FZR4XULA.js} +6 -6
  63. package/dist/chunks/{chunk-YAEHAYI4.js → chunk-G5FWVYK2.js} +47 -9
  64. package/dist/chunks/chunk-G5FWVYK2.js.map +6 -0
  65. package/dist/chunks/{chunk-6LLJQ3KY.js → chunk-G6YSAHKC.js} +4 -3
  66. package/dist/chunks/chunk-G6YSAHKC.js.map +6 -0
  67. package/dist/chunks/{chunk-JSFF2HGX.js → chunk-GAEZQRQI.js} +3 -3
  68. package/dist/chunks/{chunk-UP3SWACV.js → chunk-GCFXQSN6.js} +2 -2
  69. package/dist/chunks/{chunk-XPS3W7FC.js → chunk-GMUWAUKQ.js} +2 -2
  70. package/dist/chunks/chunk-GWGIAZLZ.js +5853 -0
  71. package/dist/chunks/chunk-GWGIAZLZ.js.map +6 -0
  72. package/dist/chunks/chunk-H6AUN2YD.js +290 -0
  73. package/dist/chunks/chunk-H6AUN2YD.js.map +6 -0
  74. package/dist/chunks/{chunk-KHM2XON5.js → chunk-HFD2VRQP.js} +18 -4
  75. package/dist/chunks/chunk-HFD2VRQP.js.map +6 -0
  76. package/dist/chunks/{chunk-CRWNJ62V.js → chunk-HGIIAAEG.js} +5 -6
  77. package/dist/chunks/chunk-HGIIAAEG.js.map +6 -0
  78. package/dist/chunks/{chunk-WLAI3VCE.js → chunk-HH3NBBBE.js} +2 -2
  79. package/dist/chunks/{chunk-WPNT6IGU.js → chunk-HV2JFRSE.js} +2 -2
  80. package/dist/chunks/{chunk-ZXKN4TWP.js → chunk-IRUDNBAR.js} +242 -447
  81. package/dist/chunks/chunk-IRUDNBAR.js.map +6 -0
  82. package/dist/chunks/chunk-IYEDXZQZ.js +4322 -0
  83. package/dist/chunks/chunk-IYEDXZQZ.js.map +6 -0
  84. package/dist/chunks/{chunk-AE4LOPZF.js → chunk-J2FGTLZV.js} +2 -2
  85. package/dist/chunks/{chunk-T2PF65KB.js → chunk-JAB62RI5.js} +2 -2
  86. package/dist/chunks/{chunk-HXZ2JXCO.js → chunk-JKPUOSDC.js} +2 -2
  87. package/dist/chunks/{chunk-GSYPRZZU.js → chunk-K5FQ4G64.js} +2 -2
  88. package/dist/chunks/{chunk-NS7EU37U.js → chunk-KVCYYXCS.js} +2 -2
  89. package/dist/chunks/{chunk-PWOG3OMH.js → chunk-KZ5WYSA6.js} +9 -9
  90. package/dist/chunks/chunk-L2WEBN6A.js +49 -0
  91. package/dist/chunks/chunk-L2WEBN6A.js.map +6 -0
  92. package/dist/chunks/{chunk-7U36A4WQ.js → chunk-L6QJZZCJ.js} +55 -5
  93. package/dist/chunks/chunk-L6QJZZCJ.js.map +6 -0
  94. package/dist/chunks/{chunk-ORVWGSLG.js → chunk-LHZSSQ6K.js} +4 -4
  95. package/dist/chunks/{chunk-2NFPIARP.js → chunk-LR4QQMJH.js} +4 -4
  96. package/dist/chunks/{chunk-3NJPNX6V.js → chunk-LVVD32KJ.js} +14 -4
  97. package/dist/chunks/chunk-LVVD32KJ.js.map +6 -0
  98. package/dist/chunks/{chunk-JAYPFJGZ.js → chunk-M7LCVDP3.js} +9 -2
  99. package/dist/chunks/chunk-M7LCVDP3.js.map +6 -0
  100. package/dist/chunks/{chunk-JV3LONAU.js → chunk-MDK4RMBQ.js} +9 -3
  101. package/dist/chunks/{chunk-JV3LONAU.js.map → chunk-MDK4RMBQ.js.map} +1 -1
  102. package/dist/chunks/{chunk-QNTR7X7D.js → chunk-MKRYUMLP.js} +6 -6
  103. package/dist/chunks/{chunk-O4MFP726.js → chunk-MMZHUQZQ.js} +4427 -1413
  104. package/dist/chunks/chunk-MMZHUQZQ.js.map +6 -0
  105. package/dist/chunks/{chunk-WKUTR7YW.js → chunk-MYSU54EZ.js} +86 -21
  106. package/dist/chunks/chunk-MYSU54EZ.js.map +6 -0
  107. package/dist/chunks/{chunk-5UB2LLPG.js → chunk-NUNOIP4Y.js} +2 -2
  108. package/dist/chunks/{chunk-ZRBGY4SL.js → chunk-NXX6C3WS.js} +2 -2
  109. package/dist/chunks/{chunk-ZNYKZ3MI.js → chunk-OENL667J.js} +2 -2
  110. package/dist/chunks/{chunk-LS75R55C.js → chunk-OMRU22BQ.js} +4 -4
  111. package/dist/chunks/{chunk-BLM6IQS4.js → chunk-P6FEQPES.js} +5 -5
  112. package/dist/chunks/{chunk-BIGRB2H4.js → chunk-P6RUYL3F.js} +3 -3
  113. package/dist/chunks/chunk-P7MNE6YP.js +456 -0
  114. package/dist/chunks/chunk-P7MNE6YP.js.map +6 -0
  115. package/dist/chunks/{chunk-6Z2ZJ4BA.js → chunk-RJQ6WQYX.js} +358 -32
  116. package/dist/chunks/chunk-RJQ6WQYX.js.map +6 -0
  117. package/dist/chunks/{chunk-YPRKTJ5P.js → chunk-S2UDKXWH.js} +2 -2
  118. package/dist/chunks/chunk-S766UWAQ.js +227 -0
  119. package/dist/chunks/chunk-S766UWAQ.js.map +6 -0
  120. package/dist/chunks/chunk-S7WRWA25.js +33 -0
  121. package/dist/chunks/chunk-S7WRWA25.js.map +6 -0
  122. package/dist/chunks/{chunk-XFNCCDJK.js → chunk-TFOIA3U3.js} +2 -2
  123. package/dist/chunks/{chunk-NPZY5OJ5.js → chunk-THJQXERD.js} +8 -8
  124. package/dist/chunks/{chunk-ZUN2WRCB.js → chunk-THQAGFMO.js} +17 -17
  125. package/dist/chunks/{chunk-FKIO77IY.js → chunk-THUX2WOG.js} +12 -12
  126. package/dist/chunks/{chunk-AY7B43MK.js → chunk-TKIWAXRU.js} +13 -13
  127. package/dist/chunks/{chunk-QV43JSBP.js → chunk-TUF4NNJV.js} +2 -2
  128. package/dist/chunks/{chunk-KK2L4FD2.js → chunk-U33GIKBK.js} +4 -4
  129. package/dist/chunks/{chunk-WLUGKIYQ.js → chunk-U3EQTU4G.js} +4 -4
  130. package/dist/chunks/{chunk-VR4MTSMH.js → chunk-U6U472VN.js} +3 -3
  131. package/dist/chunks/chunk-VAP6YMB6.js +362 -0
  132. package/dist/chunks/chunk-VAP6YMB6.js.map +6 -0
  133. package/dist/chunks/{chunk-RV5QY3IY.js → chunk-VGUU6E6X.js} +6 -6
  134. package/dist/chunks/chunk-VHFPIYVY.js +63 -0
  135. package/dist/chunks/chunk-VHFPIYVY.js.map +6 -0
  136. package/dist/chunks/{chunk-LN26A356.js → chunk-VY377HAA.js} +4 -4
  137. package/dist/chunks/{chunk-HYFX32Y3.js → chunk-WG32TSVL.js} +3 -3
  138. package/dist/chunks/{chunk-ZATO2QOS.js → chunk-WSIMHBEQ.js} +2 -2
  139. package/dist/chunks/{chunk-JH3SDABI.js → chunk-X4WCRRZV.js} +6 -6
  140. package/dist/chunks/chunk-X7WLWVR7.js +189 -0
  141. package/dist/chunks/chunk-X7WLWVR7.js.map +6 -0
  142. package/dist/chunks/{chunk-2OVZNENW.js → chunk-XH5YF2YX.js} +2 -2
  143. package/dist/chunks/chunk-Y2PZNQH5.js +413 -0
  144. package/dist/chunks/chunk-Y2PZNQH5.js.map +6 -0
  145. package/dist/chunks/{chunk-CMAZ3DYB.js → chunk-YLNQLDMP.js} +5 -5
  146. package/dist/chunks/chunk-YOWYTBJS.js +96 -0
  147. package/dist/chunks/chunk-YOWYTBJS.js.map +6 -0
  148. package/dist/chunks/{cli-runtime-HTTDQPEZ.js → cli-runtime-QWBGE2VF.js} +16 -15
  149. package/dist/chunks/cli-runtime-QWBGE2VF.js.map +6 -0
  150. package/dist/chunks/{commands-ZD2L5QMI.js → commands-LVUUZ6LF.js} +5 -5
  151. package/dist/chunks/{crash-report-2IRIZSBD.js → crash-report-PGXMRS5P.js} +8 -8
  152. package/dist/chunks/{dist-NL7WG7PX.js → dist-6HN2ZMLV.js} +2 -2
  153. package/dist/chunks/{dist-45IFTDJW.js → dist-JJANJMY5.js} +162 -13
  154. package/dist/chunks/dist-JJANJMY5.js.map +6 -0
  155. package/dist/chunks/{dist-GSYFGRQT.js → dist-JRBSW53E.js} +2 -2
  156. package/dist/chunks/{dist-OJTB6QLR.js → dist-NSCNMOX7.js} +2 -2
  157. package/dist/chunks/{dist-FNGLTQIG.js → dist-TC6H7TPQ.js} +78 -2
  158. package/dist/chunks/{dist-TWYNAZDN.js → dist-V4SNHHMB.js} +2 -2
  159. package/dist/chunks/{dist-RQJEJN3Z.js → dist-VON3NRHE.js} +35 -6
  160. package/dist/chunks/dist-VON3NRHE.js.map +6 -0
  161. package/dist/chunks/{dist-OCZJJFHF.js → dist-VV3V36IP.js} +2 -2
  162. package/dist/chunks/{doctor-NKPCWPB4.js → doctor-P7L35KGN.js} +20 -16
  163. package/dist/chunks/{drain-YTSVAQP5.js → drain-HOHRXIYY.js} +14 -14
  164. package/dist/chunks/entry-L7XZIE7J.js +233 -0
  165. package/dist/chunks/entry-L7XZIE7J.js.map +6 -0
  166. package/dist/chunks/{eval-ILFXDQUQ.js → eval-2F473JAC.js} +2 -2
  167. package/dist/chunks/{exec-3JDAB34N.js → exec-VCM4AL2S.js} +65 -51
  168. package/dist/chunks/exec-VCM4AL2S.js.map +6 -0
  169. package/dist/chunks/{github-FH7PPWVW.js → github-OFCHQMQQ.js} +5 -5
  170. package/dist/chunks/{home-5OIZIDIT.js → home-R6WCBSOT.js} +3 -3
  171. package/dist/chunks/host-JGPJVLTC.js +28 -0
  172. package/dist/chunks/{host-queries-SO2NOQRR.js → host-queries-QWV47CFK.js} +17 -16
  173. package/dist/chunks/host-queries-QWV47CFK.js.map +6 -0
  174. package/dist/chunks/{learn-RHNMJ4BD.js → learn-3UPHM5OI.js} +14 -14
  175. package/dist/chunks/{learn-builtin-UQ3MWGK6.js → learn-builtin-3Q4BJFCF.js} +20 -20
  176. package/dist/chunks/{lifecycle-RTDYXKBW.js → lifecycle-EJLVISCU.js} +37 -30
  177. package/dist/chunks/{list-G6OA34RL.js → list-DQJBF4AB.js} +18 -17
  178. package/dist/chunks/list-DQJBF4AB.js.map +6 -0
  179. package/dist/chunks/{live-44HBQCQY.js → live-IWDOVSLG.js} +18 -14
  180. package/dist/chunks/login-B2PHE6IL.js +34 -0
  181. package/dist/chunks/{logs-22QAEH2Q.js → logs-5UTV3FMG.js} +4 -4
  182. package/dist/chunks/{mcp-EXFVIHPJ.js → mcp-JN36OQLX.js} +32 -26
  183. package/dist/chunks/mcp-JN36OQLX.js.map +6 -0
  184. package/dist/chunks/{message-command-B4L2W4YZ.js → message-command-RMLQ2PU5.js} +54 -45
  185. package/dist/chunks/message-command-RMLQ2PU5.js.map +6 -0
  186. package/dist/chunks/mouse-WFSJSLQD.js +22 -0
  187. package/dist/chunks/open-LDBJL43A.js +20 -0
  188. package/dist/chunks/{operator-tools-TEP4UTI6.js → operator-tools-NA7PLRIP.js} +15 -14
  189. package/dist/chunks/operator-tools-NA7PLRIP.js.map +6 -0
  190. package/dist/chunks/{output-schema-FZXJ7V33.js → output-schema-UKYWRZPS.js} +3 -3
  191. package/dist/chunks/{pal-BUDEBIBJ.js → pal-MAVUNYMB.js} +20 -15
  192. package/dist/chunks/pal-MAVUNYMB.js.map +6 -0
  193. package/dist/chunks/palette-WDPS7W6Q.js +15 -0
  194. package/dist/chunks/peers-FBTQW2SY.js +18 -0
  195. package/dist/chunks/prefix-MLAG4KTK.js +14 -0
  196. package/dist/chunks/{providers-EQ32NZAT.js → providers-M75ET3GT.js} +45 -26
  197. package/dist/chunks/pty-VMUEEJRN.js +29 -0
  198. package/dist/chunks/pty-VMUEEJRN.js.map +6 -0
  199. package/dist/chunks/{resident-FSUGNG56.js → resident-URNRPE2S.js} +35 -33
  200. package/dist/chunks/resident-URNRPE2S.js.map +6 -0
  201. package/dist/chunks/resume-7B3EHDJ7.js +24 -0
  202. package/dist/chunks/resume-7B3EHDJ7.js.map +6 -0
  203. package/dist/chunks/{resume-command-DHPXCZVL.js → resume-command-5QGHV6WR.js} +4 -4
  204. package/dist/chunks/resume-command-5QGHV6WR.js.map +6 -0
  205. package/dist/chunks/{schedule-OJMZEWJG.js → schedule-BK3WF2VK.js} +8 -8
  206. package/dist/chunks/{service-EP2QHCK7.js → service-VWASFP3R.js} +38 -31
  207. package/dist/chunks/service-VWASFP3R.js.map +6 -0
  208. package/dist/chunks/{session-step-44XBOUDV.js → session-step-DORV5FER.js} +16 -16
  209. package/dist/chunks/session-step-DORV5FER.js.map +6 -0
  210. package/dist/chunks/{skills-YHAQXVP2.js → skills-TDDPMTQI.js} +12 -12
  211. package/dist/chunks/spaces-AEOU6MSZ.js +241 -0
  212. package/dist/chunks/spaces-AEOU6MSZ.js.map +6 -0
  213. package/dist/chunks/{start-check-KVZFDBD3.js → start-check-N4TPV2TM.js} +2 -2
  214. package/dist/chunks/start-check-N4TPV2TM.js.map +6 -0
  215. package/dist/chunks/{state-NXFKMBOX.js → state-SHLWYVZU.js} +2 -2
  216. package/dist/chunks/{store-JLTSSGKL.js → store-75YZOOZI.js} +4 -4
  217. package/dist/chunks/store-75YZOOZI.js.map +6 -0
  218. package/dist/chunks/{store-QNY242NN.js → store-CQVUIU7K.js} +6 -6
  219. package/dist/chunks/store-CQVUIU7K.js.map +6 -0
  220. package/dist/chunks/{store-KFJWAELA.js → store-GUSFCKJA.js} +13 -10
  221. package/dist/chunks/store-GUSFCKJA.js.map +6 -0
  222. package/dist/chunks/store-Z5H6LYVE.js +17 -0
  223. package/dist/chunks/store-Z5H6LYVE.js.map +6 -0
  224. package/dist/chunks/{tui-L5GKR237.js → tui-PGHWYFN4.js} +9702 -7547
  225. package/dist/chunks/tui-PGHWYFN4.js.map +6 -0
  226. package/dist/chunks/{upgrade-PROVWX55.js → upgrade-RHPZQ33L.js} +6 -6
  227. package/dist/chunks/{worktree-ELHDXX4X.js → worktree-5IYFN33C.js} +13 -12
  228. package/dist/chunks/worktree-5IYFN33C.js.map +6 -0
  229. package/dist/cli.d.ts.map +1 -1
  230. package/dist/commands/exec-json.d.ts.map +1 -1
  231. package/dist/commands/login.d.ts +2 -2
  232. package/dist/commands/login.d.ts.map +1 -1
  233. package/dist/commands/manifest.d.ts +1 -0
  234. package/dist/commands/manifest.d.ts.map +1 -1
  235. package/dist/commands/spaces.d.ts +46 -0
  236. package/dist/commands/spaces.d.ts.map +1 -0
  237. package/dist/config/load.d.ts +6 -1
  238. package/dist/config/load.d.ts.map +1 -1
  239. package/dist/config/model-environment.d.ts.map +1 -1
  240. package/dist/config/schema.d.ts +27 -0
  241. package/dist/config/schema.d.ts.map +1 -1
  242. package/dist/context/environment.d.ts.map +1 -1
  243. package/dist/doctor/checks/index.d.ts +2 -1
  244. package/dist/doctor/checks/index.d.ts.map +1 -1
  245. package/dist/doctor/checks/terminal.d.ts +12 -0
  246. package/dist/doctor/checks/terminal.d.ts.map +1 -0
  247. package/dist/index.js +28 -23
  248. package/dist/integrations/accounts/activity.d.ts +39 -0
  249. package/dist/integrations/accounts/activity.d.ts.map +1 -0
  250. package/dist/integrations/accounts/binding.d.ts +30 -0
  251. package/dist/integrations/accounts/binding.d.ts.map +1 -0
  252. package/dist/integrations/accounts/codex-login.d.ts +33 -0
  253. package/dist/integrations/accounts/codex-login.d.ts.map +1 -0
  254. package/dist/integrations/accounts/host-facts.d.ts +22 -0
  255. package/dist/integrations/accounts/host-facts.d.ts.map +1 -0
  256. package/dist/integrations/accounts/open.d.ts +23 -0
  257. package/dist/integrations/accounts/open.d.ts.map +1 -0
  258. package/dist/integrations/accounts/rows.d.ts +45 -0
  259. package/dist/integrations/accounts/rows.d.ts.map +1 -0
  260. package/dist/integrations/clipboard/copy.d.ts +94 -0
  261. package/dist/integrations/clipboard/copy.d.ts.map +1 -0
  262. package/dist/integrations/clipboard/image-fit.d.ts +91 -0
  263. package/dist/integrations/clipboard/image-fit.d.ts.map +1 -0
  264. package/dist/integrations/clipboard/image-paths.d.ts +56 -0
  265. package/dist/integrations/clipboard/image-paths.d.ts.map +1 -0
  266. package/dist/integrations/clipboard/image.d.ts +80 -15
  267. package/dist/integrations/clipboard/image.d.ts.map +1 -1
  268. package/dist/integrations/clipboard/text-read.d.ts +28 -0
  269. package/dist/integrations/clipboard/text-read.d.ts.map +1 -0
  270. package/dist/integrations/clipboard/text.d.ts +16 -1
  271. package/dist/integrations/clipboard/text.d.ts.map +1 -1
  272. package/dist/integrations/clipboard/wsl.d.ts +38 -0
  273. package/dist/integrations/clipboard/wsl.d.ts.map +1 -0
  274. package/dist/integrations/outstanding/collect.d.ts +51 -0
  275. package/dist/integrations/outstanding/collect.d.ts.map +1 -0
  276. package/dist/integrations/outstanding/facts.d.ts +23 -0
  277. package/dist/integrations/outstanding/facts.d.ts.map +1 -0
  278. package/dist/integrations/outstanding/note.d.ts +26 -0
  279. package/dist/integrations/outstanding/note.d.ts.map +1 -0
  280. package/dist/integrations/outstanding/progress-notices.d.ts +66 -0
  281. package/dist/integrations/outstanding/progress-notices.d.ts.map +1 -0
  282. package/dist/integrations/outstanding/status.d.ts +104 -0
  283. package/dist/integrations/outstanding/status.d.ts.map +1 -0
  284. package/dist/integrations/peers/runtime.d.ts +12 -0
  285. package/dist/integrations/peers/runtime.d.ts.map +1 -1
  286. package/dist/integrations/providers/anthropic-endpoint.d.ts +34 -0
  287. package/dist/integrations/providers/anthropic-endpoint.d.ts.map +1 -0
  288. package/dist/integrations/providers/codex-account.d.ts +30 -0
  289. package/dist/integrations/providers/codex-account.d.ts.map +1 -0
  290. package/dist/integrations/providers/codex-oauth.d.ts +12 -0
  291. package/dist/integrations/providers/codex-oauth.d.ts.map +1 -1
  292. package/dist/integrations/providers/connections.d.ts +8 -0
  293. package/dist/integrations/providers/connections.d.ts.map +1 -1
  294. package/dist/integrations/providers/credential-store.d.ts +2 -0
  295. package/dist/integrations/providers/credential-store.d.ts.map +1 -1
  296. package/dist/integrations/providers/index.d.ts +3 -1
  297. package/dist/integrations/providers/index.d.ts.map +1 -1
  298. package/dist/integrations/providers/key-migration.d.ts +22 -0
  299. package/dist/integrations/providers/key-migration.d.ts.map +1 -0
  300. package/dist/integrations/providers/model-reasoning.d.ts +1 -1
  301. package/dist/integrations/providers/model-reasoning.d.ts.map +1 -1
  302. package/dist/integrations/providers/preferences.d.ts +8 -0
  303. package/dist/integrations/providers/preferences.d.ts.map +1 -1
  304. package/dist/integrations/providers/registry.d.ts.map +1 -1
  305. package/dist/integrations/resident/runner-worker.js +25 -24
  306. package/dist/integrations/resident/runner-worker.js.map +1 -1
  307. package/dist/integrations/sessions/store.d.ts +13 -1
  308. package/dist/integrations/sessions/store.d.ts.map +1 -1
  309. package/dist/integrations/subagents/activity.d.ts +6 -0
  310. package/dist/integrations/subagents/activity.d.ts.map +1 -1
  311. package/dist/integrations/subagents/idle-watch.d.ts +30 -0
  312. package/dist/integrations/subagents/idle-watch.d.ts.map +1 -0
  313. package/dist/integrations/subagents/runtime.d.ts +23 -0
  314. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  315. package/dist/integrations/subagents/saved-agents.d.ts +3 -1
  316. package/dist/integrations/subagents/saved-agents.d.ts.map +1 -1
  317. package/dist/integrations/subagents/task-observation.d.ts +20 -0
  318. package/dist/integrations/subagents/task-observation.d.ts.map +1 -0
  319. package/dist/integrations/workflows/doctrine.d.ts.map +1 -1
  320. package/dist/integrations/workflows/host.d.ts +8 -1
  321. package/dist/integrations/workflows/host.d.ts.map +1 -1
  322. package/dist/integrations/workflows/notice.d.ts +1 -1
  323. package/dist/integrations/workflows/notice.d.ts.map +1 -1
  324. package/dist/integrations/workflows/offering.d.ts.map +1 -1
  325. package/dist/integrations/workflows/orphans.d.ts +38 -0
  326. package/dist/integrations/workflows/orphans.d.ts.map +1 -0
  327. package/dist/integrations/workflows/registry.d.ts +12 -1
  328. package/dist/integrations/workflows/registry.d.ts.map +1 -1
  329. package/dist/integrations/workflows/resume.d.ts +93 -0
  330. package/dist/integrations/workflows/resume.d.ts.map +1 -0
  331. package/dist/integrations/workflows/view.d.ts +13 -0
  332. package/dist/integrations/workflows/view.d.ts.map +1 -1
  333. package/dist/permissions/image-read.d.ts +20 -0
  334. package/dist/permissions/image-read.d.ts.map +1 -0
  335. package/dist/permissions/path-rules.d.ts.map +1 -1
  336. package/dist/rounds/gates.d.ts +63 -0
  337. package/dist/rounds/gates.d.ts.map +1 -0
  338. package/dist/rounds/goal-admission.d.ts +55 -0
  339. package/dist/rounds/goal-admission.d.ts.map +1 -0
  340. package/dist/rounds/queue.d.ts +39 -0
  341. package/dist/rounds/queue.d.ts.map +1 -0
  342. package/dist/rounds/types.d.ts +105 -0
  343. package/dist/rounds/types.d.ts.map +1 -0
  344. package/dist/rounds/wake-ledger.d.ts +126 -0
  345. package/dist/rounds/wake-ledger.d.ts.map +1 -0
  346. package/dist/spaces/git.d.ts +27 -0
  347. package/dist/spaces/git.d.ts.map +1 -0
  348. package/dist/spaces/goto.d.ts +31 -0
  349. package/dist/spaces/goto.d.ts.map +1 -0
  350. package/dist/spaces/host.d.ts +446 -0
  351. package/dist/spaces/host.d.ts.map +1 -0
  352. package/dist/spaces/input.d.ts +87 -0
  353. package/dist/spaces/input.d.ts.map +1 -0
  354. package/dist/spaces/keymap.d.ts +30 -0
  355. package/dist/spaces/keymap.d.ts.map +1 -0
  356. package/dist/spaces/layout.d.ts +34 -0
  357. package/dist/spaces/layout.d.ts.map +1 -0
  358. package/dist/spaces/mouse.d.ts +34 -0
  359. package/dist/spaces/mouse.d.ts.map +1 -0
  360. package/dist/spaces/overlay.d.ts +105 -0
  361. package/dist/spaces/overlay.d.ts.map +1 -0
  362. package/dist/spaces/palette.d.ts +35 -0
  363. package/dist/spaces/palette.d.ts.map +1 -0
  364. package/dist/spaces/peers.d.ts +19 -0
  365. package/dist/spaces/peers.d.ts.map +1 -0
  366. package/dist/spaces/prefix.d.ts +19 -0
  367. package/dist/spaces/prefix.d.ts.map +1 -0
  368. package/dist/spaces/roster.d.ts +111 -0
  369. package/dist/spaces/roster.d.ts.map +1 -0
  370. package/dist/spaces/selection.d.ts +52 -0
  371. package/dist/spaces/selection.d.ts.map +1 -0
  372. package/dist/spaces/session.d.ts +83 -0
  373. package/dist/spaces/session.d.ts.map +1 -0
  374. package/dist/spaces/sidebar.d.ts +99 -0
  375. package/dist/spaces/sidebar.d.ts.map +1 -0
  376. package/dist/spaces/signal.d.ts +28 -0
  377. package/dist/spaces/signal.d.ts.map +1 -0
  378. package/dist/spaces/status.d.ts +20 -0
  379. package/dist/spaces/status.d.ts.map +1 -0
  380. package/dist/spaces/store.d.ts +69 -0
  381. package/dist/spaces/store.d.ts.map +1 -0
  382. package/dist/spaces/tabbar.d.ts +36 -0
  383. package/dist/spaces/tabbar.d.ts.map +1 -0
  384. package/dist/spaces/tiling.d.ts +90 -0
  385. package/dist/spaces/tiling.d.ts.map +1 -0
  386. package/dist/terminal/host/cell.d.ts +35 -0
  387. package/dist/terminal/host/cell.d.ts.map +1 -0
  388. package/dist/terminal/host/frame.d.ts +64 -0
  389. package/dist/terminal/host/frame.d.ts.map +1 -0
  390. package/dist/terminal/host/index.d.ts +5 -0
  391. package/dist/terminal/host/index.d.ts.map +1 -0
  392. package/dist/terminal/host/writer.d.ts +21 -0
  393. package/dist/terminal/host/writer.d.ts.map +1 -0
  394. package/dist/terminal/host/xterm-source.d.ts +18 -0
  395. package/dist/terminal/host/xterm-source.d.ts.map +1 -0
  396. package/dist/terminal/pty.d.ts.map +1 -1
  397. package/dist/terminal/screen.d.ts +26 -0
  398. package/dist/terminal/screen.d.ts.map +1 -1
  399. package/dist/tui/App.d.ts +66 -15
  400. package/dist/tui/App.d.ts.map +1 -1
  401. package/dist/tui/BackgroundJobsPanel.d.ts +9 -7
  402. package/dist/tui/BackgroundJobsPanel.d.ts.map +1 -1
  403. package/dist/tui/Composer.d.ts +14 -1
  404. package/dist/tui/Composer.d.ts.map +1 -1
  405. package/dist/tui/LiveActivity.d.ts.map +1 -1
  406. package/dist/tui/PermissionOverlay.d.ts.map +1 -1
  407. package/dist/tui/Picker.d.ts.map +1 -1
  408. package/dist/tui/ResumePicker.d.ts.map +1 -1
  409. package/dist/tui/StatusBar.d.ts +9 -7
  410. package/dist/tui/StatusBar.d.ts.map +1 -1
  411. package/dist/tui/TaskList.d.ts +15 -2
  412. package/dist/tui/TaskList.d.ts.map +1 -1
  413. package/dist/tui/TextPrompt.d.ts +5 -1
  414. package/dist/tui/TextPrompt.d.ts.map +1 -1
  415. package/dist/tui/account-flow.d.ts +126 -0
  416. package/dist/tui/account-flow.d.ts.map +1 -0
  417. package/dist/tui/agent.d.ts +38 -10
  418. package/dist/tui/agent.d.ts.map +1 -1
  419. package/dist/tui/background-view.d.ts +46 -0
  420. package/dist/tui/background-view.d.ts.map +1 -0
  421. package/dist/tui/compaction-rows.d.ts.map +1 -1
  422. package/dist/tui/computer-use-screen-approval.d.ts +10 -0
  423. package/dist/tui/computer-use-screen-approval.d.ts.map +1 -0
  424. package/dist/tui/context-grid.d.ts +2 -0
  425. package/dist/tui/context-grid.d.ts.map +1 -1
  426. package/dist/tui/context-usage.d.ts +18 -0
  427. package/dist/tui/context-usage.d.ts.map +1 -1
  428. package/dist/tui/credential-entry.d.ts +7 -6
  429. package/dist/tui/credential-entry.d.ts.map +1 -1
  430. package/dist/tui/hypermode.d.ts +1 -3
  431. package/dist/tui/hypermode.d.ts.map +1 -1
  432. package/dist/tui/index.d.ts.map +1 -1
  433. package/dist/tui/keymap.d.ts +10 -1
  434. package/dist/tui/keymap.d.ts.map +1 -1
  435. package/dist/tui/launch-settings.d.ts +5 -2
  436. package/dist/tui/launch-settings.d.ts.map +1 -1
  437. package/dist/tui/login-prompt.d.ts +4 -2
  438. package/dist/tui/login-prompt.d.ts.map +1 -1
  439. package/dist/tui/model-switch.d.ts.map +1 -1
  440. package/dist/tui/permission-review.d.ts +5 -0
  441. package/dist/tui/permission-review.d.ts.map +1 -1
  442. package/dist/tui/plain-interruption.d.ts +3 -1
  443. package/dist/tui/plain-interruption.d.ts.map +1 -1
  444. package/dist/tui/resume-picker-state.d.ts +7 -0
  445. package/dist/tui/resume-picker-state.d.ts.map +1 -1
  446. package/dist/tui/slashCommands.d.ts +22 -26
  447. package/dist/tui/slashCommands.d.ts.map +1 -1
  448. package/dist/tui/system-rows.d.ts +0 -6
  449. package/dist/tui/system-rows.d.ts.map +1 -1
  450. package/dist/tui/tidy-tool-output.d.ts +3 -1
  451. package/dist/tui/tidy-tool-output.d.ts.map +1 -1
  452. package/dist/tui/tool-end-rows.d.ts +2 -0
  453. package/dist/tui/tool-end-rows.d.ts.map +1 -1
  454. package/dist/tui/typed-key-save.d.ts +27 -0
  455. package/dist/tui/typed-key-save.d.ts.map +1 -0
  456. package/dist/tui/zoom/entry.d.ts +37 -0
  457. package/dist/tui/zoom/entry.d.ts.map +1 -0
  458. package/dist/tui/zoom/gesture.d.ts +51 -0
  459. package/dist/tui/zoom/gesture.d.ts.map +1 -0
  460. package/dist/tui/zoom/leave.d.ts +11 -0
  461. package/dist/tui/zoom/leave.d.ts.map +1 -0
  462. package/dist/tui/zoom/local.d.ts +55 -0
  463. package/dist/tui/zoom/local.d.ts.map +1 -0
  464. package/dist/tui/zoom/proxy.d.ts +40 -0
  465. package/dist/tui/zoom/proxy.d.ts.map +1 -0
  466. package/package.json +10 -8
  467. package/dist/chunks/acp-P3S54TTC.js +0 -13601
  468. package/dist/chunks/acp-P3S54TTC.js.map +0 -6
  469. package/dist/chunks/activity-command-Y5ZLCQ63.js.map +0 -6
  470. package/dist/chunks/add-F7M57FGR.js.map +0 -6
  471. package/dist/chunks/agent-session-CFWQHSYT.js +0 -60
  472. package/dist/chunks/archive-6NM6DYAT.js.map +0 -6
  473. package/dist/chunks/chat-KGVPXQS6.js.map +0 -6
  474. package/dist/chunks/chunk-3NJPNX6V.js.map +0 -6
  475. package/dist/chunks/chunk-43PPWWYD.js +0 -1415
  476. package/dist/chunks/chunk-43PPWWYD.js.map +0 -6
  477. package/dist/chunks/chunk-6LLJQ3KY.js.map +0 -6
  478. package/dist/chunks/chunk-6Z2ZJ4BA.js.map +0 -6
  479. package/dist/chunks/chunk-7U36A4WQ.js.map +0 -6
  480. package/dist/chunks/chunk-CRWNJ62V.js.map +0 -6
  481. package/dist/chunks/chunk-EFEZWLZC.js.map +0 -6
  482. package/dist/chunks/chunk-JAYPFJGZ.js.map +0 -6
  483. package/dist/chunks/chunk-KHM2XON5.js.map +0 -6
  484. package/dist/chunks/chunk-O4MFP726.js.map +0 -6
  485. package/dist/chunks/chunk-RFMODICJ.js.map +0 -6
  486. package/dist/chunks/chunk-RSRJQB6Q.js.map +0 -6
  487. package/dist/chunks/chunk-UHPRMPWX.js.map +0 -6
  488. package/dist/chunks/chunk-W5QFVC74.js.map +0 -6
  489. package/dist/chunks/chunk-WKUTR7YW.js.map +0 -6
  490. package/dist/chunks/chunk-YAEHAYI4.js.map +0 -6
  491. package/dist/chunks/chunk-ZXKN4TWP.js.map +0 -6
  492. package/dist/chunks/cli-runtime-HTTDQPEZ.js.map +0 -6
  493. package/dist/chunks/dist-45IFTDJW.js.map +0 -6
  494. package/dist/chunks/dist-RQJEJN3Z.js.map +0 -6
  495. package/dist/chunks/exec-3JDAB34N.js.map +0 -6
  496. package/dist/chunks/host-queries-SO2NOQRR.js.map +0 -6
  497. package/dist/chunks/list-G6OA34RL.js.map +0 -6
  498. package/dist/chunks/login-J4PWR4FM.js +0 -29
  499. package/dist/chunks/mcp-EXFVIHPJ.js.map +0 -6
  500. package/dist/chunks/message-command-B4L2W4YZ.js.map +0 -6
  501. package/dist/chunks/operator-tools-TEP4UTI6.js.map +0 -6
  502. package/dist/chunks/pal-BUDEBIBJ.js.map +0 -6
  503. package/dist/chunks/resident-FSUGNG56.js.map +0 -6
  504. package/dist/chunks/resume-VXHGE5GC.js +0 -23
  505. package/dist/chunks/service-EP2QHCK7.js.map +0 -6
  506. package/dist/chunks/tui-L5GKR237.js.map +0 -6
  507. package/dist/chunks/worktree-ELHDXX4X.js.map +0 -6
  508. package/dist/integrations/subagents/batches.d.ts +0 -91
  509. package/dist/integrations/subagents/batches.d.ts.map +0 -1
  510. package/dist/integrations/subagents/slash.d.ts +0 -55
  511. package/dist/integrations/subagents/slash.d.ts.map +0 -1
  512. /package/dist/chunks/{agent-AFX2UZU5.js.map → agent-6TD66IMV.js.map} +0 -0
  513. /package/dist/chunks/{agent-session-CFWQHSYT.js.map → agent-session-3A5K5VK3.js.map} +0 -0
  514. /package/dist/chunks/{bin-main-I6CHRYYQ.js.map → bin-main-5PYV7WYI.js.map} +0 -0
  515. /package/dist/chunks/{commands-ZD2L5QMI.js.map → binding-EMMG5PAE.js.map} +0 -0
  516. /package/dist/chunks/{browser-OPMOTWTV.js.map → browser-FUFFJBRR.js.map} +0 -0
  517. /package/dist/chunks/{chunk-TX2PUHTP.js.map → chunk-24FBGXYR.js.map} +0 -0
  518. /package/dist/chunks/{chunk-2NGXQQPP.js.map → chunk-2OAD3CZE.js.map} +0 -0
  519. /package/dist/chunks/{chunk-JCUPTKQY.js.map → chunk-325X27UO.js.map} +0 -0
  520. /package/dist/chunks/{chunk-REDD2WY7.js.map → chunk-43HR3AF5.js.map} +0 -0
  521. /package/dist/chunks/{chunk-DESOZLEL.js.map → chunk-43PTHA5N.js.map} +0 -0
  522. /package/dist/chunks/{chunk-T5POXPXY.js.map → chunk-46OOPRR6.js.map} +0 -0
  523. /package/dist/chunks/{chunk-EFQ6FUFZ.js.map → chunk-6ZEHXLF7.js.map} +0 -0
  524. /package/dist/chunks/{chunk-I32JTWDW.js.map → chunk-7TBETDTX.js.map} +0 -0
  525. /package/dist/chunks/{chunk-465CVUN4.js.map → chunk-ADCVLGQO.js.map} +0 -0
  526. /package/dist/chunks/{chunk-W4E2N7TY.js.map → chunk-ANHFJD66.js.map} +0 -0
  527. /package/dist/chunks/{chunk-UGAT33T5.js.map → chunk-B6INWHLR.js.map} +0 -0
  528. /package/dist/chunks/{chunk-Y44FAVKA.js.map → chunk-BICC735N.js.map} +0 -0
  529. /package/dist/chunks/{chunk-UC3ZACVN.js.map → chunk-BOM64EUQ.js.map} +0 -0
  530. /package/dist/chunks/{chunk-CTN4O42X.js.map → chunk-D23EJNO5.js.map} +0 -0
  531. /package/dist/chunks/{chunk-G5RAECIB.js.map → chunk-E2MNVA3X.js.map} +0 -0
  532. /package/dist/chunks/{chunk-BR6EWAKQ.js.map → chunk-E3FA5H3Q.js.map} +0 -0
  533. /package/dist/chunks/{chunk-LUSUJZR2.js.map → chunk-EFU2OFEK.js.map} +0 -0
  534. /package/dist/chunks/{chunk-FPLDTTM2.js.map → chunk-FZR4XULA.js.map} +0 -0
  535. /package/dist/chunks/{chunk-JSFF2HGX.js.map → chunk-GAEZQRQI.js.map} +0 -0
  536. /package/dist/chunks/{chunk-UP3SWACV.js.map → chunk-GCFXQSN6.js.map} +0 -0
  537. /package/dist/chunks/{chunk-XPS3W7FC.js.map → chunk-GMUWAUKQ.js.map} +0 -0
  538. /package/dist/chunks/{chunk-WLAI3VCE.js.map → chunk-HH3NBBBE.js.map} +0 -0
  539. /package/dist/chunks/{chunk-WPNT6IGU.js.map → chunk-HV2JFRSE.js.map} +0 -0
  540. /package/dist/chunks/{chunk-AE4LOPZF.js.map → chunk-J2FGTLZV.js.map} +0 -0
  541. /package/dist/chunks/{chunk-T2PF65KB.js.map → chunk-JAB62RI5.js.map} +0 -0
  542. /package/dist/chunks/{chunk-HXZ2JXCO.js.map → chunk-JKPUOSDC.js.map} +0 -0
  543. /package/dist/chunks/{chunk-GSYPRZZU.js.map → chunk-K5FQ4G64.js.map} +0 -0
  544. /package/dist/chunks/{chunk-NS7EU37U.js.map → chunk-KVCYYXCS.js.map} +0 -0
  545. /package/dist/chunks/{chunk-PWOG3OMH.js.map → chunk-KZ5WYSA6.js.map} +0 -0
  546. /package/dist/chunks/{chunk-ORVWGSLG.js.map → chunk-LHZSSQ6K.js.map} +0 -0
  547. /package/dist/chunks/{chunk-2NFPIARP.js.map → chunk-LR4QQMJH.js.map} +0 -0
  548. /package/dist/chunks/{chunk-QNTR7X7D.js.map → chunk-MKRYUMLP.js.map} +0 -0
  549. /package/dist/chunks/{chunk-5UB2LLPG.js.map → chunk-NUNOIP4Y.js.map} +0 -0
  550. /package/dist/chunks/{chunk-ZRBGY4SL.js.map → chunk-NXX6C3WS.js.map} +0 -0
  551. /package/dist/chunks/{chunk-ZNYKZ3MI.js.map → chunk-OENL667J.js.map} +0 -0
  552. /package/dist/chunks/{chunk-LS75R55C.js.map → chunk-OMRU22BQ.js.map} +0 -0
  553. /package/dist/chunks/{chunk-BLM6IQS4.js.map → chunk-P6FEQPES.js.map} +0 -0
  554. /package/dist/chunks/{chunk-BIGRB2H4.js.map → chunk-P6RUYL3F.js.map} +0 -0
  555. /package/dist/chunks/{chunk-YPRKTJ5P.js.map → chunk-S2UDKXWH.js.map} +0 -0
  556. /package/dist/chunks/{chunk-XFNCCDJK.js.map → chunk-TFOIA3U3.js.map} +0 -0
  557. /package/dist/chunks/{chunk-NPZY5OJ5.js.map → chunk-THJQXERD.js.map} +0 -0
  558. /package/dist/chunks/{chunk-ZUN2WRCB.js.map → chunk-THQAGFMO.js.map} +0 -0
  559. /package/dist/chunks/{chunk-FKIO77IY.js.map → chunk-THUX2WOG.js.map} +0 -0
  560. /package/dist/chunks/{chunk-AY7B43MK.js.map → chunk-TKIWAXRU.js.map} +0 -0
  561. /package/dist/chunks/{chunk-QV43JSBP.js.map → chunk-TUF4NNJV.js.map} +0 -0
  562. /package/dist/chunks/{chunk-KK2L4FD2.js.map → chunk-U33GIKBK.js.map} +0 -0
  563. /package/dist/chunks/{chunk-WLUGKIYQ.js.map → chunk-U3EQTU4G.js.map} +0 -0
  564. /package/dist/chunks/{chunk-VR4MTSMH.js.map → chunk-U6U472VN.js.map} +0 -0
  565. /package/dist/chunks/{chunk-RV5QY3IY.js.map → chunk-VGUU6E6X.js.map} +0 -0
  566. /package/dist/chunks/{chunk-LN26A356.js.map → chunk-VY377HAA.js.map} +0 -0
  567. /package/dist/chunks/{chunk-HYFX32Y3.js.map → chunk-WG32TSVL.js.map} +0 -0
  568. /package/dist/chunks/{chunk-ZATO2QOS.js.map → chunk-WSIMHBEQ.js.map} +0 -0
  569. /package/dist/chunks/{chunk-JH3SDABI.js.map → chunk-X4WCRRZV.js.map} +0 -0
  570. /package/dist/chunks/{chunk-2OVZNENW.js.map → chunk-XH5YF2YX.js.map} +0 -0
  571. /package/dist/chunks/{chunk-CMAZ3DYB.js.map → chunk-YLNQLDMP.js.map} +0 -0
  572. /package/dist/chunks/{crash-report-2IRIZSBD.js.map → commands-LVUUZ6LF.js.map} +0 -0
  573. /package/dist/chunks/{dist-FNGLTQIG.js.map → crash-report-PGXMRS5P.js.map} +0 -0
  574. /package/dist/chunks/{dist-NL7WG7PX.js.map → dist-6HN2ZMLV.js.map} +0 -0
  575. /package/dist/chunks/{dist-GSYFGRQT.js.map → dist-JRBSW53E.js.map} +0 -0
  576. /package/dist/chunks/{dist-OJTB6QLR.js.map → dist-NSCNMOX7.js.map} +0 -0
  577. /package/dist/chunks/{doctor-NKPCWPB4.js.map → dist-TC6H7TPQ.js.map} +0 -0
  578. /package/dist/chunks/{dist-TWYNAZDN.js.map → dist-V4SNHHMB.js.map} +0 -0
  579. /package/dist/chunks/{dist-OCZJJFHF.js.map → dist-VV3V36IP.js.map} +0 -0
  580. /package/dist/chunks/{home-5OIZIDIT.js.map → doctor-P7L35KGN.js.map} +0 -0
  581. /package/dist/chunks/{drain-YTSVAQP5.js.map → drain-HOHRXIYY.js.map} +0 -0
  582. /package/dist/chunks/{eval-ILFXDQUQ.js.map → eval-2F473JAC.js.map} +0 -0
  583. /package/dist/chunks/{github-FH7PPWVW.js.map → github-OFCHQMQQ.js.map} +0 -0
  584. /package/dist/chunks/{lifecycle-RTDYXKBW.js.map → home-R6WCBSOT.js.map} +0 -0
  585. /package/dist/chunks/{live-44HBQCQY.js.map → host-JGPJVLTC.js.map} +0 -0
  586. /package/dist/chunks/{learn-RHNMJ4BD.js.map → learn-3UPHM5OI.js.map} +0 -0
  587. /package/dist/chunks/{learn-builtin-UQ3MWGK6.js.map → learn-builtin-3Q4BJFCF.js.map} +0 -0
  588. /package/dist/chunks/{login-J4PWR4FM.js.map → lifecycle-EJLVISCU.js.map} +0 -0
  589. /package/dist/chunks/{output-schema-FZXJ7V33.js.map → live-IWDOVSLG.js.map} +0 -0
  590. /package/dist/chunks/{providers-EQ32NZAT.js.map → login-B2PHE6IL.js.map} +0 -0
  591. /package/dist/chunks/{logs-22QAEH2Q.js.map → logs-5UTV3FMG.js.map} +0 -0
  592. /package/dist/chunks/{resume-VXHGE5GC.js.map → mouse-WFSJSLQD.js.map} +0 -0
  593. /package/dist/chunks/{resume-command-DHPXCZVL.js.map → open-LDBJL43A.js.map} +0 -0
  594. /package/dist/chunks/{session-step-44XBOUDV.js.map → output-schema-UKYWRZPS.js.map} +0 -0
  595. /package/dist/chunks/{start-check-KVZFDBD3.js.map → palette-WDPS7W6Q.js.map} +0 -0
  596. /package/dist/chunks/{store-JLTSSGKL.js.map → peers-FBTQW2SY.js.map} +0 -0
  597. /package/dist/chunks/{store-KFJWAELA.js.map → prefix-MLAG4KTK.js.map} +0 -0
  598. /package/dist/chunks/{store-QNY242NN.js.map → providers-M75ET3GT.js.map} +0 -0
  599. /package/dist/chunks/{schedule-OJMZEWJG.js.map → schedule-BK3WF2VK.js.map} +0 -0
  600. /package/dist/chunks/{skills-YHAQXVP2.js.map → skills-TDDPMTQI.js.map} +0 -0
  601. /package/dist/chunks/{state-NXFKMBOX.js.map → state-SHLWYVZU.js.map} +0 -0
  602. /package/dist/chunks/{upgrade-PROVWX55.js.map → upgrade-RHPZQ33L.js.map} +0 -0
@@ -5,230 +5,23 @@ import {
5
5
  readAgentKeychainCredential,
6
6
  readClaudeCredentialFile,
7
7
  replaceClaudeCredentialFile
8
- } from "./chunk-43PPWWYD.js";
9
- import {
10
- PROVIDER_REGISTRY
11
- } from "./chunk-6LLJQ3KY.js";
8
+ } from "./chunk-VAP6YMB6.js";
12
9
  import {
13
10
  credentialsPath,
14
11
  readStoredCodexCredential,
15
12
  readStoredSubscriptionCredential,
16
13
  replaceStoredCodexCredential,
17
14
  replaceStoredSubscriptionCredential,
18
- writeStoredCodexCredential,
19
- writeStoredSubscriptionCredential
20
- } from "./chunk-JAYPFJGZ.js";
15
+ writeStoredCodexCredential
16
+ } from "./chunk-M7LCVDP3.js";
21
17
  import {
22
18
  buildProbeContext,
23
19
  probe
24
- } from "./chunk-O4MFP726.js";
20
+ } from "./chunk-MMZHUQZQ.js";
25
21
  import {
26
22
  __name
27
23
  } from "./chunk-76FLAFCG.js";
28
24
 
29
- // src/integrations/providers/codex-device-login.ts
30
- var CODEX_OAUTH_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
31
- var CODEX_AUTH_ORIGIN = "https://auth.openai.com";
32
- function asRecord(value) {
33
- return typeof value === "object" && value !== null ? value : null;
34
- }
35
- __name(asRecord, "asRecord");
36
- async function withSignal(operation, signal) {
37
- signal.throwIfAborted();
38
- let rejectAbort = /* @__PURE__ */ __name(() => {
39
- }, "rejectAbort");
40
- const aborted = new Promise((_resolve, reject) => {
41
- rejectAbort = reject;
42
- });
43
- const onAbort = /* @__PURE__ */ __name(() => rejectAbort(signal.reason), "onAbort");
44
- signal.addEventListener("abort", onAbort, { once: true });
45
- try {
46
- return await Promise.race([operation, aborted]);
47
- } finally {
48
- signal.removeEventListener("abort", onAbort);
49
- }
50
- }
51
- __name(withSignal, "withSignal");
52
- async function parseJson(response, signal) {
53
- const value = asRecord(await withSignal(response.json(), signal));
54
- if (!value) throw new Error("The sign-in service returned an invalid response.");
55
- return value;
56
- }
57
- __name(parseJson, "parseJson");
58
- async function requestUserCode(fetchFn, origin, signal) {
59
- const response = await withSignal(
60
- fetchFn(`${origin}/api/accounts/deviceauth/usercode`, {
61
- method: "POST",
62
- headers: {
63
- "content-type": "application/json",
64
- accept: "application/json"
65
- },
66
- body: JSON.stringify({ client_id: CODEX_OAUTH_CLIENT_ID }),
67
- signal
68
- }),
69
- signal
70
- );
71
- if (!response.ok) {
72
- throw new Error(
73
- `The Codex device sign-in service refused the request (HTTP ${response.status}).`
74
- );
75
- }
76
- const body = await parseJson(response, signal);
77
- const deviceAuthId = body.device_auth_id;
78
- const userCode = body.user_code ?? body.usercode;
79
- const seconds = Number(body.interval);
80
- if (typeof deviceAuthId !== "string" || deviceAuthId.length === 0 || typeof userCode !== "string" || userCode.length === 0 || !Number.isFinite(seconds) || seconds < 0) {
81
- throw new Error("The Codex device sign-in service returned an incomplete response.");
82
- }
83
- return { deviceAuthId, userCode, intervalMs: Math.max(10, seconds * 1e3) };
84
- }
85
- __name(requestUserCode, "requestUserCode");
86
- async function delay(ms, signal) {
87
- let timer;
88
- try {
89
- await withSignal(
90
- new Promise((resolve) => {
91
- timer = setTimeout(resolve, ms);
92
- }),
93
- signal
94
- );
95
- } finally {
96
- if (timer !== void 0) clearTimeout(timer);
97
- }
98
- }
99
- __name(delay, "delay");
100
- async function complete(code, options, signal) {
101
- const fetchFn = options.fetch ?? globalThis.fetch;
102
- const origin = (options.authOrigin ?? CODEX_AUTH_ORIGIN).replace(/\/$/, "");
103
- const deadlineAt = Date.now() + (options.pollTimeoutMs ?? 15 * 6e4);
104
- let authorization = null;
105
- while (Date.now() < deadlineAt) {
106
- signal.throwIfAborted();
107
- const response = await withSignal(
108
- fetchFn(`${origin}/api/accounts/deviceauth/token`, {
109
- method: "POST",
110
- headers: {
111
- "content-type": "application/json",
112
- accept: "application/json"
113
- },
114
- body: JSON.stringify({
115
- device_auth_id: code.deviceAuthId,
116
- user_code: code.userCode
117
- }),
118
- signal
119
- }),
120
- signal
121
- );
122
- if (response.ok) {
123
- authorization = await parseJson(response, signal);
124
- break;
125
- }
126
- if (response.status !== 403 && response.status !== 404) {
127
- return {
128
- ok: false,
129
- reason: `The Codex device sign-in was refused (HTTP ${response.status}). Nothing was stored.`
130
- };
131
- }
132
- await delay(code.intervalMs, signal);
133
- }
134
- if (!authorization) {
135
- return {
136
- ok: false,
137
- reason: "The Codex device code expired. Nothing was stored."
138
- };
139
- }
140
- const authorizationCode = authorization.authorization_code;
141
- const verifier = authorization.code_verifier;
142
- if (typeof authorizationCode !== "string" || authorizationCode.length === 0 || typeof verifier !== "string" || verifier.length === 0) {
143
- return {
144
- ok: false,
145
- reason: "The Codex device sign-in returned no exchange code. Nothing was stored."
146
- };
147
- }
148
- const redirectUri = `${origin}/deviceauth/callback`;
149
- const form = new URLSearchParams({
150
- grant_type: "authorization_code",
151
- code: authorizationCode,
152
- redirect_uri: redirectUri,
153
- client_id: CODEX_OAUTH_CLIENT_ID,
154
- code_verifier: verifier
155
- });
156
- const exchanged = await withSignal(
157
- fetchFn(`${origin}/oauth/token`, {
158
- method: "POST",
159
- headers: {
160
- "content-type": "application/x-www-form-urlencoded",
161
- accept: "application/json"
162
- },
163
- body: form.toString(),
164
- signal
165
- }),
166
- signal
167
- );
168
- if (!exchanged.ok) {
169
- return {
170
- ok: false,
171
- reason: `The Codex token exchange was refused (HTTP ${exchanged.status}). Nothing was stored.`
172
- };
173
- }
174
- const tokens = await parseJson(exchanged, signal);
175
- const accessToken = tokens.access_token;
176
- const refreshToken = tokens.refresh_token;
177
- const credential = typeof accessToken === "string" ? codexCredentialFromTokens({
178
- accessToken,
179
- ...typeof refreshToken === "string" ? { refreshToken } : {}
180
- }) : null;
181
- if (!credential) {
182
- return {
183
- ok: false,
184
- reason: "The Codex token exchange did not identify an account. Nothing was stored."
185
- };
186
- }
187
- signal.throwIfAborted();
188
- try {
189
- const storedAt = writeStoredCodexCredential(credential, options.home);
190
- return { ok: true, credential, storedAt };
191
- } catch (error) {
192
- return {
193
- ok: false,
194
- reason: `Signed in to Codex, but the credential could not be stored privately: ${error instanceof Error ? error.message : String(error)}`
195
- };
196
- }
197
- }
198
- __name(complete, "complete");
199
- async function beginCodexDeviceLogin(options = {}) {
200
- options.signal?.throwIfAborted();
201
- const owner = new AbortController();
202
- const signal = options.signal ? AbortSignal.any([options.signal, owner.signal]) : owner.signal;
203
- const origin = (options.authOrigin ?? CODEX_AUTH_ORIGIN).replace(/\/$/, "");
204
- const userCode = await requestUserCode(options.fetch ?? globalThis.fetch, origin, signal);
205
- let completion;
206
- return {
207
- url: `${origin}/codex/device`,
208
- userCode: userCode.userCode,
209
- waitForCompletion: /* @__PURE__ */ __name(() => {
210
- completion ??= complete(userCode, options, signal).catch((error) => {
211
- if (signal.aborted) {
212
- return {
213
- ok: false,
214
- reason: "The Codex sign-in was cancelled. Nothing was stored."
215
- };
216
- }
217
- return {
218
- ok: false,
219
- reason: `Could not complete Codex sign-in: ${error instanceof Error ? error.message : String(error)}`
220
- };
221
- });
222
- return completion;
223
- }, "waitForCompletion"),
224
- cancel: /* @__PURE__ */ __name(() => owner.abort(new Error("The Codex sign-in attempt was cancelled.")), "cancel")
225
- };
226
- }
227
- __name(beginCodexDeviceLogin, "beginCodexDeviceLogin");
228
-
229
- // src/integrations/providers/credential-provider.ts
230
- var SUBSCRIPTION_CREDENTIAL_REF = "namzu.subscription.accessToken";
231
-
232
25
  // src/integrations/providers/identity.ts
233
26
  var OAUTH_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
234
27
  var OAUTH_TOKEN_URL = "https://platform.claude.com/v1/oauth/token";
@@ -236,6 +29,9 @@ var AUTHORIZE_URL = "https://claude.com/cai/oauth/authorize";
236
29
  var MANUAL_REDIRECT_URI = "https://platform.claude.com/oauth/code/callback";
237
30
  var OAUTH_SCOPES = "org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload";
238
31
 
32
+ // src/integrations/providers/credential-provider.ts
33
+ var SUBSCRIPTION_CREDENTIAL_REF = "namzu.subscription.accessToken";
34
+
239
35
  // src/integrations/providers/oauth.ts
240
36
  var EXPIRY_SKEW_MS = 6e4;
241
37
  var REFRESH_DEADLINE_MS = 3e4;
@@ -432,13 +228,14 @@ async function refreshAgentOAuthToken(refreshToken, signal, scopes = OAUTH_SCOPE
432
228
  }
433
229
  __name(refreshAgentOAuthToken, "refreshAgentOAuthToken");
434
230
 
435
- // src/integrations/providers/codex-oauth.ts
436
- var REFRESH_WINDOW_MS = 5 * 6e4;
437
- function asRecord2(value) {
231
+ // src/integrations/providers/codex-device-login.ts
232
+ var CODEX_OAUTH_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
233
+ var CODEX_AUTH_ORIGIN = "https://auth.openai.com";
234
+ function asRecord(value) {
438
235
  return typeof value === "object" && value !== null ? value : null;
439
236
  }
440
- __name(asRecord2, "asRecord");
441
- async function withSignal2(operation, signal) {
237
+ __name(asRecord, "asRecord");
238
+ async function withSignal(operation, signal) {
442
239
  signal.throwIfAborted();
443
240
  let rejectAbort = /* @__PURE__ */ __name(() => {
444
241
  }, "rejectAbort");
@@ -453,18 +250,211 @@ async function withSignal2(operation, signal) {
453
250
  signal.removeEventListener("abort", onAbort);
454
251
  }
455
252
  }
456
- __name(withSignal2, "withSignal");
457
- async function ensureFreshStoredCodexCredential(signal, options = {}) {
458
- signal?.throwIfAborted();
459
- const current = readStoredCodexCredential(options.home);
460
- if (!current) {
461
- throw new CredentialWithdrawnError(
462
- "The Codex subscription Namzu stored was removed. Sign in again or choose another provider."
253
+ __name(withSignal, "withSignal");
254
+ async function parseJson(response, signal) {
255
+ const value = asRecord(await withSignal(response.json(), signal));
256
+ if (!value) throw new Error("The sign-in service returned an invalid response.");
257
+ return value;
258
+ }
259
+ __name(parseJson, "parseJson");
260
+ async function requestUserCode(fetchFn, origin, signal) {
261
+ const response = await withSignal(
262
+ fetchFn(`${origin}/api/accounts/deviceauth/usercode`, {
263
+ method: "POST",
264
+ headers: {
265
+ "content-type": "application/json",
266
+ accept: "application/json"
267
+ },
268
+ body: JSON.stringify({ client_id: CODEX_OAUTH_CLIENT_ID }),
269
+ signal
270
+ }),
271
+ signal
272
+ );
273
+ if (!response.ok) {
274
+ throw new Error(
275
+ `The Codex device sign-in service refused the request (HTTP ${response.status}).`
463
276
  );
464
277
  }
465
- if (current.expiresAt === void 0 || current.expiresAt - (options.now ?? Date.now()) > REFRESH_WINDOW_MS) {
466
- return current;
278
+ const body = await parseJson(response, signal);
279
+ const deviceAuthId = body.device_auth_id;
280
+ const userCode = body.user_code ?? body.usercode;
281
+ const seconds = Number(body.interval);
282
+ if (typeof deviceAuthId !== "string" || deviceAuthId.length === 0 || typeof userCode !== "string" || userCode.length === 0 || !Number.isFinite(seconds) || seconds < 0) {
283
+ throw new Error("The Codex device sign-in service returned an incomplete response.");
467
284
  }
285
+ return { deviceAuthId, userCode, intervalMs: Math.max(10, seconds * 1e3) };
286
+ }
287
+ __name(requestUserCode, "requestUserCode");
288
+ async function delay(ms, signal) {
289
+ let timer;
290
+ try {
291
+ await withSignal(
292
+ new Promise((resolve) => {
293
+ timer = setTimeout(resolve, ms);
294
+ }),
295
+ signal
296
+ );
297
+ } finally {
298
+ if (timer !== void 0) clearTimeout(timer);
299
+ }
300
+ }
301
+ __name(delay, "delay");
302
+ async function complete(code, options, signal) {
303
+ const fetchFn = options.fetch ?? globalThis.fetch;
304
+ const origin = (options.authOrigin ?? CODEX_AUTH_ORIGIN).replace(/\/$/, "");
305
+ const deadlineAt = Date.now() + (options.pollTimeoutMs ?? 15 * 6e4);
306
+ let authorization = null;
307
+ while (Date.now() < deadlineAt) {
308
+ signal.throwIfAborted();
309
+ const response = await withSignal(
310
+ fetchFn(`${origin}/api/accounts/deviceauth/token`, {
311
+ method: "POST",
312
+ headers: {
313
+ "content-type": "application/json",
314
+ accept: "application/json"
315
+ },
316
+ body: JSON.stringify({
317
+ device_auth_id: code.deviceAuthId,
318
+ user_code: code.userCode
319
+ }),
320
+ signal
321
+ }),
322
+ signal
323
+ );
324
+ if (response.ok) {
325
+ authorization = await parseJson(response, signal);
326
+ break;
327
+ }
328
+ if (response.status !== 403 && response.status !== 404) {
329
+ return {
330
+ ok: false,
331
+ reason: `The Codex device sign-in was refused (HTTP ${response.status}). Nothing was stored.`
332
+ };
333
+ }
334
+ await delay(code.intervalMs, signal);
335
+ }
336
+ if (!authorization) {
337
+ return {
338
+ ok: false,
339
+ reason: "The Codex device code expired. Nothing was stored."
340
+ };
341
+ }
342
+ const authorizationCode = authorization.authorization_code;
343
+ const verifier = authorization.code_verifier;
344
+ if (typeof authorizationCode !== "string" || authorizationCode.length === 0 || typeof verifier !== "string" || verifier.length === 0) {
345
+ return {
346
+ ok: false,
347
+ reason: "The Codex device sign-in returned no exchange code. Nothing was stored."
348
+ };
349
+ }
350
+ const redirectUri = `${origin}/deviceauth/callback`;
351
+ const form = new URLSearchParams({
352
+ grant_type: "authorization_code",
353
+ code: authorizationCode,
354
+ redirect_uri: redirectUri,
355
+ client_id: CODEX_OAUTH_CLIENT_ID,
356
+ code_verifier: verifier
357
+ });
358
+ const exchanged = await withSignal(
359
+ fetchFn(`${origin}/oauth/token`, {
360
+ method: "POST",
361
+ headers: {
362
+ "content-type": "application/x-www-form-urlencoded",
363
+ accept: "application/json"
364
+ },
365
+ body: form.toString(),
366
+ signal
367
+ }),
368
+ signal
369
+ );
370
+ if (!exchanged.ok) {
371
+ return {
372
+ ok: false,
373
+ reason: `The Codex token exchange was refused (HTTP ${exchanged.status}). Nothing was stored.`
374
+ };
375
+ }
376
+ const tokens = await parseJson(exchanged, signal);
377
+ const accessToken = tokens.access_token;
378
+ const refreshToken = tokens.refresh_token;
379
+ const credential = typeof accessToken === "string" ? codexCredentialFromTokens({
380
+ accessToken,
381
+ ...typeof refreshToken === "string" ? { refreshToken } : {}
382
+ }) : null;
383
+ if (!credential) {
384
+ return {
385
+ ok: false,
386
+ reason: "The Codex token exchange did not identify an account. Nothing was stored."
387
+ };
388
+ }
389
+ signal.throwIfAborted();
390
+ try {
391
+ const storedAt = writeStoredCodexCredential(credential, options.home);
392
+ return { ok: true, credential, storedAt };
393
+ } catch (error) {
394
+ return {
395
+ ok: false,
396
+ reason: `Signed in to Codex, but the credential could not be stored privately: ${error instanceof Error ? error.message : String(error)}`
397
+ };
398
+ }
399
+ }
400
+ __name(complete, "complete");
401
+ async function beginCodexDeviceLogin(options = {}) {
402
+ options.signal?.throwIfAborted();
403
+ const owner = new AbortController();
404
+ const signal = options.signal ? AbortSignal.any([options.signal, owner.signal]) : owner.signal;
405
+ const origin = (options.authOrigin ?? CODEX_AUTH_ORIGIN).replace(/\/$/, "");
406
+ const userCode = await requestUserCode(options.fetch ?? globalThis.fetch, origin, signal);
407
+ let completion;
408
+ return {
409
+ url: `${origin}/codex/device`,
410
+ userCode: userCode.userCode,
411
+ waitForCompletion: /* @__PURE__ */ __name(() => {
412
+ completion ??= complete(userCode, options, signal).catch((error) => {
413
+ if (signal.aborted) {
414
+ return {
415
+ ok: false,
416
+ reason: "The Codex sign-in was cancelled. Nothing was stored."
417
+ };
418
+ }
419
+ return {
420
+ ok: false,
421
+ reason: `Could not complete Codex sign-in: ${error instanceof Error ? error.message : String(error)}`
422
+ };
423
+ });
424
+ return completion;
425
+ }, "waitForCompletion"),
426
+ cancel: /* @__PURE__ */ __name(() => owner.abort(new Error("The Codex sign-in attempt was cancelled.")), "cancel")
427
+ };
428
+ }
429
+ __name(beginCodexDeviceLogin, "beginCodexDeviceLogin");
430
+
431
+ // src/integrations/providers/codex-oauth.ts
432
+ var REFRESH_WINDOW_MS = 5 * 6e4;
433
+ function asRecord2(value) {
434
+ return typeof value === "object" && value !== null ? value : null;
435
+ }
436
+ __name(asRecord2, "asRecord");
437
+ async function withSignal2(operation, signal) {
438
+ signal.throwIfAborted();
439
+ let rejectAbort = /* @__PURE__ */ __name(() => {
440
+ }, "rejectAbort");
441
+ const aborted = new Promise((_resolve, reject) => {
442
+ rejectAbort = reject;
443
+ });
444
+ const onAbort = /* @__PURE__ */ __name(() => rejectAbort(signal.reason), "onAbort");
445
+ signal.addEventListener("abort", onAbort, { once: true });
446
+ try {
447
+ return await Promise.race([operation, aborted]);
448
+ } finally {
449
+ signal.removeEventListener("abort", onAbort);
450
+ }
451
+ }
452
+ __name(withSignal2, "withSignal");
453
+ function codexCredentialIsDue(credential, now = Date.now()) {
454
+ return credential.expiresAt !== void 0 && credential.expiresAt - now <= REFRESH_WINDOW_MS;
455
+ }
456
+ __name(codexCredentialIsDue, "codexCredentialIsDue");
457
+ async function requestCodexRefresh(current, signal, options = {}) {
468
458
  if (!current.refreshToken) {
469
459
  throw new CredentialWithdrawnError(
470
460
  "The Codex subscription expired without a refresh grant. Sign in again."
@@ -520,6 +510,26 @@ async function ensureFreshStoredCodexCredential(signal, options = {}) {
520
510
  "The refreshed Codex credential did not belong to the signed-in account. Sign in again."
521
511
  );
522
512
  }
513
+ return refreshed;
514
+ }
515
+ __name(requestCodexRefresh, "requestCodexRefresh");
516
+ async function ensureFreshStoredCodexCredential(signal, options = {}) {
517
+ signal?.throwIfAborted();
518
+ const current = readStoredCodexCredential(options.home);
519
+ if (!current) {
520
+ throw new CredentialWithdrawnError(
521
+ "The Codex subscription Namzu stored was removed. Sign in again or choose another provider."
522
+ );
523
+ }
524
+ if (current.expiresAt === void 0 || current.expiresAt - (options.now ?? Date.now()) > REFRESH_WINDOW_MS) {
525
+ return current;
526
+ }
527
+ if (!current.refreshToken) {
528
+ throw new CredentialWithdrawnError(
529
+ "The Codex subscription expired without a refresh grant. Sign in again."
530
+ );
531
+ }
532
+ const refreshed = await requestCodexRefresh(current, signal, options);
523
533
  signal?.throwIfAborted();
524
534
  let result;
525
535
  try {
@@ -535,224 +545,10 @@ async function ensureFreshStoredCodexCredential(signal, options = {}) {
535
545
  }
536
546
  __name(ensureFreshStoredCodexCredential, "ensureFreshStoredCodexCredential");
537
547
 
538
- // src/integrations/providers/subscription-login.ts
539
- import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
540
- async function beginSubscriptionLogin(options = {}) {
541
- options.signal?.throwIfAborted();
542
- const cancelController = new AbortController();
543
- const attemptSignal = options.signal ? AbortSignal.any([options.signal, cancelController.signal]) : cancelController.signal;
544
- const exchangeOptions = {
545
- ...options,
546
- signal: attemptSignal
547
- };
548
- const verifier = base64Url(randomBytes(32));
549
- const challenge = base64Url(createHash("sha256").update(verifier).digest());
550
- const state = base64Url(randomBytes(16));
551
- const redirectUri = MANUAL_REDIRECT_URI;
552
- let settled = false;
553
- const exchangeOnce = /* @__PURE__ */ __name(async (code, seenState) => {
554
- if (settled) return { ok: false, reason: "This login was already completed." };
555
- if (!constantTimeEquals(seenState, state)) {
556
- return {
557
- ok: false,
558
- reason: "The sign-in did not come back with the value namzu sent, so it cannot be matched to this attempt. Nothing was stored. Start the login again."
559
- };
560
- }
561
- settled = true;
562
- return exchange(code, state, verifier, redirectUri, exchangeOptions);
563
- }, "exchangeOnce");
564
- return {
565
- url: authorizeUrl(challenge, state, redirectUri),
566
- redirectUri,
567
- completeWithPastedCode: /* @__PURE__ */ __name(async (input) => {
568
- const parsed = parsePastedInput(input);
569
- if (!parsed.code) {
570
- return {
571
- ok: false,
572
- reason: "That does not contain an authorization code. Paste the whole address the browser finished on, or the code it showed you."
573
- };
574
- }
575
- return exchangeOnce(parsed.code, parsed.state ?? state);
576
- }, "completeWithPastedCode"),
577
- cancel: /* @__PURE__ */ __name(() => {
578
- cancelController.abort(new Error("The sign-in attempt was cancelled."));
579
- }, "cancel")
580
- };
581
- }
582
- __name(beginSubscriptionLogin, "beginSubscriptionLogin");
583
- function subscriptionDetectedProvider(credential, storedAt) {
584
- return {
585
- entry: PROVIDER_REGISTRY.anthropic,
586
- source: { kind: "stored", path: storedAt },
587
- apiKey: credential.accessToken,
588
- oauth: {
589
- refreshToken: credential.refreshToken,
590
- expiresAt: credential.expiresAt,
591
- origin: "stored"
592
- },
593
- alternatives: []
594
- };
595
- }
596
- __name(subscriptionDetectedProvider, "subscriptionDetectedProvider");
597
- function authorizeUrl(challenge, state, redirectUri) {
598
- const params = new URLSearchParams({
599
- code: "true",
600
- client_id: OAUTH_CLIENT_ID,
601
- response_type: "code",
602
- redirect_uri: redirectUri,
603
- scope: OAUTH_SCOPES,
604
- code_challenge: challenge,
605
- code_challenge_method: "S256",
606
- state
607
- });
608
- return `${AUTHORIZE_URL}?${params.toString()}`;
609
- }
610
- __name(authorizeUrl, "authorizeUrl");
611
- async function awaitWithSignal2(operation, signal) {
612
- signal.throwIfAborted();
613
- let rejectAbort = /* @__PURE__ */ __name(() => {
614
- }, "rejectAbort");
615
- const aborted = new Promise((_resolve, reject) => {
616
- rejectAbort = reject;
617
- });
618
- const onAbort = /* @__PURE__ */ __name(() => rejectAbort(signal.reason), "onAbort");
619
- signal.addEventListener("abort", onAbort, { once: true });
620
- if (signal.aborted) onAbort();
621
- try {
622
- return await Promise.race([operation, aborted]);
623
- } finally {
624
- signal.removeEventListener("abort", onAbort);
625
- }
626
- }
627
- __name(awaitWithSignal2, "awaitWithSignal");
628
- async function exchange(code, state, verifier, redirectUri, options) {
629
- const cancelled = /* @__PURE__ */ __name(() => ({
630
- ok: false,
631
- reason: "The sign-in was cancelled before it could be stored. Nothing was stored."
632
- }), "cancelled");
633
- if (options.signal?.aborted) return cancelled();
634
- const fetchFn = options.fetch ?? globalThis.fetch;
635
- const deadline = AbortSignal.timeout(3e4);
636
- const requestSignal = options.signal ? AbortSignal.any([options.signal, deadline]) : deadline;
637
- const timedOut = /* @__PURE__ */ __name(() => ({
638
- ok: false,
639
- reason: "The sign-in service did not answer within 30 seconds. Nothing was stored."
640
- }), "timedOut");
641
- let res;
642
- try {
643
- res = await awaitWithSignal2(
644
- fetchFn(OAUTH_TOKEN_URL, {
645
- method: "POST",
646
- headers: {
647
- "content-type": "application/json",
648
- accept: "application/json"
649
- },
650
- body: JSON.stringify({
651
- grant_type: "authorization_code",
652
- client_id: OAUTH_CLIENT_ID,
653
- code,
654
- state,
655
- redirect_uri: redirectUri,
656
- code_verifier: verifier
657
- }),
658
- signal: requestSignal
659
- }),
660
- requestSignal
661
- );
662
- } catch (err) {
663
- if (options.signal?.aborted) return cancelled();
664
- if (deadline.aborted) return timedOut();
665
- return {
666
- ok: false,
667
- reason: `Could not reach the sign-in service (${err instanceof Error ? err.message : String(err)}). Nothing was stored.`
668
- };
669
- }
670
- if (options.signal?.aborted) return cancelled();
671
- if (!res.ok) {
672
- return {
673
- ok: false,
674
- reason: `The sign-in service refused the exchange (HTTP ${res.status}). The code may have already been used, or expired. Nothing was stored.`
675
- };
676
- }
677
- let data;
678
- try {
679
- data = await awaitWithSignal2(res.json(), requestSignal);
680
- } catch {
681
- if (options.signal?.aborted) return cancelled();
682
- if (deadline.aborted) return timedOut();
683
- return {
684
- ok: false,
685
- reason: "The sign-in service answered with something that is not a token. Nothing was stored."
686
- };
687
- }
688
- if (options.signal?.aborted) return cancelled();
689
- if (typeof data.access_token !== "string" || data.access_token.length === 0) {
690
- return {
691
- ok: false,
692
- reason: "The sign-in service answered without a token. Nothing was stored."
693
- };
694
- }
695
- const credential = {
696
- accessToken: data.access_token,
697
- ...typeof data.refresh_token === "string" && data.refresh_token.length > 0 ? { refreshToken: data.refresh_token } : {},
698
- ...typeof data.expires_in === "number" ? { expiresAt: Date.now() + data.expires_in * 1e3 } : {},
699
- ...typeof data.scope === "string" ? { scopes: data.scope.split(" ").filter(Boolean) } : { scopes: OAUTH_SCOPES.split(" ") }
700
- };
701
- let storedAt;
702
- try {
703
- if (options.signal?.aborted) return cancelled();
704
- storedAt = writeStoredSubscriptionCredential(credential, options.home);
705
- } catch (err) {
706
- return {
707
- ok: false,
708
- reason: `Signed in, but the credential could not be stored privately: ${err instanceof Error ? err.message : String(err)}`
709
- };
710
- }
711
- return { ok: true, credential, storedAt };
712
- }
713
- __name(exchange, "exchange");
714
- function parsePastedInput(input) {
715
- const value = input.trim();
716
- if (value.length === 0) return {};
717
- if (/^https?:\/\//i.test(value)) {
718
- try {
719
- const url = new URL(value);
720
- return {
721
- code: url.searchParams.get("code") ?? void 0,
722
- state: url.searchParams.get("state") ?? void 0
723
- };
724
- } catch {
725
- return {};
726
- }
727
- }
728
- if (value.includes("code=")) {
729
- const params = new URLSearchParams(value.replace(/^\?/, ""));
730
- return {
731
- code: params.get("code") ?? void 0,
732
- state: params.get("state") ?? void 0
733
- };
734
- }
735
- if (value.includes("#")) {
736
- const [code, state] = value.split("#", 2);
737
- return { code: code || void 0, state: state || void 0 };
738
- }
739
- if (/\s/.test(value)) return {};
740
- return { code: value };
741
- }
742
- __name(parsePastedInput, "parsePastedInput");
743
- function constantTimeEquals(a, b) {
744
- const left = Buffer.from(a, "utf8");
745
- const right = Buffer.from(b, "utf8");
746
- if (left.length !== right.length) return false;
747
- return timingSafeEqual(left, right);
748
- }
749
- __name(constantTimeEquals, "constantTimeEquals");
750
- function base64Url(bytes) {
751
- return bytes.toString("base64url");
752
- }
753
- __name(base64Url, "base64Url");
754
-
755
548
  export {
549
+ OAUTH_CLIENT_ID,
550
+ OAUTH_TOKEN_URL,
551
+ AUTHORIZE_URL,
756
552
  MANUAL_REDIRECT_URI,
757
553
  OAUTH_SCOPES,
758
554
  readSubscriptionCredential,
@@ -765,9 +561,8 @@ export {
765
561
  CODEX_OAUTH_CLIENT_ID,
766
562
  CODEX_AUTH_ORIGIN,
767
563
  beginCodexDeviceLogin,
768
- ensureFreshStoredCodexCredential,
769
- beginSubscriptionLogin,
770
- subscriptionDetectedProvider,
771
- parsePastedInput
564
+ codexCredentialIsDue,
565
+ requestCodexRefresh,
566
+ ensureFreshStoredCodexCredential
772
567
  };
773
- //# sourceMappingURL=chunk-ZXKN4TWP.js.map
568
+ //# sourceMappingURL=chunk-IRUDNBAR.js.map