nolo-cli 0.213.0 → 0.220.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 (271) hide show
  1. package/README.md +3 -2
  2. package/{_executeModel-CUJLCFWR.js → _executeModel-BNEMFCAO.js} +125 -96
  3. package/{accountResolver-4LKIHEKL.js → accountResolver-QETKNC7T.js} +4 -4
  4. package/{action-DF5UYSJF.js → action-GDZDXPMB.js} +14 -13
  5. package/{addContentAction-WERAONNY.js → addContentAction-7RO4AMRI.js} +21 -20
  6. package/{addDialogAgentAction-7VI7YRML.js → addDialogAgentAction-EVYBGTXB.js} +26 -25
  7. package/{agentDeleteCommand-XJORXPGU.js → agentDeleteCommand-7QTQNFCO.js} +145 -137
  8. package/{agentEmailCommands-XTYYFR6Z.js → agentEmailCommands-I7SHOSD6.js} +146 -139
  9. package/{agentFavoriteCommands-EDK743YA.js → agentFavoriteCommands-7LOP3HUD.js} +11 -12
  10. package/{agentGrantCommands-RQWK2TEV.js → agentGrantCommands-L6O2HVJI.js} +9 -9
  11. package/{agentListCommands-OBLRBLHS.js → agentListCommands-GUGMORTK.js} +180 -103
  12. package/{agentMachineCommands-5FMT3OT5.js → agentMachineCommands-UMDKILU3.js} +75 -66
  13. package/{agentProviderCommands-Q5O33MED.js → agentProviderCommands-STI3DQ6A.js} +8 -8
  14. package/{agentPullCommand-6EM3URVK.js → agentPullCommand-KHV4EELF.js} +11 -11
  15. package/agentRecordCommands-YTAMTHOY.js +175 -0
  16. package/agentRunCommand-DBM6YNO6.js +207 -0
  17. package/{agentRunControl-TAMHJQSR.js → agentRunControl-MBG4U6SL.js} +40 -19
  18. package/{agentRuntimeLocal-SOO2OPJG.js → agentRuntimeLocal-TU4LA353.js} +55 -48
  19. package/{agentSlice-CHR6KOZN.js → agentSlice-DPG7Q7IA.js} +24 -23
  20. package/{appDeleteCommands-GUP6P5YE.js → appDeleteCommands-JWP3XPUA.js} +67 -58
  21. package/{appDeployCommands-MH2FX4O5.js → appDeployCommands-6E4TQCWI.js} +67 -58
  22. package/{appDeployStatusCommands-SUHN3HPJ.js → appDeployStatusCommands-ALU4SADG.js} +67 -58
  23. package/{appGetCommands-YWDEX6Z4.js → appGetCommands-JEY4L6L4.js} +67 -58
  24. package/{appListCommands-ZQVMLPAY.js → appListCommands-PCAVHU7M.js} +67 -58
  25. package/{authCommand-PWX2ZNUP.js → authCommand-CGRIIOOV.js} +37 -33
  26. package/{authCommands-HV3EAU3V.js → authCommands-55OGQGCR.js} +16 -12
  27. package/{builtinSkillRegistry-2QETTQPM.js → builtinSkillRegistry-BAE2LDXF.js} +11 -13
  28. package/{chromeCommands-REEAH4SX.js → chromeCommands-G5UDKVSV.js} +3 -3
  29. package/{chromeOpsCommands-DIVM2K3T.js → chromeOpsCommands-WAA45NCS.js} +23 -13
  30. package/{chunk-VNYYOX3V.js → chunk-262R3XNN.js} +157 -50
  31. package/chunk-2MCB7CD7.js +98 -0
  32. package/{chunk-CTPXME7U.js → chunk-2NPD3FTX.js} +30 -7
  33. package/{chunk-YB3YZK56.js → chunk-2WZXXAQD.js} +1 -67
  34. package/{chunk-HRMJUN5J.js → chunk-2X7WFDT6.js} +1 -1
  35. package/chunk-2YGBI2XB.js +30 -0
  36. package/{chunk-TY3TIUJK.js → chunk-324FWHUA.js} +85 -3
  37. package/{chunk-KFLT5KAD.js → chunk-3NNXR7EH.js} +20 -20
  38. package/{chunk-ZRSNONOB.js → chunk-3P54D2E4.js} +8 -3
  39. package/{chunk-7OCO4TDT.js → chunk-3U44JB3O.js} +1 -1
  40. package/{chunk-TX5EYMGT.js → chunk-44J7Z5AQ.js} +34 -258
  41. package/chunk-4D4QD7FT.js +201 -0
  42. package/chunk-4I2MXV5Q.js +275 -0
  43. package/{chunk-MYOH447Z.js → chunk-4JVNURX4.js} +1 -1
  44. package/{chunk-COFEN36Z.js → chunk-4ZGPHFLE.js} +3 -3
  45. package/{chunk-ZXOUUDCG.js → chunk-53MFERZ3.js} +3869 -362
  46. package/chunk-547ENH5T.js +226 -0
  47. package/{chunk-YDH3FDFQ.js → chunk-5FUN7EG4.js} +1 -1
  48. package/{chunk-6DWMYIUY.js → chunk-5WKDR7HS.js} +14 -9
  49. package/chunk-5ZUOVCKT.js +32 -0
  50. package/{chunk-T43B7LB2.js → chunk-62HXNQVV.js} +1 -1
  51. package/{chunk-ZC3CMUKU.js → chunk-6OVNSQHN.js} +84 -2
  52. package/{chunk-IXNGOHV5.js → chunk-6QHKRARD.js} +12 -153
  53. package/{chunk-4T2WNOY7.js → chunk-6RDBLXVQ.js} +28 -17
  54. package/{chunk-EYLGAEB4.js → chunk-6XRPBZRS.js} +134 -0
  55. package/{chunk-KIM6CLW5.js → chunk-7JGMNKKG.js} +57 -26
  56. package/{chunk-P5L7CXOC.js → chunk-7Z6EW7AH.js} +3 -2
  57. package/chunk-AGYPUBFW.js +686 -0
  58. package/{chunk-Y63ZSOR6.js → chunk-AL3TYDIF.js} +1 -1
  59. package/{chunk-NOKUNJON.js → chunk-ALAES342.js} +75 -94
  60. package/{chunk-4I7ERB7F.js → chunk-ATEKLSLR.js} +2 -2
  61. package/{chunk-CRHOO2ZR.js → chunk-AUAJTAFM.js} +8 -8
  62. package/{chunk-LLRPJECG.js → chunk-AWIL6EHN.js} +15 -157
  63. package/chunk-BIDSIRTS.js +307 -0
  64. package/chunk-BIWI5M4E.js +62 -0
  65. package/{chunk-4VJAC32I.js → chunk-BNMPUQW6.js} +3 -2
  66. package/{chunk-RLBNLZVC.js → chunk-BP5ZJ6B4.js} +1 -1
  67. package/{chunk-NBTY7YJF.js → chunk-BR3GT6MR.js} +1 -0
  68. package/{chunk-7RFNTILS.js → chunk-BUDVRYES.js} +2 -2
  69. package/{chunk-SVYO6AO7.js → chunk-BV3FLP2L.js} +41 -1
  70. package/{chunk-ZL5RAEEB.js → chunk-CBUZ6DKA.js} +3 -3
  71. package/{chunk-SM3NSZJV.js → chunk-CD3RU7XL.js} +36 -2
  72. package/chunk-CMMI3DAT.js +1621 -0
  73. package/{chunk-J2NHJ7WX.js → chunk-CYWNWA77.js} +6 -6
  74. package/{chunk-MOIJOHA5.js → chunk-D6YNCNM6.js} +35 -21
  75. package/{chunk-H2TJUNCH.js → chunk-DBUR22G5.js} +16 -16
  76. package/chunk-DEA37IUY.js +271 -0
  77. package/{chunk-O2TZF4AI.js → chunk-DGYCDA6W.js} +4 -4
  78. package/{chunk-YWSEPJ7C.js → chunk-DUUDXSLX.js} +21 -7
  79. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  80. package/{chunk-H5HF7TJA.js → chunk-EEOOBRA7.js} +6 -6
  81. package/{chunk-Y6ORVLSS.js → chunk-EVGU5P4U.js} +1 -1
  82. package/chunk-EWQ3HGNZ.js +90 -0
  83. package/{chunk-6VLJ6YA7.js → chunk-F6Z6ZCUV.js} +9 -9
  84. package/{chunk-75XIDFBW.js → chunk-FJ23FZXF.js} +72 -28
  85. package/chunk-FJSNBZXR.js +142 -0
  86. package/{chunk-WRYQ35LQ.js → chunk-G7IUT2V3.js} +860 -57
  87. package/{chunk-PCLE46CE.js → chunk-GBWGPTA7.js} +2 -1
  88. package/{chunk-H7PPIYWP.js → chunk-GPOV42YM.js} +19 -19
  89. package/{chunk-W4S457LU.js → chunk-GUXZK7SE.js} +42 -6
  90. package/{chunk-QHPRUL4O.js → chunk-GV6PRJBU.js} +4 -4
  91. package/{chunk-YUA6OAH5.js → chunk-HBRDSQ3M.js} +2 -2
  92. package/{chunk-G7MLNNEX.js → chunk-HHFGE2WF.js} +7 -7
  93. package/{chunk-OQPKUBPB.js → chunk-HSSBDZLD.js} +19 -7
  94. package/{chunk-EHSZD5OI.js → chunk-HXER7YJF.js} +4 -4
  95. package/{chunk-TAKB25RM.js → chunk-HYLRQDEE.js} +6 -6
  96. package/{chunk-LOEO7LRC.js → chunk-ILHQ2AXT.js} +10 -8
  97. package/{chunk-BBJ22CLB.js → chunk-JJMR2EA3.js} +64 -34
  98. package/{chunk-G2BQWAVT.js → chunk-JLAMNSBC.js} +4 -4
  99. package/{chunk-RSHTSUEG.js → chunk-JUSHVFNF.js} +2133 -622
  100. package/{chunk-YJAFKXMU.js → chunk-KHVFJSVE.js} +54 -49
  101. package/{chunk-X7SDOJUM.js → chunk-KRI6N5QZ.js} +16 -16
  102. package/{chunk-7BT37FK3.js → chunk-L32W3PRP.js} +675 -128
  103. package/chunk-LKA64WH4.js +227 -0
  104. package/{chunk-HUBHAQK2.js → chunk-LMRRCEDE.js} +31 -31
  105. package/chunk-M4SFKP5L.js +675 -0
  106. package/{chunk-MDB67IWP.js → chunk-MSMHU36U.js} +12 -12
  107. package/{chunk-7Y4YTDQF.js → chunk-MXKWTPUM.js} +288 -166
  108. package/{chunk-WYDI6TGM.js → chunk-MXRUXMZ3.js} +94 -135
  109. package/{chunk-AZMYUSVF.js → chunk-N5Z2V73W.js} +1 -1
  110. package/{chunk-QG4AOSON.js → chunk-NHY322ZU.js} +154 -32
  111. package/{chunk-UHJGXRJ4.js → chunk-OBIC6EG7.js} +6 -6
  112. package/{chunk-GOO6G4PY.js → chunk-OBSEKCVK.js} +123 -70
  113. package/{chunk-WMTBPBMP.js → chunk-OG6MQOQG.js} +130 -60
  114. package/{chunk-XJWWBO34.js → chunk-OJKUU3LP.js} +5 -7
  115. package/{chunk-ALQ3657A.js → chunk-OOJNQK6V.js} +21 -1
  116. package/{chunk-NSAPDIN2.js → chunk-OWKNSIXL.js} +679 -74
  117. package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
  118. package/{chunk-A7TFUNZO.js → chunk-PPJYZRSQ.js} +6 -2
  119. package/{chunk-F6UUQOG6.js → chunk-Q3IVPFVO.js} +4 -4
  120. package/{chunk-VO4WSAVP.js → chunk-QBZCGP34.js} +3 -3
  121. package/chunk-QCB42576.js +13 -0
  122. package/chunk-QHEN7NZ7.js +46 -0
  123. package/{chunk-3UKL3HPD.js → chunk-QJTZ76CP.js} +32 -84
  124. package/{chunk-V5Y3R6BT.js → chunk-QRGDJA4B.js} +215 -212
  125. package/{chunk-4KB6WQUL.js → chunk-QYB23WUH.js} +1 -1
  126. package/{chunk-ZNWI6OVT.js → chunk-R44TU3MZ.js} +85 -11
  127. package/{chunk-PYRUW7XN.js → chunk-R6Z5S5GA.js} +139 -57
  128. package/{chunk-VL5KOY2C.js → chunk-R7XWZDOH.js} +125 -29
  129. package/{chunk-R5O4QAWG.js → chunk-RBPUNSG5.js} +11 -77
  130. package/{chunk-NJLL224W.js → chunk-RG2DGNL6.js} +3 -3
  131. package/{chunk-C6KNNXWU.js → chunk-RGQ4UUWZ.js} +25 -2
  132. package/{chunk-TCZHTTUU.js → chunk-RTHFJZ6M.js} +11 -11
  133. package/{chunk-RZOV7OMV.js → chunk-RYOLWYBK.js} +146 -200
  134. package/{chunk-OWYYDMGJ.js → chunk-S2NTVGA2.js} +4 -2
  135. package/{chunk-XHQC4PXX.js → chunk-S5NA3C52.js} +488 -226
  136. package/{secretCommands-LXDWOLZ6.js → chunk-S6FDXXZV.js} +190 -15
  137. package/chunk-S6K5F3KP.js +99 -0
  138. package/{chunk-INN4LTAJ.js → chunk-SRCCSTIM.js} +8 -8
  139. package/{chunk-JY5NGFFH.js → chunk-SYTHYBMI.js} +5 -5
  140. package/{chunk-UYD5HQ6T.js → chunk-SZVMASJ2.js} +3300 -1396
  141. package/{chunk-FUGMREBO.js → chunk-TGNIKIHR.js} +3 -3
  142. package/{chunk-HPFCI4SK.js → chunk-TI2EPRHE.js} +4 -4
  143. package/chunk-TLE77UJ5.js +230 -0
  144. package/chunk-TSPMLCWI.js +364 -0
  145. package/{chunk-YGILMZ7N.js → chunk-TUSTONB3.js} +1 -1
  146. package/{chunk-4VNS5WPM.js → chunk-U67V476Y.js} +1 -8
  147. package/{chunk-F7CI2ZC5.js → chunk-UAIHKQIA.js} +2 -1
  148. package/{chunk-WPORQFYN.js → chunk-UVLYNWIE.js} +2 -2
  149. package/{chunk-H4UOTUOX.js → chunk-VMJVAJ6W.js} +152 -19
  150. package/{chunk-KC4XDTT3.js → chunk-VS276URX.js} +4 -4
  151. package/{chunk-YTF4WH7J.js → chunk-WWTSEBDF.js} +1 -1
  152. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  153. package/{chunk-RPQXPZZF.js → chunk-XSW4EXQV.js} +976 -17
  154. package/{chunk-7QTZCMKL.js → chunk-XTETTSKN.js} +3036 -2468
  155. package/{chunk-J5JTMQIA.js → chunk-YFLVRVYK.js} +1 -1
  156. package/chunk-YKY4OVOX.js +1141 -0
  157. package/{chunk-MMA3LZ3W.js → chunk-YNIYE47Z.js} +1 -1
  158. package/chunk-YZMNK53S.js +68 -0
  159. package/{chunk-FY7F4Q6X.js → chunk-Z4PCXPUE.js} +2 -2
  160. package/{chunk-INUFILG6.js → chunk-ZH3KXFHS.js} +11 -3
  161. package/chunk-ZOHO6MOF.js +376 -0
  162. package/{cliAgentConfigHelpers-WJBZQTLW.js → cliAgentConfigHelpers-BTRHMPW2.js} +18 -19
  163. package/{cliAuthorityBrokerClient-PM3U6Q6J.js → cliAuthorityBrokerClient-XHH7MH2P.js} +1 -1
  164. package/{cliAuthorityStoreDriver-TKLXNNTG.js → cliAuthorityStoreDriver-6FE3BJNB.js} +1 -1
  165. package/{cliEnvHelpers-BVYTMUPJ.js → cliEnvHelpers-CNMP3RDX.js} +3 -3
  166. package/{cliExecutor-BWBF2MTI.js → cliExecutor-K6FDZTQ2.js} +4 -2
  167. package/cliLocalAgentRecordReader-M3F76NIP.js +90 -0
  168. package/{commandRegistry-W63CYRZJ.js → commandRegistry-T3UBK6OA.js} +105 -97
  169. package/{contentThunks-U7PL5MQD.js → contentThunks-YEPZAHXU.js} +53 -48
  170. package/{cooldownCommands-TIGUHXTD.js → cooldownCommands-YB5H5BBK.js} +5 -4
  171. package/{createAgentAutomationAction-OLBQDD6R.js → createAgentAutomationAction-TBIIO5WT.js} +51 -48
  172. package/{createDialogAction-SVH6B3SB.js → createDialogAction-KBKMYFTQ.js} +52 -53
  173. package/{createPageAction-F4DIWZ2Z.js → createPageAction-3FGAPLJO.js} +56 -53
  174. package/{cursorProvider-YGGNMVWX.js → cursorProvider-2RACMEMF.js} +1 -1
  175. package/{db-HUCI5R4G.js → db-M7FU2GNK.js} +10 -7
  176. package/{dbSlice-BVH2YZPQ.js → dbSlice-XRUZOGSU.js} +20 -19
  177. package/{deleteFile-5YOEKV4U.js → deleteFile-6URDHYRB.js} +12 -12
  178. package/{desktopFolderProjects-SFY5EZS3.js → desktopFolderProjects-4POAMVJN.js} +2 -2
  179. package/{dialogCommands-KHIEPY3M.js → dialogCommands-NRLCOPJR.js} +71 -64
  180. package/dialogNotifyCommand-SHGPCU22.js +36 -0
  181. package/{dialogSlice-ZCTDV2PZ.js → dialogSlice-DP2WTMNO.js} +48 -45
  182. package/{dialogUsageCommand-7KCPYGHG.js → dialogUsageCommand-W2WCSGKF.js} +11 -10
  183. package/{docCreateCommands-DPMZI7G5.js → docCreateCommands-YJRDA3RX.js} +66 -59
  184. package/{docDeleteCommands-IRQQLUBT.js → docDeleteCommands-A5QIHZNF.js} +69 -62
  185. package/{docReadCommands-LK37XH6L.js → docReadCommands-CF2LTMYH.js} +66 -59
  186. package/{docStore-V2KECILA.js → docStore-NDY3K3PK.js} +25 -24
  187. package/{docUpdateCommands-O6T3HJHH.js → docUpdateCommands-QRKV4ZXE.js} +69 -62
  188. package/{fetchMessages-NR4KNQLO.js → fetchMessages-TQEUZD7H.js} +8 -7
  189. package/{getPricing-2MNMXEVG.js → getPricing-LF5C4XSI.js} +7 -7
  190. package/{handleSendMessageAction-2PE25WM3.js → handleSendMessageAction-IUGVVJ43.js} +206 -314
  191. package/{hostCredentialCreate-S233UMAP.js → hostCredentialCreate-X2ZFRXDR.js} +132 -124
  192. package/index.js +65 -27
  193. package/{keys-BEGDOTRL.js → keys-RWF7UCB4.js} +5 -4
  194. package/legacyMigration-TF4SYJCZ.js +19 -0
  195. package/{lib-5KKIBFIT.js → lib-OT5OTXRU.js} +7087 -6664
  196. package/{localDialogRead-7NNDVVF7.js → localDialogRead-CCOCVGAP.js} +3 -3
  197. package/{localFirstLog-DHNOY2NA.js → localFirstLog-OIETGK66.js} +1 -1
  198. package/localRecall-BDYKXB46.js +17 -0
  199. package/{localRuntimeAdapter-KY6WXNBR.js → localRuntimeAdapter-KAG3T4LF.js} +138 -130
  200. package/{localRuntimeAuthority-OYH4AE4G.js → localRuntimeAuthority-IBJAT62G.js} +1 -1
  201. package/{localRuntimeDb-VBIMCWUC.js → localRuntimeDb-N7KHDXS2.js} +2 -2
  202. package/{machineCommands-Q6HA3IXF.js → machineCommands-6NIQJE2A.js} +143 -135
  203. package/{machineInfo-UKPTZO5Y.js → machineInfo-LWHTEBHJ.js} +1 -1
  204. package/machineWsRunDispatch-RA5NOSGG.js +190 -0
  205. package/{memberThunks-7EDJADWU.js → memberThunks-7Y3OYSJQ.js} +30 -29
  206. package/{memoryCommands-ASCE5STX.js → memoryCommands-BC6REPQB.js} +7 -7
  207. package/models-H5NNZRLH.js +9 -0
  208. package/{oauthTokenStore-OEERZFUC.js → oauthTokenStore-RUYNYALS.js} +1 -1
  209. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +6 -6
  210. package/overlay-BBQZXGYI.js +13 -0
  211. package/package.json +2 -2
  212. package/{pdf-U6KSUEZZ.js → pdf-KE3QI2V7.js} +1 -1
  213. package/{processSpawn-ZU5QFM43.js → processSpawn-6GEO77KV.js} +1 -1
  214. package/{profileConfig-KN3N2BLF.js → profileConfig-KOWK4HOG.js} +1 -1
  215. package/{projectArchive-DRTDIMEV.js → projectArchive-OIUP63MV.js} +59 -56
  216. package/{providerPresetApply-YXGV6NXB.js → providerPresetApply-WHAMP2D5.js} +20 -13
  217. package/{providerRegistry-S6UL6UNA.js → providerRegistry-ZI2KORJ7.js} +11 -11
  218. package/{read-4V2RMG7N.js → read-TYMBGEXO.js} +13 -13
  219. package/{readDocTool-BH6ATGQO.js → readDocTool-SKQVHBLO.js} +2 -2
  220. package/{readlineWorkspace-2W4WRCOU.js → readlineWorkspace-ZGC4KSXG.js} +7760 -6499
  221. package/{removeDialogAgentAction-LYAZGNKW.js → removeDialogAgentAction-F5QE2O2B.js} +29 -28
  222. package/{runAgentClientLoop-J2VQBS2Z.js → runAgentClientLoop-NKUW2DSJ.js} +94 -88
  223. package/{runtimeDoctorCommands-QAI3MBKQ.js → runtimeDoctorCommands-RRKPBGVO.js} +19 -19
  224. package/{runtimeModeArgs-2Y7BALTO.js → runtimeModeArgs-X7DL7PUN.js} +1 -1
  225. package/secretCommands-KZWBZIYS.js +24 -0
  226. package/{setDialogExtraReferencesAction-OCRPGPYH.js → setDialogExtraReferencesAction-72L27ERM.js} +25 -24
  227. package/{setPrimaryDialogAgentAction-HFJDQIBU.js → setPrimaryDialogAgentAction-GJJDUSGJ.js} +29 -28
  228. package/{settingThunks-RAMHMTGM.js → settingThunks-ZRGWVGZD.js} +99 -90
  229. package/{skillDiscovery-XKHROSH2.js → skillDiscovery-I37M5KJC.js} +4 -4
  230. package/{skillSummaryMarker-42HKSXYY.js → skillSummaryMarker-62UW7HI7.js} +1 -1
  231. package/{slateToRenderMarkdown-Y5IYN73U.js → slateToRenderMarkdown-R3X74MCX.js} +1 -1
  232. package/{slateUtils-NGV2NMKM.js → slateUtils-ESQAJ6RN.js} +1 -1
  233. package/{spaceCommands-KVJZVKVO.js → spaceCommands-MEH3HJBC.js} +66 -57
  234. package/store-Z53ICFL3.js +48 -0
  235. package/{streamAgentChatTurn-GHBMJJ6S.js → streamAgentChatTurn-FJTUUXHJ.js} +886 -668
  236. package/{switchDialogAgentAction-EBRMW3RA.js → switchDialogAgentAction-IIJBPND3.js} +26 -25
  237. package/{tableCommands-MP6VFSVT.js → tableCommands-FTAOCBTX.js} +13 -13
  238. package/tombstones-FQQMEDOW.js +32 -0
  239. package/{toolApiClient-HGNO53TC.js → toolApiClient-OGQEBQVX.js} +4 -4
  240. package/{tools-EWKCPKMS.js → tools-ZXHIAOSP.js} +82 -81
  241. package/tuiRestart-2IL37YIB.js +41 -0
  242. package/tuiSummaryLlmCaller-W2QN4VAC.js +44 -0
  243. package/{updateCommands-ZQYU6SCI.js → updateCommands-CPATDG6J.js} +11 -7
  244. package/{updateDialogTitleAction-5GGMBTDF.js → updateDialogTitleAction-JMKLKL4P.js} +54 -51
  245. package/{usageCommand-F4IPVMIZ.js → usageCommand-2BF74MKF.js} +11 -10
  246. package/{usageRebuildCommand-HAW2AD5N.js → usageRebuildCommand-UHB55BQM.js} +12 -11
  247. package/userDataMerge-HT2ZVHBJ.js +13 -0
  248. package/{windowsSelfUpdate-257DV2T6.js → windowsSelfUpdate-ZFD6J5HF.js} +3 -3
  249. package/{workloadLifecycle-4C42SVBD.js → workloadLifecycle-HFJIN5IZ.js} +4 -4
  250. package/agentRecordCommands-ZQ7SVYGG.js +0 -167
  251. package/agentRunCommand-WS7IGO2W.js +0 -196
  252. package/chunk-3CGG2PAL.js +0 -594
  253. package/chunk-5MQRBSMW.js +0 -862
  254. package/chunk-5XBUWM6I.js +0 -89
  255. package/chunk-CJEIOP3E.js +0 -0
  256. package/chunk-EHGEOAHI.js +0 -636
  257. package/chunk-FW6YHHLI.js +0 -842
  258. package/chunk-GPVRUGGY.js +0 -115
  259. package/chunk-HSVBJRF4.js +0 -339
  260. package/chunk-LEC5ALIN.js +0 -91
  261. package/chunk-WACI5I6V.js +0 -147
  262. package/chunk-WJZOQR2J.js +0 -151
  263. package/chunk-ZCWRMUWT.js +0 -89
  264. package/dist-M676ULYG.js +0 -7314
  265. package/machineWsRunDispatch-WWJQ6WR3.js +0 -182
  266. package/models-PJBE6JDV.js +0 -9
  267. package/tuiSummaryLlmCaller-ALQYUUWB.js +0 -189
  268. package/{chunk-AGP3YSEC.js → chunk-4N6G2CKP.js} +3 -3
  269. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  270. package/{chunk-2QHFH3DR.js → chunk-USGHJSGO.js} +3 -3
  271. package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  buildStaticUserPolicyContext,
