mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
Merge branch 'main' into version
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# 💬 Weixin (WeChat Personal) Channel
|
||||
|
||||
PicoClaw supports connecting to your personal WeChat account using the official Tencent iLink API.
|
||||
|
||||
## 🚀 Quick Onboarding
|
||||
|
||||
The easiest way to set up the Weixin channel is using the interactive onboarding command:
|
||||
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
```
|
||||
|
||||
This command will:
|
||||
1. Request a QR code from the iLink API and display it in your terminal.
|
||||
2. Wait for you to scan the QR code with your WeChat mobile app.
|
||||
3. Upon approval, automatically save the generated access token to your `~/.picoclaw/config.json`.
|
||||
|
||||
After onboarding, you can start the gateway:
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Configuration
|
||||
|
||||
You can also manually configure the filter rules in `config.json` under the `channels.weixin` section.
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"weixin": {
|
||||
"enabled": true,
|
||||
"token": "YOUR_WEIXIN_TOKEN",
|
||||
"allow_from": [
|
||||
"user_id_1",
|
||||
"user_id_2"
|
||||
],
|
||||
"proxy": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Configuration Fields
|
||||
|
||||
| Field | Description |
|
||||
|---|---|
|
||||
| `enabled` | Set to `true` to enable the channel at startup. |
|
||||
| `token` | The authentication token obtained via QR login. |
|
||||
| `allow_from` | (Optional) List of WeChat User IDs permitted to interact with the bot. If empty, anyone who can send messages to the connected account can trigger the bot. |
|
||||
| `proxy` | (Optional) HTTP proxy address (e.g. `http://localhost:7890`) for environments where connection to `ilinkai.weixin.qq.com` is restricted. |
|
||||
|
||||
## ⚠️ Important Notes
|
||||
|
||||
- **One Account Only**: The iLink token binds to a single session. Starting a new interaction generally invalidates older tokens if another device authorizes.
|
||||
- **Message Rate Limits**: To avoid getting your account restricted by WeChat anti-spam systems, avoid loop triggers or high-frequency broadcasts.
|
||||
@@ -0,0 +1,58 @@
|
||||
# 💬 微信个人号渠道 (Weixin)
|
||||
|
||||
PicoClaw 支持使用腾讯官方 iLink API 连接您的个人微信账号。
|
||||
|
||||
## 🚀 快速激活
|
||||
|
||||
最简单的方法是使用交互式 onboarding 命令进行一键激活:
|
||||
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
```
|
||||
|
||||
该命令将:
|
||||
1. 从 iLink API 获取二维码并在终端中打印。
|
||||
2. 等待您使用手机微信 App 扫码。
|
||||
3. 扫码确认后,自动将生成的 Access Token 保存至您的 `~/.picoclaw/config.json` 中。
|
||||
|
||||
配置完成后,即可启动网关:
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ 配置说明
|
||||
|
||||
您也可以在 `config.json` 的 `channels.weixin` 段目下进行手动维护。
|
||||
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"weixin": {
|
||||
"enabled": true,
|
||||
"token": "YOUR_WEIXIN_TOKEN",
|
||||
"allow_from": [
|
||||
"user_id_1",
|
||||
"user_id_2"
|
||||
],
|
||||
"proxy": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 字段解析
|
||||
|
||||
| 字段 | 说明 |
|
||||
|---|---|
|
||||
| `enabled` | 设置为 `true` 以在启动时激活该频道。 |
|
||||
| `token` | 通过扫码获取的认证令牌。 |
|
||||
| `allow_from` | (可选) 允许与机器人交互的微信 User ID 列表。如果为空,任何能给此微信号发消息的人都可以触发机器人。 |
|
||||
| `proxy` | (可选) HTTP 代理地址(例如 `http://localhost:7890`),适合网络访问受限环境。 |
|
||||
|
||||
## ⚠️ 注意事项
|
||||
|
||||
- **单端绑定**: iLink 令牌通常与单个会话绑定。在其他地方重新扫码激活可能会导致旧令牌失效。
|
||||
- **频率控制**: 为避免触发微信的风控反垃圾机制,请避免设置死循环触发、高频广播等恶意行为。
|
||||
@@ -13,6 +13,7 @@ Talk to your picoclaw through Telegram, Discord, WhatsApp, Matrix, QQ, DingTalk,
|
||||
| **Telegram** | ⭐ Easy | Recommended, voice-to-text, long polling (no public IP needed) | [Docs](../channels/telegram/README.md) |
|
||||
| **Discord** | ⭐ Easy | Socket Mode, group/DM support, rich bot ecosystem | [Docs](../channels/discord/README.md) |
|
||||
| **WhatsApp** | ⭐ Easy | Native (QR scan) or Bridge URL | [Docs](#whatsapp) |
|
||||
| **Weixin** | ⭐ Easy | Native QR scan (Tencent iLink API) | [Docs](../channels/weixin/README.md) |
|
||||
| **Slack** | ⭐ Easy | **Socket Mode** (no public IP needed), enterprise | [Docs](../channels/slack/README.md) |
|
||||
| **Matrix** | ⭐⭐ Medium | Federated protocol, self-hosting supported | [Docs](../channels/matrix/README.md) |
|
||||
| **QQ** | ⭐⭐ Medium | Official bot API, Chinese community | [Docs](../channels/qq/README.md) |
|
||||
@@ -169,6 +170,39 @@ If `session_store_path` is empty, the session is stored in `<workspace>/whatsapp
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Weixin</b> (WeChat Personal)</summary>
|
||||
|
||||
PicoClaw supports connecting to your personal WeChat account using the official Tencent iLink API.
|
||||
|
||||
**1. Login**
|
||||
Run the interactive QR login flow:
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
```
|
||||
Scan the printed QR code with your WeChat mobile app. On success, the token is saved to your config.
|
||||
|
||||
**2. Configure**
|
||||
(Optional) Update `allow_from` with your WeChat User ID to restrict who can message the bot:
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"weixin": {
|
||||
"enabled": true,
|
||||
"token": "YOUR_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**3. Run**
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>QQ</b></summary>
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ PicoClaw 支持多种聊天平台,使您的 Agent 能够连接到任何地方
|
||||
| **Telegram** | ⭐ 简单 | 推荐,支持语音转文字,长轮询无需公网 | [查看文档](../channels/telegram/README.zh.md) |
|
||||
| **Discord** | ⭐ 简单 | Socket Mode,支持群组/私信,Bot 生态成熟 | [查看文档](../channels/discord/README.zh.md) |
|
||||
| **WhatsApp** | ⭐ 简单 | 原生 (QR 扫码) 或 Bridge URL | [查看文档](#whatsapp) |
|
||||
| **Weixin** | ⭐ 简单 | 原生扫码登录 (腾讯 iLink API) | [查看文档](../channels/weixin/README.zh.md) |
|
||||
| **Slack** | ⭐ 简单 | **Socket Mode** (无需公网 IP),企业级支持 | [查看文档](../channels/slack/README.zh.md) |
|
||||
| **Matrix** | ⭐⭐ 中等 | 联邦协议,支持自建 homeserver 与公开服务器 | [查看文档](../channels/matrix/README.zh.md) |
|
||||
| **QQ** | ⭐⭐ 中等 | 官方机器人 API,适合国内社群 | [查看文档](../channels/qq/README.zh.md) |
|
||||
@@ -170,6 +171,39 @@ PicoClaw 支持两种 WhatsApp 连接方式:
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Weixin</b> (微信个人号)</summary>
|
||||
|
||||
PicoClaw 支持使用腾讯官方 iLink API 连接您的个人微信账号。
|
||||
|
||||
**1. 登录**
|
||||
运行交互式扫码登录流程:
|
||||
```bash
|
||||
picoclaw onboard weixin
|
||||
```
|
||||
在终端扫描打印出的二维码。登录成功后,Token 将自动保存到您的配置文件中。
|
||||
|
||||
**2. 配置**
|
||||
(可选)更新 `allow_from` 填写微信 User ID,以限制哪些用户可以给机器人发消息:
|
||||
```json
|
||||
{
|
||||
"channels": {
|
||||
"weixin": {
|
||||
"enabled": true,
|
||||
"token": "你的_TOKEN",
|
||||
"allow_from": ["你的_USER_ID"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**3. 运行**
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Matrix</b></summary>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user