nolo-cli 0.225.0-alpha.1 → 0.225.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 (245) hide show
  1. package/{_executeModel-L5VHAXSU.js → _executeModel-UCWDB72C.js} +79 -73
  2. package/{action-CK64LS6S.js → action-24MZYW2B.js} +11 -8
  3. package/{addContentAction-EQXMFNPR.js → addContentAction-HEMCSSHT.js} +14 -13
  4. package/{addDialogAgentAction-RSDZDASD.js → addDialogAgentAction-SQYDOXHA.js} +15 -14
  5. package/{agentDeleteCommand-4WC7INCX.js → agentDeleteCommand-P7O3ACNJ.js} +131 -124
  6. package/{agentEmailCommands-3XFR6WY7.js → agentEmailCommands-A5BRSYWK.js} +134 -123
  7. package/{agentFavoriteCommands-2LKGKSUD.js → agentFavoriteCommands-7LOP3HUD.js} +5 -5
  8. package/{agentGrantCommands-QQV4N4JW.js → agentGrantCommands-L6O2HVJI.js} +5 -5
  9. package/{agentListCommands-BBCP5XYW.js → agentListCommands-LDRCOOMO.js} +112 -496
  10. package/{agentMachineCommands-YZDCOLQL.js → agentMachineCommands-AYL53KJV.js} +65 -58
  11. package/{agentProviderCommands-7BSJH7TO.js → agentProviderCommands-N5EA3ED2.js} +6 -6
  12. package/{agentPullCommand-XN6ZPBUW.js → agentPullCommand-QQQZSC6S.js} +6 -6
  13. package/agentRecordCommands-FICBZ57C.js +188 -0
  14. package/{agentRunCommand-NHYBV4G5.js → agentRunCommand-CTXQGDUM.js} +135 -120
  15. package/{agentRunControl-7A2FOXIJ.js → agentRunControl-CO6BASZF.js} +20 -14
  16. package/{agentRuntimeLocal-GSTYFEX4.js → agentRuntimeLocal-5YN4D5WT.js} +48 -41
  17. package/{agentSlice-O6IGTM3Y.js → agentSlice-DJ5D4DU4.js} +18 -17
  18. package/{appDeleteCommands-L7HL4AWF.js → appDeleteCommands-B4E7N7M2.js} +58 -51
  19. package/{appDeployCommands-SGSUNFZR.js → appDeployCommands-E4DTXRRM.js} +58 -51
  20. package/{appDeployStatusCommands-AAA3XD54.js → appDeployStatusCommands-FCNHYHZM.js} +58 -51
  21. package/{appGetCommands-LN72GAOA.js → appGetCommands-4DXSQHUZ.js} +58 -51
  22. package/{appListCommands-IJQQ3VND.js → appListCommands-2NN5E4F6.js} +58 -51
  23. package/{authCommand-7JXW54U4.js → authCommand-47DR6GZT.js} +33 -28
  24. package/{authCommands-YDNAIDEY.js → authCommands-ZZ3L5IFM.js} +16 -11
  25. package/{builtinSkillRegistry-PXH7EGQB.js → builtinSkillRegistry-AYWYQVA4.js} +5 -5
  26. package/{chromeOpsCommands-YKX2QX3A.js → chromeOpsCommands-VZWAY2KR.js} +6 -6
  27. package/{chunk-YDBMZ7FV.js → chunk-24GVXSWK.js} +3 -3
  28. package/{chunk-JCK3EFZS.js → chunk-25OCZXSX.js} +63 -32
  29. package/{chunk-P2ZLUIW2.js → chunk-2BSLGODA.js} +350 -25
  30. package/chunk-2SXN7LAY.js +15 -0
  31. package/{chunk-N5PQJKCY.js → chunk-2XMKW2OY.js} +13 -12
  32. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  33. package/{chunk-UKS7D2NL.js → chunk-3NFWMSTA.js} +111 -26
  34. package/{chunk-TZEP5J4A.js → chunk-3V6JT6WN.js} +2935 -1412
  35. package/{chunk-SBVTHMEG.js → chunk-4FE3IWRE.js} +1 -1
  36. package/{chunk-4JVNURX4.js → chunk-4YFC3DWW.js} +68 -16
  37. package/chunk-4ZCTKB27.js +31 -0
  38. package/chunk-53W5BXLN.js +340 -0
  39. package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
  40. package/{chunk-VFBVA3U2.js → chunk-5TJE4QCL.js} +131 -40
  41. package/{chunk-YXMBJ7UH.js → chunk-6BGJHJRN.js} +21 -21
  42. package/chunk-6D25V6CB.js +133 -0
  43. package/chunk-6RSNVJGO.js +279 -0
  44. package/{chunk-IZIN2UNJ.js → chunk-6X3CS6NJ.js} +203 -24
  45. package/{chunk-XZGQ6ZCV.js → chunk-6XBOPKUH.js} +27 -90
  46. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  47. package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
  48. package/chunk-7NIBQ4HY.js +138 -0
  49. package/{chunk-7Z6EW7AH.js → chunk-7OTNBI77.js} +13 -6
  50. package/{chunk-HOK3ILHA.js → chunk-7Q7MKJZN.js} +590 -330
  51. package/{chunk-KZU52OJ5.js → chunk-7U2TFUWW.js} +6 -6
  52. package/{chunk-IUD7YR3B.js → chunk-B72AFRR2.js} +15 -15
  53. package/{chunk-4HFTBHBF.js → chunk-BDERPCJW.js} +8 -8
  54. package/chunk-BEM6LPD2.js +734 -0
  55. package/chunk-BIDSIRTS.js +307 -0
  56. package/{chunk-6J4TTPS2.js → chunk-BIJTI5SX.js} +5 -5
  57. package/chunk-BWW6WRX6.js +1438 -0
  58. package/{chunk-AGP3YSEC.js → chunk-C3GOEQJF.js} +46 -1
  59. package/chunk-C5A54QS7.js +108 -0
  60. package/{chunk-MOMR7NMG.js → chunk-C646JEUV.js} +2 -2
  61. package/{chunk-YI5CDUJD.js → chunk-CT6GT2BG.js} +9 -9
  62. package/{chunk-PVZY6P3S.js → chunk-CZLSTOVM.js} +2 -2
  63. package/{chunk-LJSNEV7M.js → chunk-DGUUOHBF.js} +8 -8
  64. package/{chunk-C4WTX5TU.js → chunk-DIBQXNGW.js} +2 -2
  65. package/{chunk-YFLVRVYK.js → chunk-DLT2DN4M.js} +1 -1
  66. package/{chunk-K44HIUBX.js → chunk-DLTMAXLF.js} +13 -13
  67. package/chunk-DVYAFH2Q.js +103 -0
  68. package/{chunk-SOG7OEXX.js → chunk-DWWUVRB5.js} +1 -1
  69. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  70. package/{chunk-GNHMRBYZ.js → chunk-EBKHA63G.js} +106 -14
  71. package/{chunk-KC4SCKXO.js → chunk-EIFSCI4C.js} +990 -1370
  72. package/{chunk-F3YK7KIU.js → chunk-EW37CXCQ.js} +4 -4
  73. package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
  74. package/{chunk-2VUZSVAS.js → chunk-F3FQPVHE.js} +57 -20
  75. package/{chunk-ZRAARRA3.js → chunk-FCAMGBLY.js} +1399 -2978
  76. package/{chunk-AK5O76CC.js → chunk-FPMPWNVQ.js} +3 -3
  77. package/{chunk-WQEMD4Z4.js → chunk-FSIEHQNH.js} +420 -120
  78. package/{chunk-FNDSBM4J.js → chunk-FXX6VFMV.js} +571 -348
  79. package/{chunk-7XS4W5KP.js → chunk-G6OPRPXH.js} +128 -149
  80. package/{chunk-PMDVQBGA.js → chunk-GAHJLSDO.js} +14 -7
  81. package/{chunk-2TIQO6TC.js → chunk-GCVFX6ZL.js} +206 -308
  82. package/{chunk-P25E3CKY.js → chunk-H6CHPU6M.js} +4 -4
  83. package/chunk-HNWZJI4N.js +33394 -0
  84. package/{chunk-S2NTVGA2.js → chunk-I2OYPD3Y.js} +1 -1
  85. package/{chunk-KNIIRXHF.js → chunk-IPRPYKBP.js} +46 -8
  86. package/{chunk-C4VAR65S.js → chunk-IUXBKS5L.js} +200 -120
  87. package/{chunk-JVRQ6YVK.js → chunk-JBWXPACD.js} +1 -1
  88. package/{chunk-Z6USB65D.js → chunk-KGIIZXPL.js} +347 -14
  89. package/chunk-KK3FCYZM.js +647 -0
  90. package/{chunk-GBZ4YKEO.js → chunk-KOIDLCAQ.js} +8 -8
  91. package/{chunk-2ZKFCIJJ.js → chunk-LCQJH7KN.js} +1 -1
  92. package/{chunk-N5Z2V73W.js → chunk-LELADM5Q.js} +1 -1
  93. package/{chunk-4NA3YTBC.js → chunk-LMFMV5UC.js} +8 -8
  94. package/{chunk-XN23AUVU.js → chunk-LMZRXDWG.js} +8 -5
  95. package/{chunk-EWPDMS4N.js → chunk-LN4ZVSO7.js} +30 -15
  96. package/{chunk-GOAPXKQU.js → chunk-LT3DMEIB.js} +4 -4
  97. package/{chunk-GGKNJ42M.js → chunk-LYDEFPQP.js} +18 -108
  98. package/{chunk-FTQWYWUI.js → chunk-MDVP5TLI.js} +1 -1
  99. package/{chunk-EOWLBDY6.js → chunk-MM73SP4K.js} +1 -1
  100. package/chunk-MVOZ22RZ.js +26 -0
  101. package/{chunk-3QFLXA24.js → chunk-N6EN3HK3.js} +3 -3
  102. package/{chunk-D726I5AZ.js → chunk-NBB2EBQD.js} +2 -2
  103. package/{chunk-DISQCYPE.js → chunk-NL7J2J5Z.js} +6 -6
  104. package/{chunk-JM5C4EUA.js → chunk-NQQL2DKF.js} +6 -6
  105. package/{chunk-LS2MGTUS.js → chunk-NWWQY2J5.js} +15 -15
  106. package/{chunk-TXGQ4O5S.js → chunk-OATIWAKN.js} +20 -174
  107. package/{chunk-KYH7XW3K.js → chunk-OJRTTERA.js} +77 -2
  108. package/{chunk-VV7TXWOC.js → chunk-OYHJ4TW7.js} +6 -6
  109. package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
  110. package/{chunk-2VA6TU4I.js → chunk-QES2NCVM.js} +17 -14
  111. package/{chunk-WG2LFJYB.js → chunk-QGMIUVBT.js} +39 -30
  112. package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
  113. package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
  114. package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
  115. package/{chunk-AMEOV5VZ.js → chunk-S25VJYXV.js} +41 -35
  116. package/chunk-SR4FE5VD.js +9 -0
  117. package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
  118. package/{chunk-GVGOEMNV.js → chunk-T444ENEC.js} +3 -3
  119. package/{chunk-67BE44IS.js → chunk-TE2XH4KH.js} +1 -1
  120. package/{chunk-5RKUPJYL.js → chunk-TFGGNRT6.js} +11 -3
  121. package/{chunk-ZH6MUQEO.js → chunk-TTEBPPUV.js} +1 -1
  122. package/{chunk-QVBXJNZ2.js → chunk-TUSTONB3.js} +1 -1
  123. package/{chunk-AVHRSJUH.js → chunk-TXFYIWAW.js} +32 -25
  124. package/{chunk-KOXKKHFE.js → chunk-TXQVH72L.js} +9 -4
  125. package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
  126. package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
  127. package/{chunk-KDAGMRDA.js → chunk-UAHUJ4HH.js} +100 -32
  128. package/{chunk-BGGHA5DV.js → chunk-UAOFSUG7.js} +1 -1
  129. package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
  130. package/chunk-UKSKCDBG.js +62 -0
  131. package/{chunk-KEN3N2TN.js → chunk-VMJVAJ6W.js} +13 -10
  132. package/{chunk-SOF4OWDM.js → chunk-VS276URX.js} +0 -2
  133. package/chunk-WDWZPASX.js +29 -0
  134. package/chunk-WFGNWWJI.js +326 -0
  135. package/{chunk-UYOICCYG.js → chunk-WHO3LYDW.js} +64 -89
  136. package/{chunk-UJKTI5PG.js → chunk-WRKMXMU7.js} +2 -1
  137. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  138. package/{chunk-QLFCTYRH.js → chunk-X37RQEA3.js} +17 -10
  139. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  140. package/chunk-X7IA2B7R.js +166 -0
  141. package/{chunk-GIABSSWQ.js → chunk-XAFOLWLU.js} +4 -4
  142. package/{chunk-45LZIYXB.js → chunk-XNEDFWT4.js} +2 -2
  143. package/{chunk-EOJZGQAE.js → chunk-Y5RN44VH.js} +103 -100
  144. package/{chunk-OB6DVWPF.js → chunk-YFRJAE3R.js} +319 -95
  145. package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
  146. package/{chunk-3KNEE64G.js → chunk-YMCSR7PA.js} +14 -14
  147. package/chunk-YUZ2DAIH.js +34 -0
  148. package/chunk-Z6YTCDU4.js +24 -0
  149. package/{chunk-XQBIZRGW.js → chunk-ZBQ5UGYY.js} +3 -3
  150. package/{chunk-VREDDN25.js → chunk-ZQUCJBS4.js} +14 -9
  151. package/{chunk-UEKXWO7A.js → chunk-ZT3DYK5T.js} +15 -4
  152. package/{chunk-LM2PS3YS.js → chunk-ZTLTDUV6.js} +24 -11
  153. package/{chunk-KN3HEZIQ.js → chunk-ZVOL2MAJ.js} +1 -1
  154. package/{cliAgentConfigHelpers-KICKKNYQ.js → cliAgentConfigHelpers-RFR7ZCSK.js} +12 -12
  155. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
  156. package/{cliEnvHelpers-VPSJ4XWC.js → cliEnvHelpers-CNMP3RDX.js} +1 -1
  157. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  158. package/{cliLocalAgentRecordReader-6FXGFBI3.js → cliLocalAgentRecordReader-AJ4UKHKT.js} +51 -45
  159. package/{commandRegistry-HJDPQSQ4.js → commandRegistry-IHWZVV4G.js} +98 -94
  160. package/{contentThunks-I6OR5ENG.js → contentThunks-YQRCBDKF.js} +38 -35
  161. package/{cooldownCommands-X7P5M2V5.js → cooldownCommands-W67DE765.js} +4 -4
  162. package/{createAgentAutomationAction-7BCCTWO5.js → createAgentAutomationAction-ERSDNR4R.js} +38 -35
  163. package/{createDialogAction-CU27KSCJ.js → createDialogAction-QXC7JZPE.js} +39 -37
  164. package/{createPageAction-CWRTEYVA.js → createPageAction-RLZ7776F.js} +40 -37
  165. package/{db-CS4ZJQKV.js → db-6NRZLEW2.js} +10 -7
  166. package/{dbSlice-ZJPDIFER.js → dbSlice-7M2ESEUO.js} +13 -12
  167. package/{deleteFile-Q3YDB4ML.js → deleteFile-WO6WSSNK.js} +10 -7
  168. package/{dialogCommands-OPTRZWTE.js → dialogCommands-UIRO4QNN.js} +62 -56
  169. package/dialogMessageRecord-OAV77LT7.js +7 -0
  170. package/{dialogNotifyCommand-77B57PL6.js → dialogNotifyCommand-VDUFYBZV.js} +14 -14
  171. package/{dialogSlice-XODSLDHY.js → dialogSlice-A4U3C76D.js} +36 -33
  172. package/{dialogUsageCommand-HTVPR2CX.js → dialogUsageCommand-SEC6UZWM.js} +3 -3
  173. package/{docCreateCommands-36WS33BK.js → docCreateCommands-MHPYTJWR.js} +56 -49
  174. package/{docDeleteCommands-C4CS4XLF.js → docDeleteCommands-VYULMBAQ.js} +58 -51
  175. package/{docReadCommands-QZMSFMPN.js → docReadCommands-FV3GGZ7V.js} +56 -49
  176. package/{docStore-TVN4SNVE.js → docStore-AWWI72FA.js} +15 -14
  177. package/{docUpdateCommands-BYI64HVV.js → docUpdateCommands-JNS3HX7F.js} +56 -49
  178. package/fetchMessages-TQEUZD7H.js +2 -2
  179. package/{getPricing-VNGFM4PN.js → getPricing-U5AR7ZHS.js} +5 -5
  180. package/{handleSendMessageAction-NSEMVHWX.js → handleSendMessageAction-WDJOUDNV.js} +68 -63
  181. package/{hostCredentialCreate-WBZY7DZB.js → hostCredentialCreate-H3FF2SAO.js} +123 -111
  182. package/index.js +56 -18
  183. package/keys-RWF7UCB4.js +2 -2
  184. package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
  185. package/{localDialogRead-SVTPA5GY.js → localDialogRead-3T2KMCRC.js} +1 -1
  186. package/{localRuntimeAdapter-OAIWERFA.js → localRuntimeAdapter-JAQQXZJP.js} +126 -113
  187. package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-7DKIT7UH.js} +4 -2
  188. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
  189. package/{machineCommands-OI37ZUQ4.js → machineCommands-WYOFNB5I.js} +146 -120
  190. package/{machineWsRunDispatch-73HKPV6D.js → machineWsRunDispatch-Y7UIAZNM.js} +118 -107
  191. package/markdownToSlate-KIYM7B3P.js +8 -0
  192. package/mcpLocalAuthorizeCommand-SCYEFLRK.js +106 -0
  193. package/{memberThunks-JRYNONYV.js → memberThunks-DIITWU4M.js} +22 -17
  194. package/{memoryCommands-5WC3T66U.js → memoryCommands-BC6REPQB.js} +4 -4
  195. package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
  196. package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
  197. package/package.json +1 -1
  198. package/{projectArchive-GVEARCOG.js → projectArchive-IZJXBW5N.js} +43 -40
  199. package/{providerPresetApply-J3WMRPD2.js → providerPresetApply-2QWXPJXZ.js} +6 -6
  200. package/{providerRegistry-KJGB5XWS.js → providerRegistry-W4LCKK6V.js} +6 -6
  201. package/{read-Q7GOHGNP.js → read-OBLJNMA2.js} +9 -8
  202. package/{readDocTool-Z5OQ6422.js → readDocTool-QQZ4DAER.js} +1 -1
  203. package/{readlineWorkspace-5DWUGNSU.js → readlineWorkspace-WF3SWZGR.js} +7055 -5248
  204. package/rememberExplicit-CPAPONSI.js +15 -0
  205. package/{removeDialogAgentAction-U3F2MNAY.js → removeDialogAgentAction-HC3SOY3G.js} +17 -16
  206. package/{runAgentClientLoop-RDXIPF34.js → runAgentClientLoop-Z7V6TA3O.js} +97 -72
  207. package/{runtimeDoctorCommands-UXKXYBW6.js → runtimeDoctorCommands-KX6YLPWV.js} +17 -17
  208. package/{secretCommands-LJXOOYA7.js → secretCommands-STRAX275.js} +4 -4
  209. package/{setDialogExtraReferencesAction-G3WSJ7EM.js → setDialogExtraReferencesAction-DDZUQPY6.js} +16 -15
  210. package/{setPrimaryDialogAgentAction-6FHAHZBB.js → setPrimaryDialogAgentAction-EB67OMAJ.js} +17 -16
  211. package/{settingThunks-AXTBX3Q5.js → settingThunks-TN6GFASU.js} +181 -62
  212. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
  213. package/{spaceCommands-GUKMDRWN.js → spaceCommands-HBYQUVJI.js} +61 -54
  214. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  215. package/{streamAgentChatTurn-XEYQZPDJ.js → streamAgentChatTurn-CM7QQXOS.js} +178 -173
  216. package/{switchDialogAgentAction-UOFIAGPL.js → switchDialogAgentAction-XY5TKQQE.js} +15 -14
  217. package/{tableCommands-HITDSLHS.js → tableCommands-MXFL3JIT.js} +13 -10
  218. package/{toolApiClient-OGQEBQVX.js → toolApiClient-53YMJ2G6.js} +8 -6
  219. package/{tools-6DFTHCFX.js → tools-AT6H73LD.js} +66 -62
  220. package/tuiRestart-272SAYSK.js +41 -0
  221. package/{tuiSummaryLlmCaller-7WLUKNP2.js → tuiSummaryLlmCaller-K2OVRVHG.js} +20 -19
  222. package/{updateCommands-RJVCRSBP.js → updateCommands-O3BOVVVN.js} +8 -6
  223. package/{updateDialogTitleAction-AMSBV2H7.js → updateDialogTitleAction-PGY4UPLH.js} +38 -35
  224. package/{usageCommand-YPJ2ZI2F.js → usageCommand-SCF3ROV2.js} +4 -4
  225. package/{usageRebuildCommand-FERQO74C.js → usageRebuildCommand-K5WPIBA5.js} +5 -5
  226. package/webapi-24RZDIIQ.js +2488 -0
  227. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-WJDUZLEO.js} +2 -2
  228. package/workContext-Y3ADAPZU.js +14 -0
  229. package/workContextAccess-UZHDLBUR.js +11 -0
  230. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  231. package/agentRecordCommands-KLYKI4Z7.js +0 -177
  232. package/chunk-2THCNKE4.js +0 -147
  233. package/chunk-2WZXXAQD.js +0 -57
  234. package/chunk-5ZMIIR23.js +0 -265
  235. package/chunk-652XYZGP.js +0 -352
  236. package/chunk-BJF2MHJ3.js +0 -118
  237. package/chunk-KEPOVMF4.js +0 -91
  238. package/chunk-QZI44GWV.js +0 -776
  239. package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
  240. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  241. package/{chunk-SNBZZPYH.js → chunk-OQHIVPG4.js} +3 -3
  242. package/{chunk-47ITIXO7.js → chunk-USGHJSGO.js} +3 -3
  243. package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
  244. package/{offlineMarxistsAgentCommand-4IC3Y4C6.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +3 -3
  245. package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-HFJIN5IZ.js} +8 -8