3
3
  resolveSpaceContextPreloadPlan
4
- } from "./chunk-ZNWI6OVT.js";
4
+ } from "./chunk-R44TU3MZ.js";
5
5
  import {
6
6
  fetchReferenceContents,
7
7
  mergeReferences,
8
8
  resolveReferenceAssets,
9
9
  resolveToolsFromKeys
10
- } from "./chunk-TX5EYMGT.js";
10
+ } from "./chunk-44J7Z5AQ.js";
11
11
  import {
12
12
  UI_CARD_ENVELOPE_MAX_BYTES,
13
13
  getAllToolRuns,
@@ -18,71 +18,58 @@ import {
18
18
  selectSpaceContextLevel,
19
19
  selectUserTonePreset,
20
20
  uiCardFallback
21
- } from "./chunk-HUBHAQK2.js";
22
- import {
23
- resolveAgentRecommendedSkillNames,
24
- resolveAgentRequiredPackIds
25
- } from "./chunk-R5O4QAWG.js";
26
- import {
27
- getDocState
28
- } from "./chunk-6DWMYIUY.js";
21
+ } from "./chunk-LMRRCEDE.js";
29
22
  import {
30
23
  resolveToolBaseUrl
31
- } from "./chunk-MYOH447Z.js";
24
+ } from "./chunk-4JVNURX4.js";
32
25
  import {
33
- getFinalPrice,
34
- getModelPricing,
35
- getPrices,
36
- hasExplicitAgentPricing
37
- } from "./chunk-INN4LTAJ.js";
26
+ getDocState
27
+ } from "./chunk-5WKDR7HS.js";
38
28
  import {
39
29
  getTableState
40
- } from "./chunk-7Y4YTDQF.js";
30
+ } from "./chunk-MXKWTPUM.js";
31
+ import {
32
+ getCurrentSpaceIdRaw,
33
+ getViewMode
34
+ } from "./chunk-547ENH5T.js";
41
35
  import {
42
36
  PERSONALIZATION_DIALOG_CATEGORY,
43
37
  buildPersonalizationDialogPolicyContext,
44
38
  selectAllMsgs
45
- } from "./chunk-ZXOUUDCG.js";
46
- import {
47
- getCurrentSpaceIdRaw,
48
- getViewMode
49
- } from "./chunk-5XBUWM6I.js";
39
+ } from "./chunk-53MFERZ3.js";
50
40
  import {
51
41
  selectPendingFiles
52
- } from "./chunk-OWYYDMGJ.js";
42
+ } from "./chunk-S2NTVGA2.js";
53
43
  import {
54
44
  read,
55
45
  selectById
56
- } from "./chunk-FW6YHHLI.js";
46
+ } from "./chunk-CMMI3DAT.js";
57
47
  import {
58
48
  getSessionSnapshotForState,
59
49
  selectIdentityUserBalance,
60
50
  selectIdentityUserId
61
51
  } from "./chunk-PXYBUFDB.js";
