nolo-cli 0.258.0-alpha.1 → 0.260.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-E2LL7FPO.js → _executeModel-EO6JFCOF.js} +97 -83
  3. package/accountResolver-NGICIMEE.js +1 -1
  4. package/{action-C6IQAKN4.js → action-WIA56QT4.js} +12 -10
  5. package/{addContentAction-53364YDW.js → addContentAction-OCMWZLYG.js} +14 -13
  6. package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-ER2NZ7BC.js} +20 -24
  7. package/{agentDeleteCommand-ORNRRKJO.js → agentDeleteCommand-KSXSNPAU.js} +184 -146
  8. package/{agentEmailCommands-2ALVFOD5.js → agentEmailCommands-NXRWS7NS.js} +142 -126
  9. package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-D2S7LCTU.js} +8 -5
  10. package/{agentListCommands-6I4NQPR4.js → agentListCommands-PFXGZZ3Y.js} +87 -68
  11. package/{agentMachineCommands-PNHTIJ6A.js → agentMachineCommands-2Q55CSL4.js} +68 -59
  12. package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-EUNS7Y2Z.js} +10 -7
  13. package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-S2VMPSWL.js} +9 -6
  14. package/agentRecordCommands-FUFI526H.js +210 -0
  15. package/agentRun-ZNMUPDHF.js +250 -0
  16. package/agentRunCommand-ISVQ2UYC.js +248 -0
  17. package/{agentRunControl-3TIVJ3SR.js → agentRunControl-NEK44LDM.js} +19 -12
  18. package/{agentRuntimeLocal-3MAEFYSB.js → agentRuntimeLocal-SST4EPLT.js} +62 -49
  19. package/{agentSlice-KOQXUPKT.js → agentSlice-4ZJJJN4M.js} +15 -18
  20. package/appConfigCommands-MPHS6FHD.js +417 -0
  21. package/{appDeleteCommands-FEPN62UR.js → appDeleteCommands-W26WGENW.js} +68 -58
  22. package/{appDeployCommands-DPFEWFYZ.js → appDeployCommands-ER7IOF5E.js} +74 -59
  23. package/{appDeployStatusCommands-LQ5X5KVX.js → appDeployStatusCommands-VKLL3A77.js} +68 -58
  24. package/{appGetCommands-W3JBBIF7.js → appGetCommands-P6GXJNUD.js} +74 -58
  25. package/{appListCommands-LUHZS7JU.js → appListCommands-ACA2IZZM.js} +74 -58
  26. package/appMigrateCommands-OGF4E2W6.js +230 -0
  27. package/appSourceCommands-GAHVBRUM.js +279 -0
  28. package/{authCommand-HKSXJT3J.js → authCommand-PXE7NZTQ.js} +26 -40
  29. package/{authCommands-T5FODCEG.js → authCommands-AZPYXTUB.js} +20 -17
  30. package/{builtinSkillRegistry-FVEEO4U2.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
  31. package/{chromeOpsCommands-4UIKH26F.js → chromeOpsCommands-7UKKUOBU.js} +68 -18
  32. package/{chunk-KO5PFS74.js → chunk-2CKFROQS.js} +2454 -1115
  33. package/{chunk-6N4IKMTH.js → chunk-2I4R6ZRV.js} +40 -26
  34. package/{chunk-FXEPZKNJ.js → chunk-2MIZHEND.js} +506 -64
  35. package/{chunk-TLE77UJ5.js → chunk-2OROOEOQ.js} +0 -1
  36. package/{chunk-6RSNVJGO.js → chunk-2ZBPWX7N.js} +4 -4
  37. package/chunk-35JIFLIG.js +30 -0
  38. package/{chunk-ZYPXOQS2.js → chunk-3EPED3UO.js} +1 -1
  39. package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
  40. package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
  41. package/{chunk-HPDLPEUG.js → chunk-42JZNSAY.js} +267 -234
  42. package/{chunk-223KZUJ6.js → chunk-4HZCBA4Q.js} +18 -15
  43. package/{chunk-C5A54QS7.js → chunk-4INJGWE3.js} +18 -5
  44. package/chunk-4IVMDQBA.js +261 -0
  45. package/chunk-4Y6CZ2N4.js +82 -0
  46. package/{chunk-OKAXQFON.js → chunk-52BNL6GP.js} +4 -4
  47. package/{chunk-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
  48. package/{chunk-QGFLVQ6E.js → chunk-6KUTNAPU.js} +4 -14
  49. package/{chunk-MNFUKRRU.js → chunk-6XAAKRJB.js} +7 -7
  50. package/{chunk-P27E22MA.js → chunk-6Z6DGDPI.js} +1 -1
  51. package/chunk-72VWN4VK.js +51 -0
  52. package/{chunk-2RZBFJEG.js → chunk-75FZ2Z7C.js} +16027 -17392
  53. package/{chunk-ADYWV732.js → chunk-76B6YUQS.js} +264 -177
  54. package/{chunk-AKBNCTPY.js → chunk-76K4GTY5.js} +1 -1
  55. package/{chunk-ZMJMHXYX.js → chunk-7HUCUD2I.js} +3 -3
  56. package/chunk-7LR2IFUH.js +100 -0
  57. package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
  58. package/{chunk-Y2TCTNUD.js → chunk-7QO6YSA4.js} +4 -4
  59. package/{chunk-TF427WGH.js → chunk-7RYH7YIY.js} +19 -27
  60. package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
  61. package/chunk-AMNZPQCY.js +635 -0
  62. package/chunk-AMTF6FJD.js +356 -0
  63. package/{chunk-MUDMYJCM.js → chunk-AQNWWJLH.js} +2 -56
  64. package/{chunk-WSLL7VV4.js → chunk-B4NA5UJR.js} +9 -9
  65. package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
  66. package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
  67. package/{chunk-46FETNLF.js → chunk-BTIFQBYW.js} +7 -6
  68. package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
  69. package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
  70. package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
  71. package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
  72. package/{chunk-JAGD4PSH.js → chunk-CRGPRAJ4.js} +46 -42
  73. package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
  74. package/{chunk-BD22OFDQ.js → chunk-CZHIOBBK.js} +8 -3
  75. package/chunk-D3ONA3FP.js +762 -0
  76. package/chunk-D3SAQ6T7.js +1697 -0
  77. package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
  78. package/{chunk-KQHEGELM.js → chunk-DEAII55O.js} +16 -6
  79. package/{chunk-J55F3IEZ.js → chunk-DKJQEFNG.js} +1 -1
  80. package/chunk-DLXL4NSL.js +1179 -0
  81. package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
  82. package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
  83. package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
  84. package/chunk-EJHLDJWZ.js +58 -0
  85. package/{chunk-E4HBZDV6.js → chunk-EMFZXJTN.js} +15 -47
  86. package/chunk-ER6NTALN.js +34 -0
  87. package/chunk-EUHMI5KG.js +101 -0
  88. package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
  89. package/{chunk-EXD7S7QW.js → chunk-FF5ZRKW7.js} +12 -7
  90. package/{chunk-7PTWFSZZ.js → chunk-FGD4NMTP.js} +4 -4
  91. package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
  92. package/chunk-FI4DPLR7.js +902 -0
  93. package/chunk-FKVLQNGJ.js +25 -0
  94. package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
  95. package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
  96. package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
  97. package/{chunk-IZHENZQ5.js → chunk-G5JGA5YM.js} +180 -31
  98. package/{chunk-7EUJ65PF.js → chunk-GMBWWBSJ.js} +782 -449
  99. package/{chunk-WS36XPJD.js → chunk-GYFKKTDI.js} +82 -6
  100. package/{chunk-APXC3SQO.js → chunk-GZ4I5EMM.js} +9 -9
  101. package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
  102. package/chunk-HJTI7RZV.js +94 -0
  103. package/{chunk-JGVWHUYK.js → chunk-HPIY372N.js} +7 -7
  104. package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
  105. package/{chunk-HDKMVYNJ.js → chunk-I3NWAILT.js} +6 -4
  106. package/{chunk-MD7O2NN2.js → chunk-IM7HCFB4.js} +313 -275
  107. package/{chunk-DWES4SXY.js → chunk-INN2PBW7.js} +1 -1
  108. package/chunk-IV6VUVLJ.js +88 -0
  109. package/chunk-J42X32PV.js +472 -0
  110. package/{chunk-V6S5OZSP.js → chunk-JHQNWV2C.js} +4441 -2569
  111. package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
  112. package/{chunk-BIDSIRTS.js → chunk-JUNYPVL6.js} +10 -16
  113. package/chunk-JVEKCQAP.js +222 -0
  114. package/{chunk-JW6OURKM.js → chunk-KAHYBAEN.js} +215 -473
  115. package/chunk-KDDXC2IH.js +148 -0
  116. package/chunk-KGKTN2NX.js +25 -0
  117. package/chunk-KGWE224L.js +246 -0
  118. package/chunk-L3UFGEDU.js +17157 -0
  119. package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
  120. package/{chunk-DCTQJDDQ.js → chunk-LIH7WSX5.js} +23 -379
  121. package/chunk-LJOPY4TL.js +443 -0
  122. package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
  123. package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
  124. package/chunk-LXP53WGF.js +168 -0
  125. package/chunk-MDAYRIP7.js +1889 -0
  126. package/chunk-MRACVEPZ.js +7 -0
  127. package/chunk-NHLLXINQ.js +8 -0
  128. package/{chunk-VQR2ACSC.js → chunk-NTBTVKKB.js} +17 -25
  129. package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
  130. package/{chunk-APQBEIOQ.js → chunk-P4XAHM4B.js} +1 -1
  131. package/chunk-PL5RKESU.js +40 -0
  132. package/{chunk-U2H426FE.js → chunk-PQ3QZMJK.js} +20 -4
  133. package/chunk-Q5FJJ6XI.js +103 -0
  134. package/{createAgentAutomationAction-HEZ3G5L4.js → chunk-QKM55LP2.js} +3 -160
  135. package/{chunk-SIHOY5YI.js → chunk-QZCLCAYC.js} +170 -164
  136. package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
  137. package/{chunk-JLZJL3WC.js → chunk-RDZ5OIAT.js} +370 -39
  138. package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
  139. package/chunk-RF576RYE.js +117 -0
  140. package/chunk-RI7SXDJW.js +1317 -0
  141. package/{chunk-JOJH3KWV.js → chunk-RIOAPUGV.js} +242 -25
  142. package/{chunk-7B55IVLF.js → chunk-RL6H2A2Z.js} +2561 -4059
  143. package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
  144. package/{chunk-BB76X6O4.js → chunk-RWXHGPWJ.js} +1 -1
  145. package/chunk-S7BF2OGX.js +432 -0
  146. package/{chunk-6VEO7Z3Y.js → chunk-SD4MBKZ7.js} +6 -6
  147. package/{chunk-PNBQ5JTA.js → chunk-SGEBRBF3.js} +7 -4
  148. package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
  149. package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
  150. package/{chunk-LJ6WIQZO.js → chunk-SX6PDLBZ.js} +279 -149
  151. package/{chunk-6VNBJ7GI.js → chunk-T4WU747C.js} +5 -5
  152. package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
  153. package/{chunk-KO5GO2BC.js → chunk-TXMFSGRY.js} +1 -1
  154. package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
  155. package/{chunk-CVDJUPBN.js → chunk-UOLGGEEC.js} +774 -119
  156. package/{chunk-ADUCBH4M.js → chunk-USFG4EWQ.js} +51 -42
  157. package/{chunk-LLUBUHNT.js → chunk-UYZOBSSO.js} +5 -9
  158. package/{chunk-ONTHDYFU.js → chunk-VDC3BW24.js} +24 -10
  159. package/chunk-VH356OQ3.js +425 -0
  160. package/{chunk-U6QNVOR5.js → chunk-VKM7DOYB.js} +130 -6
  161. package/{chunk-3GGVFHWI.js → chunk-VPAO5WQX.js} +17 -14
  162. package/{chunk-OYUMJMC5.js → chunk-W2RQYNPI.js} +5 -0
  163. package/{chunk-C63KMRJE.js → chunk-W2Z5E2R7.js} +126 -698
  164. package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
  165. package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
  166. package/chunk-WLJNHFEB.js +1710 -0
  167. package/chunk-WMBJDXMY.js +408 -0
  168. package/chunk-WSQLCWLQ.js +201 -0
  169. package/{chunk-YN23INFZ.js → chunk-WXD6Y7DW.js} +23 -2
  170. package/{chunk-RQKTCHQM.js → chunk-WY6DMHMG.js} +1 -1
  171. package/{chunk-MLK3FEXG.js → chunk-XJW6SLBZ.js} +3 -3
  172. package/{chunk-7BIJFGKS.js → chunk-XQFDCRG3.js} +105 -51
  173. package/chunk-XT6C2QZW.js +46 -0
  174. package/{chunk-NRUYSNSZ.js → chunk-Y7THFNVJ.js} +9 -9
  175. package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
  176. package/{chunk-RD3QLZQV.js → chunk-YM5XULB2.js} +324 -2
  177. package/{chunk-BD5YJJLJ.js → chunk-YNP3ITPU.js} +19 -12
  178. package/{chunk-U35UUM5K.js → chunk-YOUSQIIK.js} +1 -1
  179. package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
  180. package/{chunk-Z3JZ2R5F.js → chunk-YU235GGN.js} +25 -8
  181. package/chunk-YWEZSBLL.js +790 -0
  182. package/chunk-Z3KTXWWB.js +76 -0
  183. package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
  184. package/chunk-ZD7OULYZ.js +368 -0
  185. package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
  186. package/{chunk-HQUGB2HM.js → chunk-ZTCMXPIS.js} +62 -50
  187. package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-KMXS7JP5.js} +20 -14
  188. package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
  189. package/cliAuthorityBrokerProcess-DCCUT4YQ.js +34 -0
  190. package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-YDGDHIEE.js} +5 -2
  191. package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
  192. package/cliLocalAgentRecordReader-X2YHEBWI.js +113 -0
  193. package/cloudAutomationCommands-C6Q3BFRB.js +310 -0
  194. package/{commandRegistry-QKOJ5FIC.js → commandRegistry-TYYYTW5E.js} +263 -120
  195. package/{contentThunks-ZDBDDZP3.js → contentThunks-E6BJ5YSX.js} +45 -43
  196. package/{cooldownCommands-Y4ZQQ35D.js → cooldownCommands-FPAFS7XG.js} +1 -1
  197. package/createAgentAutomationAction-L3NLCIIW.js +172 -0
  198. package/{createDialogAction-DK62W5VA.js → createDialogAction-QSWKRPWQ.js} +46 -42
  199. package/{createPageAction-W6NXHVKO.js → createPageAction-ZVVUT4CZ.js} +49 -45
  200. package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
  201. package/{dbSlice-RWPSVHBC.js → dbSlice-SEVKNA7A.js} +21 -16
  202. package/deleteDbKey-43MTK2DI.js +86 -0
  203. package/{dialogCommands-Z24IDINY.js → dialogCommands-UVMTIFSA.js} +80 -66
  204. package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
  205. package/{dialogNotifyCommand-IASQGEMW.js → dialogNotifyCommand-LMWF7EQI.js} +22 -14
  206. package/dialogPortabilityCommands-PAMLEBST.js +3036 -0
  207. package/{dialogSlice-62GISS77.js → dialogSlice-VHPXENDZ.js} +43 -42
  208. package/{dialogTraceCommand-FDINAIZ6.js → dialogTraceCommand-SO2WKAXW.js} +83 -69
  209. package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-EUO6JXTD.js} +6 -3
  210. package/{docCreateCommands-SXA4TMGJ.js → docCreateCommands-H4RLIUNX.js} +68 -59
  211. package/{docDeleteCommands-ELXSZK3F.js → docDeleteCommands-OVAKCBMT.js} +68 -59
  212. package/{docReadCommands-DFLAQPI4.js → docReadCommands-KFISIUVA.js} +67 -58
  213. package/{docStore-UWF2PMCB.js → docStore-X7BEA735.js} +16 -17
  214. package/{docUpdateCommands-KB6M5HUH.js → docUpdateCommands-VOEER36L.js} +68 -59
  215. package/ebookDownloaderAgentCommand-2DHPGEOQ.js +674 -0
  216. package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
  217. package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
  218. package/{handleSendMessageAction-ZV6OQPQG.js → handleSendMessageAction-GQ2KKOET.js} +265 -119
  219. package/{hostCredentialCreate-3IA5IJFG.js → hostCredentialCreate-PJAIKZQP.js} +138 -122
  220. package/index.js +35 -21
  221. package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
  222. package/localAutomationCommands-UU66LOWB.js +198 -0
  223. package/localAutomationRuntime-SW4R42SZ.js +60 -0
  224. package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
  225. package/{localRuntimeAdapter-SSG5ORLZ.js → localRuntimeAdapter-WRBLXFUZ.js} +136 -119
  226. package/localRuntimeAuthority-3YDFZD3L.js +44 -0
  227. package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-CJWJK47G.js} +1 -1
  228. package/{machineCommands-4WKJ3TLO.js → machineCommands-JFYED66N.js} +251 -357
  229. package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
  230. package/machineWsRunDispatch-CZUV2FXE.js +227 -0
  231. package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-HLU72QME.js} +40 -22
  232. package/mcpLocalManageCommands-OHHU6F5C.js +212 -0
  233. package/{memberThunks-43B7UYC5.js → memberThunks-FJW4GPM5.js} +102 -22
  234. package/{memoryCommands-BC6REPQB.js → memoryCommands-2RLHDMU2.js} +25 -34
  235. package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
  236. package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
  237. package/package.json +3 -3
  238. package/parityCommands-7EWR34P3.js +613 -0
  239. package/{projectArchive-JN43WW4E.js → projectArchive-JIVRMXVV.js} +49 -45
  240. package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
  241. package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
  242. package/{read-KG6INYUT.js → read-6YR57D6V.js} +11 -10
  243. package/{readDocTool-N3GA52JR.js → readDocTool-NKOGL2MW.js} +5 -1
  244. package/{readlineWorkspace-D6EUSB2Q.js → readlineWorkspace-V26AN2FL.js} +926 -572
  245. package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
  246. package/remove-BF33RCTH.js +32 -0
  247. package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-GWHBWF4W.js} +22 -26
  248. package/{runAgentClientLoop-FEZTSUSJ.js → runAgentClientLoop-EKD2EEEA.js} +117 -82
  249. package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-IALUR5BZ.js} +23 -16
  250. package/{secretCommands-53NZFD4T.js → secretCommands-CSTQYB6T.js} +2 -2
  251. package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-RL6FGO7T.js} +16 -17
  252. package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-XJASBB3K.js} +23 -27
  253. package/{settingThunks-DVKG4X4S.js → settingThunks-ZT7ZYXXL.js} +170 -497
  254. package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
  255. package/{spaceCommands-4ACQQNZL.js → spaceCommands-65WQHVOI.js} +194 -90
  256. package/spacePruneCommand-PTMRUWYJ.js +233 -0
  257. package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
  258. package/{streamAgentChatTurn-I425SVYJ.js → streamAgentChatTurn-B5NICHZW.js} +225 -137
  259. package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-X6DFOIAX.js} +19 -23
  260. package/{tableCommands-EFA754RE.js → tableCommands-6E77VD73.js} +28 -49
  261. package/{toolApiClient-N5PYW2R3.js → toolApiClient-GTTWEV6P.js} +15 -4
  262. package/{tools-WBPFTSMK.js → tools-UMCPIQX6.js} +73 -63
  263. package/{tuiRestart-VN5F4GYU.js → tuiRestart-O7UDLNQU.js} +20 -13
  264. package/tuiSummaryLlmCaller-7APIUIIV.js +52 -0
  265. package/{updateCommands-VQEBBIGO.js → updateCommands-DXDIAQFS.js} +12 -7
  266. package/{updateDialogTitleAction-VB5DTVXV.js → updateDialogTitleAction-HZLKWVKM.js} +57 -58
  267. package/{usageCommand-WI6SQOPB.js → usageCommand-WYLNBDHB.js} +6 -8
  268. package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-AEUPY2PE.js} +11 -15
  269. package/{windowsSelfUpdate-ZEZKGX4M.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
  270. package/workContext-ZAW6VXT7.js +18 -0
  271. package/workContextQueryProjection-CACY5VFE.js +23 -0
  272. package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
  273. package/agentFavoriteCommands-7LOP3HUD.js +0 -186
  274. package/agentRecordCommands-BEZPBYBM.js +0 -194
  275. package/agentRunCommand-2T72V5KY.js +0 -232
  276. package/chunk-2MBTWINN.js +0 -89
  277. package/chunk-523DITKR.js +0 -32
  278. package/chunk-BUDVRYES.js +0 -2213
  279. package/chunk-BXGU6274.js +0 -862
  280. package/chunk-BZMDWGQQ.js +0 -47
  281. package/chunk-GAHJLSDO.js +0 -107
  282. package/chunk-GYX6XTAI.js +0 -84
  283. package/chunk-HNUWUO75.js +0 -93
  284. package/chunk-HSBHS6KT.js +0 -33401
  285. package/chunk-KG27JIG4.js +0 -136
  286. package/chunk-OB4FBZXJ.js +0 -364
  287. package/chunk-OKH74FML.js +0 -3746
  288. package/chunk-OLZBQWZU.js +0 -6
  289. package/chunk-OOV5JN25.js +0 -1317
  290. package/chunk-OQFOE4SJ.js +0 -405
  291. package/chunk-PXYBUFDB.js +0 -53
  292. package/chunk-R3FZHW4Q.js +0 -103
  293. package/chunk-R3MV2GII.js +0 -106
  294. package/chunk-SCAC3NM5.js +0 -11751
  295. package/chunk-SR4FE5VD.js +0 -9
  296. package/chunk-SYTHYBMI.js +0 -3558
  297. package/chunk-UKZX3NHN.js +0 -48
  298. package/chunk-UVLYNWIE.js +0 -74
  299. package/chunk-WFEWP352.js +0 -861
  300. package/chunk-X4O7FJF5.js +0 -160
  301. package/chunk-YJPK35HB.js +0 -175
  302. package/chunk-YNIYE47Z.js +0 -105
  303. package/chunk-Z4PCXPUE.js +0 -127
  304. package/chunk-ZTHAJU3O.js +0 -2537
  305. package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
  306. package/cliLocalAgentRecordReader-Q6677YID.js +0 -104
  307. package/deleteFile-ECU6FU5C.js +0 -55
  308. package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
  309. package/machineWsRunDispatch-7PROH7E7.js +0 -209
  310. package/markdownToSlate-PXYAIBVL.js +0 -8
  311. package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
  312. package/webapi-QVV65DQF.js +0 -2487
  313. package/workContext-Y3ADAPZU.js +0 -14
  314. package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
  315. package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
  316. package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
@@ -1,16 +1,16 @@
1
1
  import {
2
- EMPTY_TOOL_RESULT_TEXT,
3
- TOOL_HAD_IMAGES,
4
- TOOL_IMAGES,
5
- createToolImageBudget,
6
- formatToolImageBudgetNote,
7
- hadToolImages,
8
- projectOpenAiToolImages,
9
- toolImages
10
- } from "./chunk-X4O7FJF5.js";
2
+ TOOL_DISCOVERY_CALL_NAME,
3
+ TOOL_DISCOVERY_ID_PREFIX,
4
+ createToolLoadingState,
5
+ filterToolDiscoveryHistory,
6
+ isToolDiscoveryCall,
7
+ mcpDiscoveryEntry,
8
+ readToolLoadingReferences,
9
+ toolDiscoveryReference
10
+ } from "./chunk-4IVMDQBA.js";
11
11
  import {
12
12
  getModelContextWindow
13
- } from "./chunk-2FZVXOFX.js";
13
+ } from "./chunk-CEIWXKHP.js";
14
14
  import {
15
15
  isRecord
16
16
  } from "./chunk-KUG52IAP.js";
