nodus-wechat 0.6.0 → 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 +7 -1
- package/bin/nodus-wechat.js +26 -11
- package/package.json +5 -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.
|
|
@@ -112,3 +114,7 @@ npm publish
|
|
|
112
114
|
|
|
113
115
|
The package is configured for public npm access. If npm reports `E401`, run
|
|
114
116
|
`npm login` first.
|
|
117
|
+
|
|
118
|
+
For npm Trusted Publishing, push this package to GitHub and configure npm to
|
|
119
|
+
trust the workflow at `.github/workflows/publish.yml`. The workflow publishes
|
|
120
|
+
with OIDC and does not need an `NPM_TOKEN` secret.
|
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
|
}
|
|
@@ -376,7 +376,8 @@ function setup(options) {
|
|
|
376
376
|
console.log(`Model: ${config.agent.model}`);
|
|
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
|
-
console.log("
|
|
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; it will install OpeniLink if missing.");
|
|
380
381
|
}
|
|
381
382
|
|
|
382
383
|
function installHermes() {
|
|
@@ -669,7 +670,7 @@ function startDocker() {
|
|
|
669
670
|
return runDockerCompose(config, ["up", "-d"]);
|
|
670
671
|
}
|
|
671
672
|
|
|
672
|
-
function startLocal() {
|
|
673
|
+
function startLocal(options) {
|
|
673
674
|
const config = loadRuntimeConfig();
|
|
674
675
|
if (!config) {
|
|
675
676
|
return 1;
|
|
@@ -681,11 +682,25 @@ function startLocal() {
|
|
|
681
682
|
return 1;
|
|
682
683
|
}
|
|
683
684
|
|
|
684
|
-
|
|
685
|
+
let oih = commandPath("oih");
|
|
685
686
|
if (!oih) {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
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
|
+
}
|
|
689
704
|
}
|
|
690
705
|
|
|
691
706
|
const env = localRuntimeEnv(config);
|
|
@@ -698,7 +713,7 @@ function startLocal() {
|
|
|
698
713
|
}
|
|
699
714
|
|
|
700
715
|
function start(options) {
|
|
701
|
-
return options.docker ? startDocker() : startLocal();
|
|
716
|
+
return options.docker ? startDocker() : startLocal(options);
|
|
702
717
|
}
|
|
703
718
|
|
|
704
719
|
function statusDocker() {
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nodus-wechat",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "CLI installer for Nodus WeChat, Hermes, and the local OpeniLink webhook runtime.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/zyaireleo/nodus-wechat.git"
|
|
10
|
+
},
|
|
7
11
|
"bin": {
|
|
8
12
|
"nodus-wechat": "bin/nodus-wechat.js"
|
|
9
13
|
},
|