62
52
  import {
63
- TOOL_PACKS,
64
- addDefaultSystemCapabilityTools,
65
- applyDefaultWebToolPacks,
66
- applyDisabledTools,
67
- applySystemBuiltinSkillFilter,
68
- expandEnabledPackPromptPatches,
69
- expandEnabledPacks,
70
- resolveEffectiveEnabledPacks
71
- } from "./chunk-EHGEOAHI.js";
53
+ getFinalPrice,
54
+ getModelPricing,
55
+ getPrices,
56
+ hasExplicitAgentPricing
57
+ } from "./chunk-SRCCSTIM.js";
72
58
  import {
73
- planContextUsage,
74
59
  projectToolMessageContent
75
- } from "./chunk-YB3YZK56.js";
60
+ } from "./chunk-2WZXXAQD.js";
61
+ import {
62
+ resolveAgentRecommendedSkillNames,
63
+ resolveAgentRequiredPackIds
64
+ } from "./chunk-FJSNBZXR.js";
76
65
  import {
77
66
  attachmentKind,
67
+ extractReferenceKeysFromMessage,
78
68
  normalizeAttachmentPart
79
- } from "./chunk-WJZOQR2J.js";
80
- import {
81
- extractReferenceKeysFromMessage
82
- } from "./chunk-V5Y3R6BT.js";
69
+ } from "./chunk-QRGDJA4B.js";
83
70
  import {
84
71
  getModelContextWindow
85
- } from "./chunk-7BT37FK3.js";
72
+ } from "./chunk-L32W3PRP.js";
86
73
  import {
87
74
  asRecordOrEmpty
88
75
  } from "./chunk-KX6YBIHG.js";