@@ -21,11 +21,421 @@ import {
21
21
  isFireworksKimiModel,
22
22
  isNoloHostedProvider,
23
23
  resolvePlatformEffectiveModel
24
- } from "./chunk-JPXACKSW.js";
24
+ } from "./chunk-G22P2J7O.js";
25
25
  import {
26
26
  asTrimmedLowercaseString
27
27
  } from "./chunk-QSJ3HFEF.js";
28
28
 
29
+ // packages/integrations/openai/responsesToolDiscovery.ts
30
+ var searchTool = {
31
+ type: "tool_search",
32
+ execution: "client",
33
+ description: "Find tools by name, keywords, category, or capability pack. Pass capabilityPackId to activate an entire authorized pack.",
34
+ parameters: {
35
+ type: "object",
36
+ properties: { query: { type: "string" }, capabilityPackId: { type: "string" } },
37
+ required: ["query"]
38
+ }
39
+ };
40
+ var eagerNames = /* @__PURE__ */ new Set(["loadSkill", "ask_user"]);
41
+ function hasDeferrableResponsesTools(tools) {
42
+ return !!tools?.length && tools.every((tool) => tool.type === "function") && tools.some((tool) => !!tool.function?.name && tool.function.name !== TOOL_DISCOVERY_CALL_NAME && !eagerNames.has(tool.function.name));
43
+ }
44
+ var hostedPrefix = `${TOOL_DISCOVERY_ID_PREFIX}openai-hosted:`;
45
+ function parseJson(value) {
46
+ if (typeof value !== "string") return value;
47
+ try {
48
+ return JSON.parse(value);
49
+ } catch {
50
+ return void 0;
51
+ }
52
+ }
53
+ function readSearchItem(item) {
54
+ if (!isRecord(item) || item.type !== "tool_search_call" || item.execution !== "client" || typeof item.call_id !== "string" || !item.call_id || item.status !== void 0 && item.status !== "completed") return void 0;
55
+ const args = parseJson(item.arguments);
56
+ if (!isRecord(args) || typeof args.query !== "string") return void 0;
57
+ return {
58
+ type: "tool_search_call",
59
+ call_id: item.call_id,
60
+ execution: "client",
61
+ arguments: { ...args, query: args.query },
62
+ ...typeof item.id === "string" ? { id: item.id } : {},
63
+ ...typeof item.status === "string" ? { status: item.status } : {}
64
+ };
65
+ }
66
+ function bridgeResponsesToolSearch(item) {
67
+ const search = readSearchItem(item);
68
+ if (!search) throw new Error("Responses returned an invalid client tool_search_call.");
69
+ return {
70
+ id: TOOL_DISCOVERY_ID_PREFIX + search.call_id,
71
+ type: "function",
72
+ function: { name: TOOL_DISCOVERY_CALL_NAME, arguments: JSON.stringify(search) }
73
+ };
74
+ }
75
+ var isMcpEntry = (entry) => "mcp" in entry;
76
+ function isFunctionTool(tool) {
77
+ return isRecord(tool) && tool.type === "function" && typeof tool.name === "string" && (tool.description === void 0 || typeof tool.description === "string");
78
+ }
79
+ function readHostedPaths(raw) {
80
+ if (!isRecord(raw) || !Array.isArray(raw.paths) || !raw.paths.every((path) => typeof path === "string")) return;
81
+ return raw.paths;
82
+ }
83
+ function finishResponsesToolDiscovery(calls, plan, output) {
84
+ if (plan?.protocol === "openai-hosted") {
85
+ const next = [];
86
+ const results2 = [];
87
+ const ordinary = new Map(calls.map((call) => [call.id, call]));
88
+ const visible = new Set(plan.visible);
89
+ let paths;
90
+ for (const item of Array.isArray(output) ? output : []) {
91
+ if (item?.type === "tool_search_call") {
92
+ if (item.execution !== "server") throw new Error("OpenAI returned client search in hosted mode.");
93
+ paths = item.call_id === null && item.status === "completed" ? readHostedPaths(item.arguments) : void 0;
94
+ } else if (item?.type === "tool_search_output" && item.execution === "server" && item.call_id === null && item.status === "completed" && paths && Array.isArray(item.tools)) {
95
+ const idBase = hostedPrefix + (typeof item.id === "string" && item.id ? item.id : `round-${plan.replayedCalls.size}`);
96
+ let id = idBase;
97
+ for (let index = 1; plan.replayedCalls.has(id) || next.some((call) => call.id === id); index++) id = `${idBase}-${index}`;
98
+ const names = /* @__PURE__ */ new Set();
99
+ for (const tool of item.tools) {
100
+ if (isFunctionTool(tool) && !visible.has(tool.name)) names.add(tool.name);
101
+ }
102
+ const loaded = [...names].flatMap((name) => {
103
+ const current = plan.state.authorized.get(name);
104
+ if (!current || isMcpEntry(current)) return [];
105
+ visible.add(name);
106
+ return [toolDiscoveryReference(current)];
107
+ });
108
+ next.push({ id, type: "function", function: { name: TOOL_DISCOVERY_CALL_NAME, arguments: JSON.stringify({ paths }) } });
109
+ results2.push({ callId: id, content: JSON.stringify({ loaded }) });
110
+ paths = void 0;
111
+ } else if (item?.type === "function_call") {
112
+ const call = ordinary.get(item.call_id);
113
+ if (!call) continue;
114
+ if (!visible.has(call.function.name) || plan.replayedCalls.has(call.id)) {
115
+ throw new Error("OpenAI Responses called a tool outside its authorized visible catalog.");
116
+ }
117
+ ordinary.delete(call.id);
118
+ next.push(call);
119
+ }
120
+ }
121
+ return { calls: next, results: results2 };
122
+ }
123
+ const results = resolveResponsesToolDiscovery(calls, plan);
124
+ const tagged = plan?.protocol === "openai-client" ? calls.map((call) => isToolDiscoveryCall(call) ? { ...call, function: { ...call.function, arguments: JSON.stringify({ ...parseJson(call.function.arguments), protocol: plan.protocol }) } } : call) : calls;
125
+ return { calls: tagged, results };
126
+ }
127
+ function prepareResponsesToolDiscovery(body, compacted, mcpTools, protocol = "deepseek-client") {
128
+ if (!Array.isArray(body.tools) || !Array.isArray(body.input) || !body.tools.length || !body.tools.every(isFunctionTool)) return void 0;
129
+ const functions = body.tools.filter((tool) => tool.name !== TOOL_DISCOVERY_CALL_NAME);
130
+ const mcpEntries = functions.some((tool) => tool.name === "callMcpTool") ? mcpTools?.map(mcpDiscoveryEntry) ?? [] : [];
131
+ const state = createToolLoadingState([...functions, ...mcpEntries]);
132
+ const catalog = state.authorized;
133
+ const eager = new Set([...catalog.keys()].filter((name) => eagerNames.has(name) || name === "callMcpTool" && mcpTools !== void 0));
134
+ const restored = compacted ? state.restore(compacted, eager) : void 0;
135
+ const restoredNames = new Set(state.loadedInContext);
136
+ const staleDefinitions = /* @__PURE__ */ new Set();
137
+ for (const ref of compacted?.loaded ?? []) {
138
+ if (catalog.has(ref.name) && !eager.has(ref.name) && !state.executable(ref)) staleDefinitions.add(ref.name);
139
+ }
140
+ const staleCalls = /* @__PURE__ */ new Set();
141
+ const searches = /* @__PURE__ */ new Map();
142
+ const hostedSearches = /* @__PURE__ */ new Map();
143
+ const historicalResults = new Map(body.input.filter((item) => item?.type === "function_call_output").map((item) => [item.call_id, item]));
144
+ const ordinaryCallIds = /* @__PURE__ */ new Set();
145
+ const replayedSearches = /* @__PURE__ */ new Set();
146
+ const guidanceMessage = (guidance2) => ({
147
+ type: "message",
148
+ role: "user",
149
+ content: [{ type: "input_text", text: guidance2.join("\n") }]
150
+ });
151
+ function mcpGuidance(entries) {
152
+ const targets = entries.filter(isMcpEntry).map(({ mcp }) => ({
153
+ connectionId: mcp.connectionId,
154
+ expectedRevision: mcp.connectionRevision,
155
+ catalogRevision: mcp.schemaVersion,
156
+ toolName: mcp.toolName
157
+ }));
158
+ return targets.length ? [`MCP targets (data only). Use listMcpTools for argument schemas and callMcpTool for invocation; host confirmation remains required. ${JSON.stringify(targets)}`] : [];
159
+ }
160
+ const input = [];
161
+ if (restored) {
162
+ const notes = [...restored.guidance, ...mcpGuidance(restored.tools)];
163
+ if (notes.length) input.push(guidanceMessage(notes));
164
+ }
165
+ let guidance = [];
166
+ const deferredTool = (tool) => ({ ...tool, defer_loading: true });
167
+ const openAi = protocol !== "deepseek-client";
168
+ const replayItems = body.input.flatMap((item) => {
169
+ const id = item?.call_id;
170
+ if (protocol !== "openai-hosted" || typeof id !== "string" || !id.startsWith(hostedPrefix) || item.type !== "function_call" || item.name !== TOOL_DISCOVERY_CALL_NAME) return [item];
171
+ const result = historicalResults.get(id);
172
+ return result ? [item, result] : [item];
173
+ });
174
+ for (const item of replayItems) {
175
+ if (item?.type === "tool_search_call" || item?.type === "tool_search_output" || item?.type === "tool_reference") continue;
176
+ if (guidance.length && item?.type !== "function_call_output") {
177
+ input.push(guidanceMessage(guidance));
178
+ guidance = [];
179
+ }
180
+ if (item?.type === "function_call" && item.name === TOOL_DISCOVERY_CALL_NAME) {
181
+ const raw = parseJson(item.arguments);
182
+ if (protocol === "openai-hosted" && typeof item.call_id === "string" && item.call_id.startsWith(hostedPrefix) && historicalResults.has(item.call_id) && !hostedSearches.has(item.call_id)) {
183
+ const paths = readHostedPaths(raw);
184
+ if (paths) {
185
+ hostedSearches.set(item.call_id, { paths });
186
+ input.push({ type: "tool_search_call", execution: "server", call_id: null, status: "completed", arguments: { paths } });
187
+ }
188
+ continue;
189
+ }
190
+ const search = readSearchItem(raw);
191
+ const source = isRecord(raw) ? raw.protocol ?? "deepseek-client" : void 0;
192
+ if (protocol !== "openai-hosted" && source === protocol && search && item.call_id === TOOL_DISCOVERY_ID_PREFIX + search.call_id && historicalResults.has(item.call_id) && !searches.has(item.call_id)) {
193
+ searches.set(item.call_id, search);
194
+ input.push({
195
+ type: search.type,
196
+ call_id: search.call_id,
197
+ execution: search.execution,
198
+ arguments: search.arguments,
199
+ ...openAi ? { status: "completed" } : {}
200
+ });
201
+ }
202
+ continue;
203
+ }
204
+ if (item?.type === "function_call_output" && typeof item.call_id === "string" && item.call_id.startsWith(TOOL_DISCOVERY_ID_PREFIX)) {
205
+ const search = searches.get(item.call_id);
206
+ const hosted = hostedSearches.has(item.call_id);
207
+ if (!search && !hosted) {
208
+ if (ordinaryCallIds.has(item.call_id) && !staleCalls.delete(item.call_id)) input.push(item);
209
+ continue;
210
+ }
211
+ if (replayedSearches.has(item.call_id)) continue;
212
+ replayedSearches.add(item.call_id);
213
+ const refs = readToolLoadingReferences(item.output);
214
+ for (const ref of refs.loaded) {
215
+ if (catalog.has(ref.name) && !state.loadedInContext.has(ref.name) && !eager.has(ref.name) && !state.executable(ref)) {
216
+ staleDefinitions.add(ref.name);
217
+ }
218
+ }
219
+ const projected = state.restore(refs, eager);
220
+ for (const tool of projected.tools) staleDefinitions.delete(tool.name);
221
+ guidance.push(...projected.guidance, ...mcpGuidance(projected.tools));
222
+ input.push({
223
+ type: "tool_search_output",
224
+ call_id: search?.call_id ?? null,
225
+ execution: hosted ? "server" : "client",
226
+ ...openAi ? { status: "completed" } : {},
227
+ tools: projected.tools.filter((tool) => !isMcpEntry(tool)).map((tool) => openAi ? deferredTool(tool) : tool)
228
+ });
229
+ continue;
230
+ }
231
+ if (item?.type === "function_call") ordinaryCallIds.add(item.call_id);
232
+ if (item?.type === "function_call" && (staleDefinitions.has(item.name) || openAi && (!catalog.has(item.name) || isMcpEntry(catalog.get(item.name))))) {
233
+ staleCalls.add(item.call_id);
234
+ continue;
235
+ }
236
+ if (item?.type === "function_call_output" && staleCalls.delete(item.call_id)) continue;
237
+ if (item?.type === "function_call" && catalog.has(item.name) && !state.loadedInContext.has(item.name)) {
238
+ eager.add(item.name);
239
+ }
240
+ input.push(item);
241
+ }
242
+ if (guidance.length) input.push(guidanceMessage(guidance));
243
+ const visible = /* @__PURE__ */ new Set([...eager, ...[...state.loadedInContext].filter((name) => {
244
+ const entry = catalog.get(name);
245
+ return entry && !isMcpEntry(entry);
246
+ })]);
247
+ body.input = input;
248
+ if (eager.size === catalog.size && replayedSearches.size === 0) return void 0;
249
+ const localTools = [...catalog.values()].filter((tool) => !isMcpEntry(tool));
250
+ body.tools = protocol === "openai-hosted" ? localTools.map((tool) => eager.has(tool.name) || restoredNames.has(tool.name) ? tool : deferredTool(tool)) : localTools.filter((tool) => eager.has(tool.name) || restoredNames.has(tool.name));
251
+ body.tools.push(protocol === "openai-hosted" ? { type: "tool_search" } : protocol === "openai-client" ? {
252
+ ...searchTool,
253
+ parameters: { ...searchTool.parameters, additionalProperties: false }
254
+ } : searchTool);
255
+ if (openAi) body.parallel_tool_calls = false;
256
+ return {
257
+ state,
258
+ protocol,
259
+ visible,
260
+ replayedCalls: /* @__PURE__ */ new Set([
261
+ ...ordinaryCallIds,
262
+ ...hostedSearches.keys(),
263
+ ...replayedSearches,
264
+ ...[...replayedSearches].map((id) => id.slice(TOOL_DISCOVERY_ID_PREFIX.length))
265
+ ])
266
+ };
267
+ }
268
+ function resolveResponsesToolDiscovery(calls, plan) {
269
+ const results = [];
270
+ const seen = new Set(plan?.replayedCalls);
271
+ const visible = /* @__PURE__ */ new Set([...plan?.visible ?? [], ...plan?.state.loadedInContext ?? []]);
272
+ for (const call of calls) {
273
+ const discovery = isToolDiscoveryCall(call);
274
+ const wireCallId = discovery ? call.id.slice(TOOL_DISCOVERY_ID_PREFIX.length) : call.id;
275
+ if (plan && (seen.has(wireCallId) || seen.has(call.id))) {
276
+ throw new Error("Responses returned a duplicate tool call ID.");
277
+ }
278
+ seen.add(wireCallId);
279
+ seen.add(call.id);
280
+ if (!discovery) {
281
+ if (plan && !plan.visible.has(call.function.name)) {
282
+ throw new Error("Responses requested a function before its definition was loaded.");
283
+ }
284
+ continue;
285
+ }
286
+ if (!plan) throw new Error("Responses requested tool discovery on a route without client discovery.");
287
+ const search = readSearchItem(parseJson(call.function.arguments));
288
+ if (!search || call.id !== TOOL_DISCOVERY_ID_PREFIX + search.call_id) {
289
+ throw new Error("Responses returned an invalid tool discovery ID.");
290
+ }
291
+ const packId = search.arguments.capabilityPackId;
292
+ const pack = typeof packId === "string" ? plan.state.activatePack(packId) : { loaded: [] };
293
+ const excluded = /* @__PURE__ */ new Set([...visible, ...pack.loaded.map(({ name }) => name)]);
294
+ const refs = { ...pack, loaded: [...pack.loaded, ...plan.state.search(search.arguments.query, excluded).map(toolDiscoveryReference)] };
295
+ for (const ref of refs.loaded) visible.add(ref.name);
296
+ results.push({ callId: call.id, content: JSON.stringify(refs) });
297
+ }
298
+ return results;
299
+ }
300
+
301
+ // packages/agent-runtime/toolImages.ts
302
+ var EMPTY_TOOL_RESULT_TEXT = "[Tool completed without output]";
303
+ var TOOL_HAD_IMAGES = "toolHadImages";
304
+ function hadToolImages(message) {
305
+ return message.tool_result_metadata?.[TOOL_HAD_IMAGES] === true || toolImages(message).length > 0;
306
+ }
307
+ var TOOL_IMAGES = Symbol("runtime-only-tool-images");
308
+ function toolImages(message) {
309
+ return message[TOOL_IMAGES] ?? [];
310
+ }
311
+ function withoutToolImages(message) {
312
+ if (!(TOOL_IMAGES in message)) return message;
313
+ const { [TOOL_IMAGES]: _images, ...textOnly } = message;
314
+ return _images?.length ? {
315
+ ...textOnly,
316
+ tool_result_metadata: {
317
+ ...message.tool_result_metadata,
318
+ [TOOL_HAD_IMAGES]: true
319
+ }
320
+ } : textOnly;
321
+ }
322
+ var TOOL_IMAGE_NOTICES = Symbol("runtime-only-tool-image-notices");
323
+ function createToolImageNotices() {
324
+ return { text: [], seen: /* @__PURE__ */ new WeakSet() };
325
+ }
326
+ function toolImageNotices(message) {
327
+ const holder = message;
328
+ return holder[TOOL_IMAGE_NOTICES] ??= createToolImageNotices();
329
+ }
330
+ var delivery = /* @__PURE__ */ new WeakMap();
331
+ function resetToolImageDelivery(images) {
332
+ for (const image of images) delivery.delete(image);
333
+ }
334
+ function toolImageDelivery(image) {
335
+ return delivery.get(image);
336
+ }
337
+ var MAX_TOOL_IMAGES_PER_REQUEST = 4;
338
+ var MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST = 8 * 1024 * 1024;
339
+ var formatToolImageBudgetNote = (omittedCount) => `Note: ${omittedCount} image(s) omitted (request budget: ${MAX_TOOL_IMAGES_PER_REQUEST} images / 8 MiB base64) \u2014 they were NOT delivered, do not guess their content.`;
340
+ function createToolImageBudget(maxImagesPerRequest = MAX_TOOL_IMAGES_PER_REQUEST) {
341
+ const limit = Math.min(MAX_TOOL_IMAGES_PER_REQUEST, maxImagesPerRequest);
342
+ let count = 0;
343
+ let bytes = 0;
344
+ const seen = /* @__PURE__ */ new Set();
345
+ return (image) => {
346
+ const key = `${image.mimeType}\0${image.dataBase64}`;
347
+ if (seen.has(key)) return "duplicate";
348
+ seen.add(key);
349
+ const size = Buffer.byteLength(image.dataBase64, "utf8");
350
+ if (size > MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST) {
351
+ delivery.set(image, "impossible");
352
+ return "impossible";
353
+ }
354
+ if (count >= limit || bytes + size > MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST) return "pending";
355
+ count += 1;
356
+ bytes += size;
357
+ delivery.set(image, "delivered");
358
+ return "delivered";
359
+ };
360
+ }
361
+ function toolImageSource(message, imageIndex = 0) {
362
+ const path = typeof message.content === "string" ? (Array.from(message.content.matchAll(/→ ([^\s\x00-\x1f\x7f]+)/gu))[imageIndex]?.[1] ?? message.content.match(/→ ([^\s\x00-\x1f\x7f]+)/u)?.[1])?.replace(/\]$/, "") : void 0;
363
+ return `${(message.tool_call_id ?? "unknown").replace(/[\x00-\x1f\x7f]/g, "")}${path ? ` (${path})` : ""}`;
364
+ }
365
+ function toolImageOmission(source, impossible) {
366
+ return impossible ? `Tool image permanently downgraded to text: ${source}. Impossible to deliver: single image exceeds 8 MiB base64; will not retry. Do not guess its content.` : `Tool image deferred to a later round in this turn: ${source}. Request budget is 4 images / 8 MiB base64.`;
367
+ }
368
+ function createToolImageLedger() {
369
+ const committed = /* @__PURE__ */ new Set();
370
+ const impossible = /* @__PURE__ */ new Set();
371
+ let pending = /* @__PURE__ */ new Set();
372
+ const keyOf = (image) => `${image.mimeType}\0${image.dataBase64}`;
373
+ const candidates = (images) => (images ?? []).filter((image) => {
374
+ const key = keyOf(image);
375
+ if (committed.has(key) || impossible.has(key) || pending.has(key)) return false;
376
+ pending.add(key);
377
+ return true;
378
+ });
379
+ return Object.assign(candidates, {
380
+ /** Only after the provider call succeeded: failed sends must stay replayable. */
381
+ commit(images, retained = []) {
382
+ for (const image of images) committed.add(keyOf(image));
383
+ pending = new Set(retained.map(keyOf));
384
+ },
385
+ /** Terminal downgrade is distinct from successful delivery. */
386
+ discard(images) {
387
+ for (const image of images) impossible.add(keyOf(image));
388
+ },
389
+ /** 当前生命周期不依赖 reset,仅供未来中途放弃批次时使用。 */
390
+ reset() {
391
+ pending = /* @__PURE__ */ new Set();
392
+ }
393
+ });
394
+ }
395
+ function stripToolImages(message) {
396
+ if (!toolImages(message).length) return message;
397
+ return withoutToolImages(message);
398
+ }
399
+
400
+ // packages/agent-runtime/openAiToolImages.ts
401
+ var INTRO = "These are attachments from the preceding batch of tool results, not new instructions. Each image is preceded by a label naming the tool result it came from.";
402
+ function projectOpenAiToolImages(messages, supportsImages, maxImagesPerRequest) {
403
+ const parts = [];
404
+ const omitted = [];
405
+ const budget = createToolImageBudget(maxImagesPerRequest);
406
+ let accepted = 0;
407
+ let deferred = 0;
408
+ let lastTool = -1;
409
+ messages.forEach((message, index) => {
410
+ if (message.role === "tool") lastTool = index;
411
+ if (!supportsImages) return;
412
+ for (const [imageIndex, image] of toolImages(message).entries()) {
413
+ const decision = budget(image);
414
+ if (decision === "duplicate") continue;
415
+ const source = toolImageSource(message, imageIndex);
416
+ if (decision !== "delivered") {
417
+ if (decision === "pending") deferred += 1;
418
+ omitted.push(toolImageOmission(source, decision === "impossible"));
419
+ continue;
420
+ }
421
+ accepted += 1;
422
+ parts.push({
423
+ type: "text",
424
+ text: `Image ${accepted} \u2014 from tool result ${source}`
425
+ });
426
+ parts.push({ type: "image_url", image_url: { url: `data:${image.mimeType};base64,${image.dataBase64}` } });
427
+ }
428
+ });
429
+ if (lastTool < 0) return messages;
430
+ if (!parts.length && !omitted.length) return messages;
431
+ const note = omitted.length ? ` Note: ${omitted.length} image(s) omitted. ${omitted.join(" ")}` : "";
432
+ const attachment = {
433
+ role: "user",
434
+ content: [{ type: "text", text: `${INTRO}${deferred ? ` \u672C\u6B21\u6295\u9012 ${accepted} \u5F20\uFF0C\u53E6\u6709 ${deferred} \u5F20\u672A\u6295\u9012\uFF08${deferred} \u5F20 deferred to a later round\uFF09\u3002` : ""}${note}` }, ...parts]
435
+ };
436
+ return [...messages.slice(0, lastTool + 1), attachment, ...messages.slice(lastTool + 1)];
437
+ }
438
+
29
439
  // packages/integrations/openai/responsesHelpers.ts
