nolo-cli 0.224.0-alpha.1 → 0.224.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/{_executeModel-WW57SJN4.js → _executeModel-5NA4USGG.js} +77 -70
  2. package/{action-CK64LS6S.js → action-X75O3XPH.js} +11 -8
  3. package/{addContentAction-EQXMFNPR.js → addContentAction-GVC77QSN.js} +14 -13
  4. package/{addDialogAgentAction-RSDZDASD.js → addDialogAgentAction-KKDVAMW3.js} +15 -14
  5. package/{agentDeleteCommand-X2VWEKUA.js → agentDeleteCommand-2RFGKFAB.js} +127 -118
  6. package/{agentEmailCommands-6IE773VW.js → agentEmailCommands-GQCQKKOR.js} +126 -113
  7. package/{agentFavoriteCommands-2LKGKSUD.js → agentFavoriteCommands-7LOP3HUD.js} +5 -5
  8. package/{agentGrantCommands-QQV4N4JW.js → agentGrantCommands-L6O2HVJI.js} +5 -5
  9. package/{agentListCommands-5UNM7CGG.js → agentListCommands-HSGLDPDQ.js} +110 -495
  10. package/{agentMachineCommands-EVWFKK6Q.js → agentMachineCommands-BISF6PVV.js} +63 -57
  11. package/{agentProviderCommands-ZCH37KAL.js → agentProviderCommands-O3Q25PKU.js} +6 -6
  12. package/{agentPullCommand-XN6ZPBUW.js → agentPullCommand-G6U2LHMW.js} +6 -6
  13. package/agentRecordCommands-AOXPGYAJ.js +189 -0
  14. package/{agentRunCommand-KGOT2AFB.js → agentRunCommand-AFAIP7U7.js} +129 -113
  15. package/{agentRunControl-QDFW5P2T.js → agentRunControl-VBL7UFSG.js} +20 -14
  16. package/{agentRuntimeLocal-SD7U2EGY.js → agentRuntimeLocal-T7BX2WGL.js} +47 -41
  17. package/{agentSlice-ACZGTZVW.js → agentSlice-XJNKE3PG.js} +18 -17
  18. package/{appDeleteCommands-NE3NQQJL.js → appDeleteCommands-LURUSPY7.js} +56 -50
  19. package/{appDeployCommands-2BAHY522.js → appDeployCommands-SMEW4AK2.js} +56 -50
  20. package/{appDeployStatusCommands-JTW6LZNC.js → appDeployStatusCommands-VYPJTBJK.js} +56 -50
  21. package/{appGetCommands-WKFEJO6A.js → appGetCommands-N4NI5GGJ.js} +56 -50
  22. package/{appListCommands-HNAZZLFX.js → appListCommands-5C6ONN3Z.js} +56 -50
  23. package/{authCommand-4FDPL7WG.js → authCommand-4CVBDADE.js} +29 -24
  24. package/{authCommands-GAJ3NIXO.js → authCommands-EHU2BHOX.js} +12 -7
  25. package/{builtinSkillRegistry-PXH7EGQB.js → builtinSkillRegistry-AYWYQVA4.js} +4 -4
  26. package/{chromeOpsCommands-YKX2QX3A.js → chromeOpsCommands-CSDG2HYN.js} +6 -6
  27. package/{chunk-OOF7XDZF.js → chunk-2574ANSV.js} +6 -6
  28. package/chunk-2SXN7LAY.js +15 -0
  29. package/{chunk-OGHP3CTL.js → chunk-2X7WFDT6.js} +1 -1
  30. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  31. package/{chunk-D726I5AZ.js → chunk-3EMIEC27.js} +2 -2
  32. package/{chunk-S7SB7L2I.js → chunk-3FBAVU2Y.js} +24 -22
  33. package/{chunk-YL3EFYL3.js → chunk-4D4QD7FT.js} +3 -1
  34. package/{chunk-5RKUPJYL.js → chunk-4FIO2S7Z.js} +11 -3
  35. package/{chunk-MKQ2UTTX.js → chunk-4IQVE43Z.js} +63 -32
  36. package/{chunk-6NKA6RKF.js → chunk-4Q6HQORG.js} +8 -8
  37. package/{chunk-P2ZLUIW2.js → chunk-4X5AVCM7.js} +94 -4
  38. package/chunk-4ZCTKB27.js +31 -0
  39. package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
  40. package/{chunk-4A2JIXR2.js → chunk-5QZSEQSK.js} +1 -1
  41. package/chunk-5ZUOVCKT.js +32 -0
  42. package/{chunk-TRWT3EE3.js → chunk-62HXNQVV.js} +1 -1
  43. package/{chunk-JC5XLWZK.js → chunk-6CKUO32A.js} +27 -15
  44. package/chunk-6D25V6CB.js +133 -0
  45. package/chunk-6WOLPIPY.js +379 -0
  46. package/{chunk-KOXKKHFE.js → chunk-6WZVM33D.js} +9 -4
  47. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  48. package/{chunk-KO63FPG3.js → chunk-7AJRJGSQ.js} +1049 -2860
  49. package/chunk-7NIBQ4HY.js +138 -0
  50. package/{chunk-7Z6EW7AH.js → chunk-7TTMMOKH.js} +13 -6
  51. package/{chunk-7WPAI5JJ.js → chunk-A3LUWRQK.js} +15 -15
  52. package/{chunk-C4WTX5TU.js → chunk-A5EVA6HU.js} +2 -2
  53. package/{chunk-O2CYENYJ.js → chunk-A74QP4FI.js} +2614 -1374
  54. package/{chunk-N3J4VDGV.js → chunk-AEQMKYZN.js} +15 -15
  55. package/{chunk-DVQH4BTR.js → chunk-AH5R7BYW.js} +26 -176
  56. package/{chunk-H7R3365N.js → chunk-ANJRDS6U.js} +8 -5
  57. package/{chunk-YFLVRVYK.js → chunk-AVJDELEA.js} +1 -1
  58. package/{chunk-GIABSSWQ.js → chunk-B5SV4H3J.js} +4 -4
  59. package/{chunk-FVZW66K4.js → chunk-B7DE5XJW.js} +387 -347
  60. package/chunk-BEM6LPD2.js +734 -0
  61. package/{chunk-SRL56PI2.js → chunk-BGGAY6OK.js} +46 -8
  62. package/{chunk-T3O6BLYU.js → chunk-BGGV6B5O.js} +555 -328
  63. package/{chunk-BGGHA5DV.js → chunk-BIABIPGW.js} +1 -1
  64. package/chunk-BIDSIRTS.js +307 -0
  65. package/{chunk-6D7NVU66.js → chunk-BXSMFPTG.js} +17 -14
  66. package/{chunk-Q6HOUF4O.js → chunk-CBUZ6DKA.js} +3 -3
  67. package/{chunk-LE6LGAJE.js → chunk-CD3RU7XL.js} +17 -2
  68. package/{chunk-GVGOEMNV.js → chunk-CKZPMJNU.js} +3 -3
  69. package/{chunk-3ESU44FG.js → chunk-CVJRVBJL.js} +3 -3
  70. package/chunk-D374I563.js +62 -0
  71. package/{chunk-XWGDCWXY.js → chunk-DNZ4JJ7C.js} +9 -9
  72. package/chunk-DVYAFH2Q.js +103 -0
  73. package/{chunk-N7HVLYOY.js → chunk-DXW5WDHZ.js} +4 -4
  74. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  75. package/{chunk-65XXHYZ5.js → chunk-E5KJOZWY.js} +4 -4
  76. package/{chunk-GNHMRBYZ.js → chunk-EBKHA63G.js} +106 -14
  77. package/{chunk-PFJNLBRU.js → chunk-EEOOBRA7.js} +6 -6
  78. package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
  79. package/{chunk-QLFCTYRH.js → chunk-F3XI6WQP.js} +17 -10
  80. package/{chunk-AFHOCBSP.js → chunk-F6YWDVIB.js} +1 -1
  81. package/{chunk-VHPAA6MT.js → chunk-FFYE5ATM.js} +6 -6
  82. package/{chunk-F3TQURKK.js → chunk-FZKA3XFA.js} +21 -21
  83. package/{chunk-C4VAR65S.js → chunk-G22P367E.js} +153 -117
  84. package/{chunk-4NMHE7CX.js → chunk-GDUC4VS2.js} +12 -12
  85. package/{chunk-2VUZSVAS.js → chunk-GXXY2NL3.js} +22 -20
  86. package/{chunk-IWH5SOU4.js → chunk-H7ZYKHAZ.js} +38 -18
  87. package/{chunk-G2EJ7NL4.js → chunk-HBRDSQ3M.js} +2 -2
  88. package/{chunk-EGXPAWLG.js → chunk-HCNOO374.js} +1 -1
  89. package/{chunk-DJSTBAOU.js → chunk-HOM6LTEW.js} +4 -4
  90. package/{chunk-S2NTVGA2.js → chunk-I2OYPD3Y.js} +1 -1
  91. package/{chunk-QWYFFHCJ.js → chunk-IJTXNLQE.js} +13 -13
  92. package/{chunk-UYOICCYG.js → chunk-IUMS6F53.js} +59 -88
  93. package/{chunk-MOMR7NMG.js → chunk-IUTUWIKE.js} +2 -2
  94. package/{chunk-JVRQ6YVK.js → chunk-JBWXPACD.js} +1 -1
  95. package/{chunk-SASHAZ67.js → chunk-KZPEGO6D.js} +13 -2
  96. package/{chunk-HCJFGH6Y.js → chunk-L32W3PRP.js} +46 -16
  97. package/{chunk-GGKNJ42M.js → chunk-LYDEFPQP.js} +18 -108
  98. package/{chunk-K5FNYHZC.js → chunk-MECDGHLK.js} +420 -120
  99. package/{chunk-EOWLBDY6.js → chunk-MM73SP4K.js} +1 -1
  100. package/{chunk-J6T25AJ6.js → chunk-MYOSN6BT.js} +82 -18
  101. package/{chunk-Q7WP5RPC.js → chunk-MYPKBJJO.js} +5 -5
  102. package/{chunk-6RQFZCKH.js → chunk-N2JROHD3.js} +4 -4
  103. package/{chunk-VREDDN25.js → chunk-O6IPRAVV.js} +14 -9
  104. package/{chunk-VALBGPM6.js → chunk-OBSEKCVK.js} +17 -20
  105. package/{chunk-AMEOV5VZ.js → chunk-OOJNQK6V.js} +33 -33
  106. package/{chunk-PPJYZRSQ.js → chunk-OX6GNNVT.js} +6 -1
  107. package/{chunk-5R63B62U.js → chunk-P3IZUMIC.js} +8 -8
  108. package/{chunk-FRSBYNWI.js → chunk-PGKA77TZ.js} +52 -217
  109. package/{chunk-7UH3DGV6.js → chunk-PRMEU7BT.js} +232 -10
  110. package/{chunk-2ZKFCIJJ.js → chunk-PROOOQZ3.js} +1 -1
  111. package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
  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-RETQOQ4D.js +33394 -0
  116. package/{chunk-AVHRSJUH.js → chunk-RM4UMFY4.js} +32 -25
  117. package/{chunk-2OLYKYNY.js → chunk-RTHFJZ6M.js} +8 -8
  118. package/{chunk-OB6DVWPF.js → chunk-S2MHR4PU.js} +164 -4
  119. package/{chunk-IWQAOW2X.js → chunk-SRCCSTIM.js} +8 -8
  120. package/{chunk-PVZY6P3S.js → chunk-T6VROBY7.js} +2 -2
  121. package/{chunk-2KTUDBG7.js → chunk-TEMLHVGX.js} +1 -1
  122. package/{chunk-TVFRV3UQ.js → chunk-TRHJ4NJB.js} +673 -1279
  123. package/{chunk-QVBXJNZ2.js → chunk-TUSTONB3.js} +1 -1
  124. package/{chunk-UMRI2IRY.js → chunk-TWTJV35S.js} +6 -6
  125. package/{chunk-5OZC7R7Y.js → chunk-U3G7RRXJ.js} +13 -12
  126. package/{chunk-CXDPIPZ4.js → chunk-UFC4J7OY.js} +3 -3
  127. package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
  128. package/{chunk-AGP3YSEC.js → chunk-ULLHVDTZ.js} +48 -3
  129. package/{chunk-SYQR7FQS.js → chunk-VM72HKW2.js} +97 -29
  130. package/{chunk-KEN3N2TN.js → chunk-VMJVAJ6W.js} +13 -10
  131. package/{chunk-3N4ASIP6.js → chunk-VREG6ANQ.js} +103 -100
  132. package/{chunk-SOF4OWDM.js → chunk-VS276URX.js} +0 -2
  133. package/chunk-VSRISJXZ.js +107 -0
  134. package/chunk-WDWZPASX.js +29 -0
  135. package/chunk-WFGNWWJI.js +326 -0
  136. package/{chunk-UJKTI5PG.js → chunk-WRKMXMU7.js} +2 -1
  137. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  138. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  139. package/chunk-X7IA2B7R.js +166 -0
  140. package/{chunk-5ZMIIR23.js → chunk-XBAEM4RI.js} +7 -0
  141. package/{chunk-4JVNURX4.js → chunk-XS5A3EKX.js} +1 -23
  142. package/{chunk-N5Z2V73W.js → chunk-Y2MF4DCJ.js} +1 -1
  143. package/{chunk-KAVGK4ES.js → chunk-Y5OWZQMJ.js} +39 -30
  144. package/{chunk-AK5O76CC.js → chunk-YGCOJNFZ.js} +3 -3
  145. package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
  146. package/{chunk-XFJ4ZPFC.js → chunk-Z2WZAE4P.js} +128 -149
  147. package/chunk-Z6YTCDU4.js +24 -0
  148. package/chunk-ZEKUFJLW.js +1438 -0
  149. package/{chunk-KN3HEZIQ.js → chunk-ZVOL2MAJ.js} +1 -1
  150. package/{cliAgentConfigHelpers-PO3MVDME.js → cliAgentConfigHelpers-U5OAVAKQ.js} +12 -12
  151. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-S42VMGB6.js} +1 -1
  152. package/{cliEnvHelpers-VPSJ4XWC.js → cliEnvHelpers-CNMP3RDX.js} +1 -1
  153. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  154. package/{cliLocalAgentRecordReader-Z7CH4K4R.js → cliLocalAgentRecordReader-HVZAQCUD.js} +49 -44
  155. package/{commandRegistry-SDSYBKMC.js → commandRegistry-TME7INFU.js} +98 -94
  156. package/{contentThunks-G3TRPEAU.js → contentThunks-U6OC4R2N.js} +37 -35
  157. package/{cooldownCommands-X7P5M2V5.js → cooldownCommands-U7XSRVJP.js} +4 -4
  158. package/{createAgentAutomationAction-KHA4MXUJ.js → createAgentAutomationAction-IP4LFN3W.js} +37 -35
  159. package/{createDialogAction-KWSBNAPJ.js → createDialogAction-IAGQJ3LH.js} +38 -36
  160. package/{createPageAction-HXKJ7OFG.js → createPageAction-AZ3UIFKA.js} +38 -36
  161. package/{db-CS4ZJQKV.js → db-M7FU2GNK.js} +9 -6
  162. package/{dbSlice-ZJPDIFER.js → dbSlice-DKKMJJYY.js} +13 -12
  163. package/{deleteFile-Q3YDB4ML.js → deleteFile-TQSONMVU.js} +11 -8
  164. package/{dialogCommands-6KQEBHSG.js → dialogCommands-PCDRMBWG.js} +60 -55
  165. package/dialogMessageRecord-OAV77LT7.js +7 -0
  166. package/{dialogNotifyCommand-WIZFFEY3.js → dialogNotifyCommand-O35MWMOS.js} +13 -13
  167. package/{dialogSlice-HXPKFGRL.js → dialogSlice-QAKYN4DE.js} +35 -33
  168. package/{dialogUsageCommand-HTVPR2CX.js → dialogUsageCommand-2SSLTXKO.js} +3 -3
  169. package/{docCreateCommands-XZOLWBRC.js → docCreateCommands-CFQFZOAD.js} +54 -48
  170. package/{docDeleteCommands-ZSO4LGWE.js → docDeleteCommands-5CPNTIIS.js} +56 -50
  171. package/{docReadCommands-TTMXCDER.js → docReadCommands-XQILYSAJ.js} +54 -48
  172. package/{docStore-A2B3GH33.js → docStore-GIVRT7TQ.js} +15 -14
  173. package/{docUpdateCommands-PRG6WOXL.js → docUpdateCommands-VETKSUDD.js} +54 -48
  174. package/fetchMessages-TQEUZD7H.js +1 -1
  175. package/{getPricing-YH3VMSVU.js → getPricing-LF5C4XSI.js} +5 -5
  176. package/{handleSendMessageAction-NWYG3Q72.js → handleSendMessageAction-HKIW4ZNO.js} +70 -66
  177. package/{hostCredentialCreate-WS6D3EHT.js → hostCredentialCreate-6VDJFNDO.js} +118 -104
  178. package/index.js +56 -18
  179. package/keys-RWF7UCB4.js +1 -1
  180. package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
  181. package/{localDialogRead-SVTPA5GY.js → localDialogRead-AV2VKKPG.js} +1 -1
  182. package/{localRecall-2J6QPOK2.js → localRecall-BDYKXB46.js} +3 -1
  183. package/{localRuntimeAdapter-TFYOA6YE.js → localRuntimeAdapter-BQ4F5PZV.js} +120 -107
  184. package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-WCNA4A3G.js} +4 -2
  185. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-CRNIBOOM.js} +1 -1
  186. package/{machineCommands-WFWV25IR.js → machineCommands-K6XIGOAD.js} +142 -114
  187. package/{machineWsRunDispatch-ZGXC3F2R.js → machineWsRunDispatch-4OO7Z6UM.js} +114 -101
  188. package/mcpLocalAuthorizeCommand-ZP6ESAGE.js +106 -0
  189. package/{memberThunks-JRYNONYV.js → memberThunks-PBJPZ2JU.js} +22 -17
  190. package/{memoryCommands-5WC3T66U.js → memoryCommands-BC6REPQB.js} +4 -4
  191. package/{models-CXINDUJA.js → models-H5NNZRLH.js} +2 -2
  192. package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
  193. package/package.json +1 -1
  194. package/{projectArchive-ULJDLUA6.js → projectArchive-G7AOQPRW.js} +43 -41
  195. package/{providerPresetApply-SHT2SUVB.js → providerPresetApply-OPBCAONX.js} +6 -6
  196. package/{providerRegistry-TA7EGCVZ.js → providerRegistry-J2HCVTHE.js} +6 -6
  197. package/{read-Q7GOHGNP.js → read-JEGPITEW.js} +10 -9
  198. package/{readDocTool-Z5OQ6422.js → readDocTool-TE3XIU4Y.js} +1 -1
  199. package/{readlineWorkspace-LTCV2BFW.js → readlineWorkspace-SOW5QUGZ.js} +4412 -4277
  200. package/{removeDialogAgentAction-U3F2MNAY.js → removeDialogAgentAction-CX3OAH4Y.js} +17 -16
  201. package/{runAgentClientLoop-BVIEQUB3.js → runAgentClientLoop-HQJPDFGQ.js} +95 -69
  202. package/{runtimeDoctorCommands-I47JN4HS.js → runtimeDoctorCommands-GUH2YGMH.js} +17 -17
  203. package/{secretCommands-LJXOOYA7.js → secretCommands-NJXFVHZU.js} +4 -4
  204. package/{setDialogExtraReferencesAction-G3WSJ7EM.js → setDialogExtraReferencesAction-CGM67EEQ.js} +16 -15
  205. package/{setPrimaryDialogAgentAction-6FHAHZBB.js → setPrimaryDialogAgentAction-3ABWPPXR.js} +17 -16
  206. package/{settingThunks-AXTBX3Q5.js → settingThunks-AY76OHYX.js} +181 -62
  207. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
  208. package/{spaceCommands-IB6FKWIC.js → spaceCommands-G63QGYQO.js} +59 -53
  209. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  210. package/{streamAgentChatTurn-DNYFHBJM.js → streamAgentChatTurn-E3XH2KFD.js} +160 -154
  211. package/{switchDialogAgentAction-UOFIAGPL.js → switchDialogAgentAction-G6EZRKCQ.js} +15 -14
  212. package/{tableCommands-HITDSLHS.js → tableCommands-JI75ZHDI.js} +14 -11
  213. package/{toolApiClient-OGQEBQVX.js → toolApiClient-62UUPDUA.js} +3 -5
  214. package/{tools-JVOJ5HC4.js → tools-7RSX22FT.js} +64 -58
  215. package/tuiRestart-KAAA7TND.js +41 -0
  216. package/{tuiSummaryLlmCaller-7LWYTHLM.js → tuiSummaryLlmCaller-BVNHMWLR.js} +19 -19
  217. package/{updateCommands-RJVCRSBP.js → updateCommands-ASK5XYPH.js} +8 -6
  218. package/{updateDialogTitleAction-Q57BOSXG.js → updateDialogTitleAction-SEWV252V.js} +37 -35
  219. package/{usageCommand-RVKHEPLU.js → usageCommand-JVT5J3DC.js} +3 -3
  220. package/{usageRebuildCommand-GRAFOZF2.js → usageRebuildCommand-IZYYUTEW.js} +4 -4
  221. package/webapi-24RZDIIQ.js +2488 -0
  222. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-BSDIS2J5.js} +2 -2
  223. package/workContext-MM3P5GP5.js +13 -0
  224. package/workContextAccess-UZHDLBUR.js +11 -0
  225. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  226. package/agentRecordCommands-DX2WE6BH.js +0 -176
  227. package/chunk-2THCNKE4.js +0 -147
  228. package/chunk-2WZXXAQD.js +0 -57
  229. package/chunk-652XYZGP.js +0 -352
  230. package/chunk-KEPOVMF4.js +0 -91
  231. package/chunk-OXKUPBAQ.js +0 -776
  232. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  233. package/{chunk-SNBZZPYH.js → chunk-OQHIVPG4.js} +3 -3
  234. package/{chunk-47ITIXO7.js → chunk-USGHJSGO.js} +3 -3
  235. package/{offlineMarxistsAgentCommand-4IC3Y4C6.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +3 -3
  236. package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-YIZ7KLUP.js} +3 -3