@@ -90,38 +77,45 @@ import {
90
77
  isAbortError
91
78
  } from "./chunk-7DPNBQSV.js";
92
79
  import {
93
- buildLinkedSpacesSection,
94
- buildSpaceContextLayer
95
- } from "./chunk-ZRSNONOB.js";
80
+ TOOL_PACKS,
81
+ addDefaultSystemCapabilityTools,
82
+ applyDefaultWebToolPacks,
83
+ applyDisabledTools,
84
+ applySystemBuiltinSkillFilter,
85
+ expandEnabledPackPromptPatches,
86
+ expandEnabledPacks,
87
+ resolveEffectiveEnabledPacks
88
+ } from "./chunk-G7IUT2V3.js";
96
89
  import {
97
90
  canonicalizeToolNames,
98
91
  prioritizeToolNames
99
- } from "./chunk-ZCWRMUWT.js";
92
+ } from "./chunk-6OVNSQHN.js";
100
93
  import {
101
94
  extractCustomId
102
95
  } from "./chunk-M2EJHDJP.js";
103
96
  import {
104
- estimateTokenCount
105
- } from "./chunk-PSCNXBYA.js";
97
+ metaKey
98
+ } from "./chunk-SYTHYBMI.js";
99
+ import {
100
+ asNonEmptyStringArray
101
+ } from "./chunk-I42VC5KR.js";
102
+ import {
103
+ buildLinkedSpacesSection,
104
+ buildSpaceContextLayer
105
+ } from "./chunk-3P54D2E4.js";
106
+ import {
107
+ asTrimmedString
108
+ } from "./chunk-3EUW3WEO.js";
106
109
  import {
107
110
  getModelConfig,
108
111
  getProviderByModelName
109
- } from "./chunk-SM3NSZJV.js";
112
+ } from "./chunk-CD3RU7XL.js";
110
113
  import {
111
114
  isRecord
112
115
  } from "./chunk-KUG52IAP.js";