@@ -1,6 +1,3 @@
1
- import {
2
- resolveObservedSpeed
3
- } from "./chunk-AMWMV56B.js";
4
1
  import {
5
2
  decorateAgentsWithPublicStatusAcrossServers,
6
3
  listFavoriteAgentIdsAcrossServers,
@@ -10,58 +7,67 @@ import {
10
7
  listRemotePublicAgents,
11
8
  normalizeListedAgent,
12
9
  parseAgentListArgs
13
- } from "./chunk-XN23AUVU.js";
14
- import {
15
- buildSpaceLookup,
16
- getSpaceContentKeys
17
- } from "./chunk-ID4G2MAR.js";
18
- import {
19
- readLiveDbRecordAfterTombstoneMerge
20
- } from "./chunk-FTQWYWUI.js";
10
+ } from "./chunk-LMZRXDWG.js";
21
11
  import {
22
12
  refreshSubscriptionQuotas
23
- } from "./chunk-QVBXJNZ2.js";
13
+ } from "./chunk-TUSTONB3.js";
24
14
  import {
25
15
  getReadableCliDb
26
- } from "./chunk-YFLVRVYK.js";
16
+ } from "./chunk-DLT2DN4M.js";
27
17
  import {
28
18
  applyCredentialAvailability,
29
19
  clearCredentialAvailabilityIfMarkedAt,
30
20
  readCredentialAvailability,
31
21
  readEffectiveCredentialEntry
32
- } from "./chunk-FIYSMXHY.js";
33
- import {
34
- queryUserRecords,
35
- readDbRecord
36
- } from "./chunk-2VA6TU4I.js";
22
+ } from "./chunk-WWTSEBDF.js";
37
23
  import {
38
24
  buildAgentDiscoveryResult,
25
+ injectSpeedContextIntoListAgentsResult,
26
+ isLocalDispatchSpeedSource,
27
+ isServerDispatchSpeedSource,
39
28
  matchesAgentQuery,
40
29
  resolvePaginationArgs,
41
30
  summarizeCredentialGroups,
42
31
  toDiscoverySafeAgentSummary
43
- } from "./chunk-QZI44GWV.js";
44
- import "./chunk-GBWGPTA7.js";
32
+ } from "./chunk-BWW6WRX6.js";
33
+ import "./chunk-AMWMV56B.js";
34
+ import {
35
+ buildSpaceLookup,
36
+ getSpaceContentKeys
37
+ } from "./chunk-ID4G2MAR.js";
38
+ import {
39
+ readLiveDbRecordAfterTombstoneMerge
40
+ } from "./chunk-MDVP5TLI.js";
41
+ import {
42
+ queryUserRecords,
43
+ readDbRecord
44
+ } from "./chunk-QES2NCVM.js";
45
+ import "./chunk-YUZ2DAIH.js";
45
46
  import "./chunk-UEILX4EV.js";
