nolo-cli 0.259.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.
- package/README.md +1 -1
- package/{_executeModel-MTM4BJK3.js → _executeModel-EO6JFCOF.js} +97 -83
- package/accountResolver-NGICIMEE.js +1 -1
- package/{action-C6IQAKN4.js → action-WIA56QT4.js} +12 -10
- package/{addContentAction-53364YDW.js → addContentAction-OCMWZLYG.js} +14 -13
- package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-ER2NZ7BC.js} +20 -24
- package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-KSXSNPAU.js} +184 -146
- package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-NXRWS7NS.js} +142 -126
- package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-D2S7LCTU.js} +8 -5
- package/{agentListCommands-62UYUQDI.js → agentListCommands-PFXGZZ3Y.js} +87 -68
- package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-2Q55CSL4.js} +68 -59
- package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-EUNS7Y2Z.js} +10 -7
- package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-S2VMPSWL.js} +9 -6
- package/agentRecordCommands-FUFI526H.js +210 -0
- package/agentRun-ZNMUPDHF.js +250 -0
- package/agentRunCommand-ISVQ2UYC.js +248 -0
- package/{agentRunControl-LXMADX3N.js → agentRunControl-NEK44LDM.js} +19 -12
- package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-SST4EPLT.js} +62 -49
- package/{agentSlice-3HHYUQLM.js → agentSlice-4ZJJJN4M.js} +15 -18
- package/appConfigCommands-MPHS6FHD.js +417 -0
- package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-W26WGENW.js} +68 -58
- package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-ER7IOF5E.js} +74 -59
- package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-VKLL3A77.js} +68 -58
- package/{appGetCommands-73DXOAQW.js → appGetCommands-P6GXJNUD.js} +74 -58
- package/{appListCommands-HD5LOQ3G.js → appListCommands-ACA2IZZM.js} +74 -58
- package/appMigrateCommands-OGF4E2W6.js +230 -0
- package/appSourceCommands-GAHVBRUM.js +279 -0
- package/{authCommand-V6EOMZX6.js → authCommand-PXE7NZTQ.js} +26 -40
- package/{authCommands-T5FODCEG.js → authCommands-AZPYXTUB.js} +20 -17
- package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
- package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-7UKKUOBU.js} +68 -18
- package/{chunk-KLMBM6P6.js → chunk-2CKFROQS.js} +2454 -1115
- package/{chunk-MJBLXJMP.js → chunk-2I4R6ZRV.js} +12 -9
- package/{chunk-FXEPZKNJ.js → chunk-2MIZHEND.js} +506 -64
- package/{chunk-TLE77UJ5.js → chunk-2OROOEOQ.js} +0 -1
- package/{chunk-6RSNVJGO.js → chunk-2ZBPWX7N.js} +4 -4
- package/chunk-35JIFLIG.js +30 -0
- package/{chunk-ZYPXOQS2.js → chunk-3EPED3UO.js} +1 -1
- package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
- package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
- package/{chunk-HPDLPEUG.js → chunk-42JZNSAY.js} +267 -234
- package/{chunk-223KZUJ6.js → chunk-4HZCBA4Q.js} +18 -15
- package/{chunk-C5A54QS7.js → chunk-4INJGWE3.js} +18 -5
- package/chunk-4IVMDQBA.js +261 -0
- package/chunk-4Y6CZ2N4.js +82 -0
- package/{chunk-OKAXQFON.js → chunk-52BNL6GP.js} +4 -4
- package/{chunk-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
- package/{chunk-QGFLVQ6E.js → chunk-6KUTNAPU.js} +4 -14
- package/{chunk-MNFUKRRU.js → chunk-6XAAKRJB.js} +7 -7
- package/{chunk-P27E22MA.js → chunk-6Z6DGDPI.js} +1 -1
- package/chunk-72VWN4VK.js +51 -0
- package/{chunk-L4XST72F.js → chunk-75FZ2Z7C.js} +16027 -17392
- package/{chunk-ADYWV732.js → chunk-76B6YUQS.js} +264 -177
- package/{chunk-MXA54TQM.js → chunk-76K4GTY5.js} +1 -1
- package/{chunk-VNHZJEQN.js → chunk-7HUCUD2I.js} +3 -3
- package/chunk-7LR2IFUH.js +100 -0
- package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
- package/{chunk-Y2TCTNUD.js → chunk-7QO6YSA4.js} +4 -4
- package/{chunk-DBJODIZ6.js → chunk-7RYH7YIY.js} +19 -27
- package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
- package/chunk-AMNZPQCY.js +635 -0
- package/chunk-AMTF6FJD.js +356 -0
- package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
- package/{chunk-WSLL7VV4.js → chunk-B4NA5UJR.js} +9 -9
- package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
- package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
- package/{chunk-46FETNLF.js → chunk-BTIFQBYW.js} +7 -6
- package/{chunk-2JHGUL5K.js → chunk-BVYHE6QD.js} +2 -2
- package/{chunk-KXOPLLFP.js → chunk-CA7LGAHV.js} +69 -9
- package/{chunk-2FZVXOFX.js → chunk-CEIWXKHP.js} +112 -200
- package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
- package/{chunk-MPGR4ZNR.js → chunk-CRGPRAJ4.js} +46 -42
- package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
- package/{chunk-R3TUHCSJ.js → chunk-CZHIOBBK.js} +8 -3
- package/chunk-D3ONA3FP.js +762 -0
- package/chunk-D3SAQ6T7.js +1697 -0
- package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
- package/{chunk-KQHEGELM.js → chunk-DEAII55O.js} +16 -6
- package/{chunk-J55F3IEZ.js → chunk-DKJQEFNG.js} +1 -1
- package/chunk-DLXL4NSL.js +1179 -0
- package/{chunk-EJQE5HB7.js → chunk-DSBRIUX5.js} +4 -2
- package/{chunk-XRGBJHZX.js → chunk-E36V7MPY.js} +9 -5
- package/{chunk-4YPH5KRA.js → chunk-EDKMRDET.js} +1 -1
- package/chunk-EJHLDJWZ.js +58 -0
- package/{chunk-6B2OBX5B.js → chunk-EMFZXJTN.js} +15 -47
- package/chunk-ER6NTALN.js +34 -0
- package/chunk-EUHMI5KG.js +101 -0
- package/{chunk-YQLAFJRQ.js → chunk-FBNVJ2TO.js} +1 -1
- package/{chunk-Q2EERN52.js → chunk-FF5ZRKW7.js} +12 -7
- package/{chunk-YFEK7ACQ.js → chunk-FGD4NMTP.js} +4 -4
- package/{chunk-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
- package/chunk-FI4DPLR7.js +902 -0
- package/chunk-FKVLQNGJ.js +25 -0
- package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
- package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
- package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
- package/{chunk-5BIDJVNX.js → chunk-G5JGA5YM.js} +180 -31
- package/{chunk-57V4PADY.js → chunk-GMBWWBSJ.js} +781 -449
- package/{chunk-WS36XPJD.js → chunk-GYFKKTDI.js} +82 -6
- package/{chunk-KT7S7ANZ.js → chunk-GZ4I5EMM.js} +9 -9
- package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
- package/chunk-HJTI7RZV.js +94 -0
- package/{chunk-QXTEEEIN.js → chunk-HPIY372N.js} +7 -7
- package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
- package/{chunk-HDKMVYNJ.js → chunk-I3NWAILT.js} +6 -4
- package/{chunk-JZO7KUF3.js → chunk-IM7HCFB4.js} +313 -275
- package/{chunk-UWWOWTW2.js → chunk-INN2PBW7.js} +1 -1
- package/chunk-IV6VUVLJ.js +88 -0
- package/chunk-J42X32PV.js +472 -0
- package/{chunk-UA3QTA2S.js → chunk-JHQNWV2C.js} +4441 -2569
- package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
- package/{chunk-BIDSIRTS.js → chunk-JUNYPVL6.js} +10 -16
- package/chunk-JVEKCQAP.js +222 -0
- package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
- package/chunk-KDDXC2IH.js +148 -0
- package/chunk-KGKTN2NX.js +25 -0
- package/chunk-KGWE224L.js +246 -0
- package/chunk-L3UFGEDU.js +17157 -0
- package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
- package/{chunk-7OVOZRZF.js → chunk-LIH7WSX5.js} +23 -379
- package/chunk-LJOPY4TL.js +443 -0
- package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
- package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
- package/chunk-LXP53WGF.js +168 -0
- package/chunk-MDAYRIP7.js +1889 -0
- package/chunk-MRACVEPZ.js +7 -0
- package/chunk-NHLLXINQ.js +8 -0
- package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
- package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
- package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
- package/chunk-PL5RKESU.js +40 -0
- package/{chunk-MHKPUGPD.js → chunk-PQ3QZMJK.js} +20 -4
- package/chunk-Q5FJJ6XI.js +103 -0
- package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
- package/{chunk-6YX2RAQN.js → chunk-QZCLCAYC.js} +89 -164
- package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
- package/{chunk-JLZJL3WC.js → chunk-RDZ5OIAT.js} +370 -39
- package/{chunk-5RGU3J7P.js → chunk-REAE2SZK.js} +0 -1
- package/chunk-RF576RYE.js +117 -0
- package/chunk-RI7SXDJW.js +1317 -0
- package/{chunk-FEIVARWR.js → chunk-RIOAPUGV.js} +238 -25
- package/{chunk-2CT2J3O6.js → chunk-RL6H2A2Z.js} +2493 -4055
- package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
- package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
- package/chunk-S7BF2OGX.js +432 -0
- package/{chunk-6VEO7Z3Y.js → chunk-SD4MBKZ7.js} +6 -6
- package/{chunk-KWNVPY6M.js → chunk-SGEBRBF3.js} +7 -4
- package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
- package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
- package/{chunk-Y2GWUBNS.js → chunk-SX6PDLBZ.js} +279 -149
- package/{chunk-XNNBXUEM.js → chunk-T4WU747C.js} +5 -5
- package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
- package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
- package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
- package/{chunk-NCFKHYDM.js → chunk-UOLGGEEC.js} +774 -119
- package/{chunk-4EACJPZI.js → chunk-USFG4EWQ.js} +51 -42
- package/{chunk-LLUBUHNT.js → chunk-UYZOBSSO.js} +5 -9
- package/{chunk-XPETQ4MR.js → chunk-VDC3BW24.js} +24 -10
- package/chunk-VH356OQ3.js +425 -0
- package/{chunk-U6QNVOR5.js → chunk-VKM7DOYB.js} +130 -6
- package/{chunk-CJOOF4L5.js → chunk-VPAO5WQX.js} +17 -14
- package/{chunk-OYUMJMC5.js → chunk-W2RQYNPI.js} +5 -0
- package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
- package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
- package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
- package/chunk-WLJNHFEB.js +1710 -0
- package/chunk-WMBJDXMY.js +408 -0
- package/chunk-WSQLCWLQ.js +201 -0
- package/{chunk-YN23INFZ.js → chunk-WXD6Y7DW.js} +23 -2
- package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
- package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
- package/{chunk-7BIJFGKS.js → chunk-XQFDCRG3.js} +105 -51
- package/chunk-XT6C2QZW.js +46 -0
- package/{chunk-5YS6QHGT.js → chunk-Y7THFNVJ.js} +9 -9
- package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
- package/{chunk-RD3QLZQV.js → chunk-YM5XULB2.js} +324 -2
- package/{chunk-FZENZCIA.js → chunk-YNP3ITPU.js} +19 -12
- package/{chunk-U35UUM5K.js → chunk-YOUSQIIK.js} +1 -1
- package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
- package/{chunk-IYLUK67R.js → chunk-YU235GGN.js} +25 -8
- package/chunk-YWEZSBLL.js +790 -0
- package/chunk-Z3KTXWWB.js +76 -0
- package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
- package/chunk-ZD7OULYZ.js +368 -0
- package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
- package/{chunk-HQUGB2HM.js → chunk-ZTCMXPIS.js} +62 -50
- package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-KMXS7JP5.js} +20 -14
- package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
- package/cliAuthorityBrokerProcess-DCCUT4YQ.js +34 -0
- package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-YDGDHIEE.js} +5 -2
- package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
- package/cliLocalAgentRecordReader-X2YHEBWI.js +113 -0
- package/cloudAutomationCommands-C6Q3BFRB.js +310 -0
- package/{commandRegistry-IFYQLPGM.js → commandRegistry-TYYYTW5E.js} +260 -121
- package/{contentThunks-QCFCD2X3.js → contentThunks-E6BJ5YSX.js} +45 -43
- package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
- package/createAgentAutomationAction-L3NLCIIW.js +172 -0
- package/{createDialogAction-ZAJERW62.js → createDialogAction-QSWKRPWQ.js} +46 -42
- package/{createPageAction-QCVBMP4C.js → createPageAction-ZVVUT4CZ.js} +49 -45
- package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
- package/{dbSlice-RWPSVHBC.js → dbSlice-SEVKNA7A.js} +21 -16
- package/deleteDbKey-43MTK2DI.js +86 -0
- package/{dialogCommands-4IEQUALS.js → dialogCommands-UVMTIFSA.js} +80 -66
- package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
- package/{dialogNotifyCommand-IASQGEMW.js → dialogNotifyCommand-LMWF7EQI.js} +22 -14
- package/dialogPortabilityCommands-PAMLEBST.js +3036 -0
- package/{dialogSlice-XFYID6KE.js → dialogSlice-VHPXENDZ.js} +43 -42
- package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-SO2WKAXW.js} +83 -69
- package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-EUO6JXTD.js} +6 -3
- package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-H4RLIUNX.js} +68 -59
- package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-OVAKCBMT.js} +68 -59
- package/{docReadCommands-EXQI7ETH.js → docReadCommands-KFISIUVA.js} +67 -58
- package/{docStore-MWFUKZL2.js → docStore-X7BEA735.js} +16 -17
- package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-VOEER36L.js} +68 -59
- package/{ebookDownloaderAgentCommand-DYSKF5ZY.js → ebookDownloaderAgentCommand-2DHPGEOQ.js} +14 -17
- package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
- package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
- package/{handleSendMessageAction-GG3TR62X.js → handleSendMessageAction-GQ2KKOET.js} +265 -119
- package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-PJAIKZQP.js} +138 -122
- package/index.js +35 -21
- package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
- package/localAutomationCommands-UU66LOWB.js +198 -0
- package/localAutomationRuntime-SW4R42SZ.js +60 -0
- package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
- package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-WRBLXFUZ.js} +136 -119
- package/localRuntimeAuthority-3YDFZD3L.js +44 -0
- package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-CJWJK47G.js} +1 -1
- package/{machineCommands-CL5XK5UC.js → machineCommands-JFYED66N.js} +251 -357
- package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
- package/machineWsRunDispatch-CZUV2FXE.js +227 -0
- package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-HLU72QME.js} +40 -22
- package/mcpLocalManageCommands-OHHU6F5C.js +212 -0
- package/{memberThunks-43B7UYC5.js → memberThunks-FJW4GPM5.js} +102 -22
- package/{memoryCommands-BC6REPQB.js → memoryCommands-2RLHDMU2.js} +25 -34
- package/{models-ZX2BYIMB.js → models-TOXYINNM.js} +3 -2
- package/{offlineMarxistsAgentCommand-XVXUE6G5.js → offlineMarxistsAgentCommand-WZBJBCPZ.js} +16 -22
- package/package.json +3 -3
- package/parityCommands-7EWR34P3.js +613 -0
- package/{projectArchive-OC63TWTD.js → projectArchive-JIVRMXVV.js} +49 -45
- package/{providerPresetApply-NTJUINI6.js → providerPresetApply-IRJ56XIZ.js} +12 -16
- package/{providerRegistry-W45SLUV6.js → providerRegistry-26PAUYH2.js} +3 -13
- package/{read-KG6INYUT.js → read-6YR57D6V.js} +11 -10
- package/{readDocTool-N3GA52JR.js → readDocTool-NKOGL2MW.js} +5 -1
- package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-V26AN2FL.js} +926 -572
- package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
- package/remove-BF33RCTH.js +32 -0
- package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-GWHBWF4W.js} +22 -26
- package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-EKD2EEEA.js} +117 -82
- package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-IALUR5BZ.js} +23 -16
- package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
- package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-RL6FGO7T.js} +16 -17
- package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-XJASBB3K.js} +23 -27
- package/{settingThunks-DVKG4X4S.js → settingThunks-ZT7ZYXXL.js} +170 -497
- package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
- package/{spaceCommands-7QKXKBDQ.js → spaceCommands-65WQHVOI.js} +68 -57
- package/spacePruneCommand-PTMRUWYJ.js +233 -0
- package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
- package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-B5NICHZW.js} +225 -137
- package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-X6DFOIAX.js} +19 -23
- package/{tableCommands-EFA754RE.js → tableCommands-6E77VD73.js} +28 -49
- package/{toolApiClient-N5PYW2R3.js → toolApiClient-GTTWEV6P.js} +15 -4
- package/{tools-2Q2LBDUC.js → tools-UMCPIQX6.js} +73 -63
- package/{tuiRestart-4QDWLHYZ.js → tuiRestart-O7UDLNQU.js} +20 -13
- package/tuiSummaryLlmCaller-7APIUIIV.js +52 -0
- package/{updateCommands-GJGRS6JK.js → updateCommands-DXDIAQFS.js} +12 -7
- package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-HZLKWVKM.js} +57 -58
- package/{usageCommand-WI6SQOPB.js → usageCommand-WYLNBDHB.js} +6 -8
- package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-AEUPY2PE.js} +11 -15
- package/{windowsSelfUpdate-C7LGVWYX.js → windowsSelfUpdate-SXSVXK4X.js} +2 -2
- package/workContext-ZAW6VXT7.js +18 -0
- package/workContextQueryProjection-CACY5VFE.js +23 -0
- package/{workloadLifecycle-DYX5ZMAT.js → workloadLifecycle-P2SJVV3S.js} +1 -1
- package/agentFavoriteCommands-7LOP3HUD.js +0 -186
- package/agentRecordCommands-TPE7NSZ6.js +0 -194
- package/agentRunCommand-DMVGBPLI.js +0 -232
- package/chunk-2MBTWINN.js +0 -89
- package/chunk-523DITKR.js +0 -32
- package/chunk-BUDVRYES.js +0 -2213
- package/chunk-BZMDWGQQ.js +0 -47
- package/chunk-GAHJLSDO.js +0 -107
- package/chunk-GYX6XTAI.js +0 -84
- package/chunk-HNUWUO75.js +0 -93
- package/chunk-HSBHS6KT.js +0 -33401
- package/chunk-KG27JIG4.js +0 -136
- package/chunk-OB4FBZXJ.js +0 -364
- package/chunk-OKH74FML.js +0 -3746
- package/chunk-OLZBQWZU.js +0 -6
- package/chunk-OOV5JN25.js +0 -1317
- package/chunk-OQFOE4SJ.js +0 -405
- package/chunk-PXYBUFDB.js +0 -53
- package/chunk-R3FZHW4Q.js +0 -103
- package/chunk-R3MV2GII.js +0 -106
- package/chunk-SCAC3NM5.js +0 -11751
- package/chunk-SR4FE5VD.js +0 -9
- package/chunk-SYTHYBMI.js +0 -3558
- package/chunk-UKZX3NHN.js +0 -48
- package/chunk-UVLYNWIE.js +0 -74
- package/chunk-VQX5JJNI.js +0 -861
- package/chunk-X4O7FJF5.js +0 -160
- package/chunk-YJPK35HB.js +0 -175
- package/chunk-YNIYE47Z.js +0 -105
- package/chunk-Z4PCXPUE.js +0 -127
- package/chunk-ZR5IVL4N.js +0 -862
- package/chunk-ZTHAJU3O.js +0 -2537
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
- package/cliLocalAgentRecordReader-34UKRBLY.js +0 -104
- package/deleteFile-ECU6FU5C.js +0 -55
- package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
- package/machineWsRunDispatch-TBVOYOAH.js +0 -209
- package/markdownToSlate-PXYAIBVL.js +0 -8
- package/tuiSummaryLlmCaller-HROLGN4F.js +0 -45
- package/webapi-QVV65DQF.js +0 -2487
- package/workContext-Y3ADAPZU.js +0 -14
- package/{chunk-USGHJSGO.js → chunk-GX2MFKF3.js} +3 -3
- package/{chunk-PHREU2KZ.js → chunk-WX266G2C.js} +0 -0
- package/{chunk-DXWGFL2Z.js → chunk-YY7IGJMN.js} +3 -3
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
upsertSSREntity,
|
|
3
3
|
write
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-76B6YUQS.js";
|
|
5
5
|
import {
|
|
6
6
|
getRuntimeServerContext,
|
|
7
7
|
resolveRecordAuthority
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-42JZNSAY.js";
|
|
9
9
|
import {
|
|
10
10
|
TIMEOUT,
|
|
11
|
-
asyncThunkCreator,
|
|
12
|
-
buildCreateSlice,
|
|
13
11
|
noloRequest
|
|
14
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-AMTF6FJD.js";
|
|
15
13
|
import {
|
|
16
14
|
applyAgentSecretMigrationUpdates,
|
|
17
15
|
buildAgentApiKeyCredentialRef,
|
|
18
16
|
migrateAgentSecrets,
|
|
19
17
|
normalizeAgentRuntimeToolPolicy
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GX2MFKF3.js";
|
|
21
19
|
import {
|
|
22
20
|
createFileCredentialBroker
|
|
23
21
|
} from "./chunk-E6A5NHDH.js";
|
|
@@ -31,16 +29,16 @@ import {
|
|
|
31
29
|
createAgentKey,
|
|
32
30
|
createUserKey,
|
|
33
31
|
toTrimmedString
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import {
|
|
36
|
-
API_ENDPOINTS
|
|
37
|
-
} from "./chunk-LCBAMY2M.js";
|
|
32
|
+
} from "./chunk-DLXL4NSL.js";
|
|
38
33
|
import {
|
|
39
34
|
asTrimmedString
|
|
40
35
|
} from "./chunk-3EUW3WEO.js";
|
|
41
36
|
import {
|
|
42
37
|
isRecord
|
|
43
38
|
} from "./chunk-KUG52IAP.js";
|
|
39
|
+
import {
|
|
40
|
+
API_ENDPOINTS
|
|
41
|
+
} from "./chunk-LCBAMY2M.js";
|
|
44
42
|
import {
|
|
45
43
|
asOptionalTrimmedString
|
|
46
44
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -267,11 +265,7 @@ var migrateRawApiKeyForAgent = async (args) => {
|
|
|
267
265
|
}
|
|
268
266
|
return next;
|
|
269
267
|
};
|
|
270
|
-
var createSliceWithThunks = buildCreateSlice({
|
|
271
|
-
creators: { asyncThunk: asyncThunkCreator }
|
|
272
|
-
});
|
|
273
268
|
var pendingCreateIds = /* @__PURE__ */ new WeakMap();
|
|
274
|
-
var initialState = {};
|
|
275
269
|
var normalizeAgentReferences = (references) => {
|
|
276
270
|
if (!Array.isArray(references)) return [];
|
|
277
271
|
return references.map((ref) => ({
|
|
@@ -460,282 +454,326 @@ var processAgentUpdateChanges = (data, userId, previousAgent) => {
|
|
|
460
454
|
}
|
|
461
455
|
return changes;
|
|
462
456
|
};
|
|
463
|
-
var
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
{
|
|
498
|
-
|
|
499
|
-
content: args.content,
|
|
500
|
-
parentMessageId: args.parentMessageId,
|
|
501
|
-
billingDialogKey: args.billingDialogKey
|
|
502
|
-
},
|
|
503
|
-
thunkApi
|
|
504
|
-
);
|
|
505
|
-
return loopContent;
|
|
506
|
-
}),
|
|
507
|
-
/**
|
|
508
|
-
* 聊天轮次流式 Agent 调用
|
|
509
|
-
*/
|
|
510
|
-
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
511
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-UAGFOXNJ.js");
|
|
512
|
-
return streamAgentChatTurnHandler(args, thunkApi);
|
|
513
|
-
}),
|
|
514
|
-
/**
|
|
515
|
-
* 创建 Agent:
|
|
516
|
-
* - 写入用户私有路径
|
|
517
|
-
* - 如 isPublic=true,则同时写入公共路径
|
|
518
|
-
* - 返回完整 Agent 对象(包含 id / meta 字段)
|
|
519
|
-
*/
|
|
520
|
-
createAgent: create.asyncThunk(
|
|
521
|
-
async ({ userId, formData, spaceId, createAttempt }, thunkApi) => {
|
|
522
|
-
const effectiveUserId = asOptionalTrimmedString(userId) ?? "local";
|
|
523
|
-
const processed = processAgentCreateForm(formData, effectiveUserId);
|
|
524
|
-
const now = Date.now();
|
|
525
|
-
const previous = createAttempt && pendingCreateIds.get(createAttempt);
|
|
526
|
-
const pending = previous?.owner === effectiveUserId ? previous : {
|
|
527
|
-
owner: effectiveUserId,
|
|
528
|
-
id: ulid(),
|
|
529
|
-
usesPerAgentRef: false
|
|
530
|
-
};
|
|
531
|
-
pending.usesPerAgentRef ||= formData.credentialSynced === true;
|
|
532
|
-
if (createAttempt) pendingCreateIds.set(createAttempt, pending);
|
|
533
|
-
const { id } = pending;
|
|
534
|
-
const privateKey = createAgentKey.private(effectiveUserId, id);
|
|
535
|
-
const publicKey = createAgentKey.public(id);
|
|
536
|
-
let agent = {
|
|
537
|
-
...processed,
|
|
538
|
-
id,
|
|
539
|
-
type: "agent" /* AGENT */,
|
|
540
|
-
userId: effectiveUserId,
|
|
541
|
-
createdAt: now,
|
|
542
|
-
updatedAt: now,
|
|
543
|
-
dialogCount: 0,
|
|
544
|
-
messageCount: 0,
|
|
545
|
-
tokenCount: 0,
|
|
546
|
-
spaceId
|
|
547
|
-
// 记录 spaceId
|
|
548
|
-
};
|
|
549
|
-
if (effectiveUserId === "local") {
|
|
550
|
-
agent.isPublic = false;
|
|
551
|
-
}
|
|
552
|
-
try {
|
|
553
|
-
const { localFirstLog } = await import("./localFirstLog-OIETGK66.js");
|
|
554
|
-
localFirstLog("agent.create.start", {
|
|
555
|
-
owner: effectiveUserId,
|
|
556
|
-
hasRawApiKey: Boolean(readNonEmptyApiKey(agent.apiKey)),
|
|
557
|
-
hasSpace: Boolean(spaceId)
|
|
558
|
-
});
|
|
559
|
-
} catch {
|
|
560
|
-
}
|
|
561
|
-
const createRawApiKey = readNonEmptyApiKey(agent.apiKey);
|
|
562
|
-
if (createRawApiKey) {
|
|
563
|
-
agent = await migrateRawApiKeyForAgent({
|
|
564
|
-
record: agent,
|
|
565
|
-
agentKey: privateKey,
|
|
566
|
-
apiKey: createRawApiKey,
|
|
567
|
-
apiKeyRef: agent.apiKeyRef,
|
|
568
|
-
credentialRef: pending.usesPerAgentRef ? buildAgentApiKeyCredentialRef(privateKey) : agent.credentialRef
|
|
569
|
-
});
|
|
570
|
-
}
|
|
571
|
-
if (agent.credentialSynced === true) {
|
|
572
|
-
const ctx = getRuntimeServerContext(thunkApi.getState());
|
|
573
|
-
const ref = agent.credentialRef;
|
|
574
|
-
if (!createRawApiKey || !ctx.currentServer || !ctx.currentToken || !ref?.startsWith("api-key:") || !await pushServerSyncedCredential(
|
|
575
|
-
{ currentServer: ctx.currentServer, authToken: ctx.currentToken },
|
|
576
|
-
ref,
|
|
577
|
-
createRawApiKey
|
|
578
|
-
)) {
|
|
579
|
-
throw new Error("agent_credential_sync_failed");
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
await thunkApi.dispatch(
|
|
583
|
-
write({
|
|
584
|
-
data: agent,
|
|
585
|
-
customKey: privateKey,
|
|
586
|
-
userId: effectiveUserId
|
|
587
|
-
})
|
|
588
|
-
).unwrap();
|
|
589
|
-
if (agent.isPublic) {
|
|
590
|
-
const authorName = await readAuthorNameSnapshot(
|
|
591
|
-
thunkApi.extra?.db,
|
|
592
|
-
effectiveUserId
|
|
593
|
-
);
|
|
594
|
-
await thunkApi.dispatch(
|
|
595
|
-
write({
|
|
596
|
-
data: withAuthorNameSnapshot(agent, authorName),
|
|
597
|
-
customKey: publicKey,
|
|
598
|
-
userId: effectiveUserId
|
|
599
|
-
})
|
|
600
|
-
).unwrap();
|
|
601
|
-
}
|
|
602
|
-
try {
|
|
603
|
-
const { localFirstLog } = await import("./localFirstLog-OIETGK66.js");
|
|
604
|
-
localFirstLog("agent.create.done", {
|
|
605
|
-
owner: effectiveUserId,
|
|
606
|
-
key: privateKey,
|
|
607
|
-
hasCredentialRef: Boolean(
|
|
608
|
-
typeof agent.credentialRef === "string" && agent.credentialRef.trim()
|
|
609
|
-
),
|
|
610
|
-
hasRawApiKey: Boolean(readNonEmptyApiKey(agent.apiKey)),
|
|
611
|
-
isPublic: Boolean(agent.isPublic)
|
|
612
|
-
});
|
|
613
|
-
} catch {
|
|
457
|
+
var RejectedAgentOperation = class {
|
|
458
|
+
constructor(payload) {
|
|
459
|
+
this.payload = payload;
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
function serializeOperationError(error) {
|
|
463
|
+
if (!error || typeof error !== "object") return { message: String(error || "Rejected") };
|
|
464
|
+
const serialized = {};
|
|
465
|
+
const record = asRecordOrEmpty(error);
|
|
466
|
+
for (const key of ["name", "message", "stack", "code"]) {
|
|
467
|
+
if (typeof record[key] === "string") serialized[key] = record[key];
|
|
468
|
+
}
|
|
469
|
+
return serialized;
|
|
470
|
+
}
|
|
471
|
+
function agentOperation(name, execute) {
|
|
472
|
+
return (arg, { signal: externalSignal } = {}) => (dispatch, getState, extra) => {
|
|
473
|
+
const thunkApi = { dispatch, getState, extra };
|
|
474
|
+
const controller = new AbortController();
|
|
475
|
+
const { signal } = controller;
|
|
476
|
+
const requestId = ulid();
|
|
477
|
+
const meta = { arg, requestId };
|
|
478
|
+
const type = `agent/${name}`;
|
|
479
|
+
let abortReason;
|
|
480
|
+
const abort = (reason) => {
|
|
481
|
+
abortReason = reason;
|
|
482
|
+
controller.abort();
|
|
483
|
+
};
|
|
484
|
+
const onExternalAbort = () => abort("External signal was aborted");
|
|
485
|
+
if (externalSignal?.aborted) onExternalAbort();
|
|
486
|
+
else externalSignal?.addEventListener("abort", onExternalAbort, { once: true });
|
|
487
|
+
const promise = (async () => {
|
|
488
|
+
let onAbort;
|
|
489
|
+
let action;
|
|
490
|
+
try {
|
|
491
|
+
if (signal.aborted) {
|
|
492
|
+
throw { name: "ConditionError", message: "Aborted due to condition callback returning false." };
|
|
614
493
|
}
|
|
615
|
-
|
|
616
|
-
|
|
494
|
+
const aborted = new Promise((_, reject) => {
|
|
495
|
+
onAbort = () => reject({ name: "AbortError", message: abortReason || "Aborted" });
|
|
496
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
497
|
+
});
|
|
498
|
+
dispatch({ type: `${type}/pending`, payload: void 0, meta: { ...meta, requestStatus: "pending" } });
|
|
499
|
+
const payload = await Promise.race([aborted, execute(arg, {
|
|
500
|
+
...thunkApi,
|
|
501
|
+
signal,
|
|
502
|
+
rejectWithValue: (value) => new RejectedAgentOperation(value)
|
|
503
|
+
}).then((value) => {
|
|
504
|
+
if (value instanceof RejectedAgentOperation) throw value;
|
|
505
|
+
return value;
|
|
506
|
+
})]);
|
|
507
|
+
action = { type: `${type}/fulfilled`, payload, meta: { ...meta, requestStatus: "fulfilled" } };
|
|
508
|
+
} catch (failure) {
|
|
509
|
+
const payload = failure instanceof RejectedAgentOperation ? failure.payload : void 0;
|
|
510
|
+
const error = serializeOperationError(failure instanceof RejectedAgentOperation ? "Rejected" : failure);
|
|
511
|
+
action = { type: `${type}/rejected`, payload, error, meta: {
|
|
512
|
+
...meta,
|
|
513
|
+
requestStatus: "rejected",
|
|
514
|
+
rejectedWithValue: Boolean(payload),
|
|
515
|
+
aborted: error.name === "AbortError",
|
|
516
|
+
condition: error.name === "ConditionError"
|
|
517
|
+
} };
|
|
518
|
+
} finally {
|
|
519
|
+
if (onAbort) signal.removeEventListener("abort", onAbort);
|
|
520
|
+
externalSignal?.removeEventListener("abort", onExternalAbort);
|
|
617
521
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
522
|
+
dispatch(action);
|
|
523
|
+
return action;
|
|
524
|
+
})();
|
|
525
|
+
return Object.assign(promise, {
|
|
526
|
+
arg,
|
|
527
|
+
requestId,
|
|
528
|
+
abort,
|
|
529
|
+
unwrap: () => promise.then((action) => {
|
|
530
|
+
if (action.meta.requestStatus === "fulfilled") return action.payload;
|
|
531
|
+
if (action.meta.rejectedWithValue) throw action.payload;
|
|
532
|
+
throw action.error;
|
|
533
|
+
})
|
|
534
|
+
});
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
var runLlm = agentOperation("runLlm", async (args, thunkApi) => {
|
|
538
|
+
const overrides = {};
|
|
539
|
+
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
540
|
+
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
541
|
+
const { _executeModel } = await import("./_executeModel-EO6JFCOF.js");
|
|
542
|
+
return _executeModel(
|
|
543
|
+
{
|
|
544
|
+
isStreaming: args.isStreaming ?? false,
|
|
545
|
+
withAgentContext: false,
|
|
546
|
+
withChatHistory: false,
|
|
547
|
+
agentConfigOverrides: Object.keys(overrides).length ? overrides : void 0
|
|
548
|
+
},
|
|
549
|
+
args,
|
|
550
|
+
thunkApi
|
|
551
|
+
);
|
|
552
|
+
});
|
|
553
|
+
var runAgent = agentOperation("runAgent", async (args, thunkApi) => {
|
|
554
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-EKD2EEEA.js");
|
|
555
|
+
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
556
|
+
{
|
|
557
|
+
agentKey: args.agentKey,
|
|
558
|
+
content: args.content,
|
|
559
|
+
parentMessageId: args.parentMessageId,
|
|
560
|
+
billingDialogKey: args.billingDialogKey
|
|
561
|
+
},
|
|
562
|
+
thunkApi
|
|
563
|
+
);
|
|
564
|
+
return loopContent;
|
|
565
|
+
});
|
|
566
|
+
var streamAgentChatTurn = agentOperation("streamAgentChatTurn", async (args, thunkApi) => {
|
|
567
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-B5NICHZW.js");
|
|
568
|
+
return streamAgentChatTurnHandler(args, thunkApi);
|
|
569
|
+
});
|
|
570
|
+
var createAgent = agentOperation(
|
|
571
|
+
"createAgent",
|
|
572
|
+
async ({ userId, formData, spaceId, createAttempt }, thunkApi) => {
|
|
573
|
+
const effectiveUserId = asOptionalTrimmedString(userId) ?? "local";
|
|
574
|
+
const processed = processAgentCreateForm(formData, effectiveUserId);
|
|
575
|
+
const now = Date.now();
|
|
576
|
+
const previous = createAttempt && pendingCreateIds.get(createAttempt);
|
|
577
|
+
const pending = previous?.owner === effectiveUserId ? previous : {
|
|
578
|
+
owner: effectiveUserId,
|
|
579
|
+
id: ulid(),
|
|
580
|
+
usesPerAgentRef: false
|
|
581
|
+
};
|
|
582
|
+
pending.usesPerAgentRef ||= formData.credentialSynced === true;
|
|
583
|
+
if (createAttempt) pendingCreateIds.set(createAttempt, pending);
|
|
584
|
+
const { id } = pending;
|
|
585
|
+
const privateKey = createAgentKey.private(effectiveUserId, id);
|
|
586
|
+
const publicKey = createAgentKey.public(id);
|
|
587
|
+
let agent = {
|
|
588
|
+
...processed,
|
|
589
|
+
id,
|
|
590
|
+
type: "agent" /* AGENT */,
|
|
591
|
+
userId: effectiveUserId,
|
|
592
|
+
createdAt: now,
|
|
593
|
+
updatedAt: now,
|
|
594
|
+
dialogCount: 0,
|
|
595
|
+
messageCount: 0,
|
|
596
|
+
tokenCount: 0,
|
|
597
|
+
spaceId
|
|
598
|
+
// 记录 spaceId
|
|
599
|
+
};
|
|
600
|
+
if (effectiveUserId === "local") {
|
|
601
|
+
agent.isPublic = false;
|
|
602
|
+
}
|
|
603
|
+
try {
|
|
604
|
+
const { localFirstLog } = await import("./localFirstLog-OIETGK66.js");
|
|
605
|
+
localFirstLog("agent.create.start", {
|
|
606
|
+
owner: effectiveUserId,
|
|
607
|
+
hasRawApiKey: Boolean(readNonEmptyApiKey(agent.apiKey)),
|
|
608
|
+
hasSpace: Boolean(spaceId)
|
|
609
|
+
});
|
|
610
|
+
} catch {
|
|
611
|
+
}
|
|
612
|
+
const createRawApiKey = readNonEmptyApiKey(agent.apiKey);
|
|
613
|
+
if (createRawApiKey) {
|
|
614
|
+
agent = await migrateRawApiKeyForAgent({
|
|
615
|
+
record: agent,
|
|
616
|
+
agentKey: privateKey,
|
|
617
|
+
apiKey: createRawApiKey,
|
|
618
|
+
apiKeyRef: agent.apiKeyRef,
|
|
619
|
+
credentialRef: pending.usesPerAgentRef ? buildAgentApiKeyCredentialRef(privateKey) : agent.credentialRef
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
if (agent.credentialSynced === true) {
|
|
623
|
+
const ctx = getRuntimeServerContext(thunkApi.getState());
|
|
624
|
+
const ref = agent.credentialRef;
|
|
625
|
+
if (!createRawApiKey || !ctx.currentServer || !ctx.currentToken || !ref?.startsWith("api-key:") || !await pushServerSyncedCredential(
|
|
626
|
+
{ currentServer: ctx.currentServer, authToken: ctx.currentToken },
|
|
627
|
+
ref,
|
|
628
|
+
createRawApiKey
|
|
629
|
+
)) {
|
|
630
|
+
throw new Error("agent_credential_sync_failed");
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
await thunkApi.dispatch(
|
|
634
|
+
write({
|
|
635
|
+
data: agent,
|
|
636
|
+
customKey: privateKey,
|
|
637
|
+
userId: effectiveUserId
|
|
638
|
+
})
|
|
639
|
+
).unwrap();
|
|
640
|
+
if (agent.isPublic) {
|
|
641
|
+
const authorName = await readAuthorNameSnapshot(
|
|
642
|
+
thunkApi.extra?.db,
|
|
643
|
+
effectiveUserId
|
|
644
|
+
);
|
|
645
|
+
await thunkApi.dispatch(
|
|
646
|
+
write({
|
|
647
|
+
data: withAuthorNameSnapshot(agent, authorName),
|
|
648
|
+
customKey: publicKey,
|
|
649
|
+
userId: effectiveUserId
|
|
650
|
+
})
|
|
651
|
+
).unwrap();
|
|
652
|
+
}
|
|
653
|
+
try {
|
|
654
|
+
const { localFirstLog } = await import("./localFirstLog-OIETGK66.js");
|
|
655
|
+
localFirstLog("agent.create.done", {
|
|
656
|
+
owner: effectiveUserId,
|
|
657
|
+
key: privateKey,
|
|
658
|
+
hasCredentialRef: Boolean(
|
|
659
|
+
typeof agent.credentialRef === "string" && agent.credentialRef.trim()
|
|
660
|
+
),
|
|
661
|
+
hasRawApiKey: Boolean(readNonEmptyApiKey(agent.apiKey)),
|
|
662
|
+
isPublic: Boolean(agent.isPublic)
|
|
663
|
+
});
|
|
664
|
+
} catch {
|
|
665
|
+
}
|
|
666
|
+
if (createAttempt) pendingCreateIds.delete(createAttempt);
|
|
667
|
+
return agent;
|
|
668
|
+
}
|
|
669
|
+
);
|
|
670
|
+
var updateAgent = agentOperation(
|
|
671
|
+
"updateAgent",
|
|
672
|
+
async ({ userId, agentId, formData, previousAgent }, thunkApi) => {
|
|
673
|
+
const effectiveUserId = asOptionalTrimmedString(userId) ?? "local";
|
|
674
|
+
const normalizedAgentId = (() => {
|
|
675
|
+
const raw = agentId.trim();
|
|
676
|
+
if (raw.startsWith("agent-")) {
|
|
677
|
+
const parts = raw.split("-");
|
|
678
|
+
if (parts.length >= 3) return parts.slice(2).join("-");
|
|
679
|
+
}
|
|
680
|
+
return raw;
|
|
681
|
+
})();
|
|
682
|
+
const privateKey = createAgentKey.private(effectiveUserId, normalizedAgentId);
|
|
683
|
+
const publicKey = createAgentKey.public(normalizedAgentId);
|
|
684
|
+
let changes = processAgentUpdateChanges(formData || {}, effectiveUserId, previousAgent);
|
|
685
|
+
const updateRawApiKey = readNonEmptyApiKey(changes.apiKey);
|
|
686
|
+
if (updateRawApiKey) {
|
|
687
|
+
const formAny = formData || {};
|
|
688
|
+
const migrated = await migrateRawApiKeyForAgent({
|
|
689
|
+
record: { ...changes },
|
|
690
|
+
agentKey: privateKey,
|
|
691
|
+
apiKey: updateRawApiKey,
|
|
692
|
+
apiKeyRef: formAny.apiKeyRef ?? previousAgent?.apiKeyRef ?? changes.apiKeyRef,
|
|
693
|
+
credentialRef: formAny.credentialRef ?? previousAgent?.credentialRef ?? changes.credentialRef
|
|
694
|
+
});
|
|
695
|
+
changes = migrated;
|
|
696
|
+
if (!readNonEmptyApiKey(changes.apiKey)) {
|
|
697
|
+
changes.apiKey = null;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
try {
|
|
701
|
+
const state = thunkApi.getState();
|
|
702
|
+
const context = getRuntimeServerContext(state);
|
|
703
|
+
const { currentServer } = context;
|
|
704
|
+
const db = thunkApi.extra?.db;
|
|
705
|
+
const localOnly = effectiveUserId === "local";
|
|
706
|
+
const authority = resolveRecordAuthority({
|
|
707
|
+
dbKey: privateKey,
|
|
708
|
+
currentServer,
|
|
709
|
+
currentUserId: effectiveUserId,
|
|
710
|
+
userAuthorityRegistry: context.userAuthorityRegistry
|
|
711
|
+
});
|
|
712
|
+
const server = authority.authorityServer ?? currentServer ?? "";
|
|
713
|
+
if (!server && !localOnly) throw new AgentUpdateError({
|
|
714
|
+
kind: "network",
|
|
715
|
+
code: "missing_server",
|
|
716
|
+
message: "\u672A\u8FDE\u63A5\u670D\u52A1\u7AEF\uFF0C\u672A\u786E\u8BA4\u4FDD\u5B58\u7ED3\u679C"
|
|
717
|
+
});
|
|
718
|
+
const saved = await updateAgentRecord({ server, state, dbKey: privateKey, changes, localDb: db });
|
|
719
|
+
const entity = { ...saved, dbKey: privateKey };
|
|
720
|
+
thunkApi.dispatch(upsertSSREntity(entity));
|
|
721
|
+
try {
|
|
722
|
+
if (db && !localOnly) await db.put(privateKey, saved);
|
|
723
|
+
} catch (error) {
|
|
724
|
+
throw new AgentUpdateError({
|
|
725
|
+
...agentUpdateFailure(error),
|
|
726
|
+
kind: "conflict",
|
|
727
|
+
code: "local_cache_failed",
|
|
728
|
+
privateSaved: true,
|
|
729
|
+
agent: saved,
|
|
730
|
+
message: "\u79C1\u6709\u8BB0\u5F55\u5DF2\u4FDD\u5B58\uFF0C\u672C\u5730\u7F13\u5B58\u66F4\u65B0\u5931\u8D25\uFF1B\u8BF7\u52FF\u91CD\u65B0\u63D0\u4EA4\u6574\u6B21\u7F16\u8F91"
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
try {
|
|
734
|
+
if (!localOnly && saved.isPublic) {
|
|
735
|
+
const authorName = await readAuthorNameSnapshot(db, effectiveUserId);
|
|
736
|
+
const projection = withAuthorNameSnapshot({
|
|
737
|
+
...saved,
|
|
738
|
+
id: normalizedAgentId,
|
|
739
|
+
type: saved.type || "agent" /* AGENT */,
|
|
740
|
+
userId: effectiveUserId
|
|
741
|
+
}, authorName);
|
|
742
|
+
await agentRequest(server, state, "write", "POST", {
|
|
743
|
+
data: projection,
|
|
744
|
+
customKey: publicKey,
|
|
745
|
+
userId: effectiveUserId
|
|
666
746
|
});
|
|
667
|
-
|
|
668
|
-
const entity = { ...saved, dbKey: privateKey };
|
|
669
|
-
thunkApi.dispatch(upsertSSREntity(entity));
|
|
670
|
-
try {
|
|
671
|
-
if (db && !localOnly) await db.put(privateKey, saved);
|
|
672
|
-
} catch (error) {
|
|
673
|
-
throw new AgentUpdateError({
|
|
674
|
-
...agentUpdateFailure(error),
|
|
675
|
-
kind: "conflict",
|
|
676
|
-
code: "local_cache_failed",
|
|
677
|
-
privateSaved: true,
|
|
678
|
-
agent: saved,
|
|
679
|
-
message: "\u79C1\u6709\u8BB0\u5F55\u5DF2\u4FDD\u5B58\uFF0C\u672C\u5730\u7F13\u5B58\u66F4\u65B0\u5931\u8D25\uFF1B\u8BF7\u52FF\u91CD\u65B0\u63D0\u4EA4\u6574\u6B21\u7F16\u8F91"
|
|
680
|
-
});
|
|
681
|
-
}
|
|
747
|
+
} else if (!localOnly && Object.hasOwn(changes, "isPublic") && changes.isPublic === false) {
|
|
682
748
|
try {
|
|
683
|
-
|
|
684
|
-
const authorName = await readAuthorNameSnapshot(db, effectiveUserId);
|
|
685
|
-
const projection = withAuthorNameSnapshot({
|
|
686
|
-
...saved,
|
|
687
|
-
id: normalizedAgentId,
|
|
688
|
-
type: saved.type || "agent" /* AGENT */,
|
|
689
|
-
userId: effectiveUserId
|
|
690
|
-
}, authorName);
|
|
691
|
-
await agentRequest(server, state, "write", "POST", {
|
|
692
|
-
data: projection,
|
|
693
|
-
customKey: publicKey,
|
|
694
|
-
userId: effectiveUserId
|
|
695
|
-
});
|
|
696
|
-
} else if (!localOnly && Object.hasOwn(changes, "isPublic") && changes.isPublic === false) {
|
|
697
|
-
try {
|
|
698
|
-
await agentRequest(server, state, `delete/${encodeURIComponent(publicKey)}`, "DELETE");
|
|
699
|
-
} catch (error) {
|
|
700
|
-
if (!(error instanceof AgentUpdateError && error.status === 404)) throw error;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
749
|
+
await agentRequest(server, state, `delete/${encodeURIComponent(publicKey)}`, "DELETE");
|
|
703
750
|
} catch (error) {
|
|
704
|
-
|
|
705
|
-
...agentUpdateFailure(error),
|
|
706
|
-
code: "public_sync_failed",
|
|
707
|
-
privateSaved: true,
|
|
708
|
-
agent: saved,
|
|
709
|
-
message: "\u79C1\u6709\u8BB0\u5F55\u5DF2\u4FDD\u5B58\uFF0C\u516C\u5171\u526F\u672C\u540C\u6B65\u5931\u8D25\uFF1B\u8BF7\u52FF\u91CD\u65B0\u63D0\u4EA4\u6574\u6B21\u7F16\u8F91"
|
|
710
|
-
});
|
|
751
|
+
if (!(error instanceof AgentUpdateError && error.status === 404)) throw error;
|
|
711
752
|
}
|
|
712
|
-
return saved;
|
|
713
|
-
} catch (error) {
|
|
714
|
-
return thunkApi.rejectWithValue(agentUpdateFailure(error));
|
|
715
753
|
}
|
|
754
|
+
} catch (error) {
|
|
755
|
+
throw new AgentUpdateError({
|
|
756
|
+
...agentUpdateFailure(error),
|
|
757
|
+
code: "public_sync_failed",
|
|
758
|
+
privateSaved: true,
|
|
759
|
+
agent: saved,
|
|
760
|
+
message: "\u79C1\u6709\u8BB0\u5F55\u5DF2\u4FDD\u5B58\uFF0C\u516C\u5171\u526F\u672C\u540C\u6B65\u5931\u8D25\uFF1B\u8BF7\u52FF\u91CD\u65B0\u63D0\u4EA4\u6574\u6B21\u7F16\u8F91"
|
|
761
|
+
});
|
|
716
762
|
}
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
streamAgentChatTurn,
|
|
724
|
-
createAgent,
|
|
725
|
-
updateAgent
|
|
726
|
-
} = slice.actions;
|
|
727
|
-
var agentReducer = slice.reducer;
|
|
728
|
-
var agentSlice_default = agentReducer;
|
|
763
|
+
return saved;
|
|
764
|
+
} catch (error) {
|
|
765
|
+
return thunkApi.rejectWithValue(agentUpdateFailure(error));
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
);
|
|
729
769
|
|
|
730
770
|
export {
|
|
731
771
|
fetchServerSyncedCredential,
|
|
732
772
|
deleteServerSyncedCredential,
|
|
733
773
|
setAgentCredentialBrokerFactoryForTests,
|
|
734
|
-
slice,
|
|
735
774
|
runLlm,
|
|
736
775
|
runAgent,
|
|
737
776
|
streamAgentChatTurn,
|
|
738
777
|
createAgent,
|
|
739
|
-
updateAgent
|
|
740
|
-
agentSlice_default
|
|
778
|
+
updateAgent
|
|
741
779
|
};
|