113
- import {
114
- metaKey
115
- } from "./chunk-JY5NGFFH.js";
116
- import {
117
- asNonEmptyStringArray
118
- } from "./chunk-I42VC5KR.js";
119
116
  import {
120
117
  asOptionalFiniteNumber
121
118
  } from "./chunk-WWC7I6TA.js";
122
- import {
123
- asTrimmedString
124
- } from "./chunk-3EUW3WEO.js";
125
119
  import {
126
120
  asOptionalTrimmedString
127
121
  } from "./chunk-G3SUCT4W.js";
@@ -1130,44 +1124,6 @@ var isInlineVisualArtifactAgent = (agentConfig) => {
1130
1124
  (tag) => typeof tag === "string" && ["inline-artifact", "streaming-ui"].includes(tag)
1131
1125
  );
1132
1126
  };
1133
- var estimateTokensOfMessage = (msg) => {
1134
- let content = "";
1135
- if (typeof msg.content === "string") {
1136
- content = msg.content;
1137
- } else if (Array.isArray(msg.content)) {
1138
- content = msg.content.map((p) => {
1139
- if (p.type === "text") return p.text || "";
1140
- if (p.type === "image_url") return "[image]";
1141
- return "[non-text]";
1142
- }).join("");
1143
- } else if (msg.content && typeof msg.content === "object") {
1144
- content = JSON.stringify(msg.content);
1145
- }
1146
- let extraTokens = 0;
1147
- if (Array.isArray(msg.tool_calls)) {
1148
- const toolsStr = JSON.stringify(msg.tool_calls);
1149
- extraTokens = estimateTokenCount(toolsStr);
1150
- }
1151
- return estimateTokenCount(content) + extraTokens;
1152
- };
1153
- var classifyConversationLoad = (messages) => {
1154
- const N = 20;
1155
- if (!Array.isArray(messages) || messages.length === 0) return "light";
1156
- const tail = messages.slice(-N);
1157
- const tokenSamples = tail.map(estimateTokensOfMessage);
1158
- if (tokenSamples.length === 0) return "light";
1159
- const sum = tokenSamples.reduce((acc, v) => acc + v, 0);
1160
- const avg = sum / tokenSamples.length;
1161
- const sorted = [...tokenSamples].sort((a, b) => a - b);
1162
- const p95 = sorted[Math.floor((sorted.length - 1) * 0.95)];
1163
- if (p95 < 200 && avg < 120) {
1164
- return "light";
1165
- }
1166
- if (p95 > 2e3 || avg > 1200) {
1167
- return "heavy";
1168
- }
1169
- return "medium";
1170
- };
1171
1127
  var compressOldToolResults = (messages) => {
1172
1128
  return messages.map((msg) => {
1173
1129
  if (msg.role !== "tool") return msg;
@@ -1180,45 +1136,6 @@ var compressOldToolResults = (messages) => {
1180
1136
  return { ...msg, content: projected };
1181
1137
  });
1182
1138
  };
1183
- var trimMessagesWithSummary = (messages, contextWindow, summaryTokenCount) => {
1184
- const recentLoad = classifyConversationLoad(messages);
1185
- const { rawMessageBudget, minTailTokens } = planContextUsage({
1186
- contextWindow,
1187
- summaryTokens: summaryTokenCount,
1188
- recentLoad
1189
- });
1190
- if (!Array.isArray(messages) || messages.length === 0) return messages;
1191
- let totalTokens = 0;
1192
- let keepCount = 0;
1193
- for (let i = messages.length - 1; i >= 0; i--) {
1194
- const t = estimateTokensOfMessage(messages[i]);
1195
- if (totalTokens + t > rawMessageBudget) break;
1196
- totalTokens += t;
1197
- keepCount++;
1198
- }
1199
- if (keepCount >= messages.length) {
1200
- return messages;
1201
- }
1202
- if (totalTokens < minTailTokens) {
1203
- const maxBudgetWithSlack = rawMessageBudget * 1.2;
1204
- for (let i = messages.length - 1 - keepCount; i >= 0; i--) {
1205
- const t = estimateTokensOfMessage(messages[i]);
1206
- if (totalTokens + t > maxBudgetWithSlack) break;
1207
- totalTokens += t;
1208
- keepCount++;
1209
- if (totalTokens >= minTailTokens) break;
1210
- }
1211
- }
1212
- if (keepCount === 0 && messages.length > 0) {
1213
- keepCount = Math.min(2, messages.length);
1214
- }
1215
- let cutIndex = messages.length - keepCount;
1216
- if (cutIndex < 0) cutIndex = 0;
1217
- while (cutIndex > 0 && messages[cutIndex]?.role === "tool") {
1218
- cutIndex--;
1219
- }
1220
- return messages.slice(cutIndex);
1221
- };
1222
1139
  var createDbSliceTurnContextSource = (dispatch) => ({
1223
1140
  readRecord: async (dbKey) => {
1224
1141
  const result = await dispatch(read({ dbKey })).unwrap();
@@ -1881,12 +1798,52 @@ async function resolveTurnToolContext(input) {
1881
1798
  };
1882
1799
  }
1883
1800
 
1801
+ // packages/app/utils/desktopActionGateChannel.ts
1802
+ function targetForRunKind(kind, ctx = {}) {
1803
+ if (kind === "server-run" && typeof ctx.server === "string" && ctx.server.length > 0) {
1804
+ return { kind: "web", server: ctx.server, token: ctx.token ?? null };
1805
+ }
1806
+ return { kind: "desktop" };
1807
+ }
1808
+ var NEEDS_LOGIN_MESSAGE = "\u9700\u8981\u767B\u5F55\u540E\u624D\u80FD\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
1809
+ var gates = /* @__PURE__ */ new Map();
1810
+ var targets = /* @__PURE__ */ new Map();
1811
+ var errors = /* @__PURE__ */ new Map();
1812
+ var listeners = /* @__PURE__ */ new Set();
1813
+ var cachedSnapshot = null;
1814
+ function invalidateSnapshot() {
1815
+ cachedSnapshot = null;
1816
+ }
1817
+ function notify() {
1818
+ for (const listener of listeners) {
1819
+ try {
1820
+ listener();
1821
+ } catch {
1822
+ }
1823
+ }
1824
+ }
1825
+ function pushGate(gate, target = { kind: "desktop" }) {
1826
+ if (!gate || typeof gate.id !== "string" || gate.id.length === 0) return;
1827
+ if (target.kind === "web" && !target.token) {
1828
+ gates.delete(gate.id);
1829
+ targets.delete(gate.id);
1830
+ errors.set(gate.id, NEEDS_LOGIN_MESSAGE);
1831
+ invalidateSnapshot();
1832
+ notify();
1833
+ return;
1834
+ }
1835
+ errors.delete(gate.id);
1836
+ targets.set(gate.id, target);
1837
+ gates.set(gate.id, gate);
1838
+ invalidateSnapshot();
1839
+ notify();
1840
+ }
1841
+
1884
1842
  export {
1885
1843
  buildForegroundTurnAdmissionFetchInit,
1886
1844
  consumeAgentRunStream,
1887
1845
  projectDesktopToolUiContent,
1888
1846
  compressOldToolResults,
1889
- trimMessagesWithSummary,
1890
1847
  validateAccessAndBalance,
1891
1848
  buildStaticContexts,
1892
1849
  buildDynamicContexts,
@@ -1895,5 +1852,7 @@ export {
1895
1852
  mergeAgentToolsWithRuntime,
1896
1853
  applyImageConfigRuntimeOverride,
1897
1854
  resolveImageGenerationStreamingState,
1898
- resolveTurnToolContext
1855
+ resolveTurnToolContext,
1856
+ targetForRunKind,
1857
+ pushGate
1899
1858
  };
@@ -14,7 +14,7 @@ function buildCliLocalRuntimeDbEnv(env = process.env) {
14
14
  };
15
15
  }
16
16
  async function getDefaultCliLocalRuntimeDb(options = {}) {
17
- const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-OYH4AE4G.js");
17
+ const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-IBJAT62G.js");
18
18
  return getAuthorityBackedDb(options);
19
19
  }
20
20
 
@@ -2,29 +2,87 @@ import {
2
2
  fnv1a32Hex
3
3
  } from "./chunk-UEILX4EV.js";
4
4
  import {
5
- compareAgentSelection
6
- } from "./chunk-RZOV7OMV.js";
5
+ compareAgentSelection,
6
+ resolveModelTier
7
+ } from "./chunk-RYOLWYBK.js";
7
8
  import {
8
9
  DEFAULT_PROVIDER_RETRY_MS,
9
10
  isAgentUnavailableNow,
10
11
  resolveAgentAvailability
11
- } from "./chunk-3UKL3HPD.js";
12
+ } from "./chunk-QJTZ76CP.js";
12
13
  import {
13
14
  isOAuthApiKeyRef
14
15
  } from "./chunk-UKZX3NHN.js";
15
- import {
16
- getModelAbility
17
- } from "./chunk-T43B7LB2.js";
18
16
  import {
19
17
  isOwnedAgentKey,
20
18
  ownedAgentKey,
21
19
  publicAgentKey
22
20
  } from "./chunk-M2EJHDJP.js";
21
+ import {
22
+ getModelAbility
23
+ } from "./chunk-62HXNQVV.js";
23
24
  import {
24
25
  isAntigravityOAuthAgent,
25
26
  isSubscriptionEndpoint,
26
27
  isSubscriptionOAuthCredential
27
- } from "./chunk-KIM6CLW5.js";
28
+ } from "./chunk-7JGMNKKG.js";
29
+ import {
30
+ asTrimmedLowercaseString
31
+ } from "./chunk-QSJ3HFEF.js";
32
+
33
+ // packages/core/gptProTier.ts
34
+ var GPT_PRO_REQUIRED_RECHARGE_AMOUNT = 199;
35
+ var SUPPORTED_TIER_PROVIDERS = /* @__PURE__ */ new Set([
36
+ "nolo",
37
+ "openai",
38
+ "deepinfra"
39
+ ]);
40
+ var CLAUDE_PREMIUM_RE = /^(?:anthropic\/)?claude-(opus|fable)(?:-\d+(?:[.-]\d+)*(?:-[a-z0-9]+)*)?$/i;
41
+ var GPT_PRO_RE = /^(?:openai\/)?gpt-[a-z0-9.-]+-pro(?:-[a-z0-9]+(?:[.-][a-z0-9]+)*)?$/i;
42
+ var GPT_SOL_RE = /^(?:openai\/)?gpt-\d+(?:\.\d+)*-sol(?:-[a-z0-9]+(?:[.-][a-z0-9]+)*)?$/i;
43
+ var GPT_ASTRA_RE = /^(?:openai\/)?gpt-\d+(?:\.\d+)*-astra(?:-[a-z0-9]+(?:[.-][a-z0-9]+)*)?$/i;
44
+ var KIMI_K3_MODELS = /* @__PURE__ */ new Set([
45
+ "kimi-k3",
46
+ "moonshotai/kimi-k3"
47
+ ]);
48
+ function classifyPremiumModel(model) {
49
+ const normalizedModel = asTrimmedLowercaseString(model);
50
+ if (!normalizedModel) return void 0;
51
+ const claudeMatch = CLAUDE_PREMIUM_RE.exec(normalizedModel);
52
+ if (claudeMatch) {
53
+ return claudeMatch[1].toLowerCase() === "opus" ? "claude-opus" : "claude-fable";
54
+ }
55
+ if (GPT_PRO_RE.test(normalizedModel)) {
56
+ return "gpt-pro";
57
+ }
58
+ if (GPT_SOL_RE.test(normalizedModel)) {
59
+ return "gpt-sol";
60
+ }
61
+ if (GPT_ASTRA_RE.test(normalizedModel)) {
62
+ return "gpt-astra";
63
+ }
64
+ if (KIMI_K3_MODELS.has(normalizedModel)) {
65
+ return "kimi-k3";
66
+ }
67
+ return void 0;
68
+ }
69
+ function isGptProModel(provider, model) {
70
+ const normalizedProvider = asTrimmedLowercaseString(provider);
71
+ if (!SUPPORTED_TIER_PROVIDERS.has(normalizedProvider)) {
72
+ return false;
73
+ }
74
+ return classifyPremiumModel(model) !== void 0;
75
+ }
76
+ var GPT_PRO_BLOCKED_MESSAGE = `GPT Pro / Kimi K3 \u7B49\u9AD8\u7EA7\u6A21\u578B\u9700\u8981\u5148\u5F00\u901A ${GPT_PRO_REQUIRED_RECHARGE_AMOUNT} \u79EF\u5206\u6863\u4F4D\u3002`;
77
+ function shouldBlockForGptPro(input) {
78
+ if (input?.premium !== true || input?.platformPaid !== true) {
79
+ return { blocked: false };
80
+ }
81
+ if (asTrimmedLowercaseString(input.gptProStatus) === "active") {
82
+ return { blocked: false };
83
+ }
84
+ return { blocked: true, message: GPT_PRO_BLOCKED_MESSAGE };
85
+ }
28
86
 
