nolo-cli 0.258.0-alpha.1 → 0.260.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{_executeModel-E2LL7FPO.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-ORNRRKJO.js → agentDeleteCommand-KSXSNPAU.js} +184 -146
- package/{agentEmailCommands-2ALVFOD5.js → agentEmailCommands-NXRWS7NS.js} +142 -126
- package/{agentGrantCommands-L6O2HVJI.js → agentGrantCommands-D2S7LCTU.js} +8 -5
- package/{agentListCommands-6I4NQPR4.js → agentListCommands-PFXGZZ3Y.js} +87 -68
- package/{agentMachineCommands-PNHTIJ6A.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-3TIVJ3SR.js → agentRunControl-NEK44LDM.js} +19 -12
- package/{agentRuntimeLocal-3MAEFYSB.js → agentRuntimeLocal-SST4EPLT.js} +62 -49
- package/{agentSlice-KOQXUPKT.js → agentSlice-4ZJJJN4M.js} +15 -18
- package/appConfigCommands-MPHS6FHD.js +417 -0
- package/{appDeleteCommands-FEPN62UR.js → appDeleteCommands-W26WGENW.js} +68 -58
- package/{appDeployCommands-DPFEWFYZ.js → appDeployCommands-ER7IOF5E.js} +74 -59
- package/{appDeployStatusCommands-LQ5X5KVX.js → appDeployStatusCommands-VKLL3A77.js} +68 -58
- package/{appGetCommands-W3JBBIF7.js → appGetCommands-P6GXJNUD.js} +74 -58
- package/{appListCommands-LUHZS7JU.js → appListCommands-ACA2IZZM.js} +74 -58
- package/appMigrateCommands-OGF4E2W6.js +230 -0
- package/appSourceCommands-GAHVBRUM.js +279 -0
- package/{authCommand-HKSXJT3J.js → authCommand-PXE7NZTQ.js} +26 -40
- package/{authCommands-T5FODCEG.js → authCommands-AZPYXTUB.js} +20 -17
- package/{builtinSkillRegistry-FVEEO4U2.js → builtinSkillRegistry-6XUWMAV5.js} +8 -6
- package/{chromeOpsCommands-4UIKH26F.js → chromeOpsCommands-7UKKUOBU.js} +68 -18
- package/{chunk-KO5PFS74.js → chunk-2CKFROQS.js} +2454 -1115
- package/{chunk-6N4IKMTH.js → chunk-2I4R6ZRV.js} +40 -26
- 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-2RZBFJEG.js → chunk-75FZ2Z7C.js} +16027 -17392
- package/{chunk-ADYWV732.js → chunk-76B6YUQS.js} +264 -177
- package/{chunk-AKBNCTPY.js → chunk-76K4GTY5.js} +1 -1
- package/{chunk-ZMJMHXYX.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-TF427WGH.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-MUDMYJCM.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-JAGD4PSH.js → chunk-CRGPRAJ4.js} +46 -42
- package/{chunk-P4R5KXU7.js → chunk-CW6LRDSF.js} +5 -5
- package/{chunk-BD22OFDQ.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-E4HBZDV6.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-EXD7S7QW.js → chunk-FF5ZRKW7.js} +12 -7
- package/{chunk-7PTWFSZZ.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-IZHENZQ5.js → chunk-G5JGA5YM.js} +180 -31
- package/{chunk-7EUJ65PF.js → chunk-GMBWWBSJ.js} +782 -449
- package/{chunk-WS36XPJD.js → chunk-GYFKKTDI.js} +82 -6
- package/{chunk-APXC3SQO.js → chunk-GZ4I5EMM.js} +9 -9
- package/{chunk-324FWHUA.js → chunk-HHXF57CL.js} +12 -3
- package/chunk-HJTI7RZV.js +94 -0
- package/{chunk-JGVWHUYK.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-MD7O2NN2.js → chunk-IM7HCFB4.js} +313 -275
- package/{chunk-DWES4SXY.js → chunk-INN2PBW7.js} +1 -1
- package/chunk-IV6VUVLJ.js +88 -0
- package/chunk-J42X32PV.js +472 -0
- package/{chunk-V6S5OZSP.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-JW6OURKM.js → chunk-KAHYBAEN.js} +215 -473
- 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-DCTQJDDQ.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-VQR2ACSC.js → chunk-NTBTVKKB.js} +17 -25
- package/{chunk-LVZVSLKO.js → chunk-O7ZY6SUK.js} +5 -22
- package/{chunk-APQBEIOQ.js → chunk-P4XAHM4B.js} +1 -1
- package/chunk-PL5RKESU.js +40 -0
- package/{chunk-U2H426FE.js → chunk-PQ3QZMJK.js} +20 -4
- package/chunk-Q5FJJ6XI.js +103 -0
- package/{createAgentAutomationAction-HEZ3G5L4.js → chunk-QKM55LP2.js} +3 -160
- package/{chunk-SIHOY5YI.js → chunk-QZCLCAYC.js} +170 -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-JOJH3KWV.js → chunk-RIOAPUGV.js} +242 -25
- package/{chunk-7B55IVLF.js → chunk-RL6H2A2Z.js} +2561 -4059
- package/{chunk-BZLGPM5B.js → chunk-RNLKWUVY.js} +7 -12
- package/{chunk-BB76X6O4.js → chunk-RWXHGPWJ.js} +1 -1
- package/chunk-S7BF2OGX.js +432 -0
- package/{chunk-6VEO7Z3Y.js → chunk-SD4MBKZ7.js} +6 -6
- package/{chunk-PNBQ5JTA.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-LJ6WIQZO.js → chunk-SX6PDLBZ.js} +279 -149
- package/{chunk-6VNBJ7GI.js → chunk-T4WU747C.js} +5 -5
- package/{chunk-53W5BXLN.js → chunk-TCOHWKDM.js} +54 -55
- package/{chunk-KO5GO2BC.js → chunk-TXMFSGRY.js} +1 -1
- package/{chunk-UUCYUN6Y.js → chunk-UB7NV7NN.js} +1 -1
- package/{chunk-CVDJUPBN.js → chunk-UOLGGEEC.js} +774 -119
- package/{chunk-ADUCBH4M.js → chunk-USFG4EWQ.js} +51 -42
- package/{chunk-LLUBUHNT.js → chunk-UYZOBSSO.js} +5 -9
- package/{chunk-ONTHDYFU.js → chunk-VDC3BW24.js} +24 -10
- package/chunk-VH356OQ3.js +425 -0
- package/{chunk-U6QNVOR5.js → chunk-VKM7DOYB.js} +130 -6
- package/{chunk-3GGVFHWI.js → chunk-VPAO5WQX.js} +17 -14
- package/{chunk-OYUMJMC5.js → chunk-W2RQYNPI.js} +5 -0
- package/{chunk-C63KMRJE.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-RQKTCHQM.js → chunk-WY6DMHMG.js} +1 -1
- package/{chunk-MLK3FEXG.js → chunk-XJW6SLBZ.js} +3 -3
- package/{chunk-7BIJFGKS.js → chunk-XQFDCRG3.js} +105 -51
- package/chunk-XT6C2QZW.js +46 -0
- package/{chunk-NRUYSNSZ.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-BD5YJJLJ.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-Z3JZ2R5F.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-QKOJ5FIC.js → commandRegistry-TYYYTW5E.js} +263 -120
- package/{contentThunks-ZDBDDZP3.js → contentThunks-E6BJ5YSX.js} +45 -43
- package/{cooldownCommands-Y4ZQQ35D.js → cooldownCommands-FPAFS7XG.js} +1 -1
- package/createAgentAutomationAction-L3NLCIIW.js +172 -0
- package/{createDialogAction-DK62W5VA.js → createDialogAction-QSWKRPWQ.js} +46 -42
- package/{createPageAction-W6NXHVKO.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-Z24IDINY.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-62GISS77.js → dialogSlice-VHPXENDZ.js} +43 -42
- package/{dialogTraceCommand-FDINAIZ6.js → dialogTraceCommand-SO2WKAXW.js} +83 -69
- package/{dialogUsageCommand-WJ3U6KZU.js → dialogUsageCommand-EUO6JXTD.js} +6 -3
- package/{docCreateCommands-SXA4TMGJ.js → docCreateCommands-H4RLIUNX.js} +68 -59
- package/{docDeleteCommands-ELXSZK3F.js → docDeleteCommands-OVAKCBMT.js} +68 -59
- package/{docReadCommands-DFLAQPI4.js → docReadCommands-KFISIUVA.js} +67 -58
- package/{docStore-UWF2PMCB.js → docStore-X7BEA735.js} +16 -17
- package/{docUpdateCommands-KB6M5HUH.js → docUpdateCommands-VOEER36L.js} +68 -59
- package/ebookDownloaderAgentCommand-2DHPGEOQ.js +674 -0
- package/{fetchMessages-TQEUZD7H.js → fetchMessages-RGPIYEPZ.js} +2 -2
- package/{getPricing-5BLZRPTM.js → getPricing-BK6CUBAE.js} +8 -4
- package/{handleSendMessageAction-ZV6OQPQG.js → handleSendMessageAction-GQ2KKOET.js} +265 -119
- package/{hostCredentialCreate-3IA5IJFG.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-SSG5ORLZ.js → localRuntimeAdapter-WRBLXFUZ.js} +136 -119
- package/localRuntimeAuthority-3YDFZD3L.js +44 -0
- package/{localRuntimeDb-ZJFGNHML.js → localRuntimeDb-CJWJK47G.js} +1 -1
- package/{machineCommands-4WKJ3TLO.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-JN43WW4E.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-D6EUSB2Q.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-FEZTSUSJ.js → runAgentClientLoop-EKD2EEEA.js} +117 -82
- package/{runtimeDoctorCommands-V3M3JTUV.js → runtimeDoctorCommands-IALUR5BZ.js} +23 -16
- package/{secretCommands-53NZFD4T.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-4ACQQNZL.js → spaceCommands-65WQHVOI.js} +194 -90
- package/spacePruneCommand-PTMRUWYJ.js +233 -0
- package/{store-Z53ICFL3.js → store-WSAVTR32.js} +3 -1
- package/{streamAgentChatTurn-I425SVYJ.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-WBPFTSMK.js → tools-UMCPIQX6.js} +73 -63
- package/{tuiRestart-VN5F4GYU.js → tuiRestart-O7UDLNQU.js} +20 -13
- package/tuiSummaryLlmCaller-7APIUIIV.js +52 -0
- package/{updateCommands-VQEBBIGO.js → updateCommands-DXDIAQFS.js} +12 -7
- package/{updateDialogTitleAction-VB5DTVXV.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-ZEZKGX4M.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-BEZPBYBM.js +0 -194
- package/agentRunCommand-2T72V5KY.js +0 -232
- package/chunk-2MBTWINN.js +0 -89
- package/chunk-523DITKR.js +0 -32
- package/chunk-BUDVRYES.js +0 -2213
- package/chunk-BXGU6274.js +0 -862
- 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-WFEWP352.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-ZTHAJU3O.js +0 -2537
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +0 -22
- package/cliLocalAgentRecordReader-Q6677YID.js +0 -104
- package/deleteFile-ECU6FU5C.js +0 -55
- package/localRuntimeAuthority-UF2DAQ3F.js +0 -28
- package/machineWsRunDispatch-7PROH7E7.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
|
@@ -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-YWEZSBLL.js";
|
|
11
|
+
import {
|
|
12
|
+
toErrorMessage
|
|
13
|
+
} from "./chunk-HNMXYYJR.js";
|
|
14
|
+
import {
|
|
15
|
+
resolveLocalUserId
|
|
16
|
+
} from "./chunk-6KUTNAPU.js";
|
|
17
|
+
import {
|
|
18
|
+
isRecord
|
|
19
|
+
} from "./chunk-KUG52IAP.js";
|
|
20
|
+
import {
|
|
21
|
+
resolveServerUrlFromEnv
|
|
22
|
+
} from "./chunk-JUNYPVL6.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-ZNMUPDHF.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
|
+
};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
markdownToSlate
|
|
3
|
+
} from "./chunk-WX266G2C.js";
|
|
4
|
+
import {
|
|
5
|
+
createEmptyParagraph,
|
|
6
|
+
extractMentionsFromSlate
|
|
7
|
+
} from "./chunk-AGIM7IMJ.js";
|
|
8
|
+
import {
|
|
9
|
+
slateToRenderMarkdown
|
|
10
|
+
} from "./chunk-63W5N6P3.js";
|
|
1
11
|
import {
|
|
2
12
|
toErrorMessage
|
|
3
13
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -152,14 +162,127 @@ function slateToSimplifiedMarkdown(nodes, options = {}) {
|
|
|
152
162
|
return nodes.map((node) => renderNode(node, 0, options)).join("").trim() + "\n";
|
|
153
163
|
}
|
|
154
164
|
|
|
155
|
-
// packages/
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
165
|
+
// packages/render/page/pageDocumentOps.ts
|
|
166
|
+
var SKILL_PROTOCOL_COMMENT_RE = /<!--\s*(?:skill-config|eval-config|workflow-config)\b[\s\S]*?-->/i;
|
|
167
|
+
var PageDocumentOpsError = class extends Error {
|
|
168
|
+
constructor(code, message) {
|
|
169
|
+
super(message);
|
|
170
|
+
this.code = code;
|
|
171
|
+
this.name = "PageDocumentOpsError";
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
var cloneJson = (value) => JSON.parse(JSON.stringify(value));
|
|
175
|
+
var hasAuthoritativeSlateData = (pageData) => Array.isArray(pageData?.slateData);
|
|
176
|
+
var isPlainEmptyTextLeaf = (child) => {
|
|
177
|
+
if (!child || typeof child !== "object") return false;
|
|
178
|
+
const record = child;
|
|
179
|
+
return typeof record.text === "string" && record.text === "" && typeof record.type !== "string";
|
|
180
|
+
};
|
|
181
|
+
var isEmptyParagraphNode = (node) => {
|
|
182
|
+
if (!node || typeof node !== "object") return false;
|
|
183
|
+
const record = node;
|
|
184
|
+
if (record.type !== "paragraph") return false;
|
|
185
|
+
const extraKeys = Object.keys(record).filter(
|
|
186
|
+
(key) => key !== "type" && key !== "children"
|
|
187
|
+
);
|
|
188
|
+
if (extraKeys.length > 0) return false;
|
|
189
|
+
if (!Array.isArray(record.children)) return false;
|
|
190
|
+
return record.children.length === 0 || record.children.every(isPlainEmptyTextLeaf);
|
|
191
|
+
};
|
|
192
|
+
var isEmptySlateDocument = (nodes) => {
|
|
193
|
+
if (!Array.isArray(nodes)) return false;
|
|
194
|
+
if (nodes.length === 0) return true;
|
|
195
|
+
return nodes.every(isEmptyParagraphNode);
|
|
196
|
+
};
|
|
197
|
+
var hasSkillMetadataCommentBlocks = (markdown) => typeof markdown === "string" && SKILL_PROTOCOL_COMMENT_RE.test(markdown);
|
|
198
|
+
var isProtectedSkillPage = (pageData) => {
|
|
199
|
+
const meta = pageData?.meta;
|
|
200
|
+
if (!meta || typeof meta !== "object") return false;
|
|
201
|
+
return meta.kind === "skill" || Boolean(meta.skillConfig) || Boolean(meta.workflowConfig) || Boolean(meta.evalConfig);
|
|
202
|
+
};
|
|
203
|
+
var markdownToSlateBlocks = (markdown) => {
|
|
204
|
+
if (typeof markdown !== "string" || markdown.length === 0) {
|
|
205
|
+
return [];
|
|
206
|
+
}
|
|
207
|
+
const parsed = markdownToSlate(markdown);
|
|
208
|
+
if (Array.isArray(parsed) && parsed.length > 0) {
|
|
209
|
+
return parsed;
|
|
210
|
+
}
|
|
211
|
+
if (markdown.trim().length === 0) {
|
|
212
|
+
return [];
|
|
213
|
+
}
|
|
214
|
+
return [{ type: "paragraph", children: [{ text: markdown }] }];
|
|
215
|
+
};
|
|
216
|
+
var resolvePageSlateNodes = (pageData) => {
|
|
217
|
+
if (hasAuthoritativeSlateData(pageData)) {
|
|
218
|
+
return cloneJson(pageData.slateData);
|
|
219
|
+
}
|
|
220
|
+
if (typeof pageData.content === "string" && pageData.content.length > 0) {
|
|
221
|
+
return markdownToSlateBlocks(pageData.content);
|
|
222
|
+
}
|
|
223
|
+
return [];
|
|
224
|
+
};
|
|
225
|
+
var resolvePageMarkdown = (pageData, options = {}) => {
|
|
226
|
+
const format = options.format ?? "simplified";
|
|
227
|
+
if (hasAuthoritativeSlateData(pageData)) {
|
|
228
|
+
const nodes = pageData.slateData;
|
|
229
|
+
if (isEmptySlateDocument(nodes)) {
|
|
230
|
+
return "";
|
|
231
|
+
}
|
|
232
|
+
return format === "render" ? slateToRenderMarkdown(nodes) : slateToSimplifiedMarkdown(nodes);
|
|
160
233
|
}
|
|
161
234
|
return typeof pageData.content === "string" ? pageData.content : "";
|
|
162
235
|
};
|
|
236
|
+
var applyPageContentMutation = (originalData, input) => {
|
|
237
|
+
const {
|
|
238
|
+
mode,
|
|
239
|
+
markdown,
|
|
240
|
+
allowSkillMetadataWrite = false,
|
|
241
|
+
nowIso = (/* @__PURE__ */ new Date()).toISOString()
|
|
242
|
+
} = input;
|
|
243
|
+
if (!allowSkillMetadataWrite && hasSkillMetadataCommentBlocks(markdown)) {
|
|
244
|
+
throw new PageDocumentOpsError(
|
|
245
|
+
"SKILL_METADATA_PROTECTED",
|
|
246
|
+
"Ordinary page content writes cannot inject or modify Skill/Workflow/Eval metadata blocks."
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
const incomingNodes = markdownToSlateBlocks(markdown);
|
|
250
|
+
let finalSlateData;
|
|
251
|
+
if (mode === "append") {
|
|
252
|
+
const baseNodes = resolvePageSlateNodes(originalData);
|
|
253
|
+
if (incomingNodes.length === 0) {
|
|
254
|
+
finalSlateData = baseNodes;
|
|
255
|
+
} else if (isEmptySlateDocument(baseNodes)) {
|
|
256
|
+
finalSlateData = incomingNodes;
|
|
257
|
+
} else {
|
|
258
|
+
finalSlateData = [...baseNodes, ...incomingNodes];
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
finalSlateData = incomingNodes.length > 0 ? incomingNodes : [createEmptyParagraph()];
|
|
262
|
+
}
|
|
263
|
+
const renderMarkdown = isEmptySlateDocument(finalSlateData) ? "" : slateToRenderMarkdown(finalSlateData);
|
|
264
|
+
const extractedTools = extractMentionsFromSlate(
|
|
265
|
+
finalSlateData
|
|
266
|
+
);
|
|
267
|
+
const tools = !allowSkillMetadataWrite && isProtectedSkillPage(originalData) && Array.isArray(originalData.tools) ? [...originalData.tools] : extractedTools;
|
|
268
|
+
const updatedPage = {
|
|
269
|
+
...originalData,
|
|
270
|
+
slateData: finalSlateData,
|
|
271
|
+
content: renderMarkdown,
|
|
272
|
+
tools,
|
|
273
|
+
...originalData.meta !== void 0 ? { meta: cloneJson(originalData.meta) } : {},
|
|
274
|
+
updated_at: nowIso
|
|
275
|
+
};
|
|
276
|
+
return {
|
|
277
|
+
updatedPage,
|
|
278
|
+
slateData: finalSlateData,
|
|
279
|
+
renderMarkdown,
|
|
280
|
+
tools
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
// packages/ai/tools/readDocTool.ts
|
|
285
|
+
var resolvePageReadMarkdown = (pageData) => resolvePageMarkdown(pageData, { format: "simplified" });
|
|
163
286
|
var readDocFunctionSchema = {
|
|
164
287
|
name: "readDoc",
|
|
165
288
|
description: [
|
|
@@ -206,7 +329,7 @@ async function readDocFunc(args, thunkApi) {
|
|
|
206
329
|
throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
|
|
207
330
|
}
|
|
208
331
|
try {
|
|
209
|
-
const { readAction } = await import("./read-
|
|
332
|
+
const { readAction } = await import("./read-6YR57D6V.js");
|
|
210
333
|
const pageData = await readAction({ dbKey: id }, thunkApi);
|
|
211
334
|
if (!pageData) {
|
|
212
335
|
throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
|
|
@@ -220,6 +343,7 @@ var readPageFunc = readDocFunc;
|
|
|
220
343
|
|
|
221
344
|
export {
|
|
222
345
|
slateToSimplifiedMarkdown,
|
|
346
|
+
applyPageContentMutation,
|
|
223
347
|
resolvePageReadMarkdown,
|
|
224
348
|
readDocFunctionSchema,
|
|
225
349
|
readPageFunctionSchema,
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
slateToRenderMarkdown
|
|
3
|
-
} from "./chunk-63W5N6P3.js";
|
|
4
|
-
import {
|
|
5
|
-
buildSkillSummaryMarker
|
|
6
|
-
} from "./chunk-VF4K2QE6.js";
|
|
7
1
|
import {
|
|
8
2
|
markdownToSlate
|
|
9
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WX266G2C.js";
|
|
10
4
|
import {
|
|
11
5
|
createEmptyParagraph,
|
|
12
6
|
splitSlateTitleAndBody
|
|
13
7
|
} from "./chunk-AGIM7IMJ.js";
|
|
8
|
+
import {
|
|
9
|
+
buildSkillSummaryMarker
|
|
10
|
+
} from "./chunk-VF4K2QE6.js";
|
|
11
|
+
import {
|
|
12
|
+
slateToRenderMarkdown
|
|
13
|
+
} from "./chunk-63W5N6P3.js";
|
|
14
14
|
import {
|
|
15
15
|
addContentToSpace,
|
|
16
16
|
resolveCreationSpaceId
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SX6PDLBZ.js";
|
|
18
18
|
import {
|
|
19
19
|
runtime_default
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RL6H2A2Z.js";
|
|
21
21
|
import {
|
|
22
22
|
getCurrentSpaceId
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WXD6Y7DW.js";
|
|
24
24
|
import {
|
|
25
25
|
write
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-76B6YUQS.js";
|
|
27
|
+
import {
|
|
28
|
+
emitUserDataUpdated
|
|
29
|
+
} from "./chunk-GYFKKTDI.js";
|
|
27
30
|
import {
|
|
28
31
|
selectIdentityUserId
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-YM5XULB2.js";
|
|
30
33
|
import {
|
|
31
34
|
parseSkillDocProtocol
|
|
32
35
|
} from "./chunk-AETZ7AD6.js";
|
|
33
36
|
import {
|
|
34
37
|
createPageKey
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-DLXL4NSL.js";
|
|
36
39
|
import {
|
|
37
40
|
asOptionalTrimmedString
|
|
38
41
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -128,7 +131,7 @@ var createPageAction = async ({
|
|
|
128
131
|
);
|
|
129
132
|
}
|
|
130
133
|
if (typeof window !== "undefined") {
|
|
131
|
-
|
|
134
|
+
emitUserDataUpdated();
|
|
132
135
|
}
|
|
133
136
|
return dbKey;
|
|
134
137
|
};
|
|
@@ -14,6 +14,11 @@ var authRoutes = {
|
|
|
14
14
|
method: "POST",
|
|
15
15
|
createPath: () => `${API_VERSION}/users/signup`
|
|
16
16
|
},
|
|
17
|
+
providers: {
|
|
18
|
+
path: `${API_VERSION}/users/auth-providers`,
|
|
19
|
+
method: "GET",
|
|
20
|
+
createPath: () => `${API_VERSION}/users/auth-providers`
|
|
21
|
+
},
|
|
17
22
|
github: {
|
|
18
23
|
start: { path: `${API_VERSION}/users/github/start`, method: "POST", createPath: () => `${API_VERSION}/users/github/start` },
|
|
19
24
|
callback: { path: `${API_VERSION}/users/github/callback`, method: "GET", createPath: () => `${API_VERSION}/users/github/callback` },
|