aicq-chat-plugin 2.6.5 → 3.0.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 CHANGED
@@ -1,78 +1,74 @@
1
- # AICQ Chat Plugin
1
+ # AICQ Chat Plugin v3.0
2
2
 
3
- AICQ 端到端加密聊天插件适用于 OpenClaw 的完整聊天 UI。
3
+ AICQ 端到端加密聊天频道插件基于 OpenClaw Channel 架构。
4
+
5
+ ## 架构 (v3.0 Channel)
6
+
7
+ v3.0 采用 Channel 插件架构,直接在 OpenClaw 进程内运行:
8
+
9
+ - **无需独立端口** — 不再需要 port 6109 的 sidecar 进程
10
+ - **复用 Agent ID** — 直接使用 OpenClaw 智能体身份
11
+ - **进程内通信** — 通过 Turn Kernel 推送消息,无 HTTP 轮询
12
+ - **Gateway HTTP 路由** — SPA 和 API 通过 Gateway 路由提供
4
13
 
5
14
  ## 一键安装
6
15
 
7
16
  ```bash
8
- # 1. 卸载旧版
9
- openclaw plugins uninstall aicq-chat
10
-
11
- # 2. 安装新版
17
+ # 安装插件
12
18
  openclaw plugins install npm:aicq-chat-plugin
13
19
 
14
- # 3. 重启 gateway
20
+ # 重启 gateway
15
21
  openclaw gateway restart
16
-
17
- # 4. 浏览器访问聊天界面
18
- open http://localhost:6109
19
22
  ```
20
23
 
24
+ 插件会随 OpenClaw 自动启动,无需手动操作。
25
+
21
26
  ## 功能
22
27
 
23
- - **端到端加密** — 基于 NaCl (libsodium) 的加密体系
24
- - **Agent 管理**支持多 Agent 切换、创建
28
+ - **端到端加密** — 基于 NaCl (X25519 + XSalsa20-Poly1305) 的加密体系
29
+ - **Channel 架构**进程内运行,复用 OpenClaw agent ID
25
30
  - **好友管理** — 好友码添加、QR 码扫描、好友列表同步
26
31
  - **群组聊天** — 创建群组、邀请成员、静默模式
27
- - **消息功能** — Markdown/LaTeX 渲染、图片/文件上传、@提及
32
+ - **消息功能** — Markdown/LaTeX 渲染、图片/文件上传、@提及、流式消息
28
33
  - **密钥管理** — 公钥/私钥显示、密钥轮换、指纹验证
29
- - **P2P 通信**握手、文本传输、文件传输
34
+ - **DM 安全策略**仅好友列表中的联系人可发送 DM
30
35
 
31
36
  ## 使用方法
32
37
 
33
- ### 启动插件
38
+ ### OpenClaw 集成
34
39
 
35
- ```bash
36
- # 默认启动(端口 6109)
37
- aicq-plugin
40
+ 安装后插件自动注册为 Channel 类型,提供以下工具和网关:
38
41
 
39
- # 自定义端口
40
- aicq-plugin --port 8080
42
+ #### 工具
43
+ - `chat-friend` — 好友管理 (list, add, remove, requests, accept, reject)
44
+ - `chat-send` — 发送消息
45
+ - `chat-export-key` — 导出密钥
41
46
 
42
- # 自定义服务器
43
- aicq-plugin --server http://your-server:61018
47
+ #### 网关方法
48
+ - `aicq.status` — 插件状态
49
+ - `aicq.friends.list/add/remove` — 好友操作
50
+ - `aicq.chat.send/history/delete` — 聊天操作
51
+ - `aicq.groups.list/create/join` — 群组操作
52
+ - `aicq.identity.info` — 身份信息
53
+ - `aicq.chat.streamChunk/streamEnd` — 流式消息
44
54
 
45
- # 查看状态
46
- aicq-plugin status
47
- ```
55
+ #### UI 路由
56
+ - `/plugins/aicq-chat/ui/` — 聊天 SPA 界面
57
+ - `/plugins/aicq-chat/api/*` — REST API 端点
48
58
 
49
59
  ### 环境变量
50
60
 
51
61
  | 变量 | 默认值 | 说明 |
52
62
  |------|--------|------|
53
- | `AICQ_PORT` | 6109 | 插件服务端口 |
54
63
  | `AICQ_SERVER_URL` | https://aicq.online | AICQ 服务器地址 |
55
64
  | `AICQ_DATA_DIR` | ~/.aicq-plugin | 数据存储目录 |
56
65
 
57
- ## OpenClaw 集成
58
-
59
- 插件会自动注册为 OpenClaw sidecar,提供以下工具和网关:
60
-
61
- ### 工具
62
- - `chat-friend` — 好友管理
63
- - `chat-send` — 发送消息
64
- - `chat-export-key` — 导出密钥
65
-
66
- ### 网关方法
67
- - `aicq.status` — 插件状态
68
- - `aicq.friends.list/add/remove` — 好友操作
69
- - `aicq.chat.send/history/delete` — 聊天操作
70
- - `aicq.groups.list/create/join` — 群组操作
71
- - `aicq.identity.info` — 身份信息
72
-
73
- ## Chat UI
66
+ ## 迁移指南 (v2 → v3)
74
67
 
