nolo-cli 0.228.0-alpha.2 → 0.228.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 +3 -5
- package/{_executeModel-VYCHHZVT.js → _executeModel-AKCTHGMP.js} +89 -83
- package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
- package/{action-GDZDXPMB.js → action-C6IQAKN4.js} +8 -5
- package/{addContentAction-7RO4AMRI.js → addContentAction-53364YDW.js} +13 -12
- package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-U5DD5EN5.js} +16 -15
- package/{agentDeleteCommand-QWQKT54A.js → agentDeleteCommand-2E5FAGUO.js} +128 -115
- package/{agentEmailCommands-EISMBIRE.js → agentEmailCommands-UGZZAH7E.js} +128 -111
- package/{agentListCommands-4WLG32IW.js → agentListCommands-JCTW3J2K.js} +398 -179
- package/{agentMachineCommands-DC6NKWTU.js → agentMachineCommands-QPG5ZXF4.js} +58 -47
- package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentPullCommand-KHV4EELF.js → agentPullCommand-2EYJ5ENC.js} +1 -1
- package/agentRecordCommands-4NTVR6MZ.js +194 -0
- package/agentRunCommand-VHF34PYC.js +232 -0
- package/{agentRunControl-MBG4U6SL.js → agentRunControl-QYTXUQGY.js} +14 -9
- package/{agentRuntimeLocal-HOXKWCYO.js → agentRuntimeLocal-U54AKHXH.js} +58 -43
- package/{agentSlice-UG76KEBH.js → agentSlice-4JGDEXWK.js} +14 -13
- package/{appDeleteCommands-WWCC6WA5.js → appDeleteCommands-XBE5QJ6P.js} +58 -47
- package/{appDeployCommands-AU4IUN33.js → appDeployCommands-QIYLXXGA.js} +58 -47
- package/{appDeployStatusCommands-STUW7WXL.js → appDeployStatusCommands-JXS6ZQZZ.js} +58 -47
- package/{appGetCommands-BGTLIQ4K.js → appGetCommands-SZS7SJPK.js} +58 -47
- package/{appListCommands-CUCPRUXW.js → appListCommands-B3GBJSNV.js} +58 -47
- package/{authCommand-OZ2KTP4Z.js → authCommand-V6EOMZX6.js} +25 -19
- package/{authCommands-55OGQGCR.js → authCommands-T5FODCEG.js} +12 -6
- package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-ZQC3IIO2.js} +8 -7
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-O4IIKTBD.js} +384 -7
- package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-OFX7ZGKP.js} +3 -3
- package/{chunk-DBUR22G5.js → chunk-223KZUJ6.js} +19 -15
- package/{chunk-3U44JB3O.js → chunk-2C5VN7NH.js} +1 -1
- package/{chunk-PWTNI4N7.js → chunk-2E4BYAUE.js} +22 -0
- package/{chunk-L32W3PRP.js → chunk-2FZVXOFX.js} +234 -18
- package/{chunk-HBRDSQ3M.js → chunk-2JHGUL5K.js} +3 -2
- package/chunk-2SXN7LAY.js +15 -0
- package/chunk-3A5NNQCN.js +64 -0
- package/chunk-3F2FRLIO.js +372 -0
- package/{chunk-DEA37IUY.js → chunk-46FETNLF.js} +2 -2
- package/{chunk-ZEVQHCLM.js → chunk-4GYVS4PM.js} +8 -6
- package/{chunk-CBUZ6DKA.js → chunk-4YPH5KRA.js} +1 -1
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-7FEP5USX.js → chunk-5AYP5QBB.js} +5 -5
- package/{chunk-XAG3FWBE.js → chunk-5ISNPTQH.js} +5 -5
- package/{chunk-EVGU5P4U.js → chunk-5P3PPQVP.js} +1 -1
- package/{chunk-XSW4EXQV.js → chunk-6BMTKYAO.js} +55 -18
- package/chunk-6PAHSSD2.js +33401 -0
- package/{chunk-ZOHO6MOF.js → chunk-6RSNVJGO.js} +2 -99
- package/{chunk-7JGMNKKG.js → chunk-6SOWMEAY.js} +30 -9
- package/{chunk-RG2DGNL6.js → chunk-6VEO7Z3Y.js} +3 -3
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-DGYCDA6W.js → chunk-7BIJFGKS.js} +36 -17
- package/{chunk-WFDNADFX.js → chunk-7OVOZRZF.js} +8 -8
- package/{chunk-WCFFRBL5.js → chunk-7PON4LBY.js} +45 -27
- package/{chunk-QRGDJA4B.js → chunk-7WHCIA5V.js} +33 -7
- package/{chunk-CMMI3DAT.js → chunk-ADYWV732.js} +59 -30
- package/{chunk-QYB23WUH.js → chunk-AIFQKNPP.js} +1 -1
- package/{chunk-HGDKT2D6.js → chunk-BPB3T5EU.js} +174 -1
- package/{chunk-DUUDXSLX.js → chunk-BZLGPM5B.js} +28 -4
- package/{chunk-ATEKLSLR.js → chunk-BZMDWGQQ.js} +14 -9
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-S6K5F3KP.js → chunk-CEKRIR22.js} +1 -1
- package/{chunk-42OKN2LI.js → chunk-D634SL2Y.js} +9 -107
- package/{chunk-DLXMMTGM.js → chunk-DHRPLRIR.js} +1283 -786
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-OBIC6EG7.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-X3E6EHJW.js → chunk-E3LSO6EI.js} +292 -207
- package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
- package/chunk-EHFBP6IK.js +791 -0
- package/chunk-EJQE5HB7.js +21 -0
- package/{chunk-VQ5N5GSV.js → chunk-EL5NRJHI.js} +4 -4
- package/chunk-EUGTFFO6.js +42 -0
- package/{chunk-7BCG67EI.js → chunk-EVHTYVD2.js} +1199 -442
- package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
- package/{chunk-262R3XNN.js → chunk-FEIVARWR.js} +377 -112
- package/{chunk-3VZLEKV2.js → chunk-FLBJ7IJI.js} +14 -14
- package/{chunk-EEOOBRA7.js → chunk-FXEPZKNJ.js} +13 -6
- package/{chunk-XTJKU3Z4.js → chunk-FYAMUU55.js} +677 -140
- package/{chunk-M3OZRQNH.js → chunk-FZANZZ63.js} +1 -1
- package/chunk-GAHJLSDO.js +107 -0
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-4N6G2CKP.js → chunk-HDKMVYNJ.js} +47 -1
- package/chunk-HEVRQGGH.js +106 -0
- package/{chunk-BIWI5M4E.js → chunk-HFHJPHFK.js} +1 -1
- package/{chunk-R6Z5S5GA.js → chunk-HPDLPEUG.js} +60 -17
- package/{chunk-YKY4OVOX.js → chunk-HQUGB2HM.js} +17 -170
- package/chunk-IIRJ4P4I.js +24 -0
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-ALAES342.js → chunk-IYLUK67R.js} +9 -5
- package/{chunk-N5Z2V73W.js → chunk-J55F3IEZ.js} +1 -1
- package/{chunk-S6FDXXZV.js → chunk-J7JRCOIW.js} +2 -2
- package/{chunk-OWKNSIXL.js → chunk-JAKRY74O.js} +470 -83
- package/{chunk-VS276URX.js → chunk-JCQ3WCQ3.js} +4 -2
- package/chunk-JLZJL3WC.js +988 -0
- package/{chunk-OBSEKCVK.js → chunk-JPXACKSW.js} +219 -52
- package/{chunk-OTKSESZR.js → chunk-KDBDOXOM.js} +138 -54
- package/{chunk-VP3BINY7.js → chunk-KDDHQMSH.js} +31 -1
- package/{chunk-RBPUNSG5.js → chunk-KG27JIG4.js} +18 -108
- package/{chunk-4WVJLODK.js → chunk-KHYSFS3W.js} +88 -7
- package/{chunk-TCZ2VJZQ.js → chunk-KKIQAVDR.js} +9 -9
- package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
- package/chunk-KXOPLLFP.js +190 -0
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-HYLRQDEE.js → chunk-LLUBUHNT.js} +6 -6
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-RTHFJZ6M.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-TI2EPRHE.js → chunk-MNFUKRRU.js} +3 -3
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-CNMY2XM6.js → chunk-O3A2CHAL.js} +6 -6
- package/{chunk-TSPMLCWI.js → chunk-OB4FBZXJ.js} +5 -5
- package/{chunk-LYD6C7OU.js → chunk-OJSJJKHF.js} +6 -6
- package/{chunk-M4SFKP5L.js → chunk-OKAXQFON.js} +3 -3
- package/{chunk-CD3RU7XL.js → chunk-OKH74FML.js} +121 -14
- package/{chunk-U2HBB7RS.js → chunk-OOV5JN25.js} +130 -30
- package/{chunk-ZH3KXFHS.js → chunk-OOVOAG4Q.js} +1 -1
- package/chunk-OQFOE4SJ.js +405 -0
- package/{chunk-M3JEW6N6.js → chunk-OYUMJMC5.js} +15 -0
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-SRCCSTIM.js → chunk-P4R5KXU7.js} +4 -4
- package/{chunk-FJ23FZXF.js → chunk-PHREU2KZ.js} +5 -3
- package/{chunk-HSSBDZLD.js → chunk-PIVTQRX6.js} +43 -13
- package/{chunk-XFXFPUO7.js → chunk-PJL7OJRC.js} +13 -39
- package/{chunk-RRDRQOEC.js → chunk-PNLDLUMO.js} +276 -303
- package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
- package/{chunk-HHFGE2WF.js → chunk-QGFLVQ6E.js} +5 -5
- package/{chunk-EGHP7KOY.js → chunk-QONAOHVW.js} +38 -29
- package/chunk-R3FZHW4Q.js +103 -0
- package/{chunk-ZYKJBRZ3.js → chunk-R3MV2GII.js} +1 -47
- package/chunk-R72QWIFO.js +50 -0
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-ILHQ2AXT.js → chunk-RIWKZT7E.js} +36 -8
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/{chunk-45CAVC35.js → chunk-S7H4KTMB.js} +2568 -337
- package/{chunk-OJ45MEEI.js → chunk-SA356NGW.js} +1 -1
- package/{chunk-F6Z6ZCUV.js → chunk-SCAC3NM5.js} +3 -3
- package/{chunk-YVFH2MFB.js → chunk-SLUN7W6S.js} +7 -7
- package/chunk-SQL7YNED.js +650 -0
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-HF7BLF3F.js → chunk-SSOR2EDT.js} +107 -104
- package/chunk-TRRXYFTR.js +46 -0
- package/{chunk-3QIYD3VM.js → chunk-TUOHSUK5.js} +20068 -18402
- package/chunk-TYJCIA2O.js +835 -0
- package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
- package/{chunk-GAYNXB6T.js → chunk-U3BUWDUP.js} +1031 -2155
- package/{chunk-BP5ZJ6B4.js → chunk-U6QNVOR5.js} +1 -1
- package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
- package/chunk-UAF5VQCE.js +77 -0
- package/{chunk-TQEKUOTI.js → chunk-UFGUJ2IH.js} +12 -12
- package/{chunk-VMJVAJ6W.js → chunk-UP7KBWLE.js} +109 -33
- package/{chunk-2X7WFDT6.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-5YMA6DDZ.js → chunk-UZKBVQUX.js} +1 -1
- package/chunk-V5TI7HJH.js +133 -0
- package/{chunk-WFGNWWJI.js → chunk-VH7UO6E5.js} +252 -114
- package/{chunk-MNEZUL5S.js → chunk-VJFDG3ZG.js} +63 -94
- package/{chunk-G7IUT2V3.js → chunk-WC3J5SL2.js} +635 -350
- package/{chunk-HXB4VDGK.js → chunk-WD5547ZF.js} +33 -30
- package/chunk-WDWZPASX.js +29 -0
- package/{chunk-4ZGPHFLE.js → chunk-WS36XPJD.js} +2 -2
- package/{chunk-6QHKRARD.js → chunk-WSLL7VV4.js} +29 -5
- package/chunk-XRGBJHZX.js +136 -0
- package/{chunk-MZG5CETE.js → chunk-Y2KWJTOZ.js} +4 -4
- package/{dialogUsageCommand-W2WCSGKF.js → chunk-Y2TCTNUD.js} +27 -20
- package/chunk-YJPK35HB.js +175 -0
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-547ENH5T.js → chunk-YN23INFZ.js} +4 -4
- package/{chunk-4QYJPWHH.js → chunk-YXK3GJF5.js} +232 -10
- package/{chunk-MJI3UAXN.js → chunk-Z2OWAYMI.js} +77 -51
- package/{chunk-7Z6EW7AH.js → chunk-ZTHAJU3O.js} +106 -14
- package/{chunk-YFLVRVYK.js → chunk-ZYPXOQS2.js} +1 -1
- package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-BXHQ3PXP.js} +9 -9
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +22 -0
- package/cliLocalAgentRecordReader-47PXMHPH.js +104 -0
- package/{commandRegistry-FVYPE2IN.js → commandRegistry-CTMPAQH2.js} +111 -162
- package/{contentThunks-GNFPG32S.js → contentThunks-CAHIIZO5.js} +38 -36
- package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-WDOI5VD7.js} +3 -3
- package/{createAgentAutomationAction-PB4QIFQ4.js → createAgentAutomationAction-M25XZSPD.js} +38 -36
- package/{createDialogAction-EVTOPY7A.js → createDialogAction-4SN7FKI7.js} +39 -37
- package/{createPageAction-2UYF2IDZ.js → createPageAction-N7QPDN3M.js} +43 -41
- package/{db-M7FU2GNK.js → db-VR74ADGC.js} +7 -2
- package/{dbSlice-XRUZOGSU.js → dbSlice-RWPSVHBC.js} +12 -11
- package/{deleteFile-6URDHYRB.js → deleteFile-ECU6FU5C.js} +15 -7
- package/{dialogCommands-6SZD4TYP.js → dialogCommands-BBHWCKDP.js} +69 -53
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-IASQGEMW.js} +11 -11
- package/{dialogSlice-5EQ2A6LY.js → dialogSlice-JI3J22RV.js} +39 -37
- package/dialogTraceCommand-EW2KK6A4.js +961 -0
- package/dialogUsageCommand-WJ3U6KZU.js +27 -0
- package/{docCreateCommands-25E6PGN3.js → docCreateCommands-QSX3X5U4.js} +57 -46
- package/{docDeleteCommands-F7ZVGEHW.js → docDeleteCommands-63JBG2HQ.js} +59 -48
- package/{docReadCommands-JY2E5XEN.js → docReadCommands-CQFKRQUI.js} +57 -46
- package/{docStore-OKKIKLT3.js → docStore-XLBKGGNM.js} +14 -13
- package/{docUpdateCommands-OZ4CUSIQ.js → docUpdateCommands-534LUK25.js} +57 -46
- package/ebookDownloaderAgentCommand-DYSKF5ZY.js +677 -0
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-5BLZRPTM.js} +4 -4
- package/{handleSendMessageAction-LNT7SZND.js → handleSendMessageAction-Q2VMEVOR.js} +127 -81
- package/{hostCredentialCreate-XUU2CSHI.js → hostCredentialCreate-C57T7YPE.js} +127 -109
- package/index.js +23 -11
- package/{localDialogRead-CCOCVGAP.js → localDialogRead-BJJT3TF5.js} +1 -1
- package/{localRuntimeAdapter-IBSTMSX7.js → localRuntimeAdapter-OALZPFZU.js} +134 -115
- package/localRuntimeAuthority-UF2DAQ3F.js +28 -0
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-ZJFGNHML.js} +1 -1
- package/{machineCommands-HSQHDHOT.js → machineCommands-N6IVWRZT.js} +262 -325
- package/machineWsRunDispatch-PDWYB33B.js +209 -0
- package/markdownToSlate-PXYAIBVL.js +8 -0
- package/mcpLocalAuthorizeCommand-KYI4EGF5.js +110 -0
- package/{memberThunks-7Y3OYSJQ.js → memberThunks-43B7UYC5.js} +21 -16
- package/{models-H5NNZRLH.js → models-ZX2BYIMB.js} +2 -2
- package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
- package/package.json +2 -1
- package/{projectArchive-FQO654Z3.js → projectArchive-TJNW5DLM.js} +46 -44
- package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-NTJUINI6.js} +36 -17
- package/{providerRegistry-ZI2KORJ7.js → providerRegistry-W45SLUV6.js} +6 -6
- package/{read-TYMBGEXO.js → read-KG6INYUT.js} +13 -7
- package/{readDocTool-SKQVHBLO.js → readDocTool-N3GA52JR.js} +1 -1
- package/{readlineWorkspace-7U272DSA.js → readlineWorkspace-PJZJVGA5.js} +7486 -4492
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-EEVSOQOJ.js} +18 -17
- package/{runAgentClientLoop-AF4JQIJ7.js → runAgentClientLoop-3VC5TCDW.js} +107 -76
- package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-V3M3JTUV.js} +14 -11
- package/{secretCommands-KZWBZIYS.js → secretCommands-KVVZS7A6.js} +3 -3
- package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-DNO5POHA.js} +15 -14
- package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-QABBEO4C.js} +18 -17
- package/{settingThunks-ZRGWVGZD.js → settingThunks-DVKG4X4S.js} +181 -66
- package/{skillDiscovery-BHHPCUHZ.js → skillDiscovery-ZMJH36AK.js} +4 -3
- package/{spaceCommands-5VNWMDBE.js → spaceCommands-AGGZXPY3.js} +235 -87
- package/{streamAgentChatTurn-YSPEFY4K.js → streamAgentChatTurn-4GTLL2OF.js} +242 -169
- package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-KYWJSGOO.js} +16 -15
- package/{tableCommands-FTAOCBTX.js → tableCommands-EFA754RE.js} +7 -4
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
- package/{tools-M35PTIFB.js → tools-5AGPOPLW.js} +69 -65
- package/{tuiRestart-2IL37YIB.js → tuiRestart-77E7PL4R.js} +11 -10
- package/{tuiSummaryLlmCaller-W2QN4VAC.js → tuiSummaryLlmCaller-HROLGN4F.js} +16 -15
- package/{updateCommands-CPATDG6J.js → updateCommands-GJGRS6JK.js} +3 -3
- package/{updateDialogTitleAction-IMIRJRQQ.js → updateDialogTitleAction-5OSEDGRK.js} +40 -38
- package/{usageCommand-2BF74MKF.js → usageCommand-WI6SQOPB.js} +2 -2
- package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-WQRLLZAT.js} +3 -3
- package/webapi-QVV65DQF.js +2487 -0
- package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-C7LGVWYX.js} +2 -2
- package/workContext-Y3ADAPZU.js +14 -0
- package/workContextAccess-VU5I4LKZ.js +11 -0
- package/workContextWriteNotice-YCSSMHN4.js +7 -0
- package/{workloadLifecycle-HFJIN5IZ.js → workloadLifecycle-P2SJVV3S.js} +2 -2
- package/agentRecordCommands-IZYUVHME.js +0 -177
- package/agentRunCommand-QM7ETUTX.js +0 -209
- package/chunk-2YGBI2XB.js +0 -30
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-5ZUOVCKT.js +0 -32
- package/chunk-62HXNQVV.js +0 -134
- package/chunk-FJSNBZXR.js +0 -142
- package/chunk-FPBJM2BW.js +0 -689
- package/chunk-JQZRSXS5.js +0 -90
- package/chunk-P2ZLUIW2.js +0 -795
- package/chunk-PPJYZRSQ.js +0 -160
- package/chunk-TUSTONB3.js +0 -81
- package/chunk-ZXF6D3I6.js +0 -359
- package/cliLocalAgentRecordReader-H3HYQRRR.js +0 -91
- package/lib-OT5OTXRU.js +0 -21046
- package/localRuntimeAuthority-IBJAT62G.js +0 -16
- package/machineWsRunDispatch-L6H7J66T.js +0 -192
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
|
@@ -206,7 +206,7 @@ async function readDocFunc(args, thunkApi) {
|
|
|
206
206
|
throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
|
|
207
207
|
}
|
|
208
208
|
try {
|
|
209
|
-
const { readAction } = await import("./read-
|
|
209
|
+
const { readAction } = await import("./read-KG6INYUT.js");
|
|
210
210
|
const pageData = await readAction({ dbKey: id }, thunkApi);
|
|
211
211
|
if (!pageData) {
|
|
212
212
|
throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
|
|
@@ -249,13 +249,29 @@ async function screenshotResult(result) {
|
|
|
249
249
|
return {
|
|
250
250
|
content: `${JSON.stringify({ ok: true, result: { ...summary, savedTo: path } })}
|
|
251
251
|
${formatImageSummary({ kind: "screenshot", ...image.imageSummary })}`,
|
|
252
|
-
images: image.images
|
|
252
|
+
images: image.images,
|
|
253
|
+
metadata: {
|
|
254
|
+
ok: true,
|
|
255
|
+
imageDelivered: true,
|
|
256
|
+
savedTo: path,
|
|
257
|
+
imageArtifacts: [{
|
|
258
|
+
path: image.imageSummary.path,
|
|
259
|
+
kind: "screenshot",
|
|
260
|
+
width: image.imageSummary.width,
|
|
261
|
+
height: image.imageSummary.height,
|
|
262
|
+
bytes: image.imageSummary.bytes
|
|
263
|
+
}]
|
|
264
|
+
}
|
|
253
265
|
};
|
|
254
266
|
} catch (error) {
|
|
255
267
|
return {
|
|
256
268
|
content: `${JSON.stringify({ ok: true, result: { ...summary, ...path ? { savedTo: path } : {} } })}
|
|
257
269
|
${path ? `screenshot saved to ${path}
|
|
258
|
-
` : ""}Screenshot image not delivered (\u672A\u6295\u9012): ${toErrorMessage(error)}
|
|
270
|
+
` : ""}Screenshot image not delivered (\u672A\u6295\u9012): ${toErrorMessage(error)}`,
|
|
271
|
+
metadata: {
|
|
272
|
+
ok: false,
|
|
273
|
+
imageDelivered: false
|
|
274
|
+
}
|
|
259
275
|
};
|
|
260
276
|
}
|
|
261
277
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// packages/agent-runtime/memoryUseGuidance.ts
|
|
2
|
+
var MEMORY_USE_GUIDANCE = `--- \u8BB0\u5FC6\u4F7F\u7528\u65B9\u5F0F ---
|
|
3
|
+
- \u4F18\u5148\u7EA7\uFF1A\u8BB0\u5FC6\u662F\u4E2A\u6027\u5316\u589E\u5F3A\u5C42\uFF0C\u4F4E\u4E8E\u5F53\u524D\u8F93\u5165/\u5BF9\u8BDD/\u7CFB\u7EDF\u89C4\u5219/prompt/skill/\u5168\u5C40\u504F\u597D\u3002\u5F53\u524D\u8F93\u5165\u7ED9\u51FA\u65B0\u8BED\u8A00\u3001\u6280\u672F\u6808\u3001\u6570\u503C\u3001\u7EA6\u675F\u6216\u660E\u786E\u8986\u76D6\u65E7\u504F\u597D\u65F6\uFF0C\u91C7\u7528\u5F53\u524D\u8F93\u5165\uFF0C\u4E0D\u8981\u628A\u65E7\u8BB0\u5FC6\u5F53\u66F4\u9AD8\u771F\u503C\u3002
|
|
4
|
+
- \u5448\u73B0\u4E0E\u5B9A\u4F4D\uFF1A\u8EAB\u4EFD/\u504F\u597D/\u80CC\u666F\u5728\u76F8\u5173\u5904\u81EA\u7136\u4F53\u73B0\uFF08\u5F00\u573A\u79F0\u547C\u3001\u4E0A\u4E0B\u6587\u786E\u8BA4\u3001\u56DE\u7B54\u7ED3\u6784\u3001\u53D6\u820D\u6807\u51C6\uFF09\uFF0C\u4E0D\u8981\u6BCF\u53E5\u673A\u68B0\u79F0\u547C\u7528\u6237\uFF1B\u201C\u4E0A\u6B21/\u7EE7\u7EED/\u8FD9\u4E2A\u9879\u76EE\u201D\u4F18\u5148\u6309\u5F53\u524D dialog/space/project/agent/sourceDialog \u7B49 KV \u8DEF\u5F84\u548C\u65F6\u95F4\u7EBF\u5B9A\u4F4D\uFF0C\u4E0D\u8981\u53EA\u6309\u8BED\u4E49\u76F8\u4F3C\u5EA6\u635E\u4E00\u6761\u3002
|
|
5
|
+
- \u63A8\u65AD\u4E0E\u504F\u597D\u6F14\u5316\uFF1A\u63A8\u65AD\u578B\u8BB0\u5FC6\uFF08inferred\uFF09\u53EA\u7528\u4E8E\u628A\u63E1\u8BED\u6C14\u3001\u72B6\u6001\u548C\u672A\u5B8C\u6210\u4E8B\u9879\uFF0C\u4E0D\u8981\u8BF4\u6210\u201C\u4F60\u660E\u786E\u544A\u8BC9\u8FC7\u6211\u201D\uFF0C\u51B2\u7A81\u65F6\u8BF4\u660E\u4F9D\u636E\u6216\u786E\u8BA4\uFF1B\u8DE8\u4F1A\u8BDD\u660E\u786E\u504F\u597D\u8BB0 stated\uFF0C\u53CD\u590D\u89C2\u5BDF\u53EF\u8BB0 inferred\uFF0C\u4E00\u6B21\u6027\u63AA\u8F9E\u4E0D\u56FA\u5316\uFF1B\u7B80\u6D01/\u8BED\u6C14\u504F\u597D\u4E0D\u7701\u7565\u5FC5\u8981\u4E8B\u5B9E\u3001\u98CE\u9669\u6216\u6743\u9650\u8FB9\u754C\u3002\u7F6E\u4FE1\u5EA6\uFF08verified/stated/inferred\uFF09\u3001\u53EC\u56DE\u4E0E\u5220\u9664\u8FB9\u754C\u4EE5\u5DE5\u5177 schema \u4E3A\u51C6\u3002
|
|
6
|
+
- \u5DE5\u4F5C\u63A5\u7EED\uFF08\u975E\u957F\u671F\u504F\u597D\uFF0C\u4EA6\u975E\u6267\u884C\u771F\u6E90\uFF09\uFF1A\u662F\u5F85\u6838\u5B9E\u7D22\u5F15\uFF0C\u4E0D\u4E0E\u504F\u597D\u6DF7\u5199\u3002\u72B6\u6001\uFF08active/paused/completed/cancelled\uFF09\u53EA\u662F\u5199\u5165\u65F6\u5224\u65AD\uFF0C\u975E\u6388\u6743\u6216\u9A8C\u6536\uFF1Bcompleted \u53EF\u6838\u5B9E\u56DE\u6539 active\uFF0Cpaused/cancelled \u4E0D\u81EA\u52A8\u6062\u590D\u4E5F\u4E0D\u5F97\u62D2\u7528\u6237\u7EE7\u7EED\uFF0C\u5F53\u524D\u6307\u4EE4\u4F18\u5148\u3002\u4EC5\u5728\u589E\u91CF\u4E8B\u4EF6\uFF08\u4EA4\u529E/\u53D8\u66F4/\u5173\u952E\u7ED3\u679C/\u72B6\u6001\u53D8\u5316\uFF09\u66F4\u65B0\u3001\u91CD\u8BD5\u590D\u7528\u540C\u6761\u4E0D\u9020\u526F\u672C\uFF1B\u884C\u52A8\u524D\u6309\u6765\u6E90\u6838\u5B9E\u73B0\u72B6\uFF0C\u201C\u505A\u5B8C\u4E86\u201D\u987B\u6709\u53EF\u6838\u5B9E\u8303\u56F4\u3002
|
|
7
|
+
- \u5DE5\u5177\u4E0E\u53EF\u9760\u6027\uFF1A\u4EC5\u5728\u5DE5\u5177\u63D0\u4F9B\u5DE5\u4F5C\u63A5\u7EED\u5206\u652F\u65F6\u4F7F\u7528\uFF0C\u53C2\u6570\u4EE5\u5DE5\u5177 schema \u4E3A\u51C6\uFF0C\u4E0D\u865A\u6784\u63A5\u53E3\uFF1B\u8BFB\u5199\u5931\u8D25\u5982\u5B9E\u62A5\u544A\u3001\u4E0D\u8C0E\u62A5\u4E5F\u4E0D\u4E2D\u65AD\u5BF9\u8BDD\uFF0C\u672C\u5730\u4F18\u5148\u4E0D\u627F\u8BFA\u79BB\u7EBF\u8DE8\u7AEF\u540C\u6B65\u3002
|
|
8
|
+
- \u8DE8\u4F1A\u8BDD\u6253\u6270\u504F\u597D\uFF08\u975E\u4E00\u6B21\u6027\u8981\u6C42\uFF09\u7528 rememberMemory \u8BB0\u4E3A\u7528\u6237\u504F\u597D\uFF0C\u6309\u5176\u8C03\u6574 ignore/FYI/important \u8BE6\u7565\uFF0C\u4F46\u7EDD\u4E0D\u9759\u9ED8 decision/blocked/failed\u3002`;
|
|
9
|
+
|
|
10
|
+
// packages/agent-runtime/userResponseLanguage.ts
|
|
11
|
+
var LANGUAGE_NAMES = {
|
|
12
|
+
en: "English",
|
|
13
|
+
"en-US": "English",
|
|
14
|
+
"en-GB": "English",
|
|
15
|
+
zh: "Simplified Chinese",
|
|
16
|
+
"zh-CN": "Simplified Chinese",
|
|
17
|
+
"zh-TW": "Traditional Chinese",
|
|
18
|
+
"zh-HK": "Traditional Chinese",
|
|
19
|
+
ja: "Japanese",
|
|
20
|
+
"ja-JP": "Japanese",
|
|
21
|
+
ko: "Korean",
|
|
22
|
+
"ko-KR": "Korean",
|
|
23
|
+
fr: "French",
|
|
24
|
+
de: "German",
|
|
25
|
+
es: "Spanish",
|
|
26
|
+
pt: "Portuguese",
|
|
27
|
+
ru: "Russian"
|
|
28
|
+
};
|
|
29
|
+
var LANGUAGE_DISPLAY_NAMES = new Intl.DisplayNames(["en"], {
|
|
30
|
+
type: "language"
|
|
31
|
+
});
|
|
32
|
+
var asLocale = (value) => typeof value === "string" ? value.trim().split(".", 1)[0]?.replace(/_/g, "-") ?? "" : "";
|
|
33
|
+
var normalizeLocale = (value) => {
|
|
34
|
+
if (!value) return "en-US";
|
|
35
|
+
let locale;
|
|
36
|
+
try {
|
|
37
|
+
locale = new Intl.Locale(value);
|
|
38
|
+
} catch {
|
|
39
|
+
return "en-US";
|
|
40
|
+
}
|
|
41
|
+
const language = locale.language.toLowerCase();
|
|
42
|
+
const region = locale.region?.toUpperCase();
|
|
43
|
+
const script = locale.script;
|
|
44
|
+
if (language === "zh") {
|
|
45
|
+
if (script === "Hant" || region === "TW" || region === "HK" || region === "MO") {
|
|
46
|
+
return "zh-TW";
|
|
47
|
+
}
|
|
48
|
+
return "zh-CN";
|
|
49
|
+
}
|
|
50
|
+
if (language === "en") return region === "GB" ? "en-GB" : "en-US";
|
|
51
|
+
if (region) return `${language}-${region}`;
|
|
52
|
+
return language;
|
|
53
|
+
};
|
|
54
|
+
var resolveUserResponseLanguage = (input = {}) => {
|
|
55
|
+
const raw = asLocale(input.language) || "en-US";
|
|
56
|
+
const locale = normalizeLocale(raw);
|
|
57
|
+
return {
|
|
58
|
+
locale,
|
|
59
|
+
languageName: LANGUAGE_NAMES[locale] ?? LANGUAGE_NAMES[locale.split("-")[0]] ?? LANGUAGE_DISPLAY_NAMES.of(locale) ?? locale
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
var buildUserResponseLanguageContext = (input = {}) => {
|
|
63
|
+
const { locale, languageName } = resolveUserResponseLanguage(input);
|
|
64
|
+
return [
|
|
65
|
+
"--- \u5E73\u53F0\u56DE\u590D\u8BED\u8A00\u7B56\u7565 ---",
|
|
66
|
+
`\u7528\u6237\u5BA2\u6237\u7AEF\u8BED\u8A00\uFF1A${languageName}\uFF08${locale}\uFF09`,
|
|
67
|
+
"\u9ED8\u8BA4\u4F7F\u7528\u7528\u6237\u5BA2\u6237\u7AEF\u8BED\u8A00\u56DE\u590D\u3002",
|
|
68
|
+
"\u7528\u6237\u5728\u5F53\u524D\u5BF9\u8BDD\u4E2D\u660E\u786E\u8981\u6C42\u4F7F\u7528\u5176\u4ED6\u8BED\u8A00\u65F6\uFF0C\u9075\u5FAA\u7528\u6237\u7684\u660E\u786E\u8981\u6C42\u3002",
|
|
69
|
+
"\u5355\u4E2A\u901A\u7528\u8BCD\u6216\u77ED\u8BED\uFF08\u4F8B\u5982 hi\u3001ok\u3001thanks\uFF09\u4E0D\u6539\u53D8\u5DF2\u7ECF\u5EFA\u7ACB\u7684\u4EA4\u6D41\u8BED\u8A00\u3002",
|
|
70
|
+
"Agent \u7684\u89D2\u8272\u3001skill\u3001model \u4E0D\u5F97\u81EA\u884C\u8986\u76D6\u8FD9\u6761\u5E73\u53F0\u56DE\u590D\u8BED\u8A00\u7B56\u7565\u3002"
|
|
71
|
+
].join("\n");
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export {
|
|
75
|
+
MEMORY_USE_GUIDANCE,
|
|
76
|
+
buildUserResponseLanguageContext
|
|
77
|
+
};
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDefaultReasoningEffort
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
buildRestorePatch
|
|
6
|
-
} from "./chunk-BV3FLP2L.js";
|
|
3
|
+
} from "./chunk-PNLDLUMO.js";
|
|
7
4
|
import {
|
|
8
5
|
buildLocalAgentLookupKeys,
|
|
9
6
|
shouldReadAgentKeyRemotely
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
resolveCliAgentKeyInput
|
|
13
|
-
} from "./chunk-BR3GT6MR.js";
|
|
7
|
+
} from "./chunk-SA356NGW.js";
|
|
14
8
|
import {
|
|
15
9
|
createHostCredentialBrokerChain,
|
|
16
10
|
createStrictHostCredentialBroker
|
|
17
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EHFBP6IK.js";
|
|
18
12
|
import {
|
|
19
13
|
collectInvalidAgentSkillModes,
|
|
20
14
|
formatInvalidAgentSkillModeMessage,
|
|
21
15
|
formatInvalidAgentSkillModesFieldMessage,
|
|
22
16
|
isAgentSkillModesFieldShapeValid
|
|
23
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VH7UO6E5.js";
|
|
24
18
|
import {
|
|
25
19
|
buildAgentApiKeyCredentialRef,
|
|
26
20
|
migrateAgentSecrets
|
|
@@ -28,10 +22,16 @@ import {
|
|
|
28
22
|
import {
|
|
29
23
|
assertCredentialRef,
|
|
30
24
|
createFileCredentialBroker
|
|
31
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-E6A5NHDH.js";
|
|
26
|
+
import {
|
|
27
|
+
buildRestorePatch
|
|
28
|
+
} from "./chunk-BV3FLP2L.js";
|
|
32
29
|
import {
|
|
33
30
|
createAgentKey
|
|
34
31
|
} from "./chunk-SYTHYBMI.js";
|
|
32
|
+
import {
|
|
33
|
+
resolveCliAgentKeyInput
|
|
34
|
+
} from "./chunk-BR3GT6MR.js";
|
|
35
35
|
import {
|
|
36
36
|
parseUserIdFromAuthToken,
|
|
37
37
|
readOption,
|
|
@@ -766,7 +766,7 @@ async function buildCreatedAgentRecord(args) {
|
|
|
766
766
|
const resolvedAgentInput = resolveCliAgentKeyInput(args.parsed.agentInput);
|
|
767
767
|
const agentKey = resolvedAgentInput.startsWith("agent-") ? resolvedAgentInput : createAgentKey.private(userId || "local", resolvedAgentInput);
|
|
768
768
|
if (args.parsed.presetId) {
|
|
769
|
-
const { resolveProviderPresetFields } = await import("./providerPresetApply-
|
|
769
|
+
const { resolveProviderPresetFields } = await import("./providerPresetApply-NTJUINI6.js");
|
|
770
770
|
const fields = resolveProviderPresetFields(args.parsed.presetId);
|
|
771
771
|
if (fields.kind === "manual") {
|
|
772
772
|
throw new Error(
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
toErrorMessage
|
|
9
9
|
} from "./chunk-HNMXYYJR.js";
|
|
10
|
-
import {
|
|
11
|
-
isRecord
|
|
12
|
-
} from "./chunk-KUG52IAP.js";
|
|
13
10
|
import {
|
|
14
11
|
asOptionalFiniteNumber
|
|
15
12
|
} from "./chunk-WWC7I6TA.js";
|
|
13
|
+
import {
|
|
14
|
+
isRecord
|
|
15
|
+
} from "./chunk-KUG52IAP.js";
|
|
16
16
|
import {
|
|
17
17
|
asOptionalTrimmedString
|
|
18
18
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -166,6 +166,7 @@ function mintTaskId(pid) {
|
|
|
166
166
|
var ProcessRegistry = class {
|
|
167
167
|
processes = /* @__PURE__ */ new Map();
|
|
168
168
|
byTaskId = /* @__PURE__ */ new Map();
|
|
169
|
+
liveOutputs = /* @__PURE__ */ new Map();
|
|
169
170
|
eventLog;
|
|
170
171
|
terminalListeners = /* @__PURE__ */ new Set();
|
|
171
172
|
backgroundListeners = /* @__PURE__ */ new Set();
|
|
@@ -233,6 +234,12 @@ var ProcessRegistry = class {
|
|
|
233
234
|
transient: proc.transient ?? false,
|
|
234
235
|
owner: proc.owner ?? null
|
|
235
236
|
};
|
|
237
|
+
const existing = this.processes.get(proc.pid);
|
|
238
|
+
if (existing && existing.taskId !== record.taskId) {
|
|
239
|
+
this.byTaskId.delete(existing.taskId);
|
|
240
|
+
this.liveOutputs.get(existing.taskId)?.markClosed();
|
|
241
|
+
this.liveOutputs.delete(existing.taskId);
|
|
242
|
+
}
|
|
236
243
|
this.processes.set(proc.pid, record);
|
|
237
244
|
this.byTaskId.set(record.taskId, proc.pid);
|
|
238
245
|
this.eventLog.append({ taskId: record.taskId, pid: proc.pid, type: "started" });
|
|
@@ -262,7 +269,21 @@ var ProcessRegistry = class {
|
|
|
262
269
|
}
|
|
263
270
|
getByTaskId(taskId) {
|
|
264
271
|
const pid = this.byTaskId.get(taskId);
|
|
265
|
-
|
|
272
|
+
if (pid === void 0) return void 0;
|
|
273
|
+
const item = this.processes.get(pid);
|
|
274
|
+
if (!item || item.taskId !== taskId) return void 0;
|
|
275
|
+
return { ...item };
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Attach a live stdout/stderr output handle to a tracked task (kept outside
|
|
279
|
+
* RegisteredProcess so list()/get() clones and JSON views stay payload-free).
|
|
280
|
+
*/
|
|
281
|
+
attachLiveOutput(taskId, liveOutput) {
|
|
282
|
+
if (!this.byTaskId.has(taskId)) return;
|
|
283
|
+
this.liveOutputs.set(taskId, liveOutput);
|
|
284
|
+
}
|
|
285
|
+
getLiveOutput(taskId) {
|
|
286
|
+
return this.liveOutputs.get(taskId);
|
|
266
287
|
}
|
|
267
288
|
/** Append-only lifecycle events of a task with `seq > cursor` (ascending). */
|
|
268
289
|
getTaskEvents(taskId, cursor = 0) {
|
|
@@ -324,6 +345,7 @@ var ProcessRegistry = class {
|
|
|
324
345
|
}
|
|
325
346
|
item.status = "stopped";
|
|
326
347
|
item.endedAt = Date.now();
|
|
348
|
+
this.liveOutputs.get(item.taskId)?.markClosed();
|
|
327
349
|
if (!item.transient) this.emitBackgroundChange();
|
|
328
350
|
this.eventLog.append({ taskId: item.taskId, pid, type: "killed" });
|
|
329
351
|
this.emitTerminal({
|
|
@@ -356,6 +378,7 @@ var ProcessRegistry = class {
|
|
|
356
378
|
}
|
|
357
379
|
item.status = "stopped";
|
|
358
380
|
item.endedAt = Date.now();
|
|
381
|
+
this.liveOutputs.get(item.taskId)?.markClosed();
|
|
359
382
|
if (!item.transient) this.emitBackgroundChange();
|
|
360
383
|
this.eventLog.append({ taskId: item.taskId, pid: item.pid, type: "killed" });
|
|
361
384
|
this.emitTerminal({
|
|
@@ -369,13 +392,17 @@ var ProcessRegistry = class {
|
|
|
369
392
|
}
|
|
370
393
|
}
|
|
371
394
|
}
|
|
372
|
-
markExited(pid, exitCode, resultCapsule) {
|
|
395
|
+
markExited(pid, exitCode, resultCapsule, expectedTaskId) {
|
|
373
396
|
const item = this.processes.get(pid);
|
|
397
|
+
if (expectedTaskId !== void 0 && item !== void 0 && item.taskId !== expectedTaskId) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
374
400
|
if (item && item.status === "running") {
|
|
375
401
|
item.exitCode = exitCode;
|
|
376
402
|
if (resultCapsule) item.resultCapsule = resultCapsule;
|
|
377
403
|
item.status = exitCode === 0 ? "exited" : "failed";
|
|
378
404
|
item.endedAt = Date.now();
|
|
405
|
+
this.liveOutputs.get(item.taskId)?.markClosed();
|
|
379
406
|
if (!item.transient) this.emitBackgroundChange();
|
|
380
407
|
this.eventLog.append({
|
|
381
408
|
taskId: item.taskId,
|
|
@@ -406,6 +433,8 @@ var ProcessRegistry = class {
|
|
|
406
433
|
const item = this.processes.get(pid);
|
|
407
434
|
if (!item || item.promoted) return;
|
|
408
435
|
this.eventLog.append({ taskId: item.taskId, pid, type: "exited", exitCode });
|
|
436
|
+
this.liveOutputs.get(item.taskId)?.markClosed();
|
|
437
|
+
this.liveOutputs.delete(item.taskId);
|
|
409
438
|
this.processes.delete(pid);
|
|
410
439
|
this.byTaskId.delete(item.taskId);
|
|
411
440
|
}
|
|
@@ -413,12 +442,18 @@ var ProcessRegistry = class {
|
|
|
413
442
|
remove(pid) {
|
|
414
443
|
const item = this.processes.get(pid);
|
|
415
444
|
if (!item) return false;
|
|
445
|
+
this.liveOutputs.get(item.taskId)?.markClosed();
|
|
446
|
+
this.liveOutputs.delete(item.taskId);
|
|
416
447
|
this.processes.delete(pid);
|
|
417
448
|
this.byTaskId.delete(item.taskId);
|
|
418
449
|
if (!item.transient) this.emitBackgroundChange();
|
|
419
450
|
return true;
|
|
420
451
|
}
|
|
421
452
|
clear() {
|
|
453
|
+
for (const liveOutput of this.liveOutputs.values()) {
|
|
454
|
+
liveOutput.markClosed();
|
|
455
|
+
}
|
|
456
|
+
this.liveOutputs.clear();
|
|
422
457
|
this.processes.clear();
|
|
423
458
|
this.byTaskId.clear();
|
|
424
459
|
this.eventLog.clear();
|
|
@@ -1102,10 +1137,34 @@ function buildProcessTaskResultCapsule(args) {
|
|
|
1102
1137
|
}
|
|
1103
1138
|
|
|
1104
1139
|
// packages/agent-runtime/workspaceShell.ts
|
|
1140
|
+
var confidentialShell = new AsyncLocalStorage();
|
|
1105
1141
|
var shellChildEnvironment = new AsyncLocalStorage();
|
|
1106
1142
|
function withShellChildEnvironment(env, run) {
|
|
1107
1143
|
return shellChildEnvironment.run(env, run);
|
|
1108
1144
|
}
|
|
1145
|
+
var STRIPPED_WORKSPACE_CHILD_ENV_KEYS = [
|
|
1146
|
+
"NOLO_AGENT_RUN_ID",
|
|
1147
|
+
"NOLO_AGENT_RUN_PROTOCOL",
|
|
1148
|
+
"NOLO_AGENT_RUN_CONTENT_IDENTITY",
|
|
1149
|
+
"NOLO_WRITER_LAUNCH_ATTEMPT"
|
|
1150
|
+
];
|
|
1151
|
+
var STRIPPED_WORKSPACE_CHILD_ENV_UPPER = new Set(STRIPPED_WORKSPACE_CHILD_ENV_KEYS);
|
|
1152
|
+
function workspaceChildEnv(env = process.env, platform = process.platform) {
|
|
1153
|
+
const child = { ...env };
|
|
1154
|
+
if (platform === "win32") {
|
|
1155
|
+
const asciiUpper = (value) => value.replace(/[a-z]/g, (ch) => ch.toUpperCase());
|
|
1156
|
+
for (const key of Object.keys(child)) {
|
|
1157
|
+
if (STRIPPED_WORKSPACE_CHILD_ENV_UPPER.has(asciiUpper(key))) {
|
|
1158
|
+
delete child[key];
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
} else {
|
|
1162
|
+
for (const key of STRIPPED_WORKSPACE_CHILD_ENV_KEYS) {
|
|
1163
|
+
delete child[key];
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
return child;
|
|
1167
|
+
}
|
|
1109
1168
|
var EXEC_SHELL_TIMEOUT_ENV = "NOLO_EXEC_SHELL_TIMEOUT_MS";
|
|
1110
1169
|
var EXEC_SHELL_DETACH_ENV = "NOLO_EXEC_SHELL_DETACH_MS";
|
|
1111
1170
|
var DEFAULT_EXEC_SHELL_DETACH_MS = 12e4;
|
|
@@ -1587,6 +1646,10 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
|
|
|
1587
1646
|
if (captureResolved) return;
|
|
1588
1647
|
await settleSpillRetention();
|
|
1589
1648
|
if (captureResolved) return;
|
|
1649
|
+
if (options.suppressIncomplete && (!sourceEnded || truncatedNow)) {
|
|
1650
|
+
resolveCapture("[incomplete confidential output withheld]");
|
|
1651
|
+
return;
|
|
1652
|
+
}
|
|
1590
1653
|
let text = baseText;
|
|
1591
1654
|
if (truncatedNow && spillRetainedPath && sourceEnded && options.maxLines !== void 0) {
|
|
1592
1655
|
resolveCapture(formatSpilledToolOutput({
|
|
@@ -1656,9 +1719,11 @@ function readNodeStream(stream, maxBytesOrOptions = DEFAULT_MAX_STREAM_BUFFER_BY
|
|
|
1656
1719
|
markSpillFailed(new Error(reason));
|
|
1657
1720
|
void settleSpillRetention();
|
|
1658
1721
|
}
|
|
1659
|
-
resolveCapture(
|
|
1722
|
+
resolveCapture(
|
|
1723
|
+
options.suppressIncomplete ? "[incomplete confidential output withheld]" : `${snapshot}
|
|
1660
1724
|
|
|
1661
|
-
[${reason}]`
|
|
1725
|
+
[${reason}]`
|
|
1726
|
+
);
|
|
1662
1727
|
};
|
|
1663
1728
|
capture?.stopSignal.addEventListener("abort", stopCapture, { once: true });
|
|
1664
1729
|
if (capture?.stopSignal.aborted) stopCapture();
|
|
@@ -1765,13 +1830,15 @@ async function runWorkspaceCommand(args) {
|
|
|
1765
1830
|
...args.command
|
|
1766
1831
|
];
|
|
1767
1832
|
const spawnedAt = Date.now();
|
|
1833
|
+
const confidential = confidentialShell.getStore();
|
|
1768
1834
|
const proc = spawnChildProcess(command[0] ?? "", command.slice(1), {
|
|
1769
1835
|
cwd: resolve2(args.workspaceRoot),
|
|
1770
|
-
env: { ...process.env, ...shellChildEnvironment.getStore() },
|
|
1836
|
+
env: workspaceChildEnv({ ...process.env, ...shellChildEnvironment.getStore() }),
|
|
1771
1837
|
stdio: [
|
|
1772
1838
|
args.stdin === void 0 ? "ignore" : "pipe",
|
|
1773
1839
|
"pipe",
|
|
1774
|
-
"pipe"
|
|
1840
|
+
"pipe",
|
|
1841
|
+
...confidential ? ["pipe"] : []
|
|
1775
1842
|
],
|
|
1776
1843
|
detached,
|
|
1777
1844
|
// Windows: a child spawned from a console-less parent (e.g. a detached run) would
|
|
@@ -1782,6 +1849,13 @@ async function runWorkspaceCommand(args) {
|
|
|
1782
1849
|
proc.stdin.write(args.stdin);
|
|
1783
1850
|
proc.stdin.end();
|
|
1784
1851
|
}
|
|
1852
|
+
if (confidential) {
|
|
1853
|
+
const fd = proc.stdio[3];
|
|
1854
|
+
fd.on("error", () => {
|
|
1855
|
+
proc.kill();
|
|
1856
|
+
});
|
|
1857
|
+
fd.end(confidential.bwrapArgs);
|
|
1858
|
+
}
|
|
1785
1859
|
const label = args.label?.trim() || deriveLabel(args.command.join(" "));
|
|
1786
1860
|
const registry2 = getProcessRegistry();
|
|
1787
1861
|
if (typeof proc.pid === "number") {
|
|
@@ -1823,36 +1897,33 @@ async function runWorkspaceCommand(args) {
|
|
|
1823
1897
|
process.removeListener("SIGINT", cleanupChildOnHostSignal);
|
|
1824
1898
|
};
|
|
1825
1899
|
const captureCutoff = new AbortController();
|
|
1900
|
+
const captureOptions = (suffix) => ({
|
|
1901
|
+
maxBytes: TOOL_OUTPUT_SPILL_BYTES,
|
|
1902
|
+
maxLines: TOOL_OUTPUT_SPILL_LINES,
|
|
1903
|
+
...confidential ? { suppressIncomplete: true } : {
|
|
1904
|
+
spillPath: join3(tmpdir(), `nolo-stream-${randomUUID2()}${suffix}.log`),
|
|
1905
|
+
spillRetention: "promote",
|
|
1906
|
+
spillWorkspaceRoot: args.workspaceRoot
|
|
1907
|
+
}
|
|
1908
|
+
});
|
|
1826
1909
|
let stdoutIncomplete;
|
|
1827
1910
|
let stderrIncomplete;
|
|
1828
1911
|
const stdoutCapture = stdoutPromiseResult(
|
|
1829
|
-
readNodeStream(proc.stdout, {
|
|
1830
|
-
maxBytes: TOOL_OUTPUT_SPILL_BYTES,
|
|
1831
|
-
maxLines: TOOL_OUTPUT_SPILL_LINES,
|
|
1832
|
-
spillPath: join3(tmpdir(), `nolo-stream-${randomUUID2()}.log`),
|
|
1833
|
-
spillRetention: "promote",
|
|
1834
|
-
spillWorkspaceRoot: args.workspaceRoot
|
|
1835
|
-
}, {
|
|
1912
|
+
readNodeStream(proc.stdout, captureOptions(""), {
|
|
1836
1913
|
stopSignal: captureCutoff.signal,
|
|
1837
1914
|
onIncomplete: (reason) => {
|
|
1838
1915
|
stdoutIncomplete = reason;
|
|
1839
1916
|
}
|
|
1840
1917
|
})
|
|
1841
|
-
).then((result) => ({ ...result, error: result.error || stdoutIncomplete }));
|
|
1918
|
+
).then((result) => ({ ...result, value: confidential ? confidential.redact(result.value) : result.value, error: result.error || stdoutIncomplete }));
|
|
1842
1919
|
const stderrCapture = stdoutPromiseResult(
|
|
1843
|
-
readNodeStream(proc.stderr, {
|
|
1844
|
-
maxBytes: TOOL_OUTPUT_SPILL_BYTES,
|
|
1845
|
-
maxLines: TOOL_OUTPUT_SPILL_LINES,
|
|
1846
|
-
spillPath: join3(tmpdir(), `nolo-stream-${randomUUID2()}-stderr.log`),
|
|
1847
|
-
spillRetention: "promote",
|
|
1848
|
-
spillWorkspaceRoot: args.workspaceRoot
|
|
1849
|
-
}, {
|
|
1920
|
+
readNodeStream(proc.stderr, captureOptions("-stderr"), {
|
|
1850
1921
|
stopSignal: captureCutoff.signal,
|
|
1851
1922
|
onIncomplete: (reason) => {
|
|
1852
1923
|
stderrIncomplete = reason;
|
|
1853
1924
|
}
|
|
1854
1925
|
})
|
|
1855
|
-
).then((result) => ({ ...result, error: result.error || stderrIncomplete }));
|
|
1926
|
+
).then((result) => ({ ...result, value: confidential ? confidential.redact(result.value) : result.value, error: result.error || stderrIncomplete }));
|
|
1856
1927
|
const exitPromise = processExitPromise.then(async (code) => {
|
|
1857
1928
|
const drainTimer = setTimeout(() => captureCutoff.abort(), 2e3);
|
|
1858
1929
|
try {
|
|
@@ -2036,7 +2107,11 @@ Use listProcesses to inspect or stop it.`,
|
|
|
2036
2107
|
label,
|
|
2037
2108
|
taskId,
|
|
2038
2109
|
status: "running",
|
|
2039
|
-
...immediate ? { reason: "long-running-command" } : {}
|
|
2110
|
+
...immediate ? { reason: "long-running-command" } : {},
|
|
2111
|
+
// 近场行动约束:这条回执正好出现在模型决定「继续还是收尾」的位置。
|
|
2112
|
+
// 同类规则在静态提示词里已重复 5 处(并行块/工具描述/工具指引/回复准则),
|
|
2113
|
+
// 但都沉在数万 token 之前,容易被「回执已收到、先汇报」的局部惯性盖过。
|
|
2114
|
+
turnAction: "This task is tracked. Do NOT end this turn to wait if any other independent authorized work remains \u2014 invoke tools for it now. End the turn only when no independent work is left."
|
|
2040
2115
|
})
|
|
2041
2116
|
};
|
|
2042
2117
|
}
|
|
@@ -2082,13 +2157,6 @@ ${stderr.trim()}` : "",
|
|
|
2082
2157
|
}
|
|
2083
2158
|
|
|
2084
2159
|
export {
|
|
2085
|
-
countLines,
|
|
2086
|
-
spillToolOutput,
|
|
2087
|
-
formatToolOverflowMarker,
|
|
2088
|
-
TOOL_OUTPUT_SPILL_BYTES,
|
|
2089
|
-
TOOL_OUTPUT_SPILL_LINES,
|
|
2090
|
-
isSpilledToolOutput,
|
|
2091
|
-
spillLargeToolOutput,
|
|
2092
2160
|
resolveExecutableOnPath,
|
|
2093
2161
|
createGlob,
|
|
2094
2162
|
spawnToWebStreams,
|
|
@@ -2096,8 +2164,16 @@ export {
|
|
|
2096
2164
|
reportedTaskStatus,
|
|
2097
2165
|
toProcessTaskView,
|
|
2098
2166
|
getProcessRegistry,
|
|
2167
|
+
countLines,
|
|
2168
|
+
spillToolOutput,
|
|
2169
|
+
formatToolOverflowMarker,
|
|
2170
|
+
TOOL_OUTPUT_SPILL_BYTES,
|
|
2171
|
+
TOOL_OUTPUT_SPILL_LINES,
|
|
2172
|
+
isSpilledToolOutput,
|
|
2173
|
+
spillLargeToolOutput,
|
|
2099
2174
|
buildProcessTaskResultCapsule,
|
|
2100
2175
|
withShellChildEnvironment,
|
|
2176
|
+
workspaceChildEnv,
|
|
2101
2177
|
extractActivity,
|
|
2102
2178
|
findPowerShellExecutable,
|
|
2103
2179
|
buildWorkspaceShellPlan,
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isAccountOnDemandWorkflowSkill,
|
|
3
|
+
resolveUserEnabledSkills
|
|
4
|
+
} from "./chunk-R3FZHW4Q.js";
|
|
5
|
+
import {
|
|
6
|
+
collectAgentSkillConfigIssues,
|
|
7
|
+
describeAgentSkillModeValue,
|
|
8
|
+
isAgentSkillDisabled,
|
|
9
|
+
resolveAgentSkillConfig
|
|
10
|
+
} from "./chunk-VH7UO6E5.js";
|
|
11
|
+
import {
|
|
12
|
+
dedupeSkillPromptPatches,
|
|
13
|
+
resolveBuiltinSkillEntry,
|
|
14
|
+
resolveBuiltinSkillPage,
|
|
15
|
+
resolveSkillGraphFromRoots
|
|
16
|
+
} from "./chunk-WC3J5SL2.js";
|
|
17
|
+
import {
|
|
18
|
+
parseSkillDocProtocol
|
|
19
|
+
} from "./chunk-AETZ7AD6.js";
|
|
20
|
+
|
|
21
|
+
// packages/ai/skills/agentSkillPreferenceDiagnostics.ts
|
|
22
|
+
var hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
|
|
23
|
+
var resolveAgentSkillPreferenceSource = (preferences) => {
|
|
24
|
+
if (!preferences || typeof preferences !== "object") {
|
|
25
|
+
return { source: "empty", field: null };
|
|
26
|
+
}
|
|
27
|
+
if (hasOwn(preferences, "enabledSkills")) {
|
|
28
|
+
return { source: "settings-record", field: "enabledSkills" };
|
|
29
|
+
}
|
|
30
|
+
if (hasOwn(preferences, "enabledPromptSkills")) {
|
|
31
|
+
return { source: "legacy-field", field: "enabledPromptSkills" };
|
|
32
|
+
}
|
|
33
|
+
return { source: "empty", field: null };
|
|
34
|
+
};
|
|
35
|
+
var buildAgentSkillPreferenceDiagnostic = (input) => {
|
|
36
|
+
const { source, field } = resolveAgentSkillPreferenceSource(input.preferences);
|
|
37
|
+
const config = resolveAgentSkillConfig(input.agentConfig);
|
|
38
|
+
const agentSkillModes = {};
|
|
39
|
+
for (const slug of Object.keys(config).sort()) {
|
|
40
|
+
agentSkillModes[slug] = config[slug];
|
|
41
|
+
}
|
|
42
|
+
const discardedSkills = collectAgentSkillConfigIssues(input.agentConfig).map(
|
|
43
|
+
(issue) => ({
|
|
44
|
+
slug: issue.slug,
|
|
45
|
+
value: describeAgentSkillModeValue(issue.value),
|
|
46
|
+
reason: issue.reason
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
return {
|
|
50
|
+
event: "agent_skill_preference_resolved",
|
|
51
|
+
preferenceSource: source,
|
|
52
|
+
preferenceField: field,
|
|
53
|
+
enabledSkills: [...input.enabledSkills],
|
|
54
|
+
enabledSkillCount: input.enabledSkills.length,
|
|
55
|
+
agentSkillModes,
|
|
56
|
+
agentSkillCount: Object.keys(agentSkillModes).length,
|
|
57
|
+
discardedSkills,
|
|
58
|
+
discardedSkillCount: discardedSkills.length
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
var DIAGNOSTIC_PREFIX = "[nolo.skill.diagnostics] ";
|
|
62
|
+
var seenSignatures = /* @__PURE__ */ new Set();
|
|
63
|
+
function skillDiagnosticsEnabled(env = typeof process === "undefined" ? {} : process.env ?? {}) {
|
|
64
|
+
const flag = env.NOLO_SKILL_DIAGNOSTICS?.trim();
|
|
65
|
+
return flag === "1" || flag === "true";
|
|
66
|
+
}
|
|
67
|
+
var reportAgentSkillPreferenceDiagnostic = (diagnostic, sink) => {
|
|
68
|
+
if (!sink && !skillDiagnosticsEnabled()) return false;
|
|
69
|
+
const stderr = typeof process === "undefined" ? void 0 : process.stderr;
|
|
70
|
+
const write = sink ?? (typeof stderr?.write === "function" ? (line) => {
|
|
71
|
+
stderr.write(line);
|
|
72
|
+
} : void 0);
|
|
73
|
+
if (!write) return false;
|
|
74
|
+
const signature = JSON.stringify(diagnostic);
|
|
75
|
+
if (seenSignatures.has(signature)) return false;
|
|
76
|
+
seenSignatures.add(signature);
|
|
77
|
+
write(`${DIAGNOSTIC_PREFIX}${signature}
|
|
78
|
+
`);
|
|
79
|
+
return true;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// packages/ai/skills/userSkillRuntime.ts
|
|
83
|
+
async function resolveUserSkillRuntime(agentConfig, preferences) {
|
|
84
|
+
const effectiveConfig = agentConfig && typeof agentConfig === "object" ? "rawRecord" in agentConfig && agentConfig.rawRecord && typeof agentConfig.rawRecord === "object" ? agentConfig.rawRecord : agentConfig : null;
|
|
85
|
+
const disabledSlugs = /* @__PURE__ */ new Set();
|
|
86
|
+
const requiredSlugs = /* @__PURE__ */ new Set();
|
|
87
|
+
for (const [identifier, mode] of Object.entries(resolveAgentSkillConfig(effectiveConfig))) {
|
|
88
|
+
const entry = resolveBuiltinSkillEntry(identifier);
|
|
89
|
+
if (!entry) continue;
|
|
90
|
+
if (mode === "disabled") disabledSlugs.add(entry.slug);
|
|
91
|
+
if (mode === "required") requiredSlugs.add(entry.slug);
|
|
92
|
+
}
|
|
93
|
+
const enabledSkills = resolveUserEnabledSkills(preferences);
|
|
94
|
+
reportAgentSkillPreferenceDiagnostic(
|
|
95
|
+
buildAgentSkillPreferenceDiagnostic({
|
|
96
|
+
agentConfig: effectiveConfig,
|
|
97
|
+
preferences,
|
|
98
|
+
enabledSkills
|
|
99
|
+
})
|
|
100
|
+
);
|
|
101
|
+
const graph = await resolveSkillGraphFromRoots({
|
|
102
|
+
roots: enabledSkills.map((identifier) => ({
|
|
103
|
+
identifier,
|
|
104
|
+
mode: isAccountOnDemandWorkflowSkill(identifier) && !requiredSlugs.has(identifier) ? "recommended" : "required"
|
|
105
|
+
})),
|
|
106
|
+
loadPage: async (identifier) => {
|
|
107
|
+
const entry = resolveBuiltinSkillEntry(identifier);
|
|
108
|
+
return entry ? resolveBuiltinSkillPage(entry.skillId) : null;
|
|
109
|
+
},
|
|
110
|
+
strictRequiredDependencies: true,
|
|
111
|
+
admitSkill: (page, canonicalIdentifier) => {
|
|
112
|
+
const entry = resolveBuiltinSkillEntry(canonicalIdentifier) ?? resolveBuiltinSkillEntry(page?.dbKey);
|
|
113
|
+
return !!entry && !disabledSlugs.has(entry.slug) && !isAgentSkillDisabled(effectiveConfig, entry.slug);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
const admittedKeys = new Set(graph.visits.map((visit) => visit.dbKey));
|
|
117
|
+
const contentByKey = new Map(
|
|
118
|
+
[...graph.contentByKey].filter(([, page]) => page?.dbKey && admittedKeys.has(page.dbKey))
|
|
119
|
+
);
|
|
120
|
+
const skillPromptContributions = dedupeSkillPromptPatches(graph.visits.flatMap((visit) => {
|
|
121
|
+
const entry = resolveBuiltinSkillEntry(visit.meta?.skillConfig?.id) ?? resolveBuiltinSkillEntry(visit.dbKey);
|
|
122
|
+
if (visit.mode !== "required" || !entry) return [];
|
|
123
|
+
const page = contentByKey.get(visit.dbKey);
|
|
124
|
+
const content = (visit.meta?.skillConfig?.promptPatch || parseSkillDocProtocol(page?.content ?? "", visit.meta).content).trim();
|
|
125
|
+
return content ? [{ skillId: entry.skillId, content }] : [];
|
|
126
|
+
}));
|
|
127
|
+
const skillPromptPatches = skillPromptContributions.map(({ content }) => content);
|
|
128
|
+
return { ...graph, contentByKey, skillPromptPatches, skillPromptContributions };
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export {
|
|
132
|
+
resolveUserSkillRuntime
|
|
133
|
+
};
|