@@ -1,11 +1,9 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-F3TQURKK.js";
3
+ } from "./chunk-FZKA3XFA.js";
4
4
  import {
5
- prepareAndPersistMessage,
6
- uiAskChoiceFunc,
7
- uiAskChoiceFunctionSchema
8
- } from "./chunk-FVZW66K4.js";
5
+ prepareAndPersistMessage
6
+ } from "./chunk-B7DE5XJW.js";
9
7
  import {
10
8
  require_format
11
9
  } from "./chunk-BUDVRYES.js";
@@ -18,10 +16,10 @@ import {
18
16
  removeCachedEntity,
19
17
  upsertSSREntity,
20
18
  write
21
- } from "./chunk-AVHRSJUH.js";
19
+ } from "./chunk-RM4UMFY4.js";
22
20
  import {
23
21
  isDevelopment
24
- } from "./chunk-AGP3YSEC.js";
22
+ } from "./chunk-ULLHVDTZ.js";
25
23
  import {
26
24
  selectIdentityUserId
27
25
  } from "./chunk-PXYBUFDB.js";
@@ -37,15 +35,15 @@ import {
37
35
  createDialogKey,
38
36
  dialogMessageRange
39
37
  } from "./chunk-OJKUU3LP.js";
38
+ import {
39
+ asOptionalPositiveFiniteNumber
40
+ } from "./chunk-U6VC4MU4.js";
40
41
  import {
41
42
  asTrimmedString
42
43
  } from "./chunk-3EUW3WEO.js";
