nolo-cli 0.259.0-alpha.1 → 0.261.0-alpha.1

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 (320) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-MTM4BJK3.js → _executeModel-PODMRXJJ.js} +97 -83
  3. package/accountResolver-NGICIMEE.js +1 -1
  4. package/{action-C6IQAKN4.js → action-NJTYNXXR.js} +12 -10
  5. package/{addContentAction-53364YDW.js → addContentAction-RUPXLROG.js} +14 -13
  6. package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-57EJ2UBC.js} +20 -24
  7. package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-DRFCOTYP.js} +185 -147
  8. package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-FHENHUBF.js} +143 -127
  9. package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-BMVKNYIY.js} +9 -6
  10. package/{agentListCommands-62UYUQDI.js → agentListCommands-W66W5K3V.js} +88 -69
  11. package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-C3BUBCXU.js} +69 -60
  12. package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-VIWKP7DM.js} +11 -8
  13. package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-5SNSXOY7.js} +10 -7
  14. package/agentRecordCommands-DYMHWTID.js +210 -0
  15. package/agentRun-QVFG3CI4.js +250 -0
  16. package/agentRunCommand-YV4V5HSL.js +248 -0
  17. package/{agentRunControl-LXMADX3N.js → agentRunControl-RGBHKPKJ.js} +19 -12
  18. package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-LVEMOYS2.js} +62 -49
  19. package/{agentSlice-3HHYUQLM.js → agentSlice-OJCM7OUX.js} +15 -18
  20. package/appConfigCommands-ZUXQLE7L.js +417 -0
  21. package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-L5UKUMXY.js} +68 -58
  22. package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-KX2BRQUW.js} +74 -59
  23. package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-7LHRSWW7.js} +68 -58
  24. package/{appGetCommands-73DXOAQW.js → appGetCommands-F7SDFCUK.js} +74 -58
  25. package/{appListCommands-HD5LOQ3G.js → appListCommands-U4NJKSMZ.js} +74 -58
  26. package/appMigrateCommands-JAPOLYSW.js +230 -0
  27. package/appSourceCommands-TLXPWXUH.js +279 -0
  28. package/authCommand-AU3GZBZ2.js +65 -0
  29. package/{authCommands-T5FODCEG.js → authCommands-JKBWMUQ4.js} +20 -17
  30. package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
  31. package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-F47WYQWF.js} +68 -18
  32. package/{chunk-5YS6QHGT.js → chunk-2FGFY72B.js} +9 -9
  33. package/{chunk-MJBLXJMP.js → chunk-2I4R6ZRV.js} +12 -9
  34. package/{chunk-FXEPZKNJ.js → chunk-2MIZHEND.js} +506 -64
  35. package/{chunk-TLE77UJ5.js → chunk-2OROOEOQ.js} +0 -1
  36. package/{chunk-6RSNVJGO.js → chunk-2ZBPWX7N.js} +4 -4
  37. package/chunk-35JIFLIG.js +30 -0
  38. package/{chunk-7OVOZRZF.js → chunk-3B7OTHDW.js} +23 -379
  39. package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
  40. package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
  41. package/{chunk-XNNBXUEM.js → chunk-3TII7WCF.js} +5 -5
  42. package/{chunk-223KZUJ6.js → chunk-4HZCBA4Q.js} +18 -15
  43. package/{chunk-C5A54QS7.js → chunk-4INJGWE3.js} +18 -5
  44. package/chunk-4IVMDQBA.js +261 -0
  45. package/chunk-4Y6CZ2N4.js +82 -0
  46. package/{chunk-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
  47. package/{chunk-KQHEGELM.js → chunk-63G7JWEA.js} +16 -6
  48. package/{chunk-4EACJPZI.js → chunk-6BBXJGIQ.js} +51 -42
  49. package/chunk-72VWN4VK.js +51 -0
  50. package/chunk-7LR2IFUH.js +100 -0
  51. package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
  52. package/{chunk-XPETQ4MR.js → chunk-7X4BFUJV.js} +24 -10
  53. package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
  54. package/chunk-A4O76A6V.js +432 -0
  55. package/chunk-AMNZPQCY.js +635 -0
  56. package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
  57. package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
  58. package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
  59. package/{chunk-U6QNVOR5.js → chunk-BUGLH2A7.js} +130 -6
  60. package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
  61. package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
  62. package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
  63. package/{chunk-Y2TCTNUD.js → chunk-CK2LMTYO.js} +4 -4
  64. package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
  65. package/{chunk-57V4PADY.js → chunk-CNYPQYXT.js} +781 -449
  66. package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
  67. package/chunk-D3ONA3FP.js +762 -0
  68. package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
  69. package/chunk-DLXL4NSL.js +1179 -0
  70. package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
  71. package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
  72. package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
  73. package/{chunk-DBJODIZ6.js → chunk-EQOWWSNQ.js} +19 -27
  74. package/chunk-ER6NTALN.js +34 -0
  75. package/{chunk-L4XST72F.js → chunk-ERCSHBUD.js} +16027 -17392
  76. package/chunk-EUHMI5KG.js +101 -0
  77. package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
  78. package/{chunk-Q2EERN52.js → chunk-FF5ZRKW7.js} +12 -7
  79. package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
  80. package/chunk-FI4DPLR7.js +902 -0
  81. package/{chunk-HDKMVYNJ.js → chunk-FNLT7NKG.js} +7 -11
  82. package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
  83. package/chunk-FP46RAJQ.js +58 -0
  84. package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
  85. package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
  86. package/{chunk-FZENZCIA.js → chunk-GEC4CHS2.js} +19 -12
  87. package/chunk-GF4LYNNZ.js +25 -0
  88. package/{chunk-IYLUK67R.js → chunk-GH6SS2DZ.js} +25 -8
  89. package/chunk-HAZ6UVH4.js +368 -0
  90. package/{chunk-OKAXQFON.js → chunk-HB4J5HA6.js} +4 -4
  91. package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
  92. package/chunk-HJTI7RZV.js +94 -0
  93. package/{chunk-HQUGB2HM.js → chunk-HMFKYZKP.js} +62 -50
  94. package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
  95. package/{chunk-46FETNLF.js → chunk-IN4B6Z2D.js} +7 -6
  96. package/chunk-IV6VUVLJ.js +88 -0
  97. package/{chunk-LLUBUHNT.js → chunk-IWWJSSST.js} +5 -9
  98. package/{chunk-7BIJFGKS.js → chunk-J22PFCQN.js} +106 -52
  99. package/chunk-J42X32PV.js +472 -0
  100. package/{chunk-LCBAMY2M.js → chunk-JKVOKKMQ.js} +0 -7
  101. package/{chunk-KT7S7ANZ.js → chunk-JPYOHIHX.js} +9 -9
  102. package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
  103. package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
  104. package/{chunk-KLMBM6P6.js → chunk-KALCFXQO.js} +2454 -1115
  105. package/chunk-KDDXC2IH.js +148 -0
  106. package/chunk-KGKTN2NX.js +25 -0
  107. package/chunk-KGWE224L.js +246 -0
  108. package/{chunk-OYUMJMC5.js → chunk-KSV6T4AH.js} +6 -1
  109. package/{chunk-P27E22MA.js → chunk-L43DGEPZ.js} +1 -1
  110. package/{chunk-5BIDJVNX.js → chunk-L45P4JTE.js} +180 -31
  111. package/chunk-LHCIIUCX.js +222 -0
  112. package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
  113. package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
  114. package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
  115. package/{chunk-BIDSIRTS.js → chunk-LTCZOOAM.js} +11 -17
  116. package/chunk-LUTSMSIL.js +425 -0
  117. package/chunk-LXP53WGF.js +168 -0
  118. package/{chunk-2CT2J3O6.js → chunk-M7VNNPVX.js} +2493 -4055
  119. package/chunk-MDAYRIP7.js +1889 -0
  120. package/{chunk-6B2OBX5B.js → chunk-MMXHIHJZ.js} +15 -47
  121. package/{chunk-HPDLPEUG.js → chunk-MPWQI36J.js} +267 -234
  122. package/chunk-MRACVEPZ.js +7 -0
  123. package/{chunk-ZYPXOQS2.js → chunk-MSFKHPA6.js} +1 -1
  124. package/chunk-NHLLXINQ.js +8 -0
  125. package/{chunk-QXTEEEIN.js → chunk-NJCTPWJU.js} +8 -8
  126. package/chunk-NLS7F5DW.js +1697 -0
  127. package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
  128. package/{chunk-JLZJL3WC.js → chunk-O77F26YB.js} +370 -39
  129. package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
  130. package/{chunk-YN23INFZ.js → chunk-OIOMBPCA.js} +23 -2
  131. package/{chunk-CJOOF4L5.js → chunk-OSZNERNW.js} +17 -14
  132. package/{chunk-JZO7KUF3.js → chunk-P4I55ASV.js} +313 -275
  133. package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
  134. package/chunk-PL5RKESU.js +40 -0
  135. package/chunk-Q5FJJ6XI.js +103 -0
  136. package/{chunk-WS36XPJD.js → chunk-Q5IXZF3S.js} +82 -6
  137. package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
  138. package/{chunk-WSLL7VV4.js → chunk-QXWXRBOL.js} +9 -9
  139. package/{chunk-MXA54TQM.js → chunk-QZYQ3Y3G.js} +1 -1
  140. package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
  141. package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
  142. package/chunk-RF576RYE.js +117 -0
  143. package/chunk-RI7SXDJW.js +1317 -0
  144. package/{chunk-FEIVARWR.js → chunk-RIOAPUGV.js} +238 -25
  145. package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
  146. package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
  147. package/{chunk-J55F3IEZ.js → chunk-SARJZIGR.js} +1 -1
  148. package/chunk-SJFL32RD.js +356 -0
  149. package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
  150. package/{chunk-MPGR4ZNR.js → chunk-SRVLHMES.js} +46 -42
  151. package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
  152. package/{chunk-RD3QLZQV.js → chunk-SWJRX4M5.js} +324 -2
  153. package/{chunk-R3TUHCSJ.js → chunk-T3Y2NA4H.js} +8 -3
  154. package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
  155. package/{chunk-KWNVPY6M.js → chunk-TJXO66M2.js} +8 -5
  156. package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
  157. package/{chunk-ADYWV732.js → chunk-U5PSCTMR.js} +264 -177
  158. package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
  159. package/{chunk-QGFLVQ6E.js → chunk-UBOTXA3Z.js} +4 -14
  160. package/{chunk-6YX2RAQN.js → chunk-UEZL3RBG.js} +89 -164
  161. package/{chunk-NCFKHYDM.js → chunk-UJL23HBL.js} +774 -119
  162. package/chunk-ULPU4C43.js +1710 -0
  163. package/{chunk-UA3QTA2S.js → chunk-VC3MAT33.js} +4442 -2570
  164. package/{chunk-VNHZJEQN.js → chunk-VCESLFF4.js} +3 -3
  165. package/chunk-VOO3YQQP.js +17157 -0
  166. package/{chunk-Y2GWUBNS.js → chunk-VZDSNDUD.js} +279 -149
  167. package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
  168. package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
  169. package/chunk-WEEB2JKA.js +443 -0
  170. package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
  171. package/chunk-WMBJDXMY.js +408 -0
  172. package/chunk-WSQLCWLQ.js +201 -0
  173. package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
  174. package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
  175. package/{chunk-MNFUKRRU.js → chunk-XKNDVHF5.js} +7 -7
  176. package/{chunk-MHKPUGPD.js → chunk-XREMPMNK.js} +20 -4
  177. package/chunk-XT6C2QZW.js +46 -0
  178. package/chunk-XUDXQT7R.js +790 -0
  179. package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
  180. package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
  181. package/{chunk-U35UUM5K.js → chunk-YVOUSIIA.js} +1 -1
  182. package/{chunk-6VEO7Z3Y.js → chunk-Z27AH6A5.js} +6 -6
  183. package/chunk-Z3KTXWWB.js +76 -0
  184. package/{chunk-UWWOWTW2.js → chunk-Z7EP5HDL.js} +1 -1
  185. package/{chunk-YFEK7ACQ.js → chunk-ZB2E724W.js} +4 -4
  186. package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
  187. package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
  188. package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-BJJEXHSZ.js} +20 -14
  189. package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
  190. package/cliAuthorityBrokerProcess-VIJEKQSX.js +34 -0
  191. package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-NDMKN4X2.js} +6 -3
  192. package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
  193. package/cliLocalAgentRecordReader-KCZS2MZU.js +113 -0
  194. package/cloudAutomationCommands-2WQUGQSW.js +310 -0
  195. package/{commandRegistry-IFYQLPGM.js → commandRegistry-C64JBZJ3.js} +288 -121
  196. package/{contentThunks-QCFCD2X3.js → contentThunks-G3HEIRXC.js} +45 -43
  197. package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
  198. package/createAgentAutomationAction-DSBL3X3A.js +172 -0
  199. package/createDialogAction-OHFUHC53.js +86 -0
  200. package/{createPageAction-QCVBMP4C.js → createPageAction-E6JZSZLU.js} +49 -45
  201. package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
  202. package/{dbSlice-RWPSVHBC.js → dbSlice-U3GPLEL3.js} +21 -16
  203. package/deleteDbKey-DRXKWJX5.js +86 -0
  204. package/{dialogCommands-4IEQUALS.js → dialogCommands-4EX2OTIC.js} +80 -66
  205. package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
  206. package/dialogNotifyCommand-4SCE2Z2R.js +44 -0
  207. package/dialogPortabilityCommands-ZSFFHRX4.js +3036 -0
  208. package/{dialogSlice-XFYID6KE.js → dialogSlice-PRZCIJCH.js} +43 -42
  209. package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-RKB76OVX.js} +84 -70
  210. package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-BP7HMRYP.js} +7 -4
  211. package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-JGPNGIZ7.js} +68 -59
  212. package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-XRJTNRDH.js} +68 -59
  213. package/{docReadCommands-EXQI7ETH.js → docReadCommands-6GFO4ARS.js} +67 -58
  214. package/{docStore-MWFUKZL2.js → docStore-QRLIWFTU.js} +16 -17
  215. package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-W2GXMUXW.js} +68 -59
  216. package/{ebookDownloaderAgentCommand-DYSKF5ZY.js → ebookDownloaderAgentCommand-2DHPGEOQ.js} +14 -17
  217. package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
  218. package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
  219. package/{handleSendMessageAction-GG3TR62X.js → handleSendMessageAction-DHGWURJZ.js} +265 -119
  220. package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-FPUZ7RMI.js} +138 -122
  221. package/index.js +36 -22
  222. package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
  223. package/localAutomationCommands-ZMU22RQJ.js +198 -0
  224. package/localAutomationRuntime-MU5FGJ3V.js +60 -0
  225. package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
  226. package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-YBXQBV4G.js} +136 -119
  227. package/localRuntimeAuthority-LDXMEDO5.js +44 -0
  228. package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-6TQZDLNU.js} +1 -1
  229. package/{machineCommands-CL5XK5UC.js → machineCommands-57RTUYRV.js} +251 -357
  230. package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
  231. package/machineWsRunDispatch-VBKV3FFE.js +227 -0
  232. package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-J76SOJVZ.js} +40 -22
  233. package/mcpLocalManageCommands-USETIMHB.js +212 -0
  234. package/{memberThunks-43B7UYC5.js → memberThunks-7UERUEMI.js} +102 -22
  235. package/{memoryCommands-BC6REPQB.js → memoryCommands-N7NHEE55.js} +25 -34
  236. package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
  237. package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
  238. package/package.json +3 -3
  239. package/parityCommands-LYDLWSLK.js +613 -0
  240. package/{projectArchive-OC63TWTD.js → projectArchive-KCNQDVWJ.js} +49 -45
  241. package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
  242. package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
  243. package/{read-KG6INYUT.js → read-SPSQ6NLR.js} +11 -10
  244. package/{readDocTool-N3GA52JR.js → readDocTool-ENUL2GNL.js} +5 -1
  245. package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-MKS7TAEF.js} +927 -573
  246. package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
  247. package/remove-TNNDO635.js +32 -0
  248. package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-POPUZ3WU.js} +22 -26
  249. package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-KVILXQNI.js} +117 -82
  250. package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-4J2DP4LZ.js} +23 -16
  251. package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
  252. package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-35THMVBP.js} +16 -17
  253. package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-WLXBNIG7.js} +23 -27
  254. package/{settingThunks-DVKG4X4S.js → settingThunks-6Y5U5M5N.js} +170 -497
  255. package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
  256. package/{spaceCommands-7QKXKBDQ.js → spaceCommands-LXNJBO2U.js} +293 -58
  257. package/spacePruneCommand-2ITUFYBM.js +233 -0
  258. package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
  259. package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-EY6MFKCA.js} +225 -137
  260. package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-TG6BQRDA.js} +19 -23
  261. package/{tableCommands-EFA754RE.js → tableCommands-35G34R4B.js} +28 -49
  262. package/{toolApiClient-N5PYW2R3.js → toolApiClient-MPQIFYXP.js} +15 -4
  263. package/{tools-2Q2LBDUC.js → tools-CSLTRRUR.js} +73 -63
  264. package/{tuiRestart-4QDWLHYZ.js → tuiRestart-ALR4Q3JM.js} +20 -13
  265. package/tuiSummaryLlmCaller-3Y3JEXJK.js +52 -0
  266. package/{updateCommands-GJGRS6JK.js → updateCommands-GHQVP6Z5.js} +13 -8
  267. package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-LFAWF5EW.js} +57 -58
  268. package/{usageCommand-WI6SQOPB.js → usageCommand-5VKW6T4C.js} +6 -8
  269. package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-VUQETFMW.js} +11 -15
  270. package/{windowsSelfUpdate-C7LGVWYX.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
  271. package/workContext-ZAW6VXT7.js +18 -0
  272. package/workContextQueryProjection-CACY5VFE.js +23 -0
  273. package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
  274. package/agentFavoriteCommands-7LOP3HUD.js +0 -186
  275. package/agentRecordCommands-TPE7NSZ6.js +0 -194
  276. package/agentRunCommand-DMVGBPLI.js +0 -232
  277. package/authCommand-V6EOMZX6.js +0 -79
  278. package/chunk-2MBTWINN.js +0 -89
  279. package/chunk-523DITKR.js +0 -32
  280. package/chunk-BUDVRYES.js +0 -2213
  281. package/chunk-BZMDWGQQ.js +0 -47
  282. package/chunk-GAHJLSDO.js +0 -107
  283. package/chunk-GYX6XTAI.js +0 -84
  284. package/chunk-HNUWUO75.js +0 -93
  285. package/chunk-HSBHS6KT.js +0 -33401
  286. package/chunk-KG27JIG4.js +0 -136
  287. package/chunk-OB4FBZXJ.js +0 -364
  288. package/chunk-OKH74FML.js +0 -3746
  289. package/chunk-OLZBQWZU.js +0 -6
  290. package/chunk-OOV5JN25.js +0 -1317
  291. package/chunk-OQFOE4SJ.js +0 -405
  292. package/chunk-PXYBUFDB.js +0 -53
  293. package/chunk-R3FZHW4Q.js +0 -103
  294. package/chunk-R3MV2GII.js +0 -106
  295. package/chunk-SCAC3NM5.js +0 -11751
  296. package/chunk-SR4FE5VD.js +0 -9
  297. package/chunk-SYTHYBMI.js +0 -3558
  298. package/chunk-UKZX3NHN.js +0 -48
  299. package/chunk-UVLYNWIE.js +0 -74
  300. package/chunk-VQX5JJNI.js +0 -861
  301. package/chunk-X4O7FJF5.js +0 -160
  302. package/chunk-YJPK35HB.js +0 -175
  303. package/chunk-YNIYE47Z.js +0 -105
  304. package/chunk-Z4PCXPUE.js +0 -127
  305. package/chunk-ZR5IVL4N.js +0 -862
  306. package/chunk-ZTHAJU3O.js +0 -2537
  307. package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
  308. package/cliLocalAgentRecordReader-34UKRBLY.js +0 -104
  309. package/createDialogAction-ZAJERW62.js +0 -82
  310. package/deleteFile-ECU6FU5C.js +0 -55
  311. package/dialogNotifyCommand-IASQGEMW.js +0 -36
  312. package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
  313. package/machineWsRunDispatch-TBVOYOAH.js +0 -209
  314. package/markdownToSlate-PXYAIBVL.js +0 -8
  315. package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
  316. package/webapi-QVV65DQF.js +0 -2487
  317. package/workContext-Y3ADAPZU.js +0 -14
  318. package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
  319. package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
  320. package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
@@ -1,30 +1,9 @@
1
- import {
2
- writeOAuthCredential
3
- } from "./chunk-G7Y4GXTY.js";
4
- import {
5
- buildEnvFromProfile,
6
- loadProfileConfig
7
- } from "./chunk-R5GO3YZP.js";
8
- import {
9
- getCliLocale
10
- } from "./chunk-FEIVARWR.js";
11
- import {
12
- ANTIGRAVITY_AUTH_URL,
13
- ANTIGRAVITY_CALLBACK_PATH,
14
- ANTIGRAVITY_CALLBACK_PORT,
15
- ANTIGRAVITY_CLIENT_ID,
16
- ANTIGRAVITY_CLIENT_SECRET,
17
- ANTIGRAVITY_CLOUD_CODE_BASE_URL,
18
- ANTIGRAVITY_SCOPES,
19
- ANTIGRAVITY_TOKEN_URL,
20
- ANTIGRAVITY_USERINFO_URL,
21
- getAntigravityUserAgent,
22
- normalizeAntigravityTokenPayload,
23
- refreshAntigravityToken
24
- } from "./chunk-6SOWMEAY.js";
25
1
  import {
26
2
  toErrorMessage
27
3
  } from "./chunk-HNMXYYJR.js";
4
+ import {
5
+ writeOAuthCredential
6
+ } from "./chunk-G7Y4GXTY.js";
28
7
  import {
29
8
  asTrimmedString
30
9
  } from "./chunk-3EUW3WEO.js";
@@ -34,6 +13,13 @@ import {
34
13
  import {
35
14
  isRecord
36
15
  } from "./chunk-KUG52IAP.js";
16
+ import {
17
+ buildEnvFromProfile,
18
+ loadProfileConfig
19
+ } from "./chunk-R5GO3YZP.js";
20
+ import {
21
+ getCliLocale
22
+ } from "./chunk-RIOAPUGV.js";
37
23
 
38
24
  // packages/cli/tui/wtAmbiguousWidth.ts
39
25
  import fs from "node:fs";
@@ -989,359 +975,6 @@ function wrapTextToLines(text, columns) {
989
975
  return result;
990
976
  }
991
977
 
992
- // packages/cli/oauth/callback-server.ts
993
- import { createServer } from "node:http";
994
- var DEFAULT_CALLBACK_TIMEOUT_MS = 5 * 60 * 1e3;
995
- function parseQuery(url) {
996
- const questionIndex = url.indexOf("?");
997
- if (questionIndex < 0) return {};
998
- const search = url.slice(questionIndex + 1);
999
- const params = new URLSearchParams(search);
1000
- const result = {};
1001
- for (const [key, value] of params) {
1002
- result[key] = value;
1003
- }
1004
- return result;
1005
- }
1006
- var SUCCESS_HTML = `<!doctype html>
1007
- <html><head><meta charset="utf-8"><title>Authorization complete</title></head>
1008
- <body><h2>Authorization complete</h2><p>You can close this tab and return to the terminal.</p></body></html>`;
1009
- var ERROR_HTML = `<!doctype html>
1010
- <html><head><meta charset="utf-8"><title>Authorization error</title></head>
1011
- <body><h2>Authorization error</h2><p>No authorization code was received. Please try again.</p></body></html>`;
1012
- function startCallbackServerOnPort(options) {
1013
- const hostname = options.hostname ?? "localhost";
1014
- const timeoutMs = options.timeoutMs ?? DEFAULT_CALLBACK_TIMEOUT_MS;
1015
- const now = options.now ?? Date.now;
1016
- return new Promise((resolve, reject) => {
1017
- const deadline = now() + timeoutMs;
1018
- let result = null;
1019
- let resultResolve = null;
1020
- let resultReject = null;
1021
- let settled = false;
1022
- let listening = false;
1023
- const codePromise = new Promise((res, rej) => {
1024
- resultResolve = res;
1025
- resultReject = rej;
1026
- });
1027
- const timeoutTimer = setTimeout(() => {
1028
- if (settled) return;
1029
- settled = true;
1030
- const err = new Error(`OAuth callback timed out after ${Math.round(timeoutMs / 1e3)}s`);
1031
- server.close();
1032
- resultReject?.(err);
1033
- }, Math.max(0, deadline - now()));
1034
- const server = createServer((req, res) => {
1035
- if (!req.url) {
1036
- res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
1037
- res.end(ERROR_HTML);
1038
- return;
1039
- }
1040
- const query = parseQuery(req.url);
1041
- const code = query.code;
1042
- if (!code) {
1043
- res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
1044
- res.end(ERROR_HTML);
1045
- return;
1046
- }
1047
- result = { code, ...query.state ? { state: query.state } : {} };
1048
- res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
1049
- res.end(SUCCESS_HTML);
1050
- if (!settled) {
1051
- settled = true;
1052
- clearTimeout(timeoutTimer);
1053
- server.close();
1054
- resultResolve?.(result);
1055
- }
1056
- });
1057
- server.on("error", (err) => {
1058
- if (settled) return;
1059
- settled = true;
1060
- clearTimeout(timeoutTimer);
1061
- server.close();
1062
- if (listening) {
1063
- resultReject?.(err);
1064
- } else {
1065
- reject(err);
1066
- }
1067
- });
1068
- server.listen(options.port, hostname, () => {
1069
- listening = true;
1070
- const address = server.address();
1071
- if (!address || typeof address === "string") {
1072
- const err = new Error("OAuth callback server did not bind a TCP port.");
1073
- settled = true;
1074
- clearTimeout(timeoutTimer);
1075
- server.close();
1076
- reject(err);
1077
- return;
1078
- }
1079
- resolve({
1080
- server,
1081
- port: address.port,
1082
- waitForCode: () => codePromise,
1083
- close: () => {
1084
- clearTimeout(timeoutTimer);
1085
- settled = true;
1086
- return new Promise((res) => server.close(() => res()));
1087
- }
1088
- });
1089
- });
1090
- });
1091
- }
1092
- function isAddressInUse(error) {
1093
- return !!error && typeof error === "object" && "code" in error && error.code === "EADDRINUSE";
1094
- }
1095
- async function startCallbackServer(options) {
1096
- try {
1097
- return await startCallbackServerOnPort(options);
1098
- } catch (error) {
1099
- if (!options.fallbackToRandomPort || options.port === 0 || !isAddressInUse(error)) {
1100
- throw error;
1101
- }
1102
- return startCallbackServerOnPort({ ...options, port: 0 });
1103
- }
1104
- }
1105
-
1106
- // packages/cli/oauth/flows/antigravity.ts
1107
- var TIER_LEGACY = "legacy-tier";
1108
- var PROJECT_ONBOARD_MAX_ATTEMPTS = 5;
1109
- var PROJECT_ONBOARD_INTERVAL_MS = 2e3;
1110
- async function fetchAntigravityAvailableModels(fetchImpl, accessToken) {
1111
- const response = await fetchImpl(`${ANTIGRAVITY_CLOUD_CODE_BASE_URL}/v1internal:fetchAvailableModels`, {
1112
- method: "POST",
1113
- headers: {
1114
- Authorization: `Bearer ${accessToken}`,
1115
- "Content-Type": "application/json",
1116
- "User-Agent": getAntigravityUserAgent()
1117
- },
1118
- body: "{}"
1119
- });
1120
- if (!response.ok) {
1121
- const body = await response.text();
1122
- throw new Error(`fetchAvailableModels failed: ${response.status} ${response.statusText}: ${body}`);
1123
- }
1124
- const payload = await response.json();
1125
- return payload.models && typeof payload.models === "object" && !Array.isArray(payload.models) ? payload.models : {};
1126
- }
1127
- var ANTIGRAVITY_LOAD_CODE_ASSIST_METADATA = Object.freeze({
1128
- ideType: "ANTIGRAVITY",
1129
- platform: "PLATFORM_UNSPECIFIED",
1130
- pluginType: "GEMINI"
1131
- });
1132
- function readProjectId(value) {
1133
- if (typeof value === "string" && value.length > 0) {
1134
- return value;
1135
- }
1136
- if (value && typeof value === "object" && typeof value.id === "string" && value.id.length > 0) {
1137
- return value.id;
1138
- }
1139
- return void 0;
1140
- }
1141
- function getDefaultTierId(allowedTiers) {
1142
- if (!allowedTiers || allowedTiers.length === 0) {
1143
- return TIER_LEGACY;
1144
- }
1145
- const defaultTier = allowedTiers.find(
1146
- (tier) => tier.isDefault && typeof tier.id === "string" && tier.id.length > 0
1147
- );
1148
- if (defaultTier?.id) {
1149
- return defaultTier.id;
1150
- }
1151
- return TIER_LEGACY;
1152
- }
1153
- async function sleep(ms) {
1154
- const { promise, resolve } = Promise.withResolvers();
1155
- setTimeout(resolve, ms);
1156
- return promise;
1157
- }
1158
- async function onboardProjectWithRetries(fetchImpl, endpoint, headers, onboardBody, onProgress) {
1159
- for (let attempt = 1; attempt <= PROJECT_ONBOARD_MAX_ATTEMPTS; attempt += 1) {
1160
- if (attempt > 1) {
1161
- onProgress?.(
1162
- `Waiting for project provisioning (attempt ${attempt}/${PROJECT_ONBOARD_MAX_ATTEMPTS})...`
1163
- );
1164
- await sleep(PROJECT_ONBOARD_INTERVAL_MS);
1165
- }
1166
- const onboardResponse = await fetchImpl(
1167
- `${endpoint}/v1internal:onboardUser`,
1168
- {
1169
- method: "POST",
1170
- headers,
1171
- body: JSON.stringify(onboardBody)
1172
- }
1173
- );
1174
- if (!onboardResponse.ok) {
1175
- const errorText = await onboardResponse.text();
1176
- throw new Error(
1177
- `onboardUser failed: ${onboardResponse.status} ${onboardResponse.statusText}: ${errorText}`
1178
- );
1179
- }
1180
- const operation = await onboardResponse.json();
1181
- if (!operation.done) {
1182
- continue;
1183
- }
1184
- const projectId = readProjectId(operation.response?.cloudaicompanionProject);
1185
- if (projectId) {
1186
- return projectId;
1187
- }
1188
- }
1189
- throw new Error(
1190
- `onboardUser did not return a provisioned project id after ${PROJECT_ONBOARD_MAX_ATTEMPTS} attempts`
1191
- );
1192
- }
1193
- async function discoverProject(fetchImpl, accessToken, onProgress) {
1194
- const headers = {
1195
- Authorization: `Bearer ${accessToken}`,
1196
- "Content-Type": "application/json",
1197
- // Google's Cloud Code Assist API validates the Antigravity client
1198
- // User-Agent; requests without it are rejected even with a valid token.
1199
- // (Matches oh-my-pi's google-antigravity.ts discoverProject.)
1200
- "User-Agent": getAntigravityUserAgent()
1201
- };
1202
- onProgress?.("Checking for existing project...");
1203
- const endpoint = ANTIGRAVITY_CLOUD_CODE_BASE_URL;
1204
- const loadResponse = await fetchImpl(`${endpoint}/v1internal:loadCodeAssist`, {
1205
- method: "POST",
1206
- headers,
1207
- body: JSON.stringify({
1208
- metadata: ANTIGRAVITY_LOAD_CODE_ASSIST_METADATA
1209
- })
1210
- });
1211
- if (!loadResponse.ok) {
1212
- const errorText = await loadResponse.text();
1213
- throw new Error(
1214
- `loadCodeAssist failed: ${loadResponse.status} ${loadResponse.statusText}: ${errorText}`
1215
- );
1216
- }
1217
- const loadPayload = await loadResponse.json();
1218
- const existingProject = readProjectId(loadPayload.cloudaicompanionProject);
1219
- if (existingProject) {
1220
- return existingProject;
1221
- }
1222
- const tierId = getDefaultTierId(loadPayload.allowedTiers);
1223
- onProgress?.("Provisioning project...");
1224
- const onboardBody = {
1225
- tierId,
1226
- metadata: ANTIGRAVITY_LOAD_CODE_ASSIST_METADATA
1227
- };
1228
- return onboardProjectWithRetries(
1229
- fetchImpl,
1230
- endpoint,
1231
- headers,
1232
- onboardBody,
1233
- onProgress
1234
- );
1235
- }
1236
- async function getUserEmail(fetchImpl, accessToken) {
1237
- try {
1238
- const response = await fetchImpl(ANTIGRAVITY_USERINFO_URL, {
1239
- headers: { Authorization: `Bearer ${accessToken}` }
1240
- });
1241
- if (!response.ok) return void 0;
1242
- const data = await response.json();
1243
- return typeof data.email === "string" ? data.email : void 0;
1244
- } catch {
1245
- return void 0;
1246
- }
1247
- }
1248
- function generateState() {
1249
- const bytes = new Uint8Array(16);
1250
- crypto.getRandomValues(bytes);
1251
- return Array.from(bytes).map((value) => value.toString(16).padStart(2, "0")).join("");
1252
- }
1253
- async function runAntigravityOAuthLogin(deps = {}) {
1254
- const fetchImpl = deps.fetchImpl ?? fetch;
1255
- const output = deps.output ?? console;
1256
- const error = deps.error ?? console;
1257
- const redirectUri = `http://127.0.0.1:${ANTIGRAVITY_CALLBACK_PORT}${ANTIGRAVITY_CALLBACK_PATH}`;
1258
- let handle;
1259
- try {
1260
- handle = await startCallbackServer({
1261
- port: ANTIGRAVITY_CALLBACK_PORT,
1262
- hostname: "127.0.0.1",
1263
- timeoutMs: 5 * 6e4
1264
- });
1265
- } catch (err) {
1266
- throw new Error(
1267
- `Failed to start Antigravity OAuth callback server on ${ANTIGRAVITY_CALLBACK_PORT}: ${toErrorMessage(err)}`
1268
- );
1269
- }
1270
- try {
1271
- const state = generateState();
1272
- const authParams = new URLSearchParams({
1273
- client_id: ANTIGRAVITY_CLIENT_ID,
1274
- response_type: "code",
1275
- redirect_uri: redirectUri,
1276
- scope: ANTIGRAVITY_SCOPES.join(" "),
1277
- state,
1278
- access_type: "offline",
1279
- prompt: "consent"
1280
- });
1281
- const authUrl = `${ANTIGRAVITY_AUTH_URL}?${authParams.toString()}`;
1282
- output.log(
1283
- `Open the following URL in your browser to log in to Antigravity:
1284
- ${authUrl}`
1285
- );
1286
- if (deps.openBrowser) {
1287
- try {
1288
- await deps.openBrowser(authUrl);
1289
- } catch (err) {
1290
- error.error(
1291
- `Failed to open browser automatically: ${toErrorMessage(err)}`
1292
- );
1293
- }
1294
- }
1295
- const callback = await handle.waitForCode();
1296
- const tokenResponse = await fetchImpl(ANTIGRAVITY_TOKEN_URL, {
1297
- method: "POST",
1298
- headers: { "Content-Type": "application/x-www-form-urlencoded" },
1299
- body: new URLSearchParams({
1300
- client_id: ANTIGRAVITY_CLIENT_ID,
1301
- client_secret: ANTIGRAVITY_CLIENT_SECRET,
1302
- code: callback.code,
1303
- grant_type: "authorization_code",
1304
- redirect_uri: redirectUri
1305
- })
1306
- });
1307
- if (!tokenResponse.ok) {
1308
- const body = await tokenResponse.text();
1309
- throw new Error(`Antigravity token exchange failed: ${body}`);
1310
- }
1311
- const tokenData = await tokenResponse.json();
1312
- if (typeof tokenData.refresh_token !== "string" || !tokenData.refresh_token.trim()) {
1313
- throw new Error("No refresh token received. Please try again.");
1314
- }
1315
- if (typeof tokenData.access_token !== "string" || !tokenData.access_token.trim()) {
1316
- throw new Error("No access token received. Please try again.");
1317
- }
1318
- const email = await getUserEmail(fetchImpl, tokenData.access_token.trim());
1319
- const projectId = await discoverProject(
1320
- fetchImpl,
1321
- tokenData.access_token.trim(),
1322
- (message) => output.log(message)
1323
- );
1324
- const now = (deps.now ?? Date.now)();
1325
- return normalizeAntigravityTokenPayload({
1326
- payload: tokenData,
1327
- baseCredential: {
1328
- provider: "antigravity",
1329
- accountId: email,
1330
- metadata: {
1331
- projectId,
1332
- email
1333
- }
1334
- },
1335
- now
1336
- });
1337
- } finally {
1338
- await handle.close();
1339
- }
1340
- }
1341
- async function refreshAntigravityOAuthToken(credential, deps = {}) {
1342
- return refreshAntigravityToken(credential, deps);
1343
- }
1344
-
1345
978
  // packages/cli/oauth/flows/openai-codex.ts
1346
979
  import { createHash as createHash2 } from "node:crypto";
1347
980
 
@@ -1529,6 +1162,120 @@ async function refreshOpenAiCodexToken(credential, deps = {}) {
1529
1162
  });
1530
1163
  }
