nodus-wechat 0.6.1 → 0.6.2
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 -1
- package/bin/nodus-wechat.js +25 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ npx nodus-wechat install-hermes
|
|
|
17
17
|
npx nodus-wechat install-openilink
|
|
18
18
|
npx nodus-wechat doctor
|
|
19
19
|
npx nodus-wechat start
|
|
20
|
+
npx nodus-wechat start --no-install
|
|
20
21
|
npx nodus-wechat start --docker
|
|
21
22
|
npx nodus-wechat status
|
|
22
23
|
npx nodus-wechat logs
|
|
@@ -52,6 +53,7 @@ the official OpeniLink installer.
|
|
|
52
53
|
- Stores gateway base URL, api key, model, Hermes paths, OpeniLink origin, webhook port, and runtime path.
|
|
53
54
|
- Checks Node.js, local configuration, Hermes files, runtime files, Python, OpeniLink CLI, optional Docker Compose availability, Hermes CLI availability, and WeChat app detection with `doctor`.
|
|
54
55
|
- Starts/stops the local runtime with native local processes by default.
|
|
56
|
+
- Installs OpeniLink automatically during `start` when the native `oih` CLI is missing.
|
|
55
57
|
- Keeps Docker Compose available only when `--docker` is passed.
|
|
56
58
|
- Removes Nodus WeChat config/runtime files with `uninstall --yes`.
|
|
57
59
|
- Cleans Nodus WeChat config/runtime plus generated Hermes settings with `clean --yes`.
|
|
@@ -75,7 +77,7 @@ the config generated by this CLI.
|
|
|
75
77
|
|
|
76
78
|
## Current non-goals
|
|
77
79
|
|
|
78
|
-
- Does not run
|
|
80
|
+
- Does not run the Hermes installer unless `--install-hermes` or `install-hermes` is explicitly requested.
|
|
79
81
|
- Does not automate, inject into, read, or control WeChat directly.
|
|
80
82
|
- Does not start a daemon, LaunchAgent, or background worker outside Docker Compose.
|
|
81
83
|
- Does not redeem real CDKs or mutate sub2api accounts; the bundled webhook keeps the existing dry-run POC boundary.
|
package/bin/nodus-wechat.js
CHANGED
|
@@ -8,7 +8,7 @@ const os = require("node:os");
|
|
|
8
8
|
const path = require("node:path");
|
|
9
9
|
const childProcess = require("node:child_process");
|
|
10
10
|
|
|
11
|
-
const VERSION = "0.6.
|
|
11
|
+
const VERSION = "0.6.2";
|
|
12
12
|
const DEFAULT_BASE_URL = "https://api.nodus.sbs/";
|
|
13
13
|
const DEFAULT_MODEL = "gpt-5.5";
|
|
14
14
|
const DEFAULT_OPENILINK_ORIGIN = "http://localhost:9800";
|
|
@@ -43,7 +43,7 @@ Usage:
|
|
|
43
43
|
nodus-wechat install-hermes
|
|
44
44
|
nodus-wechat install-openilink
|
|
45
45
|
nodus-wechat doctor
|
|
46
|
-
nodus-wechat start [--docker]
|
|
46
|
+
nodus-wechat start [--docker] [--no-install]
|
|
47
47
|
nodus-wechat status [--docker]
|
|
48
48
|
nodus-wechat logs [--docker]
|
|
49
49
|
nodus-wechat stop [--docker]
|
|
@@ -56,7 +56,7 @@ Commands:
|
|
|
56
56
|
install-openilink
|
|
57
57
|
Install OpeniLink Hub native CLI with the official installer.
|
|
58
58
|
doctor Check local prerequisites and configuration.
|
|
59
|
-
start Start OpeniLink + webhook with local processes by default.
|
|
59
|
+
start Start OpeniLink + webhook with local processes by default; installs OpeniLink if missing.
|
|
60
60
|
status Show local process status.
|
|
61
61
|
logs Follow local runtime logs.
|
|
62
62
|
stop Stop the local runtime.
|
|
@@ -78,7 +78,7 @@ function parseArgs(argv) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
const key = item.slice(2);
|
|
81
|
-
if (key === "help" || key === "yes" || key === "install-hermes" || key === "docker") {
|
|
81
|
+
if (key === "help" || key === "yes" || key === "install-hermes" || key === "docker" || key === "no-install") {
|
|
82
82
|
result[key] = true;
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
@@ -377,7 +377,7 @@ function setup(options) {
|
|
|
377
377
|
console.log(`OpeniLink Hub: ${config.openilink.publicOrigin}`);
|
|
378
378
|
console.log(`Webhook URL for OpeniLink: http://poc-webhook:${config.webhook.port}/webhook`);
|
|
379
379
|
console.log("Runtime mode: host process by default; Docker is used only with `--docker`.");
|
|
380
|
-
console.log("Run `nodus-wechat start` to start the local host runtime.");
|
|
380
|
+
console.log("Run `nodus-wechat start` to start the local host runtime; it will install OpeniLink if missing.");
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
function installHermes() {
|
|
@@ -670,7 +670,7 @@ function startDocker() {
|
|
|
670
670
|
return runDockerCompose(config, ["up", "-d"]);
|
|
671
671
|
}
|
|
672
672
|
|
|
673
|
-
function startLocal() {
|
|
673
|
+
function startLocal(options) {
|
|
674
674
|
const config = loadRuntimeConfig();
|
|
675
675
|
if (!config) {
|
|
676
676
|
return 1;
|
|
@@ -682,11 +682,25 @@ function startLocal() {
|
|
|
682
682
|
return 1;
|
|
683
683
|
}
|
|
684
684
|
|
|
685
|
-
|
|
685
|
+
let oih = commandPath("oih");
|
|
686
686
|
if (!oih) {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
687
|
+
if (options["no-install"]) {
|
|
688
|
+
console.error("OpeniLink Hub CLI `oih` is not installed.");
|
|
689
|
+
console.error("Run: nodus-wechat install-openilink");
|
|
690
|
+
return 1;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
console.log("OpeniLink Hub CLI `oih` is not installed; installing it now.");
|
|
694
|
+
const installResult = installOpeniLink();
|
|
695
|
+
if (installResult !== 0) {
|
|
696
|
+
return installResult;
|
|
697
|
+
}
|
|
698
|
+
oih = commandPath("oih");
|
|
699
|
+
if (!oih) {
|
|
700
|
+
console.error("OpeniLink installer completed, but `oih` is still not on PATH.");
|
|
701
|
+
console.error("Open a new terminal or add the installed OpeniLink path to PATH, then rerun `nodus-wechat start`.");
|
|
702
|
+
return 1;
|
|
703
|
+
}
|
|
690
704
|
}
|
|
691
705
|
|
|
692
706
|
const env = localRuntimeEnv(config);
|
|
@@ -699,7 +713,7 @@ function startLocal() {
|
|
|
699
713
|
}
|
|
700
714
|
|
|
701
715
|
function start(options) {
|
|
702
|
-
return options.docker ? startDocker() : startLocal();
|
|
716
|
+
return options.docker ? startDocker() : startLocal(options);
|
|
703
717
|
}
|
|
704
718
|
|
|
705
719
|
function statusDocker() {
|