43
44
  import {
44
45
  isRecord
45
46
  } from "./chunk-KUG52IAP.js";
46
- import {
47
- asOptionalPositiveFiniteNumber
48
- } from "./chunk-U6VC4MU4.js";
49
47
  import {
50
48
  asOptionalTrimmedString
51
49
  } from "./chunk-G3SUCT4W.js";
@@ -57,6 +55,226 @@ import {
57
55
  var import_format = __toESM(require_format());
58
56
  var import_formatISO = __toESM(require_formatISO());
59
57
 
58
+ // packages/ai/tools/uiAskChoiceTool.ts
59
+ var uiAskChoiceFunctionSchema = {
60
+ name: "ask_user",
61
+ description: "\u8BA9\u7528\u6237\u5728\u4E00\u7EC4\u9009\u9879\u4E4B\u95F4\u505A\u9009\u62E9\uFF08\u5355\u9009\u6216\u591A\u9009\uFF09\u7684\u901A\u7528\u201C\u51FA\u9009\u9879\u201D\u5DE5\u5177\uFF08\u9700\u6C42\u6A21\u7CCA\u3001\u5206\u652F\u51B3\u7B56\u3001\u95EE\u5377\u7B49\uFF09\u3002\u672C\u5DE5\u5177\u7528\u4E8E\u7EAF\u63D0\u95EE\u3001\u7B49\u5F85\u7528\u6237\u56DE\u7B54\u7684\u573A\u666F\uFF08blocking:false \u65F6\u4E0D\u6682\u505C\u7B49\u5F85\uFF09\uFF1B\u82E5\u9700\u8981\u540C\u65F6\u5C55\u793A\u7ED3\u6784\u5316\u5BF9\u6BD4/\u6307\u6807\u5E76\u8BA9\u7528\u6237\u5728\u540C\u4E00\u5757\u91CC\u9009\u62E9\uFF0C\u8D70 show_interaction\u3002\u8C03\u7528\u524D\u987B\u5148\u5728\u666E\u901A\u56DE\u590D\u6587\u672C\u91CC\u89E3\u91CA\u80CC\u666F\u4E0E\u6743\u8861\uFF08\u5148\u89E3\u91CA\uFF0C\u518D\u8C03\u7528\uFF09\u3002\u591A\u95EE\u9898\u4F20 questions\uFF0C\u5355\u95EE\u9898\u4F20 question+choices\u3002\u754C\u9762\u9ED8\u8BA4\u63D0\u4F9B\u201C\u5176\u4ED6\u201D\u81EA\u7531\u8F93\u5165\u884C\uFF08\u53EF\u7528 allowOther:false \u5173\u95ED\uFF09\uFF0C\u7528\u6237\u8F93\u5165\u7684\u6587\u5B57\u4F1A\u968F\u7B54\u6848\u56DE\u4F20\uFF1B\u4E0D\u8981\u81EA\u5EFA\u201C\u5176\u4ED6/\u81EA\u5DF1\u5199\u201D\u4E4B\u7C7B\u7684\u9009\u9879\u2014\u2014\u70B9\u51FB\u666E\u901A\u9009\u9879\u53EA\u56DE\u4F20\u8BE5\u9009\u9879\u6587\u6848\uFF0C\u7528\u6237\u65E0\u5904\u586B\u5199\u3002",
62
+ parameters: {
63
+ type: "object",
64
+ properties: {
65
+ question: {
66
+ type: "string",
67
+ description: "\u5C55\u793A\u7ED9\u7528\u6237\u7684\u95EE\u9898\u6587\u6848\uFF08\u5355\u95EE\u9898\u6A21\u5F0F\uFF09\u3002\u4E0E questions \u4E8C\u9009\u4E00\u3002"
68
+ },
69
+ choices: {
70
+ type: "array",
71
+ description: "\u5907\u9009\u9879\u5217\u8868\uFF0C\u6E32\u67D3\u4E3A\u6309\u94AE\u4F9B\u7528\u6237\u70B9\u51FB\u3002",
72
+ items: {
73
+ type: "object",
74
+ properties: {
75
+ id: {
76
+ type: "string",
77
+ description: "\u9009\u9879\u6807\u8BC6\u3002"
78
+ },
79
+ label: {
80
+ type: "string",
81
+ description: "\u6309\u94AE\u6587\u5B57\uFF0C\u5982\u201C\u751F\u6210\u672C\u5468\u5468\u62A5\u201D\u3002"
82
+ },
83
+ detail: {
84
+ type: "string",
85
+ description: "\u7B80\u77ED\u8865\u5145\uFF08\u5EFA\u8BAE\u4E00\u53E5\u8BDD\uFF09\uFF0C\u957F\u89E3\u91CA\u5199\u8FDB\u8C03\u7528\u524D\u7684\u56DE\u590D\u6587\u672C\u3002"
86
+ },
87
+ userMessage: {
88
+ type: "string",
89
+ description: "\u70B9\u51FB\u540E\u4F5C\u4E3A\u4E0B\u4E00\u6761 user \u6D88\u606F\u53D1\u9001\u7684\u6587\u6848\uFF08\u7559\u7A7A\u9ED8\u8BA4\u7528 label\uFF09\u3002"
90
+ }
91
+ },
92
+ required: ["id", "label"]
93
+ }
94
+ },
95
+ questions: {
96
+ type: "array",
97
+ description: "\u591A\u95EE\u9898\u6A21\u5F0F\uFF08\u591A tab \u6E32\u67D3\uFF0C\u4E0E question+choices \u4E8C\u9009\u4E00\uFF09\u3002",
98
+ items: {
99
+ type: "object",
100
+ properties: {
101
+ id: {
102
+ type: "string",
103
+ description: "\u95EE\u9898\u6807\u8BC6\u3002"
104
+ },
105
+ header: {
106
+ type: "string",
107
+ description: "\u591A\u95EE\u9898 tab \u680F\u663E\u793A\u7684\u77ED\u6807\u7B7E\uFF08\u226412 \u5B57\u7B26\uFF0C\u5982\u201C\u683C\u5F0F/\u8BED\u8A00/\u8303\u56F4\u201D\uFF09\uFF0C\u7F3A\u7701\u7528 Qn\u3002"
108
+ },
109
+ question: {
110
+ type: "string",
111
+ description: "\u95EE\u9898\u6587\u6848\u3002"
112
+ },
113
+ choices: {
114
+ type: "array",
115
+ description: "\u8BE5\u95EE\u9898\u7684\u5907\u9009\u9879\u3002",
116
+ items: {
117
+ type: "object",
118
+ properties: {
119
+ id: { type: "string" },
120
+ label: { type: "string" },
121
+ detail: {
122
+ type: "string",
123
+ description: "\u7B80\u77ED\u8865\u5145\uFF08\u5EFA\u8BAE\u4E00\u53E5\u8BDD\uFF09\uFF0C\u957F\u89E3\u91CA\u5199\u8FDB\u8C03\u7528\u524D\u7684\u56DE\u590D\u6587\u672C\u3002"
124
+ },
125
+ userMessage: { type: "string" }
126
+ },
127
+ required: ["id", "label"]
128
+ }
129
+ },
130
+ multiSelect: {
131
+ type: "boolean",
132
+ description: "\u5141\u8BB8\u591A\u9009\uFF0C\u9ED8\u8BA4 false\u3002"
133
+ },
134
+ allowOther: {
135
+ type: "boolean",
136
+ description: "\u663E\u793A\u201C\u5176\u4ED6\u201D\u81EA\u7531\u8F93\u5165\u884C\uFF0C\u9ED8\u8BA4 true\u3002"
137
+ },
138
+ required: {
139
+ type: "boolean",
140
+ description: "\u662F\u5426\u5FC5\u987B\u56DE\u7B54\u624D\u80FD\u63D0\u4EA4\uFF0C\u9ED8\u8BA4 true\u3002"
141
+ }
142
+ },
143
+ required: ["id", "question", "choices"]
144
+ }
145
+ },
146
+ blocking: {
147
+ type: "boolean",
148
+ description: "\u662F\u5426\u7B49\u5F85\u7528\u6237\u9009\u62E9\u540E\u518D\u7EE7\u7EED\u6D41\u7A0B\uFF0C\u9ED8\u8BA4 true\u3002"
149
+ }
150
+ },
151
+ required: []
152
+ }
153
+ };
154
+ function validateChoiceList(choices, scopeLabel) {
155
+ const seenChoiceIds = /* @__PURE__ */ new Set();
156
+ for (let index = 0; index < choices.length; index += 1) {
157
+ const entry = choices[index];
158
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
159
+ return `${scopeLabel}.choices[${index}] \u5FC5\u987B\u662F\u5BF9\u8C61\u3002`;
160
+ }
161
+ const choice = entry;
162
+ if (typeof choice.label !== "string" || !choice.label.trim()) {
163
+ return `${scopeLabel}.choices[${index}].label \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002`;
164
+ }
165
+ if (choice.id !== void 0 && typeof choice.id !== "string") {
166
+ return `${scopeLabel}.choices[${index}].id \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002`;
167
+ }
168
+ const choiceId = typeof choice.id === "string" ? choice.id.trim() : "";
169
+ if (choiceId && seenChoiceIds.has(choiceId)) {
170
+ return `${scopeLabel} \u5185\u7684\u9009\u9879 id "${choiceId}" \u91CD\u590D\u3002`;
171
+ }
172
+ if (choiceId) seenChoiceIds.add(choiceId);
173
+ }
174
+ return null;
175
+ }
176
+ function validateAskChoiceInput(raw) {
177
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
178
+ return "ask_user \u9700\u8981\u4E00\u4E2A\u5BF9\u8C61\u53C2\u6570\u3002";
179
+ }
180
+ const args = raw;
181
+ if (args.blocking !== void 0 && typeof args.blocking !== "boolean") {
182
+ return "ask_user \u7684 blocking \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002";
183
+ }
184
+ const rawQuestions = args.questions;
185
+ if (rawQuestions !== void 0 && !Array.isArray(rawQuestions)) {
186
+ return "ask_user \u7684 questions \u5FC5\u987B\u662F\u6570\u7EC4\u3002";
187
+ }
188
+ const questions = rawQuestions;
189
+ if (questions && questions.length > 0) {
190
+ const seenQuestionIds = /* @__PURE__ */ new Set();
191
+ for (let index = 0; index < questions.length; index += 1) {
192
+ const entry = questions[index];
193
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) {
194
+ return `questions[${index}] \u5FC5\u987B\u662F\u5BF9\u8C61\u3002`;
195
+ }
196
+ const question = entry;
197
+ if (question.id !== void 0 && typeof question.id !== "string") {
198
+ return `questions[${index}].id \u5FC5\u987B\u662F\u5B57\u7B26\u4E32\u3002`;
199
+ }
200
+ const questionId = typeof question.id === "string" ? question.id.trim() : "";
201
+ if (questionId && seenQuestionIds.has(questionId)) {
202
+ return `\u95EE\u9898 id "${questionId}" \u91CD\u590D\u3002`;
203
+ }
204
+ if (questionId) seenQuestionIds.add(questionId);
205
+ if (typeof question.question !== "string" || !question.question.trim()) {
206
+ return `questions[${index}].question \u5FC5\u987B\u662F\u975E\u7A7A\u5B57\u7B26\u4E32\u3002`;
207
+ }
208
+ for (const flag of ["multiSelect", "allowOther", "required"]) {
209
+ if (question[flag] !== void 0 && typeof question[flag] !== "boolean") {
210
+ return `questions[${index}].${flag} \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002`;
211
+ }
212
+ }
213
+ const choices = question.choices;
214
+ if (!Array.isArray(choices)) {
215
+ return `questions[${index}].choices \u5FC5\u987B\u662F\u6570\u7EC4\u3002`;
216
+ }
217
+ const choiceError = validateChoiceList(choices, `questions[${index}]`);
218
+ if (choiceError) return choiceError;
219
+ if (choices.length === 0 && question.allowOther === false) {
220
+ return `questions[${index}] \u6CA1\u6709\u4EFB\u4F55\u9009\u9879\u4E14 allowOther \u4E3A false\uFF0C\u7528\u6237\u65E0\u6CD5\u4F5C\u7B54\u3002`;
221
+ }
222
+ }
223
+ return null;
224
+ }
225
+ if (typeof args.question !== "string" || !args.question.trim()) {
226
+ return "ask_user \u9700\u8981 question\uFF08\u975E\u7A7A\u5B57\u7B26\u4E32\uFF09\u4E0E choices\u3002";
227
+ }
228
+ if (!Array.isArray(args.choices) || args.choices.length === 0) {
229
+ return "ask_user \u9700\u8981 question\uFF08\u975E\u7A7A\u5B57\u7B26\u4E32\uFF09\u4E0E choices\u3002";
230
+ }
231
+ return validateChoiceList(args.choices, "ask_user");
232
+ }
233
+ async function uiAskChoiceFunc(args, _thunkApi) {
234
+ const invalid = validateAskChoiceInput(args);
235
+ if (invalid) throw new Error(invalid);
236
+ const blocking = args?.blocking !== false;
237
+ if (Array.isArray(args?.questions) && args.questions.length > 0) {
238
+ const firstQ = args.questions[0];
239
+ return {
240
+ rawData: {
241
+ type: "ask_user",
242
+ question: firstQ?.question ?? "",
243
+ choices: firstQ?.choices ?? [],
244
+ blocking,
245
+ questions: args.questions
246
+ },
247
+ displayData: args.questions.map((q) => q.question).join(" / ")
248
+ };
249
+ }
250
+ const question = String(args?.question ?? "").trim();
251
+ const choices = Array.isArray(args?.choices) ? args.choices : [];
252
+ if (!question || choices.length === 0) {
253
+ throw new Error("ask_user \u9700\u8981 question+choices \u6216 questions\u3002");
254
+ }
255
+ return {
256
+ rawData: {
257
+ type: "ask_user",
258
+ question,
259
+ choices,
260
+ blocking
261
+ },
262
+ displayData: question
263
+ };
264
+ }
265
+ function parseUiAskChoiceContent(rawContent) {
266
+ const parsed = typeof rawContent === "string" ? (() => {
267
+ try {
268
+ return JSON.parse(rawContent);
269
+ } catch {
270
+ return null;
271
+ }
272
+ })() : rawContent;
273
+ if (!parsed || typeof parsed !== "object") return null;
274
+ if (parsed.type !== "ask_user") return null;
275
+ return parsed;
276
+ }
277
+
60
278
  // packages/ai/memory/policy.ts
