nolo-cli 0.226.0-alpha.1 → 0.226.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 (259) hide show
  1. package/README.md +3 -5
  2. package/{_executeModel-UE2NJPZD.js → _executeModel-IZ2MCXHO.js} +89 -83
  3. package/{action-CK64LS6S.js → action-VDEW6WLI.js} +9 -6
  4. package/{addContentAction-EQXMFNPR.js → addContentAction-7YVXHIPQ.js} +15 -14
  5. package/{addDialogAgentAction-RSDZDASD.js → addDialogAgentAction-BX7B47HF.js} +18 -17
  6. package/{agentDeleteCommand-SOI25WK7.js → agentDeleteCommand-N7ELXPLD.js} +145 -138
  7. package/{agentEmailCommands-UGWQQNKM.js → agentEmailCommands-OFS477PV.js} +144 -133
  8. package/{agentFavoriteCommands-2LKGKSUD.js → agentFavoriteCommands-7LOP3HUD.js} +5 -5
  9. package/{agentGrantCommands-QQV4N4JW.js → agentGrantCommands-L6O2HVJI.js} +5 -5
  10. package/agentListCommands-IQQHJSXP.js +644 -0
  11. package/{agentMachineCommands-M6IKO7XE.js → agentMachineCommands-NS65BEW7.js} +75 -66
  12. package/{agentProviderCommands-7BSJH7TO.js → agentProviderCommands-SS6M6VGY.js} +6 -6
  13. package/{agentPullCommand-XN6ZPBUW.js → agentPullCommand-QQQZSC6S.js} +6 -6
  14. package/agentRecordCommands-4VE7CNLC.js +188 -0
  15. package/agentRunCommand-2MUXHKNW.js +223 -0
  16. package/{agentRunControl-DFEEOFC7.js → agentRunControl-55GL6Q3M.js} +23 -15
  17. package/{agentRuntimeLocal-GSTYFEX4.js → agentRuntimeLocal-5DB2P4MU.js} +63 -49
  18. package/{agentSlice-7PTNWEED.js → agentSlice-5VTAFG43.js} +19 -18
  19. package/{appDeleteCommands-L7HL4AWF.js → appDeleteCommands-EDKUPHJM.js} +67 -58
  20. package/{appDeployCommands-SGSUNFZR.js → appDeployCommands-JO74GW4L.js} +67 -58
  21. package/{appDeployStatusCommands-AAA3XD54.js → appDeployStatusCommands-U77ZUHX7.js} +67 -58
  22. package/{appGetCommands-LN72GAOA.js → appGetCommands-QCMHBYPX.js} +67 -58
  23. package/{appListCommands-IJQQ3VND.js → appListCommands-ZQJYEXI6.js} +67 -58
  24. package/{authCommand-7JXW54U4.js → authCommand-W4KXRZLI.js} +33 -28
  25. package/{authCommands-YDNAIDEY.js → authCommands-6AUYO65N.js} +15 -10
  26. package/{builtinSkillRegistry-PXH7EGQB.js → builtinSkillRegistry-GHE3RD3V.js} +8 -8
  27. package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
  28. package/{chromeOpsCommands-YKX2QX3A.js → chromeOpsCommands-TBPM6MR4.js} +6 -6
  29. package/{chunk-7Z6EW7AH.js → chunk-247AAJRK.js} +13 -6
  30. package/{chunk-P2ZLUIW2.js → chunk-2BSLGODA.js} +350 -25
  31. package/{chunk-4HFTBHBF.js → chunk-2N4UBHUU.js} +8 -8
  32. package/chunk-2SXN7LAY.js +15 -0
  33. package/{chunk-GSAS72AN.js → chunk-2T5BHLID.js} +2871 -1565
  34. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  35. package/{chunk-VFBVA3U2.js → chunk-3OQFXODL.js} +131 -40
  36. package/{chunk-BGGHA5DV.js → chunk-3ORFJP2Z.js} +1 -1
  37. package/{chunk-OWH2BLNU.js → chunk-3UNAGTBW.js} +32 -95
  38. package/{chunk-LM2PS3YS.js → chunk-4F7SWSWO.js} +26 -13
  39. package/{chunk-SBVTHMEG.js → chunk-4FE3IWRE.js} +1 -1
  40. package/{chunk-GOAPXKQU.js → chunk-4UK6UBXF.js} +4 -4
  41. package/{chunk-4JVNURX4.js → chunk-4YFC3DWW.js} +68 -16
  42. package/chunk-4ZCTKB27.js +31 -0
  43. package/chunk-53W5BXLN.js +340 -0
  44. package/{chunk-TD6QCQ5G.js → chunk-5GRWWUB4.js} +4 -4
  45. package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
  46. package/{chunk-ZH6MUQEO.js → chunk-6326DRQY.js} +1 -1
  47. package/{chunk-AVHRSJUH.js → chunk-6MQWGA5F.js} +31 -24
  48. package/{chunk-67BE44IS.js → chunk-6MX6S6TE.js} +3 -3
  49. package/chunk-6RSNVJGO.js +279 -0
  50. package/{chunk-BRW24CTE.js → chunk-6S6CZUXK.js} +42 -33
  51. package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
  52. package/{chunk-CVS5IMJ5.js → chunk-6XLWUNZB.js} +25 -25
  53. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  54. package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
  55. package/{chunk-6J4TTPS2.js → chunk-7AWKDRXG.js} +5 -5
  56. package/{chunk-3KNEE64G.js → chunk-7GTXPS3D.js} +16 -16
  57. package/{chunk-FS3RA7D2.js → chunk-7HUHOCIY.js} +147 -162
  58. package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
  59. package/chunk-BEM6LPD2.js +734 -0
  60. package/{chunk-AGP3YSEC.js → chunk-BH7CEVOH.js} +46 -1
  61. package/chunk-BIDSIRTS.js +307 -0
  62. package/{chunk-VTW7VKZX.js → chunk-C4KX626C.js} +15 -15
  63. package/chunk-C5A54QS7.js +108 -0
  64. package/{chunk-4PMZVBDU.js → chunk-CHYYSFFM.js} +6 -6
  65. package/{chunk-VREDDN25.js → chunk-CJTB3OYB.js} +14 -9
  66. package/{chunk-YFLVRVYK.js → chunk-DLT2DN4M.js} +1 -1
  67. package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
  68. package/{chunk-EOWLBDY6.js → chunk-DOK7GDRU.js} +1 -1
  69. package/{chunk-5NC6A2RZ.js → chunk-DPAIQLAL.js} +105 -102
  70. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  71. package/{chunk-XN23AUVU.js → chunk-EKXPHL7M.js} +8 -5
  72. package/{chunk-DISQCYPE.js → chunk-ENYTIRIO.js} +6 -6
  73. package/{chunk-2TIQO6TC.js → chunk-ER3P6MBT.js} +206 -308
  74. package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
  75. package/{chunk-JM5C4EUA.js → chunk-F4MCAOWN.js} +6 -6
  76. package/chunk-FDZ2GBWO.js +166 -0
  77. package/{chunk-PMDVQBGA.js → chunk-GAHJLSDO.js} +14 -7
  78. package/{chunk-N5PQJKCY.js → chunk-GES5GIAU.js} +14 -13
  79. package/{chunk-HYHIAM6T.js → chunk-HQVNO7FH.js} +66 -35
  80. package/chunk-HSWEFHFS.js +103 -0
  81. package/{chunk-S2NTVGA2.js → chunk-I2OYPD3Y.js} +1 -1
  82. package/{chunk-F7DU25CE.js → chunk-IIG3TT73.js} +460 -123
  83. package/{chunk-AK5O76CC.js → chunk-IZJFTY4R.js} +3 -3
  84. package/{chunk-2VA6TU4I.js → chunk-J25ESVUW.js} +22 -19
  85. package/{chunk-TUIWP2LF.js → chunk-J2XZZXIH.js} +4 -4
  86. package/{chunk-JVRQ6YVK.js → chunk-JBWXPACD.js} +1 -1
  87. package/{chunk-D726I5AZ.js → chunk-JVJ53XCH.js} +2 -2
  88. package/{chunk-TXGQ4O5S.js → chunk-KC2QVCI7.js} +20 -174
  89. package/{chunk-UKS7D2NL.js → chunk-KF2DWSAH.js} +113 -28
  90. package/chunk-KK3FCYZM.js +647 -0
  91. package/{chunk-ZZ4M2I3R.js → chunk-KLD7K5FD.js} +349 -16
  92. package/{chunk-JIADJPUV.js → chunk-KMW5CRRM.js} +1564 -2955
  93. package/{chunk-N5Z2V73W.js → chunk-LELADM5Q.js} +1 -1
  94. package/{chunk-4NA3YTBC.js → chunk-LMFMV5UC.js} +8 -8
  95. package/{chunk-KZU52OJ5.js → chunk-LZOOUQAZ.js} +6 -6
  96. package/{chunk-VV7TXWOC.js → chunk-M5EA44QU.js} +6 -6
  97. package/{chunk-UYOICCYG.js → chunk-MEDPR36J.js} +64 -89
  98. package/chunk-MFXJY44K.js +133 -0
  99. package/chunk-MVOZ22RZ.js +26 -0
  100. package/{chunk-3QFLXA24.js → chunk-N6EN3HK3.js} +3 -3
  101. package/{chunk-SOF4OWDM.js → chunk-NEG5LYK5.js} +1 -3
  102. package/{chunk-HJAO2NAL.js → chunk-ODGSLWLO.js} +593 -370
  103. package/{chunk-OB6DVWPF.js → chunk-OGZE6BZG.js} +331 -99
  104. package/{chunk-KYH7XW3K.js → chunk-OJRTTERA.js} +77 -2
  105. package/{chunk-2VUZSVAS.js → chunk-OKPC4QNX.js} +57 -20
  106. package/{chunk-SOG7OEXX.js → chunk-ONFFUQYM.js} +1 -1
  107. package/{chunk-KNIIRXHF.js → chunk-P244EH4W.js} +46 -8
  108. package/chunk-P27E22MA.js +203 -0
  109. package/{chunk-YDBMZ7FV.js → chunk-PK7VT4ZU.js} +3 -3
  110. package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
  111. package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
  112. package/{chunk-5RKUPJYL.js → chunk-QLUYDJST.js} +11 -3
  113. package/{chunk-EVPIBQ5I.js → chunk-QUJKDFZW.js} +17 -17
  114. package/{chunk-C4VAR65S.js → chunk-QXUVCIPB.js} +204 -124
  115. package/{chunk-X4OVEYPX.js → chunk-QYNABNNQ.js} +13 -13
  116. package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
  117. package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
  118. package/{chunk-KC4SCKXO.js → chunk-RGUWOMXU.js} +1234 -1451
  119. package/{chunk-IZIN2UNJ.js → chunk-RH44TIHX.js} +206 -27
  120. package/{chunk-GNHMRBYZ.js → chunk-RIMFTQMC.js} +282 -58
  121. package/{chunk-VQUWV3YR.js → chunk-S25VJYXV.js} +9 -3
  122. package/{chunk-X7YC2OHB.js → chunk-SBRJOYND.js} +723 -355
  123. package/{chunk-UEKXWO7A.js → chunk-SBRSXY67.js} +18 -7
  124. package/chunk-SR4FE5VD.js +9 -0
  125. package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
  126. package/chunk-T3WSFTBS.js +62 -0
  127. package/{chunk-KEN3N2TN.js → chunk-TB5KTLNB.js} +15 -12
  128. package/{chunk-VP3BINY7.js → chunk-TOK555CQ.js} +31 -1
  129. package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
  130. package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
  131. package/{chunk-GGKNJ42M.js → chunk-UDT4SI37.js} +18 -108
  132. package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
  133. package/{chunk-GVGOEMNV.js → chunk-UQXOORR3.js} +5 -5
  134. package/{chunk-GS4OTYCH.js → chunk-UR7555FE.js} +9 -9
  135. package/{chunk-QLFCTYRH.js → chunk-UWOCASVL.js} +20 -13
  136. package/{chunk-C4WTX5TU.js → chunk-V2V5Q6DU.js} +2 -2
  137. package/{chunk-2ZKFCIJJ.js → chunk-VCU5GV42.js} +1 -1
  138. package/{chunk-FTQWYWUI.js → chunk-VMWY7TUA.js} +1 -1
  139. package/chunk-VNALJT32.js +33394 -0
  140. package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
  141. package/chunk-WBSJAIZP.js +170 -0
  142. package/chunk-WDWZPASX.js +29 -0
  143. package/chunk-WFGNWWJI.js +326 -0
  144. package/{chunk-UJKTI5PG.js → chunk-WRKMXMU7.js} +2 -1
  145. package/chunk-WVOZ35E4.js +1438 -0
  146. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  147. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  148. package/{chunk-GIABSSWQ.js → chunk-XDNXKFWF.js} +6 -6
  149. package/{chunk-GBZ4YKEO.js → chunk-XLN2GD6Z.js} +7 -7
  150. package/{chunk-45LZIYXB.js → chunk-XNEDFWT4.js} +2 -2
  151. package/{chunk-EWPDMS4N.js → chunk-Y22P6ASC.js} +32 -17
  152. package/{chunk-LJSNEV7M.js → chunk-Y3DOUQQQ.js} +8 -8
  153. package/{chunk-KOXKKHFE.js → chunk-Y5EBOURK.js} +10 -5
  154. package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
  155. package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
  156. package/{chunk-PVZY6P3S.js → chunk-YTEY27GN.js} +2 -2
  157. package/chunk-YUZ2DAIH.js +34 -0
  158. package/chunk-Z6YTCDU4.js +24 -0
  159. package/{chunk-MOMR7NMG.js → chunk-ZCVBIIUE.js} +4 -4
  160. package/{chunk-AZQZ5XPM.js → chunk-ZCZLTJEW.js} +98 -57
  161. package/{chunk-KN3HEZIQ.js → chunk-ZVOL2MAJ.js} +1 -1
  162. package/{cliAgentConfigHelpers-KICKKNYQ.js → cliAgentConfigHelpers-6OFDHJFT.js} +13 -13
  163. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
  164. package/{cliEnvHelpers-VPSJ4XWC.js → cliEnvHelpers-CNMP3RDX.js} +1 -1
  165. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  166. package/cliLocalAgentRecordReader-FHIMCBUK.js +102 -0
  167. package/{commandRegistry-XSMTI5PG.js → commandRegistry-OKIWAJIS.js} +113 -101
  168. package/{contentThunks-S4NNC7R2.js → contentThunks-VF2DCU46.js} +41 -38
  169. package/{cooldownCommands-X7P5M2V5.js → cooldownCommands-QL6DWGVU.js} +4 -4
  170. package/{createAgentAutomationAction-TH7ZEACJ.js → createAgentAutomationAction-BGET7Q6K.js} +41 -38
  171. package/{createDialogAction-SYZAYIIQ.js → createDialogAction-XYDQZETK.js} +42 -40
  172. package/{createPageAction-7Y4U6TXO.js → createPageAction-74S5RO7U.js} +46 -43
  173. package/{db-CS4ZJQKV.js → db-6NRZLEW2.js} +10 -7
  174. package/{dbSlice-ZJPDIFER.js → dbSlice-FI7VNDR5.js} +14 -13
  175. package/{deleteFile-Q3YDB4ML.js → deleteFile-GD62MPZW.js} +10 -7
  176. package/{dialogCommands-V5IYEOQP.js → dialogCommands-Y6DHZUAM.js} +71 -64
  177. package/dialogMessageRecord-OAV77LT7.js +7 -0
  178. package/{dialogNotifyCommand-77B57PL6.js → dialogNotifyCommand-MKXL4NGL.js} +15 -15
  179. package/{dialogSlice-O3RHDAWK.js → dialogSlice-XAUKSWZ4.js} +41 -38
  180. package/{dialogUsageCommand-HTVPR2CX.js → dialogUsageCommand-BZPKR3DW.js} +6 -6
  181. package/{docCreateCommands-36WS33BK.js → docCreateCommands-PHDFOQBM.js} +66 -57
  182. package/{docDeleteCommands-C4CS4XLF.js → docDeleteCommands-OSHJM67Y.js} +69 -60
  183. package/{docReadCommands-QZMSFMPN.js → docReadCommands-E6QYCFMS.js} +66 -57
  184. package/{docStore-PYNEODAH.js → docStore-ZZT2BEBU.js} +16 -15
  185. package/{docUpdateCommands-BYI64HVV.js → docUpdateCommands-DHIOPK2C.js} +66 -57
  186. package/fetchMessages-TQEUZD7H.js +2 -2
  187. package/{getPricing-VNGFM4PN.js → getPricing-RNRITFOP.js} +6 -6
  188. package/{handleSendMessageAction-Z43FP2E2.js → handleSendMessageAction-ARUU6CNF.js} +83 -78
  189. package/{hostCredentialCreate-Y7YIGKP4.js → hostCredentialCreate-SNQT73H4.js} +131 -119
  190. package/index.js +56 -18
  191. package/keys-RWF7UCB4.js +1 -1
  192. package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
  193. package/{localDialogRead-SVTPA5GY.js → localDialogRead-3T2KMCRC.js} +1 -1
  194. package/{localRuntimeAdapter-ZLJONQZS.js → localRuntimeAdapter-MHI6Y2IZ.js} +143 -130
  195. package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-7DKIT7UH.js} +4 -2
  196. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
  197. package/{machineCommands-4ZLMRIA3.js → machineCommands-3O6Y27R4.js} +283 -348
  198. package/machineWsRunDispatch-5PFLR5XC.js +203 -0
  199. package/markdownToSlate-KIYM7B3P.js +8 -0
  200. package/mcpLocalAuthorizeCommand-BQCQ2KRJ.js +106 -0
  201. package/{memberThunks-JRYNONYV.js → memberThunks-TU6A6OBV.js} +24 -19
  202. package/{memoryCommands-5WC3T66U.js → memoryCommands-BC6REPQB.js} +4 -4
  203. package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
  204. package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
  205. package/package.json +1 -1
  206. package/{projectArchive-JBX6HNK6.js → projectArchive-X2EVXU3N.js} +47 -44
  207. package/{providerPresetApply-J3WMRPD2.js → providerPresetApply-HUWNV2NI.js} +7 -7
  208. package/{providerRegistry-KJGB5XWS.js → providerRegistry-7FWKDKZJ.js} +7 -7
  209. package/{read-Q7GOHGNP.js → read-QAHEQID5.js} +9 -8
  210. package/{readDocTool-Z5OQ6422.js → readDocTool-KG5DP6EM.js} +1 -1
  211. package/{readlineWorkspace-WFPIAAAT.js → readlineWorkspace-SO3APHVP.js} +8125 -6196
  212. package/rememberExplicit-CPAPONSI.js +15 -0
  213. package/{removeDialogAgentAction-U3F2MNAY.js → removeDialogAgentAction-QZCCVK2G.js} +20 -19
  214. package/{runAgentClientLoop-STI5TKDJ.js → runAgentClientLoop-FLHHCOVH.js} +106 -81
  215. package/{runtimeDoctorCommands-UXKXYBW6.js → runtimeDoctorCommands-DN3I52C6.js} +17 -17
  216. package/{secretCommands-LJXOOYA7.js → secretCommands-36BCE3UE.js} +4 -4
  217. package/{setDialogExtraReferencesAction-G3WSJ7EM.js → setDialogExtraReferencesAction-PDPTYSEW.js} +17 -16
  218. package/{setPrimaryDialogAgentAction-6FHAHZBB.js → setPrimaryDialogAgentAction-DOUIPR66.js} +20 -19
  219. package/{settingThunks-AXTBX3Q5.js → settingThunks-MHGGP6UE.js} +186 -67
  220. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
  221. package/{spaceCommands-GUKMDRWN.js → spaceCommands-JH7UYE3K.js} +70 -61
  222. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  223. package/{streamAgentChatTurn-A2WL5OOF.js → streamAgentChatTurn-VDDA2TX6.js} +200 -195
  224. package/{switchDialogAgentAction-UOFIAGPL.js → switchDialogAgentAction-7USK3DAP.js} +18 -17
  225. package/{tableCommands-HITDSLHS.js → tableCommands-UONBFC7L.js} +15 -12
  226. package/{toolApiClient-OGQEBQVX.js → toolApiClient-53YMJ2G6.js} +8 -6
  227. package/{tools-6NU5E6BN.js → tools-MIOCXKMG.js} +72 -68
  228. package/tuiRestart-ET3QISZ5.js +41 -0
  229. package/{tuiSummaryLlmCaller-7WLUKNP2.js → tuiSummaryLlmCaller-MSINBP3M.js} +21 -20
  230. package/{updateCommands-RJVCRSBP.js → updateCommands-5OYND6EF.js} +8 -6
  231. package/{updateDialogTitleAction-VMKU2Y67.js → updateDialogTitleAction-2L4CC4YO.js} +43 -40
  232. package/{usageCommand-YPJ2ZI2F.js → usageCommand-JTKDAG6I.js} +3 -3
  233. package/{usageRebuildCommand-FERQO74C.js → usageRebuildCommand-4TFZCKXM.js} +4 -4
  234. package/webapi-24RZDIIQ.js +2488 -0
  235. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
  236. package/workContext-Y3ADAPZU.js +14 -0
  237. package/workContextAccess-UZHDLBUR.js +11 -0
  238. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  239. package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-ZCSQCHG3.js} +9 -9
  240. package/agentListCommands-YBNOQ5T3.js +0 -991
  241. package/agentRecordCommands-3HL7Z4X6.js +0 -177
  242. package/agentRunCommand-C64A6MPL.js +0 -208
  243. package/chunk-2THCNKE4.js +0 -147
  244. package/chunk-2WZXXAQD.js +0 -57
  245. package/chunk-5ZMIIR23.js +0 -265
  246. package/chunk-652XYZGP.js +0 -352
  247. package/chunk-BJF2MHJ3.js +0 -118
  248. package/chunk-KEPOVMF4.js +0 -91
  249. package/chunk-QVBXJNZ2.js +0 -81
  250. package/chunk-QZI44GWV.js +0 -776
  251. package/cliLocalAgentRecordReader-6FXGFBI3.js +0 -90
  252. package/machineWsRunDispatch-L7Z3ULDF.js +0 -192
  253. package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
  254. package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
  255. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  256. package/{chunk-SNBZZPYH.js → chunk-OQHIVPG4.js} +3 -3
  257. package/{chunk-47ITIXO7.js → chunk-USGHJSGO.js} +3 -3
  258. package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
  259. package/{offlineMarxistsAgentCommand-4IC3Y4C6.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +3 -3
@@ -10,7 +10,7 @@ import {
10
10
  resolvePlatformEffectiveModel,
11
11
  toCnyCredits,
12
12
  zaiModels
13
- } from "./chunk-OBSEKCVK.js";
13
+ } from "./chunk-U4VSBDO5.js";
14
14
 