1531
1164
 
1165
+ // packages/cli/oauth/callback-server.ts
1166
+ import { createServer } from "node:http";
1167
+ var DEFAULT_CALLBACK_TIMEOUT_MS = 5 * 60 * 1e3;
1168
+ function parseQuery(url) {
1169
+ const questionIndex = url.indexOf("?");
1170
+ if (questionIndex < 0) return {};
1171
+ const search = url.slice(questionIndex + 1);
1172
+ const params = new URLSearchParams(search);
1173
+ const result = {};
1174
+ for (const [key, value] of params) {
1175
+ result[key] = value;
1176
+ }
1177
+ return result;
1178
+ }
1179
+ var SUCCESS_HTML = `<!doctype html>
1180
+ <html><head><meta charset="utf-8"><title>Authorization complete</title></head>
1181
+ <body><h2>Authorization complete</h2><p>You can close this tab and return to the terminal.</p></body></html>`;
1182
+ var ERROR_HTML = `<!doctype html>
1183
+ <html><head><meta charset="utf-8"><title>Authorization error</title></head>
1184
+ <body><h2>Authorization error</h2><p>No authorization code was received. Please try again.</p></body></html>`;
1185
+ function startCallbackServerOnPort(options) {
1186
+ const hostname = options.hostname ?? "localhost";
1187
+ const timeoutMs = options.timeoutMs ?? DEFAULT_CALLBACK_TIMEOUT_MS;
1188
+ const now = options.now ?? Date.now;
1189
+ return new Promise((resolve, reject) => {
1190
+ const deadline = now() + timeoutMs;
1191
+ let result = null;
1192
+ let resultResolve = null;
1193
+ let resultReject = null;
1194
+ let settled = false;
1195
+ let listening = false;
1196
+ const codePromise = new Promise((res, rej) => {
1197
+ resultResolve = res;
1198
+ resultReject = rej;
1199
+ });
1200
+ const timeoutTimer = setTimeout(() => {
1201
+ if (settled) return;
1202
+ settled = true;
1203
+ const err = new Error(`OAuth callback timed out after ${Math.round(timeoutMs / 1e3)}s`);
1204
+ server.close();
1205
+ resultReject?.(err);
1206
+ }, Math.max(0, deadline - now()));
1207
+ const server = createServer((req, res) => {
1208
+ if (!req.url) {
1209
+ res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
1210
+ res.end(ERROR_HTML);
1211
+ return;
1212
+ }
1213
+ const query = parseQuery(req.url);
1214
+ const code = query.code;
1215
+ if (!code) {
1216
+ res.writeHead(400, { "Content-Type": "text/html; charset=utf-8" });
1217
+ res.end(ERROR_HTML);
1218
+ return;
1219
+ }
1220
+ result = { code, ...query.state ? { state: query.state } : {} };
1221
+ res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
1222
+ res.end(SUCCESS_HTML);
1223
+ if (!settled) {
1224
+ settled = true;
1225
+ clearTimeout(timeoutTimer);
1226
+ server.close();
1227
+ resultResolve?.(result);
1228
+ }
1229
+ });
1230
+ server.on("error", (err) => {
1231
+ if (settled) return;
1232
+ settled = true;
1233
+ clearTimeout(timeoutTimer);
1234
+ server.close();
1235
+ if (listening) {
1236
+ resultReject?.(err);
1237
+ } else {
1238
+ reject(err);
1239
+ }
1240
+ });
1241
+ server.listen(options.port, hostname, () => {
1242
+ listening = true;
1243
+ const address = server.address();
1244
+ if (!address || typeof address === "string") {
1245
+ const err = new Error("OAuth callback server did not bind a TCP port.");
1246
+ settled = true;
1247
+ clearTimeout(timeoutTimer);
1248
+ server.close();
1249
+ reject(err);
1250
+ return;
1251
+ }
1252
+ resolve({
1253
+ server,
1254
+ port: address.port,
1255
+ waitForCode: () => codePromise,
1256
+ close: () => {
1257
+ clearTimeout(timeoutTimer);
1258
+ settled = true;
1259
+ return new Promise((res) => server.close(() => res()));
1260
+ }
1261
+ });
1262
+ });
1263
+ });
1264
+ }
1265
+ function isAddressInUse(error) {
1266
+ return !!error && typeof error === "object" && "code" in error && error.code === "EADDRINUSE";
1267
+ }
1268
+ async function startCallbackServer(options) {
1269
+ try {
1270
+ return await startCallbackServerOnPort(options);
1271
+ } catch (error) {
1272
+ if (!options.fallbackToRandomPort || options.port === 0 || !isAddressInUse(error)) {
1273
+ throw error;
1274
+ }
1275
+ return startCallbackServerOnPort({ ...options, port: 0 });
1276
+ }
1277
+ }
1278
+
1532
1279
  // packages/cli/oauth/deviceCodeDisplay.ts