61
279
  function isPublicAgentKey(agentKey) {
62
280
  return typeof agentKey === "string" && /^agent-pub-/i.test(agentKey.trim());
@@ -852,6 +1070,10 @@ var createDialogAction = async (args, thunkApi) => {
852
1070
  };
853
1071
 
854
1072
  export {
1073
+ uiAskChoiceFunctionSchema,
1074
+ validateAskChoiceInput,
1075
+ uiAskChoiceFunc,
1076
+ parseUiAskChoiceContent,
855
1077
  resolveAgentMemoryPolicy,
856
1078
  buildMemorySubjectsForAgent,
857
1079
  chooseMemoryOwners,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-C4VAR65S.js";
4
+ } from "./chunk-G22P367E.js";
5
5
 
6
6
  // packages/cli/client/localAgentRecords.ts
7
7
  var buildLocalAgentLookupKeys = buildAgentRuntimeAgentLookupKeys;
@@ -30,6 +30,7 @@ var estimateTokens = (text) => {
30
30
  }
31
31
  return Math.ceil(cjk * 1.5 + ascii / 4);
32
32
  };
33
+ var estimateMemoryBlockTokens = estimateTokens;
33
34
  var OVERLAY_HEADER_LINES = [
34
35
  "--- Memory (\u76F8\u5173\u65F6\u53C2\u8003\uFF0C\u7528\u6237\u8F93\u5165\u4F18\u5148) ---",
35
36
  ""
@@ -40,6 +41,13 @@ var KIND_PRIORITY = {
40
41
  procedural: 1,
41
42
  episodic: 2
42
43
  };
44
+ var emptyMemoryInjectionObservation = () => ({
45
+ vnextInjectedLines: 0,
46
+ legacyUncoveredInjectedLines: 0,
47
+ unattributedInjectedLines: 0,
48
+ totalInjectedLines: 0,
49
+ empty: true
50
+ });
43
51
  var FACET_DISPLAY = {
44
52
  unfinished: { label: "\u8FD8\u6CA1\u5B9A\u4E0B", strip: "\u8FD8\u6CA1\u51B3\u5B9A" },
45
53
  tension: { label: "\u5728\u6743\u8861", strip: "\u5728\u6743\u8861" },
@@ -100,7 +108,7 @@ var truncateLineToTokens = (lineText, budgetTokens) => {
100
108
  if (cut <= 2) return null;
101
109
  return `${lineText.slice(0, cut).trimEnd()}${TRUNCATED_SUFFIX}`;
102
110
  };
103
- var fitLinesToBudget = (allLines, remainingBudget) => {
111
+ var fitLinesToBudget = (allLines, remainingBudget, onKept) => {
104
112
  let usedTokens = 0;
105
113
  const keptByKind = {};
106
114
  let truncatedCount = 0;
@@ -118,6 +126,7 @@ var fitLinesToBudget = (allLines, remainingBudget) => {
118
126
  if (candidate.lineTokens <= remaining) {
119
127
  usedTokens += candidate.lineTokens;
120
128
  pushLine(candidate.kind, candidate.lineText);
129
+ onKept(candidate);
121
130
  continue;
122
131
  }
123
132
  const truncated = truncateLineToTokens(candidate.lineText, remaining);
@@ -127,6 +136,7 @@ var fitLinesToBudget = (allLines, remainingBudget) => {
127
136
  }
128
137
  usedTokens += estimateTokens(truncated);
129
138
  pushLine(candidate.kind, truncated);
139
+ onKept(candidate);
130
140
  truncatedCount += 1;
131
141
  }
132
142
  return { keptByKind, truncatedCount, droppedCount };
@@ -141,7 +151,7 @@ var EMPTY_RESIDENT_FIT = {
141
151
  truncatedCount: 0,
142
152
  droppedCount: 0
143
153
  };
144
- var fitResidentLines = (lines, remainingBudget) => {
154
+ var fitResidentLines = (lines, remainingBudget, onKept) => {
145
155
  let usedTokens = 0;
146
156
  const keptLines = [];
147
157
  let truncatedCount = 0;
@@ -155,6 +165,7 @@ var fitResidentLines = (lines, remainingBudget) => {
155
165
  if (candidate.lineTokens <= remaining) {
156
166
  usedTokens += candidate.lineTokens;
157
167
  keptLines.push(candidate.lineText);
168
+ onKept(candidate);
158
169
  continue;
159
170
  }
160
171
  const truncated = truncateLineToTokens(candidate.lineText, remaining);
@@ -164,6 +175,7 @@ var fitResidentLines = (lines, remainingBudget) => {
164
175
  }
165
176
  usedTokens += estimateTokens(truncated);
166
177
  keptLines.push(truncated);
178
+ onKept(candidate);
167
179
  truncatedCount += 1;
168
180
  }
169
181
  return { keptLines, truncatedCount, droppedCount };
@@ -186,7 +198,22 @@ var buildBudgetFooter = (fit, residentFit) => {
186
198
  return [`\uFF08${notices.join("\u3001")}\uFF1B\u9700\u8981\u5B8C\u6574\u5185\u5BB9\u6216\u66F4\u591A\u76F8\u5173\u8BB0\u5FC6\u65F6\u7528 queryMemory \u68C0\u7D22\uFF09`];
187
199
  };
188
200
  var buildMemoryOverlay = (items, options) => {
189
- if (items.length === 0) return null;
201
+ const injection = emptyMemoryInjectionObservation();
202
+ const onKept = (line) => {
203
+ injection.totalInjectedLines++;
204
+ injection.empty = false;
205
+ if (line.source === "vnext") injection.vnextInjectedLines++;
206
+ else if (line.source === "legacy-uncovered") injection.legacyUncoveredInjectedLines++;
207
+ else injection.unattributedInjectedLines++;
208
+ };
209
+ const finish = (prompt) => {
210
+ try {
211
+ options?.injectionEmit?.(injection);
212
+ } catch {
213
+ }
214
+ return prompt;
215
+ };
216
+ if (items.length === 0) return finish(null);
190
217
  const maxTokens = options?.maxTokens ?? DEFAULT_MEMORY_OVERLAY_TOKEN_BUDGET;
191
218
  const perKindLimit = options?.perKindLimit ?? 3;
192
219
  const residentMaxTokens = options?.residentMaxTokens ?? RESIDENT_MEMORY_OVERLAY_TOKEN_BUDGET;
@@ -195,9 +222,10 @@ var buildMemoryOverlay = (items, options) => {
195
222
  const residentFit = residentItems.length === 0 ? EMPTY_RESIDENT_FIT : fitResidentLines(
196
223
  residentItems.map((item) => {
197
224
  const lineText = `- ${isInferredMemory(item) ? "\uFF08\u63A8\u65AD\uFF09" : ""}${normalizeDisplayContent(item)}`;
198
- return { kind: item.kind, lineText, lineTokens: estimateTokens(lineText) };
225
+ return { kind: item.kind, lineText, lineTokens: estimateTokens(lineText), source: options?.sources?.get(item) };
199
226
  }),
200
- residentMaxTokens - estimateTokens(RESIDENT_SECTION_HEADER)
227
+ residentMaxTokens - estimateTokens(RESIDENT_SECTION_HEADER),
228
+ onKept
201
229
  );
202
230
  const byKind = {
203
231
  episodic: [],
@@ -214,10 +242,10 @@ var buildMemoryOverlay = (items, options) => {
214
242
  const allLines = Object.entries(byKind).filter(([, list]) => list.length > 0).flatMap(
215
243
  ([kind, list]) => pickWithinKind(list, perKindLimit).map((item) => {
216
244
  const lineText = `- ${isInferredMemory(item) ? "\uFF08\u63A8\u65AD\uFF09" : ""}${normalizeDisplayContent(item)}`;
217
- return { kind, lineText, lineTokens: estimateTokens(lineText) };
245
+ return { kind, lineText, lineTokens: estimateTokens(lineText), source: options?.sources?.get(item) };
218
246
  })
219
247
  ).sort((a, b) => (KIND_PRIORITY[a.kind] ?? 99) - (KIND_PRIORITY[b.kind] ?? 99));
220
- retrievalFit = fitLinesToBudget(allLines, remainingBudget);
248
+ retrievalFit = fitLinesToBudget(allLines, remainingBudget, onKept);
221
249
  const kindOrder = ["semantic", "procedural", "episodic"];
222
250
  retrievalSections = kindOrder.filter(
223
251
  (kind) => retrievalFit.keptByKind[kind] && retrievalFit.keptByKind[kind].length > 0
@@ -230,17 +258,19 @@ var buildMemoryOverlay = (items, options) => {
230
258
  ...retrievalSections
231
259
  ];
232
260
  if (sections.length === 0) {
233
- return OVERLAY_HEADER_LINES.join("\n");
261
+ return finish(OVERLAY_HEADER_LINES.join("\n"));
234
262
  }
235
- return [
263
+ return finish([
236
264
  ...OVERLAY_HEADER_LINES,
237
265
  ...sections,
238
266
  ...buildBudgetFooter(retrievalFit, residentFit)
239
- ].join("\n");
267
+ ].join("\n"));
240
268
  };
241
269
 
242
270
  export {
243
271
  EXPLICIT_REMEMBER_PREFIX_REGEX,
272
+ estimateMemoryBlockTokens,
273
+ emptyMemoryInjectionObservation,
244
274
  DEFAULT_MEMORY_OVERLAY_TOKEN_BUDGET,
245
275
  RESIDENT_MEMORY_OVERLAY_TOKEN_BUDGET,
246
276
  buildMemoryOverlay
@@ -79,14 +79,17 @@ function mergeWindow(into, win) {
79
79
  existing.source = win.source;
80
80
  }
81
81
  function parseQuotaWindowScope(scope) {
82
- const matched = /^(gemini|3p)-(.+)$/.exec(scope);
82
+ const matched = /^(gemini|3p|hydrogen|argon)-(.+)$/.exec(scope);
83
83
  return matched ? { family: matched[1], period: matched[2] } : { period: scope };
84
84
  }
85
85
  function resolveQuotaWindowFamily(model) {
86
86
  if (typeof model !== "string" || !model.trim()) return void 0;
87
+ if (/(?:^|[/-])gemini-[^/]*hydrogen(?:-|$)/i.test(model)) return "hydrogen";
88
+ if (/(?:^|[/-])gemini-[^/]*argon(?:-|$)/i.test(model)) return "argon";
87
89
  return /gemini/i.test(model) ? "gemini" : "3p";
88
90
  }
89
- function isQuotaWindowRelevantToFamily(scope, family) {
91
+ function isQuotaWindowRelevantToFamily(scope, family, source) {
92
+ if (scope === "gemini-5h" && source?.endsWith(":fetchAvailableModels")) return false;
90
93
  if (typeof scope !== "string") return true;
91
94
  const scopeFamily = parseQuotaWindowScope(scope).family;
92
95
  return scopeFamily === void 0 || family === void 0 || scopeFamily === family;
@@ -95,7 +98,7 @@ function selectQuotaWindowsForModel(quota, now, model) {
95
98
  if (!quota || !Array.isArray(quota.windows)) return [];
96
99
  const family = resolveQuotaWindowFamily(model);
97
100
  return quota.windows.filter(
98
- (window) => !isQuotaWindowExpired(window, now) && isQuotaWindowRelevantToFamily(window?.scope, family)
101
+ (window) => !isQuotaWindowExpired(window, now) && isQuotaWindowRelevantToFamily(window?.scope, family, window?.source)
99
102
  );
100
103
  }
101
104
  function isQuotaWindowExpired(window, now) {
@@ -373,7 +376,7 @@ function shouldClearCooldownFromQuota(entry, quota, now, options) {
373
376
  if (!quota || !(quota.observedAt > entry.markedAt)) return false;
374
377
  const family = resolveQuotaWindowFamily(options?.model);
375
378
  const relevantWindows = quota.windows.filter(
376
- (window) => isQuotaWindowRelevantToFamily(window.scope, family)
379
+ (window) => isQuotaWindowRelevantToFamily(window.scope, family, window.source)
377
380
  );
378
381
  const subscriptionWindows = relevantWindows.filter(isSubscriptionPeriodWindow);
379
382
  if (subscriptionWindows.length === 0) return false;
@@ -409,7 +412,7 @@ function resolveAgentAvailability(agent, now = Date.now()) {
409
412
  const hasObservedAt = Boolean(quota) && typeof quota?.observedAt === "number" && Number.isFinite(quota.observedAt);
410
413
  const family = resolveQuotaWindowFamily(agent?.model);
411
414
  const relevantWindows = (quota?.windows ?? []).filter(
412
- (window) => isQuotaWindowRelevantToFamily(window?.scope, family)
415
+ (window) => isQuotaWindowRelevantToFamily(window?.scope, family, window?.source)
413
416
  );
414
417
  const hasWindows = relevantWindows.length > 0;
415
418
  const hasValidQuota = isAdmissible && hasWindows;
@@ -647,6 +650,7 @@ function resolveCredentialCandidateKeys(key) {
647
650
  if (!key) return [];
648
651
  const trimmed = key.trim();
649
652
  if (!trimmed) return [];
653
+ if (/\|quota:(?:gemini|3p|hydrogen|argon)$/.test(trimmed)) return [trimmed];
650
654
  const candidates = [trimmed];
651
655
  const atIndex = trimmed.lastIndexOf("@");
652
656
  if (atIndex > 0) {
@@ -677,7 +681,21 @@ function resolveCredentialKey(agent) {
677
681
  function resolveCredentialKeyWithFallback(agent) {
678
682
  if (isPublicOrSystemAgentRecord(agent)) return void 0;
679
683
  const byRef = resolveCredentialKey(agent);
680
- if (byRef) return byRef;
684
+ if (byRef) {
685
+ const ref = byRef.split("@")[0]?.trim().toLowerCase();
686
+ const provider = agent?.provider;
687
+ let cloudCode = false;
688
+ try {
689
+ const host = new URL(String(agent?.customProviderUrl ?? "")).hostname;
690
+ cloudCode = /^(?:daily-|daily-sandbox-)?cloudcode-pa\.googleapis\.com$/.test(host);
691
+ } catch {
692
+ }
693
+ if (ref === "antigravity" || ref === "gemini" || provider === "google-antigravity" || cloudCode) {
694
+ const family = resolveQuotaWindowFamily(typeof agent?.model === "string" ? agent.model : void 0);
695
+ if (family) return `${byRef}|quota:${family}`;
696
+ }
697
+ return byRef;
698
+ }
681
699
  if (!agent || typeof agent !== "object") return void 0;
682
700
  const endpoint = agent.customProviderUrl;
683
701
  if (typeof endpoint === "string") {
@@ -7,10 +7,10 @@ import {
7
7
  } from "./chunk-ATNTHIZI.js";
8
8
 
9
9
  // packages/ai/agent/cliExecutor.ts
10
- import { exec, spawn as spawn2 } from "child_process";
10
+ import { execFile, spawn as spawn2 } from "child_process";
11
11
  import { randomUUID as randomUUID2 } from "node:crypto";
12
- import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
13
- import { isAbsolute, join, resolve } from "node:path";
12
+ import { existsSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs";
13
+ import { isAbsolute, join, relative, resolve } from "node:path";
14
14
  import { tmpdir } from "node:os";
15
15
  import { StringDecoder } from "node:string_decoder";
16
16
 
@@ -817,22 +817,24 @@ function executeCopilot(prompt, options) {
817
817
  } = options;
818
818
  return new Promise((resolve2, reject) => {
819
819
  const args = [
820
- "NO_COLOR=1",
821
- "gh copilot --",
822
- `-p ${JSON.stringify(prompt)}`,
820
+ "copilot",
821
+ "--",
822
+ "-p",
823
+ prompt,
823
824
  "--silent",
824
825
  "--disable-builtin-mcps",
825
- "--stream off",
826
+ "--stream",
827
+ "off",
826
828
  "--no-color"
827
829
  ];
828
- if (model) args.push(`--model ${model}`);
829
- if (reasoningEffort) args.push(`--reasoning-effort ${reasoningEffort}`);
830
+ if (model) args.push("--model", model);
831
+ if (reasoningEffort) args.push("--reasoning-effort", reasoningEffort);
830
832
  if (yolo) args.push("--yolo");
831
- const cmd = args.join(" ");
832
833
  const start = Date.now();
833
- exec(
834
- cmd,
835
- { timeout, cwd, env: buildCliProcessEnv(options.env) },
834
+ execFile(
835
+ "gh",
836
+ args,
837
+ { timeout, cwd, env: { ...buildCliProcessEnv(options.env), NO_COLOR: "1" } },
836
838
  (error, stdout, stderr) => {
837
839
  if (error) {
838
840
  if (error.killed && error.signal === "SIGTERM") {
@@ -888,6 +890,35 @@ function parseGeminiStreamJson(stdout) {
888
890
  }
889
891
  return parts.join("");
890
892
  }
893
+ function resolveGeminiCommand(env, platform = process.platform) {
894
+ if (platform !== "win32") return { command: "gemini", args: [] };
895
+ const path = Object.entries(env).find(([key]) => key.toLowerCase() === "path")?.[1] ?? "";
896
+ for (const directory of path.split(";")) {
897
+ if (!directory || !isAbsolute(directory)) continue;
898
+ if (existsSync(join(directory, "gemini.exe"))) {
899
+ return { command: join(directory, "gemini.exe"), args: [] };
900
+ }
901
+ if (!existsSync(join(directory, "gemini.cmd"))) continue;
902
+ try {
903
+ const root = realpathSync(join(directory, "node_modules", "@google", "gemini-cli"));
904
+ const manifest = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
905
+ const bin = typeof manifest.bin === "string" ? manifest.bin : manifest.bin?.gemini;
906
+ if (manifest.name !== "@google/gemini-cli" || typeof bin !== "string" || !bin) {
907
+ throw new Error("missing package bin");
908
+ }
909
+ const entry = realpathSync(resolve(root, bin));
910
+ const withinPackage = relative(root, entry);
911
+ if (withinPackage.startsWith("..") || isAbsolute(withinPackage) || !/\.[cm]?js$/i.test(entry)) {
912
+ throw new Error("package bin is not a contained JavaScript entry");
913
+ }
914
+ const node = join(directory, "node.exe");
915
+ return { command: existsSync(node) ? node : "node", args: [entry] };
916
+ } catch (error) {
917
+ throw new Error(`Gemini npm entry could not be resolved: ${String(error)}`);
918
+ }
919
+ }
920
+ return { command: "gemini", args: [] };
921
+ }
891
922
  function executeGemini(prompt, options) {
892
923
  const {
893
924
  model = "gemini-3.8-flash",
@@ -897,20 +928,22 @@ function executeGemini(prompt, options) {
897
928
  } = options;
898
929
  return new Promise((resolve2, reject) => {
899
930
  const args = [
900
- "NO_COLOR=1",
901
- "NODE_OPTIONS='--no-deprecation'",
902
- "gemini",
903
- `-p ${JSON.stringify(prompt)}`,
904
- "--output-format stream-json",
905
- `-m ${JSON.stringify(model)}`
931
+ "-p",
932
+ prompt,
933
+ "--output-format",
934
+ "stream-json",
935
+ "-m",
936
+ model
906
937
  ];
907
938
  if (yolo) args.push("--yolo");
908
- args.push("-e none");
909
- const cmd = args.join(" ");
939
+ args.push("-e", "none");
910
940
  const start = Date.now();
911
- exec(
912
- cmd,
913
- { timeout, cwd, env: buildCliProcessEnv(options.env) },
941
+ const env = { ...buildCliProcessEnv(options.env), NO_COLOR: "1", NODE_OPTIONS: "--no-deprecation" };
942
+ const launcher = resolveGeminiCommand(env);
943
+ execFile(
944
+ launcher.command,
945
+ [...launcher.args, ...args],
946
+ { timeout, cwd, env },
914
947
  (error, stdout, stderr) => {
915
948
  if (error) {
916
949
  if (error.killed && error.signal === "SIGTERM") {
@@ -2173,6 +2206,7 @@ export {
2173
2206
  isBufferedCliStreamingProvider,
2174
2207
  CLI_PROBE_BINARIES,
2175
2208
  materializeCliImageInputs,
2209
+ resolveGeminiCommand,
2176
2210
  executeCli,
2177
2211
  startCliSession,
2178
2212
  getCliSession,