nolo-cli 0.91.0-alpha.1 → 0.91.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{_executeModel-U5V7LOJX.js → _executeModel-H35GQ2XO.js} +61 -60
- package/{action-EXQVY3UO.js → action-3ZOODRBC.js} +11 -11
- package/{addContentAction-6IXQSRD2.js → addContentAction-IJHG2ZV7.js} +9 -9
- package/{addDialogAgentAction-FZOB4BYM.js → addDialogAgentAction-IGFS2UBX.js} +11 -11
- package/{agentDeleteCommand-4MIJFQQB.js → agentDeleteCommand-XOFMXMHW.js} +43 -42
- package/{agentEmailCommands-JUXT36BY.js → agentEmailCommands-H2SEP6ZQ.js} +82 -78
- package/{agentGrantCommands-YW6PQAQ2.js → agentGrantCommands-M3XFO6EN.js} +2 -2
- package/{agentListCommands-MUVKMMZ5.js → agentListCommands-RYGH6NUL.js} +72 -80
- package/{agentMachineCommands-56FTZLYV.js → agentMachineCommands-XELOBZIP.js} +37 -36
- package/{agentProviderCommands-TOMVKJOV.js → agentProviderCommands-JCRK6ST2.js} +1 -1
- package/{agentPullCommand-GLOOXJ2E.js → agentPullCommand-HF4A42D4.js} +3 -3
- package/agentRecordCommands-43HAXAZO.js +130 -0
- package/{agentRunCommand-UMUEVIY2.js → agentRunCommand-GIPN6DBO.js} +80 -75
- package/{agentRunControl-XLGD3UZ5.js → agentRunControl-AVJR4JW4.js} +2 -2
- package/{agentRuntimeLocal-NH6GSGAJ.js → agentRuntimeLocal-SDOSSCLU.js} +38 -33
- package/{agentSlice-YZK6KG73.js → agentSlice-B2DLZMAC.js} +11 -11
- package/{appDeleteCommands-U45KXYX7.js → appDeleteCommands-7OR5MAOR.js} +37 -36
- package/{appDeployCommands-LWQIQCFX.js → appDeployCommands-5GNI723H.js} +37 -36
- package/{appDeployStatusCommands-LZO33PGD.js → appDeployStatusCommands-WL2NG3SG.js} +37 -36
- package/{appGetCommands-OJSO6BCF.js → appGetCommands-7BVKQS44.js} +37 -36
- package/{appListCommands-NE56V7DI.js → appListCommands-5VXFJOBU.js} +37 -36
- package/{authCommand-U5LA6H4Y.js → authCommand-N4Q6463J.js} +115 -23
- package/{authCommands-RGOGCPP6.js → authCommands-GBIFZWD3.js} +5 -5
- package/{builtinSkillRegistry-4NB7PCOF.js → builtinSkillRegistry-JPY2DKRF.js} +7 -7
- package/{chatQueueReduxAdapter-FRMSYX7N.js → chatQueueReduxAdapter-3KDRKXTT.js} +29 -29
- package/{chromeCommands-VOIRNJBL.js → chromeCommands-NKU3OWKH.js} +36 -11
- package/{chromeOpsCommands-M7DPCX2T.js → chromeOpsCommands-OQDJGD4Y.js} +31 -1
- package/{chunk-R2YY6MWV.js → chunk-232453C2.js} +994 -1036
- package/{chunk-HWZAXNO7.js → chunk-25GAGMRK.js} +6 -83
- package/{chunk-DM4UNXPK.js → chunk-3IYMTWYZ.js} +22 -22
- package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
- package/{chunk-X2ZTVRXP.js → chunk-46CRK7XP.js} +7 -7
- package/{chunk-WKEUHK57.js → chunk-55VQ4OPL.js} +4 -4
- package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
- package/{chunk-DWUCB2A3.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-4JBZUECA.js → chunk-64TIEZHF.js} +1 -1
- package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
- package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
- package/{chunk-UBNV6CS6.js → chunk-6PELJ3DS.js} +533 -236
- package/{chunk-7IBK6MYW.js → chunk-7EMJBGCA.js} +966 -218
- package/{chunk-YPYMGGPJ.js → chunk-7YMUSSHQ.js} +93 -93
- package/chunk-ACTMNVHM.js +93 -0
- package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
- package/{chunk-UKWGR5SS.js → chunk-AUXHZ2M5.js} +186 -397
- package/{chunk-377KM42Z.js → chunk-B4PW6UAI.js} +61 -34
- package/{chunk-XLGHBHGP.js → chunk-B7ANJQWZ.js} +2 -2
- package/{chunk-COM7GG76.js → chunk-BAAKVSMZ.js} +4 -4
- package/{chunk-QMASIHYZ.js → chunk-BFCXG6AJ.js} +16 -16
- package/{chunk-KR3YI36B.js → chunk-BJUDYFV5.js} +10 -2
- package/chunk-BMQ2MJUK.js +153 -0
- package/{chunk-XGJAR4T5.js → chunk-BNGW5ASC.js} +65 -4
- package/{chunk-VOOTT7HA.js → chunk-BTSYHR7J.js} +4 -4
- package/{chunk-LS2ZANRJ.js → chunk-CTUQJVQM.js} +1 -1
- package/{chunk-JEDZAO7L.js → chunk-D2W6WRHT.js} +13 -8
- package/{chunk-U47DH2WO.js → chunk-D76D3RTR.js} +2 -2
- package/{chunk-HQCSU3DI.js → chunk-DCLMZ5TX.js} +4 -4
- package/{chunk-OOLWKQSM.js → chunk-EFZKILX6.js} +4 -4
- package/{chunk-WP6BC7OF.js → chunk-EHO5EGU4.js} +23 -76
- package/{chunk-HVURBGF3.js → chunk-ESRMFY7G.js} +2 -2
- package/{chunk-ABQYVJBJ.js → chunk-ETZWFV6M.js} +1 -1
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/{chunk-BF2K6MRF.js → chunk-F64B2W3R.js} +110 -34
- package/{chunk-S3UI4IUJ.js → chunk-G4EMOUX3.js} +886 -154
- package/{chunk-B4S7MR5S.js → chunk-GJUKGFHG.js} +74 -16
- package/{chunk-LSSBA2TN.js → chunk-GMVELWJG.js} +3 -3
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-CJCJF5XB.js → chunk-H6A6X4EK.js} +36 -3
- package/{chunk-DSX6K7C2.js → chunk-HBTA2SGQ.js} +97 -21
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-W2E6HIIK.js → chunk-HNRASX3X.js} +8 -8
- package/{chunk-CPH3W5A7.js → chunk-I3TQJXQ7.js} +94 -3
- package/{chunk-E3VQ6S3A.js → chunk-IS5VEM2G.js} +140 -15
- package/{chunk-NKIH4Q7W.js → chunk-ISHYYQJC.js} +5 -3
- package/{chunk-RLEWGSM5.js → chunk-K7M4I3PF.js} +30 -7
- package/{chunk-OH7H6LPC.js → chunk-KQOD3G2X.js} +165 -15
- package/{chunk-YOXYA2GU.js → chunk-LNPYTNMG.js} +10 -5
- package/{chunk-GRDSMV4V.js → chunk-LS2MI3B4.js} +45 -45
- package/{chunk-GII32WZW.js → chunk-M2EJHDJP.js} +3 -0
- package/{chunk-7S4YWN7P.js → chunk-MX574M24.js} +1 -1
- package/{chunk-RZYQMSQA.js → chunk-N3XA2O6O.js} +1 -1
- package/{chunk-SASGLNUD.js → chunk-NILSKYOE.js} +3 -3
- package/chunk-OCZKATRC.js +129 -0
- package/{chunk-MBEEYLGL.js → chunk-OOSVFT6S.js} +2 -2
- package/{chunk-QCZX4FTW.js → chunk-OY5IJI2N.js} +194 -21
- package/{chunk-SUERPXJZ.js → chunk-PAYUVQ6P.js} +7517 -1091
- package/{chunk-JTYPAMGP.js → chunk-Q67DOFOO.js} +59 -4
- package/{chunk-F3UTRUDO.js → chunk-QALRKMHF.js} +11 -10
- package/{chunk-546FPOW3.js → chunk-QDSINZM3.js} +1 -1
- package/{chunk-TMAZ3VHN.js → chunk-QJLEMM2V.js} +1 -1
- package/{chunk-IIKPWSPX.js → chunk-R4SQ3LGW.js} +1 -1
- package/{chunk-E2NP7ZQU.js → chunk-RZ6CQZB2.js} +34 -20
- package/{chunk-SAFZABH7.js → chunk-SV5IJK6K.js} +1 -1
- package/{chunk-AQDH76OK.js → chunk-T5V7HA3K.js} +1 -1
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/chunk-UNYJU5L6.js +780 -0
- package/{chunk-QFMFJZLO.js → chunk-V7E4PXQD.js} +1 -1
- package/{chunk-G5X57NDE.js → chunk-VBSVA6CB.js} +2 -2
- package/{chunk-3XMOAYRC.js → chunk-VETFWL5K.js} +1 -1
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-6D6VBVEW.js → chunk-VPFEPRME.js} +9 -9
- package/{chunk-HGRDL36J.js → chunk-W2P25VGS.js} +25 -6
- package/{chunk-XAQAF25W.js → chunk-WC6A2Q7S.js} +5 -3
- package/{chunk-WON762L4.js → chunk-WT2IAJAJ.js} +4 -4
- package/chunk-X6YIXGPT.js +870 -0
- package/{chunk-ZKMYGRO7.js → chunk-YMPTI7RZ.js} +9 -9
- package/{chunk-BKP7CFUD.js → chunk-YRIFJ6XQ.js} +13 -13
- package/{chunk-FZGV4FGK.js → chunk-YRRASA5Q.js} +268 -143
- package/{chunk-UDEFS2PV.js → chunk-Z5W7UMQV.js} +2 -2
- package/{chunk-ZHUTWJ3N.js → chunk-ZGJLSHER.js} +2 -2
- package/{chunk-4CAPEGHN.js → chunk-ZI2MEZMT.js} +304 -136
- package/{chunk-2F7RJC6L.js → chunk-ZOVKKMF6.js} +1 -1
- package/commandRegistry-BP5JLW24.js +822 -0
- package/{contentThunks-TC3AENBY.js → contentThunks-2HYFUXUM.js} +29 -29
- package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-67EOD3WK.js → createAgentAutomationAction-DCKUSJH7.js} +29 -29
- package/{createDialogAction-4OCQC5MW.js → createDialogAction-NRIAEH2A.js} +32 -32
- package/{createPageAction-JLGVP57B.js → createPageAction-AUJHHXGG.js} +35 -35
- package/{dbSlice-RDGCE5MU.js → dbSlice-HFPIJT5P.js} +8 -8
- package/{deleteFile-YG6QMJLU.js → deleteFile-UEAD5A5Z.js} +3 -3
- package/{dialogCommands-JHSDKCR5.js → dialogCommands-UJRGCRN6.js} +42 -39
- package/{dialogSlice-I2DK32ZT.js → dialogSlice-AHU4XXIW.js} +35 -29
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-QUL6VWK2.js → docCreateCommands-ZOV3ZBLW.js} +39 -38
- package/{docDeleteCommands-DMQ2MU6I.js → docDeleteCommands-G4KAXJYQ.js} +39 -38
- package/{docReadCommands-FVHENBU6.js → docReadCommands-B2MM3JIT.js} +38 -37
- package/{docStore-OLC6MD7B.js → docStore-SITH63V3.js} +9 -9
- package/{docUpdateCommands-VA6V5C6L.js → docUpdateCommands-2QNF5CYN.js} +39 -38
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-67MEFPZR.js} +2 -2
- package/{getPricing-YYXTEPBP.js → getPricing-OX7B4R6B.js} +3 -3
- package/{handleSendMessageAction-GRDIRXAK.js → handleSendMessageAction-7ZMJMWLC.js} +72 -80
- package/index.js +74 -877
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-EBRS242U.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-5W6IJRAD.js} +6 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-3LRMNLCM.js} +1 -1
- package/{machineCommands-IJJ66MYU.js → machineCommands-YCTD5KOL.js} +75 -71
- package/{machineWsRunDispatch-PP2ZBS6D.js → machineWsRunDispatch-JFMD4ZAW.js} +73 -69
- package/{memberThunks-WQGQWYYT.js → memberThunks-SKFZ37VS.js} +9 -9
- package/{models-UN7YGMPM.js → models-T3SG6MJ5.js} +2 -2
- package/oauthTokenStore-ITEB663N.js +23 -0
- package/{offlineMarxistsAgentCommand-JEWCIAWM.js → offlineMarxistsAgentCommand-HGXZV4XJ.js} +1 -1
- package/package.json +1 -1
- package/pdf-U6KSUEZZ.js +26435 -0
- package/processSpawn-SOAV3FEV.js +11 -0
- package/profileConfig-ZGOFORWV.js +43 -0
- package/{providerPresetApply-NO73BG45.js → providerPresetApply-2QTBYN36.js} +7 -7
- package/{providerRegistry-OVY4VKNN.js → providerRegistry-SVXE4G4T.js} +7 -7
- package/{read-S4WC2OUK.js → read-IEJLLUXY.js} +5 -5
- package/{readDocTool-PQNM63KV.js → readDocTool-4SPYCP2Y.js} +5 -3
- package/{readlineWorkspace-ASJECDJD.js → readlineWorkspace-M3PLTBLD.js} +2396 -2018
- package/{removeDialogAgentAction-YJZ6XJV6.js → removeDialogAgentAction-LILXTOQY.js} +14 -14
- package/{runAgentClientLoop-KIOQSDRC.js → runAgentClientLoop-QMCXBOBH.js} +55 -55
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-3USD722U.js} +3 -3
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-E6A3WL4E.js → setDialogExtraReferencesAction-LVNHLNT5.js} +10 -10
- package/{setPrimaryDialogAgentAction-WBLIVICQ.js → setPrimaryDialogAgentAction-DCKO5NTW.js} +14 -14
- package/{settingSlice-JR6S7TRD.js → settingSlice-CNE75ISY.js} +10 -10
- package/{spaceCommands-WDUNCAK5.js → spaceCommands-3U6OHM6O.js} +39 -38
- package/{streamAgentChatTurn-EGQDPMAO.js → streamAgentChatTurn-JPMJQSEE.js} +144 -84
- package/{switchDialogAgentAction-DTR36ZY2.js → switchDialogAgentAction-JSYUQ5CG.js} +11 -11
- package/{tableCommands-O6NWHFKV.js → tableCommands-G7RV3RU3.js} +4 -4
- package/{toolApiClient-7PSIFQPJ.js → toolApiClient-INIQCPGY.js} +3 -3
- package/{tools-AOVE5LKM.js → tools-XQ5GIH6P.js} +49 -49
- package/{tuiSummaryLlmCaller-XRQCSNYQ.js → tuiSummaryLlmCaller-L63PDJUD.js} +16 -15
- package/{updateCommands-2M74UL7P.js → updateCommands-ECWKIWLQ.js} +3 -3
- package/{updateDialogTitleAction-T66TXHIR.js → updateDialogTitleAction-EGAZMLUB.js} +32 -32
- package/agentRecordCommands-FST3KAKG.js +0 -126
- package/chunk-4QKBQHPQ.js +0 -79
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
NOLO_CHROME_CONNECTOR_PROTOCOL_VERSION,
|
|
4
4
|
REQUIRED_CHROME_CONNECTOR_FEATURES,
|
|
5
5
|
createChromeConnectorClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OY5IJI2N.js";
|
|
7
7
|
import {
|
|
8
8
|
toErrorMessage
|
|
9
9
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -21,6 +21,7 @@ import { dirname, resolve } from "node:path";
|
|
|
21
21
|
import { execFileSync } from "node:child_process";
|
|
22
22
|
import { fileURLToPath } from "node:url";
|
|
23
23
|
var DEFAULT_CONNECTOR_ROOT = dirname(fileURLToPath(import.meta.url));
|
|
24
|
+
var FIREFOX_EXTENSION_ID = "nolo-browser-connector@nolo.chat";
|
|
24
25
|
function extensionIdFromPublicKey(publicKeyBase64) {
|
|
25
26
|
const digest = createHash("sha256").update(Buffer.from(publicKeyBase64, "base64")).digest();
|
|
26
27
|
return Array.from(
|
|
@@ -40,8 +41,23 @@ function resolveNodePath() {
|
|
|
40
41
|
}
|
|
41
42
|
function nativeMessagingHostsDir({
|
|
42
43
|
home = process.env.HOME || "",
|
|
43
|
-
platform = process.platform
|
|
44
|
+
platform = process.platform,
|
|
45
|
+
browser = "chrome"
|
|
44
46
|
} = {}) {
|
|
47
|
+
if (browser === "firefox") {
|
|
48
|
+
if (platform === "darwin") {
|
|
49
|
+
return resolve(home, "Library/Application Support/Mozilla/NativeMessagingHosts");
|
|
50
|
+
}
|
|
51
|
+
if (platform === "linux") {
|
|
52
|
+
return resolve(home, ".mozilla/native-messaging-hosts");
|
|
53
|
+
}
|
|
54
|
+
throw new Error(
|
|
55
|
+
`Firefox native host installation is not implemented for platform "${platform}". Windows needs a registry value under HKCU\\Software\\Mozilla\\NativeMessagingHosts pointing at the manifest file.`
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
if (browser !== "chrome") {
|
|
59
|
+
throw new Error(`Unknown native messaging browser target: "${browser}".`);
|
|
60
|
+
}
|
|
45
61
|
if (platform === "darwin") {
|
|
46
62
|
return resolve(home, "Library/Application Support/Google/Chrome/NativeMessagingHosts");
|
|
47
63
|
}
|
|
@@ -55,16 +71,18 @@ function nativeMessagingHostsDir({
|
|
|
55
71
|
function resolveNativeHostInstallPaths({
|
|
56
72
|
home = process.env.HOME || "",
|
|
57
73
|
connectorRoot = DEFAULT_CONNECTOR_ROOT,
|
|
58
|
-
platform = process.platform
|
|
74
|
+
platform = process.platform,
|
|
75
|
+
browser = "chrome"
|
|
59
76
|
} = {}) {
|
|
60
77
|
const supportDir = resolve(home, "Library/Application Support/Nolo/ChromeConnector");
|
|
61
78
|
return {
|
|
62
79
|
connectorRoot,
|
|
80
|
+
browser,
|
|
63
81
|
extensionManifestPath: resolve(connectorRoot, "extension", "manifest.json"),
|
|
64
82
|
hostPath: resolve(connectorRoot, "native-host", "nolo-chrome-native-host.mjs"),
|
|
65
83
|
templatePath: resolve(connectorRoot, "native-host", "com.nolo.chrome_connector.json"),
|
|
66
84
|
nativeManifestPath: resolve(
|
|
67
|
-
nativeMessagingHostsDir({ home, platform }),
|
|
85
|
+
nativeMessagingHostsDir({ home, platform, browser }),
|
|
68
86
|
"com.nolo.chrome_connector.json"
|
|
69
87
|
),
|
|
70
88
|
supportDir,
|
|
@@ -77,12 +95,13 @@ function installNativeHostManifest({
|
|
|
77
95
|
connectorRoot = DEFAULT_CONNECTOR_ROOT,
|
|
78
96
|
platform = process.platform,
|
|
79
97
|
extensionId,
|
|
80
|
-
nodePath
|
|
98
|
+
nodePath,
|
|
99
|
+
browser = "chrome"
|
|
81
100
|
} = {}) {
|
|
82
|
-
const paths = resolveNativeHostInstallPaths({ home, connectorRoot, platform });
|
|
101
|
+
const paths = resolveNativeHostInstallPaths({ home, connectorRoot, platform, browser });
|
|
83
102
|
const manifest = JSON.parse(readFileSync(paths.templatePath, "utf8"));
|
|
84
103
|
const extensionManifest = JSON.parse(readFileSync(paths.extensionManifestPath, "utf8"));
|
|
85
|
-
const resolvedExtensionId = extensionId || extensionIdFromPublicKey(extensionManifest.key);
|
|
104
|
+
const resolvedExtensionId = extensionId || (browser === "firefox" ? FIREFOX_EXTENSION_ID : extensionIdFromPublicKey(extensionManifest.key));
|
|
86
105
|
const resolvedNodePath = nodePath || resolveNodePath();
|
|
87
106
|
mkdirSync(paths.supportDir, { recursive: true });
|
|
88
107
|
const existingToken = existsSync(paths.tokenPath) ? readFileSync(paths.tokenPath, "utf8").trim() : "";
|
|
@@ -97,12 +116,18 @@ NOLO_CHROME_CONNECTOR_TOKEN=${JSON.stringify(token)} exec ${JSON.stringify(resol
|
|
|
97
116
|
);
|
|
98
117
|
chmodSync(paths.wrapperPath, 493);
|
|
99
118
|
manifest.path = paths.wrapperPath;
|
|
100
|
-
|
|
119
|
+
if (browser === "firefox") {
|
|
120
|
+
delete manifest.allowed_origins;
|
|
121
|
+
manifest.allowed_extensions = [FIREFOX_EXTENSION_ID];
|
|
122
|
+
} else {
|
|
123
|
+
manifest.allowed_origins = [`chrome-extension://${resolvedExtensionId}/`];
|
|
124
|
+
}
|
|
101
125
|
mkdirSync(dirname(paths.nativeManifestPath), { recursive: true });
|
|
102
126
|
writeFileSync(paths.nativeManifestPath, `${JSON.stringify(manifest, null, 2)}
|
|
103
127
|
`);
|
|
104
128
|
return {
|
|
105
129
|
extensionId: resolvedExtensionId,
|
|
130
|
+
browser,
|
|
106
131
|
nodePath: resolvedNodePath,
|
|
107
132
|
tokenPath: paths.tokenPath,
|
|
108
133
|
...paths
|
|
@@ -253,7 +278,7 @@ function resolveStatusNextStep(report) {
|
|
|
253
278
|
return "nolo chrome install (the installed manifest does not point at this checkout's wrapper / extension id, which Chrome silently ignores)";
|
|
254
279
|
}
|
|
255
280
|
if (!report.rpc.online) {
|
|
256
|
-
return `Load the unpacked extension from ${report.extension.path} in chrome://extensions (Developer mode) or install
|
|
281
|
+
return `Load the unpacked extension from ${report.extension.path} in chrome://extensions (Developer mode), or install the Nolo Browser Connector from https://nolo.chat/downloads (Chrome or Firefox), then rerun \`nolo chrome status\`.`;
|
|
257
282
|
}
|
|
258
283
|
if (report.rpc.extensionId && report.rpc.extensionId !== report.extension.expectedId) {
|
|
259
284
|
return `The connected extension (${report.rpc.extensionId}) is not the connector at ${report.extension.path}; remove the other copy and rerun \`nolo chrome status\`.`;
|
|
@@ -451,7 +476,7 @@ async function runChromeInstallCommand(args, deps = {}) {
|
|
|
451
476
|
` wrapper : ${result.wrapperPath} -> ${result.nodePath}`,
|
|
452
477
|
` token : ${result.tokenPath} (an existing token is kept, so reruns are idempotent)`,
|
|
453
478
|
` extension: ${result.extensionId}`,
|
|
454
|
-
`Next step: load the unpacked extension from ${resolve2(connectorRoot, "extension")} in chrome://extensions (Developer mode) or install
|
|
479
|
+
`Next step: load the unpacked extension from ${resolve2(connectorRoot, "extension")} in chrome://extensions (Developer mode), or install the Nolo Browser Connector from https://nolo.chat/downloads (Chrome or Firefox), then run \`nolo chrome status\`.`,
|
|
455
480
|
""
|
|
456
481
|
].join("\n")
|
|
457
482
|
);
|
|
@@ -480,7 +505,7 @@ The connector service worker restarts within ~1s; verify with \`nolo chrome stat
|
|
|
480
505
|
`);
|
|
481
506
|
if (code === "CHROME_CONNECTOR_UNAVAILABLE") {
|
|
482
507
|
output.write(
|
|
483
|
-
"The native host is not reachable: load the unpacked connector extension in chrome://extensions
|
|
508
|
+
"The native host is not reachable: open Chrome or Firefox with the Nolo Browser Connector extension enabled, or install it from https://nolo.chat/downloads (or load the unpacked connector extension in chrome://extensions), then rerun `nolo chrome reload`.\n"
|
|
484
509
|
);
|
|
485
510
|
}
|
|
486
511
|
return 1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createChromeConnectorClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OY5IJI2N.js";
|
|
4
4
|
import {
|
|
5
5
|
toErrorMessage
|
|
6
6
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -23,6 +23,18 @@ function wantsHelp(args) {
|
|
|
23
23
|
function readTrimmedOption(args, flag) {
|
|
24
24
|
return (readOption(args, flag) ?? "").trim();
|
|
25
25
|
}
|
|
26
|
+
function readAllOptions(args, flag) {
|
|
27
|
+
const values = [];
|
|
28
|
+
for (let i = 0; i < args.length; i++) {
|
|
29
|
+
if (args[i] === flag && i + 1 < args.length) {
|
|
30
|
+
const val = args[i + 1].trim();
|
|
31
|
+
if (val && !val.startsWith("--")) {
|
|
32
|
+
values.push(val);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return values;
|
|
37
|
+
}
|
|
26
38
|
function readIntOption(args, flag, usage) {
|
|
27
39
|
const raw = readOption(args, flag);
|
|
28
40
|
if (raw === void 0) return void 0;
|
|
@@ -112,6 +124,24 @@ var CHROME_OPS_SUBCOMMANDS = {
|
|
|
112
124
|
};
|
|
113
125
|
}
|
|
114
126
|
},
|
|
127
|
+
upload: {
|
|
128
|
+
action: "set_files",
|
|
129
|
+
usage: "nolo chrome upload --tab <id> (--ref <elementRef> | --selector <css>) --file <path> [--file <path>...]",
|
|
130
|
+
payload: (args, usage) => {
|
|
131
|
+
const files = readAllOptions(args, "--file");
|
|
132
|
+
if (files.length === 0) {
|
|
133
|
+
throw new Error(`Missing required --file <path>. Usage: ${usage}`);
|
|
134
|
+
}
|
|
135
|
+
const target = requireTarget(args, usage);
|
|
136
|
+
const tabId = requireTabId(args, usage);
|
|
137
|
+
return {
|
|
138
|
+
tabId,
|
|
139
|
+
...target,
|
|
140
|
+
...target.elementRef ? { ref: target.elementRef } : {},
|
|
141
|
+
files
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
},
|
|
115
145
|
press: {
|
|
116
146
|
action: "press",
|
|
117
147
|
usage: "nolo chrome press --tab <id> --key <key>",
|