1533
1280
  var BOLD = "\x1B[1m";
1534
1281
  var RESET = "\x1B[0m";
@@ -1656,11 +1403,11 @@ async function startDeviceCodeFlow(deps) {
1656
1403
  }
1657
1404
  async function pollDeviceCodeToken(args) {
1658
1405
  const fetchImpl = args.deps?.fetchImpl ?? fetch;
1659
- const sleep2 = args.sleep ?? args.deps?.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
1406
+ const sleep = args.sleep ?? args.deps?.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
1660
1407
  const intervalMs = args.intervalMs ?? DEVICE_CODE_DEFAULT_INTERVAL_MS;
1661
1408
  const maxPolls = args.maxPolls ?? DEVICE_MAX_POLLS;
1662
1409
  for (let poll = 0; poll < maxPolls; poll++) {
1663
- await sleep2(poll === 0 ? Math.min(intervalMs, DEVICE_CODE_DEFAULT_INTERVAL_MS) : intervalMs);
1410
+ await sleep(poll === 0 ? Math.min(intervalMs, DEVICE_CODE_DEFAULT_INTERVAL_MS) : intervalMs);
1664
1411
  const response = await postJson(
1665
1412
  fetchImpl,
1666
1413
  OPENAI_CODEX_DEVICE_TOKEN_URL,
@@ -1819,309 +1566,6 @@ var refreshOpenAiCodexToken2 = async (credential, deps = {}) => {
1819
1566
  });
1820
1567
  };
1821
1568
 
1822
- // packages/agent-runtime/anthropicClaudeCodeFingerprint.ts
1823
- var DEFAULT_CLAUDE_CODE_VERSION = "2.1.294";
1824
- var SEMVER_REGEX = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
1825
- var adoptedClaudeCodeVersion = null;
1826
- function parseSemver(v) {
1827
- const match = v.trim().match(/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);
1828
- if (!match) return null;
1829
- return {
1830
- major: Number(match[1]),
1831
- minor: Number(match[2]),
1832
- patch: Number(match[3]),
1833
- prerelease: match[4]
1834
- };
1835
- }
1836
- function compareSemver(a, b) {
1837
- const parsedA = parseSemver(a);
1838
- const parsedB = parseSemver(b);
1839
- if (!parsedA || !parsedB) {
1840
- return a.localeCompare(b);
1841
- }
1842
- if (parsedA.major !== parsedB.major) return parsedA.major - parsedB.major;
1843
- if (parsedA.minor !== parsedB.minor) return parsedA.minor - parsedB.minor;
1844
- if (parsedA.patch !== parsedB.patch) return parsedA.patch - parsedB.patch;
1845
- if (!parsedA.prerelease && parsedB.prerelease) return 1;
1846
- if (parsedA.prerelease && !parsedB.prerelease) return -1;
1847
- if (!parsedA.prerelease && !parsedB.prerelease) return 0;
1848
- const partsA = parsedA.prerelease.split(".");
1849
- const partsB = parsedB.prerelease.split(".");
1850
- const maxLen = Math.max(partsA.length, partsB.length);
1851
- for (let i = 0; i < maxLen; i++) {
1852
- const pA = partsA[i];
1853
- const pB = partsB[i];
1854
- if (pA === void 0) return -1;
1855
- if (pB === void 0) return 1;
1856
- if (pA === pB) continue;
1857
- const numA = Number(pA);
1858
- const numB = Number(pB);
1859
- const aIsNum = Number.isInteger(numA) && String(numA) === pA;
1860
- const bIsNum = Number.isInteger(numB) && String(numB) === pB;
1861
- if (aIsNum && bIsNum) return numA - numB;
1862
- if (aIsNum && !bIsNum) return -1;
1863
- if (!aIsNum && bIsNum) return 1;
1864
- return pA.localeCompare(pB);
1865
- }
1866
- return 0;
1867
- }
1868
- function getEnvPinnedVersion(rawEnv) {
1869
- const envVal = rawEnv !== void 0 ? rawEnv : process.env.NOLO_CLAUDE_CODE_VERSION ?? process.env.CLAUDE_CODE_VERSION;
1870
- if (envVal === void 0) return void 0;
1871
- const trimmed = envVal.trim();
1872
- if (!trimmed) return void 0;
1873
- return SEMVER_REGEX.test(trimmed) ? trimmed : void 0;
1874
- }
1875
- function isClaudeCodeVersionEnvPinned() {
1876
- return getEnvPinnedVersion() !== void 0;
1877
- }
1878
- function resolveClaudeCodeVersion(rawEnv) {
1879
- const envPinned = getEnvPinnedVersion(rawEnv);
1880
- if (envPinned !== void 0) {
1881
- return envPinned;
1882
- }
1883
- return adoptedClaudeCodeVersion ?? DEFAULT_CLAUDE_CODE_VERSION;
1884
- }
1885
- function getClaudeCodeUserAgent() {
1886
- const version = resolveClaudeCodeVersion();
1887
- return `claude-cli/${version} (external, local-agent, agent-sdk/0.1.0)`;
1888
- }
1889
- function extractErrorText(error) {
1890
- if (typeof error === "string") return error;
1891
- if (!error) return "";
1892
- if (error instanceof Error) {
1893
- let s = `${error.name}: ${error.message}`;
1894
- const extra = error;
1895
- if (typeof extra.body === "string") s += " " + extra.body;
1896
- else if (extra.body && typeof extra.body === "object") {
1897
- try {
1898
- s += " " + JSON.stringify(extra.body);
1899
- } catch {
1900
- }
1901
- }
1902
- return s;
1903
- }
1904
- if (typeof error === "object") {
1905
- try {
1906
- return JSON.stringify(error);
1907
- } catch {
1908
- return String(error);
1909
- }
1910
- }
1911
- return String(error);
1912
- }
1913
- function adoptRequiredClaudeCodeVersion(error) {
1914
- if (isClaudeCodeVersionEnvPinned()) {
1915
- return false;
1916
- }
1917
- const text = extractErrorText(error);
1918
- if (!text) return false;
1919
- let requiredVersion = null;
1920
- if (typeof error === "object" && error !== null) {
1921
- const errObj = error;
1922
- const nested = errObj.error && typeof errObj.error === "object" ? errObj.error : errObj;
1923
- const hasTooOldCode = /claude_code_version_too_old/i.test(text);
1924
- const direct = nested.required_version ?? nested.requiredVersion ?? nested.minimum_version ?? nested.minVersion ?? (hasTooOldCode ? nested.version : void 0);
1925
- if (typeof direct === "string" && SEMVER_REGEX.test(direct.trim())) {
1926
- requiredVersion = direct.trim();
1927
- }
1928
- }
1929
- if (!requiredVersion) {
1930
- const phrase = text.match(/version\s+(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)\s+or\s+(?:newer|above|higher)\s+is\s+required/i) ?? text.match(/(?:minimum|required)\s+version\s+(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)/i);
1931
- if (phrase) requiredVersion = phrase[1];
1932
- }
1933
- if (!requiredVersion) return false;
1934
- const currentVersion = resolveClaudeCodeVersion();
1935
- if (compareSemver(requiredVersion, currentVersion) > 0) {
1936
- adoptedClaudeCodeVersion = requiredVersion;
1937
- return true;
1938
- }
1939
- return false;
1940
- }
1941
-
1942
- // packages/agent-runtime/anthropicOAuth.ts
1943
- var ANTHROPIC_OAUTH_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
1944
- var ANTHROPIC_OAUTH_AUTHORIZE_URL = "https://claude.ai/oauth/authorize";
1945
- var ANTHROPIC_OAUTH_TOKEN_URL = "https://api.anthropic.com/v1/oauth/token";
1946
- var ANTHROPIC_OAUTH_CALLBACK_PORT = 54545;
1947
- var ANTHROPIC_OAUTH_REDIRECT_URI = `http://localhost:${ANTHROPIC_OAUTH_CALLBACK_PORT}/callback`;
1948
- var ANTHROPIC_OAUTH_SCOPES = [
1949
- "org:create_api_key",
1950
- "user:profile",
1951
- "user:inference",
1952
- "user:sessions:claude_code",
1953
- "user:mcp_servers",
1954
- "user:file_upload"
1955
- ];
1956
- var ANTHROPIC_ACCESS_TOKEN_CLIENT_SKEW_MS = 5 * 60 * 1e3;
1957
- var ANTHROPIC_OAUTH_BETA = "oauth-2025-04-20";
1958
- var ANTHROPIC_BOOTSTRAP_URL = "https://api.anthropic.com/api/claude_cli/bootstrap";
1959
- var ANTHROPIC_OAUTH_GRANT_TTL_MS = 30 * 24 * 60 * 60 * 1e3;
1960
- var ANTHROPIC_IDENTITY_RECHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
1961
- function anthropicGrantRemainingMs(credential, now = Date.now()) {
1962
- const rawGrantedAt = credential?.metadata?.grantedAt;
1963
- if (typeof rawGrantedAt !== "number" || !Number.isFinite(rawGrantedAt)) {
1964
- return void 0;
1965
- }
1966
- return rawGrantedAt + ANTHROPIC_OAUTH_GRANT_TTL_MS - now;
1967
- }
1968
- async function fetchAnthropicBootstrapIdentity(accessToken, fetchImpl = fetch, debugLog) {
1969
- if (!accessToken || typeof accessToken !== "string") {
1970
- return {};
1971
- }
1972
- try {
1973
- const response = await fetchImpl(ANTHROPIC_BOOTSTRAP_URL, {
1974
- method: "GET",
1975
- headers: {
1976
- Authorization: `Bearer ${accessToken.trim()}`,
1977
- // UA 版本必须走 fingerprint 单一真源:400 自愈 adopt 新版本后,
1978
- // 这里若自带一份 pin,就会继续发旧版本,上游抬门槛时身份回填会静默失效。
1979
- "User-Agent": getClaudeCodeUserAgent(),
1980
- Accept: "application/json"
1981
- },
1982
- signal: AbortSignal.timeout(1e4)
1983
- });
1984
- if (!response.ok) {
1985
- debugLog?.(`Claude bootstrap identity returned HTTP ${response.status}`);
1986
- return {};
1987
- }
1988
- const data = await response.json().catch(() => ({}));
1989
- const account = data?.oauth_account;
1990
- const identity = {};
1991
- if (typeof account?.account_uuid === "string" && account.account_uuid.trim()) {
1992
- identity.accountId = account.account_uuid.trim();
1993
- }
1994
- if (typeof account?.account_email === "string" && account.account_email.trim()) {
1995
- identity.email = account.account_email.trim();
1996
- }
1997
- if (typeof account?.organization_uuid === "string" && account.organization_uuid.trim()) {
1998
- identity.orgId = account.organization_uuid.trim();
1999
- }
2000
- if (typeof account?.organization_name === "string" && account.organization_name.trim()) {
2001
- identity.orgName = account.organization_name.trim();
2002
- }
2003
- return identity;
2004
- } catch (err) {
2005
- debugLog?.("Claude bootstrap identity fetch failed", err);
2006
- return {};
2007
- }
2008
- }
2009
- function normalizeAnthropicTokenPayload(args) {
2010
- const { payload, baseCredential, now = Date.now() } = args;
2011
- if (typeof payload.access_token !== "string" || !payload.access_token.trim()) {
2012
- throw new Error("Claude OAuth token response missing access_token");
2013
- }
2014
- const expiresIn = asOptionalFiniteNumber(payload.expires_in);
2015
- const accountId = typeof payload.account?.uuid === "string" && payload.account.uuid ? payload.account.uuid : baseCredential?.accountId;
2016
- const email = typeof payload.account?.email_address === "string" && payload.account.email_address ? payload.account.email_address : baseCredential?.metadata?.email;
2017
- const organizationId = typeof payload.organization?.uuid === "string" && payload.organization.uuid ? payload.organization.uuid : baseCredential?.metadata?.organizationId;
2018
- const organizationName = typeof payload.organization?.name === "string" && payload.organization.name ? payload.organization.name : baseCredential?.metadata?.organizationName;
2019
- const refreshToken = typeof payload.refresh_token === "string" && payload.refresh_token.trim() ? payload.refresh_token.trim() : baseCredential?.refreshToken;
2020
- const scope = typeof payload.scope === "string" && payload.scope ? payload.scope : baseCredential?.scope;
2021
- const isInteractiveLogin = args.isInitialLogin ?? baseCredential === void 0;
2022
- const grantedAt = isInteractiveLogin ? now : typeof baseCredential?.metadata?.grantedAt === "number" && Number.isFinite(baseCredential.metadata.grantedAt) ? baseCredential.metadata.grantedAt : void 0;
2023
- const metadata = {
2024
- ...baseCredential?.metadata ?? {},
2025
- ...email ? { email } : {},
2026
- ...organizationId ? { organizationId } : {},
2027
- ...organizationName ? { organizationName } : {},
2028
- ...grantedAt !== void 0 ? { grantedAt } : {}
2029
- };
2030
- return {
2031
- ...baseCredential,
2032
- provider: "claude",
2033
- accessToken: payload.access_token.trim(),
2034
- ...refreshToken ? { refreshToken } : {},
2035
- ...expiresIn !== void 0 ? { expiresAt: now + expiresIn * 1e3 - ANTHROPIC_ACCESS_TOKEN_CLIENT_SKEW_MS } : baseCredential?.expiresAt !== void 0 ? { expiresAt: baseCredential.expiresAt } : {},
2036
- ...scope ? { scope } : {},
2037
- ...accountId ? { accountId } : {},
2038
- ...Object.keys(metadata).length > 0 ? { metadata } : {},
2039
- obtainedAt: now
2040
- };
2041
- }
2042
- async function refreshAnthropicToken(credential, deps = {}) {
2043
- if (!credential.refreshToken) {
2044
- throw new Error("Claude credential has no refresh_token");
2045
- }
2046
- const fetchImpl = deps.fetchImpl ?? fetch;
2047
- const now = deps.now?.() ?? Date.now();
2048
- const warn = deps.warn ?? console.warn;
2049
- const response = await fetchImpl(ANTHROPIC_OAUTH_TOKEN_URL, {
2050
- method: "POST",
2051
- headers: {
2052
- "Content-Type": "application/json",
2053
- "anthropic-beta": ANTHROPIC_OAUTH_BETA,
2054
- "User-Agent": "nolo-cli userOAuthProvider"
2055
- },
2056
- body: JSON.stringify({
2057
- grant_type: "refresh_token",
2058
- client_id: ANTHROPIC_OAUTH_CLIENT_ID,
2059
- refresh_token: credential.refreshToken
2060
- }),
2061
- signal: AbortSignal.timeout(3e4)
2062
- });
2063
- const payload = await response.json().catch(() => ({}));
2064
- if (!response.ok) {
2065
- throw classifyOAuthRefreshHttpFailure(response.status, payload, response.headers);
2066
- }
2067
- if (typeof payload.access_token !== "string" || !payload.access_token.trim()) {
2068
- throw new OAuthRefreshError("bad_response");
2069
- }
2070
- const identityCheckedAt = asOptionalFiniteNumber(credential.metadata?.identityCheckedAt);
2071
- const identityIncomplete = !credential.accountId || !credential.metadata?.email || !credential.metadata?.organizationId;
2072
- const orgNameMissing = !credential.metadata?.organizationName;
2073
- const identityStale = identityCheckedAt === void 0 || now - identityCheckedAt >= ANTHROPIC_IDENTITY_RECHECK_INTERVAL_MS;
2074
- const shouldCheck = identityIncomplete || identityStale || orgNameMissing && identityStale;
2075
- const bootstrap = shouldCheck ? await fetchAnthropicBootstrapIdentity(payload.access_token, fetchImpl) : {};
2076
- const updatedMetadata = {
2077
- ...credential.metadata ?? {}
2078
- };
2079
- if (shouldCheck) {
2080
- updatedMetadata.identityCheckedAt = now;
2081
- }
2082
- if (bootstrap.accountId && bootstrap.accountId !== credential.accountId) {
2083
- payload.account = { ...payload.account, uuid: bootstrap.accountId };
2084
- }
2085
- if (bootstrap.email && bootstrap.email !== credential.metadata?.email) {
2086
- payload.account = { ...payload.account, email_address: bootstrap.email };
2087
- updatedMetadata.email = bootstrap.email;
2088
- }
2089
- const existingOrgId = credential.metadata?.organizationId;
2090
- if (!bootstrap.orgId) {
2091
- delete payload.organization;
2092
- }
2093
- if (bootstrap.orgId) {
2094
- if (existingOrgId && existingOrgId !== bootstrap.orgId) {
2095
- updatedMetadata.previousOrgId = existingOrgId;
2096
- updatedMetadata.orgChangedAt = now;
2097
- warn(
2098
- `[anthropicOAuth] \u7EC4\u7EC7\u5F52\u5C5E\u5DF2\u968F\u4E0A\u6E38 bootstrap \u53D8\u66F4: ${existingOrgId} -> ${bootstrap.orgId}`
2099
- );
2100
- }
2101
- payload.organization = {
2102
- ...payload.organization,
2103
- uuid: bootstrap.orgId,
2104
- ...bootstrap.orgName ? { name: bootstrap.orgName } : {}
2105
- };
2106
- updatedMetadata.organizationId = bootstrap.orgId;
2107
- if (bootstrap.orgName) {
2108
- updatedMetadata.organizationName = bootstrap.orgName;
2109
- }
2110
- }
2111
- return normalizeAnthropicTokenPayload({
2112
- payload,
2113
- baseCredential: {
2114
- ...credential,
2115
- ...Object.keys(updatedMetadata).length > 0 ? { metadata: updatedMetadata } : { metadata: void 0 }
2116
- },
2117
- now,
2118
- // 显式声明是刷新:grantedAt 必须沿用已存值,绝不因为「这次拿到了新 token」
2119
- // 就把 30 天寿命重新起算——refresh 轮换不延长 grant 家族寿命。
2120
- isInitialLogin: false
2121
- });
2122
- }
2123
- var anthropicRefresh = refreshAnthropicToken;
2124
-
2125
1569
  // packages/cli/oauth/serverSyncConfig.ts
2126
1570
  function resolveServerSyncConfig() {
2127
1571
  const envServer = process.env.NOLO_SERVER?.trim() || process.env.NOLO_SERVER_URL?.trim() || process.env.BASE_URL?.trim() || "";
@@ -2464,12 +1908,6 @@ export {
2464
1908
  buildWindowTitle,
2465
1909
  wrapTextToLines,
2466
1910
  startCallbackServer,
2467
- fetchAntigravityAvailableModels,
2468
- runAntigravityOAuthLogin,
2469
- refreshAntigravityOAuthToken,
2470
- resolveClaudeCodeVersion,
2471
- getClaudeCodeUserAgent,
2472
- adoptRequiredClaudeCodeVersion,
2473
1911
  renderDeviceCodeDisplay,
2474
1912
  generatePkcePair,
2475
1913
  runOpenAiCodexDeviceCode,
@@ -2492,16 +1930,6 @@ export {
2492
1930
  readJsonBody,
2493
1931
  xaiOAuthDiscovery,
2494
1932
  xaiRefresh,
2495
- ANTHROPIC_OAUTH_CLIENT_ID,
2496
- ANTHROPIC_OAUTH_AUTHORIZE_URL,
2497
- ANTHROPIC_OAUTH_TOKEN_URL,
2498
- ANTHROPIC_OAUTH_CALLBACK_PORT,
2499
- ANTHROPIC_OAUTH_REDIRECT_URI,
2500
- ANTHROPIC_OAUTH_SCOPES,
2501
- anthropicGrantRemainingMs,
2502
- fetchAnthropicBootstrapIdentity,
2503
- normalizeAnthropicTokenPayload,
2504
- anthropicRefresh,
2505
1933
  CURSOR_LOGIN_URL,
2506
1934
  CURSOR_POLL_URL,
2507
1935
  CURSOR_POLL_MAX_ATTEMPTS,