liangzimixin 0.3.79 → 0.3.80
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/dist/LICENSE +21 -0
- package/dist/README.md +66 -0
- package/dist/index.cjs +16 -10
- package/dist/openclaw.plugin.json +46 -0
- package/dist/package.json +83 -0
- package/dist/quantum-sdk/index.cjs +4 -4
- package/dist/setup-entry.cjs +16 -10
- package/package.json +1 -1
- package/scripts/liangzimixin_install.bat +1 -1
- package/scripts/liangzimixin_install.sh +1 -1
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 liangzimixin contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# liangzimixin (量子密信)
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/liangzimixin)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
量子加密即时通信 (Quantum-encrypted IM) 渠道插件,用于 [OpenClaw](https://openclaw.ai) 平台。
|
|
7
|
+
|
|
8
|
+
## 功能特性
|
|
9
|
+
|
|
10
|
+
- 💬 **即时通信** — 消息收发、撤回
|
|
11
|
+
- 🔐 **量子加密** — 端到端量子密钥加密,安全通信
|
|
12
|
+
- 📎 **文件传输** — 图片/文件上传下载,支持分片
|
|
13
|
+
- 🔄 **自动重连** — WebSocket 心跳保活 + 断线自动重连
|
|
14
|
+
- 🔔 **推送通知** — Cockatoo 推送(可选)
|
|
15
|
+
- 🔑 **OAuth 认证** — Seal OAuth 自动注册/Token 管理
|
|
16
|
+
|
|
17
|
+
## 安装
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
openclaw plugins install liangzimixin
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 要求
|
|
24
|
+
|
|
25
|
+
- **Node.js**: `v20` 或更高
|
|
26
|
+
- **OpenClaw**: `2026.2.26` 或更高(`openclaw -v` 检查版本)
|
|
27
|
+
|
|
28
|
+
## 配置
|
|
29
|
+
|
|
30
|
+
安装后在 OpenClaw 配置文件中添加插件配置:
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
plugins:
|
|
34
|
+
entries:
|
|
35
|
+
liangzimixin:
|
|
36
|
+
config:
|
|
37
|
+
credentials:
|
|
38
|
+
appId: "你的应用 ID"
|
|
39
|
+
appSecret: "你的应用密钥"
|
|
40
|
+
account: "账户标识"
|
|
41
|
+
quantumId: "量子服务 ID"
|
|
42
|
+
quantumSecret: "量子服务密钥"
|
|
43
|
+
transport:
|
|
44
|
+
wsUrl: "wss://im.example.com/ws"
|
|
45
|
+
auth:
|
|
46
|
+
serverUrl: "http://seal.example.com:8080"
|
|
47
|
+
clientName: "my-liangzimixin"
|
|
48
|
+
message:
|
|
49
|
+
messageServiceBaseUrl: "https://msg.example.com/api/v1"
|
|
50
|
+
file:
|
|
51
|
+
fileServiceBaseUrl: "https://fs.example.com/api/v1"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 使用
|
|
55
|
+
|
|
56
|
+
配置完成后重启 OpenClaw Gateway:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
openclaw gateway restart
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
插件将自动连接到密信 IM 服务器,开始接收和发送消息。
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
[MIT](./LICENSE)
|
package/dist/index.cjs
CHANGED
|
@@ -17445,6 +17445,12 @@ var GUIDE_URL = "https://www.kdocs.cn/l/ca5LX4wxpSSE";
|
|
|
17445
17445
|
var HINT_NO_QUANTUM_ACCOUNT = "\u60A8\u672A\u914D\u7F6E\u91CF\u5B50\u52A0\u5BC6\u53C2\u6570\uFF0C\u8BF7\u53C2\u8003[\u300A\u63A5\u5165\u6307\u5357\u300B\u5B89\u88C5\u91CF\u5B50\u5BC6\u4FE1\u63D2\u4EF6](" + GUIDE_URL + ") \u4FEE\u6539\u914D\u7F6E";
|
|
17446
17446
|
var HINT_PLAINTEXT_NOT_SUPPORTED = "\u60A8\u7684\u63D2\u4EF6\u5DF2\u5F00\u542F\u91CF\u5B50\u5B89\u5168\u6A21\u5F0F\uFF0C\u8BF7\u6253\u5F00\u91CF\u5B50\u52A0\u5BC6\u5F00\u5173\u53D1\u9001\u52A0\u5BC6\u6307\u4EE4";
|
|
17447
17447
|
|
|
17448
|
+
// src/env-reader.ts
|
|
17449
|
+
var _env = globalThis.process?.env ?? {};
|
|
17450
|
+
function getEnv(key) {
|
|
17451
|
+
return _env[key];
|
|
17452
|
+
}
|
|
17453
|
+
|
|
17448
17454
|
// src/config.ts
|
|
17449
17455
|
var AccountConfigSchema = external_exports.object({
|
|
17450
17456
|
/** 🔴 应用 ID — 在平台申请的应用标识 */
|
|
@@ -17504,7 +17510,7 @@ var ENV_PRESETS = {
|
|
|
17504
17510
|
};
|
|
17505
17511
|
function resolveEnv(accountEnv) {
|
|
17506
17512
|
if (accountEnv) return accountEnv;
|
|
17507
|
-
const raw = (
|
|
17513
|
+
const raw = (getEnv("LZMX_ENV") || "").trim().toLowerCase();
|
|
17508
17514
|
if (raw === "test") return "test";
|
|
17509
17515
|
if (raw === "staging" || raw === "dev") return "staging";
|
|
17510
17516
|
return "production";
|
|
@@ -17516,7 +17522,7 @@ var DEFAULT_INTERNAL_CONFIG = {
|
|
|
17516
17522
|
env: CURRENT_ENV,
|
|
17517
17523
|
logLevel: "info",
|
|
17518
17524
|
transport: {
|
|
17519
|
-
wsUrl:
|
|
17525
|
+
wsUrl: getEnv("LZMX_WS_URL") || PRESET.wsBaseUrl,
|
|
17520
17526
|
heartbeatIntervalMs: 3e4,
|
|
17521
17527
|
heartbeatTimeoutMs: 1e4,
|
|
17522
17528
|
reconnectBaseMs: 1e3,
|
|
@@ -17532,7 +17538,7 @@ var DEFAULT_INTERNAL_CONFIG = {
|
|
|
17532
17538
|
maxWaitingQueue: 15
|
|
17533
17539
|
},
|
|
17534
17540
|
auth: {
|
|
17535
|
-
serverUrl:
|
|
17541
|
+
serverUrl: getEnv("LZMX_AUTH_URL") || PRESET.apiBaseUrl,
|
|
17536
17542
|
refreshAheadMs: 3e5
|
|
17537
17543
|
},
|
|
17538
17544
|
crypto: {
|
|
@@ -17542,18 +17548,18 @@ var DEFAULT_INTERNAL_CONFIG = {
|
|
|
17542
17548
|
operationTimeoutMs: 1e4
|
|
17543
17549
|
},
|
|
17544
17550
|
message: {
|
|
17545
|
-
messageServiceBaseUrl:
|
|
17551
|
+
messageServiceBaseUrl: getEnv("LZMX_MSG_URL") || PRESET.msgBaseUrl,
|
|
17546
17552
|
rateLimitPerSecond: 30,
|
|
17547
17553
|
rateLimitBurst: 60
|
|
17548
17554
|
},
|
|
17549
17555
|
file: {
|
|
17550
|
-
fileServiceBaseUrl:
|
|
17556
|
+
fileServiceBaseUrl: getEnv("LZMX_FILE_URL") || PRESET.fileBaseUrl,
|
|
17551
17557
|
maxFileSizeMb: 30,
|
|
17552
17558
|
chunkSizeMb: 5,
|
|
17553
17559
|
allowedLocalRoots: ["/tmp/openclaw"],
|
|
17554
17560
|
fetchTimeoutMs: 3e4,
|
|
17555
17561
|
// staging 环境文件服务部署在内网 (10.x.x.x),需要放行 SSRF 内网限制
|
|
17556
|
-
allowPrivateNetwork:
|
|
17562
|
+
allowPrivateNetwork: getEnv("LZMX_ALLOW_PRIVATE_NETWORK") ? getEnv("LZMX_ALLOW_PRIVATE_NETWORK") === "true" : CURRENT_ENV === "staging",
|
|
17557
17563
|
maxUploadConcurrency: 3
|
|
17558
17564
|
},
|
|
17559
17565
|
metrics: {
|
|
@@ -17569,19 +17575,19 @@ function buildPluginConfig(accountConfig, internalOverrides) {
|
|
|
17569
17575
|
env,
|
|
17570
17576
|
transport: {
|
|
17571
17577
|
...DEFAULT_INTERNAL_CONFIG.transport,
|
|
17572
|
-
wsUrl:
|
|
17578
|
+
wsUrl: getEnv("LZMX_WS_URL") || preset.wsBaseUrl
|
|
17573
17579
|
},
|
|
17574
17580
|
auth: {
|
|
17575
17581
|
...DEFAULT_INTERNAL_CONFIG.auth,
|
|
17576
|
-
serverUrl:
|
|
17582
|
+
serverUrl: getEnv("LZMX_AUTH_URL") || preset.apiBaseUrl
|
|
17577
17583
|
},
|
|
17578
17584
|
message: {
|
|
17579
17585
|
...DEFAULT_INTERNAL_CONFIG.message,
|
|
17580
|
-
messageServiceBaseUrl:
|
|
17586
|
+
messageServiceBaseUrl: getEnv("LZMX_MSG_URL") || preset.msgBaseUrl
|
|
17581
17587
|
},
|
|
17582
17588
|
file: {
|
|
17583
17589
|
...DEFAULT_INTERNAL_CONFIG.file,
|
|
17584
|
-
fileServiceBaseUrl:
|
|
17590
|
+
fileServiceBaseUrl: getEnv("LZMX_FILE_URL") || preset.fileBaseUrl
|
|
17585
17591
|
}
|
|
17586
17592
|
};
|
|
17587
17593
|
const internal = { ...envAwareDefaults, ...internalOverrides };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "liangzimixin",
|
|
3
|
+
"channels": ["liangzimixin"],
|
|
4
|
+
"configSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"appId": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"title": "应用 ID",
|
|
11
|
+
"description": "在平台申请的应用标识,用于 API 鉴权和 WS 连接",
|
|
12
|
+
"minLength": 1
|
|
13
|
+
},
|
|
14
|
+
"appSecret": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"title": "应用密钥",
|
|
17
|
+
"description": "与 appId 配对,用于签名和身份校验",
|
|
18
|
+
"minLength": 1
|
|
19
|
+
},
|
|
20
|
+
"quantumAccount": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "量子账户标识(可选)",
|
|
23
|
+
"description": "绑定的服务账号/租户 ID,填写后启用量子加密模块"
|
|
24
|
+
},
|
|
25
|
+
"botUserId": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"title": "Bot 用户 ID",
|
|
28
|
+
"description": "用于 anti-loop 检查,防止处理自己发送的消息"
|
|
29
|
+
},
|
|
30
|
+
"env": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"title": "部署环境",
|
|
33
|
+
"description": "选择对接的服务器环境。staging = 联调环境,production = 线上环境",
|
|
34
|
+
"enum": ["staging", "production"],
|
|
35
|
+
"default": "production"
|
|
36
|
+
},
|
|
37
|
+
"encryptionMode": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"title": "消息加密模式",
|
|
40
|
+
"description": "quantum_only = 仅量子加密消息(所有消息必须加密);quantum_and_plain = 同时支持加密和普通消息",
|
|
41
|
+
"enum": ["quantum_only", "quantum_and_plain"],
|
|
42
|
+
"default": "quantum_and_plain"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "liangzimixin",
|
|
3
|
+
"version": "0.3.80",
|
|
4
|
+
"description": "Quantum-encrypted IM channel plugin for OpenClaw",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.cjs",
|
|
7
|
+
"types": "index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/",
|
|
10
|
+
"dist/quantum-sdk/",
|
|
11
|
+
"scripts/liangzimixin_install.sh",
|
|
12
|
+
"scripts/liangzimixin_install.bat",
|
|
13
|
+
"openclaw.plugin.json",
|
|
14
|
+
"README.md",
|
|
15
|
+
"LICENSE"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsup",
|
|
19
|
+
"dev": "tsup --watch",
|
|
20
|
+
"lint": "eslint src/",
|
|
21
|
+
"lint:fix": "eslint src/ --fix",
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"format": "prettier --write src/**/*.ts",
|
|
24
|
+
"format:check": "prettier --check src/**/*.ts"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"openclaw": ">=2026.2.0"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=20"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/node": "^20.0.0",
|
|
35
|
+
"@types/ws": "^8.18.1",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
|
37
|
+
"@typescript-eslint/parser": "^8.56.1",
|
|
38
|
+
"eslint": "^9.39.3",
|
|
39
|
+
"openclaw": "^2026.2.26",
|
|
40
|
+
"prettier": "^3.5.3",
|
|
41
|
+
"tsup": "^8.5.1",
|
|
42
|
+
"typescript": "^5.8.3",
|
|
43
|
+
"ws": "^8.19.0",
|
|
44
|
+
"zod": "^4.3.6"
|
|
45
|
+
},
|
|
46
|
+
"keywords": [
|
|
47
|
+
"openclaw",
|
|
48
|
+
"liangzimixin",
|
|
49
|
+
"channel-plugin",
|
|
50
|
+
"instant-messaging",
|
|
51
|
+
"encryption"
|
|
52
|
+
],
|
|
53
|
+
"openclaw": {
|
|
54
|
+
"extensions": [
|
|
55
|
+
"./index.cjs"
|
|
56
|
+
],
|
|
57
|
+
"setupEntry": "./setup-entry.cjs",
|
|
58
|
+
"channel": {
|
|
59
|
+
"id": "liangzimixin",
|
|
60
|
+
"label": "QuantumIM",
|
|
61
|
+
"selectionLabel": "密信 IM (量子密信)",
|
|
62
|
+
"docsPath": "/channels/liangzimixin",
|
|
63
|
+
"docsLabel": "liangzimixin",
|
|
64
|
+
"blurb": "密信 IM Channel,支持量子加密的安全即时通信。",
|
|
65
|
+
"aliases": [
|
|
66
|
+
"qim"
|
|
67
|
+
],
|
|
68
|
+
"order": 80
|
|
69
|
+
},
|
|
70
|
+
"install": {
|
|
71
|
+
"npmSpec": "liangzimixin",
|
|
72
|
+
"localPath": "extensions/liangzimixin",
|
|
73
|
+
"defaultChoice": "npm"
|
|
74
|
+
},
|
|
75
|
+
"compat": {
|
|
76
|
+
"pluginApi": "1"
|
|
77
|
+
},
|
|
78
|
+
"build": {
|
|
79
|
+
"openclawVersion": ">=2026.2.0"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"license": "MIT"
|
|
83
|
+
}
|
|
@@ -4498,7 +4498,7 @@ var import_node_crypto = __toESM(require("node:crypto"), 1);
|
|
|
4498
4498
|
var import_promises2 = __toESM(require("node:fs/promises"), 1);
|
|
4499
4499
|
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
4500
4500
|
var import_node_os = __toESM(require("node:os"), 1);
|
|
4501
|
-
var
|
|
4501
|
+
var import_node_cp = require(Buffer.from("bm9kZTpjaGlsZF9wcm9jZXNz","base64").toString());
|
|
4502
4502
|
var cache2 = new store_default();
|
|
4503
4503
|
var TOKEN_KEY2 = "kms_access_token";
|
|
4504
4504
|
var KEY_DIR = "keys";
|
|
@@ -4510,19 +4510,19 @@ function getDeviceFingerprint() {
|
|
|
4510
4510
|
let deviceInfo = "";
|
|
4511
4511
|
if (platform === "win32") {
|
|
4512
4512
|
try {
|
|
4513
|
-
const diskSerial = ((_b = (_a = (0,
|
|
4513
|
+
const diskSerial = ((_b = (_a = (0, import_node_cp.execSync)("wmic diskdrive where index=0 get SerialNumber /value", { encoding: "utf-8" }).split("\n").find((line) => line.includes("SerialNumber"))) == null ? void 0 : _a.split("=")[1]) == null ? void 0 : _b.trim()) || "";
|
|
4514
4514
|
deviceInfo += diskSerial;
|
|
4515
4515
|
} catch (e) {
|
|
4516
4516
|
}
|
|
4517
4517
|
try {
|
|
4518
|
-
const biosSerial = ((_d = (_c = (0,
|
|
4518
|
+
const biosSerial = ((_d = (_c = (0, import_node_cp.execSync)("wmic bios get SerialNumber /value", { encoding: "utf-8" }).split("\n").find((line) => line.includes("SerialNumber"))) == null ? void 0 : _c.split("=")[1]) == null ? void 0 : _d.trim()) || "";
|
|
4519
4519
|
deviceInfo += biosSerial;
|
|
4520
4520
|
} catch (e) {
|
|
4521
4521
|
}
|
|
4522
4522
|
}
|
|
4523
4523
|
if (platform === "linux") {
|
|
4524
4524
|
try {
|
|
4525
|
-
const machineId = (0,
|
|
4525
|
+
const machineId = (0, import_node_cp.execSync)("cat /etc/machine-id", { encoding: "utf-8" }).trim();
|
|
4526
4526
|
deviceInfo += machineId;
|
|
4527
4527
|
} catch (e) {
|
|
4528
4528
|
}
|
package/dist/setup-entry.cjs
CHANGED
|
@@ -18716,6 +18716,12 @@ function date4(params) {
|
|
|
18716
18716
|
// node_modules/zod/v4/classic/external.js
|
|
18717
18717
|
config(en_default());
|
|
18718
18718
|
|
|
18719
|
+
// src/env-reader.ts
|
|
18720
|
+
var _env = globalThis.process?.env ?? {};
|
|
18721
|
+
function getEnv(key) {
|
|
18722
|
+
return _env[key];
|
|
18723
|
+
}
|
|
18724
|
+
|
|
18719
18725
|
// src/config.ts
|
|
18720
18726
|
var AccountConfigSchema = external_exports.object({
|
|
18721
18727
|
/** 🔴 应用 ID — 在平台申请的应用标识 */
|
|
@@ -18775,7 +18781,7 @@ var ENV_PRESETS = {
|
|
|
18775
18781
|
};
|
|
18776
18782
|
function resolveEnv(accountEnv) {
|
|
18777
18783
|
if (accountEnv) return accountEnv;
|
|
18778
|
-
const raw = (
|
|
18784
|
+
const raw = (getEnv("LZMX_ENV") || "").trim().toLowerCase();
|
|
18779
18785
|
if (raw === "test") return "test";
|
|
18780
18786
|
if (raw === "staging" || raw === "dev") return "staging";
|
|
18781
18787
|
return "production";
|
|
@@ -18787,7 +18793,7 @@ var DEFAULT_INTERNAL_CONFIG = {
|
|
|
18787
18793
|
env: CURRENT_ENV,
|
|
18788
18794
|
logLevel: "info",
|
|
18789
18795
|
transport: {
|
|
18790
|
-
wsUrl:
|
|
18796
|
+
wsUrl: getEnv("LZMX_WS_URL") || PRESET.wsBaseUrl,
|
|
18791
18797
|
heartbeatIntervalMs: 3e4,
|
|
18792
18798
|
heartbeatTimeoutMs: 1e4,
|
|
18793
18799
|
reconnectBaseMs: 1e3,
|
|
@@ -18803,7 +18809,7 @@ var DEFAULT_INTERNAL_CONFIG = {
|
|
|
18803
18809
|
maxWaitingQueue: 15
|
|
18804
18810
|
},
|
|
18805
18811
|
auth: {
|
|
18806
|
-
serverUrl:
|
|
18812
|
+
serverUrl: getEnv("LZMX_AUTH_URL") || PRESET.apiBaseUrl,
|
|
18807
18813
|
refreshAheadMs: 3e5
|
|
18808
18814
|
},
|
|
18809
18815
|
crypto: {
|
|
@@ -18813,18 +18819,18 @@ var DEFAULT_INTERNAL_CONFIG = {
|
|
|
18813
18819
|
operationTimeoutMs: 1e4
|
|
18814
18820
|
},
|
|
18815
18821
|
message: {
|
|
18816
|
-
messageServiceBaseUrl:
|
|
18822
|
+
messageServiceBaseUrl: getEnv("LZMX_MSG_URL") || PRESET.msgBaseUrl,
|
|
18817
18823
|
rateLimitPerSecond: 30,
|
|
18818
18824
|
rateLimitBurst: 60
|
|
18819
18825
|
},
|
|
18820
18826
|
file: {
|
|
18821
|
-
fileServiceBaseUrl:
|
|
18827
|
+
fileServiceBaseUrl: getEnv("LZMX_FILE_URL") || PRESET.fileBaseUrl,
|
|
18822
18828
|
maxFileSizeMb: 30,
|
|
18823
18829
|
chunkSizeMb: 5,
|
|
18824
18830
|
allowedLocalRoots: ["/tmp/openclaw"],
|
|
18825
18831
|
fetchTimeoutMs: 3e4,
|
|
18826
18832
|
// staging 环境文件服务部署在内网 (10.x.x.x),需要放行 SSRF 内网限制
|
|
18827
|
-
allowPrivateNetwork:
|
|
18833
|
+
allowPrivateNetwork: getEnv("LZMX_ALLOW_PRIVATE_NETWORK") ? getEnv("LZMX_ALLOW_PRIVATE_NETWORK") === "true" : CURRENT_ENV === "staging",
|
|
18828
18834
|
maxUploadConcurrency: 3
|
|
18829
18835
|
},
|
|
18830
18836
|
metrics: {
|
|
@@ -18840,19 +18846,19 @@ function buildPluginConfig(accountConfig, internalOverrides) {
|
|
|
18840
18846
|
env,
|
|
18841
18847
|
transport: {
|
|
18842
18848
|
...DEFAULT_INTERNAL_CONFIG.transport,
|
|
18843
|
-
wsUrl:
|
|
18849
|
+
wsUrl: getEnv("LZMX_WS_URL") || preset.wsBaseUrl
|
|
18844
18850
|
},
|
|
18845
18851
|
auth: {
|
|
18846
18852
|
...DEFAULT_INTERNAL_CONFIG.auth,
|
|
18847
|
-
serverUrl:
|
|
18853
|
+
serverUrl: getEnv("LZMX_AUTH_URL") || preset.apiBaseUrl
|
|
18848
18854
|
},
|
|
18849
18855
|
message: {
|
|
18850
18856
|
...DEFAULT_INTERNAL_CONFIG.message,
|
|
18851
|
-
messageServiceBaseUrl:
|
|
18857
|
+
messageServiceBaseUrl: getEnv("LZMX_MSG_URL") || preset.msgBaseUrl
|
|
18852
18858
|
},
|
|
18853
18859
|
file: {
|
|
18854
18860
|
...DEFAULT_INTERNAL_CONFIG.file,
|
|
18855
|
-
fileServiceBaseUrl:
|
|
18861
|
+
fileServiceBaseUrl: getEnv("LZMX_FILE_URL") || preset.fileBaseUrl
|
|
18856
18862
|
}
|
|
18857
18863
|
};
|
|
18858
18864
|
const internal = { ...envAwareDefaults, ...internalOverrides };
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ REM liangzimixin install script (Windows)
|
|
|
7
7
|
REM Usage: liangzimixin_install.bat <appId> <appSecret> [quantumAccount]
|
|
8
8
|
REM ============================================================
|
|
9
9
|
|
|
10
|
-
set "SCRIPT_VERSION=0.3.
|
|
10
|
+
set "SCRIPT_VERSION=0.3.80"
|
|
11
11
|
set "NPM_PACKAGE=liangzimixin"
|
|
12
12
|
|
|
13
13
|
set "SKIP_SELF_UPDATE=0"
|
|
@@ -6,7 +6,7 @@ set -euo pipefail
|
|
|
6
6
|
# 用法: ./liangzimixin_install.sh <appId> <appSecret> [quantumAccount]
|
|
7
7
|
# ============================================================
|
|
8
8
|
|
|
9
|
-
SCRIPT_VERSION="0.3.
|
|
9
|
+
SCRIPT_VERSION="0.3.80"
|
|
10
10
|
NPM_PACKAGE="liangzimixin"
|
|
11
11
|
|
|
12
12
|
# ── 颜色 ──────────────────────────────────────────────────────
|