nolo-cli 0.259.0-alpha.1 → 0.261.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 (320) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-MTM4BJK3.js → _executeModel-PODMRXJJ.js} +97 -83
  3. package/accountResolver-NGICIMEE.js +1 -1
  4. package/{action-C6IQAKN4.js → action-NJTYNXXR.js} +12 -10
  5. package/{addContentAction-53364YDW.js → addContentAction-RUPXLROG.js} +14 -13
  6. package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-57EJ2UBC.js} +20 -24
  7. package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-DRFCOTYP.js} +185 -147
  8. package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-FHENHUBF.js} +143 -127
  9. package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-BMVKNYIY.js} +9 -6
  10. package/{agentListCommands-62UYUQDI.js → agentListCommands-W66W5K3V.js} +88 -69
  11. package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-C3BUBCXU.js} +69 -60
  12. package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-VIWKP7DM.js} +11 -8
  13. package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-5SNSXOY7.js} +10 -7
  14. package/agentRecordCommands-DYMHWTID.js +210 -0
  15. package/agentRun-QVFG3CI4.js +250 -0
  16. package/agentRunCommand-YV4V5HSL.js +248 -0
  17. package/{agentRunControl-LXMADX3N.js → agentRunControl-RGBHKPKJ.js} +19 -12
  18. package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-LVEMOYS2.js} +62 -49
  19. package/{agentSlice-3HHYUQLM.js → agentSlice-OJCM7OUX.js} +15 -18
  20. package/appConfigCommands-ZUXQLE7L.js +417 -0
  21. package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-L5UKUMXY.js} +68 -58
  22. package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-KX2BRQUW.js} +74 -59
  23. package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-7LHRSWW7.js} +68 -58
  24. package/{appGetCommands-73DXOAQW.js → appGetCommands-F7SDFCUK.js} +74 -58
  25. package/{appListCommands-HD5LOQ3G.js → appListCommands-U4NJKSMZ.js} +74 -58
  26. package/appMigrateCommands-JAPOLYSW.js +230 -0
  27. package/appSourceCommands-TLXPWXUH.js +279 -0
  28. package/authCommand-AU3GZBZ2.js +65 -0
  29. package/{authCommands-T5FODCEG.js → authCommands-JKBWMUQ4.js} +20 -17
  30. package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
  31. package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-F47WYQWF.js} +68 -18
  32. package/{chunk-5YS6QHGT.js → chunk-2FGFY72B.js} +9 -9
  33. package/{chunk-MJBLXJMP.js → chunk-2I4R6ZRV.js} +12 -9
  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-7OVOZRZF.js → chunk-3B7OTHDW.js} +23 -379
  39. package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
  40. package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
  41. package/{chunk-XNNBXUEM.js → chunk-3TII7WCF.js} +5 -5
  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-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
  47. package/{chunk-KQHEGELM.js → chunk-63G7JWEA.js} +16 -6
  48. package/{chunk-4EACJPZI.js → chunk-6BBXJGIQ.js} +51 -42
  49. package/chunk-72VWN4VK.js +51 -0
  50. package/chunk-7LR2IFUH.js +100 -0
  51. package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
  52. package/{chunk-XPETQ4MR.js → chunk-7X4BFUJV.js} +24 -10
  53. package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
  54. package/chunk-A4O76A6V.js +432 -0
  55. package/chunk-AMNZPQCY.js +635 -0
  56. package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
  57. package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
  58. package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
  59. package/{chunk-U6QNVOR5.js → chunk-BUGLH2A7.js} +130 -6
  60. package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
  61. package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
  62. package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
  63. package/{chunk-Y2TCTNUD.js → chunk-CK2LMTYO.js} +4 -4
  64. package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
  65. package/{chunk-57V4PADY.js → chunk-CNYPQYXT.js} +781 -449
  66. package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
  67. package/chunk-D3ONA3FP.js +762 -0
  68. package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
  69. package/chunk-DLXL4NSL.js +1179 -0
  70. package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
  71. package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
  72. package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
  73. package/{chunk-DBJODIZ6.js → chunk-EQOWWSNQ.js} +19 -27
  74. package/chunk-ER6NTALN.js +34 -0
  75. package/{chunk-L4XST72F.js → chunk-ERCSHBUD.js} +16027 -17392
  76. package/chunk-EUHMI5KG.js +101 -0
  77. package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
  78. package/{chunk-Q2EERN52.js → chunk-FF5ZRKW7.js} +12 -7
  79. package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
  80. package/chunk-FI4DPLR7.js +902 -0
  81. package/{chunk-HDKMVYNJ.js → chunk-FNLT7NKG.js} +7 -11
  82. package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
  83. package/chunk-FP46RAJQ.js +58 -0
  84. package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
  85. package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
  86. package/{chunk-FZENZCIA.js → chunk-GEC4CHS2.js} +19 -12
  87. package/chunk-GF4LYNNZ.js +25 -0
  88. package/{chunk-IYLUK67R.js → chunk-GH6SS2DZ.js} +25 -8
  89. package/chunk-HAZ6UVH4.js +368 -0
  90. package/{chunk-OKAXQFON.js → chunk-HB4J5HA6.js} +4 -4
  91. package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
  92. package/chunk-HJTI7RZV.js +94 -0
  93. package/{chunk-HQUGB2HM.js → chunk-HMFKYZKP.js} +62 -50
  94. package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
  95. package/{chunk-46FETNLF.js → chunk-IN4B6Z2D.js} +7 -6
  96. package/chunk-IV6VUVLJ.js +88 -0
  97. package/{chunk-LLUBUHNT.js → chunk-IWWJSSST.js} +5 -9
  98. package/{chunk-7BIJFGKS.js → chunk-J22PFCQN.js} +106 -52
  99. package/chunk-J42X32PV.js +472 -0
  100. package/{chunk-LCBAMY2M.js → chunk-JKVOKKMQ.js} +0 -7
  101. package/{chunk-KT7S7ANZ.js → chunk-JPYOHIHX.js} +9 -9
  102. package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
  103. package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
  104. package/{chunk-KLMBM6P6.js → chunk-KALCFXQO.js} +2454 -1115
  105. package/chunk-KDDXC2IH.js +148 -0
  106. package/chunk-KGKTN2NX.js +25 -0
  107. package/chunk-KGWE224L.js +246 -0
  108. package/{chunk-OYUMJMC5.js → chunk-KSV6T4AH.js} +6 -1
  109. package/{chunk-P27E22MA.js → chunk-L43DGEPZ.js} +1 -1
  110. package/{chunk-5BIDJVNX.js → chunk-L45P4JTE.js} +180 -31
  111. package/chunk-LHCIIUCX.js +222 -0
  112. package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
  113. package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
  114. package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
  115. package/{chunk-BIDSIRTS.js → chunk-LTCZOOAM.js} +11 -17
  116. package/chunk-LUTSMSIL.js +425 -0
  117. package/chunk-LXP53WGF.js +168 -0
  118. package/{chunk-2CT2J3O6.js → chunk-M7VNNPVX.js} +2493 -4055
  119. package/chunk-MDAYRIP7.js +1889 -0
  120. package/{chunk-6B2OBX5B.js → chunk-MMXHIHJZ.js} +15 -47
  121. package/{chunk-HPDLPEUG.js → chunk-MPWQI36J.js} +267 -234
  122. package/chunk-MRACVEPZ.js +7 -0
  123. package/{chunk-ZYPXOQS2.js → chunk-MSFKHPA6.js} +1 -1
  124. package/chunk-NHLLXINQ.js +8 -0
  125. package/{chunk-QXTEEEIN.js → chunk-NJCTPWJU.js} +8 -8
  126. package/chunk-NLS7F5DW.js +1697 -0
  127. package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
  128. package/{chunk-JLZJL3WC.js → chunk-O77F26YB.js} +370 -39
  129. package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
  130. package/{chunk-YN23INFZ.js → chunk-OIOMBPCA.js} +23 -2
  131. package/{chunk-CJOOF4L5.js → chunk-OSZNERNW.js} +17 -14
  132. package/{chunk-JZO7KUF3.js → chunk-P4I55ASV.js} +313 -275
  133. package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
  134. package/chunk-PL5RKESU.js +40 -0
  135. package/chunk-Q5FJJ6XI.js +103 -0
  136. package/{chunk-WS36XPJD.js → chunk-Q5IXZF3S.js} +82 -6
  137. package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
  138. package/{chunk-WSLL7VV4.js → chunk-QXWXRBOL.js} +9 -9
  139. package/{chunk-MXA54TQM.js → chunk-QZYQ3Y3G.js} +1 -1
  140. package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
  141. package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
  142. package/chunk-RF576RYE.js +117 -0
  143. package/chunk-RI7SXDJW.js +1317 -0
  144. package/{chunk-FEIVARWR.js → chunk-RIOAPUGV.js} +238 -25
  145. package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
  146. package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
  147. package/{chunk-J55F3IEZ.js → chunk-SARJZIGR.js} +1 -1
  148. package/chunk-SJFL32RD.js +356 -0
  149. package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
  150. package/{chunk-MPGR4ZNR.js → chunk-SRVLHMES.js} +46 -42
  151. package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
  152. package/{chunk-RD3QLZQV.js → chunk-SWJRX4M5.js} +324 -2
  153. package/{chunk-R3TUHCSJ.js → chunk-T3Y2NA4H.js} +8 -3
  154. package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
  155. package/{chunk-KWNVPY6M.js → chunk-TJXO66M2.js} +8 -5
  156. package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
  157. package/{chunk-ADYWV732.js → chunk-U5PSCTMR.js} +264 -177
  158. package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
  159. package/{chunk-QGFLVQ6E.js → chunk-UBOTXA3Z.js} +4 -14
  160. package/{chunk-6YX2RAQN.js → chunk-UEZL3RBG.js} +89 -164
  161. package/{chunk-NCFKHYDM.js → chunk-UJL23HBL.js} +774 -119
  162. package/chunk-ULPU4C43.js +1710 -0
  163. package/{chunk-UA3QTA2S.js → chunk-VC3MAT33.js} +4442 -2570
  164. package/{chunk-VNHZJEQN.js → chunk-VCESLFF4.js} +3 -3
  165. package/chunk-VOO3YQQP.js +17157 -0
  166. package/{chunk-Y2GWUBNS.js → chunk-VZDSNDUD.js} +279 -149
  167. package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
  168. package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
  169. package/chunk-WEEB2JKA.js +443 -0
  170. package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
  171. package/chunk-WMBJDXMY.js +408 -0
  172. package/chunk-WSQLCWLQ.js +201 -0
  173. package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
  174. package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
  175. package/{chunk-MNFUKRRU.js → chunk-XKNDVHF5.js} +7 -7
  176. package/{chunk-MHKPUGPD.js → chunk-XREMPMNK.js} +20 -4
  177. package/chunk-XT6C2QZW.js +46 -0
  178. package/chunk-XUDXQT7R.js +790 -0
  179. package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
  180. package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
  181. package/{chunk-U35UUM5K.js → chunk-YVOUSIIA.js} +1 -1
  182. package/{chunk-6VEO7Z3Y.js → chunk-Z27AH6A5.js} +6 -6
  183. package/chunk-Z3KTXWWB.js +76 -0
  184. package/{chunk-UWWOWTW2.js → chunk-Z7EP5HDL.js} +1 -1
  185. package/{chunk-YFEK7ACQ.js → chunk-ZB2E724W.js} +4 -4
  186. package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
  187. package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
  188. package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-BJJEXHSZ.js} +20 -14
  189. package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
  190. package/cliAuthorityBrokerProcess-VIJEKQSX.js +34 -0
  191. package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-NDMKN4X2.js} +6 -3
  192. package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
  193. package/cliLocalAgentRecordReader-KCZS2MZU.js +113 -0
  194. package/cloudAutomationCommands-2WQUGQSW.js +310 -0
  195. package/{commandRegistry-IFYQLPGM.js → commandRegistry-C64JBZJ3.js} +288 -121
  196. package/{contentThunks-QCFCD2X3.js → contentThunks-G3HEIRXC.js} +45 -43
  197. package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
  198. package/createAgentAutomationAction-DSBL3X3A.js +172 -0
  199. package/createDialogAction-OHFUHC53.js +86 -0
  200. package/{createPageAction-QCVBMP4C.js → createPageAction-E6JZSZLU.js} +49 -45
  201. package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
  202. package/{dbSlice-RWPSVHBC.js → dbSlice-U3GPLEL3.js} +21 -16
  203. package/deleteDbKey-DRXKWJX5.js +86 -0
  204. package/{dialogCommands-4IEQUALS.js → dialogCommands-4EX2OTIC.js} +80 -66
  205. package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
  206. package/dialogNotifyCommand-4SCE2Z2R.js +44 -0
  207. package/dialogPortabilityCommands-ZSFFHRX4.js +3036 -0
  208. package/{dialogSlice-XFYID6KE.js → dialogSlice-PRZCIJCH.js} +43 -42
  209. package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-RKB76OVX.js} +84 -70
  210. package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-BP7HMRYP.js} +7 -4
  211. package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-JGPNGIZ7.js} +68 -59
  212. package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-XRJTNRDH.js} +68 -59
  213. package/{docReadCommands-EXQI7ETH.js → docReadCommands-6GFO4ARS.js} +67 -58
  214. package/{docStore-MWFUKZL2.js → docStore-QRLIWFTU.js} +16 -17
  215. package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-W2GXMUXW.js} +68 -59
  216. package/{ebookDownloaderAgentCommand-DYSKF5ZY.js → ebookDownloaderAgentCommand-2DHPGEOQ.js} +14 -17
  217. package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
  218. package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
  219. package/{handleSendMessageAction-GG3TR62X.js → handleSendMessageAction-DHGWURJZ.js} +265 -119
  220. package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-FPUZ7RMI.js} +138 -122
  221. package/index.js +36 -22
  222. package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
  223. package/localAutomationCommands-ZMU22RQJ.js +198 -0
  224. package/localAutomationRuntime-MU5FGJ3V.js +60 -0
  225. package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
  226. package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-YBXQBV4G.js} +136 -119
  227. package/localRuntimeAuthority-LDXMEDO5.js +44 -0
  228. package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-6TQZDLNU.js} +1 -1
  229. package/{machineCommands-CL5XK5UC.js → machineCommands-57RTUYRV.js} +251 -357
  230. package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
  231. package/machineWsRunDispatch-VBKV3FFE.js +227 -0
  232. package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-J76SOJVZ.js} +40 -22
  233. package/mcpLocalManageCommands-USETIMHB.js +212 -0
  234. package/{memberThunks-43B7UYC5.js → memberThunks-7UERUEMI.js} +102 -22
  235. package/{memoryCommands-BC6REPQB.js → memoryCommands-N7NHEE55.js} +25 -34
  236. package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
  237. package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
  238. package/package.json +3 -3
  239. package/parityCommands-LYDLWSLK.js +613 -0
  240. package/{projectArchive-OC63TWTD.js → projectArchive-KCNQDVWJ.js} +49 -45
  241. package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
  242. package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
  243. package/{read-KG6INYUT.js → read-SPSQ6NLR.js} +11 -10
  244. package/{readDocTool-N3GA52JR.js → readDocTool-ENUL2GNL.js} +5 -1
  245. package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-MKS7TAEF.js} +927 -573
  246. package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
  247. package/remove-TNNDO635.js +32 -0
  248. package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-POPUZ3WU.js} +22 -26
  249. package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-KVILXQNI.js} +117 -82
  250. package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-4J2DP4LZ.js} +23 -16
  251. package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
  252. package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-35THMVBP.js} +16 -17
  253. package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-WLXBNIG7.js} +23 -27
  254. package/{settingThunks-DVKG4X4S.js → settingThunks-6Y5U5M5N.js} +170 -497
  255. package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
  256. package/{spaceCommands-7QKXKBDQ.js → spaceCommands-LXNJBO2U.js} +293 -58
  257. package/spacePruneCommand-2ITUFYBM.js +233 -0
  258. package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
  259. package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-EY6MFKCA.js} +225 -137
  260. package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-TG6BQRDA.js} +19 -23
  261. package/{tableCommands-EFA754RE.js → tableCommands-35G34R4B.js} +28 -49
  262. package/{toolApiClient-N5PYW2R3.js → toolApiClient-MPQIFYXP.js} +15 -4
  263. package/{tools-2Q2LBDUC.js → tools-CSLTRRUR.js} +73 -63
  264. package/{tuiRestart-4QDWLHYZ.js → tuiRestart-ALR4Q3JM.js} +20 -13
  265. package/tuiSummaryLlmCaller-3Y3JEXJK.js +52 -0
  266. package/{updateCommands-GJGRS6JK.js → updateCommands-GHQVP6Z5.js} +13 -8
  267. package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-LFAWF5EW.js} +57 -58
  268. package/{usageCommand-WI6SQOPB.js → usageCommand-5VKW6T4C.js} +6 -8
  269. package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-VUQETFMW.js} +11 -15
  270. package/{windowsSelfUpdate-C7LGVWYX.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
  271. package/workContext-ZAW6VXT7.js +18 -0
  272. package/workContextQueryProjection-CACY5VFE.js +23 -0
  273. package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
  274. package/agentFavoriteCommands-7LOP3HUD.js +0 -186
  275. package/agentRecordCommands-TPE7NSZ6.js +0 -194
  276. package/agentRunCommand-DMVGBPLI.js +0 -232
  277. package/authCommand-V6EOMZX6.js +0 -79
  278. package/chunk-2MBTWINN.js +0 -89
  279. package/chunk-523DITKR.js +0 -32
  280. package/chunk-BUDVRYES.js +0 -2213
  281. package/chunk-BZMDWGQQ.js +0 -47
  282. package/chunk-GAHJLSDO.js +0 -107
  283. package/chunk-GYX6XTAI.js +0 -84
  284. package/chunk-HNUWUO75.js +0 -93
  285. package/chunk-HSBHS6KT.js +0 -33401
  286. package/chunk-KG27JIG4.js +0 -136
  287. package/chunk-OB4FBZXJ.js +0 -364
  288. package/chunk-OKH74FML.js +0 -3746
  289. package/chunk-OLZBQWZU.js +0 -6
  290. package/chunk-OOV5JN25.js +0 -1317
  291. package/chunk-OQFOE4SJ.js +0 -405
  292. package/chunk-PXYBUFDB.js +0 -53
  293. package/chunk-R3FZHW4Q.js +0 -103
  294. package/chunk-R3MV2GII.js +0 -106
  295. package/chunk-SCAC3NM5.js +0 -11751
  296. package/chunk-SR4FE5VD.js +0 -9
  297. package/chunk-SYTHYBMI.js +0 -3558
  298. package/chunk-UKZX3NHN.js +0 -48
  299. package/chunk-UVLYNWIE.js +0 -74
  300. package/chunk-VQX5JJNI.js +0 -861
  301. package/chunk-X4O7FJF5.js +0 -160
  302. package/chunk-YJPK35HB.js +0 -175
  303. package/chunk-YNIYE47Z.js +0 -105
  304. package/chunk-Z4PCXPUE.js +0 -127
  305. package/chunk-ZR5IVL4N.js +0 -862
  306. package/chunk-ZTHAJU3O.js +0 -2537
  307. package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
  308. package/cliLocalAgentRecordReader-34UKRBLY.js +0 -104
  309. package/createDialogAction-ZAJERW62.js +0 -82
  310. package/deleteFile-ECU6FU5C.js +0 -55
  311. package/dialogNotifyCommand-IASQGEMW.js +0 -36
  312. package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
  313. package/machineWsRunDispatch-TBVOYOAH.js +0 -209
  314. package/markdownToSlate-PXYAIBVL.js +0 -8
  315. package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
  316. package/webapi-QVV65DQF.js +0 -2487
  317. package/workContext-Y3ADAPZU.js +0 -14
  318. package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
  319. package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
  320. package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
package/chunk-VQX5JJNI.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-Y2GWUBNS.js";
10
- import {
11
- resolveDialogRuntimeAgentKey
12
- } from "./chunk-2CT2J3O6.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-QIGQFON2.js";
34
- import {
35
- listBuiltinSkills,
36
- resolveBuiltinSkillByName
37
- } from "./chunk-KVMLM5VD.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-2Q2LBDUC.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
- };