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
package/chunk-WFEWP352.js DELETED
@@ -1,861 +0,0 @@
1
- import {
2
- isSkillSummaryMarker
3
- } from "./chunk-VF4K2QE6.js";
4
- import {
5
- setDialogExtraReferencesAction
6
- } from "./chunk-LLUBUHNT.js";
7
- import {
8
- fetchAndCacheTableRows
9
- } from "./chunk-LJ6WIQZO.js";
10
- import {
11
- resolveDialogRuntimeAgentKey
12
- } from "./chunk-7B55IVLF.js";
13
- import {
14
- createSpaceKey
15
- } from "./chunk-UAD2WT54.js";
16
- import {
17
- selectById
18
- } from "./chunk-ADYWV732.js";
19
- import {
20
- require_react
21
- } from "./chunk-RD3QLZQV.js";
22
- import {
23
- selectRuntimeSnapshot
24
- } from "./chunk-HPDLPEUG.js";
25
- import {
26
- createAsyncThunk
27
- } from "./chunk-ZTHAJU3O.js";
28
- import {
29
- selectIdentityUserId
30
- } from "./chunk-PXYBUFDB.js";
31
- import {
32
- isAgentSkillDisabled
33
- } from "./chunk-KO5GO2BC.js";
34
- import {
35
- listBuiltinSkills,
36
- resolveBuiltinSkillByName
37
- } from "./chunk-JW6OURKM.js";
38
- import {
39
- parseSkillDocProtocol
40
- } from "./chunk-AETZ7AD6.js";
41
- import {
42
- isDialogRecordKeyForId,
43
- parseDialogKey
44
- } from "./chunk-OJKUU3LP.js";
45
- import {
46
- toErrorMessage
47
- } from "./chunk-HNMXYYJR.js";
48
- import {
49
- asTrimmedString
50
- } from "./chunk-3EUW3WEO.js";
51
- import {
52
- isRecord
53
- } from "./chunk-KUG52IAP.js";
54
- import {
55
- asOptionalTrimmedString
56
- } from "./chunk-G3SUCT4W.js";
57
- import {
58
- normalizeServerOrigin
59
- } from "./chunk-CF7PE763.js";
60
- import {
61
- __toESM
62
- } from "./chunk-U67V476Y.js";
63
-
64
- // packages/ai/chat/parseMultilineSSE.ts
65
- function createSSEParser() {
66
- let buffer = "";
67
- return function parseSSE(chunk) {
68
- const results = [];
69
- if (!chunk) return results;
70
- buffer += chunk;
71
- const events = buffer.split(/\r?\n\r?\n/);
72
- buffer = events.pop() ?? "";
73
- for (const ev of events) {
74
- if (!ev.trim()) continue;
75
- const lines = ev.split(/\r?\n/);
76
- let accumulator = "";
77
- for (const line of lines) {
78
- const t = line.trim();
79
- if (t === "data: [DONE]") {
80
- if (accumulator.trim()) {
81
- try {
82
- results.push(JSON.parse(accumulator));
83
- } catch (e) {
84
- }
85
- accumulator = "";
86
- }
87
- results.push("[DONE]");
88
- continue;
89
- }
90
- let content = "";
91
- let isDataLine = false;
92
- if (t.startsWith("data:")) {
93
- content = line.substring(line.indexOf("data:") + 5).trim();
94
- isDataLine = true;
95
- } else if (accumulator && t && !t.startsWith("event:") && !t.startsWith("id:") && !t.startsWith("retry:")) {
96
- content = line;
97
- } else {
98
- continue;
99
- }
100
- if (isDataLine && !accumulator) {
101
- try {
102
- const obj = JSON.parse(content);
103
- results.push(obj);
104
- continue;
105
- } catch (e) {
106
- }
107
- }
108
- accumulator += content;
109
- }
110
- if (accumulator.trim()) {
111
- try {
112
- const obj = JSON.parse(accumulator);
113
- results.push(obj);
114
- } catch (e) {
115
- }
116
- }
117
- }
118
- return results;
119
- };
120
- }
121
- var parseMultilineSSE = createSSEParser();
122
-
123
- // packages/core/abortableDelay.ts
124
- function waitForAbortableDelay(ms, signal) {
125
- const delayMs = Number.isFinite(ms) && ms >= 0 ? Math.round(ms) : 0;
126
- if (signal?.aborted) {
127
- return Promise.reject(new DOMException("Aborted", "AbortError"));
128
- }
129
- return new Promise((resolve, reject) => {
130
- const onAbort = () => {
131
- clearTimeout(timeoutId);
132
- signal?.removeEventListener("abort", onAbort);
133
- reject(new DOMException("Aborted", "AbortError"));
134
- };
135
- const timeoutId = setTimeout(() => {
136
- signal?.removeEventListener("abort", onAbort);
137
- resolve();
138
- }, delayMs);
139
- signal?.addEventListener("abort", onAbort, { once: true });
140
- });
141
- }
142
-
143
- // packages/ai/tools/memoryToolContext.ts
144
- var trimmed = (value) => typeof value === "string" && value.trim() ? value.trim() : void 0;
145
- function findLoadedDialogs(state, dialogId, exactKey) {
146
- const entities = state?.db?.entities;
147
- if (!entities || typeof entities !== "object") return [];
148
- const matches = [];
149
- for (const key of Object.keys(entities)) {
150
- if (!isDialogRecordKeyForId(key, dialogId)) continue;
151
- const record = entities[key];
152
- if (!record || trimmed(record.id) !== dialogId) continue;
153
- if (exactKey && key !== exactKey) continue;
154
- matches.push({ key, record });
155
- }
156
- return matches;
157
- }
158
- function resolveMemoryToolContext(state, context) {
159
- return resolveToolAttributionContext(state, context);
160
- }
161
- function resolveToolAttributionContext(state, context, options) {
162
- const UNRESOLVED = options?.errorLabel ?? "\u65E0\u6CD5\u786E\u5B9A\u8BB0\u5FC6\u5F52\u5C5E";
163
- const agentKey = trimmed(context?.agentKey);
164
- if (options?.requireAgentKey && !agentKey) {
165
- throw new Error(`${UNRESOLVED}\uFF1A\u6267\u884C\u4E0A\u4E0B\u6587\u7F3A\u5C11 agentKey\uFF0C\u4E0D\u4F1A\u4ECE\u5F53\u524D\u5BF9\u8BDD\u63A8\u65AD\u3002`);
166
- }
167
- const contextDialogId = trimmed(context?.dialogId);
168
- const contextDialogKey = trimmed(context?.dialogKey);
169
- let keyIdentity = null;
170
- if (contextDialogKey) {
171
- keyIdentity = parseDialogKey(contextDialogKey);
172
- if (!keyIdentity) {
173
- throw new Error(
174
- `${UNRESOLVED}\uFF1A\u6267\u884C\u4E0A\u4E0B\u6587\u91CC\u7684\u5BF9\u8BDD\u952E ${contextDialogKey} \u4E0D\u662F\u53EF\u89E3\u6790\u7684 dialog-<owner>-<id>\uFF0C\u4E0D\u4F1A\u6309 id \u731C\u5F52\u5C5E\u3002`
175
- );
176
- }
177
- if (contextDialogId && keyIdentity.dialogId !== contextDialogId) {
178
- throw new Error(
179
- `${UNRESOLVED}\uFF1A\u6267\u884C\u4E0A\u4E0B\u6587\u81EA\u76F8\u77DB\u76FE\u2014\u2014\u5BF9\u8BDD\u952E ${contextDialogKey} \u6307\u5411 ${keyIdentity.dialogId}\uFF0C\u4F46 dialogId \u662F ${contextDialogId}\u3002`
180
- );
181
- }
182
- }
183
- const dialogId = keyIdentity?.dialogId ?? contextDialogId;
184
- if (!dialogId) {
185
- throw new Error(
186
- `${UNRESOLVED}\uFF1A\u672C\u6B21\u5DE5\u5177\u8C03\u7528\u7F3A\u5C11\u6240\u5C5E\u5BF9\u8BDD\uFF08dialogId\uFF09\uFF0C\u4E0D\u4F1A\u6539\u7528\u5F53\u524D\u6253\u5F00\u7684\u5BF9\u8BDD\u6216\u89C6\u56FE Space\u3002`
187
- );
188
- }
189
- const matches = findLoadedDialogs(state, dialogId, contextDialogKey);
190
- if (matches.length === 0) {
191
- throw new Error(
192
- `${UNRESOLVED}\uFF1A\u5BF9\u8BDD ${dialogId} \u672A\u52A0\u8F7D\uFF0C\u65E0\u6CD5\u786E\u8BA4\u5B83\u7684 Space \u5F52\u5C5E\u3002`
193
- );
194
- }
195
- if (matches.length > 1) {
196
- throw new Error(
197
- `${UNRESOLVED}\uFF1A\u52A0\u8F7D\u4E2D\u6709 ${matches.length} \u4E2A\u540C id \u7684\u5BF9\u8BDD\uFF08${matches.map((m) => m.key).join(" / ")}\uFF09\uFF0C\u4EC5\u51ED dialogId \u65E0\u6CD5\u786E\u5B9A\u5F52\u5C5E\uFF1B\u6267\u884C\u4E0A\u4E0B\u6587\u9700\u8981\u63D0\u4F9B\u5B8C\u6574\u5BF9\u8BDD\u952E\u3002`
198
- );
199
- }
200
- const [dialog] = matches;
201
- return {
202
- dialogId,
203
- agentKey: resolveDialogRuntimeAgentKey(
204
- dialog.record,
205
- agentKey
206
- ),
207
- spaceId: trimmed(dialog.record.spaceId)
208
- };
209
- }
210
-
211
- // packages/ai/tools/loadSkillTool.ts
212
- var loadSkillFunctionSchema = {
213
- name: "loadSkill",
214
- description: [
215
- "\u6309\u540D\u79F0\u6216\u7CBE\u786E\u5F15\u7528\u52A0\u8F7D\u4E00\u4E2A skill \u6587\u6863\uFF0C\u8FD4\u56DE\u5176\u5B8C\u6574\u6307\u4EE4\u6B63\u6587\u3002",
216
- "name \u4F7F\u7528 skill \u4FDD\u5B58\u65F6\u5199\u5165 skill-config \u7684 name\uFF08\u4E5F\u63A5\u53D7 skillId\uFF09\u3002",
217
- "\u7CBE\u786E\u5F15\u7528\u4E0D\u4F20 name\uFF1Asource=space + dbKey\uFF0Csource=builtin + slug\uFF0C\u6216 source=project + projectBinding + relativePath\uFF1B\u5404\u7EC4\u5B57\u6BB5\u4E92\u65A5\uFF0C\u4E0D\u6DF7\u7528\u3002",
218
- "\u6267\u884C\u5668\u652F\u6301\u8303\u56F4\uFF1A\u670D\u52A1\u7AEF\u652F\u6301 space/builtin\uFF0C\u672C\u5730 CLI/desktop \u652F\u6301 builtin/project\uFF1BWeb \u5BA2\u6237\u7AEF\u652F\u6301 name \u4E0E space/builtin \u7CBE\u786E\u5F15\u7528\uFF0C\u4E0D\u652F\u6301 project\u3002",
219
- "\u627E\u4E0D\u5230\u5BF9\u5E94 skill \u65F6\u8FD4\u56DE\u5F53\u524D\u53EF\u7528\u7684 skill \u540D\u79F0\u5217\u8868\uFF08\u4E0D\u62A5\u9519\uFF09\uFF1B\u7CBE\u786E\u5F15\u7528\u4E0D\u56DE\u9000\u5230\u540C\u540D skill\u3002",
220
- '\u7CFB\u7EDF\u5185\u7F6E\u5199\u4EE3\u7801\u6280\u80FD\uFF1A\u5BF9\u8BDD\u8F6C\u5411\u5199\u4EE3\u7801\u65F6\u7528 loadSkill("coding") \u8F7D\u5165\u5199\u4EE3\u7801\u80FD\u529B\u4E0E\u4EE3\u7801\u5BA1\u67E5\u7EAA\u5F8B\uFF08\u542B review \u89D2\u8272\u5207\u5272\uFF09\u3002',
221
- "\u7CFB\u7EDF\u5185\u7F6E\u4E13\u804C\u6280\u80FD\uFF1Afeedback\uFF08\u53CD\u9988\u6536\u96C6\uFF09/ agent-creator\uFF08\u521B\u5EFA Agent\uFF09/ app-builder\uFF08\u5E94\u7528\u6784\u5EFA\uFF09\uFF0C\u540C\u6837\u53EF\u76F4\u63A5 loadSkill \u8F7D\u5165\u3002"
222
- ].join("\n"),
223
- parameters: {
224
- type: "object",
225
- properties: {
226
- name: {
227
- type: "string",
228
- description: "\u65E7\u7248 skill \u540D\u79F0\uFF1B\u4E0D\u4E0E\u7CBE\u786E\u5F15\u7528\u5B57\u6BB5\u6DF7\u7528\u3002"
229
- },
230
- source: {
231
- type: "string",
232
- enum: ["space", "builtin", "project"],
233
- description: "\u7CBE\u786E\u6765\u6E90\uFF1Aspace \u9700 dbKey\uFF0Cbuiltin \u9700 slug\uFF0Cproject \u9700 projectBinding \u4E0E relativePath\uFF1B\u4E0D\u4F20 name\u3002Web \u5BA2\u6237\u7AEF\u652F\u6301 space/builtin\uFF0C\u4E0D\u652F\u6301 project\u3002"
234
- },
235
- dbKey: {
236
- type: "string",
237
- description: "\u7CBE\u786E skill \u6587\u6863 dbKey\uFF0C\u4EC5\u7528\u4E8E source=space\uFF1B\u5FC5\u987B\u5728\u5F53\u524D\u7528\u6237 membership \u53EF\u89C1\u7684 Space Skill \u7D22\u5F15\u4E2D\uFF08\u670D\u52A1\u7AEF\u6216 Web \u5BA2\u6237\u7AEF\u6267\u884C\uFF09\u3002"
238
- },
239
- slug: {
240
- type: "string",
241
- description: "\u7CBE\u786E\u5185\u7F6E skill slug\uFF0C\u4EC5\u7528\u4E8E source=builtin\u3002"
242
- },
243
- projectBinding: {
244
- type: "string",
245
- description: "\u4E0E\u6267\u884C\u5668\u6388\u6743 cwd \u5339\u914D\u7684\u9879\u76EE\u6839\u76EE\u5F55\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u4EC5\u7528\u4E8E source=project\uFF08\u672C\u5730\u6267\u884C\uFF09\u3002"
246
- },
247
- relativePath: {
248
- type: "string",
249
- description: "\u9879\u76EE .agents/skills/ \u5185 SKILL.md \u7684\u9879\u76EE\u76F8\u5BF9\u8DEF\u5F84\uFF0C\u4EC5\u7528\u4E8E source=project\uFF08\u672C\u5730\u6267\u884C\uFF09\u3002"
250
- }
251
- }
252
- }
253
- };
254
- var getRuntime = (thunkApi) => {
255
- const state = thunkApi?.getState?.();
256
- return state ? selectRuntimeSnapshot(state) : null;
257
- };
258
- var authHeaders = (token) => token ? { Authorization: `Bearer ${token}` } : {};
259
- async function readRemoteRecord(args) {
260
- const serverBase = normalizeServerOrigin(args.serverBase);
261
- if (!serverBase || !args.token) return null;
262
- const response = await fetch(
263
- `${serverBase}/api/v1/db/read/${encodeURIComponent(args.dbKey)}?includeDeleted=true`,
264
- { headers: authHeaders(args.token) }
265
- );
266
- if (!response.ok) return null;
267
- const payload = await response.json().catch(() => null);
268
- return payload?.data ?? payload;
269
- }
270
- function resolveWebSkill(candidates, requestedName) {
271
- const candidate = matchSkillCandidate(candidates, requestedName);
272
- if (candidate) return { kind: "space", candidate };
273
- const entry = resolveBuiltinSkillByName(requestedName);
274
- return entry ? { kind: "builtin", entry } : null;
275
- }
276
- function listWebSkillNames(candidates) {
277
- return Array.from(
278
- /* @__PURE__ */ new Set([
279
- ...candidates.map((candidate) => candidate.name),
280
- ...listBuiltinSkills().flatMap((skill) => [skill.slug, skill.title])
281
- ])
282
- );
283
- }
284
- function matchSkillCandidate(candidates, requestedName) {
285
- return candidates.find(
286
- (candidate) => candidate.name === requestedName || candidate.skillId === requestedName
287
- );
288
- }
289
- function collectSkillCandidatesFromSpace(space) {
290
- if (!space?.contents || typeof space.contents !== "object") return [];
291
- const candidates = [];
292
- for (const [entryKey, value] of Object.entries(space.contents)) {
293
- if (!isRecord(value)) continue;
294
- const skillSummary = value.skillSummary;
295
- if (!isSkillSummaryMarker(skillSummary)) continue;
296
- const name = asTrimmedString(skillSummary.name);
297
- if (!name) continue;
298
- candidates.push({
299
- dbKey: entryKey,
300
- name,
301
- skillId: asOptionalTrimmedString(skillSummary.skillId) ?? void 0
302
- });
303
- }
304
- return candidates;
305
- }
306
- function extractSkillBody(page) {
307
- return parseSkillDocProtocol(page?.content ?? "").content;
308
- }
309
- async function listSkillCandidates(thunkApi) {
310
- const runtime = getRuntime(thunkApi);
311
- const serverBase = runtime?.currentServer;
312
- const token = runtime?.currentToken;
313
- const userId = runtime?.currentUserId;
314
- if (!serverBase || !token || !userId) return [];
315
- const membershipsResponse = await fetch(
316
- `${normalizeServerOrigin(serverBase)}/rpc/getUserSpaceMemberships`,
317
- {
318
- method: "POST",
319
- headers: {
320
- "Content-Type": "application/json",
321
- ...authHeaders(token)
322
- },
323
- body: JSON.stringify({ userId })
324
- }
325
- ).catch(() => null);
326
- if (!membershipsResponse?.ok) return [];
327
- const memberships = await membershipsResponse.json().catch(() => []);
328
- if (!Array.isArray(memberships)) return [];
329
- const candidates = [];
330
- for (const membership of memberships) {
331
- const spaceId = asTrimmedString(membership?.spaceId);
332
- if (!spaceId) continue;
333
- const space = await readRemoteRecord({
334
- serverBase,
335
- token,
336
- dbKey: createSpaceKey.space(spaceId)
337
- });
338
- if (!space) continue;
339
- candidates.push(...collectSkillCandidatesFromSpace(space));
340
- }
341
- return candidates;
342
- }
343
- var readCurrentAgentSkillSource = async (thunkApi, agentKey) => {
344
- if (!agentKey) return null;
345
- const db = thunkApi?.extra?.db;
346
- if (!db) return null;
347
- try {
348
- const agent = await db.get(agentKey);
349
- if (!agent || typeof agent !== "object") return null;
350
- return agent;
351
- } catch {
352
- return null;
353
- }
354
- };
355
- async function loadSkillFunc(args, thunkApi, context) {
356
- const hasArg = (key) => Object.prototype.hasOwnProperty.call(args ?? {}, key);
357
- const exact = ["source", "dbKey", "slug", "projectBinding", "relativePath"].some(hasArg);
358
- const source = args?.source;
359
- if (exact) {
360
- const validSpace = source === "space" && typeof args.dbKey === "string" && !!args.dbKey.trim() && !hasArg("slug") && !hasArg("projectBinding") && !hasArg("relativePath");
361
- const validBuiltin = source === "builtin" && typeof args.slug === "string" && !!args.slug.trim() && !hasArg("dbKey") && !hasArg("projectBinding") && !hasArg("relativePath");
362
- if (hasArg("name") || !validSpace && !validBuiltin) {
363
- throw new Error(source === "project" ? "loadSkill: source=project is not supported by the Web client." : "loadSkill: use name, source=space + dbKey, or source=builtin + slug exclusively.");
364
- }
365
- }
366
- let requestedName = asTrimmedString(exact ? source === "space" ? args.dbKey : args.slug : args?.name);
367
- if (!requestedName) throw new Error("loadSkill \u9700\u8981\u63D0\u4F9B name\u3002");
368
- const state = thunkApi.getState();
369
- const attribution = resolveToolAttributionContext(state, context, {
370
- requireAgentKey: false,
371
- errorLabel: "loadSkill: \u65E0\u6CD5\u786E\u5B9A\u5F52\u5C5E"
372
- });
373
- const dialogKey = context?.dialogKey?.trim() || Object.keys(state.db.entities).find(
374
- (key) => isDialogRecordKeyForId(key, attribution.dialogId) && state.db.entities[key]?.id?.trim() === attribution.dialogId
375
- );
376
- const candidates = await listSkillCandidates(thunkApi);
377
- let resolution;
378
- if (!exact) {
379
- resolution = resolveWebSkill(candidates, requestedName);
380
- } else if (source === "space") {
381
- const candidate = candidates.find((entry) => entry.dbKey === requestedName);
382
- resolution = candidate ? { kind: "space", candidate } : null;
383
- } else {
384
- const entry = listBuiltinSkills().find((entry2) => entry2.slug === requestedName);
385
- resolution = entry ? { kind: "builtin", entry } : null;
386
- }
387
- const matched = resolution?.kind === "space" ? resolution.candidate : void 0;
388
- if (exact && matched) requestedName = matched.name;
389
- const builtinEntry = resolution?.kind === "builtin" ? resolution.entry : null;
390
- const resolvedSlug = builtinEntry?.slug ?? matched?.skillId ?? null;
391
- if (resolvedSlug) {
392
- const agentSkillSource = await readCurrentAgentSkillSource(thunkApi, attribution.agentKey);
393
- if (agentSkillSource && isAgentSkillDisabled(agentSkillSource, resolvedSlug)) {
394
- return {
395
- rawData: {
396
- success: false,
397
- name: requestedName,
398
- slug: resolvedSlug,
399
- disabled: true
400
- },
401
- displayData: `Skill "${requestedName}" \u5DF2\u88AB\u7981\u7528\uFF1A\u8BE5\u80FD\u529B\u5728\u6B64 agent \u4E0A\u4E0D\u53EF\u7528\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u3002`
402
- };
403
- }
404
- }
405
- if (builtinEntry) {
406
- const body2 = builtinEntry.content;
407
- const dbKey = builtinEntry.slug;
408
- if (context?.skipSkillReferencePersist !== true) {
409
- await persistLoadedSkillReference(thunkApi, dialogKey, dbKey, requestedName);
410
- }
411
- return {
412
- rawData: {
413
- success: true,
414
- name: requestedName,
415
- dbKey,
416
- body: body2
417
- },
418
- displayData: `Skill "${requestedName}" loaded inline. Follow its instructions.
419
-
420
- ${body2}`
421
- };
422
- }
423
- if (!matched) {
424
- const availableNames = listWebSkillNames(candidates);
425
- const availableText = availableNames.length ? availableNames.join(", ") : "(none)";
426
- return {
427
- rawData: {
428
- success: false,
429
- name: requestedName,
430
- availableSkills: availableNames
431
- },
432
- displayData: `Skill "${requestedName}" not found. Available skills: ${availableText}`
433
- };
434
- }
435
- const runtime = getRuntime(thunkApi);
436
- const page = await readRemoteRecord({
437
- serverBase: runtime?.currentServer,
438
- token: runtime?.currentToken,
439
- dbKey: matched.dbKey
440
- });
441
- if (exact && !page) {
442
- return {
443
- rawData: { success: false, name: requestedName, dbKey: matched.dbKey },
444
- displayData: `Skill "${requestedName}" could not be read.`
445
- };
446
- }
447
- const body = extractSkillBody(page);
448
- if (context?.skipSkillReferencePersist !== true) {
449
- await persistLoadedSkillReference(thunkApi, dialogKey, matched.dbKey, requestedName);
450
- }
451
- return {
452
- rawData: {
453
- success: true,
454
- name: requestedName,
455
- dbKey: matched.dbKey,
456
- body
457
- },
458
- displayData: `Skill "${requestedName}" loaded inline. Follow its instructions.
459
-
460
- ${body}`
461
- };
462
- }
463
- async function persistLoadedSkillReference(thunkApi, currentDialogKey, dbKey, name) {
464
- try {
465
- const state = thunkApi?.getState?.();
466
- if (!state || !currentDialogKey) return;
467
- const dialogConfig = selectById(
468
- state,
469
- currentDialogKey
470
- );
471
- const existing = dialogConfig?.extraReferences ?? [];
472
- const alreadyMounted = existing.some((ref) => ref.dbKey === dbKey);
473
- if (alreadyMounted) return;
474
- const newRef = {
475
- dbKey,
476
- title: name,
477
- type: "instruction"
478
- };
479
- await setDialogExtraReferencesAction([...existing, newRef], thunkApi, currentDialogKey);
480
- } catch {
481
- }
482
- }
483
-
484
- // packages/ai/tools/uiCardSchema.ts
485
- var UI_CARD_VERSION = 1;
486
- var MAX_BLOCKS = 32;
487
- var MAX_TEXT_BYTES = 2e4;
488
- var UI_CARD_MAX_BYTES = 1e5;
489
- var UI_CARD_ENVELOPE_MAX_BYTES = UI_CARD_MAX_BYTES + 4096;
490
- var MAX_COLLECTION_ITEMS = 500;
491
- var MAX_JSON_DEPTH = 12;
492
- var MAX_JSON_NODES = 2e3;
493
- function isRecord2(value) {
494
- return value !== null && typeof value === "object" && !Array.isArray(value);
495
- }
496
- function hasOnlyKeys(value, allowed) {
497
- return Object.keys(value).every((key) => allowed.includes(key));
498
- }
499
- function isText(value) {
500
- return typeof value === "string" && new TextEncoder().encode(value).byteLength <= MAX_TEXT_BYTES;
501
- }
502
- function isStringArray(value, max = MAX_COLLECTION_ITEMS) {
503
- return Array.isArray(value) && value.length <= max && value.every(isText);
504
- }
505
- function isJsonValue(value, depth, budget) {
506
- budget.nodes += 1;
507
- if (budget.nodes > MAX_JSON_NODES || depth > MAX_JSON_DEPTH) return false;
508
- if (value === null || typeof value === "boolean") return true;
509
- if (typeof value === "string") return isText(value);
510
- if (typeof value === "number") return Number.isFinite(value);
511
- if (Array.isArray(value)) return value.every((item) => isJsonValue(item, depth + 1, budget));
512
- if (!isRecord2(value)) return false;
513
- for (const [key, item] of Object.entries(value)) {
514
- if (["$ref", "$expr", "expression", "script"].includes(key)) return false;
515
- if (!isText(key) || !isJsonValue(item, depth + 1, budget)) return false;
516
- }
517
- return true;
518
- }
519
- function isChoiceQuestion(value) {
520
- if (!isRecord2(value) || !hasOnlyKeys(value, ["id", "header", "question", "choices", "multiSelect", "allowOther", "required"])) return false;
521
- if (!isText(value.id) || !value.id.trim() || !isText(value.question) || !value.question.trim()) return false;
522
- if (value.header !== void 0 && !isText(value.header)) return false;
523
- for (const flag of ["multiSelect", "allowOther", "required"]) {
524
- if (value[flag] !== void 0 && typeof value[flag] !== "boolean") return false;
525
- }
526
- if (!Array.isArray(value.choices) || value.choices.length === 0 || value.choices.length > MAX_COLLECTION_ITEMS) return false;
527
- const ids = /* @__PURE__ */ new Set();
528
- for (const option of value.choices) {
529
- if (!isRecord2(option) || !hasOnlyKeys(option, ["id", "label", "detail", "recommended", "userMessage"])) return false;
530
- if (!isText(option.label) || !option.label.trim()) return false;
531
- if (option.id !== void 0) {
532
- if (!isText(option.id) || !option.id.trim() || ids.has(option.id)) return false;
533
- ids.add(option.id);
534
- }
535
- if (option.detail !== void 0 && !isText(option.detail)) return false;
536
- if (option.userMessage !== void 0 && !isText(option.userMessage)) return false;
537
- if (option.recommended !== void 0 && typeof option.recommended !== "boolean") return false;
538
- }
539
- return true;
540
- }
541
- function isAppUrl(value) {
542
- try {
543
- const parsed = new URL(value);
544
- const hasWebProtocol = parsed.protocol === "http:" || parsed.protocol === "https:";
545
- const authority = value.slice(value.indexOf("//") + 2).split(/[/?#]/, 1)[0];
546
- return hasWebProtocol && authority.length > 0 && parsed.hostname.length > 0;
547
- } catch {
548
- return false;
549
- }
550
- }
551
- function isBlock(value) {
552
- if (!isRecord2(value) || typeof value.type !== "string") return false;
553
- switch (value.type) {
554
- case "text":
555
- return hasOnlyKeys(value, ["type", "text"]) && isText(value.text);
556
- case "metric":
557
- return hasOnlyKeys(value, ["type", "label", "value", "detail"]) && isText(value.label) && isText(value.value) && (value.detail === void 0 || isText(value.detail));
558
- case "list":
559
- return hasOnlyKeys(value, ["type", "title", "items"]) && (value.title === void 0 || isText(value.title)) && isStringArray(value.items);
560
- case "table": {
561
- const columns = value.columns;
562
- const rows = value.rows;
563
- return hasOnlyKeys(value, ["type", "columns", "rows"]) && isStringArray(columns, 50) && columns.length > 0 && Array.isArray(rows) && rows.length <= MAX_COLLECTION_ITEMS && rows.every((row) => isStringArray(row, 50) && row.length === columns.length);
564
- }
565
- case "choice":
566
- return hasOnlyKeys(value, ["type", "question"]) && isChoiceQuestion(value.question);
567
- case "action": {
568
- if (!isRecord2(value.action) || typeof value.action.type !== "string") return false;
569
- if (value.action.type === "submit") {
570
- if (!hasOnlyKeys(value, ["type", "action"]) || !hasOnlyKeys(value.action, ["type", "payload"])) return false;
571
- if (value.action.payload === void 0) return true;
572
- return isRecord2(value.action.payload) && isJsonValue(value.action.payload, 0, { nodes: 0 });
573
- }
574
- if (value.action.type === "openApp") {
575
- return hasOnlyKeys(value, ["type", "action"]) && hasOnlyKeys(value.action, ["type", "appId", "url"]) && isText(value.action.appId) && !!value.action.appId.trim() && (value.action.url === void 0 || isText(value.action.url) && isAppUrl(value.action.url));
576
- }
577
- return false;
578
- }
579
- default:
580
- return false;
581
- }
582
- }
583
- function parseUiCard(input) {
584
- if (!isRecord2(input) || !hasOnlyKeys(input, ["id", "version", "source", "blocks"])) return { ok: false, error: "invalid card shape" };
585
- if (typeof input.id !== "string" || !/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(input.id)) return { ok: false, error: "invalid card id" };
586
- if (input.version !== UI_CARD_VERSION || input.source !== "tool") return { ok: false, error: "unsupported card version or source" };
587
- if (!Array.isArray(input.blocks) || input.blocks.length > MAX_BLOCKS || !input.blocks.every(isBlock)) return { ok: false, error: "invalid blocks" };
588
- try {
589
- if (new TextEncoder().encode(JSON.stringify(input)).byteLength > UI_CARD_MAX_BYTES) return { ok: false, error: "card too large" };
590
- } catch {
591
- return { ok: false, error: "unserializable card" };
592
- }
593
- return { ok: true, value: input };
594
- }
595
- function uiCardFallback(card) {
596
- return card.blocks.map((block) => {
597
- switch (block.type) {
598
- case "text":
599
- return block.text;
600
- case "metric":
601
- return `${block.label}: ${block.value}${block.detail ? ` (${block.detail})` : ""}`;
602
- case "list":
603
- return `${block.title ? `${block.title}
604
- ` : ""}${block.items.map((item) => `- ${item}`).join("\n")}`;
605
- case "table":
606
- return [block.columns.join(" | "), ...block.rows.map((row) => row.join(" | "))].join("\n");
607
- case "choice":
608
- return `${block.question.question}
609
- ${block.question.choices.map((item) => `- ${item.label}${item.detail ? ` \u2014 ${item.detail}` : ""}`).join("\n")}`;
610
- case "action":
611
- return block.action.type === "submit" ? `Submit action (not executed): ${block.action.payload === void 0 ? "{}" : JSON.stringify(block.action.payload)}` : `Open app (not authorized): ${block.action.appId}${block.action.url ? ` (${block.action.url})` : ""}`;
612
- }
613
- }).join("\n\n");
614
- }
615
-
616
- // packages/core/clipMultilineText.ts
617
- function clipMultilineText(value, max) {
618
- const trimmed2 = value.trim();
619
- if (trimmed2.length <= max) return trimmed2;
620
- return `${trimmed2.slice(0, max)}
621
- ...[truncated ${trimmed2.length - max} chars]`;
622
- }
623
-
624
- // packages/render/table/utils/tableSerialization.ts
625
- var fetchAndSerializeTable = async (tableMeta, db, options = {}) => {
626
- const tenantId = tableMeta.tenantId;
627
- const tableId = tableMeta.tableId;
628
- const results = await fetchAndCacheTableRows({
629
- db,
630
- tenantId,
631
- tableId,
632
- token: options.token,
633
- remoteServers: options.remoteServers ?? []
634
- });
635
- const columns = tableMeta.columns || [];
636
- const headerRow = columns.map((c) => c.label || c.name);
637
- const separatorRow = columns.map(() => "---");
638
- let tableMd = "";
639
- if (columns.length > 0) {
640
- tableMd = `| ${headerRow.join(" | ")} |
641
- | ${separatorRow.join(" | ")} |
642
- `;
643
- results.forEach((row) => {
644
- const rowData = columns.map((col) => {
645
- const val = row[col.name];
646
- return val === void 0 || val === null ? "" : String(val).replace(/\|/g, "\\|");
647
- });
648
- tableMd += `| ${rowData.join(" | ")} |
649
- `;
650
- });
651
- } else {
652
- tableMd = "(No columns defined for this table)";
653
- }
654
- return { rows: results, markdown: tableMd };
655
- };
656
-
657
- // packages/ai/tools/toolResultError.ts
658
- var ToolResultError = class extends Error {
659
- code;
660
- rawData;
661
- displayData;
662
- retryable;
663
- constructor(message, options) {
664
- super(message);
665
- this.name = "ToolResultError";
666
- this.code = options?.code;
667
- this.rawData = options?.rawData;
668
- this.displayData = options?.displayData;
669
- this.retryable = options?.retryable;
670
- }
671
- };
672
- var getToolResultErrorData = (error) => {
673
- if (!error || typeof error !== "object") return null;
674
- const candidate = error;
675
- return {
676
- rawData: candidate.rawData,
677
- displayData: candidate.displayData,
678
- code: candidate.code,
679
- retryable: candidate.retryable,
680
- message: candidate.message
681
- };
682
- };
683
-
684
- // packages/ai/tools/toolRunStore.ts
685
- var import_react = __toESM(require_react());
686
- var createToolRunId = () => `toolrun_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 8)}`;
687
- var runsById = /* @__PURE__ */ new Map();
688
- var listeners = /* @__PURE__ */ new Set();
689
- var version = 0;
690
- var notify = () => {
691
- version += 1;
692
- for (const listener of listeners) {
693
- try {
694
- listener();
695
- } catch {
696
- }
697
- }
698
- };
699
- function toolRunStarted(payload) {
700
- const {
701
- id,
702
- messageId,
703
- toolName,
704
- behavior,
705
- inputSummary,
706
- startedAt,
707
- interaction,
708
- input
709
- } = payload;
710
- runsById.set(id, {
711
- id,
712
- messageId,
713
- toolName,
714
- behavior,
715
- inputSummary,
716
- status: "running",
717
- startedAt: startedAt ?? Date.now(),
718
- interaction,
719
- input,
720
- error: void 0,
721
- finishedAt: void 0,
722
- outputSummary: void 0,
723
- steps: void 0
724
- });
725
- notify();
726
- }
727
- function toolRunSetPending(payload) {
728
- const { id } = payload;
729
- const run = runsById.get(id);
730
- if (run) {
731
- run.status = "pending";
732
- notify();
733
- }
734
- }
735
- function toolRunSucceeded(payload) {
736
- const { id, outputSummary, steps, finishedAt } = payload;
737
- const run = runsById.get(id);
738
- if (run) {
739
- run.status = "succeeded";
740
- run.outputSummary = outputSummary;
741
- if (steps !== void 0) {
742
- run.steps = steps;
743
- }
744
- run.finishedAt = finishedAt ?? Date.now();
745
- notify();
746
- }
747
- }
748
- function toolRunUpdated(payload) {
749
- const { id, outputSummary, steps } = payload;
750
- const run = runsById.get(id);
751
- if (run) {
752
- if (outputSummary !== void 0) {
753
- run.outputSummary = outputSummary;
754
- }
755
- if (steps !== void 0) {
756
- run.steps = steps;
757
- }
758
- notify();
759
- }
760
- }
761
- function toolRunFailed(payload) {
762
- const { id, error, outputSummary, steps, finishedAt } = payload;
763
- const run = runsById.get(id);
764
- if (run) {
765
- run.status = "failed";
766
- run.error = error;
767
- if (outputSummary !== void 0) {
768
- run.outputSummary = outputSummary;
769
- }
770
- if (steps !== void 0) {
771
- run.steps = steps;
772
- }
773
- run.finishedAt = finishedAt ?? Date.now();
774
- notify();
775
- }
776
- }
777
- function getAllToolRuns() {
778
- return Array.from(runsById.values()).sort((a, b) => a.startedAt - b.startedAt);
779
- }
780
- function getToolRunById(id) {
781
- return runsById.get(id);
782
- }
783
- var executeToolRun = createAsyncThunk(
784
- "toolRun/executeToolRun",
785
- async ({ id, inputOverride }, thunkApi) => {
786
- const run = getToolRunById(id);
787
- if (!run) {
788
- throw new Error(`ToolRun not found: ${id}`);
789
- }
790
- const executionInput = inputOverride ?? run.input;
791
- if (!executionInput) {
792
- throw new Error(`ToolRun ${id} has no input to execute with.`);
793
- }
794
- const { findToolExecutor } = await import("./tools-WBPFTSMK.js");
795
- const { executor } = findToolExecutor(run.toolName);
796
- toolRunStarted({
797
- id: run.id,
798
- messageId: run.messageId,
799
- toolName: run.toolName,
800
- behavior: run.behavior,
801
- inputSummary: run.inputSummary,
802
- startedAt: Date.now(),
803
- interaction: run.interaction,
804
- input: executionInput
805
- });
806
- try {
807
- const result = await executor(executionInput, thunkApi, {
808
- parentMessageId: run.messageId
809
- });
810
- toolRunSucceeded({
811
- id: run.id,
812
- outputSummary: result?.displayData || ""
813
- });
814
- if (run.toolName === "deleteSpaces") {
815
- const latestState = thunkApi.getState();
816
- const userId = selectIdentityUserId(latestState);
817
- if (userId) {
818
- const { fetchUserSpaceMemberships } = await import("./memberThunks-43B7UYC5.js");
819
- await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
820
- }
821
- }
822
- return {
823
- id: run.id,
824
- rawData: result?.rawData,
825
- displayData: result?.displayData
826
- };
827
- } catch (e) {
828
- const msg = toErrorMessage(e);
829
- const structured = getToolResultErrorData(e);
830
- toolRunFailed({
831
- id: run.id,
832
- error: msg,
833
- outputSummary: asOptionalTrimmedString(structured?.displayData)
834
- });
835
- throw e;
836
- }
837
- }
838
- );
839
-
840
- export {
841
- UI_CARD_ENVELOPE_MAX_BYTES,
842
- parseUiCard,
843
- uiCardFallback,
844
- createSSEParser,
845
- waitForAbortableDelay,
846
- clipMultilineText,
847
- fetchAndSerializeTable,
848
- ToolResultError,
849
- getToolResultErrorData,
850
- createToolRunId,
851
- toolRunStarted,
852
- toolRunSetPending,
853
- toolRunSucceeded,
854
- toolRunUpdated,
855
- toolRunFailed,
856
- getAllToolRuns,
857
- resolveMemoryToolContext,
858
- resolveToolAttributionContext,
859
- loadSkillFunctionSchema,
860
- loadSkillFunc
861
- };