47
+ import "./chunk-GBWGPTA7.js";
48
+ import {
49
+ listRunRecords
50
+ } from "./chunk-FSIEHQNH.js";
51
+ import "./chunk-4FE3IWRE.js";
52
+ import "./chunk-S25VJYXV.js";
46
53
  import "./chunk-BV3FLP2L.js";
47
- import "./chunk-2ZKFCIJJ.js";
54
+ import "./chunk-LCQJH7KN.js";
48
55
  import "./chunk-BR3GT6MR.js";
49
- import "./chunk-KC4SCKXO.js";
56
+ import "./chunk-EIFSCI4C.js";
57
+ import "./chunk-BEM6LPD2.js";
50
58
  import "./chunk-ZNFJWEN4.js";
51
- import "./chunk-VFBVA3U2.js";
52
- import "./chunk-CHOZJMJS.js";
59
+ import "./chunk-5TJE4QCL.js";
53
60
  import "./chunk-PWTNI4N7.js";
54
61
  import "./chunk-AL3TYDIF.js";
55
- import "./chunk-VV7TXWOC.js";
62
+ import "./chunk-OYHJ4TW7.js";
56
63
  import "./chunk-HNUWUO75.js";
57
- import "./chunk-LKA64WH4.js";
58
- import "./chunk-UEKXWO7A.js";
59
- import "./chunk-2WZXXAQD.js";
60
- import "./chunk-KNIIRXHF.js";
61
- import "./chunk-SOG7OEXX.js";
64
+ import "./chunk-CHOZJMJS.js";
65
+ import "./chunk-ZT3DYK5T.js";
66
+ import "./chunk-DWWUVRB5.js";
62
67
  import "./chunk-56GBUMO5.js";
