aicq-chat-plugin 3.3.1 → 3.4.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 +14 -9
- package/SKILL.md +17 -13
- package/{cli.js → cli.cjs} +19 -34
- package/index.js +191 -257
- package/lib/package.json +3 -0
- package/openclaw.plugin.json +2 -2
- package/package.json +17 -12
- package/{postinstall.js → postinstall.cjs} +5 -4
- package/setup-entry.js +8 -55
- package/src/channel.js +218 -136
- package/src/ui-routes.js +545 -420
- package/index.mjs +0 -70
- package/setup-entry.mjs +0 -9
- package/src/channel.mjs +0 -254
- package/src/gateway-handlers.mjs +0 -178
package/README.md
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
# AICQ Chat Plugin v3.
|
|
1
|
+
# AICQ Chat Plugin v3.2
|
|
2
2
|
|
|
3
|
-
AICQ 端到端加密聊天频道插件 — 基于 OpenClaw Channel
|
|
3
|
+
AICQ 端到端加密聊天频道插件 — 基于 OpenClaw Channel Plugin SDK。
|
|
4
4
|
|
|
5
|
-
## 架构 (v3.
|
|
5
|
+
## 架构 (v3.2 Channel SDK)
|
|
6
6
|
|
|
7
|
-
v3.
|
|
7
|
+
v3.2 采用官方 OpenClaw Channel Plugin SDK,使用 `defineChannelPluginEntry` + `createChatChannelPlugin`:
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
9
|
+
- **ESM 模块** — 入口文件使用 ES Module 格式
|
|
10
|
+
- **官方 SDK** — 使用 `openclaw/plugin-sdk/channel-core` 的 `defineChannelPluginEntry` 和 `createChatChannelPlugin`
|
|
11
11
|
- **进程内通信** — 通过 Turn Kernel 推送消息,无 HTTP 轮询
|
|
12
12
|
- **Gateway HTTP 路由** — SPA 和 API 通过 Gateway 路由提供
|
|
13
|
+
- **setupEntry** — 轻量级 setup 入口,不加载运行时代码
|
|
13
14
|
|
|
14
15
|
## 一键安装
|
|
15
16
|
|
|
@@ -17,6 +18,9 @@ v3.0 采用 Channel 插件架构,直接在 OpenClaw 进程内运行:
|
|
|
17
18
|
# 安装插件
|
|
18
19
|
openclaw plugins install npm:aicq-chat-plugin
|
|
19
20
|
|
|
21
|
+
# 配置频道
|
|
22
|
+
openclaw channels add --channel aicq-chat --name "AICQ Chat"
|
|
23
|
+
|
|
20
24
|
# 重启 gateway
|
|
21
25
|
openclaw gateway restart
|
|
22
26
|
```
|
|
@@ -63,12 +67,13 @@ openclaw gateway restart
|
|
|
63
67
|
| `AICQ_SERVER_URL` | https://aicq.online | AICQ 服务器地址 |
|
|
64
68
|
| `AICQ_DATA_DIR` | ~/.aicq-plugin | 数据存储目录 |
|
|
65
69
|
|
|
66
|
-
## 迁移指南 (
|
|
70
|
+
## 迁移指南 (v3.0 → v3.2)
|
|
67
71
|
|
|
68
72
|
1. 卸载旧版:`openclaw plugins uninstall aicq-chat`
|
|
69
73
|
2. 安装新版:`openclaw plugins install npm:aicq-chat-plugin`
|
|
70
|
-
3.
|
|
71
|
-
4.
|
|
74
|
+
3. 配置频道:`openclaw channels add --channel aicq-chat`
|
|
75
|
+
4. 重启 gateway:`openclaw gateway restart`
|
|
76
|
+
5. 旧版数据(密钥、好友、消息)会自动迁移
|
|
72
77
|
|
|
73
78
|
## 许可证
|
|
74
79
|
|
package/SKILL.md
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aicq-chat
|
|
3
|
-
description: AICQ End-to-end Encrypted Chat Channel Plugin for OpenClaw —
|
|
3
|
+
description: AICQ End-to-end Encrypted Chat Channel Plugin for OpenClaw — Official Channel Plugin SDK with friend management, group chat, file transfer, and AI agent communication
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
6
|
author: AICQ
|
|
7
|
-
version: "3.
|
|
7
|
+
version: "3.2.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# AICQ Encrypted Chat
|
|
11
11
|
|
|
12
|
-
AICQ 是一个端到端加密聊天频道插件,基于 OpenClaw Channel
|
|
12
|
+
AICQ 是一个端到端加密聊天频道插件,基于 OpenClaw Channel Plugin SDK,直接在 OpenClaw 进程内运行。支持好友管理、群组聊天、文件传输和 AI Agent 通信。
|
|
13
13
|
|
|
14
|
-
## 架构变更 (v3.
|
|
14
|
+
## 架构变更 (v3.2)
|
|
15
15
|
|
|
16
|
-
从
|
|
16
|
+
从 plain-capability 自定义架构升级为官方 Channel Plugin SDK:
|
|
17
17
|
|
|
18
|
-
| 维度 | 旧版 (
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
18
|
+
| 维度 | 旧版 (v3.0) | 新版 (v3.2) |
|
|
19
|
+
|------|-------------|-------------|
|
|
20
|
+
| 模块格式 | CommonJS | ESM |
|
|
21
|
+
| 入口方式 | register/activate/handleTool/handleGateway | defineChannelPluginEntry |
|
|
22
|
+
| 插件形状 | plain-capability | channel (SDK) |
|
|
23
|
+
| 频道注册 | 自定义 channel 对象 | createChatChannelPlugin + createChannelPluginBase |
|
|
24
|
+
| Setup 入口 | 无 | defineSetupPluginEntry |
|
|
25
|
+
| 频道检测 | installed, not configured | 正确配置和启用 |
|
|
25
26
|
|
|
26
27
|
## 功能特性
|
|
27
28
|
|
|
28
29
|
- **端到端加密 (E2EE)** — 基于 NaCl (libsodium) 的加密体系,消息仅通信双方可读
|
|
29
|
-
- **Channel
|
|
30
|
+
- **Channel SDK** — 使用官方 Channel Plugin SDK,正确注册频道
|
|
30
31
|
- **好友管理** — 好友码添加、QR 码扫描、好友列表同步
|
|
31
32
|
- **群组聊天** — 创建群组、邀请成员、静默模式
|
|
32
33
|
- **消息功能** — Markdown/LaTeX 渲染、图片/文件上传、@提及、流式消息
|
|
@@ -39,6 +40,9 @@ AICQ 是一个端到端加密聊天频道插件,基于 OpenClaw Channel 架构
|
|
|
39
40
|
# 安装插件
|
|
40
41
|
openclaw plugins install npm:aicq-chat-plugin
|
|
41
42
|
|
|
43
|
+
# 配置频道
|
|
44
|
+
openclaw channels add --channel aicq-chat
|
|
45
|
+
|
|
42
46
|
# 重启 gateway
|
|
43
47
|
openclaw gateway restart
|
|
44
48
|
|
package/{cli.js → cli.cjs}
RENAMED
|
@@ -135,7 +135,7 @@ function copyDirRecursive(src, dest) {
|
|
|
135
135
|
// ── Install plugin files to a target directory ─────────────────────
|
|
136
136
|
function installToDir(sourceDir, targetDir, version) {
|
|
137
137
|
const filesToCopy = [
|
|
138
|
-
'index.js', 'setup-entry.js', 'cli.
|
|
138
|
+
'index.js', 'setup-entry.js', 'cli.cjs', 'postinstall.cjs',
|
|
139
139
|
'openclaw.plugin.json', 'package.json', 'README.md',
|
|
140
140
|
];
|
|
141
141
|
const dirsToCopy = ['lib', 'src', 'public'];
|
|
@@ -287,7 +287,7 @@ function uninstallFromOpenClaw() {
|
|
|
287
287
|
// ── Help ────────────────────────────────────────────────────────────
|
|
288
288
|
if (command === '--help' || command === '-h') {
|
|
289
289
|
console.log(`
|
|
290
|
-
AICQ Chat Plugin v3.
|
|
290
|
+
AICQ Chat Plugin v3.2 — End-to-End Encrypted Chat for OpenClaw (Channel SDK)
|
|
291
291
|
|
|
292
292
|
Usage:
|
|
293
293
|
openclaw plugins install npm:aicq-chat-plugin Install plugin via openclaw CLI
|
|
@@ -296,8 +296,8 @@ Usage:
|
|
|
296
296
|
aicq-plugin [command] [options] Advanced usage
|
|
297
297
|
|
|
298
298
|
Commands:
|
|
299
|
-
start Install to OpenClaw (if needed)
|
|
300
|
-
install Install plugin to OpenClaw only
|
|
299
|
+
start Install to OpenClaw (if needed) (default)
|
|
300
|
+
install Install plugin to OpenClaw only
|
|
301
301
|
uninstall Remove plugin from OpenClaw (skills/ and plugins/)
|
|
302
302
|
status Check if the plugin is running
|
|
303
303
|
|
|
@@ -312,8 +312,9 @@ Environment Variables:
|
|
|
312
312
|
OPENCLAW_WORKSPACE OpenClaw workspace directory (for skills/)
|
|
313
313
|
|
|
314
314
|
Architecture:
|
|
315
|
-
v3.
|
|
316
|
-
|
|
315
|
+
v3.2 uses official Channel Plugin SDK (defineChannelPluginEntry).
|
|
316
|
+
Runs in-process with OpenClaw — no standalone server needed.
|
|
317
|
+
UI served via Gateway HTTP routes.
|
|
317
318
|
- UI: /plugins/aicq-chat/ui/
|
|
318
319
|
- API: /plugins/aicq-chat/api/*
|
|
319
320
|
`);
|
|
@@ -322,8 +323,8 @@ Architecture:
|
|
|
322
323
|
|
|
323
324
|
// ── Status ──────────────────────────────────────────────────────────
|
|
324
325
|
if (command === 'status') {
|
|
325
|
-
console.log('AICQ Plugin v3.
|
|
326
|
-
console.log('
|
|
326
|
+
console.log('AICQ Plugin v3.2 (Channel SDK architecture)');
|
|
327
|
+
console.log('Uses defineChannelPluginEntry — runs in-process with OpenClaw.');
|
|
327
328
|
console.log('Check OpenClaw gateway status for plugin health.');
|
|
328
329
|
process.exit(0);
|
|
329
330
|
}
|
|
@@ -340,32 +341,16 @@ if (command === 'uninstall' || command === 'remove') {
|
|
|
340
341
|
process.exit(0);
|
|
341
342
|
}
|
|
342
343
|
|
|
343
|
-
// ── Start (default) — auto-install then
|
|
344
|
+
// ── Start (default) — auto-install then inform user ───────────────
|
|
344
345
|
installToOpenClaw();
|
|
345
346
|
|
|
346
|
-
console.log(
|
|
347
|
+
console.log('');
|
|
348
|
+
console.log('[AICQ] Channel Plugin uses OpenClaw Channel SDK (defineChannelPluginEntry).');
|
|
349
|
+
console.log('[AICQ] It runs in-process with OpenClaw — no standalone server needed.');
|
|
350
|
+
console.log('[AICQ] To activate:');
|
|
351
|
+
console.log(' openclaw plugins install npm:aicq-chat-plugin');
|
|
352
|
+
console.log(' openclaw gateway restart');
|
|
353
|
+
console.log('');
|
|
347
354
|
console.log(`[AICQ] Server: ${serverUrl}`);
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
const child = spawn('node', [path.join(__dirname, 'index.js')], {
|
|
351
|
-
env,
|
|
352
|
-
stdio: 'inherit',
|
|
353
|
-
detached: false,
|
|
354
|
-
});
|
|
355
|
-
|
|
356
|
-
child.on('error', (err) => {
|
|
357
|
-
console.error('[AICQ] Failed to start:', err.message);
|
|
358
|
-
process.exit(1);
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
child.on('exit', (code) => {
|
|
362
|
-
process.exit(code || 0);
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
process.on('SIGINT', () => {
|
|
366
|
-
child.kill('SIGINT');
|
|
367
|
-
});
|
|
368
|
-
|
|
369
|
-
process.on('SIGTERM', () => {
|
|
370
|
-
child.kill('SIGTERM');
|
|
371
|
-
});
|
|
355
|
+
console.log('[AICQ] UI: /plugins/aicq-chat/ui/');
|
|
356
|
+
console.log('[AICQ] API: /plugins/aicq-chat/api/*');
|