29
87
  // packages/ai/agent/agentBilling.ts
30
88
  function resolveBillingSource(candidate) {
@@ -220,24 +278,6 @@ function resolveEconomicsSnapshot(input, at, policies = ECONOMICS_POLICIES) {
220
278
  };
221
279
  }
222
280
 
223
- // packages/ai/agent/agentTier.ts
224
- var FAST_MARKERS = /* @__PURE__ */ new Set(["flash", "mini", "lite", "nano", "haiku", "luna"]);
225
- var BALANCED_MARKERS = /* @__PURE__ */ new Set(["sonnet", "turbo", "plus"]);
226
- var TOP_MARKERS = /* @__PURE__ */ new Set(["opus", "sol", "pro", "max", "ultra"]);
227
- function tokenizeModel(model) {
228
- return model.toLowerCase().split(/[-._/\s]+/).filter(Boolean);
229
- }
230
- function resolveDefaultAgentTier(model) {
231
- if (typeof model !== "string") return { tier: "unknown" };
232
- const tokens = tokenizeModel(model);
233
- if (tokens.length === 0) return { tier: "unknown" };
234
- const hits = (markers) => tokens.some((token) => markers.has(token));
235
- if (hits(FAST_MARKERS)) return { tier: "fast" };
236
- if (hits(BALANCED_MARKERS)) return { tier: "balanced" };
237
- if (hits(TOP_MARKERS)) return { tier: "top" };
238
- return { tier: "unknown" };
239
- }
240
-
241
281
  // packages/ai/agent/safeAgentSummary.ts