63
- import "./chunk-2TIQO6TC.js";
64
- import "./chunk-C4VAR65S.js";
68
+ import "./chunk-GCVFX6ZL.js";
69
+ import "./chunk-IUXBKS5L.js";
70
+ import "./chunk-7NIBQ4HY.js";
65
71
  import {
66
72
  DEFAULT_PROVIDER_RETRY_MS,
67
73
  formatQuotaSummary,
@@ -70,492 +76,84 @@ import {
70
76
  resolveCredentialCandidateKeys,
71
77
  resolveCredentialKeyWithFallback,
72
78
  shouldClearCooldownFromQuota
73
- } from "./chunk-HOCHUZQ7.js";
74
- import "./chunk-SOF4OWDM.js";
75
- import "./chunk-JM5C4EUA.js";
76
- import "./chunk-E2BESSAW.js";
79
+ } from "./chunk-QJTZ76CP.js";
80
+ import "./chunk-VS276URX.js";
81
+ import "./chunk-NQQL2DKF.js";
82
+ import "./chunk-X4O7FJF5.js";
83
+ import "./chunk-LKA64WH4.js";
84
+ import "./chunk-BYXBJQAS.js";
85
+ import "./chunk-IPRPYKBP.js";
77
86
  import "./chunk-TLE77UJ5.js";
78
- import "./chunk-EOWLBDY6.js";
79
- import "./chunk-DISQCYPE.js";
87
+ import "./chunk-WFGNWWJI.js";
88
+ import "./chunk-NL7J2J5Z.js";
89
+ import "./chunk-MM73SP4K.js";
80
90
  import "./chunk-2MBTWINN.js";
81
- import "./chunk-LM2PS3YS.js";
91
+ import "./chunk-ZTLTDUV6.js";
82
92
  import "./chunk-5ZUL4CUO.js";
83
- import "./chunk-IZIN2UNJ.js";
93
+ import "./chunk-6X3CS6NJ.js";
84
94
  import "./chunk-H57T64RA.js";
85
95
  import "./chunk-UKZX3NHN.js";
96
+ import "./chunk-SR4FE5VD.js";
86
97
  import "./chunk-5MMAK75Q.js";
87
- import "./chunk-47ITIXO7.js";
98
+ import "./chunk-USGHJSGO.js";
99
+ import "./chunk-OQHIVPG4.js";
88
100
  import "./chunk-KX6YBIHG.js";
89
- import "./chunk-SNBZZPYH.js";
90
101
  import "./chunk-DWLEOOGR.js";
91
102
  import "./chunk-OW765XBU.js";
92
103
  import "./chunk-7DPNBQSV.js";
93
- import "./chunk-62HXNQVV.js";
94
- import "./chunk-EWPDMS4N.js";
95
- import "./chunk-GNHMRBYZ.js";
104
+ import "./chunk-VMJVAJ6W.js";
105
+ import "./chunk-EWQ3HGNZ.js";
106
+ import "./chunk-PSCNXBYA.js";
107
+ import "./chunk-G7Y4GXTY.js";
108
+ import "./chunk-6UBGXX2W.js";
109
+ import "./chunk-4ZCTKB27.js";
110
+ import "./chunk-EBKHA63G.js";
96
111
  import "./chunk-6OVNSQHN.js";
97
112
  import "./chunk-W6RFEDN4.js";
98
- import "./chunk-KN3HEZIQ.js";
99
- import "./chunk-UJKTI5PG.js";
113
+ import "./chunk-ZVOL2MAJ.js";
114
+ import "./chunk-WRKMXMU7.js";
100
115
  import "./chunk-M2EJHDJP.js";
101
- import {
102
- createKey,
103
- createTokenKey
104
- } from "./chunk-SYTHYBMI.js";
116
+ import "./chunk-SYTHYBMI.js";
105
117
  import "./chunk-OJKUU3LP.js";
106
- import "./chunk-YZMNK53S.js";
107
118
  import "./chunk-I42VC5KR.js";