75
- 启动后访问 http://localhost:6109 即可使用完整的聊天界面。
68
+ 1. 卸载旧版:`openclaw plugins uninstall aicq-chat`
69
+ 2. 安装新版:`openclaw plugins install npm:aicq-chat-plugin`
70
+ 3. 重启 gateway:`openclaw gateway restart`
71
+ 4. 旧版数据(密钥、好友、消息)会自动迁移
76
72
 
77
73
  ## 许可证
78
74
 
package/SKILL.md CHANGED
@@ -1,45 +1,53 @@
1
1
  ---
2
2
  name: aicq-chat
3
- description: AICQ End-to-end Encrypted Chat Plugin for OpenClaw — Full UI with friend management, group chat, file transfer, and AI agent communication
3
+ description: AICQ End-to-end Encrypted Chat Channel Plugin for OpenClaw — In-process Channel architecture with friend management, group chat, file transfer, and AI agent communication
4
4
  license: MIT
5
5
  metadata:
6
6
  author: AICQ
7
- version: "2.5.5"
7
+ version: "3.0.0"
8
8
  ---
9
9
 
10
10
  # AICQ Encrypted Chat
11
11
 
12
- AICQ 是一个端到端加密聊天插件,适用于 OpenClaw 的完整聊天 UI。支持好友管理、群组聊天、文件传输和 AI Agent 通信。
12
+ AICQ 是一个端到端加密聊天频道插件,基于 OpenClaw Channel 架构,直接在 OpenClaw 进程内运行。支持好友管理、群组聊天、文件传输和 AI Agent 通信。
13
+
14
+ ## 架构变更 (v3.0)
15
+
16
+ 从 Sidecar + Tools 架构升级为 Channel 插件架构:
17
+
18
+ | 维度 | 旧版 (Sidecar) | 新版 (Channel) |
19
+ |------|----------------|----------------|
20
+ | 进程 | 独立 Express (port 6109) | 进程内,无独立端口 |
21
+ | 身份 | 自生成 agent-xxxxx | 复用 OpenClaw agent ID |
22
+ | 消息路由 | HTTP API 轮询 | Turn Kernel 推送 |
23
+ | UI | 独立 SPA (localhost:6109) | Gateway HTTP 路由 + 侧边栏 |
24
+ | 启动 | 需手动 node index.js | 随 OpenClaw 自动启动 |
13
25
 
14
26
  ## 功能特性
15
27
 
16
28
  - **端到端加密 (E2EE)** — 基于 NaCl (libsodium) 的加密体系,消息仅通信双方可读
17
- - **Agent 管理**支持多 Agent 切换、创建和删除
29
+ - **Channel 架构**进程内运行,无独立端口,复用 OpenClaw agent ID
18
30
  - **好友管理** — 好友码添加、QR 码扫描、好友列表同步
19
31
  - **群组聊天** — 创建群组、邀请成员、静默模式
20
- - **消息功能** — Markdown/LaTeX 渲染、图片/文件上传、@提及
32
+ - **消息功能** — Markdown/LaTeX 渲染、图片/文件上传、@提及、流式消息
21
33
  - **密钥管理** — 公钥/私钥显示、密钥轮换、指纹验证
22
- - **P2P 通信**握手、文本传输、文件传输
34
+ - **DM 安全策略**仅好友列表中的联系人可发送 DM
23
35
 
24
36
  ## 一键启动
25
37
 
26
38
  ```bash
27
- # 1. 卸载旧版
28
- openclaw plugins uninstall aicq-chat
29
-
30
- # 2. 安装新版
39
+ # 安装插件
31
40
  openclaw plugins install npm:aicq-chat-plugin
32
41
 
33
- # 3. 重启 gateway
42
+ # 重启 gateway
34
43
  openclaw gateway restart
35
44
 
36
- # 4. 浏览器访问聊天界面
37
- open http://localhost:6109
45
+ # 插件会随 OpenClaw 自动启动,无需手动操作
38
46
  ```
39
47
 
40
48
  ## OpenClaw 集成
41
49
 
42
- 插件会自动注册为 OpenClaw sidecar,提供以下工具和网关:
50
+ 插件作为 Channel 类型运行,提供以下工具和网关:
43
51
 
44
52
  ### 工具
45
53
  - `chat-friend` — 好友管理
@@ -52,15 +60,15 @@ open http://localhost:6109
52
60
  - `aicq.chat.send/history/delete` — 聊天操作
53
61
  - `aicq.groups.list/create/join` — 群组操作
54
62
  - `aicq.identity.info` — 身份信息
63
+ - `aicq.chat.streamChunk/streamEnd` — 流式消息
64
+
65
+ ### UI 路由
66
+ - `/plugins/aicq-chat/ui/` — 聊天 SPA 界面
67
+ - `/plugins/aicq-chat/api/*` — REST API 端点
55
68
 
56
69
  ## 配置
57
70
 
58
71
  | 变量 | 默认值 | 说明 |
59
72
  |------|--------|------|
60
- | `AICQ_PORT` | 6109 | 插件服务端口 |
61
73
  | `AICQ_SERVER_URL` | https://aicq.online | AICQ 服务器地址 |
62
74
  | `AICQ_DATA_DIR` | ~/.aicq-plugin | 数据存储目录 |
63
-
64
- ## Chat UI
65
-
66
- 启动后访问 http://localhost:6109 即可使用完整的聊天界面。