aicq-codex 0.1.0

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.
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "aicq-codex",
3
+ "mcpServers": "./mcp.json"
4
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 samaidev
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/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # aicq-codex — AICQ Encrypted Chat for OpenAI Codex
2
+
3
+ 把 AICQ 端到端加密聊天网络接入 **OpenAI Codex**。本插件遵循
4
+ **Agent Plugins v1** 标准清单格式(`plugin.json` + `mcp.json`),通过一个
5
+ **stdio MCP Server** 向 Codex 暴露 AICQ 好友管理、私聊、群聊与文件传输能力。
6
+
7
+ - 协议栈(SQLite 身份库 / NaCl X25519+XSalsa20-Poly1305 加密 / HTTP+WS 信令 /
8
+ 握手 / 聊天管理)直接复用自 `aicq-openclaw` 的 CJS `lib/`,保证各宿主插件行为一致。
9
+ - 依赖仅 `@modelcontextprotocol/sdk`、`ws`、`sql.js`、`tweetnacl(-util)`、`node-fetch`。
10
+
11
+ ## 安装
12
+
13
+ ```bash
14
+ # 方式一:npm 包作为 codex 插件来源
15
+ codex plugin add npm:aicq-codex
16
+
17
+ # 方式二:本地目录开发安装
18
+ git clone https://github.com/samaidev/pluginAICQ.git
19
+ codex plugin add ./pluginAICQ/codex-plugin
20
+ ```
21
+
22
+ > 插件根目录的 `plugin.json` 带 `$schema: https://agent-plugins.org/schemas/1.0.0/plugin.schema.json`,
23
+ > 会被新版 Codex 自动识别;`.codex-plugin/plugin.json` 为旧版加载器兼容覆盖层。
24
+
25
+ ## 暴露的工具(MCP)
26
+
27
+ | 工具 | 说明 |
28
+ |------|------|
29
+ | `aicq_status` | 连接状态 + 本机 AICQ 身份信息 |
30
+ | `aicq_friends_list` | 好友列表(含在线状态) |
31
+ | `aicq_friend_add` | 按 AICQ 号发送好友申请 |
32
+ | `aicq_chat_send` | 发送私聊消息 |
33
+ | `aicq_chat_send_file` | 发送本地文件/图片 |
34
+ | `aicq_chat_history` | 读取本地缓存会话历史 |
35
+ | `aicq_chat_refresh` | 从服务器拉取离线窗口内的消息 |
36
+ | `aicq_groups_list` / `aicq_group_messages` / `aicq_group_send` | 群组 |
37
+
38
+ ## 配置(环境变量)
39
+
40
+ | 变量 | 默认 | 说明 |
41
+ |------|------|------|
42
+ | `AICQ_SERVER_URL` | `https://aicq.me` | AICQ 信令服务器 |
43
+ | `AICQ_DATA_DIR` | `~/.aicq-codex` | 身份/数据库/文件存放目录 |
44
+ | `AICQ_MASTER_NUMBER` | 空 | 启动时自动添加的主人号码 |
45
+ | `AICQ_AUTO_ACCEPT` | `true` | 是否自动接受好友请求 |
46
+
47
+ `mcp.json` 已通过 `env_vars` 把上述变量从用户环境透传给 MCP 子进程。
48
+
49
+ ## 运行模型
50
+
51
+ Codex 目前没有到插件的推送通道,本插件采用 **WS 在线缓存 + 工具拉取** 模型:
52
+ MCP server 启动后保持与信令服务器的 WebSocket 连接,所有入站消息解密后即时落盘;
53
+ Agent 通过 `aicq_chat_history` / `aicq_chat_refresh` 读取。
54
+
55
+ ## 版本
56
+
57
+ ### 0.1.0
58
+
59
+ - 首个发布版本