108
- import "./chunk-JWXITTQB.js";
109
- import "./chunk-L5I543VB.js";
119
+ import "./chunk-YZMNK53S.js";
120
+ import "./chunk-U6VC4MU4.js";
121
+ import "./chunk-5HUO7SEX.js";
122
+ import "./chunk-YGDYYFRX.js";
123
+ import "./chunk-2SXN7LAY.js";
110
124
  import "./chunk-KHCLMKZZ.js";
125
+ import {
126
+ parseUserIdFromAuthToken,
127
+ readOption,
128
+ resolveAuthToken,
129
+ resolveServerCandidates,
130
+ resolveServerUrl
131
+ } from "./chunk-BIDSIRTS.js";
132
+ import "./chunk-OLZBQWZU.js";
133
+ import "./chunk-LCBAMY2M.js";
111
134
  import "./chunk-4O22PGNQ.js";
112
135
  import {
113
136
  t
114
- } from "./chunk-OB6DVWPF.js";
115
- import {
116
- listRunRecords
117
- } from "./chunk-WQEMD4Z4.js";
118
- import "./chunk-SBVTHMEG.js";
119
- import "./chunk-AMEOV5VZ.js";
120
- import "./chunk-KEN3N2TN.js";
121
- import "./chunk-EWQ3HGNZ.js";
122
- import "./chunk-PSCNXBYA.js";
123
- import "./chunk-4NA3YTBC.js";
124
- import "./chunk-45LZIYXB.js";
137
+ } from "./chunk-YFRJAE3R.js";
138
+ import "./chunk-776CXKMX.js";
139
+ import "./chunk-LN4ZVSO7.js";
140
+ import "./chunk-LMFMV5UC.js";
141
+ import "./chunk-XNEDFWT4.js";
125
142
  import {
126
143
  toErrorMessage
127
144
  } from "./chunk-HNMXYYJR.js";
128
145
  import "./chunk-3EUW3WEO.js";
129
- import "./chunk-KYH7XW3K.js";
146
+ import "./chunk-OJRTTERA.js";
130
147
  import "./chunk-JRTNUU5Z.js";
131
148
  import "./chunk-KUG52IAP.js";
132
- import "./chunk-OBSEKCVK.js";
133
- import "./chunk-QSJ3HFEF.js";
134
- import "./chunk-U6VC4MU4.js";
135
149
  import "./chunk-WWC7I6TA.js";
136
- import {
137
- parseUserIdFromAuthToken,
138
- readOption,
139
- resolveAuthToken,
140
- resolveServerCandidates,
141
- resolveServerUrl
142
- } from "./chunk-2THCNKE4.js";
143
- import "./chunk-OLZBQWZU.js";
144
- import "./chunk-LCBAMY2M.js";
145
150
  import "./chunk-G3SUCT4W.js";
146
151
  import "./chunk-4SN6J65J.js";
147
152
  import "./chunk-CF7PE763.js";
148
- import "./chunk-G7Y4GXTY.js";
149
- import "./chunk-6UBGXX2W.js";
153
+ import "./chunk-U4VSBDO5.js";
154
+ import "./chunk-QSJ3HFEF.js";
150
155
  import "./chunk-U67V476Y.js";
151
156
 