242
282
  function deriveCredentialGroup(ref) {
243
283
  if (!ref || typeof ref !== "string") return void 0;
@@ -444,7 +484,6 @@ function toSafeAgentSummary(record, options) {
444
484
  const credInfo = deriveCredentialGroup(record?.credentialGroup ?? rawCredRef);
445
485
  const credentialGroup = record?.credentialGroup ?? credInfo?.credentialGroup;
446
486
  const credentialKind = record?.credentialKind ?? credInfo?.credentialKind;
447
- const { tier } = resolveDefaultAgentTier(record?.model);
448
487
  const availability = resolveAgentAvailability(
449
488
  { nextAvailableAt, quota, quotaExhaustion },
450
489
  options?.now ?? Date.now()
@@ -457,7 +496,7 @@ function toSafeAgentSummary(record, options) {
457
496
  handle,
458
497
  introduction,
459
498
  model,
460
- tier,
499
+ modelTier: resolveModelTier(model),
461
500
  provider,
462
501
  apiSource,
463
502
  cliProvider,
@@ -469,6 +508,14 @@ function toSafeAgentSummary(record, options) {
469
508
  isFavorite: favStatus.isFavorite,
470
509
  favoritedAt: favStatus.favoritedAt,
471
510
  isPublic,
511
+ // 复用 platformPaidCall.ts 的唯一判据(该文件头明确它是「谁出钱」的真源):
512
+ // 自己写 billingSource === "platform_credits" 会与 199 门槛口径分叉——
513
+ // 例如 apiSource==="cli" 的本地 CLI Agent 在 resolveBillingSource 里会落到
514
+ // platform_credits,但 isPlatformPaidAgentCall 显式短路为「非平台垫付」。
515
+ requiresPaidApproval: isPlatformPaidAgentCall({
516
+ agentConfig: record ?? void 0,
517
+ callerUserId: currentUserId ?? void 0
518
+ }),
472
519
  ...economics ? { economics } : {},
473
520
  isOwned,
474
521
  isOAuth,
@@ -494,9 +541,12 @@ var COMPACT_AGENT_SUMMARY_FIELDS = [
494
541
  "agentKey",
495
542
  "name",
496
543
  "model",
497
- // 能力档弱先验(unknown = 模型名没给出信号,不推断强弱)。
498
- "tier",
544
+ "modelTier",
499
545
  "billingSource",
546
+ // 扣费授权判据:listAgents 默认走 compact 投影,缺了它模型在默认派发
547
+ // 流程里读不到「派它之前要先问用户」(2026-11-15 事故成因)。
548
+ // 与 ULTRA_COMPACT 白名单必须同时保留——两处任何一处缺失都等于该字段不存在。
549
+ "requiresPaidApproval",
500
550
  "availabilityStatus",
501
551
  "credentialGroup",
502
552
  "isFavorite",
@@ -545,8 +595,11 @@ var ULTRA_COMPACT_AGENT_SUMMARY_FIELDS = [
545
595
  "agentKey",
546
596
  "name",
547
597
  "model",
548
- "tier",
598
+ "modelTier",
549
599
  "billingSource",
600
+ // 扣费授权判据必须随投影一起走:精简投影里没有它,模型就看不到
601
+ // 「派它之前要先问用户」,等于该字段不存在(2026-11-15 事故的直接成因)。
602
+ "requiresPaidApproval",
550
603
  "availabilityStatus",
551
604
  "credentialGroup",
552
605
  "isFavorite",
@@ -574,6 +627,39 @@ function toUltraCompactAgentSummary(summary) {
574
627
  return compact;
575
628
  }
576
629
 
630
+ // packages/ai/agent/platformPaidCall.ts
631
+ var asTrimmed = (value) => typeof value === "string" ? value.trim() : "";
632
+ var hasOAuthCredentialShape = (agentConfig) => isOAuthApiKeyRef(agentConfig?.apiKeyRef) || isAntigravityOAuthAgent({
633
+ key: "platform-paid-call-probe",
634
+ apiKeyRef: agentConfig?.apiKeyRef ?? void 0,
635
+ provider: agentConfig?.provider ?? void 0,
636
+ customProviderUrl: agentConfig?.customProviderUrl ?? void 0
637
+ });
638
+ function isPlatformPaidAgentCall(probe) {
639
+ const agentConfig = probe?.agentConfig ?? {};
640
+ const authKind = asTrimmed(probe?.authKind);
641
+ if (authKind) return authKind === "platform-key";
642
+ if (asTrimmed(agentConfig.apiSource) === "cli") return false;
643
+ return resolveBillingSource({
644
+ local: agentConfig.local,
645
+ isLocal: agentConfig.isLocal,
646
+ cliProvider: agentConfig.cliProvider,
647
+ apiSource: agentConfig.apiSource,
648
+ provider: agentConfig.provider,
649
+ billingSource: agentConfig.billingSource,
650
+ // 形态证明而非记录自声明(见文件头):自声明 isOAuth 不足以证明 OAuth 通道归属。
651
+ isOAuth: hasOAuthCredentialShape(agentConfig),
652
+ apiKeyRef: agentConfig.apiKeyRef,
653
+ customProviderUrl: agentConfig.customProviderUrl,
654
+ isOwned: isOwnedAgentRecord(
655
+ agentConfig,
656
+ asTrimmed(probe?.callerUserId) || void 0
657
+ ),
658
+ userId: agentConfig.userId,
659
+ ownerId: agentConfig.ownerId
660
+ }) === "platform_credits";
661
+ }
662
+
577
663
  // packages/ai/agent/agentDiscovery.ts
578
664
  function isPreferredAgent(agent) {
579
665
  return agent.isFavorite === true || agent.isOwned === true || agent.isOAuth === true || agent.billingSource === "user_subscription" || agent.billingSource === "user_api" || agent.billingSource === "local";
@@ -635,6 +721,36 @@ function filterAgentsByScope(agents, scope) {
635
721
  if (scope === "public") return unique.filter((agent) => isPublicDiscoveryAgent(agent));
636
722
  return unique.filter((agent) => isPreferredAgent(agent) || agent.isPublic === true);
637
723
  }
724
+ function recommendPlanning(agents, caller, poolComplete) {
725
+ const callerKey = typeof caller?.agentKey === "string" && caller.agentKey.trim() ? caller.agentKey : void 0;
726
+ const current = callerKey ? agents.find((a) => a.agentKey === callerKey) : void 0;
727
+ const currentTier = callerKey ? resolveModelTier(caller?.effectiveModel ?? current?.model) : "unknown";
728
+ const base = {
729
+ condition: "when_planning_needed_and_candidate_suitable",
730
+ action: "self",
731
+ currentTier,
732
+ poolComplete,
733
+ requiresPaidApproval: false
734
+ };
735
+ if (caller?.runKind === "subtask") return { ...base, reason: "bounded_subtask" };
736
+ if (!callerKey) return { ...base, reason: "caller_unknown" };
737
+ if (currentTier === "unknown") return { ...base, reason: "caller_tier_unknown" };
738
+ if (!poolComplete) return { ...base, reason: "pool_incomplete" };
739
+ const ranks = { easy: 0, normal: 1, complex: 2, extreme: 3 };
740
+ const higher = agents.filter((a) => a.agentKey && a.agentKey !== callerKey && a.modelTier !== "unknown" && ranks[a.modelTier] > ranks[currentTier]);
741
+ const free = higher.filter((a) => a.requiresPaidApproval === false);
742
+ free.sort((a, b) => ranks[b.modelTier] - ranks[a.modelTier]);
743
+ const best = free[0];
744
+ if (best) return {
745
+ ...base,
746
+ action: "delegate",
747
+ reason: "higher_suitable_agent",
748
+ agentKey: best.agentKey,
749
+ recommendedTier: best.modelTier
750
+ };
751
+ if (higher.length) return { ...base, reason: "paid_approval_required", requiresPaidApproval: true };
752
+ return { ...base, reason: "no_higher_suitable_agent" };
753
+ }
638
754
  function resolvePaginationArgs(args) {
639
755
  let limit;
640
756
  let offset;
@@ -773,6 +889,11 @@ function buildAgentDiscoveryResult(options) {
773
889
  ...isTruncated ? { truncated: true } : {},
774
890
  unavailableCount,
775
891
  agents: projectedAgents,
892
+ planningRecommendation: recommendPlanning(
893
+ sortedAgents,
894
+ options.caller,
895
+ !isTruncated && scope === "all" && !hasQuery && !options.poolRestricted
896
+ ),
776
897
  credentialGroups
777
898
  };
778
899
  }
@@ -782,11 +903,12 @@ function toDiscoverySafeAgentSummary(record, options) {
782
903
  }
783
904
 
784
905
  export {
785
- resolveBillingSource,
906
+ isGptProModel,
907
+ shouldBlockForGptPro,
908
+ isPlatformPaidAgentCall,
786
909
  deriveCredentialGroup,
787
910
  deriveCustomProviderCredentialGroup,
788
911
  summarizeCredentialGroups,
789
- isOwnedAgentRecord,
790
912
  resolveDiscoveryScope,
791
913
  resolvePaginationArgs,
792
914
  matchesAgentQuery,
@@ -5,21 +5,21 @@ import {
5
5
  ANTIGRAVITY_CLOUD_CODE_BASE_URL,
6
6
  isAntigravityCloudCodeBaseUrl,
7
7
  isAntigravityOAuthAgent
8
- } from "./chunk-KIM6CLW5.js";
8
+ } from "./chunk-7JGMNKKG.js";
9
9
  import {
10
10
  isOpenAiResponsesModel,
11
11
  resolvePlatformChatCompletionsEndpoint,
12
12
  resolvePlatformResponsesEndpoint
13
- } from "./chunk-YUA6OAH5.js";
13
+ } from "./chunk-HBRDSQ3M.js";
14
14
  import {
15
15
  findModelConfig
16
- } from "./chunk-SM3NSZJV.js";
17
- import {
18
- asTrimmedLowercaseString
19
- } from "./chunk-QSJ3HFEF.js";
16
+ } from "./chunk-CD3RU7XL.js";
20
17
  import {
21
18
  asOptionalTrimmedString
22
19
  } from "./chunk-G3SUCT4W.js";
20
+ import {
21
+ asTrimmedLowercaseString
22
+ } from "./chunk-QSJ3HFEF.js";
23
23
 
24
24
  // packages/agent-runtime/agentCallPlan.ts
25
25
  var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";