30
440
  var RESPONSES_TOP_LEVEL_SCHEMA_KEYS = ["anyOf", "oneOf", "allOf", "enum", "not"];
31
441
  var sanitizeResponsesParameters = (parameters) => {
@@ -270,34 +680,59 @@ var extractImagePartsFromResponseOutput = (response) => {
270
680
  }
271
681
  return images;
272
682
  };
273
- var extractToolCallsFromResponseOutput = (response) => {
683
+ var extractToolCallsFromResponseOutput = (response, options) => {
274
684
  const calls = [];
685
+ const wireCalls = /* @__PURE__ */ new Map();
686
+ const projectedIds = /* @__PURE__ */ new Set();
275
687
  for (const item of response?.output ?? []) {
276
- if (item?.type !== "function_call") continue;
277
- if (!item.call_id || !item.name) continue;
278
- calls.push({
279
- id: item.call_id,
280
- type: "function",
281
- function: {
282
- name: item.name,
283
- arguments: typeof item.arguments === "string" ? item.arguments : JSON.stringify(item.arguments ?? {})
688
+ const isSearch = item?.type === "tool_search_call" && item.execution === "client";
689
+ if (!isSearch && item?.type !== "function_call") continue;
690
+ if (options?.strictSnapshot && (!asOptionalTrimmedString(item.call_id) || !isSearch && !asOptionalTrimmedString(item.name))) {
691
+ throw new Error(`Responses completed snapshot contains a ${item.type} without a valid call_id or name.`);
692
+ }
693
+ let call;
694
+ if (isSearch) {
695
+ call = bridgeResponsesToolSearch(item);
696
+ } else {
697
+ if (!item.call_id || !item.name) continue;
698
+ if (item.name === TOOL_DISCOVERY_CALL_NAME) {
699
+ throw new Error("Responses used a reserved tool discovery name for a function call.");
700
+ }
701
+ call = {
702
+ id: item.call_id,
703
+ type: "function",
704
+ function: {
705
+ name: item.name,
706
+ arguments: typeof item.arguments === "string" ? item.arguments : JSON.stringify(item.arguments ?? {})
707
+ }
708
+ };
709
+ }
710
+ if (options?.strictSnapshot) {
711
+ const previous = wireCalls.get(item.call_id);
712
+ if (previous) {
713
+ if (previous.function.name === call.function.name && previous.function.arguments === call.function.arguments) continue;
714
+ throw new Error("Responses returned a conflicting duplicate wire tool call ID.");
715
+ }
716
+ if (projectedIds.has(call.id)) throw new Error("Responses returned a conflicting duplicate projected tool call ID.");
717
+ wireCalls.set(item.call_id, call);
718
+ projectedIds.add(call.id);
719
+ }
720
+ calls.push(call);
721
+ }
722
+ if (!options?.strictSnapshot && calls.some((call) => call.function.name === TOOL_DISCOVERY_CALL_NAME)) {
723
+ const firstById = /* @__PURE__ */ new Map();
724
+ for (const call of calls) {
725
+ const first = firstById.get(call.id);
726
+ if (!first) firstById.set(call.id, call);
727
+ else if (first.function.name !== call.function.name || first.function.arguments !== call.function.arguments) {
728
+ throw new Error("Responses returned a conflicting duplicate tool call ID.");
284
729
  }
285
- });
730
+ }
731
+ return [...firstById.values()];
286
732
  }
287
733
  return calls;
288
734
  };
289
735
 
290
- // packages/agent-runtime/declaredToolNames.ts
291
- function extractDeclaredToolNames(tools) {
292
- if (!Array.isArray(tools)) return void 0;
293
- const names = /* @__PURE__ */ new Set();
294
- for (const t of tools) {
295
- const fn = t?.function;
296
- if (fn && typeof fn.name === "string" && fn.name) names.add(fn.name);
297
- }
298
- return names;
299
- }
300
-
301
736
  // packages/agent-runtime/toolArgsShape.ts
302
737
  function scanRawToolArgs(input) {
303
738
  const stack = [];
@@ -364,6 +799,17 @@ function classifyUnparsableToolArgs(raw) {
364
799
  return scan.mismatched || scan.unclosed ? "truncated" : "malformed";
365
800
  }
366
801
 
802
+ // packages/agent-runtime/declaredToolNames.ts
803
+ function extractDeclaredToolNames(tools) {
804
+ if (!Array.isArray(tools)) return void 0;
805
+ const names = /* @__PURE__ */ new Set();
806
+ for (const t of tools) {
807
+ const fn = t?.function;
808
+ if (fn && typeof fn.name === "string" && fn.name) names.add(fn.name);
809
+ }
810
+ return names;
811
+ }
812
+
367
813
  // packages/agent-runtime/outboundHistorySanitize.ts
368
814
  var DOWNGRADED_TOOL_TURN_ORIGIN = Symbol(
369
815
  "nolo.downgradedToolTurnOrigin"
@@ -392,9 +838,10 @@ function emptyToolArgsProjectionStats() {
392
838
  rewrittenToolMessages: 0
393
839
  };
394
840
  }
395
- function sanitizeForOutbound(messages, tools) {
841
+ function sanitizeForOutbound(messages, tools, options) {
396
842
  return sanitizeOutboundHistory(messages, {
397
- declaredToolNames: extractDeclaredToolNames(tools)
843
+ declaredToolNames: extractDeclaredToolNames(tools),
844
+ ...options
398
845
  });
399
846
  }
400
847
  function stableToolCallId(assistantIndex, callIndex) {
@@ -466,7 +913,8 @@ function classifyAssistantCalls(toolCalls, assistantIndex) {
466
913
  }
467
914
  function sanitizeOutboundHistory(messages, options) {
468
915
  if (!Array.isArray(messages) || messages.length === 0) return messages;
469
- const declared = options?.declaredToolNames;
916
+ messages = filterToolDiscoveryHistory(messages, options?.retainToolDiscovery);
917
+ const declared = options?.retainToolDiscovery && options.declaredToolNames ? /* @__PURE__ */ new Set([...options.declaredToolNames, TOOL_DISCOVERY_CALL_NAME]) : options?.declaredToolNames;
470
918
  const keptCallIndicesPerAssistant = /* @__PURE__ */ new Map();
471
919
  const keptToolIndices = /* @__PURE__ */ new Set();
472
920
  let i = 0;
@@ -1136,33 +1584,6 @@ function resolveReasoningReplayOptions(provider, model, stripReasoningContent) {
1136
1584
  return shouldReplayReasoningContentForOutbound(provider, model) ? { replayReasoningPlaceholder: REASONING_REPLAY_PLACEHOLDER } : {};
1137
1585
  }
1138
1586
 
1139
- // packages/agent-runtime/promptCacheKey.ts
1140
- function collectStablePromptPrefix(messages, fallbackPrompt) {
1141
- const systemTexts = [];
1142
- if (fallbackPrompt?.trim()) systemTexts.push(fallbackPrompt.trim());
1143
- for (const raw of messages) {
1144
- if (!raw || typeof raw !== "object") continue;
1145
- const message = raw;
1146
- const role = String(message.role ?? "");
1147
- if (role !== "system" && role !== "developer") continue;
1148
- if (typeof message.content === "string") {
1149
- const boundary = Number(message.stable_prefix_chars);
1150
- const text = Number.isFinite(boundary) && boundary > 0 ? message.content.slice(0, boundary) : message.content;
1151
- if (text.trim()) systemTexts.push(text.trim());
1152
- }
1153
- }
1154
- return systemTexts.join("\n\n");
1155
- }
1156
- function stablePromptCacheKey(parts, namespace) {
1157
- const value = JSON.stringify(parts);
1158
- let hash = 2166136261;
1159
- for (let index = 0; index < value.length; index += 1) {
1160
- hash ^= value.charCodeAt(index);
1161
- hash = Math.imul(hash, 16777619) >>> 0;
1162
- }
1163
- return `${namespace}-${hash.toString(16).padStart(8, "0")}`;
1164
- }
1165
-
1166
1587
  // packages/integrations/openai/providerBodyCompatibility.ts
1167
1588
  var MOONSHOT_KIMI_K3_MODEL = "kimi-k3";
1168
1589
  var MOONSHOT_KIMI_K31_PRO_MODEL = "kimi-k3.1-pro";
@@ -1254,11 +1675,30 @@ var normalizeChatCompletionsBodyForProvider = ({
1254
1675
  };
1255
1676
 
1256
1677
  export {
1678
+ EMPTY_TOOL_RESULT_TEXT,
1679
+ TOOL_HAD_IMAGES,
1680
+ hadToolImages,
1681
+ TOOL_IMAGES,
1682
+ toolImages,
1683
+ withoutToolImages,
1684
+ TOOL_IMAGE_NOTICES,
1685
+ createToolImageNotices,
1686
+ toolImageNotices,
1687
+ resetToolImageDelivery,
1688
+ toolImageDelivery,
1689
+ MAX_TOOL_IMAGES_PER_REQUEST,
1690
+ MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST,
1691
+ createToolImageBudget,
1692
+ toolImageSource,
1693
+ toolImageOmission,
1694
+ createToolImageLedger,
1695
+ stripToolImages,
1257
1696
  scanTruncation,
1258
1697
  classifyUnparsableToolArgs,
1259
1698
  markDowngradedToolTurnOrigin,
1260
1699
  transferDowngradedToolTurnOrigin,
1261
1700
  sanitizeForOutbound,
1701
+ renderToolResultAsText,
1262
1702
  hasParsableObjectArguments,
1263
1703
  repairTruncatedToolArguments,
1264
1704
  downgradeUnparsableToolCalls,
@@ -1266,13 +1706,15 @@ export {
1266
1706
  hasImageParts,
1267
1707
  requiresBareImageUrl,
1268
1708
  toBareImageUrlMessages,
1709
+ projectOpenAiToolImages,
1269
1710
  preserveAgentStateFields,
1270
1711
  findAgentStatePairingIssues,
1271
1712
  toOpenAiCompatibleMessages,
1272
1713
  shouldStripReasoningContentForOutbound,
1273
1714
  resolveReasoningReplayOptions,
1274
- collectStablePromptPrefix,
1275
- stablePromptCacheKey,
1715
+ hasDeferrableResponsesTools,
1716
+ finishResponsesToolDiscovery,
1717
+ prepareResponsesToolDiscovery,
1276
1718
  toResponsesTools,
1277
1719
  convertMessagesToResponsesInput,
1278
1720
  extractTextFromResponseOutput,
@@ -223,7 +223,6 @@ export {
223
223
  CONTEXT_OVERFLOW_ACTIONS,
224
224
  CONTEXT_TOO_LARGE_ACTIONS,
225
225
  isContextOverflowText,
226
- isQuotaExhaustedError,
227
226
  classifyApiError,
228
227
  parseApiError,
229
228
  classifyGenerationError