152
- // packages/ai/agent/speedSampleCache.ts
153
- var SPEED_SAMPLE_DISK_CACHE_TTL_MS = 10 * 6e4;
154
- var SPEED_SAMPLE_SCAN_BUDGET_MS = 2500;
155
- var SPEED_SAMPLE_CACHE_VERSION = 4;
156
- var isFiniteNumber = (value) => typeof value === "number" && Number.isFinite(value);
157
- var sanitizeSample = (value) => {
158
- if (!value || typeof value !== "object") return null;
159
- const sample = value;
160
- const clean = {};
161
- if (isFiniteNumber(sample.firstOutputMs)) clean.firstOutputMs = sample.firstOutputMs;
162
- if (isFiniteNumber(sample.callDurationMs)) clean.callDurationMs = sample.callDurationMs;
163
- if (isFiniteNumber(sample.output_tokens)) clean.output_tokens = sample.output_tokens;
164
- if (isFiniteNumber(sample.t)) clean.t = sample.t;
165
- return clean.firstOutputMs === void 0 && clean.callDurationMs === void 0 ? null : clean;
166
- };
167
- var SPEED_SAMPLE_STALE_SNAPSHOT_MAX_MS = 7 * 24 * 60 * 6e4;
168
- async function parseCacheFile(cachePath, userId) {
169
- try {
170
- const fs = await import("node:fs/promises");
171
- const raw = await fs.readFile(cachePath, "utf8");
172
- const parsed = JSON.parse(raw);
173
- if (!parsed || typeof parsed !== "object") return null;
174
- const version = parsed.version;
175
- if (version !== SPEED_SAMPLE_CACHE_VERSION) {
176
- return null;
177
- }
178
- if (parsed.userId !== userId) return null;
179
- if (!isFiniteNumber(parsed.at)) return null;
180
- const source = parsed.samples;
181
- if (!source || typeof source !== "object") return null;
182
- const samples = /* @__PURE__ */ new Map();
183
- for (const [model, list] of Object.entries(source)) {
184
- if (!model || !Array.isArray(list)) continue;
185
- const cleaned = [];
186
- for (const entry of list) {
187
- const sample = sanitizeSample(entry);
188
- if (sample) cleaned.push(sample);
189
- }
190
- samples.set(model, cleaned);
191
- }
192
- const complete = parsed.complete === true;
193
- const cursor = typeof parsed.cursor === "string" && parsed.cursor.length > 0 ? parsed.cursor : void 0;
194
- return { samples, at: parsed.at, complete, cursor: complete ? void 0 : cursor };
195
- } catch {
196
- return null;
197
- }
198
- }
199
- async function readSpeedSamplesSnapshot(cachePath, options) {
200
- const maxAgeMs = isFiniteNumber(options.maxAgeMs) ? options.maxAgeMs : SPEED_SAMPLE_STALE_SNAPSHOT_MAX_MS;
201
- const parsed = await parseCacheFile(cachePath, options.userId);
202
- if (!parsed || !parsed.complete) return null;
203
- const age = options.now - parsed.at;
204
- if (age < 0 || age >= maxAgeMs) return null;
205
- return { samples: parsed.samples, ageMs: age };
206
- }
207
- async function readSpeedSamplesProgress(cachePath, userId) {
208
- const parsed = await parseCacheFile(cachePath, userId);
209
- if (!parsed) return null;
210
- return {
211
- samples: parsed.samples,
212
- at: parsed.at,
213
- complete: parsed.complete,
214
- ...parsed.cursor === void 0 ? {} : { cursor: parsed.cursor }
215
- };
216
- }
217
- function resolveSpeedSamplesProgressPath(cachePath) {
218
- return `${cachePath}.progress`;
219
- }
220
- async function writeSpeedSamplesCache(cachePath, payload) {
221
- try {
222
- const fs = await import("node:fs/promises");
223
- const path = await import("node:path");
224
- await fs.mkdir(path.dirname(cachePath), { recursive: true });
225
- const tmpPath = `${cachePath}.tmp-${process.pid}-${Math.random().toString(36).slice(2, 8)}`;
226
- await fs.writeFile(tmpPath, JSON.stringify(payload), "utf8");
227
- await fs.rename(tmpPath, cachePath);
228
- } catch {
229
- }
230
- }
231
-
232
- // packages/ai/agent/candidateSpeedContext.ts
233
- var OBSERVED_SPEED_WINDOW = 50;
234
- var MIN_OBSERVED_FIRST_OUTPUT_SAMPLES = 5;
235
- var SPEED_SAMPLES_CACHE_TTL_MS = 5 * 6e4;
236
- var SPEED_SAMPLES_CACHE_MAX_ENTRIES = 500;
237
- function normalizeSpeedModelName(raw) {
238
- const name = raw.trim().toLowerCase();
239
- const slash = name.lastIndexOf("/");
240
- return slash === -1 ? name : name.slice(slash + 1);
241
- }
242
- var isFiniteNumber2 = (value) => typeof value === "number" && Number.isFinite(value);
243
- var REASONING_EFFORT_SUFFIXES = ["minimal", "low", "medium", "high", "xhigh"];
244
- var REASONING_EFFORT_SUFFIX_RE = new RegExp(`-(?:${REASONING_EFFORT_SUFFIXES.join("|")})$`);
245
- function stripReasoningEffortSuffix(model) {
246
- const base = model.replace(REASONING_EFFORT_SUFFIX_RE, "");
247
- return base && base !== model ? base : null;
248
- }
249
- function resolveOneBare(model, samplesByModel) {
250
- const observed = resolveObservedSpeed(samplesByModel.get(model) ?? [], {
251
- limit: OBSERVED_SPEED_WINDOW
252
- });
253
- if (observed.firstOutputSampleCount >= MIN_OBSERVED_FIRST_OUTPUT_SAMPLES && observed.medianFirstOutputMs !== void 0) {
254
- return {
255
- source: "observed",
256
- firstOutputMs: observed.medianFirstOutputMs,
257
- ...observed.medianOutputTokensPerSecond !== void 0 ? { outputTps: observed.medianOutputTokensPerSecond } : {},
258
- firstOutputSamples: observed.firstOutputSampleCount,
259
- tpsSamples: observed.throughputSampleCount
260
- };
261
- }
262
- return null;
263
- }
264
- function resolveOne(model, samplesByModel) {
265
- const direct = resolveOneBare(model, samplesByModel);
266
- if (direct) return { model, ...direct };
267
- const base = stripReasoningEffortSuffix(model);
268
- if (!base) return null;
269
- const stripped = resolveOneBare(base, samplesByModel);
270
- return stripped ? { model, ...stripped } : null;
271
- }
272
- function resolveCandidateSpeedFacts(models, samplesByModel) {
273
- const unique = [
274
- ...new Set(
275
- models.filter((model) => typeof model === "string").map(normalizeSpeedModelName).filter(Boolean)
276
- )
277
- ];
278
- return unique.map((model) => resolveOne(model, samplesByModel)).filter((fact) => fact !== null);
279
- }
280
- var formatSeconds = (ms) => `${(ms / 1e3).toFixed(1)}s`;
281
- var formatTps = (tps) => String(Math.round(tps));
282
- var SPEED_CONTEXT_HEADER = "speed (observed=\u672C\u7528\u6237\u5B9E\u6D4B\u8C03\u7528\u4E2D\u4F4D\u6570, firstOutput \u542B\u63A8\u7406\u8F93\u51FA; tps=generation\uFF08\u4E0D\u542B\u7AEF\u5230\u7AEF\u53E3\u5F84\uFF09, tps=n/a \u8868\u793A\u65E0\u53EF\u4FE1\u541E\u5410\u6837\u672C\u3002\u672A\u5217\u51FA\u7684 model \u8868\u793A\u6CA1\u6709\u5B9E\u6D4B\u6837\u672C\uFF0C\u4E0D\u4EE3\u8868\u6162):";
283
- function formatSnapshotAge(ageMs) {
284
- const minutes = Math.floor(ageMs / 6e4);
285
- if (minutes < 1) return "<1min";
286
- if (minutes < 60) return `${minutes}min`;
287
- const hours = Math.floor(minutes / 60);
288
- if (hours < 24) return `${hours}h`;
289
- return `${Math.floor(hours / 24)}d`;
290
- }
291
- function formatCandidateSpeedFacts(facts, options = {}) {
292
- if (facts.length === 0) return null;
293
- const lines = facts.map((fact) => {
294
- const tps = fact.outputTps !== void 0 ? formatTps(fact.outputTps) : "n/a";
295
- return ` ${fact.model}: firstOutput=${formatSeconds(fact.firstOutputMs ?? 0)} tps=${tps} [observed n=${fact.firstOutputSamples ?? 0} tpsN=${fact.tpsSamples ?? 0}]`;
296
- });
297
- const age = options.snapshotAgeMs;
298
- const note = typeof age === "number" && age > 0 ? ` (snapshot=${formatSnapshotAge(age)}\u524D\u91C7\u96C6\u7684\u5B8C\u6574\u7A97\u53E3, \u975E\u672C\u6B21\u5B9E\u65F6\u626B\u63CF)` : "";
299
- return `${SPEED_CONTEXT_HEADER}${note}
300
- ${lines.join("\n")}`;
301
- }
302
- function buildCandidateSpeedContext(models, samplesByModel, options = {}) {
303
- return formatCandidateSpeedFacts(resolveCandidateSpeedFacts(models, samplesByModel), options);
304
- }
305
- var SPEED_SAMPLE_PAGE_SIZE = 2e3;
306
- var DISPATCH_ENTRY_PATH = "agent-run";
307
- var eventTime = (value) => {
308
- if (isFiniteNumber2(value.timestamp)) return value.timestamp;
309
- if (isFiniteNumber2(value.createdAt)) return value.createdAt;
310
- return 0;
311
- };
312
- function collectSample(collected, value) {
313
- if (typeof value.model !== "string") return;
314
- if (!isFiniteNumber2(value.firstOutputMs) && !isFiniteNumber2(value.callDurationMs)) return;
315
- const model = normalizeSpeedModelName(value.model);
316
- if (!model) return;
317
- const list = collected.get(model) ?? [];
318
- list.push({
319
- t: eventTime(value),
320
- firstOutputMs: value.firstOutputMs,
321
- callDurationMs: value.callDurationMs,
322
- output_tokens: value.output_tokens
323
- });
324
- collected.set(model, list);
325
- }
326
- function finalizeSamples(collected, keepTime = false) {
327
- const result = /* @__PURE__ */ new Map();
328
- for (const [model, list] of collected) {
329
- list.sort((a, b) => b.t - a.t);
330
- const window = list.slice(0, OBSERVED_SPEED_WINDOW);
331
- result.set(
332
- model,
333
- keepTime ? window : window.map(({ t: _t, ...sample }) => sample)
334
- );
335
- }
336
- return result;
337
- }
338
- async function collectRecentSpeedSamples(db, userId, options = {}) {
339
- const pageSize = isFiniteNumber2(options.pageSize) && options.pageSize > 0 ? Math.floor(options.pageSize) : SPEED_SAMPLE_PAGE_SIZE;
340
- const budgetMs = isFiniteNumber2(options.budgetMs) ? options.budgetMs : Number.POSITIVE_INFINITY;
341
- const { start, end } = createTokenKey.rangeOfUser(userId);
342
- const failedPrefix = createKey("token", userId, "failed-call", "");
343
- const dispatchRunCache = /* @__PURE__ */ new Map();
344
- const isDispatchSampleRecord = async (record2, resolver, cache) => {
345
- if (record2.entry_path !== DISPATCH_ENTRY_PATH && record2.entry_path !== "cli-local") return false;
346
- const runId = typeof record2.dialogId === "string" ? record2.dialogId.trim() : "";
347
- if (!runId) return false;
348
- const cacheKey = `${record2.entry_path}:${runId}`;
349
- const cached = cache.get(cacheKey);
350
- if (cached !== void 0) return cached;
351
- let dispatch = false;
352
- if (resolver) {
353
- try {
354
- dispatch = await resolver(runId, record2.entry_path) === true;
355
- } catch {
356
- dispatch = false;
357
- }
358
- }
359
- cache.set(cacheKey, dispatch);
360
- return dispatch;
361
- };
362
- const collected = /* @__PURE__ */ new Map();
363
- const startedAt = Date.now();
364
- let lastKey = options.startAfter;
365
- let budgetExhausted = false;
366
- let scanned = 0;
367
- while (true) {
368
- if (Date.now() - startedAt >= budgetMs) {
369
- budgetExhausted = true;
370
- break;
371
- }
372
- const pageOptions = {
373
- ...lastKey === void 0 ? { gte: start } : { gt: lastKey },
374
- lte: end,
375
- limit: pageSize
376
- };
377
- let accepted = 0;
378
- let newestKey = lastKey;
379
- for await (const [key, raw] of db.iterator(pageOptions)) {
380
- if (typeof key !== "string") continue;
381
- if (lastKey !== void 0 && key <= lastKey) continue;
382
- accepted += 1;
383
- scanned += 1;
384
- newestKey = key;
385
- if (key.startsWith(failedPrefix)) continue;
386
- if (!raw || typeof raw !== "object") continue;
387
- const record2 = raw;
388
- const resolver = options.isDispatchRun ?? db.isDispatchRun;
389
- if (!await isDispatchSampleRecord(
390
- record2,
391
- resolver ? (runId, entryPath) => resolver.call(db, runId, entryPath) : void 0,
392
- dispatchRunCache
393
- ))
394
- continue;
395
- collectSample(collected, record2);
396
- }
397
- if (accepted === 0 || accepted < pageSize) break;
398
- lastKey = newestKey;
399
- }
400
- return {
401
- samples: finalizeSamples(collected, options.keepTime === true),
402
- budgetExhausted,
403
- scanned,
404
- ...budgetExhausted && lastKey !== void 0 ? { nextCursor: lastKey } : {}
405
- };
406
- }
407
- function mergeNewestSamples(into, from) {
408
- for (const [model, list] of from) {
409
- const merged = [...into.get(model) ?? [], ...list];
410
- merged.sort(
411
- (a, b) => (b.t ?? 0) - (a.t ?? 0)
412
- );
413
- into.set(model, merged.slice(0, OBSERVED_SPEED_WINDOW));
414
- }
415
- }
416
- async function loadSpeedSamplesWithDiskCache(db, userId, now, cache) {
417
- try {
418
- const ttlMs = isFiniteNumber2(cache.ttlMs) ? cache.ttlMs : SPEED_SAMPLE_DISK_CACHE_TTL_MS;
419
- const snapshot = await readSpeedSamplesSnapshot(cache.cachePath, { userId, now });
420
- if (snapshot && snapshot.ageMs < ttlMs) return { samples: snapshot.samples };
421
- const progressPath = resolveSpeedSamplesProgressPath(cache.cachePath);
422
- const progress = await readSpeedSamplesProgress(progressPath, userId);
423
- const resumable = progress && !progress.complete && progress.cursor ? progress : void 0;
424
- const collected = new Map(resumable?.samples ?? []);
425
- let step;
426
- try {
427
- step = await collectRecentSpeedSamples(db, userId, {
428
- pageSize: cache.pageSize,
429
- budgetMs: isFiniteNumber2(cache.budgetMs) ? cache.budgetMs : SPEED_SAMPLE_SCAN_BUDGET_MS,
430
- keepTime: true,
431
- ...resumable?.cursor ? { startAfter: resumable.cursor } : {}
432
- });
433
- } catch {
434
- return snapshot ? { samples: snapshot.samples, snapshotAgeMs: snapshot.ageMs } : { samples: /* @__PURE__ */ new Map() };
435
- }
436
- if (!resumable && step.scanned === 0 && !step.budgetExhausted) {
437
- return snapshot ? { samples: snapshot.samples, snapshotAgeMs: snapshot.ageMs } : { samples: /* @__PURE__ */ new Map() };
438
- }
439
- mergeNewestSamples(collected, step.samples);
440
- if (!step.budgetExhausted) {
441
- await writeSpeedSamplesCache(cache.cachePath, {
442
- version: SPEED_SAMPLE_CACHE_VERSION,
443
- userId,
444
- at: now,
445
- complete: true,
446
- samples: Object.fromEntries(collected)
447
- });
448
- await writeSpeedSamplesCache(progressPath, {
449
- version: SPEED_SAMPLE_CACHE_VERSION,
450
- userId,
451
- at: now,
452
- complete: true,
453
- samples: {}
454
- });
455
- return { samples: collected };
456
- }
457
- await writeSpeedSamplesCache(progressPath, {
458
- version: SPEED_SAMPLE_CACHE_VERSION,
459
- userId,
460
- // Progress keeps the cycle's collection start so a later stale label stays honest.
461
- at: resumable?.at ?? now,
462
- complete: false,
463
- samples: Object.fromEntries(collected),
464
- ...step.nextCursor ? { cursor: step.nextCursor } : {}
465
- });
466
- return snapshot ? { samples: snapshot.samples, snapshotAgeMs: snapshot.ageMs } : { samples: /* @__PURE__ */ new Map() };
467
- } catch {
468
- return { samples: /* @__PURE__ */ new Map() };
469
- }
470
- }
471
- var samplesCache = /* @__PURE__ */ new Map();
472
- function writeSamplesCache(userId, now, samples) {
473
- for (const [key, entry] of samplesCache) {
474
- if (now - entry.at >= SPEED_SAMPLES_CACHE_TTL_MS) samplesCache.delete(key);
475
- }
476
- samplesCache.delete(userId);
477
- samplesCache.set(userId, { at: now, samples });
478
- while (samplesCache.size > SPEED_SAMPLES_CACHE_MAX_ENTRIES) {
479
- const oldest = samplesCache.keys().next().value;
480
- if (oldest === void 0) break;
481
- samplesCache.delete(oldest);
482
- }
483
- }
484
- var SPEED_SAMPLE_REFRESH_BUDGET_MS = 6e4;
485
- var snapshotRefreshes = /* @__PURE__ */ new Map();
486
- function startSpeedSnapshotRefresh(db, userId, now = Date.now()) {
487
- const inFlight = snapshotRefreshes.get(userId);
488
- if (inFlight) return inFlight;
489
- const job = (async () => {
490
- try {
491
- const { samples, budgetExhausted } = await collectRecentSpeedSamples(db, userId, {
492
- budgetMs: SPEED_SAMPLE_REFRESH_BUDGET_MS
493
- });
494
- if (!budgetExhausted) writeSamplesCache(userId, now, samples);
495
- } catch {
496
- }
497
- })().finally(() => {
498
- snapshotRefreshes.delete(userId);
499
- });
500
- snapshotRefreshes.set(userId, job);
501
- return job;
502
- }
503
- async function loadCachedSpeedSamples(db, userId, now) {
504
- const hit = samplesCache.get(userId);
505
- if (hit) {
506
- const age = now - hit.at;
507
- if (age >= 0 && age < SPEED_SAMPLE_STALE_SNAPSHOT_MAX_MS) {
508
- if (age >= SPEED_SAMPLES_CACHE_TTL_MS) void startSpeedSnapshotRefresh(db, userId);
509
- return age >= SPEED_SAMPLES_CACHE_TTL_MS ? { samples: hit.samples, snapshotAgeMs: age } : { samples: hit.samples };
510
- }
511
- }
512
- void startSpeedSnapshotRefresh(db, userId);
513
- return { samples: /* @__PURE__ */ new Map() };
514
- }
515
- async function injectSpeedContextIntoListAgentsResult(result, options = {}) {
516
- try {
517
- let parsed;
518
- try {
519
- parsed = JSON.parse(result);
520
- } catch {
521
- return result;
522
- }
523
- if (!parsed || typeof parsed !== "object" || !Array.isArray(parsed.agents)) return result;
524
- const models = parsed.agents.map((agent) => agent?.model).filter((model) => typeof model === "string");
525
- if (models.length === 0) return result;
526
- const now = options.now ?? Date.now();
527
- let samples = /* @__PURE__ */ new Map();
528
- let snapshotAgeMs;
529
- const userId = typeof options.userId === "string" ? options.userId.trim() : "";
530
- if (options.db && userId) {
531
- try {
532
- const loaded = options.diskCache ? await loadSpeedSamplesWithDiskCache(options.db, userId, now, options.diskCache) : await loadCachedSpeedSamples(options.db, userId, now);
533
- samples = loaded.samples;
534
- snapshotAgeMs = loaded.snapshotAgeMs;
535
- } catch {
536
- samples = /* @__PURE__ */ new Map();
537
- }
538
- }
539
- const speedContext = buildCandidateSpeedContext(models, samples, { snapshotAgeMs });
540
- return speedContext ? JSON.stringify({ ...parsed, speedContext }) : result;
541
- } catch {
542
- return result;
543
- }
544
- }
545
-
546
- // packages/ai/agent/dispatchSpeedProvenance.ts
547
- var record = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
548
- function isServerDispatchSpeedSource(value, dialogId, userId) {
549
- const dialog = record(value);
550
- const proof = record(dialog.dispatchSpeedProvenance);
551
- return proof.version === 1 && proof.source === "server-startAgentRun" && proof.userId === userId && record(dialog.runtimeBinding).tenantUserId === userId && dialog.id === dialogId;
552
- }
553
- function isLocalDispatchSpeedSource(value, dialogId, userId) {
554
- const run = record(value);
555
- const proof = record(run.dispatchSpeedProvenance);
556
- return proof.version === 1 && proof.source === "cli-startAgentRun" && proof.userId === userId && typeof run.runId === "string" && run.runId.length > 0 && run.dialogId === dialogId && run.ephemeral !== true;
557
- }
558
-
559
157
  // packages/cli/agentListCommands.ts