15
15
  // packages/integrations/qwen/models.ts
16
16
  var qwenModels = [
@@ -2708,6 +2708,26 @@ var GPT_6_ASTRA_LONG_CONTEXT_PRICE = {
2708
2708
  output: 600,
2709
2709
  inputCacheHit: 16
2710
2710
  };
2711
+ var GPT_6_2_ASTRA_STANDARD_PRICE = {
2712
+ input: 64,
2713
+ output: 320,
2714
+ inputCacheHit: 3.2
2715
+ };
2716
+ var GPT_6_2_ASTRA_LONG_CONTEXT_PRICE = {
2717
+ input: 128,
2718
+ output: 480,
2719
+ inputCacheHit: 6.4
2720
+ };
2721
+ var GPT_6_2_SOL_STANDARD_PRICE = {
2722
+ input: 16,
2723
+ output: 80,
2724
+ inputCacheHit: 0.8
2725
+ };
2726
+ var GPT_6_2_SOL_LONG_CONTEXT_PRICE = {
2727
+ input: 32,
2728
+ output: 120,
2729
+ inputCacheHit: 1.6
2730
+ };
2711
2731
  var openAIModels = [
2712
2732
  {
2713
2733
  name: "gpt-5.5",
@@ -2779,6 +2799,44 @@ var openAIModels = [
2779
2799
  supportsReasoningEffort: true,
2780
2800
  price: GPT_5_6_LUNA_PRICE
2781
2801
  },
2802
+ {
2803
+ name: "gpt-6.2-astra",
2804
+ displayName: "GPT-6.2 Astra",
2805
+ endpointKey: "responses",
2806
+ hasVision: true,
2807
+ contextWindow: 105e4,
2808
+ maxOutputTokens: 128e3,
2809
+ supportsReasoningEffort: true,
2810
+ price: GPT_6_2_ASTRA_STANDARD_PRICE,
2811
+ pricingStrategy: {
2812
+ type: "tiered_context",
2813
+ tiers: [
2814
+ {
2815
+ minContext: 272001,
2816
+ price: GPT_6_2_ASTRA_LONG_CONTEXT_PRICE
2817
+ }
2818
+ ]
2819
+ }
2820
+ },
2821
+ {
2822
+ name: "gpt-6.2-sol",
2823
+ displayName: "GPT-6.2 Sol",
2824
+ endpointKey: "responses",
2825
+ hasVision: true,
2826
+ contextWindow: 105e4,
2827
+ maxOutputTokens: 128e3,
2828
+ supportsReasoningEffort: true,
2829
+ price: GPT_6_2_SOL_STANDARD_PRICE,
2830
+ pricingStrategy: {
2831
+ type: "tiered_context",
2832
+ tiers: [
2833
+ {
2834
+ minContext: 272001,
2835
+ price: GPT_6_2_SOL_LONG_CONTEXT_PRICE
2836
+ }
2837
+ ]
2838
+ }
2839
+ },
2782
2840
  {
2783
2841
  name: "gpt-6-astra",
2784
2842
  displayName: "GPT-6 Astra",
@@ -3027,6 +3085,15 @@ function getCachedOpenRouterModelReasoning(modelId) {
3027
3085
  var GATEWAY_PROVIDERS = /* @__PURE__ */ new Set(["openrouter", "nolo"]);
3028
3086
  var THINKING_MECHANISM_PROVIDERS = /* @__PURE__ */ new Set(["anthropic", "google"]);
3029
3087
  var MODEL_REASONING_OVERRIDES = [
3088
+ // Platform GPT models accept medium even though the nolo provider fallback
3089
+ // describes DeepSeek's narrower low/high/max scale.
3090
+ ...["gpt-6.2-sol", "gpt-6.2-astra", "gpt-6.1-sol", "gpt-6.1-terra", "gpt-6-luna", "gpt-6-astra"].map((prefix) => ({
3091
+ providers: ["openai"],
3092
+ prefix,
3093
+ exact: true,
3094
+ efforts: ["none", "low", "medium", "high", "xhigh", "max"],
3095
+ note: "GPT-6 model-specific reasoning scale (platformHosted.ts model metadata)"
3096
+ })),
3030
3097
  // ---- OpenAI ----
3031
3098
  {
3032
3099
  providers: ["openai"],
@@ -3228,6 +3295,8 @@ function resolveModelReasoningCapabilityWithCache(provider, model) {
3228
3295
  // packages/ai/llm/reasoningModels.ts
3229
3296
  var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
3230
3297
  "deepseek-flash",
3298
+ "deepseek-v4-flash",
3299
+ "deepseek-v4.1-flash",
3231
3300
  "deepseek-v4-pro",
3232
3301
  "gemini-3.7-flash",
3233
3302
  "gemini-3.8-flash",
@@ -3238,6 +3307,8 @@ var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
3238
3307
  "gemini-3-pro-preview",
3239
3308
  "gemini-3.1-pro-preview",
3240
3309
  "gpt-5.5-pro",
3310
+ "gpt-6.2-astra",
3311
+ "gpt-6.2-sol",
3241
3312
  "gpt-6-astra",
3242
3313
  "gpt-6.1-sol",
3243
3314
  "gpt-6.1-terra",
@@ -3266,7 +3337,10 @@ var isModelSupportReasoningEffort = (model, provider) => {
3266
3337
  if (provider && provider.toLowerCase() === "openrouter") {
3267
3338
  return true;
3268
3339
  }
3269
- return REASONING_MODEL_NAMES.has(model);
3340
+ const p = provider?.toLowerCase();
3341
+ const base = model.toLowerCase().split("/").pop() ?? "";
3342
+ const deepseekFlash = ["deepseek-flash", "deepseek-v4-flash", "deepseek-v4.1-flash"].includes(base);
3343
+ return REASONING_MODEL_NAMES.has(model) || deepseekFlash && ["commandcode", "opendesign", "ollama-cloud", "lithosai"].includes(p ?? "");
3270
3344
  };
3271
3345
  var supportedReasoningModels = Array.from(REASONING_MODEL_NAMES);
3272
3346
  var EFFORT_ORDER = [
@@ -3612,6 +3686,7 @@ export {
3612
3686
  commandCodeModels,
3613
3687
  opencodeGoModels,
3614
3688
  DEFAULT_REASONING_EFFORT,
3689
+ resolveModelReasoningCapability,
3615
3690
  resolveModelReasoningCapabilityWithCache,
3616
3691
  isModelSupportReasoningEffort,
3617
3692
  clampReasoningEffort,
@@ -8,11 +8,13 @@ import {
8
8
  noloUploadRequest,
9
9
  noloWriteRequest,
10
10
  syncWithServers
11
- } from "./chunk-7Z6EW7AH.js";
11
+ } from "./chunk-247AAJRK.js";
12
12
  import {
13
13
  getAllServers,
14
- getIsDesktopApp
15
- } from "./chunk-AGP3YSEC.js";
14
+ getIsDesktopApp,
15
+ googleSessionServer,
16
+ scopeGoogleSessionServers
17
+ } from "./chunk-BH7CEVOH.js";
16
18
  import {
17
19
  selectIdentityToken,
18
20
  selectIdentityUser,
@@ -21,12 +23,6 @@ import {
21
23
  import {
22
24
  isTombstoneRecord
23
25
  } from "./chunk-BV3FLP2L.js";
24
- import {
25
- asTrimmedString
26
- } from "./chunk-3EUW3WEO.js";
27
- import {
28
- isRecord
29
- } from "./chunk-KUG52IAP.js";
30
26
  import {
31
27
  asOptionalPositiveFiniteNumber
32
28
  } from "./chunk-U6VC4MU4.js";
@@ -34,6 +30,12 @@ import {
34
30
  SERVERS,
35
31
  normalizeKnownServerOrigin
36
32
  } from "./chunk-LCBAMY2M.js";
33
+ import {
34
+ asTrimmedString
35
+ } from "./chunk-3EUW3WEO.js";
36
+ import {
37
+ isRecord
38
+ } from "./chunk-KUG52IAP.js";
37
39
  import {
38
40
  asOptionalTrimmedString
39
41
  } from "./chunk-G3SUCT4W.js";
@@ -88,8 +90,8 @@ var selectRuntimeSnapshot = createSelector(
88
90
  (currentToken, currentUserId, currentServer, syncServers, localRuntimeOrigin) => ({
89
91
  currentToken,
90
92
  currentUserId,
91
- currentServer,
92
- syncServers,
93
+ currentServer: googleSessionServer(currentToken, currentServer) ?? currentServer,
94
+ syncServers: googleSessionServer(currentToken, currentServer) === void 0 ? syncServers : [],
93
95
  localRuntimeOrigin
94
96
  })
95
97
  );
@@ -99,7 +101,7 @@ var selectRuntimeCurrentServer = createSelector(
99
101
  );
100
102
  var selectRuntimeRemoteServers = createSelector(
101
103
  [selectRuntimeSnapshot],
102
- (runtime) => getAllServers(runtime.currentServer, runtime.syncServers)
104
+ (runtime) => scopeGoogleSessionServers(runtime.currentToken, runtime.currentServer, getAllServers(runtime.currentServer, runtime.syncServers))
103
105
  );
104
106
 
105
107
  // packages/database/runtimeServerContext.ts
@@ -116,11 +118,11 @@ var getRuntimeServerContext = (state, preferredServerOrigin) => {
116
118
  currentServer,
117
119
  syncServers,
118
120
  userAuthorityRegistry: resolveRuntimeUserAuthorityRegistry(state),
119
- remoteServers: getAllServers(
121
+ remoteServers: scopeGoogleSessionServers(currentToken, currentServer, getAllServers(
120
122
  currentServer,
121
123
  syncServers,
122
124
  preferredServerOrigin
123
- )
125
+ ))
124
126
  };
125
127
  };
126
128
  var resolveRuntimeUserAuthorityRegistry = (state) => {
@@ -173,6 +175,18 @@ var resolveCandidateOwnerFromKeyRemainder = (remainder, candidateOwnerUserIds) =
173
175
  }
174
176
  return null;
175
177
  };
178
+ var isMalformedAgentAutomationKey = (dbKey) => {
179
+ const normalized = cleanSegment(dbKey);
180
+ if (!normalized) return false;
181
+ if (normalized !== "agent-automation" && !normalized.startsWith("agent-automation-")) {
182
+ return false;
183
+ }
184
+ const parts = normalized.split("-");
185
+ if (parts[2] === "owner" && parts[3] === "idx") {
186
+ return parts.length < 5 || !cleanSegment(parts[4]) || !cleanSegment(parts[parts.length - 1]);
187
+ }
188
+ return parts.length < 4 || !cleanSegment(parts[2]) || !cleanSegment(parts[parts.length - 1]);
189
+ };
176
190
  var parseOwnerUserIdFromDbKey = (dbKey, options = {}) => {
177
191
  const normalized = cleanSegment(dbKey);
178
192
  if (!normalized) return null;
@@ -187,6 +201,29 @@ var parseOwnerUserIdFromDbKey = (dbKey, options = {}) => {
187
201
  }
188
202
  return null;
189
203
  }
204
+ if (prefix === "agent" && parts[1] === "automation") {
205
+ if (isMalformedAgentAutomationKey(normalized)) return null;
206
+ if (parts[2] === "owner" && parts[3] === "idx") {
207
+ const ownerAndRest3 = parts.slice(4).join("-");
208
+ const candidateOwner3 = resolveCandidateOwnerFromKeyRemainder(
209
+ ownerAndRest3,
210
+ options.candidateOwnerUserIds
211
+ );
212
+ if (candidateOwner3) return candidateOwner3;
213
+ const ownerUserId3 = cleanSegment(parts[4]);
214
+ if (!ownerUserId3 || PUBLIC_OWNER_SENTINELS.has(ownerUserId3)) return null;
215
+ return ownerUserId3;
216
+ }
217
+ const ownerAndRest2 = parts.slice(2).join("-");
218
+ const candidateOwner2 = resolveCandidateOwnerFromKeyRemainder(
219
+ ownerAndRest2,
220
+ options.candidateOwnerUserIds
221
+ );
222
+ if (candidateOwner2) return candidateOwner2;
223
+ const ownerUserId2 = cleanSegment(parts[2]);
224
+ if (!ownerUserId2 || PUBLIC_OWNER_SENTINELS.has(ownerUserId2)) return null;
225
+ return ownerUserId2;
226
+ }
190
227
  if (prefix === "dialog") {
191
228
  const messageSeparator = normalized.lastIndexOf("-msg-");
192
229
  if (messageSeparator !== -1) {
@@ -585,11 +622,11 @@ var resolveAuthorityReplicationServers = ({
585
622
  if (isDeviceLocalOwnerId(authority.ownerUserId) || isDeviceLocalOwnerId(record?.userId) || isDeviceLocalDbKey(dbKey)) {
586
623
  return [];
587
624
  }
588
- return planAuthorityReadServers({
625
+ return scopeGoogleSessionServers(selectIdentityToken(state), currentServer, planAuthorityReadServers({
589
626
  allServers,
590
627
  authorityServer: preferredServerOrigin ?? authority.authorityServer,
591
628
  serverOrigin: authority.serverOrigin
592
- });
629
+ }));
593
630
  };
594
631
  var scheduleWriteReplication = (servers, request, state) => {
595
632
  if (servers.length === 0) return null;
@@ -680,17 +717,17 @@ var resolveUploadReplicationServers = ({
680
717
  userAuthorityRegistry: state?.settings?.userAuthorityRegistry ?? selectIdentityUser(state)?.authorityRegistry
681
718
  });
682
719
  if (authority.ownerUserId || authority.authorityServer) {
683
- return planAuthorityReadServers({
720
+ return scopeGoogleSessionServers(selectIdentityToken(state), currentServer, planAuthorityReadServers({
684
721
  allServers,
685
722
  authorityServer: authority.authorityServer,
686
723
  serverOrigin: authority.serverOrigin
687
- });
724
+ }));
688
725
  }
689
- return resolveTenantReplicationServers({
726
+ return scopeGoogleSessionServers(selectIdentityToken(state), currentServer, resolveTenantReplicationServers({
690
727
  currentServer,
691
728
  syncServers,
692
729
  tenantId
693
- });
730
+ }));
694
731
  };
695
732
  var scheduleExistingRecordReplication = ({
696
733
  currentServer,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  describeAttachmentForModel
3
- } from "./chunk-LM2PS3YS.js";
3
+ } from "./chunk-4F7SWSWO.js";
4
4
 
5
5
  // packages/ai/attachments/projectUserPart.ts
6
6
  var isRecord = (value) => typeof value === "object" && value !== null;
@@ -1,19 +1,20 @@
1
1
  import {
2
2
  resolveAgentCallPlan
3
- } from "./chunk-DISQCYPE.js";
3
+ } from "./chunk-ENYTIRIO.js";
4
4
  import {
5
+ CUSTOM_API_KEY_TEMPLATES,
5
6
  SUBSCRIPTION_OAUTH_PROVIDERS
6
- } from "./chunk-EWPDMS4N.js";
7
+ } from "./chunk-Y22P6ASC.js";
7
8
  import {
8
9
  findModelConfig,
9
10
  getProviderByModelName
10
- } from "./chunk-KYH7XW3K.js";
11
- import {
12
- asTrimmedLowercaseString
13
- } from "./chunk-QSJ3HFEF.js";
11
+ } from "./chunk-OJRTTERA.js";
14
12
  import {
15
13
  asOptionalTrimmedString
16
14
  } from "./chunk-G3SUCT4W.js";
15
+ import {
16
+ asTrimmedLowercaseString
17
+ } from "./chunk-QSJ3HFEF.js";
17
18
 
18
19
  // packages/ai/llm/agentCapabilities.ts
19
20
  var ANTIGRAVITY_EFFORT_SUFFIXES = [
@@ -67,6 +68,29 @@ var lookupKnownModelVision = (provider, model) => {
67
68
  }
68
69
  return void 0;
69
70
  };
71
+ var endpointHost = (value) => {
72
+ const raw = asOptionalTrimmedString(value);
73
+ if (!raw) return void 0;
74
+ try {
75
+ return new URL(raw).host || void 0;
76
+ } catch {
77
+ return void 0;
78
+ }
79
+ };
80
+ var lookupPresetModelVision = (provider, model, customProviderUrl) => {
81
+ if (!model) return void 0;
82
+ const host = endpointHost(customProviderUrl);
83
+ if (!host) return void 0;
84
+ const candidates = [model, stripEffortSuffix(model), stripPreviewSuffix(model)];
85
+ for (const template of CUSTOM_API_KEY_TEMPLATES) {
86
+ if (endpointHost(template.baseUrl) !== host) continue;
87
+ const templateProvider = asTrimmedLowercaseString(template.provider);
88
+ if (provider && provider !== "custom" && templateProvider !== provider) continue;
89
+ const declared = (template.modelOptions ?? []).find((option) => candidates.includes(option.id))?.hasVision;
90
+ if (typeof declared === "boolean") return declared;
91
+ }
92
+ return void 0;
93
+ };
70
94
  var resolveCatalogImageSupport = (agent) => {
71
95
  const provider = asTrimmedLowercaseString(agent.provider) || asTrimmedLowercaseString(agent.apiSource) || null;
72
96
  const model = asOptionalTrimmedString(agent.model) ?? "";
@@ -83,12 +107,22 @@ var resolveCatalogImageSupport = (agent) => {
83
107
  });
84
108
  const catalogHasVision = authMethod.kind === "oauth" ? SUBSCRIPTION_OAUTH_PROVIDERS.find((entry) => entry.apiKeyRef === authMethod.ref)?.modelOptions.find(
85
109
  (entry) => [model, stripEffortSuffix(model), stripPreviewSuffix(model)].includes(entry.id)
86
- )?.hasVision : lookupKnownModelVision(provider, model);
110
+ )?.hasVision : lookupKnownModelVision(provider, model) ?? (authMethod.kind === "custom-key" ? lookupPresetModelVision(provider, model, agent.customProviderUrl) : void 0);
87
111
  return catalogHasVision;
88
112
  };
113
+ var liveImageSupport = Symbol("liveImageSupport");
114
+ function withLiveImageSupport(agent, supported) {
115
+ return { ...agent, [liveImageSupport]: { model: agent.model, supported } };
116
+ }
117
+ function readLiveImageSupport(agent) {
118
+ const evidence = agent[liveImageSupport];
119
+ if (!evidence || evidence.model !== agent.model) return void 0;
120
+ const plan = resolveAgentCallPlan({ ...agent, key: "" });
121
+ return plan.authMethod.kind === "oauth" && plan.authMethod.ref === "antigravity" ? evidence.supported : void 0;
122
+ }
89
123
  var resolveAgentImageInputSupport = (agent) => {
90
124
  if (!agent) return true;
91
- return resolveCatalogImageSupport(agent) ?? agent.hasVision ?? true;
125
+ return resolveCatalogImageSupport(agent) ?? readLiveImageSupport(agent) ?? agent.hasVision ?? true;
92
126
  };
93
127
  var resolveToolImagePolicy = (input) => {
94
128
  const maxImagesPerRequest = 4;
@@ -102,6 +136,8 @@ var resolveToolImagePolicy = (input) => {
102
136
  }
103
137
  const catalog = resolveCatalogImageSupport(input);
104
138
  if (catalog !== void 0) return { maxImagesPerRequest, supportsToolImages: catalog, reason: "catalog" };
139
+ const live = readLiveImageSupport(input);
140
+ if (live !== void 0) return { maxImagesPerRequest, supportsToolImages: live, reason: "live-discovery" };
105
141
  if (typeof input.hasVision === "boolean") {
106
142
  return { maxImagesPerRequest, supportsToolImages: input.hasVision, reason: "agent-declaration" };
107
143
  }
@@ -109,6 +145,8 @@ var resolveToolImagePolicy = (input) => {
109
145
  };
110
146
 
111
147
  export {
148
+ resolveCatalogImageSupport,
149
+ withLiveImageSupport,
112
150
  resolveAgentImageInputSupport,
113
151
  resolveToolImagePolicy
114
152
  };
@@ -0,0 +1,203 @@
1
+ import {
2
+ parseUserIdFromAuthToken,
3
+ resolveAuthToken,
4
+ resolveServerUrl
5
+ } from "./chunk-BIDSIRTS.js";
6
+
7
+ // packages/cli/subscriptionQuotaRefresh.ts
8
+ import {
9
+ mkdirSync,
10
+ readFileSync,
11
+ renameSync,
12
+ writeFileSync
13
+ } from "node:fs";
14
+ import { dirname, join } from "node:path";
15
+ var CATALOG_QUOTA_REFRESH_TIMEOUT_MS = 2e3;
16
+ var FRESH_QUOTA_TTL_MS = 45e3;
17
+ var CACHE_ENTRY_RETENTION_MS = 10 * 6e4;
18
+ var EMPTY_REFRESH_BACKOFF_MS = 5 * 6e4;
19
+ var lastRefreshEmptyAt = 0;
20
+ function hasPendingReset(quota, now) {
21
+ if (!quota || !Array.isArray(quota.windows)) return false;
22
+ const observedAt = typeof quota.observedAt === "number" && Number.isFinite(quota.observedAt) ? quota.observedAt : void 0;
23
+ return quota.windows.some((win) => {
24
+ if (typeof win?.resetAt !== "number" || !Number.isFinite(win.resetAt)) {
25
+ return false;
26
+ }
27
+ if (win.resetAt > now) return false;
28
+ if (observedAt !== void 0 && observedAt < win.resetAt) return true;
29
+ return typeof win.utilization === "number" && win.utilization >= 1 || win.remaining === 0;
30
+ });
31
+ }
32
+ function quotaSnapshotIsFresh(quota, now) {
33
+ const observedAt = quota?.observedAt;
34
+ if (typeof observedAt !== "number" || !Number.isFinite(observedAt)) return false;
35
+ if (now - observedAt >= FRESH_QUOTA_TTL_MS) return false;
36
+ return !hasPendingReset(quota, now);
37
+ }
38
+ function resolveQuotaCachePath(env, hasCustomFetch) {
39
+ const explicitNoloHome = env.NOLO_HOME?.trim();
40
+ const noloHome = explicitNoloHome || (!hasCustomFetch && env.HOME?.trim() ? `${env.HOME.trim()}/.nolo` : "");
41
+ return noloHome ? join(noloHome, "cache", "subscription-quota-refresh.json") : void 0;
42
+ }
43
+ function readQuotaDiskCache(cachePath) {
44
+ if (!cachePath) return {};
45
+ try {
46
+ const parsed = JSON.parse(readFileSync(cachePath, "utf8"));
47
+ return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
48
+ } catch {
49
+ return {};
50
+ }
51
+ }
52
+ function writeQuotaDiskCache(cachePath, cacheKey, quotas, wholeBatch, checkedKeys, now) {
53
+ if (!cachePath) return;
54
+ try {
55
+ const current = readQuotaDiskCache(cachePath);
56
+ const prevScope = current[cacheKey] ?? {};
57
+ const mergedQuotas = {};
58
+ for (const [k, v] of Object.entries(prevScope.quotas ?? {})) {
59
+ if (v && typeof v.observedAt === "number" && Number.isFinite(v.observedAt) && now - v.observedAt < CACHE_ENTRY_RETENTION_MS) {
60
+ mergedQuotas[k] = v;
61
+ }
62
+ }
63
+ for (const [k, v] of Object.entries(quotas)) {
64
+ if (v && Array.isArray(v.windows)) {
65
+ mergedQuotas[k] = v;
66
+ }
67
+ }
68
+ const prevBatchFresh = typeof prevScope.lastBatchRefreshAt === "number" && now - prevScope.lastBatchRefreshAt < FRESH_QUOTA_TTL_MS;
69
+ const mergedCheckedKeys = wholeBatch ? Array.from(
70
+ /* @__PURE__ */ new Set([
71
+ ...prevBatchFresh && Array.isArray(prevScope.checkedKeys) ? prevScope.checkedKeys : [],
72
+ ...checkedKeys
73
+ ])
74
+ ) : prevScope.checkedKeys;
75
+ current[cacheKey] = {
76
+ lastBatchRefreshAt: wholeBatch ? now : prevScope.lastBatchRefreshAt,
77
+ ...mergedCheckedKeys ? { checkedKeys: mergedCheckedKeys } : {},
78
+ quotas: mergedQuotas
79
+ };
80
+ mkdirSync(dirname(cachePath), { recursive: true });
81
+ const tmpPath = `${cachePath}.tmp-${process.pid}-${Date.now()}`;
82
+ writeFileSync(tmpPath, JSON.stringify(current), "utf8");
83
+ renameSync(tmpPath, cachePath);
84
+ } catch {
85
+ }
86
+ }
87
+ function pickNewerQuota(a, b) {
88
+ if (!a) return b;
89
+ if (!b) return a;
90
+ const ta = typeof a.observedAt === "number" && Number.isFinite(a.observedAt) ? a.observedAt : -1;
91
+ const tb = typeof b.observedAt === "number" && Number.isFinite(b.observedAt) ? b.observedAt : -1;
92
+ return tb > ta ? b : a;
93
+ }
94
+ async function refreshSubscriptionQuotas(args) {
95
+ const fresh = {};
96
+ try {
97
+ const now = Date.now();
98
+ const env = args.env ?? process.env;
99
+ const authToken = resolveAuthToken(args.cliArgs ?? [], env);
100
+ if (!authToken) return fresh;
101
+ const wholeBatch = !args.onlyKeys || args.onlyKeys.length === 0;
102
+ const serverUrl = resolveServerUrl(args.cliArgs ?? [], env);
103
+ const cachePath = resolveQuotaCachePath(
104
+ env,
105
+ Boolean(args.fetchImpl && args.fetchImpl !== fetch)
106
+ );
107
+ const userId = parseUserIdFromAuthToken(authToken) ?? "anon";
108
+ const cacheKey = `${serverUrl}::${userId}`;
109
+ const diskCache = !args.forceRefresh ? readQuotaDiskCache(cachePath) : {};
110
+ const scopeCache = diskCache[cacheKey];
111
+ const targetEntries = args.entries.filter(
112
+ (entry) => entry.probeable !== false && (!args.onlyKeys || args.onlyKeys.includes(entry.key))
113
+ );
114
+ const staleTargetKeys = [];
115
+ if (!args.forceRefresh) {
116
+ const batchWindowFresh = wholeBatch && typeof scopeCache?.lastBatchRefreshAt === "number" && now - scopeCache.lastBatchRefreshAt < FRESH_QUOTA_TTL_MS;
117
+ const checkedKeySet = batchWindowFresh ? new Set(Array.isArray(scopeCache?.checkedKeys) ? scopeCache.checkedKeys : []) : null;
118
+ for (const entry of targetEntries) {
119
+ const cachedQuota = scopeCache?.quotas?.[entry.key];
120
+ const bestQuota = pickNewerQuota(entry.quota, cachedQuota);
121
+ if (hasPendingReset(bestQuota, now)) {
122
+ staleTargetKeys.push(entry.key);
123
+ continue;
124
+ }
125
+ if (quotaSnapshotIsFresh(bestQuota, now)) {
126
+ if (cachedQuota && bestQuota === cachedQuota && (!entry.quota || typeof entry.quota.observedAt !== "number" || !Number.isFinite(entry.quota.observedAt) || cachedQuota.observedAt > entry.quota.observedAt)) {
127
+ fresh[entry.key] = cachedQuota;
128
+ }
129
+ continue;
130
+ }
131
+ if (checkedKeySet?.has(entry.key)) {
132
+ continue;
133
+ }
134
+ staleTargetKeys.push(entry.key);
135
+ }
136
+ if (staleTargetKeys.length === 0) return fresh;
137
+ if (wholeBatch && lastRefreshEmptyAt && now - lastRefreshEmptyAt < EMPTY_REFRESH_BACKOFF_MS) {
138
+ return fresh;
139
+ }
140
+ }
141
+ const requestAgentKeys = args.onlyKeys && args.onlyKeys.length > 0 ? args.onlyKeys : !args.forceRefresh && staleTargetKeys.length > 0 && staleTargetKeys.length < targetEntries.length ? staleTargetKeys : void 0;
142
+ const isFullBatchProbe = wholeBatch && !requestAgentKeys;
143
+ const fetchImpl = args.fetchImpl ?? fetch;
144
+ const refreshPromise = (async () => {
145
+ const res = await fetchImpl(
146
+ `${serverUrl}/api/agents/quota/refresh`,
147
+ {
148
+ method: "POST",
149
+ headers: {
150
+ "Content-Type": "application/json",
151
+ Authorization: `Bearer ${authToken}`
152
+ },
153
+ body: JSON.stringify(
154
+ requestAgentKeys && requestAgentKeys.length > 0 ? { agentKeys: requestAgentKeys } : {}
155
+ ),
156
+ signal: AbortSignal.timeout(CATALOG_QUOTA_REFRESH_TIMEOUT_MS)
157
+ }
158
+ );
159
+ if (!res.ok) return;
160
+ const payload = await res.json().catch(() => null);
161
+ const quotas = payload?.quotas;
162
+ if (!quotas || typeof quotas !== "object") return;
163
+ const probed = typeof payload?.probed === "number" ? payload.probed : 0;
164
+ const completedAt = Date.now();
165
+ if (probed === 0 && Object.keys(quotas).length === 0) {
166
+ if (isFullBatchProbe) lastRefreshEmptyAt = completedAt;
167
+ return;
168
+ }
169
+ if (wholeBatch) lastRefreshEmptyAt = 0;
170
+ writeQuotaDiskCache(
171
+ cachePath,
172
+ cacheKey,
173
+ quotas,
174
+ wholeBatch,
175
+ requestAgentKeys ?? targetEntries.map((entry) => entry.key),
176
+ completedAt
177
+ );
178
+ for (const entry of args.entries) {
179
+ const quota = quotas[entry.key];
180
+ if (quota && Array.isArray(quota.windows)) {
181
+ fresh[entry.key] = quota;
182
+ }
183
+ }
184
+ })();
185
+ let timer;
186
+ await Promise.race([
187
+ refreshPromise,
188
+ new Promise((resolve) => {
189
+ timer = setTimeout(resolve, CATALOG_QUOTA_REFRESH_TIMEOUT_MS);
190
+ })
191
+ ]).catch(() => {
192
+ });
193
+ if (timer) clearTimeout(timer);
194
+ refreshPromise.catch(() => {
195
+ });
196
+ } catch {
197
+ }
198
+ return fresh;
199
+ }
200
+
201
+ export {
202
+ refreshSubscriptionQuotas
203
+ };
@@ -36,7 +36,7 @@ import {
36
36
  } from "./chunk-YNIYE47Z.js";
37
37
  import {
38
38
  getDefaultCliLocalRuntimeDb
39
- } from "./chunk-N5Z2V73W.js";
39
+ } from "./chunk-LELADM5Q.js";
40
40
  import {
41
41
  createTokenStatsKey
42
42
  } from "./chunk-SYTHYBMI.js";
@@ -11658,7 +11658,7 @@ async function runUsageCommand(args, deps) {
11658
11658
  const output = deps.output ?? process.stdout;
11659
11659
  const errorOutput = deps.errorOutput ?? process.stderr;
11660
11660
  if (args[0] === "rebuild") {
11661
- const { runUsageRebuildCommand } = await import("./usageRebuildCommand-FERQO74C.js");
11661
+ const { runUsageRebuildCommand } = await import("./usageRebuildCommand-4TFZCKXM.js");
11662
11662
  return runUsageRebuildCommand(args.slice(1), deps);
11663
11663
  }
11664
11664
  if (hasFlag(args, "-h") || hasFlag(args, "--help")) {
@@ -11729,7 +11729,7 @@ async function runUsageCommand(args, deps) {
11729
11729
  return 0;
11730
11730
  }
11731
11731
  async function resolveUsageUserId(env) {
11732
- const { resolveLocalUserId } = await import("./cliAgentConfigHelpers-KICKKNYQ.js");
11732
+ const { resolveLocalUserId } = await import("./cliAgentConfigHelpers-6OFDHJFT.js");
11733
11733
  return resolveLocalUserId(env);
11734
11734
  }
11735
11735
  function isLocalDbMissingError(error) {