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.
- package/README.md +1 -1
- package/{_executeModel-MTM4BJK3.js → _executeModel-PODMRXJJ.js} +97 -83
- package/accountResolver-NGICIMEE.js +1 -1
- package/{action-C6IQAKN4.js → action-NJTYNXXR.js} +12 -10
- package/{addContentAction-53364YDW.js → addContentAction-RUPXLROG.js} +14 -13
- package/{addDialogAgentAction-U5DD5EN5.js → addDialogAgentAction-57EJ2UBC.js} +20 -24
- package/{agentDeleteCommand-53NN3VSK.js → agentDeleteCommand-DRFCOTYP.js} +185 -147
- package/{agentEmailCommands-KOGGIT6I.js → agentEmailCommands-FHENHUBF.js} +143 -127
- package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-BMVKNYIY.js} +9 -6
- package/{agentListCommands-62UYUQDI.js → agentListCommands-W66W5K3V.js} +88 -69
- package/{agentMachineCommands-W6TNJXEA.js → agentMachineCommands-C3BUBCXU.js} +69 -60
- package/{agentProviderCommands-QLTABYR7.js → agentProviderCommands-VIWKP7DM.js} +11 -8
- package/{agentPullCommand-2EYJ5ENC.js → agentPullCommand-5SNSXOY7.js} +10 -7
- package/agentRecordCommands-DYMHWTID.js +210 -0
- package/agentRun-QVFG3CI4.js +250 -0
- package/agentRunCommand-YV4V5HSL.js +248 -0
- package/{agentRunControl-LXMADX3N.js → agentRunControl-RGBHKPKJ.js} +19 -12
- package/{agentRuntimeLocal-YGNJMQW3.js → agentRuntimeLocal-LVEMOYS2.js} +62 -49
- package/{agentSlice-3HHYUQLM.js → agentSlice-OJCM7OUX.js} +15 -18
- package/appConfigCommands-ZUXQLE7L.js +417 -0
- package/{appDeleteCommands-5COJ6CSG.js → appDeleteCommands-L5UKUMXY.js} +68 -58
- package/{appDeployCommands-3JPAT3XO.js → appDeployCommands-KX2BRQUW.js} +74 -59
- package/{appDeployStatusCommands-RHZKF3G4.js → appDeployStatusCommands-7LHRSWW7.js} +68 -58
- package/{appGetCommands-73DXOAQW.js → appGetCommands-F7SDFCUK.js} +74 -58
- package/{appListCommands-HD5LOQ3G.js → appListCommands-U4NJKSMZ.js} +74 -58
- package/appMigrateCommands-JAPOLYSW.js +230 -0
- package/appSourceCommands-TLXPWXUH.js +279 -0
- package/authCommand-AU3GZBZ2.js +65 -0
- package/{authCommands-T5FODCEG.js → authCommands-JKBWMUQ4.js} +20 -17
- package/{builtinSkillRegistry-EDHD2UHU.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
- package/{chromeOpsCommands-3SSTDFRF.js → chromeOpsCommands-F47WYQWF.js} +68 -18
- package/{chunk-5YS6QHGT.js → chunk-2FGFY72B.js} +9 -9
- 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-7OVOZRZF.js → chunk-3B7OTHDW.js} +23 -379
- package/{chunk-DNNPARJK.js → chunk-3QMN3T6L.js} +50 -37
- package/{chunk-DMPZMYH4.js → chunk-3R4AYHJR.js} +13 -1
- package/{chunk-XNNBXUEM.js → chunk-3TII7WCF.js} +5 -5
- 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-KZ4A7EIV.js → chunk-56OAS5RZ.js} +1 -1
- package/{chunk-KQHEGELM.js → chunk-63G7JWEA.js} +16 -6
- package/{chunk-4EACJPZI.js → chunk-6BBXJGIQ.js} +51 -42
- package/chunk-72VWN4VK.js +51 -0
- package/chunk-7LR2IFUH.js +100 -0
- package/{chunk-S73EPYNC.js → chunk-7LS5ATRP.js} +20 -6
- package/{chunk-XPETQ4MR.js → chunk-7X4BFUJV.js} +24 -10
- package/{chunk-KHYSFS3W.js → chunk-A454UXB6.js} +148 -73
- package/chunk-A4O76A6V.js +432 -0
- package/chunk-AMNZPQCY.js +635 -0
- package/{chunk-4MXYCQBS.js → chunk-AQNWWJLH.js} +2 -56
- package/{chunk-LHCGKAFO.js → chunk-BKP325XS.js} +184 -112
- package/{chunk-PENRYZ4D.js → chunk-BPB3T5EU.js} +4 -7
- package/{chunk-U6QNVOR5.js → chunk-BUGLH2A7.js} +130 -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-Y2TCTNUD.js → chunk-CK2LMTYO.js} +4 -4
- package/{chunk-AIFQKNPP.js → chunk-CL33RFD7.js} +1 -1
- package/{chunk-57V4PADY.js → chunk-CNYPQYXT.js} +781 -449
- package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
- package/chunk-D3ONA3FP.js +762 -0
- package/{chunk-PIVTQRX6.js → chunk-DDKA6V6X.js} +111 -12
- 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-DBJODIZ6.js → chunk-EQOWWSNQ.js} +19 -27
- package/chunk-ER6NTALN.js +34 -0
- package/{chunk-L4XST72F.js → chunk-ERCSHBUD.js} +16027 -17392
- 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-6XIE5ZGI.js → chunk-FGFJUFPS.js} +5 -6
- package/chunk-FI4DPLR7.js +902 -0
- package/{chunk-HDKMVYNJ.js → chunk-FNLT7NKG.js} +7 -11
- package/{chunk-JCQ3WCQ3.js → chunk-FOC4TORM.js} +69 -3
- package/chunk-FP46RAJQ.js +58 -0
- package/{chunk-JPXACKSW.js → chunk-G22P2J7O.js} +30 -81
- package/{chunk-7WHCIA5V.js → chunk-G5IAIGGD.js} +3 -8
- package/{chunk-FZENZCIA.js → chunk-GEC4CHS2.js} +19 -12
- package/chunk-GF4LYNNZ.js +25 -0
- package/{chunk-IYLUK67R.js → chunk-GH6SS2DZ.js} +25 -8
- package/chunk-HAZ6UVH4.js +368 -0
- package/{chunk-OKAXQFON.js → chunk-HB4J5HA6.js} +4 -4
- package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
- package/chunk-HJTI7RZV.js +94 -0
- package/{chunk-HQUGB2HM.js → chunk-HMFKYZKP.js} +62 -50
- package/{chunk-Q2MPKE4B.js → chunk-HVRG27HI.js} +76 -26
- package/{chunk-46FETNLF.js → chunk-IN4B6Z2D.js} +7 -6
- package/chunk-IV6VUVLJ.js +88 -0
- package/{chunk-LLUBUHNT.js → chunk-IWWJSSST.js} +5 -9
- package/{chunk-7BIJFGKS.js → chunk-J22PFCQN.js} +106 -52
- package/chunk-J42X32PV.js +472 -0
- package/{chunk-LCBAMY2M.js → chunk-JKVOKKMQ.js} +0 -7
- package/{chunk-KT7S7ANZ.js → chunk-JPYOHIHX.js} +9 -9
- package/{chunk-R7XWZDOH.js → chunk-JUMQJSQF.js} +1423 -282
- package/{chunk-KVMLM5VD.js → chunk-KAHYBAEN.js} +211 -472
- package/{chunk-KLMBM6P6.js → chunk-KALCFXQO.js} +2454 -1115
- package/chunk-KDDXC2IH.js +148 -0
- package/chunk-KGKTN2NX.js +25 -0
- package/chunk-KGWE224L.js +246 -0
- package/{chunk-OYUMJMC5.js → chunk-KSV6T4AH.js} +6 -1
- package/{chunk-P27E22MA.js → chunk-L43DGEPZ.js} +1 -1
- package/{chunk-5BIDJVNX.js → chunk-L45P4JTE.js} +180 -31
- package/chunk-LHCIIUCX.js +222 -0
- package/{chunk-CBIGMWMI.js → chunk-LHJB4BXJ.js} +1 -1
- package/{chunk-TRRXYFTR.js → chunk-LOFRSJX2.js} +1 -0
- package/{chunk-SQL7YNED.js → chunk-LPXBBC32.js} +71 -5
- package/{chunk-BIDSIRTS.js → chunk-LTCZOOAM.js} +11 -17
- package/chunk-LUTSMSIL.js +425 -0
- package/chunk-LXP53WGF.js +168 -0
- package/{chunk-2CT2J3O6.js → chunk-M7VNNPVX.js} +2493 -4055
- package/chunk-MDAYRIP7.js +1889 -0
- package/{chunk-6B2OBX5B.js → chunk-MMXHIHJZ.js} +15 -47
- package/{chunk-HPDLPEUG.js → chunk-MPWQI36J.js} +267 -234
- package/chunk-MRACVEPZ.js +7 -0
- package/{chunk-ZYPXOQS2.js → chunk-MSFKHPA6.js} +1 -1
- package/chunk-NHLLXINQ.js +8 -0
- package/{chunk-QXTEEEIN.js → chunk-NJCTPWJU.js} +8 -8
- package/chunk-NLS7F5DW.js +1697 -0
- package/{chunk-FP37ELBT.js → chunk-NTBTVKKB.js} +17 -25
- package/{chunk-JLZJL3WC.js → chunk-O77F26YB.js} +370 -39
- package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
- package/{chunk-YN23INFZ.js → chunk-OIOMBPCA.js} +23 -2
- package/{chunk-CJOOF4L5.js → chunk-OSZNERNW.js} +17 -14
- package/{chunk-JZO7KUF3.js → chunk-P4I55ASV.js} +313 -275
- package/{chunk-2C5VN7NH.js → chunk-P4XAHM4B.js} +1 -1
- package/chunk-PL5RKESU.js +40 -0
- package/chunk-Q5FJJ6XI.js +103 -0
- package/{chunk-WS36XPJD.js → chunk-Q5IXZF3S.js} +82 -6
- package/{createAgentAutomationAction-GRZ6XY7Q.js → chunk-QKM55LP2.js} +3 -160
- package/{chunk-WSLL7VV4.js → chunk-QXWXRBOL.js} +9 -9
- package/{chunk-MXA54TQM.js → chunk-QZYQ3Y3G.js} +1 -1
- package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
- 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-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
- package/{chunk-J7JRCOIW.js → chunk-RWXHGPWJ.js} +1 -1
- package/{chunk-J55F3IEZ.js → chunk-SARJZIGR.js} +1 -1
- package/chunk-SJFL32RD.js +356 -0
- package/{chunk-6SOWMEAY.js → chunk-SR57FDTX.js} +2 -258
- package/{chunk-MPGR4ZNR.js → chunk-SRVLHMES.js} +46 -42
- package/{chunk-CEKRIR22.js → chunk-SU4NCTW4.js} +1 -1
- package/{chunk-RD3QLZQV.js → chunk-SWJRX4M5.js} +324 -2
- package/{chunk-R3TUHCSJ.js → chunk-T3Y2NA4H.js} +8 -3
- package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
- package/{chunk-KWNVPY6M.js → chunk-TJXO66M2.js} +8 -5
- package/{chunk-QIGQFON2.js → chunk-TXMFSGRY.js} +1 -1
- package/{chunk-ADYWV732.js → chunk-U5PSCTMR.js} +264 -177
- package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
- package/{chunk-QGFLVQ6E.js → chunk-UBOTXA3Z.js} +4 -14
- package/{chunk-6YX2RAQN.js → chunk-UEZL3RBG.js} +89 -164
- package/{chunk-NCFKHYDM.js → chunk-UJL23HBL.js} +774 -119
- package/chunk-ULPU4C43.js +1710 -0
- package/{chunk-UA3QTA2S.js → chunk-VC3MAT33.js} +4442 -2570
- package/{chunk-VNHZJEQN.js → chunk-VCESLFF4.js} +3 -3
- package/chunk-VOO3YQQP.js +17157 -0
- package/{chunk-Y2GWUBNS.js → chunk-VZDSNDUD.js} +279 -149
- package/{chunk-6BMTKYAO.js → chunk-W2Z5E2R7.js} +126 -698
- package/{chunk-4ZCTKB27.js → chunk-W5GKF5ZW.js} +1 -0
- package/chunk-WEEB2JKA.js +443 -0
- package/{chunk-NUHQO3RB.js → chunk-WIVVNJUS.js} +1 -1
- package/chunk-WMBJDXMY.js +408 -0
- package/chunk-WSQLCWLQ.js +201 -0
- package/{chunk-OOVOAG4Q.js → chunk-WY6DMHMG.js} +1 -1
- package/{chunk-6K32PBRY.js → chunk-XJW6SLBZ.js} +3 -3
- package/{chunk-MNFUKRRU.js → chunk-XKNDVHF5.js} +7 -7
- package/{chunk-MHKPUGPD.js → chunk-XREMPMNK.js} +20 -4
- package/chunk-XT6C2QZW.js +46 -0
- package/chunk-XUDXQT7R.js +790 -0
- package/{chunk-ZEZC7IIM.js → chunk-YFSM2366.js} +35 -35
- package/{chunk-RIWKZT7E.js → chunk-YRPIUIEQ.js} +11 -9
- package/{chunk-U35UUM5K.js → chunk-YVOUSIIA.js} +1 -1
- package/{chunk-6VEO7Z3Y.js → chunk-Z27AH6A5.js} +6 -6
- package/chunk-Z3KTXWWB.js +76 -0
- package/{chunk-UWWOWTW2.js → chunk-Z7EP5HDL.js} +1 -1
- package/{chunk-YFEK7ACQ.js → chunk-ZB2E724W.js} +4 -4
- package/{chunk-YLAHYLDQ.js → chunk-ZC3CMUKU.js} +2 -89
- package/{chunk-5P3PPQVP.js → chunk-ZQAADXSF.js} +1 -1
- package/{cliAgentConfigHelpers-BXHQ3PXP.js → cliAgentConfigHelpers-BJJEXHSZ.js} +20 -14
- package/{cliAuthorityBrokerClient-TFNXJLXL.js → cliAuthorityBrokerClient-3SKOA7OZ.js} +3 -1
- package/cliAuthorityBrokerProcess-VIJEKQSX.js +34 -0
- package/{cliEnvHelpers-CNMP3RDX.js → cliEnvHelpers-NDMKN4X2.js} +6 -3
- package/{cliExecutor-K6FDZTQ2.js → cliExecutor-Z62UBJ5S.js} +12 -6
- package/cliLocalAgentRecordReader-KCZS2MZU.js +113 -0
- package/cloudAutomationCommands-2WQUGQSW.js +310 -0
- package/{commandRegistry-IFYQLPGM.js → commandRegistry-C64JBZJ3.js} +288 -121
- package/{contentThunks-QCFCD2X3.js → contentThunks-G3HEIRXC.js} +45 -43
- package/{cooldownCommands-WDOI5VD7.js → cooldownCommands-FPAFS7XG.js} +1 -1
- package/createAgentAutomationAction-DSBL3X3A.js +172 -0
- package/createDialogAction-OHFUHC53.js +86 -0
- package/{createPageAction-QCVBMP4C.js → createPageAction-E6JZSZLU.js} +49 -45
- package/{db-VR74ADGC.js → db-KTQ3LL2Q.js} +3 -3
- package/{dbSlice-RWPSVHBC.js → dbSlice-U3GPLEL3.js} +21 -16
- package/deleteDbKey-DRXKWJX5.js +86 -0
- package/{dialogCommands-4IEQUALS.js → dialogCommands-4EX2OTIC.js} +80 -66
- package/{dialogMessageRecord-OAV77LT7.js → dialogMessageRecord-2HJTEXQX.js} +1 -1
- package/dialogNotifyCommand-4SCE2Z2R.js +44 -0
- package/dialogPortabilityCommands-ZSFFHRX4.js +3036 -0
- package/{dialogSlice-XFYID6KE.js → dialogSlice-PRZCIJCH.js} +43 -42
- package/{dialogTraceCommand-Y67NRFCV.js → dialogTraceCommand-RKB76OVX.js} +84 -70
- package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-BP7HMRYP.js} +7 -4
- package/{docCreateCommands-QLRIWRQE.js → docCreateCommands-JGPNGIZ7.js} +68 -59
- package/{docDeleteCommands-XPRYA532.js → docDeleteCommands-XRJTNRDH.js} +68 -59
- package/{docReadCommands-EXQI7ETH.js → docReadCommands-6GFO4ARS.js} +67 -58
- package/{docStore-MWFUKZL2.js → docStore-QRLIWFTU.js} +16 -17
- package/{docUpdateCommands-EFBFQV77.js → docUpdateCommands-W2GXMUXW.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-DHGWURJZ.js} +265 -119
- package/{hostCredentialCreate-26S6DDJ5.js → hostCredentialCreate-FPUZ7RMI.js} +138 -122
- package/index.js +36 -22
- package/{keys-RWF7UCB4.js → keys-FXEGMKSG.js} +2 -2
- package/localAutomationCommands-ZMU22RQJ.js +198 -0
- package/localAutomationRuntime-MU5FGJ3V.js +60 -0
- package/{localDialogRead-BJJT3TF5.js → localDialogRead-W2EVXISA.js} +2 -2
- package/{localRuntimeAdapter-VREWZWPC.js → localRuntimeAdapter-YBXQBV4G.js} +136 -119
- package/localRuntimeAuthority-LDXMEDO5.js +44 -0
- package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-6TQZDLNU.js} +1 -1
- package/{machineCommands-CL5XK5UC.js → machineCommands-57RTUYRV.js} +251 -357
- package/{machineInfo-LWHTEBHJ.js → machineInfo-BJIU3WQ5.js} +4 -2
- package/machineWsRunDispatch-VBKV3FFE.js +227 -0
- package/{mcpLocalAuthorizeCommand-RBXJDE6J.js → mcpLocalAuthorizeCommand-J76SOJVZ.js} +40 -22
- package/mcpLocalManageCommands-USETIMHB.js +212 -0
- package/{memberThunks-43B7UYC5.js → memberThunks-7UERUEMI.js} +102 -22
- package/{memoryCommands-BC6REPQB.js → memoryCommands-N7NHEE55.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-LYDLWSLK.js +613 -0
- package/{projectArchive-OC63TWTD.js → projectArchive-KCNQDVWJ.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-SPSQ6NLR.js} +11 -10
- package/{readDocTool-N3GA52JR.js → readDocTool-ENUL2GNL.js} +5 -1
- package/{readlineWorkspace-2NO6D6IZ.js → readlineWorkspace-MKS7TAEF.js} +927 -573
- package/{rememberExplicit-CPAPONSI.js → rememberExplicit-7KX4HXQC.js} +4 -4
- package/remove-TNNDO635.js +32 -0
- package/{removeDialogAgentAction-EEVSOQOJ.js → removeDialogAgentAction-POPUZ3WU.js} +22 -26
- package/{runAgentClientLoop-U7V32UTD.js → runAgentClientLoop-KVILXQNI.js} +117 -82
- package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-4J2DP4LZ.js} +23 -16
- package/{secretCommands-KVVZS7A6.js → secretCommands-CSTQYB6T.js} +2 -2
- package/{setDialogExtraReferencesAction-DNO5POHA.js → setDialogExtraReferencesAction-35THMVBP.js} +16 -17
- package/{setPrimaryDialogAgentAction-QABBEO4C.js → setPrimaryDialogAgentAction-WLXBNIG7.js} +23 -27
- package/{settingThunks-DVKG4X4S.js → settingThunks-6Y5U5M5N.js} +170 -497
- package/{skillDiscovery-5GEGWJ6N.js → skillDiscovery-IUEZZG2B.js} +3 -3
- package/{spaceCommands-7QKXKBDQ.js → spaceCommands-LXNJBO2U.js} +293 -58
- package/spacePruneCommand-2ITUFYBM.js +233 -0
- package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
- package/{streamAgentChatTurn-UAGFOXNJ.js → streamAgentChatTurn-EY6MFKCA.js} +225 -137
- package/{switchDialogAgentAction-KYWJSGOO.js → switchDialogAgentAction-TG6BQRDA.js} +19 -23
- package/{tableCommands-EFA754RE.js → tableCommands-35G34R4B.js} +28 -49
- package/{toolApiClient-N5PYW2R3.js → toolApiClient-MPQIFYXP.js} +15 -4
- package/{tools-2Q2LBDUC.js → tools-CSLTRRUR.js} +73 -63
- package/{tuiRestart-4QDWLHYZ.js → tuiRestart-ALR4Q3JM.js} +20 -13
- package/tuiSummaryLlmCaller-3Y3JEXJK.js +52 -0
- package/{updateCommands-GJGRS6JK.js → updateCommands-GHQVP6Z5.js} +13 -8
- package/{updateDialogTitleAction-GGNTTI5L.js → updateDialogTitleAction-LFAWF5EW.js} +57 -58
- package/{usageCommand-WI6SQOPB.js → usageCommand-5VKW6T4C.js} +6 -8
- package/{usageRebuildCommand-WQRLLZAT.js → usageRebuildCommand-VUQETFMW.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/authCommand-V6EOMZX6.js +0 -79
- 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/createDialogAction-ZAJERW62.js +0 -82
- package/deleteFile-ECU6FU5C.js +0 -55
- package/dialogNotifyCommand-IASQGEMW.js +0 -36
- 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,3 +1,7 @@
|
|
|
1
|
+
// packages/database-engine/cliAuthorityBrokerTypes.ts
|
|
2
|
+
var CLI_AUTHORITY_BROKER_PROTOCOL_VERSION = 2;
|
|
3
|
+
var MAX_BROKER_ITERATE_PAGE_LIMIT = 1e3;
|
|
4
|
+
|
|
1
5
|
// packages/database-engine/cliAuthorityBrokerClient.ts
|
|
2
6
|
import { createConnection } from "node:net";
|
|
3
7
|
import { connect as connectTls } from "node:tls";
|
|
@@ -67,6 +71,18 @@ function isBrokerUnavailableCause(error) {
|
|
|
67
71
|
if (/malformed response|protocol mismatch/i.test(message)) return false;
|
|
68
72
|
return /ECONNREFUSED|ENOENT|ECONNRESET|EPIPE|closed connection without response|returned no response/i.test(message);
|
|
69
73
|
}
|
|
74
|
+
function outdatedBrokerError(options, version) {
|
|
75
|
+
const { endpoint } = options;
|
|
76
|
+
const metadata = options.readBrokerProcess?.();
|
|
77
|
+
const owner = metadata?.supervisorPid ?? metadata?.pid;
|
|
78
|
+
const command = metadata?.supervisorPid ? "__authority-broker-supervise" : "__authority-broker";
|
|
79
|
+
const processInfo = metadata ? ` (worker PID ${metadata.pid}${metadata.supervisorPid ? `, supervisor PID ${metadata.supervisorPid}` : ""})` : "";
|
|
80
|
+
const instructions = owner ? `Run \`ps -p ${owner} -o pid,ppid,args\` and confirm it belongs to this endpoint and is the old ${command} process. Only then run \`kill -TERM ${owner}\`.` : "Run `ps -ax -o pid,ppid,args | grep '[a]uthority-broker'` and match the endpoint. Stop the verified old `__authority-broker-supervise` (or standalone `__authority-broker`) with `kill -TERM <verified-pid>`.";
|
|
81
|
+
return new CliAuthorityBrokerProtocolError({
|
|
82
|
+
code: "BROKER_PROTOCOL_OUTDATED",
|
|
83
|
+
message: `The running CLI Authority Broker at ${endpoint}${processInfo} is outdated${version === void 0 ? "" : ` (protocol ${version}; requires ${CLI_AUTHORITY_BROKER_PROTOCOL_VERSION})`} and lacks the dialogTurn protocol. Let any active Nolo runs finish before restarting the broker. On Linux/macOS: ${instructions} If managed as a service, stop the old broker through its service manager instead. Wait for it to exit, then rerun the updated CLI; it starts a new broker using the same database. Do not delete any data files.`
|
|
84
|
+
});
|
|
85
|
+
}
|
|
70
86
|
function resolveBrokerSocketTarget(endpoint) {
|
|
71
87
|
if (endpoint.startsWith("unix://")) {
|
|
72
88
|
return { kind: "unix", path: endpoint.slice("unix://".length) };
|
|
@@ -516,8 +532,28 @@ async function invokeBrokerRequest(options, request) {
|
|
|
516
532
|
throw error;
|
|
517
533
|
}
|
|
518
534
|
}
|
|
535
|
+
function createCliAuthorityDialogTurnClient(options) {
|
|
536
|
+
const request = async (args) => {
|
|
537
|
+
const result = await invokeBrokerRequest(options, args).catch((error) => {
|
|
538
|
+
if (isUnsupportedBrokerRequestError(error)) throw outdatedBrokerError(options);
|
|
539
|
+
throw error;
|
|
540
|
+
});
|
|
541
|
+
if (result.type !== args.type || !("response" in result)) {
|
|
542
|
+
throw new CliAuthorityBrokerProtocolError({ code: "MALFORMED_RESPONSE", message: `CLI authority broker protocol mismatch for ${args.type}` });
|
|
543
|
+
}
|
|
544
|
+
return result;
|
|
545
|
+
};
|
|
546
|
+
return {
|
|
547
|
+
getDialogTurnState: async (input) => (await request({ type: "dialogTurnGetState", input })).response,
|
|
548
|
+
beginDialogTurn: async (input) => (await request({ type: "dialogTurnBegin", input })).response,
|
|
549
|
+
heartbeatDialogTurn: async (input) => (await request({ type: "dialogTurnHeartbeat", input })).response,
|
|
550
|
+
endDialogTurn: async (input) => (await request({ type: "dialogTurnEnd", input })).response,
|
|
551
|
+
commitDialogTurn: async (input) => (await request({ type: "dialogTurnCommit", input })).response,
|
|
552
|
+
patchDialogMetadata: async (input) => (await request({ type: "dialogTurnPatchMetadata", input })).response
|
|
553
|
+
};
|
|
554
|
+
}
|
|
519
555
|
function createCliAuthorityBrokerClient(options) {
|
|
520
|
-
const pageSize = options.iteratorPageSize ?? DEFAULT_ITERATOR_PAGE_SIZE;
|
|
556
|
+
const pageSize = Math.min(options.iteratorPageSize ?? DEFAULT_ITERATOR_PAGE_SIZE, MAX_BROKER_ITERATE_PAGE_LIMIT);
|
|
521
557
|
let batchGetUnsupported = false;
|
|
522
558
|
const fallbackBatchGet = (keys) => Promise.all(
|
|
523
559
|
keys.map(async (key) => {
|
|
@@ -550,7 +586,24 @@ function createCliAuthorityBrokerClient(options) {
|
|
|
550
586
|
return options.status ?? "broker";
|
|
551
587
|
},
|
|
552
588
|
async open() {
|
|
553
|
-
await invokeBrokerRequest(options, { type: "status" });
|
|
589
|
+
const result = await invokeBrokerRequest(options, options.verifyLocation ? { type: "status", includeLocation: true } : { type: "status" });
|
|
590
|
+
if (result.type !== "status") {
|
|
591
|
+
throw new CliAuthorityBrokerProtocolError({
|
|
592
|
+
code: "MALFORMED_RESPONSE",
|
|
593
|
+
message: `CLI authority broker protocol mismatch for status at ${options.endpoint}`
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
if (options.requireDialogTurn) {
|
|
597
|
+
const version = result.protocolVersion === void 0 ? 1 : result.protocolVersion;
|
|
598
|
+
if (!Number.isInteger(version) || version < 1) {
|
|
599
|
+
throw new CliAuthorityBrokerProtocolError({
|
|
600
|
+
code: "MALFORMED_RESPONSE",
|
|
601
|
+
message: `Invalid status protocolVersion from CLI authority broker at ${options.endpoint}`
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
if (version < CLI_AUTHORITY_BROKER_PROTOCOL_VERSION) throw outdatedBrokerError(options, version);
|
|
605
|
+
}
|
|
606
|
+
options.verifyLocation?.(result.location);
|
|
554
607
|
},
|
|
555
608
|
async close() {
|
|
556
609
|
},
|
|
@@ -589,6 +642,13 @@ function createCliAuthorityBrokerClient(options) {
|
|
|
589
642
|
}
|
|
590
643
|
return { status: result.status };
|
|
591
644
|
},
|
|
645
|
+
async conditionalDelete(key, expectedRevision) {
|
|
646
|
+
const result = await invokeBrokerRequest(options, { type: "conditionalDelete", key, expectedRevision });
|
|
647
|
+
if (!result || result.type !== "conditionalDelete" || result.status !== "updated" && result.status !== "conflict" || Object.keys(result).some((key2) => key2 !== "type" && key2 !== "status")) {
|
|
648
|
+
throw new CliAuthorityBrokerProtocolError({ code: "BROKER_PROTOCOL_MISMATCH", message: "Invalid conditionalDelete response" });
|
|
649
|
+
}
|
|
650
|
+
return { status: result.status };
|
|
651
|
+
},
|
|
592
652
|
async put(key, value) {
|
|
593
653
|
await invokeBrokerRequest(options, { type: "put", key, value });
|
|
594
654
|
},
|
|
@@ -612,15 +672,16 @@ function createCliAuthorityBrokerClient(options) {
|
|
|
612
672
|
}
|
|
613
673
|
};
|
|
614
674
|
},
|
|
615
|
-
iterator(iteratorOptions = {}) {
|
|
675
|
+
iterator({ limit, ...iteratorOptions } = {}) {
|
|
616
676
|
return async function* iterate() {
|
|
617
677
|
let cursor = void 0;
|
|
618
|
-
|
|
678
|
+
let remaining = limit !== void 0 && Number.isSafeInteger(limit) && limit >= 0 ? limit : Infinity;
|
|
679
|
+
while (remaining > 0) {
|
|
619
680
|
const result = await invokeBrokerRequest(options, {
|
|
620
681
|
type: "iterator",
|
|
621
682
|
options: iteratorOptions,
|
|
622
683
|
cursor,
|
|
623
|
-
limit: pageSize
|
|
684
|
+
limit: Math.min(pageSize, remaining)
|
|
624
685
|
});
|
|
625
686
|
if (result.type !== "iterator") {
|
|
626
687
|
throw new Error(
|
|
@@ -628,7 +689,9 @@ function createCliAuthorityBrokerClient(options) {
|
|
|
628
689
|
);
|
|
629
690
|
}
|
|
630
691
|
for (const entry of result.page.entries) {
|
|
692
|
+
remaining--;
|
|
631
693
|
yield entry;
|
|
694
|
+
if (remaining === 0) return;
|
|
632
695
|
}
|
|
633
696
|
if (result.page.done || !result.page.nextCursor) return;
|
|
634
697
|
cursor = result.page.nextCursor;
|
|
@@ -639,6 +702,8 @@ function createCliAuthorityBrokerClient(options) {
|
|
|
639
702
|
}
|
|
640
703
|
|
|
641
704
|
export {
|
|
705
|
+
CLI_AUTHORITY_BROKER_PROTOCOL_VERSION,
|
|
706
|
+
MAX_BROKER_ITERATE_PAGE_LIMIT,
|
|
642
707
|
CliAuthorityBrokerUnavailableError,
|
|
643
708
|
CliAuthorityBrokerTimeoutError,
|
|
644
709
|
CliAuthorityBrokerProtocolError,
|
|
@@ -646,5 +711,6 @@ export {
|
|
|
646
711
|
isCliAuthorityBrokerTimeoutError,
|
|
647
712
|
isCliAuthorityBrokerProtocolError,
|
|
648
713
|
createCliAuthorityBrokerSocketInvoker,
|
|
714
|
+
createCliAuthorityDialogTurnClient,
|
|
649
715
|
createCliAuthorityBrokerClient
|
|
650
716
|
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
DEFAULT_NOLO_SERVER_URL
|
|
3
|
-
|
|
2
|
+
DEFAULT_NOLO_SERVER_URL,
|
|
3
|
+
readCliOptionOptional
|
|
4
|
+
} from "./chunk-RF576RYE.js";
|
|
5
|
+
import {
|
|
6
|
+
parseAuthTokenUserId
|
|
7
|
+
} from "./chunk-72VWN4VK.js";
|
|
4
8
|
import {
|
|
5
9
|
NOLO_CLUSTER_SERVERS
|
|
6
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JKVOKKMQ.js";
|
|
7
11
|
import {
|
|
8
12
|
asOptionalTrimmedString
|
|
9
13
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -150,9 +154,10 @@ function initializeHostRuntimeIdentity() {
|
|
|
150
154
|
HOST_RUNTIME_CONTENT_IDENTITY = hostGuard.identity;
|
|
151
155
|
}
|
|
152
156
|
function isAgentRuntimeHostCommand(args, interactive) {
|
|
157
|
+
if (args[0] === "automation") return args.length === 2 && args[1] === "tick" || args.length === 4 && args[1] === "run-now";
|
|
153
158
|
if (args.some((arg) => ["--help", "-h", "--version", "-v"].includes(arg))) return false;
|
|
154
159
|
if (!args.length) return interactive;
|
|
155
|
-
return args[0] === "chat" || args[0] === "tui" || args[0] === "connect" || args[0] === "agent" && ["run", "continue", "smoke-current"].includes(args[1]);
|
|
160
|
+
return args[0] === "chat" || args[0] === "tui" || args[0] === "connect" || args[0] === "daemon" || args.includes("--server-url") || args.includes("--machine-key") || args[0] === "agent" && ["run", "continue", "smoke-current"].includes(args[1]);
|
|
156
161
|
}
|
|
157
162
|
function resolveExactRuntimeEntrypoint(path) {
|
|
158
163
|
try {
|
|
@@ -250,21 +255,10 @@ function resolveAuthToken(input, envOrExtraEnvKeys, extraEnvKeys = []) {
|
|
|
250
255
|
return resolveAuthTokenFromEnv(input, envOrExtraEnvKeys ?? []);
|
|
251
256
|
}
|
|
252
257
|
function parseUserIdFromAuthToken(token) {
|
|
253
|
-
|
|
254
|
-
const payloadCandidates = parts.length >= 3 ? [parts[1], parts[0]] : [parts[0]];
|
|
255
|
-
for (const payload of payloadCandidates) {
|
|
256
|
-
if (!payload) continue;
|
|
257
|
-
try {
|
|
258
|
-
const parsed = JSON.parse(Buffer.from(payload, "base64").toString("utf8"));
|
|
259
|
-
if (typeof parsed?.userId === "string") return parsed.userId;
|
|
260
|
-
} catch {
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
return "";
|
|
258
|
+
return parseAuthTokenUserId(token);
|
|
264
259
|
}
|
|
265
260
|
function readOption(args, flag) {
|
|
266
|
-
|
|
267
|
-
return index >= 0 ? args[index + 1] : void 0;
|
|
261
|
+
return readCliOptionOptional(args, flag);
|
|
268
262
|
}
|
|
269
263
|
function isCompiledBinary() {
|
|
270
264
|
try {
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import {
|
|
2
|
+
localSubprocessEnvironment
|
|
3
|
+
} from "./chunk-XT6C2QZW.js";
|
|
4
|
+
import {
|
|
5
|
+
computeNextScheduledAt
|
|
6
|
+
} from "./chunk-QKM55LP2.js";
|
|
7
|
+
import {
|
|
8
|
+
createCliLocalAutomationRevisionWriter,
|
|
9
|
+
getDefaultCliLocalRuntimeAuthority
|
|
10
|
+
} from "./chunk-XUDXQT7R.js";
|
|
11
|
+
import {
|
|
12
|
+
toErrorMessage
|
|
13
|
+
} from "./chunk-HNMXYYJR.js";
|
|
14
|
+
import {
|
|
15
|
+
resolveLocalUserId
|
|
16
|
+
} from "./chunk-UBOTXA3Z.js";
|
|
17
|
+
import {
|
|
18
|
+
isRecord
|
|
19
|
+
} from "./chunk-KUG52IAP.js";
|
|
20
|
+
import {
|
|
21
|
+
resolveServerUrlFromEnv
|
|
22
|
+
} from "./chunk-LTCZOOAM.js";
|
|
23
|
+
|
|
24
|
+
// packages/cli/automation/localAutomationRepository.ts
|
|
25
|
+
var invalid = (field) => {
|
|
26
|
+
throw new Error(`Invalid local automation ${field}`);
|
|
27
|
+
};
|
|
28
|
+
var requiredText = (value, field) => {
|
|
29
|
+
if (typeof value !== "string" || !value.trim() || value.includes("\0")) return invalid(field);
|
|
30
|
+
return value.trim();
|
|
31
|
+
};
|
|
32
|
+
var hasOnly = (value, keys) => Object.keys(value).every((key) => keys.includes(key));
|
|
33
|
+
var integerIn = (value, min, max) => typeof value === "number" && Number.isSafeInteger(value) && value >= min && value <= max;
|
|
34
|
+
function normalizeTrigger(value, now) {
|
|
35
|
+
if (!isRecord(value)) return invalid("trigger");
|
|
36
|
+
if (value.type === "cron" && hasOnly(value, ["type", "expression"])) {
|
|
37
|
+
const expression = requiredText(value.expression, "cron expression");
|
|
38
|
+
const nextWakeAt = computeNextScheduledAt(expression, now);
|
|
39
|
+
if (nextWakeAt === null) return invalid("cron expression (no future occurrence)");
|
|
40
|
+
return { type: "cron", expression, nextWakeAt };
|
|
41
|
+
}
|
|
42
|
+
if (value.type === "once" && hasOnly(value, ["type", "runAt"])) {
|
|
43
|
+
const raw = value.runAt;
|
|
44
|
+
let runAt = typeof raw === "string" && /^\d+$/.test(raw) ? Number(raw) : raw;
|
|
45
|
+
if (typeof runAt === "string") {
|
|
46
|
+
const iso = /^(\d{4}-\d{2}-\d{2})T(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|[+-]\d{2}:\d{2})$/i.exec(runAt);
|
|
47
|
+
const date = iso ? /* @__PURE__ */ new Date(`${iso[1]}T00:00:00Z`) : null;
|
|
48
|
+
if (!iso || !date || !Number.isFinite(date.getTime()) || !date.toISOString().startsWith(`${iso[1]}T`)) return invalid("once.runAt");
|
|
49
|
+
runAt = Date.parse(runAt);
|
|
50
|
+
}
|
|
51
|
+
if (!integerIn(runAt, 1, 864e13)) return invalid("once.runAt");
|
|
52
|
+
return { type: "once", runAt };
|
|
53
|
+
}
|
|
54
|
+
return invalid("trigger");
|
|
55
|
+
}
|
|
56
|
+
function normalizeStopPolicy(value) {
|
|
57
|
+
if (value === void 0) return void 0;
|
|
58
|
+
if (!isRecord(value) || !hasOnly(value, ["maxRuns", "stopOnSuccess"])) return invalid("stopPolicy");
|
|
59
|
+
const { maxRuns, stopOnSuccess } = value;
|
|
60
|
+
if (maxRuns !== void 0 && !integerIn(maxRuns, 1, 1e4)) return invalid("stopPolicy.maxRuns");
|
|
61
|
+
if (stopOnSuccess !== void 0 && typeof stopOnSuccess !== "boolean") return invalid("stopPolicy.stopOnSuccess");
|
|
62
|
+
return { maxRuns, stopOnSuccess };
|
|
63
|
+
}
|
|
64
|
+
function normalizePreflight(value) {
|
|
65
|
+
if (value === void 0) return void 0;
|
|
66
|
+
if (!isRecord(value) || value.kind !== "command" || !hasOnly(value, ["kind", "command", "args", "cwd", "timeoutMs"])) return invalid("preflight");
|
|
67
|
+
const { command, args, cwd, timeoutMs } = value;
|
|
68
|
+
if (typeof command !== "string" || !command.trim() || command.length > 512 || /[\u0000-\u001f\u007f-\u009f]/.test(command)) return invalid("preflight.command");
|
|
69
|
+
if (args !== void 0 && (!Array.isArray(args) || args.length > 64 || !Array.from(args).every((arg) => typeof arg === "string" && arg.length <= 2048 && !arg.includes("\0")))) return invalid("preflight.args");
|
|
70
|
+
if (cwd !== void 0 && (typeof cwd !== "string" || !cwd.trim() || cwd.length > 1024 || cwd.includes("\0"))) return invalid("preflight.cwd");
|
|
71
|
+
if (timeoutMs !== void 0 && !integerIn(timeoutMs, 1e3, 6e4)) return invalid("preflight.timeoutMs");
|
|
72
|
+
return { kind: "command", command, args: args === void 0 ? void 0 : [...args], cwd, timeoutMs };
|
|
73
|
+
}
|
|
74
|
+
var LocalAutomationConflictError = class extends Error {
|
|
75
|
+
constructor() {
|
|
76
|
+
super("revision_conflict");
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
function requireUpdated(result) {
|
|
80
|
+
if (result.status !== "updated") throw new LocalAutomationConflictError();
|
|
81
|
+
}
|
|
82
|
+
function createLocalAutomationRepository({ authority, authenticatedUserId, now = Date.now }) {
|
|
83
|
+
const writer = createCliLocalAutomationRevisionWriter(authority, authenticatedUserId);
|
|
84
|
+
const assertLocal = (row, key) => {
|
|
85
|
+
if (row.ownerUserId !== authenticatedUserId || row.executionTarget?.kind !== "local" || writer.key(row.id) !== key) {
|
|
86
|
+
throw new Error("Invalid local automation record identity");
|
|
87
|
+
}
|
|
88
|
+
return row;
|
|
89
|
+
};
|
|
90
|
+
const get = async (id) => {
|
|
91
|
+
const key = writer.key(id);
|
|
92
|
+
for await (const [, row] of authority.iterator({ gte: key, lte: key })) {
|
|
93
|
+
return assertLocal(row, key);
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
};
|
|
97
|
+
const readExpected = async (id, revision) => {
|
|
98
|
+
const row = await get(id);
|
|
99
|
+
if (!row || row.revision !== revision) throw new LocalAutomationConflictError();
|
|
100
|
+
return row;
|
|
101
|
+
};
|
|
102
|
+
const update = async (row, patch) => {
|
|
103
|
+
const updated = { ...row, ...patch, revision: row.revision + 1, updatedAt: now() };
|
|
104
|
+
requireUpdated(await writer.update(row.id, row.revision, updated));
|
|
105
|
+
return updated;
|
|
106
|
+
};
|
|
107
|
+
return {
|
|
108
|
+
get,
|
|
109
|
+
async list() {
|
|
110
|
+
const rows = [];
|
|
111
|
+
for await (const [key, row] of authority.iterator({ gte: writer.prefix, lt: writer.prefix + "\uFFFF" })) {
|
|
112
|
+
rows.push(assertLocal(row, key));
|
|
113
|
+
}
|
|
114
|
+
return rows;
|
|
115
|
+
},
|
|
116
|
+
async create(input) {
|
|
117
|
+
const timestamp = now();
|
|
118
|
+
const status = input.status === void 0 ? "active" : input.status;
|
|
119
|
+
if (status !== "active" && status !== "paused") return invalid("status");
|
|
120
|
+
const misfirePolicy = input.misfirePolicy === void 0 ? "coalesce" : input.misfirePolicy;
|
|
121
|
+
if (misfirePolicy !== "coalesce" && misfirePolicy !== "skip") return invalid("misfirePolicy");
|
|
122
|
+
const value = {
|
|
123
|
+
ownerUserId: authenticatedUserId,
|
|
124
|
+
title: requiredText(input.title, "title"),
|
|
125
|
+
ownerAgentKey: requiredText(input.ownerAgentKey, "ownerAgentKey"),
|
|
126
|
+
instruction: requiredText(input.instruction, "instruction"),
|
|
127
|
+
trigger: normalizeTrigger(input.trigger, timestamp),
|
|
128
|
+
executionTarget: { kind: "local" },
|
|
129
|
+
misfirePolicy,
|
|
130
|
+
status,
|
|
131
|
+
runStatus: "idle",
|
|
132
|
+
runCount: 0,
|
|
133
|
+
stopPolicy: normalizeStopPolicy(input.stopPolicy),
|
|
134
|
+
preflight: normalizePreflight(input.preflight),
|
|
135
|
+
createdAt: timestamp,
|
|
136
|
+
updatedAt: timestamp
|
|
137
|
+
};
|
|
138
|
+
const { row, result } = await writer.create(value);
|
|
139
|
+
requireUpdated(result);
|
|
140
|
+
return row;
|
|
141
|
+
},
|
|
142
|
+
async setStatus(id, revision, status) {
|
|
143
|
+
if (status !== "active" && status !== "paused") return invalid("status");
|
|
144
|
+
const row = await readExpected(id, revision);
|
|
145
|
+
if (row.runStatus === "running") throw new Error("automation_running");
|
|
146
|
+
if (row.status !== "active" && row.status !== "paused") throw new Error("automation_terminal");
|
|
147
|
+
return update(row, { status });
|
|
148
|
+
},
|
|
149
|
+
async remove(id, revision) {
|
|
150
|
+
const row = await readExpected(id, revision);
|
|
151
|
+
if (row.runStatus === "running") throw new Error("automation_running");
|
|
152
|
+
requireUpdated(await writer.remove(id, revision));
|
|
153
|
+
},
|
|
154
|
+
async updateAfterSweep(id, revision, patch) {
|
|
155
|
+
return update(await readExpected(id, revision), patch);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
async function openLocalAutomationRepository(env) {
|
|
160
|
+
const authority = await getDefaultCliLocalRuntimeAuthority({ env });
|
|
161
|
+
return createLocalAutomationRepository({ authority, authenticatedUserId: resolveLocalUserId(env) });
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// packages/cli/automation/localAutomationScheduler.ts
|
|
165
|
+
import { execFile } from "node:child_process";
|
|
166
|
+
import { StringDecoder } from "node:string_decoder";
|
|
167
|
+
|
|
168
|
+
// packages/cli/automation/localAutomationSchedule.ts
|
|
169
|
+
function advanceLocalAutomationSchedule(trigger, nowMs, finishedAt) {
|
|
170
|
+
const nextWakeAt = trigger.type === "cron" ? computeNextScheduledAt(trigger.expression, Math.max(nowMs, finishedAt)) : null;
|
|
171
|
+
return { nextStatus: nextWakeAt === null ? "completed" : "active", nextWakeAt };
|
|
172
|
+
}
|
|
173
|
+
function evaluateDueLocalAutomation({ record, nowMs, misfireGraceMs = 5 * 6e4 }) {
|
|
174
|
+
const { trigger } = record;
|
|
175
|
+
const wakeAt = trigger.type === "once" ? trigger.runAt : trigger.nextWakeAt;
|
|
176
|
+
if (wakeAt > nowMs) return { action: "wait" };
|
|
177
|
+
if (record.misfirePolicy === "skip" && nowMs - wakeAt > misfireGraceMs) {
|
|
178
|
+
return { action: "skip", ...advanceLocalAutomationSchedule(trigger, nowMs, nowMs), reason: "misfire_skipped" };
|
|
179
|
+
}
|
|
180
|
+
return { action: "run" };
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// packages/cli/automation/localAutomationScheduler.ts
|
|
184
|
+
var outputLimit = 8 * 1024;
|
|
185
|
+
function boundedCapture(stream) {
|
|
186
|
+
stream?.removeAllListeners("data");
|
|
187
|
+
const decoder = new StringDecoder("utf8");
|
|
188
|
+
let remaining = outputLimit;
|
|
189
|
+
let text = "";
|
|
190
|
+
stream?.on("data", (chunk) => {
|
|
191
|
+
if (remaining === 0) return;
|
|
192
|
+
const slice = chunk.subarray(0, remaining);
|
|
193
|
+
remaining -= slice.length;
|
|
194
|
+
text += decoder.write(slice);
|
|
195
|
+
});
|
|
196
|
+
return () => {
|
|
197
|
+
const bytes = Buffer.from(text);
|
|
198
|
+
return bytes.length <= outputLimit ? text : new StringDecoder("utf8").write(bytes.subarray(0, outputLimit));
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
async function runLocalAutomationPreflight(preflight, signal) {
|
|
202
|
+
if (signal.aborted) return { status: "error", error: "preflight_aborted" };
|
|
203
|
+
try {
|
|
204
|
+
return await new Promise((resolve) => {
|
|
205
|
+
const child = execFile(preflight.command, preflight.args ?? [], {
|
|
206
|
+
cwd: preflight.cwd,
|
|
207
|
+
shell: false,
|
|
208
|
+
encoding: "buffer",
|
|
209
|
+
signal,
|
|
210
|
+
env: localSubprocessEnvironment(),
|
|
211
|
+
timeout: preflight.timeoutMs ?? 15e3,
|
|
212
|
+
killSignal: "SIGKILL"
|
|
213
|
+
});
|
|
214
|
+
const stdout = boundedCapture(child.stdout);
|
|
215
|
+
const stderr = boundedCapture(child.stderr);
|
|
216
|
+
child.stdin?.end();
|
|
217
|
+
let spawnError;
|
|
218
|
+
child.on("error", (error) => {
|
|
219
|
+
spawnError = error.code ?? "spawn_failed";
|
|
220
|
+
});
|
|
221
|
+
child.once("close", (code, killedBy) => {
|
|
222
|
+
if (signal.aborted) resolve({ status: "error", error: "preflight_aborted" });
|
|
223
|
+
else if (spawnError) resolve({ status: "error", error: `preflight_start_failed: ${spawnError}` });
|
|
224
|
+
else if (code === null || child.killed) resolve({ status: "error", error: child.killed ? "preflight_timeout" : `preflight_terminated: ${killedBy}` });
|
|
225
|
+
else {
|
|
226
|
+
const outputExcerpt = { stdout: stdout(), stderr: stderr() };
|
|
227
|
+
resolve(code === 0 ? { status: "passed", exitCode: 0, outputExcerpt } : { status: "skipped", exitCode: code, outputExcerpt });
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
} catch (error) {
|
|
232
|
+
const code = error?.code ?? "spawn_failed";
|
|
233
|
+
return { status: "error", error: `preflight_start_failed: ${code}` };
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
function resolveLocalAutomationIntervalMs(raw) {
|
|
237
|
+
const value = raw?.trim() ? Number(raw) : NaN;
|
|
238
|
+
return Number.isFinite(value) ? Math.max(1e3, Math.min(36e5, Math.floor(value))) : 3e4;
|
|
239
|
+
}
|
|
240
|
+
function schedulePatch(record, schedule) {
|
|
241
|
+
return {
|
|
242
|
+
status: schedule.nextWakeAt !== null && record.status === "paused" ? "paused" : schedule.nextStatus,
|
|
243
|
+
trigger: record.trigger.type === "cron" && schedule.nextWakeAt !== null ? { ...record.trigger, nextWakeAt: schedule.nextWakeAt } : record.trigger
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
function createLocalAutomationScheduler(deps) {
|
|
247
|
+
const { repository, now = Date.now, runPreflight = runLocalAutomationPreflight } = deps;
|
|
248
|
+
const controller = new AbortController();
|
|
249
|
+
const { signal } = controller;
|
|
250
|
+
let timer;
|
|
251
|
+
let inFlight;
|
|
252
|
+
function abort() {
|
|
253
|
+
clearInterval(timer);
|
|
254
|
+
timer = void 0;
|
|
255
|
+
deps.signal?.removeEventListener("abort", abort);
|
|
256
|
+
controller.abort();
|
|
257
|
+
}
|
|
258
|
+
if (deps.signal?.aborted) abort();
|
|
259
|
+
else deps.signal?.addEventListener("abort", abort, { once: true });
|
|
260
|
+
async function run(record, nowMs) {
|
|
261
|
+
const claim = await repository.updateAfterSweep(record.id, record.revision, { runStatus: "running" });
|
|
262
|
+
const update = (patch) => repository.updateAfterSweep(record.id, claim.revision, patch);
|
|
263
|
+
if (signal.aborted) return update({ runStatus: record.runStatus });
|
|
264
|
+
let probe;
|
|
265
|
+
const lastPreflightAt = Math.max(nowMs, now());
|
|
266
|
+
if (record.preflight) {
|
|
267
|
+
try {
|
|
268
|
+
probe = await runPreflight(record.preflight, signal);
|
|
269
|
+
} catch (error) {
|
|
270
|
+
probe = { status: "error", error: toErrorMessage(error) };
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
if (signal.aborted) return update({ runStatus: record.runStatus });
|
|
274
|
+
const probePatch = probe && { lastPreflightAt, lastPreflightStatus: probe.status };
|
|
275
|
+
const advance = () => schedulePatch(record, advanceLocalAutomationSchedule(record.trigger, nowMs, now()));
|
|
276
|
+
if (probe && probe.status !== "passed") {
|
|
277
|
+
return update({
|
|
278
|
+
...advance(),
|
|
279
|
+
...probePatch,
|
|
280
|
+
runStatus: record.runStatus,
|
|
281
|
+
...probe.status === "error" ? { lastRunError: probe.error } : {}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
const lastRunAt = Math.max(nowMs, now());
|
|
285
|
+
let result;
|
|
286
|
+
try {
|
|
287
|
+
result = await deps.executeAutomation(record, signal);
|
|
288
|
+
} catch (error) {
|
|
289
|
+
result = { ok: false, error: toErrorMessage(error) };
|
|
290
|
+
}
|
|
291
|
+
const runCount = record.runCount + 1;
|
|
292
|
+
const completed = record.stopPolicy?.maxRuns !== void 0 && runCount >= record.stopPolicy.maxRuns || result.ok && record.stopPolicy?.stopOnSuccess === true;
|
|
293
|
+
return update({
|
|
294
|
+
...advance(),
|
|
295
|
+
...probePatch,
|
|
296
|
+
...completed ? { status: "completed" } : {},
|
|
297
|
+
runStatus: result.ok ? "done" : "failed",
|
|
298
|
+
runCount,
|
|
299
|
+
lastRunAt,
|
|
300
|
+
lastRunDialogId: result.dialogId,
|
|
301
|
+
lastRunError: result.ok ? void 0 : result.error
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
function track(task) {
|
|
305
|
+
const work = Promise.resolve().then(task).finally(() => {
|
|
306
|
+
inFlight = void 0;
|
|
307
|
+
});
|
|
308
|
+
inFlight = work;
|
|
309
|
+
return work;
|
|
310
|
+
}
|
|
311
|
+
function sweepOnce(nowMs = now()) {
|
|
312
|
+
if (signal.aborted || inFlight) return Promise.resolve(0);
|
|
313
|
+
return track(async () => {
|
|
314
|
+
let processed = 0;
|
|
315
|
+
const failures = [];
|
|
316
|
+
for (const record of await repository.list()) {
|
|
317
|
+
if (signal.aborted) break;
|
|
318
|
+
if (record.status !== "active" || record.runStatus === "running") continue;
|
|
319
|
+
try {
|
|
320
|
+
const due = evaluateDueLocalAutomation({ record, nowMs });
|
|
321
|
+
if (due.action === "wait") continue;
|
|
322
|
+
if (due.action === "skip") await repository.updateAfterSweep(record.id, record.revision, schedulePatch(record, due));
|
|
323
|
+
else await run(record, nowMs);
|
|
324
|
+
processed++;
|
|
325
|
+
} catch (error) {
|
|
326
|
+
if (!(error instanceof LocalAutomationConflictError)) failures.push(error);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
if (failures.length) throw new Error(failures.map(toErrorMessage).join("; "));
|
|
330
|
+
return processed;
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
return {
|
|
334
|
+
sweepOnce,
|
|
335
|
+
async runNow(id, expectedRevision) {
|
|
336
|
+
if (signal.aborted) throw new Error("scheduler_stopped");
|
|
337
|
+
if (inFlight) throw new Error("scheduler_busy");
|
|
338
|
+
return track(async () => {
|
|
339
|
+
const row = await repository.get(id);
|
|
340
|
+
if (!row || row.revision !== expectedRevision) throw new LocalAutomationConflictError();
|
|
341
|
+
if (row.runStatus === "running") throw new Error("automation_running");
|
|
342
|
+
if (row.status !== "active" && row.status !== "paused") throw new Error("automation_terminal");
|
|
343
|
+
if (signal.aborted) throw new Error("scheduler_stopped");
|
|
344
|
+
return run(row, now());
|
|
345
|
+
});
|
|
346
|
+
},
|
|
347
|
+
start() {
|
|
348
|
+
if (signal.aborted || timer !== void 0) return;
|
|
349
|
+
const tick = () => {
|
|
350
|
+
void sweepOnce().catch((error) => deps.onError?.(error));
|
|
351
|
+
};
|
|
352
|
+
timer = setInterval(tick, resolveLocalAutomationIntervalMs(deps.env?.NOLO_LOCAL_AUTOMATION_INTERVAL_MS));
|
|
353
|
+
tick();
|
|
354
|
+
},
|
|
355
|
+
async stop() {
|
|
356
|
+
abort();
|
|
357
|
+
await inFlight?.catch(() => {
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// packages/cli/automation/localAutomationRuntime.ts
|
|
364
|
+
function createLocalAutomationExecutor({ env, scriptDir, output }, runTurn = async (options) => (await import("./agentRun-QVFG3CI4.js")).runAgentTurn(options)) {
|
|
365
|
+
return async (record, signal) => {
|
|
366
|
+
signal.throwIfAborted();
|
|
367
|
+
const result = await runTurn({
|
|
368
|
+
agentName: record.ownerAgentKey,
|
|
369
|
+
agentKey: record.ownerAgentKey,
|
|
370
|
+
message: record.instruction,
|
|
371
|
+
runtimeMode: "local",
|
|
372
|
+
freshDialog: true,
|
|
373
|
+
serverUrl: resolveServerUrlFromEnv(env),
|
|
374
|
+
scriptDir,
|
|
375
|
+
env,
|
|
376
|
+
output,
|
|
377
|
+
abortSignal: signal,
|
|
378
|
+
mcpApprovalSignal: signal,
|
|
379
|
+
blockDestructiveWithoutConfirmation: true
|
|
380
|
+
});
|
|
381
|
+
const finished = (result.stopReason === "done" || result.stopReason === void 0) && !result.preflightBlocked && (!result.emptyAssistantFallbackReason || result.emptyAssistantOutputUsable === true);
|
|
382
|
+
return result.exitCode === 0 && finished && !signal.aborted ? { ok: true, dialogId: result.dialogId } : {
|
|
383
|
+
ok: false,
|
|
384
|
+
dialogId: result.dialogId,
|
|
385
|
+
error: signal.aborted ? "automation_aborted" : result.preflightBlocked?.code ?? (result.exitCode !== 0 ? `local_agent_exit_${result.exitCode}` : `local_agent_${result.emptyAssistantFallbackReason ?? result.stopReason ?? "incomplete"}`)
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
function createConnectorLocalAutomationScheduler(options) {
|
|
390
|
+
let repository;
|
|
391
|
+
const getRepository = async () => repository ??= await openLocalAutomationRepository(options.env);
|
|
392
|
+
return createLocalAutomationScheduler({
|
|
393
|
+
env: options.env,
|
|
394
|
+
signal: options.signal,
|
|
395
|
+
executeAutomation: createLocalAutomationExecutor(options),
|
|
396
|
+
onError: (error) => options.output.write(`[nolo] Local automation sweep failed: ${toErrorMessage(error)}
|
|
397
|
+
`),
|
|
398
|
+
repository: {
|
|
399
|
+
list: async () => (await getRepository()).list(),
|
|
400
|
+
get: async (id) => (await getRepository()).get(id),
|
|
401
|
+
updateAfterSweep: async (...args) => (await getRepository()).updateAfterSweep(...args)
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
async function withLocalAutomationShutdown(task) {
|
|
406
|
+
const controller = new AbortController();
|
|
407
|
+
const shutdown = () => controller.abort();
|
|
408
|
+
process.on("SIGINT", shutdown);
|
|
409
|
+
process.on("SIGTERM", shutdown);
|
|
410
|
+
try {
|
|
411
|
+
return await task(controller.signal);
|
|
412
|
+
} finally {
|
|
413
|
+
process.off("SIGINT", shutdown);
|
|
414
|
+
process.off("SIGTERM", shutdown);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export {
|
|
419
|
+
LocalAutomationConflictError,
|
|
420
|
+
openLocalAutomationRepository,
|
|
421
|
+
createLocalAutomationScheduler,
|
|
422
|
+
createLocalAutomationExecutor,
|
|
423
|
+
createConnectorLocalAutomationScheduler,
|
|
424
|
+
withLocalAutomationShutdown
|
|
425
|
+
};
|