560
158
  var createCliDispatchSampleDb = (db, userId, env) => {
561
159
  let localDialogs;
@@ -585,8 +183,18 @@ function formatCooldownUntilLocal(at, now = /* @__PURE__ */ new Date()) {
585
183
  }
586
184
  async function runAgentListCommand(args, deps = {}) {
587
185
  const env = deps.env ?? process.env;
186
+ let planningCaller;
187
+ try {
188
+ const raw = JSON.parse(env.NOLO_PLANNING_CALLER ?? "null");
189
+ if (raw && typeof raw === "object") planningCaller = {
190
+ agentKey: typeof raw.agentKey === "string" ? raw.agentKey : void 0,
191
+ effectiveModel: typeof raw.effectiveModel === "string" ? raw.effectiveModel : void 0,
192
+ runKind: raw.runKind === "subtask" ? "subtask" : "interactive"
193
+ };
194
+ } catch {
195
+ }
588
196
  const output = deps.output ?? process.stdout;
589
- const { wantJson, wantSafe, publicOnly, scope: requestedScope, idsOnly, showUnavailable, verbose, compact, limit, offset, query } = parseAgentListArgs(args);
197
+ const { wantJson, wantSafe, publicOnly, scope: requestedScope, idsOnly, showUnavailable, verbose, compact, limit, offset, query, fragmentOffset, fragmentAgentKey, fragmentDigest } = parseAgentListArgs(args);
590
198
  if (requestedScope && !["preferred", "public", "all"].includes(requestedScope)) {
591
199
  throw new Error(`Invalid scope '${requestedScope}'`);
592
200
  }
@@ -817,18 +425,18 @@ async function runAgentListCommand(args, deps = {}) {
817
425
  fetchImpl,
818
426
  serverUrls
819
427
  });
820
- const record2 = favRead.record;
821
- if (!record2 || record2.type && record2.type !== "agent") continue;
822
- const norm = normalizeListedAgent(record2);
823
- const candidateKeys = [record2.dbKey, record2.publicKey, record2.id].filter((key) => typeof key === "string" && key.length > 0);
428
+ const record = favRead.record;
429
+ if (!record || record.type && record.type !== "agent") continue;
430
+ const norm = normalizeListedAgent(record);
431
+ const candidateKeys = [record.dbKey, record.publicKey, record.id].filter((key) => typeof key === "string" && key.length > 0);
824
432
  if (spaceContentKeys && !candidateKeys.some((key) => spaceContentKeys?.has(key))) {
825
433
  continue;
826
434
  }
827
435
  if (norm) {
828
436
  if (!favKey.startsWith("agent-pub-")) {
829
437
  norm.verifiedAgentKey = favKey;
830
- if (typeof record2.userId === "string" && record2.userId) {
831
- norm.ownerId = record2.userId;
438
+ if (typeof record.userId === "string" && record.userId) {
439
+ norm.ownerId = record.userId;
832
440
  }
833
441
  }
834
442
  agents.push(norm);
@@ -837,7 +445,7 @@ async function runAgentListCommand(args, deps = {}) {
837
445
  existingKeys.add(norm.publicKey);
838
446
  existingKeys.add(norm.id);
839
447
  } else {
840
- extraFavoriteRecords.push(record2);
448
+ extraFavoriteRecords.push(record);
841
449
  for (const key of candidateKeys) existingKeys.add(key);
842
450
  }
843
451
  } catch {
@@ -852,9 +460,11 @@ async function runAgentListCommand(args, deps = {}) {
852
460
  serverUrls
853
461
  });
854
462
  }
855
- const safeRecords = [...agents, ...extraFavoriteRecords].map((record2) => toDiscoverySafeAgentSummary(record2, { favoritesMap, userId })).filter((agent) => publicOnly ? agent.isPublic === true : true);
463
+ const safeRecords = [...agents, ...extraFavoriteRecords].map((record) => toDiscoverySafeAgentSummary(record, { favoritesMap, userId })).filter((agent) => publicOnly ? agent.isPublic === true : true);
856
464
  const discovery = buildAgentDiscoveryResult({
857
465
  agents: safeRecords,
466
+ caller: planningCaller,
467
+ poolRestricted: Boolean(resolvedSpaceId) || serverFailures.length > 0 || source !== "global-cache",
858
468
  scope: requestedScope ?? (publicOnly ? "public" : "all"),
859
469
  query,
860
470
  showUnavailable,
@@ -869,11 +479,13 @@ async function runAgentListCommand(args, deps = {}) {
869
479
  success: true,
870
480
  userId,
871
481
  ...resolvedSpaceId ? { spaceId: resolvedSpaceId } : {},
482
+ planningRecommendation: discovery.planningRecommendation,
872
483
  total: discovery.total,
873
484
  ...typeof discovery.offset === "number" ? { offset: discovery.offset } : {},
874
485
  ...typeof discovery.limit === "number" ? { limit: discovery.limit } : {},
875
486
  ...discovery.truncated ? { truncated: true } : {},
876
487
  unavailableCount: discovery.unavailableCount,
488
+ availableCount: discovery.availableCount,
877
489
  // agents 在最前:host 截断长输出时保头保尾,派发所需的 agentKey
878
490
  // 必须落在头部;凭证分组是说明性大块,放最后。
879
491
  // 限流 agent 已合入 agents(带 availabilityStatus / nextAvailableAt
@@ -883,6 +495,10 @@ async function runAgentListCommand(args, deps = {}) {
883
495
  }, null, 2);
884
496
  const cliNoloHome = env.NOLO_HOME?.trim() || (env.HOME?.trim() ? `${env.HOME.trim()}/.nolo` : "");
885
497
  const speedAwareListResult = await injectSpeedContextIntoListAgentsResult(listResult, {
498
+ compactPage: compact === true && verbose !== true,
499
+ fragmentOffset,
500
+ fragmentAgentKey,
501
+ fragmentDigest,
886
502
  db: createCliDispatchSampleDb(deps.db ?? await getReadableCliDb(output), userId, env),
887
503
  userId,
888
504
  ...cliNoloHome ? { diskCache: { cachePath: `${cliNoloHome}/cache/speed-samples-${userId}.json` } } : {}