aicq-chat-plugin 3.8.1 → 3.9.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 +80 -80
- package/SKILL.md +78 -78
- package/cli.cjs +356 -356
- package/index.js +417 -375
- package/lib/chat.js +854 -749
- package/lib/crypto.js +168 -168
- package/lib/database.js +455 -455
- package/lib/file-transfer.js +266 -266
- package/lib/handshake.js +147 -147
- package/lib/identity.js +165 -165
- package/lib/package.json +3 -3
- package/lib/server-client.js +380 -337
- package/openclaw.plugin.json +170 -168
- package/package.json +87 -87
- package/postinstall.cjs +27 -27
- package/public/favicon.ico +0 -0
- package/public/icon-16.png +0 -0
- package/public/icon-32.png +0 -0
- package/public/index.html +1468 -1468
- package/public/logo-512.png +0 -0
- package/setup-entry.js +14 -14
- package/src/channel.js +616 -613
- package/src/ui-routes.js +647 -594
package/README.md
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
# AICQ Chat Plugin v3.2
|
|
2
|
-
|
|
3
|
-
AICQ 端到端加密聊天频道插件 — 基于 OpenClaw Channel Plugin SDK。
|
|
4
|
-
|
|
5
|
-
## 架构 (v3.2 Channel SDK)
|
|
6
|
-
|
|
7
|
-
v3.2 采用官方 OpenClaw Channel Plugin SDK,使用 `defineChannelPluginEntry` + `createChatChannelPlugin`:
|
|
8
|
-
|
|
9
|
-
- **ESM 模块** — 入口文件使用 ES Module 格式
|
|
10
|
-
- **官方 SDK** — 使用 `openclaw/plugin-sdk/channel-core` 的 `defineChannelPluginEntry` 和 `createChatChannelPlugin`
|
|
11
|
-
- **进程内通信** — 通过 Turn Kernel 推送消息,无 HTTP 轮询
|
|
12
|
-
- **Gateway HTTP 路由** — SPA 和 API 通过 Gateway 路由提供
|
|
13
|
-
- **setupEntry** — 轻量级 setup 入口,不加载运行时代码
|
|
14
|
-
|
|
15
|
-
## 一键安装
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
# 安装插件
|
|
19
|
-
openclaw plugins install npm:aicq-chat-plugin
|
|
20
|
-
|
|
21
|
-
# 配置频道
|
|
22
|
-
openclaw channels add --channel aicq-chat --name "AICQ Chat"
|
|
23
|
-
|
|
24
|
-
# 重启 gateway
|
|
25
|
-
openclaw gateway restart
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
插件会随 OpenClaw 自动启动,无需手动操作。
|
|
29
|
-
|
|
30
|
-
## 功能
|
|
31
|
-
|
|
32
|
-
- **端到端加密** — 基于 NaCl (X25519 + XSalsa20-Poly1305) 的加密体系
|
|
33
|
-
- **Channel 架构** — 进程内运行,复用 OpenClaw agent ID
|
|
34
|
-
- **好友管理** — 好友码添加、QR 码扫描、好友列表同步
|
|
35
|
-
- **群组聊天** — 创建群组、邀请成员、静默模式
|
|
36
|
-
- **消息功能** — Markdown/LaTeX 渲染、图片/文件上传、@提及、流式消息
|
|
37
|
-
- **密钥管理** — 公钥/私钥显示、密钥轮换、指纹验证
|
|
38
|
-
- **DM 安全策略** — 仅好友列表中的联系人可发送 DM
|
|
39
|
-
|
|
40
|
-
## 使用方法
|
|
41
|
-
|
|
42
|
-
### OpenClaw 集成
|
|
43
|
-
|
|
44
|
-
安装后插件自动注册为 Channel 类型,提供以下工具和网关:
|
|
45
|
-
|
|
46
|
-
#### 工具
|
|
47
|
-
- `chat-friend` — 好友管理 (list, add, remove, requests, accept, reject)
|
|
48
|
-
- `chat-send` — 发送消息
|
|
49
|
-
- `chat-export-key` — 导出密钥
|
|
50
|
-
|
|
51
|
-
#### 网关方法
|
|
52
|
-
- `aicq.status` — 插件状态
|
|
53
|
-
- `aicq.friends.list/add/remove` — 好友操作
|
|
54
|
-
- `aicq.chat.send/history/delete` — 聊天操作
|
|
55
|
-
- `aicq.groups.list/create/join` — 群组操作
|
|
56
|
-
- `aicq.identity.info` — 身份信息
|
|
57
|
-
- `aicq.chat.streamChunk/streamEnd` — 流式消息
|
|
58
|
-
|
|
59
|
-
#### UI 路由
|
|
60
|
-
- `/plugins/aicq-chat/ui/` — 聊天 SPA 界面
|
|
61
|
-
- `/plugins/aicq-chat/api/*` — REST API 端点
|
|
62
|
-
|
|
63
|
-
### 环境变量
|
|
64
|
-
|
|
65
|
-
| 变量 | 默认值 | 说明 |
|
|
66
|
-
|------|--------|------|
|
|
67
|
-
| `AICQ_SERVER_URL` | https://aicq.online | AICQ 服务器地址 |
|
|
68
|
-
| `AICQ_DATA_DIR` | ~/.aicq-plugin | 数据存储目录 |
|
|
69
|
-
|
|
70
|
-
## 迁移指南 (v3.0 → v3.2)
|
|
71
|
-
|
|
72
|
-
1. 卸载旧版:`openclaw plugins uninstall aicq-chat`
|
|
73
|
-
2. 安装新版:`openclaw plugins install npm:aicq-chat-plugin`
|
|
74
|
-
3. 配置频道:`openclaw channels add --channel aicq-chat`
|
|
75
|
-
4. 重启 gateway:`openclaw gateway restart`
|
|
76
|
-
5. 旧版数据(密钥、好友、消息)会自动迁移
|
|
77
|
-
|
|
78
|
-
## 许可证
|
|
79
|
-
|
|
80
|
-
MIT License
|
|
1
|
+
# AICQ Chat Plugin v3.2
|
|
2
|
+
|
|
3
|
+
AICQ 端到端加密聊天频道插件 — 基于 OpenClaw Channel Plugin SDK。
|
|
4
|
+
|
|
5
|
+
## 架构 (v3.2 Channel SDK)
|
|
6
|
+
|
|
7
|
+
v3.2 采用官方 OpenClaw Channel Plugin SDK,使用 `defineChannelPluginEntry` + `createChatChannelPlugin`:
|
|
8
|
+
|
|
9
|
+
- **ESM 模块** — 入口文件使用 ES Module 格式
|
|
10
|
+
- **官方 SDK** — 使用 `openclaw/plugin-sdk/channel-core` 的 `defineChannelPluginEntry` 和 `createChatChannelPlugin`
|
|
11
|
+
- **进程内通信** — 通过 Turn Kernel 推送消息,无 HTTP 轮询
|
|
12
|
+
- **Gateway HTTP 路由** — SPA 和 API 通过 Gateway 路由提供
|
|
13
|
+
- **setupEntry** — 轻量级 setup 入口,不加载运行时代码
|
|
14
|
+
|
|
15
|
+
## 一键安装
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# 安装插件
|
|
19
|
+
openclaw plugins install npm:aicq-chat-plugin
|
|
20
|
+
|
|
21
|
+
# 配置频道
|
|
22
|
+
openclaw channels add --channel aicq-chat --name "AICQ Chat"
|
|
23
|
+
|
|
24
|
+
# 重启 gateway
|
|
25
|
+
openclaw gateway restart
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
插件会随 OpenClaw 自动启动,无需手动操作。
|
|
29
|
+
|
|
30
|
+
## 功能
|
|
31
|
+
|
|
32
|
+
- **端到端加密** — 基于 NaCl (X25519 + XSalsa20-Poly1305) 的加密体系
|
|
33
|
+
- **Channel 架构** — 进程内运行,复用 OpenClaw agent ID
|
|
34
|
+
- **好友管理** — 好友码添加、QR 码扫描、好友列表同步
|
|
35
|
+
- **群组聊天** — 创建群组、邀请成员、静默模式
|
|
36
|
+
- **消息功能** — Markdown/LaTeX 渲染、图片/文件上传、@提及、流式消息
|
|
37
|
+
- **密钥管理** — 公钥/私钥显示、密钥轮换、指纹验证
|
|
38
|
+
- **DM 安全策略** — 仅好友列表中的联系人可发送 DM
|
|
39
|
+
|
|
40
|
+
## 使用方法
|
|
41
|
+
|
|
42
|
+
### OpenClaw 集成
|
|
43
|
+
|
|
44
|
+
安装后插件自动注册为 Channel 类型,提供以下工具和网关:
|
|
45
|
+
|
|
46
|
+
#### 工具
|
|
47
|
+
- `chat-friend` — 好友管理 (list, add, remove, requests, accept, reject)
|
|
48
|
+
- `chat-send` — 发送消息
|
|
49
|
+
- `chat-export-key` — 导出密钥
|
|
50
|
+
|
|
51
|
+
#### 网关方法
|
|
52
|
+
- `aicq.status` — 插件状态
|
|
53
|
+
- `aicq.friends.list/add/remove` — 好友操作
|
|
54
|
+
- `aicq.chat.send/history/delete` — 聊天操作
|
|
55
|
+
- `aicq.groups.list/create/join` — 群组操作
|
|
56
|
+
- `aicq.identity.info` — 身份信息
|
|
57
|
+
- `aicq.chat.streamChunk/streamEnd` — 流式消息
|
|
58
|
+
|
|
59
|
+
#### UI 路由
|
|
60
|
+
- `/plugins/aicq-chat/ui/` — 聊天 SPA 界面
|
|
61
|
+
- `/plugins/aicq-chat/api/*` — REST API 端点
|
|
62
|
+
|
|
63
|
+
### 环境变量
|
|
64
|
+
|
|
65
|
+
| 变量 | 默认值 | 说明 |
|
|
66
|
+
|------|--------|------|
|
|
67
|
+
| `AICQ_SERVER_URL` | https://aicq.online | AICQ 服务器地址 |
|
|
68
|
+
| `AICQ_DATA_DIR` | ~/.aicq-plugin | 数据存储目录 |
|
|
69
|
+
|
|
70
|
+
## 迁移指南 (v3.0 → v3.2)
|
|
71
|
+
|
|
72
|
+
1. 卸载旧版:`openclaw plugins uninstall aicq-chat`
|
|
73
|
+
2. 安装新版:`openclaw plugins install npm:aicq-chat-plugin`
|
|
74
|
+
3. 配置频道:`openclaw channels add --channel aicq-chat`
|
|
75
|
+
4. 重启 gateway:`openclaw gateway restart`
|
|
76
|
+
5. 旧版数据(密钥、好友、消息)会自动迁移
|
|
77
|
+
|
|
78
|
+
## 许可证
|
|
79
|
+
|
|
80
|
+
MIT License
|
package/SKILL.md
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: aicq-chat
|
|
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
|
-
license: MIT
|
|
5
|
-
metadata:
|
|
6
|
-
author: AICQ
|
|
7
|
-
version: "3.2.0"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# AICQ Encrypted Chat
|
|
11
|
-
|
|
12
|
-
AICQ 是一个端到端加密聊天频道插件,基于 OpenClaw Channel Plugin SDK,直接在 OpenClaw 进程内运行。支持好友管理、群组聊天、文件传输和 AI Agent 通信。
|
|
13
|
-
|
|
14
|
-
## 架构变更 (v3.2)
|
|
15
|
-
|
|
16
|
-
从 plain-capability 自定义架构升级为官方 Channel Plugin SDK:
|
|
17
|
-
|
|
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 | 正确配置和启用 |
|
|
26
|
-
|
|
27
|
-
## 功能特性
|
|
28
|
-
|
|
29
|
-
- **端到端加密 (E2EE)** — 基于 NaCl (libsodium) 的加密体系,消息仅通信双方可读
|
|
30
|
-
- **Channel SDK** — 使用官方 Channel Plugin SDK,正确注册频道
|
|
31
|
-
- **好友管理** — 好友码添加、QR 码扫描、好友列表同步
|
|
32
|
-
- **群组聊天** — 创建群组、邀请成员、静默模式
|
|
33
|
-
- **消息功能** — Markdown/LaTeX 渲染、图片/文件上传、@提及、流式消息
|
|
34
|
-
- **密钥管理** — 公钥/私钥显示、密钥轮换、指纹验证
|
|
35
|
-
- **DM 安全策略** — 仅好友列表中的联系人可发送 DM
|
|
36
|
-
|
|
37
|
-
## 一键启动
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
# 安装插件
|
|
41
|
-
openclaw plugins install npm:aicq-chat-plugin
|
|
42
|
-
|
|
43
|
-
# 配置频道
|
|
44
|
-
openclaw channels add --channel aicq-chat
|
|
45
|
-
|
|
46
|
-
# 重启 gateway
|
|
47
|
-
openclaw gateway restart
|
|
48
|
-
|
|
49
|
-
# 插件会随 OpenClaw 自动启动,无需手动操作
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## OpenClaw 集成
|
|
53
|
-
|
|
54
|
-
插件作为 Channel 类型运行,提供以下工具和网关:
|
|
55
|
-
|
|
56
|
-
### 工具
|
|
57
|
-
- `chat-friend` — 好友管理
|
|
58
|
-
- `chat-send` — 发送消息
|
|
59
|
-
- `chat-export-key` — 导出密钥
|
|
60
|
-
|
|
61
|
-
### 网关方法
|
|
62
|
-
- `aicq.status` — 插件状态
|
|
63
|
-
- `aicq.friends.list/add/remove` — 好友操作
|
|
64
|
-
- `aicq.chat.send/history/delete` — 聊天操作
|
|
65
|
-
- `aicq.groups.list/create/join` — 群组操作
|
|
66
|
-
- `aicq.identity.info` — 身份信息
|
|
67
|
-
- `aicq.chat.streamChunk/streamEnd` — 流式消息
|
|
68
|
-
|
|
69
|
-
### UI 路由
|
|
70
|
-
- `/plugins/aicq-chat/ui/` — 聊天 SPA 界面
|
|
71
|
-
- `/plugins/aicq-chat/api/*` — REST API 端点
|
|
72
|
-
|
|
73
|
-
## 配置
|
|
74
|
-
|
|
75
|
-
| 变量 | 默认值 | 说明 |
|
|
76
|
-
|------|--------|------|
|
|
77
|
-
| `AICQ_SERVER_URL` | https://aicq.online | AICQ 服务器地址 |
|
|
78
|
-
| `AICQ_DATA_DIR` | ~/.aicq-plugin | 数据存储目录 |
|
|
1
|
+
---
|
|
2
|
+
name: aicq-chat
|
|
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
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: AICQ
|
|
7
|
+
version: "3.2.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# AICQ Encrypted Chat
|
|
11
|
+
|
|
12
|
+
AICQ 是一个端到端加密聊天频道插件,基于 OpenClaw Channel Plugin SDK,直接在 OpenClaw 进程内运行。支持好友管理、群组聊天、文件传输和 AI Agent 通信。
|
|
13
|
+
|
|
14
|
+
## 架构变更 (v3.2)
|
|
15
|
+
|
|
16
|
+
从 plain-capability 自定义架构升级为官方 Channel Plugin SDK:
|
|
17
|
+
|
|
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 | 正确配置和启用 |
|
|
26
|
+
|
|
27
|
+
## 功能特性
|
|
28
|
+
|
|
29
|
+
- **端到端加密 (E2EE)** — 基于 NaCl (libsodium) 的加密体系,消息仅通信双方可读
|
|
30
|
+
- **Channel SDK** — 使用官方 Channel Plugin SDK,正确注册频道
|
|
31
|
+
- **好友管理** — 好友码添加、QR 码扫描、好友列表同步
|
|
32
|
+
- **群组聊天** — 创建群组、邀请成员、静默模式
|
|
33
|
+
- **消息功能** — Markdown/LaTeX 渲染、图片/文件上传、@提及、流式消息
|
|
34
|
+
- **密钥管理** — 公钥/私钥显示、密钥轮换、指纹验证
|
|
35
|
+
- **DM 安全策略** — 仅好友列表中的联系人可发送 DM
|
|
36
|
+
|
|
37
|
+
## 一键启动
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 安装插件
|
|
41
|
+
openclaw plugins install npm:aicq-chat-plugin
|
|
42
|
+
|
|
43
|
+
# 配置频道
|
|
44
|
+
openclaw channels add --channel aicq-chat
|
|
45
|
+
|
|
46
|
+
# 重启 gateway
|
|
47
|
+
openclaw gateway restart
|
|
48
|
+
|
|
49
|
+
# 插件会随 OpenClaw 自动启动,无需手动操作
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## OpenClaw 集成
|
|
53
|
+
|
|
54
|
+
插件作为 Channel 类型运行,提供以下工具和网关:
|
|
55
|
+
|
|
56
|
+
### 工具
|
|
57
|
+
- `chat-friend` — 好友管理
|
|
58
|
+
- `chat-send` — 发送消息
|
|
59
|
+
- `chat-export-key` — 导出密钥
|
|
60
|
+
|
|
61
|
+
### 网关方法
|
|
62
|
+
- `aicq.status` — 插件状态
|
|
63
|
+
- `aicq.friends.list/add/remove` — 好友操作
|
|
64
|
+
- `aicq.chat.send/history/delete` — 聊天操作
|
|
65
|
+
- `aicq.groups.list/create/join` — 群组操作
|
|
66
|
+
- `aicq.identity.info` — 身份信息
|
|
67
|
+
- `aicq.chat.streamChunk/streamEnd` — 流式消息
|
|
68
|
+
|
|
69
|
+
### UI 路由
|
|
70
|
+
- `/plugins/aicq-chat/ui/` — 聊天 SPA 界面
|
|
71
|
+
- `/plugins/aicq-chat/api/*` — REST API 端点
|
|
72
|
+
|
|
73
|
+
## 配置
|
|
74
|
+
|
|
75
|
+
| 变量 | 默认值 | 说明 |
|
|
76
|
+
|------|--------|------|
|
|
77
|
+
| `AICQ_SERVER_URL` | https://aicq.online | AICQ 服务器地址 |
|
|
78
|
+
| `AICQ_DATA_DIR` | ~/.aicq-plugin | 数据存储目录 |
|