nolo-cli 0.228.0-alpha.1 → 0.228.0
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-WZKT6XEU.js → _executeModel-GIFVXKDT.js} +89 -82
- package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
- package/{action-GDZDXPMB.js → action-WZTKEF5H.js} +9 -6
- package/{addContentAction-7RO4AMRI.js → addContentAction-MLI6GOBV.js} +14 -13
- package/{addDialogAgentAction-EVYBGTXB.js → addDialogAgentAction-ARGQM22H.js} +17 -16
- package/{agentDeleteCommand-PZWRHNXY.js → agentDeleteCommand-UF7XVELS.js} +120 -111
- package/{agentEmailCommands-QTKMEICX.js → agentEmailCommands-SFHRPQYC.js} +120 -107
- package/agentListCommands-IXKBP3W5.js +644 -0
- package/{agentMachineCommands-7QGICJLM.js → agentMachineCommands-7NX6PWQ6.js} +56 -48
- package/{agentProviderCommands-STI3DQ6A.js → agentProviderCommands-C5T7C5KZ.js} +2 -2
- package/{agentPullCommand-KHV4EELF.js → agentPullCommand-4EQZYHU4.js} +1 -1
- package/agentRecordCommands-IUNX6XD6.js +188 -0
- package/{agentRunCommand-OFQLOF5Y.js → agentRunCommand-LCR4XADM.js} +127 -111
- package/{agentRunControl-MBG4U6SL.js → agentRunControl-RN2P6AOD.js} +11 -9
- package/{agentRuntimeLocal-TU4LA353.js → agentRuntimeLocal-LVXPQ7QA.js} +57 -43
- package/{agentSlice-L4SBGWTB.js → agentSlice-ZGMOH6TE.js} +15 -14
- package/{appDeleteCommands-JWP3XPUA.js → appDeleteCommands-BESCJOQM.js} +56 -48
- package/{appDeployCommands-6E4TQCWI.js → appDeployCommands-LPTR6IOX.js} +56 -48
- package/{appDeployStatusCommands-ALU4SADG.js → appDeployStatusCommands-BZ7KZ5RD.js} +56 -48
- package/{appGetCommands-JEY4L6L4.js → appGetCommands-EDWGJV4S.js} +56 -48
- package/{appListCommands-PCAVHU7M.js → appListCommands-OPRWYPM6.js} +56 -48
- package/{authCommand-CGRIIOOV.js → authCommand-3C3RN4OU.js} +25 -19
- package/{authCommands-55OGQGCR.js → authCommands-ZMVEDCQD.js} +12 -6
- package/{builtinSkillRegistry-BAE2LDXF.js → builtinSkillRegistry-VRCMQ77Q.js} +7 -7
- package/{chromeCommands-G5UDKVSV.js → chromeCommands-O4IIKTBD.js} +384 -7
- package/{chromeOpsCommands-WAA45NCS.js → chromeOpsCommands-NZITLHWO.js} +3 -3
- package/{chunk-AUAJTAFM.js → chunk-2BKNICGK.js} +4 -4
- package/{chunk-QYB23WUH.js → chunk-2FK2KZSL.js} +1 -1
- package/chunk-2SXN7LAY.js +15 -0
- package/{chunk-H6L2NFHY.js → chunk-3DJJ4CFG.js} +11 -11
- package/{chunk-TSPMLCWI.js → chunk-4IQN6FWY.js} +5 -5
- package/{chunk-GUXZK7SE.js → chunk-4OXPN3WC.js} +17 -6
- package/chunk-4ZCTKB27.js +31 -0
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-3P54D2E4.js → chunk-5HUO7SEX.js} +9 -107
- package/chunk-6ASGEP5D.js +21 -0
- package/{chunk-DDC6P6EH.js → chunk-6CXQ3YNJ.js} +68 -40
- package/{chunk-G7IUT2V3.js → chunk-6MTVACLN.js} +365 -64
- package/{chunk-ZOHO6MOF.js → chunk-6RSNVJGO.js} +2 -99
- package/{chunk-XSW4EXQV.js → chunk-6TVYUQRM.js} +55 -18
- package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
- package/{chunk-7Z6EW7AH.js → chunk-6XVPMGXK.js} +97 -11
- package/{chunk-ALAES342.js → chunk-73PZD7JZ.js} +9 -5
- package/{chunk-2MCB7CD7.js → chunk-7UVVLYKC.js} +9 -9
- package/{chunk-S6FDXXZV.js → chunk-ADOOL3PG.js} +2 -2
- package/{chunk-OWKNSIXL.js → chunk-AEZBAFC6.js} +334 -77
- package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
- package/{chunk-RG2DGNL6.js → chunk-ARFCL53U.js} +5 -5
- package/{chunk-SRCCSTIM.js → chunk-AS6L5KSD.js} +4 -4
- package/{chunk-GPOV42YM.js → chunk-BAH3BAUZ.js} +8 -8
- package/{chunk-N5Z2V73W.js → chunk-BFKJ2RS3.js} +1 -1
- package/{chunk-F6Z6ZCUV.js → chunk-BVEDT6DM.js} +3 -3
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-CD3RU7XL.js → chunk-CD2DK5JA.js} +120 -14
- package/{chunk-BP5ZJ6B4.js → chunk-CD64YXRB.js} +1 -1
- package/{chunk-VP3BINY7.js → chunk-CIGCTSBF.js} +31 -1
- package/{chunk-D6YNCNM6.js → chunk-CIUZXD5D.js} +12 -12
- package/{chunk-EVGU5P4U.js → chunk-CO6E7YK6.js} +1 -1
- package/{chunk-VMJVAJ6W.js → chunk-CTIEJRTP.js} +28 -4
- package/{chunk-7JGMNKKG.js → chunk-CTWCZKNS.js} +29 -8
- package/{chunk-YFLVRVYK.js → chunk-D25ONVOH.js} +1 -1
- package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
- package/{chunk-262R3XNN.js → chunk-E5RYFR7E.js} +334 -103
- package/{chunk-OQHIVPG4.js → chunk-E6A5NHDH.js} +4 -1
- package/{chunk-HSSBDZLD.js → chunk-EDT65EUE.js} +6 -6
- package/{chunk-IAAIUH64.js → chunk-EQZQUQ33.js} +7 -7
- package/{chunk-HBRDSQ3M.js → chunk-ESN4WNWU.js} +3 -2
- package/{chunk-2YGBI2XB.js → chunk-FE7G6DSP.js} +11 -1
- package/{chunk-547ENH5T.js → chunk-FFFKAOJN.js} +4 -4
- package/{chunk-5ZUOVCKT.js → chunk-FGHEF6WI.js} +3 -1
- package/{chunk-IXG6YXQM.js → chunk-FTWAOKFU.js} +795 -361
- package/chunk-GAHJLSDO.js +107 -0
- package/{chunk-2X7WFDT6.js → chunk-GX6DITLQ.js} +1 -1
- package/{chunk-GYS5FUYR.js → chunk-HCCQEMTK.js} +28 -28
- package/{chunk-CMMI3DAT.js → chunk-HZDK56EK.js} +33 -26
- package/{chunk-UE2EVEYS.js → chunk-IIOSZAJX.js} +4 -4
- package/chunk-IIRJ4P4I.js +24 -0
- package/{chunk-QCB42576.js → chunk-IJZC2KIJ.js} +1 -1
- package/{chunk-RYOLWYBK.js → chunk-ITBX27W6.js} +97 -21
- package/{chunk-VSYTM22R.js → chunk-J2VIGDJN.js} +6 -6
- package/{chunk-QBZCGP34.js → chunk-JEWMQR6J.js} +1 -1
- package/{chunk-6QHKRARD.js → chunk-JFRJEPFI.js} +29 -5
- package/{chunk-S6K5F3KP.js → chunk-JP2BH4NC.js} +1 -1
- package/{chunk-MDZWUD3R.js → chunk-JU7VN4LF.js} +38 -29
- package/{chunk-RTHFJZ6M.js → chunk-K26XPZRB.js} +2 -2
- package/{chunk-ZYKJBRZ3.js → chunk-K7VIXYTZ.js} +1 -3
- package/chunk-KK3FCYZM.js +647 -0
- package/chunk-KLAMJNKQ.js +33394 -0
- package/{chunk-4JVNURX4.js → chunk-KQHEGELM.js} +68 -16
- package/chunk-KXOPLLFP.js +190 -0
- package/{chunk-GOCSSER3.js → chunk-KZ5OD2MO.js} +4 -4
- package/{chunk-ILHQ2AXT.js → chunk-KZAT2M2V.js} +14 -8
- package/chunk-LHCGKAFO.js +739 -0
- package/{chunk-XJPLSAPJ.js → chunk-LMGFVH65.js} +107 -104
- package/{chunk-QRGDJA4B.js → chunk-LTVEOOZL.js} +19 -6
- package/{chunk-L32W3PRP.js → chunk-MAA42MMV.js} +233 -17
- package/{chunk-ATEKLSLR.js → chunk-MTM4LRVG.js} +14 -9
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-2NPD3FTX.js → chunk-MYYNZG2M.js} +139 -39
- package/{chunk-DBUR22G5.js → chunk-MZVCFV3T.js} +19 -15
- package/{chunk-K67C2JUC.js → chunk-N74XL3NI.js} +9 -9
- package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
- package/{chunk-RBPUNSG5.js → chunk-OAZP4TSA.js} +18 -108
- package/{chunk-SMJEXX2S.js → chunk-ODBYGVO2.js} +232 -10
- package/{chunk-M4SFKP5L.js → chunk-OHUYN3YU.js} +3 -3
- package/{chunk-HYLRQDEE.js → chunk-OLGFIQN2.js} +6 -6
- package/{chunk-M3JEW6N6.js → chunk-OYUMJMC5.js} +15 -0
- package/chunk-P27E22MA.js +203 -0
- package/{chunk-BIWI5M4E.js → chunk-PBPXXMWZ.js} +1 -1
- package/{chunk-OBSEKCVK.js → chunk-PQ63BDV3.js} +210 -51
- package/{chunk-4I2MXV5Q.js → chunk-PVFYPUIM.js} +2 -0
- package/{chunk-OG6MQOQG.js → chunk-QMNVV3YM.js} +10 -37
- package/{chunk-GACR7H6T.js → chunk-R5NRFXGD.js} +5 -5
- package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
- package/{chunk-4WVJLODK.js → chunk-RHBD22LV.js} +9 -4
- package/{chunk-EXJK7TQO.js → chunk-RMWDKLBE.js} +1520 -562
- package/{chunk-TGNIKIHR.js → chunk-RR3MB26M.js} +2 -2
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/{chunk-STJ6LSQE.js → chunk-SCMYAGQE.js} +1135 -712
- package/{chunk-YKY4OVOX.js → chunk-SPU3L3OR.js} +17 -170
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-DUUDXSLX.js → chunk-SX6AWTNK.js} +28 -4
- package/{chunk-ZH3KXFHS.js → chunk-TMRJGSK2.js} +1 -1
- package/{chunk-S2NTVGA2.js → chunk-U35UUM5K.js} +2 -1
- package/{chunk-PPJYZRSQ.js → chunk-U5LOKQ2R.js} +30 -14
- package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
- package/{chunk-3U44JB3O.js → chunk-UF6J7NXV.js} +1 -1
- package/{chunk-Q3IVPFVO.js → chunk-UHW6SCVK.js} +1 -1
- package/chunk-UOUMPHS5.js +103 -0
- package/{chunk-HHFGE2WF.js → chunk-UPOW5HTG.js} +5 -5
- package/{chunk-DEA37IUY.js → chunk-V4IYI3SB.js} +2 -2
- package/{chunk-UWAIJOF2.js → chunk-VKCPKCSS.js} +66 -92
- package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
- package/{chunk-OBIC6EG7.js → chunk-VUHKG4KS.js} +3 -3
- package/{chunk-EEOOBRA7.js → chunk-W3HSD32M.js} +13 -6
- package/{chunk-P2ZLUIW2.js → chunk-W6T4FNZP.js} +351 -26
- package/chunk-WDWZPASX.js +29 -0
- package/chunk-WFGNWWJI.js +326 -0
- package/{chunk-R6Z5S5GA.js → chunk-WQDTSK5U.js} +51 -14
- package/{chunk-OYU2MA5S.js → chunk-X22AUZKL.js} +152 -167
- package/{chunk-4ZGPHFLE.js → chunk-X3OZ655T.js} +2 -2
- package/{chunk-NHY322ZU.js → chunk-XCA4WHX5.js} +588 -64
- package/{chunk-TI2EPRHE.js → chunk-XJSEST7D.js} +3 -3
- package/{chunk-JUSHVFNF.js → chunk-XNTZD4AE.js} +1230 -1356
- package/chunk-XSRSAU3O.js +133 -0
- package/{chunk-CYWNWA77.js → chunk-Y4NPF2UN.js} +6 -3
- package/{chunk-FJSNBZXR.js → chunk-YDRRGVT5.js} +1 -1
- package/{chunk-R3NEQZ53.js → chunk-YFW4H6DL.js} +405 -338
- package/{chunk-BNMPUQW6.js → chunk-YGDYYFRX.js} +20 -24
- package/{chunk-4N6G2CKP.js → chunk-YHNUDTU4.js} +49 -3
- package/chunk-YJPK35HB.js +175 -0
- package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
- package/{chunk-AGYPUBFW.js → chunk-Z7KE4K3H.js} +195 -123
- package/{chunk-DGYCDA6W.js → chunk-ZM5AZTQG.js} +20 -13
- package/{chunk-CBUZ6DKA.js → chunk-ZQ6K57FJ.js} +1 -1
- package/{cliAgentConfigHelpers-BTRHMPW2.js → cliAgentConfigHelpers-37ZNEY5Y.js} +9 -9
- package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliLocalAgentRecordReader-M3F76NIP.js → cliLocalAgentRecordReader-MCQVRWBR.js} +59 -47
- package/{commandRegistry-ZLWHQVAI.js → commandRegistry-NTH5IAN5.js} +104 -92
- package/{contentThunks-4ZX2TO7C.js → contentThunks-SPXTX5U2.js} +38 -36
- package/{cooldownCommands-YB5H5BBK.js → cooldownCommands-TIFCHCUN.js} +1 -1
- package/{createAgentAutomationAction-L4CYUZJG.js → createAgentAutomationAction-KUQKCOXB.js} +38 -36
- package/{createDialogAction-QTU2R2Q3.js → createDialogAction-HJN5U3XS.js} +39 -37
- package/{createPageAction-F3GJTHW2.js → createPageAction-ZAHRDOAU.js} +43 -41
- package/{db-M7FU2GNK.js → db-CMUTP3W5.js} +2 -2
- package/{dbSlice-XRUZOGSU.js → dbSlice-656PMWR2.js} +13 -12
- package/{deleteFile-6URDHYRB.js → deleteFile-ZCQESEEQ.js} +10 -7
- package/{dialogCommands-NRLCOPJR.js → dialogCommands-KZTZLWPZ.js} +61 -54
- package/dialogMessageRecord-OAV77LT7.js +7 -0
- package/{dialogNotifyCommand-SHGPCU22.js → dialogNotifyCommand-PST75COP.js} +11 -11
- package/{dialogSlice-P2S4LXQD.js → dialogSlice-BXIERQHO.js} +39 -37
- package/{dialogUsageCommand-W2WCSGKF.js → dialogUsageCommand-6RW2FY6K.js} +5 -5
- package/{docCreateCommands-YJRDA3RX.js → docCreateCommands-26HJ5NAY.js} +55 -47
- package/{docDeleteCommands-A5QIHZNF.js → docDeleteCommands-UAOHH5XK.js} +57 -49
- package/{docReadCommands-CF2LTMYH.js → docReadCommands-4ADG7YE6.js} +55 -47
- package/{docStore-6O7NYL6A.js → docStore-FZ75HWP2.js} +15 -14
- package/{docUpdateCommands-QRKV4ZXE.js → docUpdateCommands-OGFJZENF.js} +55 -47
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-FCHYVRJU.js} +4 -4
- package/{handleSendMessageAction-7IHLR37A.js → handleSendMessageAction-KP6GGBFY.js} +84 -79
- package/{hostCredentialCreate-VNCQUAFT.js → hostCredentialCreate-23TX56G7.js} +119 -105
- package/index.js +8 -8
- package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
- package/{localDialogRead-CCOCVGAP.js → localDialogRead-CIOTQM5T.js} +1 -1
- package/{localRuntimeAdapter-FOWVNMIK.js → localRuntimeAdapter-MTUWOYPN.js} +126 -111
- package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-TYHQCTZN.js} +5 -3
- package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-BO7IVWAZ.js} +1 -1
- package/{machineCommands-ZGC3J4JB.js → machineCommands-4WJUJQHW.js} +260 -323
- package/{machineWsRunDispatch-KK5U4M3G.js → machineWsRunDispatch-V3U4JM67.js} +115 -102
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/mcpLocalAuthorizeCommand-TI656UWC.js +106 -0
- package/{memberThunks-7Y3OYSJQ.js → memberThunks-JFYC4Z5L.js} +20 -15
- package/{models-H5NNZRLH.js → models-EP7VG6N2.js} +2 -2
- package/{overlay-BBQZXGYI.js → overlay-JA3SPVUS.js} +5 -3
- package/package.json +1 -1
- package/{projectArchive-7ZDYBXAX.js → projectArchive-NU2Z5HOR.js} +45 -43
- package/{providerPresetApply-WHAMP2D5.js → providerPresetApply-4H7YP5D7.js} +6 -6
- package/{providerRegistry-ZI2KORJ7.js → providerRegistry-F3UPOTIY.js} +6 -6
- package/{read-TYMBGEXO.js → read-BRZHXUJ6.js} +9 -8
- package/{readDocTool-SKQVHBLO.js → readDocTool-N7RVFQEE.js} +1 -1
- package/{readlineWorkspace-YHT4SX2C.js → readlineWorkspace-T56MRMS5.js} +6426 -3669
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-F5QE2O2B.js → removeDialogAgentAction-J7XU7OUX.js} +19 -18
- package/{runAgentClientLoop-H4ED5V3K.js → runAgentClientLoop-O2GRCGRZ.js} +97 -75
- package/{runtimeDoctorCommands-RRKPBGVO.js → runtimeDoctorCommands-RDRJXMXC.js} +8 -8
- package/{secretCommands-KZWBZIYS.js → secretCommands-2FEMRUFM.js} +3 -3
- package/{setDialogExtraReferencesAction-72L27ERM.js → setDialogExtraReferencesAction-Q4V2ZZW2.js} +16 -15
- package/{setPrimaryDialogAgentAction-GJJDUSGJ.js → setPrimaryDialogAgentAction-742H5S6T.js} +19 -18
- package/{settingThunks-ZRGWVGZD.js → settingThunks-T4FXSV6M.js} +185 -66
- package/{skillDiscovery-I37M5KJC.js → skillDiscovery-MDDKPTW3.js} +4 -3
- package/{spaceCommands-MEH3HJBC.js → spaceCommands-W5TAVFDT.js} +59 -51
- package/{streamAgentChatTurn-ZXPOXU33.js → streamAgentChatTurn-OWDJMU5E.js} +238 -178
- package/{switchDialogAgentAction-IIJBPND3.js → switchDialogAgentAction-HLDLHRRA.js} +17 -16
- package/{tableCommands-FTAOCBTX.js → tableCommands-44GC4N6J.js} +8 -5
- package/{toolApiClient-OGQEBQVX.js → toolApiClient-N5PYW2R3.js} +8 -6
- package/{tools-2MRWA2PP.js → tools-O7SGGVA3.js} +67 -62
- package/{tuiRestart-2IL37YIB.js → tuiRestart-EOGC2BYY.js} +10 -10
- package/{tuiSummaryLlmCaller-W2QN4VAC.js → tuiSummaryLlmCaller-TM5BU73J.js} +16 -15
- package/{updateCommands-CPATDG6J.js → updateCommands-FBYA5WVG.js} +3 -3
- package/{updateDialogTitleAction-RZ3KZSGQ.js → updateDialogTitleAction-EXSZGTLL.js} +40 -38
- package/{usageCommand-2BF74MKF.js → usageCommand-L4OFWXEU.js} +2 -2
- package/{usageRebuildCommand-UHB55BQM.js → usageRebuildCommand-7JR33UHS.js} +3 -3
- package/webapi-QVV65DQF.js +2487 -0
- package/{windowsSelfUpdate-ZFD6J5HF.js → windowsSelfUpdate-M4V77OUB.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-ZCSQCHG3.js} +2 -2
- package/agentListCommands-GUGMORTK.js +0 -1005
- package/agentRecordCommands-SLLADS5C.js +0 -175
- package/chunk-2WZXXAQD.js +0 -57
- package/chunk-5ZMIIR23.js +0 -265
- package/chunk-62HXNQVV.js +0 -134
- package/chunk-TUSTONB3.js +0 -81
- package/chunk-ZXF6D3I6.js +0 -359
- package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
- /package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
REQUIRED_CHROME_CONNECTOR_FEATURES,
|
|
8
8
|
createChromeConnectorClient,
|
|
9
9
|
resolveUploadRoots
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-U6RD332P.js";
|
|
11
11
|
import "./chunk-AL3TYDIF.js";
|
|
12
12
|
import {
|
|
13
13
|
toErrorMessage
|
|
@@ -366,6 +366,14 @@ var notProbedRequest = async () => {
|
|
|
366
366
|
function expectedExtensionIdFor(browser, chromeExtensionId) {
|
|
367
367
|
return browser === "firefox" ? NOLO_FIREFOX_CONNECTOR_EXTENSION_ID : chromeExtensionId;
|
|
368
368
|
}
|
|
369
|
+
function makeRequestFor(args, sharedOverrideTarget) {
|
|
370
|
+
return (browser) => {
|
|
371
|
+
const perBrowser = args.requestChromeFor?.(browser);
|
|
372
|
+
if (perBrowser) return perBrowser;
|
|
373
|
+
if (!args.requestChrome) return createChromeConnectorClient({ browser }).request;
|
|
374
|
+
return browser === sharedOverrideTarget ? args.requestChrome : notProbedRequest;
|
|
375
|
+
};
|
|
376
|
+
}
|
|
369
377
|
async function probeBrowserStatuses(args) {
|
|
370
378
|
const entries = await Promise.all(
|
|
371
379
|
CONNECTOR_BROWSER_ORDER.map(async (browser) => {
|
|
@@ -499,12 +507,7 @@ async function buildChromeConnectorStatus(args = {}) {
|
|
|
499
507
|
const extensionManifest = connectorRoot ? readExtensionManifest(connectorRoot) : null;
|
|
500
508
|
const expectedId = extensionManifest && typeof extensionManifest.key === "string" ? extensionIdFromPublicKey(extensionManifest.key) : NOLO_CHROME_CONNECTOR_EXTENSION_ID;
|
|
501
509
|
const sharedOverrideTarget = browserTarget ?? "chrome";
|
|
502
|
-
const requestFor = (
|
|
503
|
-
const perBrowser = args.requestChromeFor?.(browser);
|
|
504
|
-
if (perBrowser) return perBrowser;
|
|
505
|
-
if (!args.requestChrome) return createChromeConnectorClient({ browser }).request;
|
|
506
|
-
return browser === sharedOverrideTarget ? args.requestChrome : notProbedRequest;
|
|
507
|
-
};
|
|
510
|
+
const requestFor = makeRequestFor(args, sharedOverrideTarget);
|
|
508
511
|
const browserStatuses = await probeBrowserStatuses({
|
|
509
512
|
env,
|
|
510
513
|
chromeExtensionId: expectedId,
|
|
@@ -885,19 +888,393 @@ The connector service worker restarts within ~1s; verify with \`nolo chrome stat
|
|
|
885
888
|
return 1;
|
|
886
889
|
}
|
|
887
890
|
}
|
|
891
|
+
function browserFlagSuffix(browser) {
|
|
892
|
+
return browser === "firefox" ? " --browser firefox" : "";
|
|
893
|
+
}
|
|
894
|
+
async function probeTabsRoundtrip(requestChrome) {
|
|
895
|
+
try {
|
|
896
|
+
const result = await requestChrome("list_tabs", {});
|
|
897
|
+
const tabs = result?.tabs;
|
|
898
|
+
if (!Array.isArray(tabs)) {
|
|
899
|
+
return {
|
|
900
|
+
probed: true,
|
|
901
|
+
count: null,
|
|
902
|
+
error: {
|
|
903
|
+
code: "CHROME_CONNECTOR_BAD_RESPONSE",
|
|
904
|
+
message: "list_tabs returned no tabs array"
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
return { probed: true, count: tabs.length };
|
|
909
|
+
} catch (error) {
|
|
910
|
+
return {
|
|
911
|
+
probed: true,
|
|
912
|
+
count: null,
|
|
913
|
+
error: {
|
|
914
|
+
code: error?.code ?? "CHROME_CONNECTOR_ERROR",
|
|
915
|
+
message: toErrorMessage(error)
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
function buildNativeHostDoctorCheck(status, target) {
|
|
921
|
+
const label = "Native Messaging host";
|
|
922
|
+
const facts = target.nativeHost;
|
|
923
|
+
if (!status.nativeHost.supported) {
|
|
924
|
+
return {
|
|
925
|
+
id: "native_host",
|
|
926
|
+
label,
|
|
927
|
+
status: "fail",
|
|
928
|
+
summary: `this platform has no supported native host install (${status.nativeHost.platformError ?? "unsupported platform"})`
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
if (!status.connectorRoot) {
|
|
932
|
+
return {
|
|
933
|
+
id: "native_host",
|
|
934
|
+
label,
|
|
935
|
+
status: "warn",
|
|
936
|
+
summary: `cannot check: this CLI cannot see a connector checkout${status.connectorRootError ? ` (${status.connectorRootError})` : ""}; set NOLO_CHROME_CONNECTOR_ROOT or run the CLI from a repo checkout`
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
if (!facts.manifestPath) {
|
|
940
|
+
return {
|
|
941
|
+
id: "native_host",
|
|
942
|
+
label,
|
|
943
|
+
status: "warn",
|
|
944
|
+
summary: `cannot check: the ${browserLabel(target.browser)} native host paths did not resolve on this platform`
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
if (!facts.installed) {
|
|
948
|
+
return {
|
|
949
|
+
id: "native_host",
|
|
950
|
+
label,
|
|
951
|
+
status: "fail",
|
|
952
|
+
summary: `no native messaging host manifest at ${facts.manifestPath} \u2014 ${browserLabel(
|
|
953
|
+
target.browser
|
|
954
|
+
)} has nothing to talk to (a Web Store install never creates it)`
|
|
955
|
+
};
|
|
956
|
+
}
|
|
957
|
+
if (!facts.wrapperPathMatches || !facts.allowedOriginMatches) {
|
|
958
|
+
const problems = [];
|
|
959
|
+
if (!facts.wrapperPathMatches) problems.push("its wrapper path points at another checkout/launcher");
|
|
960
|
+
if (!facts.allowedOriginMatches) {
|
|
961
|
+
problems.push(`its allowed origins do not include extension ${target.expectedExtensionId}`);
|
|
962
|
+
}
|
|
963
|
+
return {
|
|
964
|
+
id: "native_host",
|
|
965
|
+
label,
|
|
966
|
+
status: "warn",
|
|
967
|
+
summary: `${facts.manifestPath} is installed but ${problems.join(" and ")}`
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
return {
|
|
971
|
+
id: "native_host",
|
|
972
|
+
label,
|
|
973
|
+
status: "pass",
|
|
974
|
+
summary: `${facts.manifestPath} registered and allows extension ${target.expectedExtensionId}`
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
function buildAuthTokenDoctorCheck(status, target) {
|
|
978
|
+
const label = "RPC auth token";
|
|
979
|
+
const path = target.token.path ?? status.token.path;
|
|
980
|
+
if (!status.nativeHost.supported) {
|
|
981
|
+
return {
|
|
982
|
+
id: "auth_token",
|
|
983
|
+
label,
|
|
984
|
+
status: "warn",
|
|
985
|
+
summary: "not applicable: this platform has no supported native host install"
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
if (!status.connectorRoot) {
|
|
989
|
+
return {
|
|
990
|
+
id: "auth_token",
|
|
991
|
+
label,
|
|
992
|
+
status: "warn",
|
|
993
|
+
summary: "cannot check: no connector checkout is visible here, so the token file was not inspected (the live RPC probe below is the authority \u2014 a working bridge authenticates fine)"
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
if (target.token.present) {
|
|
997
|
+
return {
|
|
998
|
+
id: "auth_token",
|
|
999
|
+
label,
|
|
1000
|
+
status: "pass",
|
|
1001
|
+
summary: `token present${path ? ` at ${path}` : ""}`
|
|
1002
|
+
};
|
|
1003
|
+
}
|
|
1004
|
+
return {
|
|
1005
|
+
id: "auth_token",
|
|
1006
|
+
label,
|
|
1007
|
+
status: "fail",
|
|
1008
|
+
summary: `no connector token${path ? ` at ${path}` : ""} \u2014 the bridge rejects unauthenticated calls`
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
function buildRpcBridgeDoctorCheck(target) {
|
|
1012
|
+
const label = "Local RPC bridge";
|
|
1013
|
+
const rpc = target.rpc;
|
|
1014
|
+
if (rpc.online) {
|
|
1015
|
+
return {
|
|
1016
|
+
id: "rpc_bridge",
|
|
1017
|
+
label,
|
|
1018
|
+
status: "pass",
|
|
1019
|
+
summary: `answering on ${target.endpoint} (extension ${rpc.extensionId ?? "unknown"})`
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
const code = rpc.error?.code ?? "CHROME_CONNECTOR_ERROR";
|
|
1023
|
+
if (code === "UNAUTHORIZED") {
|
|
1024
|
+
return {
|
|
1025
|
+
id: "rpc_bridge",
|
|
1026
|
+
label,
|
|
1027
|
+
status: "fail",
|
|
1028
|
+
summary: `something answers on ${target.endpoint} but rejects this machine's token (UNAUTHORIZED) \u2014 the token file and the running native host disagree`
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
if (code === "CHROME_CONNECTOR_UNAVAILABLE") {
|
|
1032
|
+
return {
|
|
1033
|
+
id: "rpc_bridge",
|
|
1034
|
+
label,
|
|
1035
|
+
status: "warn",
|
|
1036
|
+
summary: `nothing is listening on ${target.endpoint} \u2014 the extension's background service worker is most likely asleep, which is normal, not broken`
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
return {
|
|
1040
|
+
id: "rpc_bridge",
|
|
1041
|
+
label,
|
|
1042
|
+
status: "warn",
|
|
1043
|
+
summary: `${code}: ${rpc.error?.message ?? "(no detail)"}`
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
function buildHandshakeDoctorCheck(target, browser) {
|
|
1047
|
+
const label = "Extension handshake";
|
|
1048
|
+
const rpc = target.rpc;
|
|
1049
|
+
if (!rpc.online) {
|
|
1050
|
+
return {
|
|
1051
|
+
id: "extension_handshake",
|
|
1052
|
+
label,
|
|
1053
|
+
status: "warn",
|
|
1054
|
+
summary: "cannot verify while the RPC bridge is offline (see rpc_bridge)"
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
const recognizedBrowser = rpc.build ?? (rpc.extensionId === target.expectedExtensionId ? target.browser : null);
|
|
1058
|
+
if (recognizedBrowser === null) {
|
|
1059
|
+
return {
|
|
1060
|
+
id: "extension_handshake",
|
|
1061
|
+
label,
|
|
1062
|
+
status: "fail",
|
|
1063
|
+
summary: `the connected extension ${rpc.extensionId ?? "(unknown id)"} is not a recognized Nolo Browser Connector build`
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
if (recognizedBrowser !== browser) {
|
|
1067
|
+
return {
|
|
1068
|
+
id: "extension_handshake",
|
|
1069
|
+
label,
|
|
1070
|
+
status: "fail",
|
|
1071
|
+
summary: `the bridge answers as the ${browserLabel(recognizedBrowser)} build, not ${browserLabel(browser)}`
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
const expected = expectedFeaturesForBrowser(browser);
|
|
1075
|
+
const missing = expected.filter((feature) => !rpc.features.includes(feature));
|
|
1076
|
+
const problems = [];
|
|
1077
|
+
if (rpc.protocolVersion !== NOLO_CHROME_CONNECTOR_PROTOCOL_VERSION) {
|
|
1078
|
+
problems.push(
|
|
1079
|
+
`protocol ${rpc.protocolVersion ?? "unknown"} (this CLI speaks ${NOLO_CHROME_CONNECTOR_PROTOCOL_VERSION})`
|
|
1080
|
+
);
|
|
1081
|
+
}
|
|
1082
|
+
if (missing.length > 0) problems.push(`missing features ${missing.join(", ")}`);
|
|
1083
|
+
if (problems.length > 0) {
|
|
1084
|
+
return {
|
|
1085
|
+
id: "extension_handshake",
|
|
1086
|
+
label,
|
|
1087
|
+
status: "fail",
|
|
1088
|
+
summary: `${browserLabel(browser)} build ${rpc.extensionId ?? "unknown"} reports ${problems.join("; ")}`
|
|
1089
|
+
};
|
|
1090
|
+
}
|
|
1091
|
+
return {
|
|
1092
|
+
id: "extension_handshake",
|
|
1093
|
+
label,
|
|
1094
|
+
status: "pass",
|
|
1095
|
+
summary: `${browserLabel(browser)} build ${rpc.extensionId ?? "unknown"} speaks protocol ${rpc.protocolVersion} with all ${expected.length} required features`
|
|
1096
|
+
};
|
|
1097
|
+
}
|
|
1098
|
+
function buildDoctorRecoverySteps(args) {
|
|
1099
|
+
const { browser, checks, tabs, ok, requiresExplicitBrowser, rpcUnauthorized } = args;
|
|
1100
|
+
const installCmd = `nolo browser install${browserFlagSuffix(browser)}`;
|
|
1101
|
+
const doctorCmd = `nolo browser doctor${browserFlagSuffix(browser)}`;
|
|
1102
|
+
const reloadCmd = `nolo browser reload${browserFlagSuffix(browser)}`;
|
|
1103
|
+
const browserName = browserLabel(browser);
|
|
1104
|
+
const statusOf = (id) => checks.find((check) => check.id === id)?.status;
|
|
1105
|
+
const extensionsPage = browser === "firefox" ? "about:debugging#/runtime/this-firefox" : "chrome://extensions";
|
|
1106
|
+
const installHint = browser === "firefox" ? `If the extension is not installed yet: install Nolo Browser Connector from https://nolo.chat/downloads, or load the local extension/ directory from ${extensionsPage}.` : `If the extension is not installed yet: install Nolo Browser Connector from the Chrome Web Store, or load the local extension/ directory with Developer mode in ${extensionsPage}.`;
|
|
1107
|
+
const restrictedPages = browser === "firefox" ? "about: pages and the connector's own pages" : "chrome:// pages, the Web Store and extension pages";
|
|
1108
|
+
const wakeHint = `click the \u300CNolo \u6D4F\u89C8\u5668\u8FDE\u63A5\u5668\u300D icon in the browser toolbar to wake the background service worker (icon hidden? open ${extensionsPage}, confirm it is enabled and click Reload)`;
|
|
1109
|
+
if (ok) {
|
|
1110
|
+
const count = tabs.count ?? 0;
|
|
1111
|
+
const steps = [
|
|
1112
|
+
`End-to-end ready: ${browserName} is online and the connector round trip works (${count} controllable ${count === 1 ? "tab" : "tabs"} detected).`
|
|
1113
|
+
];
|
|
1114
|
+
if (requiresExplicitBrowser) {
|
|
1115
|
+
steps.push(
|
|
1116
|
+
`Both the Chrome and Firefox connectors are online, so every unqualified \`nolo browser <op>\` fails with MULTIPLE_BROWSERS_AVAILABLE \u2014 pass the browser explicitly, e.g. \`nolo browser list-tabs --browser ${browser}\`.`
|
|
1117
|
+
);
|
|
1118
|
+
} else {
|
|
1119
|
+
steps.push("Next: `nolo browser list-tabs` lists the tabs an agent can drive.");
|
|
1120
|
+
}
|
|
1121
|
+
return steps;
|
|
1122
|
+
}
|
|
1123
|
+
if (statusOf("native_host") === "fail" || statusOf("auth_token") === "fail") {
|
|
1124
|
+
const howToWake = browser === "firefox" ? `open ${extensionsPage} and click Reload on the connector` : `open ${extensionsPage}, make sure the extension is enabled and click Reload`;
|
|
1125
|
+
return [
|
|
1126
|
+
`The ${browserName} extension itself is fine \u2014 it needs this machine's native bridge before it can drive your browser (the store package never includes one).`,
|
|
1127
|
+
`1. Run: ${installCmd}`,
|
|
1128
|
+
`2. Click the \u300CNolo \u6D4F\u89C8\u5668\u8FDE\u63A5\u5668\u300D icon in the browser toolbar to wake the local bridge (icon hidden? ${howToWake}).`,
|
|
1129
|
+
`3. Run: ${doctorCmd} to verify.`,
|
|
1130
|
+
installHint
|
|
1131
|
+
];
|
|
1132
|
+
}
|
|
1133
|
+
if (statusOf("rpc_bridge") !== "pass") {
|
|
1134
|
+
if (rpcUnauthorized) {
|
|
1135
|
+
return [
|
|
1136
|
+
"The native bridge is installed but rejects this machine's token, so nothing can talk to it.",
|
|
1137
|
+
`1. Run: ${installCmd} (rewrites the token and the manifest together).`,
|
|
1138
|
+
"2. Click the \u300CNolo \u6D4F\u89C8\u5668\u8FDE\u63A5\u5668\u300D icon in the browser toolbar to restart the bridge with the new token.",
|
|
1139
|
+
`3. Run: ${doctorCmd} to verify.`
|
|
1140
|
+
];
|
|
1141
|
+
}
|
|
1142
|
+
return [
|
|
1143
|
+
"Nothing is answering on the local bridge yet \u2014 the connector's background service worker is not awake, which is normal rather than a broken install.",
|
|
1144
|
+
`If the extension is already installed: ${wakeHint}.`,
|
|
1145
|
+
installHint,
|
|
1146
|
+
`Then run: ${doctorCmd} to verify.`
|
|
1147
|
+
];
|
|
1148
|
+
}
|
|
1149
|
+
if (statusOf("extension_handshake") === "fail") {
|
|
1150
|
+
return [
|
|
1151
|
+
`The bridge is answering, but the running ${browserName} build is not what this CLI expects (older protocol, missing features, or another connector copy answering).`,
|
|
1152
|
+
`1. Run: ${reloadCmd} (restarts the extension worker with the files on disk).`,
|
|
1153
|
+
`2. If that does not help, open ${extensionsPage} and click Reload on the Nolo Browser Connector; remove any second copy of the connector.`,
|
|
1154
|
+
`3. Run: ${doctorCmd} to verify.`
|
|
1155
|
+
];
|
|
1156
|
+
}
|
|
1157
|
+
return [
|
|
1158
|
+
`Every link up to the extension is ready, but a real tab round trip failed${tabs.error ? ` (${tabs.error.code})` : ""} \u2014 usually no controllable window/tab is open.`,
|
|
1159
|
+
`1. Open a normal https:// page in a regular window (${restrictedPages} cannot be controlled).`,
|
|
1160
|
+
"2. Click the \u300CNolo \u6D4F\u89C8\u5668\u8FDE\u63A5\u5668\u300D icon once to wake the worker.",
|
|
1161
|
+
`3. Run: ${doctorCmd} to verify.`
|
|
1162
|
+
];
|
|
1163
|
+
}
|
|
1164
|
+
async function buildChromeConnectorDoctorReport(args = {}) {
|
|
1165
|
+
const status = await buildChromeConnectorStatus(args);
|
|
1166
|
+
const browser = status.browsers.explicit ?? status.browsers.autoSelected ?? "chrome";
|
|
1167
|
+
const target = status.browsers[browser];
|
|
1168
|
+
const checks = [
|
|
1169
|
+
buildNativeHostDoctorCheck(status, target),
|
|
1170
|
+
buildAuthTokenDoctorCheck(status, target),
|
|
1171
|
+
buildRpcBridgeDoctorCheck(target),
|
|
1172
|
+
buildHandshakeDoctorCheck(target, browser)
|
|
1173
|
+
];
|
|
1174
|
+
const handshakeReady = checks.find((check) => check.id === "extension_handshake")?.status === "pass" && target.rpc.online;
|
|
1175
|
+
let tabs;
|
|
1176
|
+
if (!handshakeReady) {
|
|
1177
|
+
tabs = { probed: false, count: null };
|
|
1178
|
+
const blocker = target.rpc.online ? "the extension handshake (extension_handshake)" : "the RPC bridge (rpc_bridge)";
|
|
1179
|
+
checks.push({
|
|
1180
|
+
id: "tabs_roundtrip",
|
|
1181
|
+
label: "Tab round trip (list_tabs)",
|
|
1182
|
+
status: "warn",
|
|
1183
|
+
summary: `not run: ${blocker} is not ready, so no real tab round trip can be attempted yet`
|
|
1184
|
+
});
|
|
1185
|
+
} else {
|
|
1186
|
+
const requestFor = makeRequestFor(args, args.browser ?? "chrome");
|
|
1187
|
+
tabs = await probeTabsRoundtrip(requestFor(browser));
|
|
1188
|
+
checks.push({
|
|
1189
|
+
id: "tabs_roundtrip",
|
|
1190
|
+
label: "Tab round trip (list_tabs)",
|
|
1191
|
+
status: tabs.error ? "fail" : "pass",
|
|
1192
|
+
summary: tabs.error ? `list_tabs failed (${tabs.error.code}: ${tabs.error.message})` : `list_tabs returned ${tabs.count} controllable tab(s)`
|
|
1193
|
+
});
|
|
1194
|
+
}
|
|
1195
|
+
const liveChainOk = ["rpc_bridge", "extension_handshake", "tabs_roundtrip"].every(
|
|
1196
|
+
(id) => checks.find((check) => check.id === id)?.status === "pass"
|
|
1197
|
+
);
|
|
1198
|
+
const ok = liveChainOk && !checks.some((check) => check.status === "fail");
|
|
1199
|
+
return {
|
|
1200
|
+
ok,
|
|
1201
|
+
browser,
|
|
1202
|
+
verifyCommand: `nolo browser doctor${browserFlagSuffix(browser)}`,
|
|
1203
|
+
checks,
|
|
1204
|
+
recoverySteps: buildDoctorRecoverySteps({
|
|
1205
|
+
browser,
|
|
1206
|
+
checks,
|
|
1207
|
+
tabs,
|
|
1208
|
+
ok,
|
|
1209
|
+
requiresExplicitBrowser: status.browsers.requiresExplicitBrowser,
|
|
1210
|
+
rpcUnauthorized: target.rpc.error?.code === "UNAUTHORIZED"
|
|
1211
|
+
}),
|
|
1212
|
+
tabs,
|
|
1213
|
+
status
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
function formatChromeConnectorDoctor(report) {
|
|
1217
|
+
const mark = (status) => status === "pass" ? "[pass]" : status === "warn" ? "[warn]" : "[FAIL]";
|
|
1218
|
+
const lines = ["Nolo Browser Connector \u2014 doctor"];
|
|
1219
|
+
lines.push(` browser : ${browserLabel(report.browser)}`);
|
|
1220
|
+
lines.push(` endpoint : ${report.status.browsers[report.browser].endpoint}`);
|
|
1221
|
+
if (report.status.browsers.requiresExplicitBrowser) {
|
|
1222
|
+
lines.push(
|
|
1223
|
+
" note : both Chrome and Firefox connectors are online, so every unqualified `nolo browser <op>` fails with MULTIPLE_BROWSERS_AVAILABLE \u2014 pass --browser chrome or --browser firefox."
|
|
1224
|
+
);
|
|
1225
|
+
}
|
|
1226
|
+
lines.push("Checks:");
|
|
1227
|
+
for (const check of report.checks) {
|
|
1228
|
+
lines.push(` ${mark(check.status)} ${check.id.padEnd(19)}: ${check.summary}`);
|
|
1229
|
+
}
|
|
1230
|
+
lines.push(
|
|
1231
|
+
report.ok ? "Result : end-to-end ready." : "Result : not ready yet \u2014 follow the recovery steps below."
|
|
1232
|
+
);
|
|
1233
|
+
lines.push("Recovery:");
|
|
1234
|
+
for (const step of report.recoverySteps) lines.push(` ${step}`);
|
|
1235
|
+
lines.push(`Verify with : ${report.verifyCommand}`);
|
|
1236
|
+
return `${lines.join("\n")}
|
|
1237
|
+
`;
|
|
1238
|
+
}
|
|
1239
|
+
async function runChromeDoctorCommand(args, deps = {}) {
|
|
1240
|
+
const output = deps.output ?? process.stdout;
|
|
1241
|
+
const browser = readBrowserOption(args);
|
|
1242
|
+
if (browser === null) {
|
|
1243
|
+
output.write('[nolo] Browser connector doctor failed: --browser must be "chrome" or "firefox".\n');
|
|
1244
|
+
return 1;
|
|
1245
|
+
}
|
|
1246
|
+
let report;
|
|
1247
|
+
try {
|
|
1248
|
+
report = await buildChromeConnectorDoctorReport({ ...deps, ...browser ? { browser } : {} });
|
|
1249
|
+
} catch (error) {
|
|
1250
|
+
output.write(`[nolo] Browser connector doctor failed: ${toErrorMessage(error)}
|
|
1251
|
+
`);
|
|
1252
|
+
return 1;
|
|
1253
|
+
}
|
|
1254
|
+
if (args.includes("--json")) {
|
|
1255
|
+
output.write(`${JSON.stringify(report, null, 2)}
|
|
1256
|
+
`);
|
|
1257
|
+
} else {
|
|
1258
|
+
output.write(formatChromeConnectorDoctor(report));
|
|
1259
|
+
}
|
|
1260
|
+
return report.ok ? 0 : 1;
|
|
1261
|
+
}
|
|
888
1262
|
export {
|
|
889
1263
|
CLI_CONNECTOR_ROOT_CANDIDATES,
|
|
890
1264
|
FIREFOX_UNAVAILABLE_FEATURES,
|
|
891
1265
|
FULL_SUPPORT_CHROME_FEATURES,
|
|
1266
|
+
buildChromeConnectorDoctorReport,
|
|
892
1267
|
buildChromeConnectorStatus,
|
|
893
1268
|
compareDeployShas,
|
|
894
1269
|
detectWorktreeCheckout,
|
|
895
1270
|
expectedFeaturesForBrowser,
|
|
896
1271
|
fetchOnlineBuildSha,
|
|
1272
|
+
formatChromeConnectorDoctor,
|
|
897
1273
|
formatChromeConnectorStatus,
|
|
898
1274
|
resolveCliConnectorRoot,
|
|
899
1275
|
resolveConnectorBrowser,
|
|
900
1276
|
resolveLocalHeadSha,
|
|
1277
|
+
runChromeDoctorCommand,
|
|
901
1278
|
runChromeInstallCommand,
|
|
902
1279
|
runChromeReloadCommand,
|
|
903
1280
|
runChromeStatusCommand
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requestBrowserShellAction
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FE7G6DSP.js";
|
|
4
4
|
import {
|
|
5
5
|
createChromeConnectorClient,
|
|
6
6
|
createVerifiedChromeConnectorClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-U6RD332P.js";
|
|
8
8
|
import "./chunk-AL3TYDIF.js";
|
|
9
9
|
import {
|
|
10
10
|
readOption
|
|
@@ -13,7 +13,7 @@ import "./chunk-OLZBQWZU.js";
|
|
|
13
13
|
import "./chunk-LCBAMY2M.js";
|
|
14
14
|
import {
|
|
15
15
|
t
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-E5RYFR7E.js";
|
|
17
17
|
import {
|
|
18
18
|
toErrorMessage
|
|
19
19
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSkillSummaryMarker
|
|
3
3
|
} from "./chunk-VF4K2QE6.js";
|
|
4
|
-
import {
|
|
5
|
-
readDbRecord,
|
|
6
|
-
writeAgentRecord
|
|
7
|
-
} from "./chunk-D6YNCNM6.js";
|
|
8
4
|
import {
|
|
9
5
|
createSpaceKey
|
|
10
6
|
} from "./chunk-UAD2WT54.js";
|
|
7
|
+
import {
|
|
8
|
+
readDbRecord,
|
|
9
|
+
writeAgentRecord
|
|
10
|
+
} from "./chunk-CIUZXD5D.js";
|
|
11
11
|
import {
|
|
12
12
|
parseUserIdFromAuthToken,
|
|
13
13
|
readOption,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// packages/agent-runtime/staleReplayGuard.ts
|
|
2
|
+
var wrapHistoricalSummaryWithReplayGuard = (summary) => {
|
|
3
|
+
const trimmed = summary.trim();
|
|
4
|
+
if (!trimmed) return "";
|
|
5
|
+
return [
|
|
6
|
+
"\u3010\u5386\u53F2\u53C2\u8003\uFF0C\u975E\u6D3B\u6307\u4EE4\u3011\u4EE5\u4E0B\u4E3A\u51BB\u7ED3\u6458\u8981\uFF1A\u5176\u4E2D\u7684**\u52A8\u4F5C\u6307\u4EE4**\u3001\u53C2\u6570\u4E0E skill \u8C03\u7528\u9ED8\u8BA4\u5DF2\u7ECF\u505A\u8FC7\uFF0C\u4E0D\u8981\u91CD\u653E\uFF08\u91CD\u590D\u5EFA\u5206\u652F/issue/\u4EFB\u52A1\u5C31\u662F\u91CD\u653E\uFF09\u3002",
|
|
7
|
+
"\u4F46**\u7528\u6237\u7684\u76EE\u6807\u4E0E\u610F\u56FE\u4ECD\u7136\u6709\u6548**\uFF1A\u5B83\u89E3\u91CA\u4E86\u8FD9\u6BB5\u5BF9\u8BDD\u4E3A\u4EC0\u4E48\u8981\u505A\u8FD9\u4E9B\u4E8B\uFF1B\u9047\u5230\u76F8\u5173\u8BDD\u9898\u65F6\u5148\u6309\u5B83\u7406\u89E3\u4E0A\u4E0B\u6587\uFF0C\u4E0D\u8981\u5F53\u6210\u5DF2\u8FC7\u671F\u7684\u80CC\u666F\u3002",
|
|
8
|
+
`\u6458\u8981\u4E2D\u6807\u6CE8\u300C\uFF08\u5F85\u9A8C\u8BC1\uFF09\u300D\u7684\u9879\u9700\u590D\u6838\u786E\u8BA4\uFF1B\u672A\u5B8C\u6210\u5F85\u529E\u548C\u300C\u4E0B\u4E00\u6B65\u300D\u9700\u7EE7\u7EED\u63A8\u8FDB\u2014\u2014\u8FD9\u4E9B\u662F\u7EED\u4F5C\u65B9\u5411\uFF0C\u4E0D\u662F\u91CD\u653E\u6307\u4EE4\u3002`,
|
|
9
|
+
trimmed
|
|
10
|
+
].join("\n");
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
wrapHistoricalSummaryWithReplayGuard
|
|
15
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
markdownToSlate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VIYVRPMJ.js";
|
|
4
|
+
import {
|
|
5
|
+
buildSkillSummaryMarker
|
|
6
|
+
} from "./chunk-VF4K2QE6.js";
|
|
4
7
|
import {
|
|
5
8
|
createEmptyParagraph,
|
|
6
9
|
splitSlateTitleAndBody
|
|
@@ -8,28 +11,25 @@ import {
|
|
|
8
11
|
import {
|
|
9
12
|
slateToRenderMarkdown
|
|
10
13
|
} from "./chunk-63W5N6P3.js";
|
|
11
|
-
import {
|
|
12
|
-
buildSkillSummaryMarker
|
|
13
|
-
} from "./chunk-VF4K2QE6.js";
|
|
14
14
|
import {
|
|
15
15
|
addContentToSpace,
|
|
16
16
|
resolveCreationSpaceId
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
getCurrentSpaceId
|
|
20
|
-
} from "./chunk-547ENH5T.js";
|
|
17
|
+
} from "./chunk-HCCQEMTK.js";
|
|
21
18
|
import {
|
|
22
19
|
runtime_default
|
|
23
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YFW4H6DL.js";
|
|
21
|
+
import {
|
|
22
|
+
getCurrentSpaceId
|
|
23
|
+
} from "./chunk-FFFKAOJN.js";
|
|
24
24
|
import {
|
|
25
25
|
write
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HZDK56EK.js";
|
|
27
27
|
import {
|
|
28
28
|
selectIdentityUserId
|
|
29
29
|
} from "./chunk-PXYBUFDB.js";
|
|
30
30
|
import {
|
|
31
31
|
parseSkillDocProtocol
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-AETZ7AD6.js";
|
|
33
33
|
import {
|
|
34
34
|
createPageKey
|
|
35
35
|
} from "./chunk-SYTHYBMI.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authRoutes
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OYUMJMC5.js";
|
|
4
4
|
import {
|
|
5
5
|
BUILTIN_DIALOG_LLM_FALLBACK_MODEL,
|
|
6
6
|
BUILTIN_SUMMARY_LLM_CONFIG
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
canUsePlatformChatProvider,
|
|
11
11
|
parsePlatformChatCompletionResponse,
|
|
12
12
|
resolvePlatformChatProviderConfig
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EDT65EUE.js";
|
|
14
14
|
import {
|
|
15
15
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
16
16
|
classifySummaryError,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isTruncatedCompletion,
|
|
19
19
|
selectSummaryRoute,
|
|
20
20
|
summaryCompletionTokens
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MAA42MMV.js";
|
|
22
22
|
import {
|
|
23
23
|
isAbortError
|
|
24
24
|
} from "./chunk-7DPNBQSV.js";
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
resolvePlatformAuthToken,
|
|
30
30
|
resolvePlatformServerUrl
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-K26XPZRB.js";
|
|
32
32
|
import {
|
|
33
33
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-PQ63BDV3.js";
|
|
35
35
|
|
|
36
36
|
// packages/core/accountSession/fetchAccountProfile.ts
|
|
37
37
|
async function fetchAccountProfile(input) {
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveAgentImageInputSupport
|
|
3
|
-
} from "./chunk-DUUDXSLX.js";
|
|
4
1
|
import {
|
|
5
2
|
TOOL_HAD_IMAGES,
|
|
6
3
|
hadToolImages
|
|
7
4
|
} from "./chunk-X4O7FJF5.js";
|
|
5
|
+
import {
|
|
6
|
+
resolveAgentImageInputSupport
|
|
7
|
+
} from "./chunk-SX6AWTNK.js";
|
|
8
|
+
import {
|
|
9
|
+
isCompleteInstructionOutput,
|
|
10
|
+
sanitizeToolOutputText,
|
|
11
|
+
scrubSecrets
|
|
12
|
+
} from "./chunk-WFGNWWJI.js";
|
|
8
13
|
import {
|
|
9
14
|
asTrimmedString
|
|
10
15
|
} from "./chunk-3EUW3WEO.js";
|
|
11
|
-
import {
|
|
12
|
-
isRecord
|
|
13
|
-
} from "./chunk-KUG52IAP.js";
|
|
14
16
|
import {
|
|
15
17
|
asOptionalFiniteNumber
|
|
16
18
|
} from "./chunk-WWC7I6TA.js";
|
|
19
|
+
import {
|
|
20
|
+
isRecord
|
|
21
|
+
} from "./chunk-KUG52IAP.js";
|
|
17
22
|
import {
|
|
18
23
|
asOptionalTrimmedString
|
|
19
24
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -419,6 +424,12 @@ function sanitizeChatMessage(value) {
|
|
|
419
424
|
if (role === "tool" && (hadToolImages(value) || isRecord(metadata) && metadata[TOOL_HAD_IMAGES] === true)) {
|
|
420
425
|
message.tool_result_metadata = { [TOOL_HAD_IMAGES]: true };
|
|
421
426
|
}
|
|
427
|
+
const toolName = asOptionalTrimmedString(value.toolName) ?? asOptionalTrimmedString(value.name);
|
|
428
|
+
if (role === "tool" && typeof content === "string" && isCompleteInstructionOutput(toolName, metadata, content)) {
|
|
429
|
+
message.content = scrubSecrets(sanitizeToolOutputText(content)).cleaned;
|
|
430
|
+
message.toolName = toolName;
|
|
431
|
+
message.tool_result_metadata = { ...message.tool_result_metadata, projectInstruction: true };
|
|
432
|
+
}
|
|
422
433
|
const toolCalls = sanitizeToolCalls(value.tool_calls);
|
|
423
434
|
if (toolCalls) message.tool_calls = toolCalls;
|
|
424
435
|
if (typeof value.reasoning_content === "string" && value.reasoning_content) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// packages/agent-runtime/dialogMessageRecord.ts
|
|
2
|
+
function dialogMessageRecordToAgentRuntimeMessage(record) {
|
|
3
|
+
if (!record || typeof record !== "object") return null;
|
|
4
|
+
if (record.role !== "user" && record.role !== "assistant" && record.role !== "tool") return null;
|
|
5
|
+
return {
|
|
6
|
+
...typeof record.id === "string" ? { id: record.id } : {},
|
|
7
|
+
role: record.role,
|
|
8
|
+
...Number.isFinite(record.metadata?.cliHistoryOrder) ? { cliHistoryOrder: record.metadata.cliHistoryOrder } : {},
|
|
9
|
+
content: record.content ?? "",
|
|
10
|
+
...record.contextReference !== void 0 ? { context_reference: record.contextReference } : {},
|
|
11
|
+
...typeof record.reasoning_content === "string" ? { reasoning_content: record.reasoning_content } : {},
|
|
12
|
+
...typeof record.toolCallId === "string" ? { tool_call_id: record.toolCallId } : {},
|
|
13
|
+
...Array.isArray(record.tool_calls) ? { tool_calls: record.tool_calls } : {},
|
|
14
|
+
...record.toolPayload !== void 0 ? { toolPayload: record.toolPayload } : {},
|
|
15
|
+
...typeof record.toolName === "string" ? { toolName: record.toolName } : {},
|
|
16
|
+
// 写侧(dialogWritePlan)把 tool_result_metadata 以 `metadata` 字段落库;
|
|
17
|
+
// 回读必须还原,否则跨 turn 投影丢失 metadata 后缀,同一 tool 消息的字节
|
|
18
|
+
// 在 turn 边界漂移 → provider 前缀缓存断裂(stable projection 契约,
|
|
19
|
+
// 见 docs/plans/2026-09-05-tool-output-cache-stability.md)。
|
|
20
|
+
...record.metadata && typeof record.metadata === "object" ? { tool_result_metadata: record.metadata } : {},
|
|
21
|
+
...(() => {
|
|
22
|
+
const raw = record.createdAt;
|
|
23
|
+
const ms = typeof raw === "number" ? raw : typeof raw === "string" ? Date.parse(raw) : NaN;
|
|
24
|
+
return Number.isFinite(ms) ? { createdAt: ms } : {};
|
|
25
|
+
})()
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
dialogMessageRecordToAgentRuntimeMessage
|
|
31
|
+
};
|