refactor: remove LINE, WhatsApp and Discord channels
Remove LINE, WhatsApp bridge/native and Discord adapters and configuration. Drop unused SDKs, the Discord fork override and the native WhatsApp build target. Clean up migration support and docs; preserve shared credential and voice coverage. Validated with full Go tests, static checks, docs lint and a Linux amd64 build.
This commit is contained in:
1 parent
e7d4293052
commit
7b56867f8a
128 files changed
+289
-5875
No files matched your search
@@ -89,11 +89,11 @@ This means dispatch rules must match the normalized shape, for example:
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "discord-mentions",
|
||||
"name": "feishu-mentions",
|
||||
"agent": "support",
|
||||
"when": {
|
||||
"channel": "discord",
|
||||
"space": "guild:t001",
|
||||
"channel": "feishu",
|
||||
"chat": "oc_group001",
|
||||
"mentioned": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,11 +88,11 @@ type ResolvedRoute struct {
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "discord-mentions",
|
||||
"name": "feishu-mentions",
|
||||
"agent": "support",
|
||||
"when": {
|
||||
"channel": "discord",
|
||||
"space": "guild:t001",
|
||||
"channel": "feishu",
|
||||
"chat": "oc_group001",
|
||||
"mentioned": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ For compatibility, the allocator also emits legacy aliases such as:
|
||||
|
||||
```text
|
||||
agent:main:direct:user123
|
||||
agent:main:discord:channel:c001
|
||||
agent:main:feishu:channel:c001
|
||||
agent:main:pico:direct:pico:session-123
|
||||
```
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ sk_v1_<sha256>
|
||||
|
||||
```text
|
||||
agent:main:direct:user123
|
||||
agent:main:discord:channel:c001
|
||||
agent:main:feishu:channel:c001
|
||||
agent:main:pico:direct:pico:session-123
|
||||
```
|
||||
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
> Retour au [README](../../project/README.fr.md)
|
||||
|
||||
# Discord
|
||||
|
||||
Discord est une application gratuite de chat vocal, vidéo et textuel conçue pour les communautés. PicoClaw se connecte aux serveurs Discord via l'API Bot Discord, avec prise en charge de la réception et de l'envoi de messages.
|
||||
|
||||
## Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"],
|
||||
"group_trigger": {
|
||||
"mention_only": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Champ | Type | Requis | Description |
|
||||
| ------------- | ------ | ------ | --------------------------------------------------------------------------- |
|
||||
| enabled | bool | Oui | Activer ou non le canal Discord |
|
||||
| token | string | Oui | Token du bot Discord |
|
||||
| allow_from | array | Non | Liste blanche d'identifiants utilisateur ; vide signifie tous les utilisateurs |
|
||||
| group_trigger | object | Non | Paramètres de déclenchement de groupe (exemple : { "mention_only": false }) |
|
||||
|
||||
## Configuration initiale
|
||||
|
||||
1. Accéder au [Portail des développeurs Discord](https://discord.com/developers/applications) et créer une nouvelle application
|
||||
2. Activer les Intents :
|
||||
- Message Content Intent
|
||||
- Server Members Intent
|
||||
3. Obtenir le Token du bot
|
||||
4. Renseigner le Token du bot dans le fichier de configuration
|
||||
5. Inviter le bot sur le serveur et lui accorder les permissions nécessaires (ex. envoyer des messages, lire l'historique des messages)
|
||||
@@ -1,40 +0,0 @@
|
||||
> [README](../../project/README.ja.md) に戻る
|
||||
|
||||
# Discord
|
||||
|
||||
Discord はコミュニティ向けに設計された無料の音声・ビデオ・テキストチャットアプリケーションです。PicoClaw は Discord Bot API を通じて Discord サーバーに接続し、メッセージの受信と送信をサポートします。
|
||||
|
||||
## 設定
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"],
|
||||
"group_trigger": {
|
||||
"mention_only": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| フィールド | 型 | 必須 | 説明 |
|
||||
| ------------- | ------ | ------ | ----------------------------------------------------------------- |
|
||||
| enabled | bool | はい | Discord チャンネルを有効にするかどうか |
|
||||
| token | string | はい | Discord ボットトークン |
|
||||
| allow_from | array | いいえ | 許可するユーザーIDのリスト。空の場合はすべてのユーザーを許可 |
|
||||
| group_trigger | object | いいえ | グループトリガー設定(例: { "mention_only": false }) |
|
||||
|
||||
## セットアップ手順
|
||||
|
||||
1. [Discord 開発者ポータル](https://discord.com/developers/applications) にアクセスして新しいアプリケーションを作成する
|
||||
2. Intents を有効にする:
|
||||
- Message Content Intent
|
||||
- Server Members Intent
|
||||
3. Bot トークンを取得する
|
||||
4. 設定ファイルに Bot トークンを入力する
|
||||
5. ボットをサーバーに招待し、必要な権限を付与する(例: メッセージの送信、メッセージ履歴の読み取りなど)
|
||||
@@ -1,70 +0,0 @@
|
||||
> Back to [README](../../../README.md)
|
||||
|
||||
# Discord
|
||||
|
||||
Discord is a free voice, video, and text chat application designed for communities. PicoClaw connects to Discord servers via the Discord Bot API, supporting both receiving and sending messages.
|
||||
|
||||
## Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"defaults": {
|
||||
"tool_feedback": {
|
||||
"enabled": true,
|
||||
"max_args_length": 300
|
||||
}
|
||||
}
|
||||
},
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"],
|
||||
"placeholder": {
|
||||
"enabled": true,
|
||||
"text": ["Thinking... 💭"]
|
||||
},
|
||||
"group_trigger": {
|
||||
"mention_only": false
|
||||
},
|
||||
"reasoning_channel_id": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------- | ------ | -------- | --------------------------------------------------------------------------- |
|
||||
| enabled | bool | Yes | Whether to enable the Discord channel |
|
||||
| token | string | Yes | Discord Bot Token |
|
||||
| allow_from | array | No | Allowlist of user IDs; empty means all users are allowed |
|
||||
| placeholder | object | No | Placeholder message config shown while the agent is working |
|
||||
| group_trigger | object | No | Group trigger settings (example: { "mention_only": false }) |
|
||||
| reasoning_channel_id | string | No | Optional target channel ID for reasoning/thinking output |
|
||||
|
||||
## Visible Execution Feedback
|
||||
|
||||
Discord can show three different kinds of "working" feedback:
|
||||
|
||||
1. Typing indicator: automatic, no extra config needed.
|
||||
2. Placeholder message: enable `channel_list.discord.placeholder.enabled` to send a visible `Thinking...` message that is later edited into the final reply.
|
||||
3. Tool execution feedback: enable `agents.defaults.tool_feedback.enabled` to send a short message before each tool call, for example:
|
||||
|
||||
```text
|
||||
🔧 `web_search`
|
||||
Checking the latest PicoClaw release notes before I answer.
|
||||
```
|
||||
|
||||
If you only see `Bot is typing`, check that `placeholder.enabled` or `tool_feedback.enabled` is actually set in your runtime config.
|
||||
|
||||
## Setup
|
||||
|
||||
1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) and create a new application
|
||||
2. Enable Intents:
|
||||
- Message Content Intent
|
||||
- Server Members Intent
|
||||
3. Obtain the Bot Token
|
||||
4. Fill in the Bot Token in the configuration file
|
||||
5. Invite the bot to your server and grant the necessary permissions (e.g. Send Messages, Read Message History)
|
||||
@@ -1,40 +0,0 @@
|
||||
> Voltar ao [README](../../project/README.pt-br.md)
|
||||
|
||||
# Discord
|
||||
|
||||
Discord é um aplicativo gratuito de chat de voz, vídeo e texto projetado para comunidades. O PicoClaw se conecta a servidores Discord via Discord Bot API, com suporte para receber e enviar mensagens.
|
||||
|
||||
## Configuração
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"],
|
||||
"group_trigger": {
|
||||
"mention_only": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Campo | Tipo | Obrigatório | Descrição |
|
||||
| ------------- | ------ | ----------- | --------------------------------------------------------------------------- |
|
||||
| enabled | bool | Sim | Se o canal Discord deve ser habilitado |
|
||||
| token | string | Sim | Token do Bot Discord |
|
||||
| allow_from | array | Não | Lista de IDs de usuários permitidos; vazio significa todos os usuários |
|
||||
| group_trigger | object | Não | Configurações de gatilho de grupo (exemplo: { "mention_only": false }) |
|
||||
|
||||
## Configuração inicial
|
||||
|
||||
1. Acesse o [Portal de Desenvolvedores do Discord](https://discord.com/developers/applications) e crie uma nova aplicação
|
||||
2. Habilite os Intents:
|
||||
- Message Content Intent
|
||||
- Server Members Intent
|
||||
3. Obtenha o Token do Bot
|
||||
4. Preencha o Token do Bot no arquivo de configuração
|
||||
5. Convide o bot para o servidor e conceda as permissões necessárias (ex. enviar mensagens, ler histórico de mensagens)
|
||||
@@ -1,40 +0,0 @@
|
||||
> Quay lại [README](../../project/README.vi.md)
|
||||
|
||||
# Discord
|
||||
|
||||
Discord là ứng dụng chat thoại, video và văn bản miễn phí được thiết kế cho cộng đồng. PicoClaw kết nối với máy chủ Discord qua Discord Bot API, hỗ trợ nhận và gửi tin nhắn.
|
||||
|
||||
## Cấu hình
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"],
|
||||
"group_trigger": {
|
||||
"mention_only": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Trường | Kiểu | Bắt buộc | Mô tả |
|
||||
| ------------- | ------ | -------- | --------------------------------------------------------------------------- |
|
||||
| enabled | bool | Có | Có bật kênh Discord hay không |
|
||||
| token | string | Có | Token Bot Discord |
|
||||
| allow_from | array | Không | Danh sách trắng ID người dùng; để trống nghĩa là cho phép tất cả |
|
||||
| group_trigger | object | Không | Cài đặt kích hoạt nhóm (ví dụ: { "mention_only": false }) |
|
||||
|
||||
## Hướng dẫn thiết lập
|
||||
|
||||
1. Truy cập [Discord Developer Portal](https://discord.com/developers/applications) và tạo ứng dụng mới
|
||||
2. Bật các Intents:
|
||||
- Message Content Intent
|
||||
- Server Members Intent
|
||||
3. Lấy Bot Token
|
||||
4. Điền Bot Token vào file cấu hình
|
||||
5. Mời bot vào máy chủ và cấp các quyền cần thiết (ví dụ: gửi tin nhắn, đọc lịch sử tin nhắn)
|
||||
@@ -1,40 +0,0 @@
|
||||
> 返回 [README](../../project/README.zh.md)
|
||||
|
||||
# Discord
|
||||
|
||||
Discord 是一个专为社区设计的免费语音、视频和文本聊天应用。PicoClaw 通过 Discord Bot API 连接到 Discord 服务器,支持接收和发送消息。
|
||||
|
||||
## 配置
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"],
|
||||
"group_trigger": {
|
||||
"mention_only": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| 字段 | 类型 | 必填 | 描述 |
|
||||
| ------------ | ------ | ---- | -------------------------------- |
|
||||
| enabled | bool | 是 | 是否启用 Discord 频道 |
|
||||
| token | string | 是 | Discord 机器人 Token |
|
||||
| allow_from | array | 否 | 用户ID白名单,空表示允许所有用户 |
|
||||
| group_trigger | object | 否 | 群组触发设置(示例: { "mention_only": false }) |
|
||||
|
||||
## 设置流程
|
||||
|
||||
1. 前往 [Discord 开发者门户](https://discord.com/developers/applications) 创建一个新的应用
|
||||
2. 启用 Intents:
|
||||
- Message Content Intent
|
||||
- Server Members Intent
|
||||
3. 获取 Bot Token
|
||||
4. 将 Bot Token 填入配置文件中
|
||||
5. 邀请机器人加入服务器并授予必要权限(例如发送消息、读取消息历史等)
|
||||
@@ -50,4 +50,4 @@ Feishu (nom international : Lark) est une plateforme de collaboration d'entrepri
|
||||
|
||||
## Limitations de plateforme
|
||||
|
||||
> ⚠️ **Le canal Feishu ne prend pas en charge les appareils 32 bits.** Le SDK Feishu ne fournit que des builds 64 bits. Les architectures 32 bits (armv6, armv7, mipsle, etc.) ne peuvent pas utiliser le canal Feishu. Pour la messagerie sur des appareils 32 bits, utilisez Telegram, Discord ou OneBot.
|
||||
> ⚠️ **Le canal Feishu ne prend pas en charge les appareils 32 bits.** Le SDK Feishu ne fournit que des builds 64 bits. Les architectures 32 bits (armv6, armv7, mipsle, etc.) ne peuvent pas utiliser le canal Feishu. Pour la messagerie sur des appareils 32 bits, utilisez Telegram ou OneBot.
|
||||
@@ -50,4 +50,4 @@
|
||||
|
||||
## プラットフォーム制限
|
||||
|
||||
> ⚠️ **飛書チャネルは 32 ビットデバイスをサポートしていません。** 飛書 SDK は 64 ビットビルドのみ提供しています。armv6 / armv7 / mipsle などの 32 ビットアーキテクチャでは飛書チャネルを使用できません。32 ビットデバイスでのメッセージングには、Telegram、Discord、または OneBot をご利用ください。
|
||||
> ⚠️ **飛書チャネルは 32 ビットデバイスをサポートしていません。** 飛書 SDK は 64 ビットビルドのみ提供しています。armv6 / armv7 / mipsle などの 32 ビットアーキテクチャでは飛書チャネルを使用できません。32 ビットデバイスでのメッセージングには、Telegram、または OneBot をご利用ください。
|
||||
@@ -50,4 +50,4 @@ Feishu (international name: Lark) is an enterprise collaboration platform by Byt
|
||||
|
||||
## Platform Limitations
|
||||
|
||||
> ⚠️ **Feishu channel does not support 32-bit devices.** The Feishu SDK only provides 64-bit builds. Devices running armv6, armv7, mipsle, or other 32-bit architectures cannot use the Feishu channel. For messaging on 32-bit devices, use Telegram, Discord, or OneBot instead.
|
||||
> ⚠️ **Feishu channel does not support 32-bit devices.** The Feishu SDK only provides 64-bit builds. Devices running armv6, armv7, mipsle, or other 32-bit architectures cannot use the Feishu channel. For messaging on 32-bit devices, use Telegram, or OneBot instead.
|
||||
@@ -50,4 +50,4 @@ Feishu (nome internacional: Lark) é uma plataforma de colaboração empresarial
|
||||
|
||||
## Limitações de Plataforma
|
||||
|
||||
> ⚠️ **O canal Feishu não suporta dispositivos 32 bits.** O SDK do Feishu fornece apenas builds 64 bits. Arquiteturas 32 bits (armv6, armv7, mipsle, etc.) não podem usar o canal Feishu. Para mensagens em dispositivos 32 bits, use Telegram, Discord ou OneBot.
|
||||
> ⚠️ **O canal Feishu não suporta dispositivos 32 bits.** O SDK do Feishu fornece apenas builds 64 bits. Arquiteturas 32 bits (armv6, armv7, mipsle, etc.) não podem usar o canal Feishu. Para mensagens em dispositivos 32 bits, use Telegram ou OneBot.
|
||||
@@ -50,4 +50,4 @@ Feishu (tên quốc tế: Lark) là nền tảng cộng tác doanh nghiệp củ
|
||||
|
||||
## Giới hạn nền tảng
|
||||
|
||||
> ⚠️ **Kênh Feishu không hỗ trợ thiết bị 32 bit.** SDK Feishu chỉ cung cấp bản build 64 bit. Các kiến trúc 32 bit (armv6, armv7, mipsle, v.v.) không thể sử dụng kênh Feishu. Để nhắn tin trên thiết bị 32 bit, hãy dùng Telegram, Discord hoặc OneBot.
|
||||
> ⚠️ **Kênh Feishu không hỗ trợ thiết bị 32 bit.** SDK Feishu chỉ cung cấp bản build 64 bit. Các kiến trúc 32 bit (armv6, armv7, mipsle, v.v.) không thể sử dụng kênh Feishu. Để nhắn tin trên thiết bị 32 bit, hãy dùng Telegram hoặc OneBot.
|
||||
@@ -45,4 +45,4 @@
|
||||
|
||||
## 平台限制
|
||||
|
||||
> ⚠️ **飞书通道不支持 32 位设备。** 飞书官方 SDK 仅提供 64 位构建,armv6 / armv7 / mipsle 等 32 位架构无法使用飞书通道。如需在 32 位设备上接入即时通讯,请改用 Telegram、Discord 或 OneBot 等通道。
|
||||
> ⚠️ **飞书通道不支持 32 位设备。** 飞书官方 SDK 仅提供 64 位构建,armv6 / armv7 / mipsle 等 32 位架构无法使用飞书通道。如需在 32 位设备上接入即时通讯,请改用 Telegram 或 OneBot 等通道。
|
||||
@@ -1,41 +0,0 @@
|
||||
> Retour au [README](../../project/README.fr.md)
|
||||
|
||||
# Line
|
||||
|
||||
PicoClaw prend en charge LINE via l'API LINE Messaging avec des callbacks webhook.
|
||||
|
||||
## Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Champ | Type | Requis | Description |
|
||||
| -------------------- | ------ | ------ | ------------------------------------------------------------------------ |
|
||||
| enabled | bool | Oui | Activer ou non le canal LINE |
|
||||
| channel_secret | string | Oui | Channel Secret de l'API LINE Messaging |
|
||||
| channel_access_token | string | Oui | Channel Access Token de l'API LINE Messaging |
|
||||
| webhook_path | string | Non | Chemin du webhook (par défaut : /webhook/line) |
|
||||
| allow_from | array | Non | Liste blanche d'ID utilisateurs ; vide signifie tous les utilisateurs |
|
||||
|
||||
## Procédure de configuration
|
||||
|
||||
1. Rendez-vous sur la [LINE Developers Console](https://developers.line.biz/console/) et créez un fournisseur de services ainsi qu'un canal Messaging API
|
||||
2. Obtenez le Channel Secret et le Channel Access Token
|
||||
3. Configurez le webhook :
|
||||
- LINE exige que les webhooks utilisent HTTPS. Vous devez donc déployer un serveur compatible HTTPS ou utiliser un outil de proxy inverse comme ngrok pour exposer votre serveur local sur Internet
|
||||
- PicoClaw utilise un serveur HTTP Gateway partagé pour recevoir les callbacks webhook de tous les canaux, écoutant par défaut sur 127.0.0.1:18790
|
||||
- Définissez l'URL du webhook sur `https://your-domain.com/webhook/line`, puis configurez un proxy inverse de votre domaine externe vers le Gateway local (port par défaut 18790)
|
||||
- Activez le webhook et vérifiez l'URL
|
||||
4. Renseignez le Channel Secret et le Channel Access Token dans le fichier de configuration
|
||||
@@ -1,41 +0,0 @@
|
||||
> [README](../../project/README.ja.md) に戻る
|
||||
|
||||
# Line
|
||||
|
||||
PicoClaw は LINE Messaging API と Webhook コールバックを通じて LINE をサポートします。
|
||||
|
||||
## 設定
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| フィールド | 型 | 必須 | 説明 |
|
||||
| -------------------- | ------ | ------ | ------------------------------------------------------------------ |
|
||||
| enabled | bool | はい | LINE チャンネルを有効にするかどうか |
|
||||
| channel_secret | string | はい | LINE Messaging API の Channel Secret |
|
||||
| channel_access_token | string | はい | LINE Messaging API の Channel Access Token |
|
||||
| webhook_path | string | いいえ | Webhook のパス(デフォルト: /webhook/line) |
|
||||
| allow_from | array | いいえ | ユーザーIDのホワイトリスト。空の場合は全ユーザーを許可 |
|
||||
|
||||
## セットアップ手順
|
||||
|
||||
1. [LINE Developers Console](https://developers.line.biz/console/) にアクセスし、サービスプロバイダーと Messaging API チャンネルを作成する
|
||||
2. Channel Secret と Channel Access Token を取得する
|
||||
3. Webhook を設定する:
|
||||
- LINE は Webhook に HTTPS が必要なため、HTTPS 対応サーバーをデプロイするか、ngrok などのリバースプロキシツールを使用してローカルサーバーをインターネットに公開する必要があります
|
||||
- PicoClaw は共有の Gateway HTTP サーバーを使用してすべてのチャンネルの Webhook コールバックを受信します。デフォルトのリッスンアドレスは 127.0.0.1:18790 です
|
||||
- Webhook URL を `https://your-domain.com/webhook/line` に設定し、外部ドメインをローカルの Gateway(デフォルトポート 18790)にリバースプロキシする
|
||||
- Webhook を有効にして URL を検証する
|
||||
4. Channel Secret と Channel Access Token を設定ファイルに入力する
|
||||
@@ -1,41 +0,0 @@
|
||||
> Back to [README](../../../README.md)
|
||||
|
||||
# Line
|
||||
|
||||
PicoClaw supports LINE through the LINE Messaging API with webhook callbacks.
|
||||
|
||||
## Configuration
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
| -------------------- | ------ | -------- | ------------------------------------------------------------------ |
|
||||
| enabled | bool | Yes | Whether to enable the LINE channel |
|
||||
| channel_secret | string | Yes | Channel Secret for the LINE Messaging API |
|
||||
| channel_access_token | string | Yes | Channel Access Token for the LINE Messaging API |
|
||||
| webhook_path | string | No | Webhook path (default: /webhook/line) |
|
||||
| allow_from | array | No | User ID whitelist; empty means all users are allowed |
|
||||
|
||||
## Setup
|
||||
|
||||
1. Go to the [LINE Developers Console](https://developers.line.biz/console/) and create a provider and a Messaging API channel
|
||||
2. Obtain the Channel Secret and Channel Access Token
|
||||
3. Configure the webhook:
|
||||
- LINE requires webhooks to use HTTPS, so you need to deploy a server with HTTPS support, or use a reverse proxy tool like ngrok to expose your local server to the internet
|
||||
- PicoClaw uses a shared Gateway HTTP server to receive webhook callbacks for all channels, listening on 127.0.0.1:18790 by default
|
||||
- Set the Webhook URL to `https://your-domain.com/webhook/line`, then reverse-proxy your external domain to the local Gateway (default port 18790)
|
||||
- Enable the webhook and verify the URL
|
||||
4. Fill in the Channel Secret and Channel Access Token in the configuration file
|
||||
@@ -1,41 +0,0 @@
|
||||
> Voltar ao [README](../../project/README.pt-br.md)
|
||||
|
||||
# Line
|
||||
|
||||
O PicoClaw suporta o LINE por meio da LINE Messaging API com callbacks de webhook.
|
||||
|
||||
## Configuração
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Campo | Tipo | Obrigatório | Descrição |
|
||||
| -------------------- | ------ | ----------- | ---------------------------------------------------------------------- |
|
||||
| enabled | bool | Sim | Se o canal LINE deve ser habilitado |
|
||||
| channel_secret | string | Sim | Channel Secret da LINE Messaging API |
|
||||
| channel_access_token | string | Sim | Channel Access Token da LINE Messaging API |
|
||||
| webhook_path | string | Não | Caminho do webhook (padrão: /webhook/line) |
|
||||
| allow_from | array | Não | Lista de permissão de IDs de usuário; vazio permite todos |
|
||||
|
||||
## Configuração passo a passo
|
||||
|
||||
1. Acesse o [LINE Developers Console](https://developers.line.biz/console/) e crie um provedor de serviços e um canal Messaging API
|
||||
2. Obtenha o Channel Secret e o Channel Access Token
|
||||
3. Configure o webhook:
|
||||
- O LINE exige que os webhooks usem HTTPS, portanto é necessário implantar um servidor com suporte a HTTPS ou usar uma ferramenta de proxy reverso como o ngrok para expor seu servidor local à internet
|
||||
- O PicoClaw usa um servidor HTTP Gateway compartilhado para receber callbacks de webhook de todos os canais, escutando em 127.0.0.1:18790 por padrão
|
||||
- Defina a URL do webhook como `https://your-domain.com/webhook/line` e configure um proxy reverso do seu domínio externo para o Gateway local (porta padrão 18790)
|
||||
- Ative o webhook e verifique a URL
|
||||
4. Preencha o Channel Secret e o Channel Access Token no arquivo de configuração
|
||||
@@ -1,41 +0,0 @@
|
||||
> Quay lại [README](../../project/README.vi.md)
|
||||
|
||||
# Line
|
||||
|
||||
PicoClaw hỗ trợ LINE thông qua LINE Messaging API kết hợp với webhook callback.
|
||||
|
||||
## Cấu hình
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| Trường | Kiểu | Bắt buộc | Mô tả |
|
||||
| -------------------- | ------ | -------- | ---------------------------------------------------------------------- |
|
||||
| enabled | bool | Có | Có bật kênh LINE hay không |
|
||||
| channel_secret | string | Có | Channel Secret của LINE Messaging API |
|
||||
| channel_access_token | string | Có | Channel Access Token của LINE Messaging API |
|
||||
| webhook_path | string | Không | Đường dẫn webhook (mặc định: /webhook/line) |
|
||||
| allow_from | array | Không | Danh sách trắng ID người dùng; để trống cho phép tất cả |
|
||||
|
||||
## Quy trình thiết lập
|
||||
|
||||
1. Truy cập [LINE Developers Console](https://developers.line.biz/console/) và tạo một nhà cung cấp dịch vụ cùng một kênh Messaging API
|
||||
2. Lấy Channel Secret và Channel Access Token
|
||||
3. Cấu hình webhook:
|
||||
- LINE yêu cầu webhook phải sử dụng HTTPS, vì vậy bạn cần triển khai máy chủ hỗ trợ HTTPS hoặc dùng công cụ reverse proxy như ngrok để expose máy chủ cục bộ ra internet
|
||||
- PicoClaw sử dụng máy chủ HTTP Gateway dùng chung để nhận webhook callback cho tất cả các kênh, mặc định lắng nghe tại 127.0.0.1:18790
|
||||
- Đặt Webhook URL thành `https://your-domain.com/webhook/line`, sau đó reverse proxy tên miền bên ngoài về Gateway cục bộ (cổng mặc định 18790)
|
||||
- Bật webhook và xác minh URL
|
||||
4. Điền Channel Secret và Channel Access Token vào file cấu hình
|
||||
@@ -1,41 +0,0 @@
|
||||
> 返回 [README](../../project/README.zh.md)
|
||||
|
||||
# Line
|
||||
|
||||
PicoClaw 通过 LINE Messaging API 配合 Webhook 回调功能实现对 LINE 的支持。
|
||||
|
||||
## 配置
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
| 字段 | 类型 | 必填 | 描述 |
|
||||
| -------------------- | ------ | ---- | ------------------------------------------ |
|
||||
| enabled | bool | 是 | 是否启用 LINE Channel |
|
||||
| channel_secret | string | 是 | LINE Messaging API 的 Channel Secret |
|
||||
| channel_access_token | string | 是 | LINE Messaging API 的 Channel Access Token |
|
||||
| webhook_path | string | 否 | Webhook 的路径 (默认为 /webhook/line) |
|
||||
| allow_from | array | 否 | 用户ID白名单,空表示允许所有用户 |
|
||||
|
||||
## 设置流程
|
||||
|
||||
1. 前往 [LINE Developers Console](https://developers.line.biz/console/) 创建一个服务提供商和一个 Messaging API Channel
|
||||
2. 获取 Channel Secret 和 Channel Access Token
|
||||
3. 配置Webhook:
|
||||
- LINE 要求 Webhook 必须使用 HTTPS 协议,因此需要部署一个支持 HTTPS 的服务器,或者使用反向代理工具如 ngrok 将本地服务器暴露到公网
|
||||
- PicoClaw 现在使用共享的 Gateway HTTP 服务器来接收所有渠道的 webhook 回调,默认监听地址为 127.0.0.1:18790
|
||||
- 将 Webhook URL 设置为 `https://your-domain.com/webhook/line`,然后将外部域名反向代理到本机的 Gateway(默认端口 18790)
|
||||
- 启用 Webhook 并验证 URL
|
||||
4. 将 Channel Secret 和 Channel Access Token 填入配置文件中
|
||||
@@ -20,8 +20,8 @@ The user's intent reaches the model **as soon as the current tool finishes**, no
|
||||
graph TD
|
||||
subgraph External Callers
|
||||
TG[Telegram]
|
||||
DC[Discord]
|
||||
SL[Discord]
|
||||
DC[Feishu]
|
||||
SL[Feishu]
|
||||
end
|
||||
|
||||
subgraph AgentLoop
|
||||
@@ -53,7 +53,7 @@ graph TD
|
||||
|
||||
### Message routing and worker pool
|
||||
|
||||
Channels (Telegram, Discord, etc.) publish messages to the `MessageBus` via `PublishInbound`. The `Run()` loop consumes messages from the bus and routes each one based on its **session key**:
|
||||
Channels (Telegram, Feishu, etc.) publish messages to the `MessageBus` via `PublishInbound`. The `Run()` loop consumes messages from the bus and routes each one based on its **session key**:
|
||||
|
||||
- **No active turn for the session**: The session key is atomically reserved via `LoadOrStore(sessionKey, struct{}{})`, and a **worker goroutine** is spawned to process the full turn lifecycle.
|
||||
- **Active turn exists for the session**: The message is enqueued directly into the steering queue via `enqueueSteeringMessage`. It will be picked up by the existing worker's steering drain loop.
|
||||
|
||||
+1
-160
@@ -4,19 +4,15 @@
|
||||
|
||||
## 💬 Applications de Chat
|
||||
|
||||
Communiquez avec votre PicoClaw via Telegram, Discord, WhatsApp, QQ, DingTalk, LINE, WeCom, Feishu, OneBot, MQTT.
|
||||
Communiquez avec votre PicoClaw via Telegram, QQ, DingTalk, WeCom, Feishu, OneBot, MQTT.
|
||||
|
||||
> **Note** : Tous les canaux basés sur les webhooks (LINE, WeCom, etc.) sont servis sur un seul serveur HTTP Gateway partagé (`gateway.host`:`gateway.port`, par défaut `127.0.0.1:18790`). Il n'y a pas de ports par canal à configurer. Note : Feishu utilise le mode WebSocket/SDK et n'utilise pas le serveur HTTP webhook partagé.
|
||||
|
||||
| Canal | Difficulté | Description | Documentation |
|
||||
| -------------------- | ------------------ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| **Telegram** | ⭐ Facile | Recommandé, transcription vocale, long polling (pas d'IP publique requise) | [Documentation](../channels/telegram/README.fr.md) |
|
||||
| **Discord** | ⭐ Facile | Socket Mode, groupes/DM, écosystème bot riche | [Documentation](../channels/discord/README.fr.md) |
|
||||
| **WhatsApp** | ⭐ Facile | Natif (scan QR) ou Bridge URL | [Documentation](#whatsapp) |
|
||||
| **Weixin** | ⭐ Facile | Scan QR natif (API Tencent iLink) | [Documentation](#weixin) |
|
||||
| **QQ** | ⭐⭐ Moyen | API bot officielle, communauté chinoise | [Documentation](../channels/qq/README.fr.md) |
|
||||
| **DingTalk** | ⭐⭐ Moyen | Mode Stream (pas d'IP publique requise), entreprise | [Documentation](../channels/dingtalk/README.fr.md) |
|
||||
| **LINE** | ⭐⭐⭐ Avancé | HTTPS Webhook requis | [Documentation](../channels/line/README.fr.md) |
|
||||
| **WeCom (企业微信)** | ⭐⭐⭐ Avancé | Bot groupe (Webhook), app personnalisée (API), AI Bot | [Guide](../channels/wecom/README.fr.md) |
|
||||
| **Feishu (飞书)** | ⭐⭐⭐ Avancé | Collaboration entreprise, fonctionnalités riches | [Documentation](../channels/feishu/README.fr.md) |
|
||||
| **OneBot** | ⭐⭐ Moyen | Compatible NapCat/Go-CQHTTP, écosystème communautaire | [Documentation](../channels/onebot/README.fr.md) |
|
||||
@@ -72,110 +68,6 @@ Vous pouvez aussi gerer les competences installees directement depuis Telegram :
|
||||
|
||||
</details>
|
||||
|
||||
<a id="discord"></a>
|
||||
<details>
|
||||
<summary><b>Discord</b></summary>
|
||||
|
||||
**1. Créer un bot**
|
||||
|
||||
* Allez sur <https://discord.com/developers/applications>
|
||||
* Créez une application → Bot → Add Bot
|
||||
* Copiez le token du bot
|
||||
|
||||
**2. Activer les intents**
|
||||
|
||||
* Dans les paramètres du Bot, activez **MESSAGE CONTENT INTENT**
|
||||
* (Optionnel) Activez **SERVER MEMBERS INTENT** si vous prévoyez d'utiliser des listes d'autorisation basées sur les données des membres
|
||||
|
||||
**3. Obtenir votre identifiant utilisateur**
|
||||
* Paramètres Discord → Avancé → activez **Developer Mode**
|
||||
* Clic droit sur votre avatar → **Copy User ID**
|
||||
|
||||
**4. Configurer**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**5. Inviter le bot**
|
||||
|
||||
* OAuth2 → URL Generator
|
||||
* Scopes : `bot`
|
||||
* Bot Permissions : `Send Messages`, `Read Message History`
|
||||
* Ouvrez l'URL d'invitation générée et ajoutez le bot à votre serveur
|
||||
|
||||
**Mode déclenchement en groupe (optionnel)**
|
||||
|
||||
Par défaut, le bot répond à tous les messages dans un canal de serveur. Pour limiter les réponses aux @mentions uniquement, ajoutez :
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "mention_only": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Vous pouvez également déclencher par préfixes de mots-clés (par ex. `!bot`) :
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "prefixes": ["!bot"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**6. Lancer**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<a id="whatsapp"></a>
|
||||
<details>
|
||||
<summary><b>WhatsApp</b> (natif via whatsmeow)</summary>
|
||||
|
||||
PicoClaw peut se connecter à WhatsApp de deux manières :
|
||||
|
||||
- **Natif (recommandé) :** En processus via [whatsmeow](https://github.com/tulir/whatsmeow). Pas de bridge séparé. Définissez `"use_native": true` et laissez `bridge_url` vide. Au premier lancement, scannez le code QR avec WhatsApp (Appareils liés). La session est stockée dans votre workspace (par ex. `workspace/whatsapp/`). Le canal natif est **optionnel** pour garder le binaire par défaut léger ; compilez avec `-tags whatsapp_native` (par ex. `make build-whatsapp-native` ou `go build -tags whatsapp_native ./cmd/...`).
|
||||
- **Bridge :** Connectez-vous à un bridge WebSocket externe. Définissez `bridge_url` (par ex. `ws://localhost:3001`) et gardez `use_native` à false.
|
||||
|
||||
**Configurer (natif)**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"whatsapp": {
|
||||
"enabled": true,
|
||||
"type": "whatsapp",
|
||||
"use_native": true,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Si `session_store_path` est vide, la session est stockée dans `<workspace>/whatsapp/`. Lancez `picoclaw gateway` ; au premier lancement, scannez le code QR affiché dans le terminal avec WhatsApp → Appareils liés.
|
||||
|
||||
</details>
|
||||
|
||||
<a id="weixin"></a>
|
||||
<details>
|
||||
<summary><b>Weixin</b> (WeChat Personnel)</summary>
|
||||
@@ -291,56 +183,6 @@ picoclaw gateway
|
||||
```
|
||||
</details>
|
||||
|
||||
<a id="line"></a>
|
||||
<details>
|
||||
<summary><b>LINE</b></summary>
|
||||
|
||||
**1. Créer un compte officiel LINE**
|
||||
|
||||
- Allez sur [LINE Developers Console](https://developers.line.biz/)
|
||||
- Créez un provider → Créez un canal Messaging API
|
||||
- Copiez le **Channel Secret** et le **Channel Access Token**
|
||||
|
||||
**2. Configurer**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> Le webhook LINE est servi sur le serveur Gateway partagé (`gateway.host`:`gateway.port`, par défaut `127.0.0.1:18790`).
|
||||
|
||||
**3. Configurer l'URL du Webhook**
|
||||
|
||||
LINE nécessite HTTPS pour les webhooks. Utilisez un reverse proxy ou un tunnel :
|
||||
|
||||
```bash
|
||||
# Exemple avec ngrok (le port par défaut du gateway est 18790)
|
||||
ngrok http 18790
|
||||
```
|
||||
|
||||
Puis définissez l'URL du Webhook dans la console LINE Developers à `https://your-domain/webhook/line` et activez **Use webhook**.
|
||||
|
||||
**4. Lancer**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
> Dans les discussions de groupe, le bot ne répond que lorsqu'il est @mentionné. Les réponses citent le message original.
|
||||
|
||||
</details>
|
||||
|
||||
<a id="wecom"></a>
|
||||
<details>
|
||||
<summary><b>WeCom (企业微信)</b></summary>
|
||||
@@ -378,7 +220,6 @@ Voir le [Guide de Configuration WeCom](../channels/wecom/README.fr.md) pour les
|
||||
}
|
||||
```
|
||||
|
||||
> Le webhook WeCom est servi sur le serveur Gateway partagé (`gateway.host`:`gateway.port`, par défaut `127.0.0.1:18790`).
|
||||
|
||||
**Configuration rapide - WeCom App :**
|
||||
|
||||
|
||||
@@ -6,19 +6,15 @@
|
||||
|
||||
PicoClaw は複数のチャットプラットフォームをサポートしており、Agent をどこにでも接続できます。
|
||||
|
||||
> **注意**: すべての Webhook ベースのチャネル(LINE、WeCom など)は、共有 Gateway HTTP サーバー(`gateway.host`:`gateway.port`、デフォルト `127.0.0.1:18790`)上で提供されます。チャネルごとにポートを設定する必要はありません。注意:飛書(Feishu)は WebSocket/SDK モードを使用し、共有 HTTP Webhook サーバーは使用しません。
|
||||
|
||||
### チャネル一覧
|
||||
|
||||
| チャネル | セットアップ難易度 | 特徴 | ドキュメント |
|
||||
| -------------------- | ------------------ | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
||||
| **Telegram** | ⭐ 簡単 | 推奨、音声テキスト変換対応、ロングポーリング(公開 IP 不要) | [ドキュメント](../channels/telegram/README.ja.md) |
|
||||
| **Discord** | ⭐ 簡単 | Socket Mode、グループ/DM 対応、Bot エコシステム充実 | [ドキュメント](../channels/discord/README.ja.md) |
|
||||
| **WhatsApp** | ⭐ 簡単 | ネイティブ (QR スキャン) または Bridge URL | [ドキュメント](#whatsapp) |
|
||||
| **微信 (Weixin)** | ⭐ 簡単 | ネイティブ QR スキャン(Tencent iLink API)| [ドキュメント](#weixin) |
|
||||
| **QQ** | ⭐⭐ 中程度 | 公式ボット API、中国コミュニティ向け | [ドキュメント](../channels/qq/README.ja.md) |
|
||||
| **DingTalk** | ⭐⭐ 中程度 | Stream モード(公開 IP 不要)、企業向け | [ドキュメント](../channels/dingtalk/README.ja.md) |
|
||||
| **LINE** | ⭐⭐⭐ やや難 | HTTPS Webhook が必要 | [ドキュメント](../channels/line/README.ja.md) |
|
||||
| **WeCom (企業微信)** | ⭐⭐⭐ やや難 | グループ Bot (Webhook)、カスタムアプリ (API)、AI Bot 対応 | [ガイド](../channels/wecom/README.ja.md) |
|
||||
| **Feishu (飛書)** | ⭐⭐⭐ やや難 | エンタープライズコラボレーション、機能豊富 | [ドキュメント](../channels/feishu/README.ja.md) |
|
||||
| **OneBot** | ⭐⭐ 中程度 | NapCat/Go-CQHTTP 互換、コミュニティエコシステム充実 | [ドキュメント](../channels/onebot/README.ja.md) |
|
||||
@@ -68,111 +64,6 @@ Telegram 側はコマンドメニュー登録機能を保持し、汎用コマ
|
||||
|
||||
</details>
|
||||
|
||||
<a id="discord"></a>
|
||||
<details>
|
||||
<summary><b>Discord</b></summary>
|
||||
|
||||
**1. Bot を作成**
|
||||
|
||||
* <https://discord.com/developers/applications> にアクセス
|
||||
* アプリケーションを作成 → Bot → Bot を追加
|
||||
* Bot Token をコピー
|
||||
|
||||
**2. Intents を有効化**
|
||||
|
||||
* Bot 設定で **MESSAGE CONTENT INTENT** を有効化
|
||||
* (オプション)メンバーデータに基づくホワイトリストが必要な場合は **SERVER MEMBERS INTENT** を有効化
|
||||
|
||||
**3. User ID を取得**
|
||||
|
||||
* Discord 設定 → 詳細設定 → **開発者モード** を有効化
|
||||
* アバターを右クリック → **ユーザー ID をコピー**
|
||||
|
||||
**4. 設定**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**5. Bot を招待**
|
||||
|
||||
* OAuth2 → URL Generator
|
||||
* Scopes: `bot`
|
||||
* Bot Permissions: `Send Messages`, `Read Message History`
|
||||
* 生成された招待リンクを開き、Bot をサーバーに追加
|
||||
|
||||
**オプション:グループトリガーモード**
|
||||
|
||||
デフォルトでは Bot はサーバーチャネル内のすべてのメッセージに応答します。@メンション時のみ応答するには:
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "mention_only": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
キーワードプレフィックスでトリガーすることもできます(例: `!bot`):
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "prefixes": ["!bot"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**6. 実行**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<a id="whatsapp"></a>
|
||||
<details>
|
||||
<summary><b>WhatsApp</b>(ネイティブ whatsmeow)</summary>
|
||||
|
||||
PicoClaw は 2 つの WhatsApp 接続方式をサポートしています:
|
||||
|
||||
- **ネイティブ(推奨):** プロセス内で [whatsmeow](https://github.com/tulir/whatsmeow) を使用。独立した Bridge は不要です。`"use_native": true` に設定し、`bridge_url` を空にします。初回実行時に WhatsApp で QR コードをスキャン(リンクデバイス)。セッションはワークスペース配下(例: `workspace/whatsapp/`)に保存されます。ネイティブチャネルは**オプション**ビルドで、`-tags whatsapp_native` でコンパイルします(例: `make build-whatsapp-native` または `go build -tags whatsapp_native ./cmd/...`)。
|
||||
- **Bridge:** 外部 WebSocket Bridge に接続。`bridge_url`(例: `ws://localhost:3001`)を設定し、`use_native` を false のままにします。
|
||||
|
||||
**設定(ネイティブ)**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"whatsapp": {
|
||||
"enabled": true,
|
||||
"type": "whatsapp",
|
||||
"use_native": true,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`session_store_path` が空の場合、セッションは `<workspace>/whatsapp/` に保存されます。`picoclaw gateway` を実行し、初回実行時にターミナルに表示される QR コードをスキャンしてください(WhatsApp → リンクデバイス)。
|
||||
|
||||
</details>
|
||||
|
||||
<a id="weixin"></a>
|
||||
<details>
|
||||
<summary><b>微信 (Weixin)</b></summary>
|
||||
@@ -289,56 +180,6 @@ picoclaw gateway
|
||||
|
||||
</details>
|
||||
|
||||
<a id="line"></a>
|
||||
<details>
|
||||
<summary><b>LINE</b></summary>
|
||||
|
||||
**1. LINE 公式アカウントを作成**
|
||||
|
||||
- [LINE Developers Console](https://developers.line.biz/) にアクセス
|
||||
- Provider を作成 → Messaging API チャネルを作成
|
||||
- **Channel Secret** と **Channel Access Token** をコピー
|
||||
|
||||
**2. 設定**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> LINE Webhook は共有 Gateway サーバー(`gateway.host`:`gateway.port`、デフォルト `127.0.0.1:18790`)上で提供されます。
|
||||
|
||||
**3. Webhook URL を設定**
|
||||
|
||||
LINE は HTTPS Webhook が必要です。リバースプロキシまたはトンネルを使用してください:
|
||||
|
||||
```bash
|
||||
# 例:ngrok を使用(Gateway デフォルトポートは 18790)
|
||||
ngrok http 18790
|
||||
```
|
||||
|
||||
LINE Developers Console で Webhook URL を `https://your-domain/webhook/line` に設定し、**Use webhook** を有効にしてください。
|
||||
|
||||
**4. 実行**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
> グループチャットでは、Bot は @メンション時のみ応答します。返信は元のメッセージを引用します。
|
||||
|
||||
</details>
|
||||
|
||||
<a id="feishu"></a>
|
||||
<details>
|
||||
<summary><b>Feishu (飛書)</b></summary>
|
||||
@@ -419,7 +260,6 @@ PicoClaw は 3 種類の WeCom 統合をサポートしています:
|
||||
}
|
||||
```
|
||||
|
||||
> WeCom Webhook は共有 Gateway サーバー(`gateway.host`:`gateway.port`、デフォルト `127.0.0.1:18790`)上で提供されます。
|
||||
|
||||
**クイックセットアップ — カスタムアプリ:**
|
||||
|
||||
|
||||
+1
-158
@@ -4,19 +4,16 @@
|
||||
|
||||
## 💬 Chat Apps
|
||||
|
||||
Talk to your picoclaw through Telegram, Discord, WhatsApp, QQ, DingTalk, LINE, WeCom, Feishu, OneBot, MQTT
|
||||
Talk to your picoclaw through Telegram, QQ, DingTalk, WeCom, Feishu, OneBot, MQTT
|
||||
|
||||
> **Note**: Channels that rely on HTTP callbacks share a single Gateway HTTP server (`gateway.host`:`gateway.port`, default `127.0.0.1:18790`). Socket/stream-based channels such as Feishu, DingTalk, and WeCom do not rely on the shared webhook server for inbound delivery.
|
||||
|
||||
| Channel | Difficulty | Description | Documentation |
|
||||
| -------------------- | ------------------ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| **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](#weixin) |
|
||||
| **QQ** | ⭐⭐ Medium | Official bot API, Chinese community | [Docs](../channels/qq/README.md) |
|
||||
| **DingTalk** | ⭐⭐ Medium | Stream mode (no public IP needed), enterprise | [Docs](../channels/dingtalk/README.md) |
|
||||
| **LINE** | ⭐⭐⭐ Advanced | HTTPS Webhook required | [Docs](../channels/line/README.md) |
|
||||
| **WeCom (企业微信)** | ⭐⭐⭐ Advanced | Official AI Bot over WebSocket, streaming + media | [Docs](../channels/wecom/README.md) |
|
||||
| **Feishu (飞书)** | ⭐⭐⭐ Advanced | Enterprise collaboration, feature-rich | [Docs](../channels/feishu/README.md) |
|
||||
| **OneBot** | ⭐⭐ Medium | NapCat/Go-CQHTTP compatible, community ecosystem | [Docs](../channels/onebot/README.md) |
|
||||
@@ -78,110 +75,6 @@ You can set use_markdown_v2: true to enable enhanced formatting options. This al
|
||||
|
||||
</details>
|
||||
|
||||
<a id="discord"></a>
|
||||
<details>
|
||||
<summary><b>Discord</b></summary>
|
||||
|
||||
**1. Create a bot**
|
||||
|
||||
* Go to <https://discord.com/developers/applications>
|
||||
* Create an application → Bot → Add Bot
|
||||
* Copy the bot token
|
||||
|
||||
**2. Enable intents**
|
||||
|
||||
* In the Bot settings, enable **MESSAGE CONTENT INTENT**
|
||||
* (Optional) Enable **SERVER MEMBERS INTENT** if you plan to use allow lists based on member data
|
||||
|
||||
**3. Get your User ID**
|
||||
* Discord Settings → Advanced → enable **Developer Mode**
|
||||
* Right-click your avatar → **Copy User ID**
|
||||
|
||||
**4. Configure**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**5. Invite the bot**
|
||||
|
||||
* OAuth2 → URL Generator
|
||||
* Scopes: `bot`
|
||||
* Bot Permissions: `Send Messages`, `Read Message History`
|
||||
* Open the generated invite URL and add the bot to your server
|
||||
|
||||
**Optional: Group trigger mode**
|
||||
|
||||
By default the bot responds to all messages in a server channel. To restrict responses to @-mentions only, add:
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "mention_only": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can also trigger by keyword prefixes (e.g. `!bot`):
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "prefixes": ["!bot"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**6. Run**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<a id="whatsapp"></a>
|
||||
<details>
|
||||
<summary><b>WhatsApp</b> (native via whatsmeow)</summary>
|
||||
|
||||
PicoClaw can connect to WhatsApp in two ways:
|
||||
|
||||
- **Native (recommended):** In-process using [whatsmeow](https://github.com/tulir/whatsmeow). No separate bridge. Set `"use_native": true` and leave `bridge_url` empty. On first run, scan the QR code with WhatsApp (Linked Devices). Session is stored under your workspace (e.g. `workspace/whatsapp/`). The native channel is **optional** to keep the default binary small; build with `-tags whatsapp_native` (e.g. `make build-whatsapp-native` or `go build -tags whatsapp_native ./cmd/...`).
|
||||
- **Bridge:** Connect to an external WebSocket bridge. Set `bridge_url` (e.g. `ws://localhost:3001`) and keep `use_native` false.
|
||||
|
||||
**Configure (native)**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"whatsapp": {
|
||||
"enabled": true,
|
||||
"type": "whatsapp",
|
||||
"use_native": true,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If `session_store_path` is empty, the session is stored in `<workspace>/whatsapp/`. Run `picoclaw gateway`; on first run, scan the QR code printed in the terminal with WhatsApp → Linked Devices.
|
||||
|
||||
</details>
|
||||
|
||||
<a id="weixin"></a>
|
||||
<details>
|
||||
<summary><b>Weixin</b> (WeChat Personal)</summary>
|
||||
@@ -297,56 +190,6 @@ picoclaw gateway
|
||||
```
|
||||
</details>
|
||||
|
||||
<a id="line"></a>
|
||||
<details>
|
||||
<summary><b>LINE</b></summary>
|
||||
|
||||
**1. Create a LINE Official Account**
|
||||
|
||||
- Go to [LINE Developers Console](https://developers.line.biz/)
|
||||
- Create a provider → Create a Messaging API channel
|
||||
- Copy **Channel Secret** and **Channel Access Token**
|
||||
|
||||
**2. Configure**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> LINE webhook is served on the shared Gateway server (`gateway.host`:`gateway.port`, default `127.0.0.1:18790`).
|
||||
|
||||
**3. Set up Webhook URL**
|
||||
|
||||
LINE requires HTTPS for webhooks. Use a reverse proxy or tunnel:
|
||||
|
||||
```bash
|
||||
# Example with ngrok (gateway default port is 18790)
|
||||
ngrok http 18790
|
||||
```
|
||||
|
||||
Then set the Webhook URL in LINE Developers Console to `https://your-domain/webhook/line` and enable **Use webhook**.
|
||||
|
||||
**4. Run**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
> In group chats, the bot responds only when @mentioned. Replies quote the original message.
|
||||
|
||||
</details>
|
||||
|
||||
<a id="wecom"></a>
|
||||
<details>
|
||||
<summary><b>WeCom (企业微信)</b></summary>
|
||||
|
||||
+1
-157
@@ -4,18 +4,14 @@
|
||||
|
||||
## 💬 Aplikasi Sembang
|
||||
|
||||
Berbual dengan picoclaw anda melalui Telegram, Discord, WhatsApp, QQ, DingTalk, LINE, WeCom, Feishu, OneBot, MQTT
|
||||
Berbual dengan picoclaw anda melalui Telegram, QQ, DingTalk, WeCom, Feishu, OneBot, MQTT
|
||||
|
||||
> **Nota**: Semua saluran berasaskan webhook (LINE, WeCom, dan sebagainya) diservis pada satu pelayan HTTP Gateway yang dikongsi (`gateway.host`:`gateway.port`, lalai `127.0.0.1:18790`). Tiada port khusus per saluran untuk dikonfigurasikan. Nota: Feishu menggunakan mod WebSocket/SDK dan tidak menggunakan pelayan HTTP webhook yang dikongsi.
|
||||
|
||||
| Saluran | Penyediaan |
|
||||
| ---------------- | ------------------------------------------ |
|
||||
| **Telegram** | Mudah (hanya token) |
|
||||
| **Discord** | Mudah (token bot + intents) |
|
||||
| **WhatsApp** | Mudah (asli: imbas QR; atau bridge URL) |
|
||||
| **QQ** | Mudah (AppID + AppSecret) |
|
||||
| **DingTalk** | Sederhana (kelayakan aplikasi) |
|
||||
| **LINE** | Sederhana (kelayakan + webhook URL) |
|
||||
| **WeCom AI Bot** | Sederhana (Token + kunci AES) |
|
||||
| **Feishu** | Sederhana (App ID + Secret, mod WebSocket) |
|
||||
| **OneBot** | Sederhana (QQ melalui protokol OneBot) |
|
||||
@@ -74,108 +70,6 @@ Anda boleh menetapkan `use_markdown_v2: true` untuk mengaktifkan pilihan pemform
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Discord</b></summary>
|
||||
|
||||
**1. Cipta bot**
|
||||
|
||||
* Pergi ke <https://discord.com/developers/applications>
|
||||
* Cipta aplikasi → Bot → Add Bot
|
||||
* Salin token bot
|
||||
|
||||
**2. Aktifkan intents**
|
||||
|
||||
* Dalam tetapan Bot, aktifkan **MESSAGE CONTENT INTENT**
|
||||
* (Pilihan) Aktifkan **SERVER MEMBERS INTENT** jika anda bercadang menggunakan allow list berasaskan data ahli
|
||||
|
||||
**3. Dapatkan User ID anda**
|
||||
* Discord Settings → Advanced → aktifkan **Developer Mode**
|
||||
* Klik kanan avatar anda → **Copy User ID**
|
||||
|
||||
**4. Konfigurasi**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**5. Jemput bot**
|
||||
|
||||
* OAuth2 → URL Generator
|
||||
* Scopes: `bot`
|
||||
* Bot Permissions: `Send Messages`, `Read Message History`
|
||||
* Buka URL jemputan yang dijana dan tambahkan bot ke pelayan anda
|
||||
|
||||
**Pilihan: Mod trigger kumpulan**
|
||||
|
||||
Secara lalai bot membalas semua mesej dalam saluran pelayan. Untuk mengehadkan balasan kepada @mention sahaja, tambah:
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "mention_only": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Anda juga boleh mencetuskan dengan awalan kata kunci (contohnya `!bot`):
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "prefixes": ["!bot"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**6. Jalankan**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>WhatsApp</b> (asli melalui whatsmeow)</summary>
|
||||
|
||||
PicoClaw boleh menyambung ke WhatsApp dalam dua cara:
|
||||
|
||||
- **Asli (disyorkan):** Dalam proses menggunakan [whatsmeow](https://github.com/tulir/whatsmeow). Tiada bridge berasingan. Tetapkan `"use_native": true` dan biarkan `bridge_url` kosong. Pada larian pertama, imbas kod QR dengan WhatsApp (Linked Devices). Sesi disimpan di bawah workspace anda (contohnya `workspace/whatsapp/`). Saluran asli ini adalah **pilihan** untuk memastikan binari lalai kekal kecil; bina dengan `-tags whatsapp_native` (contohnya `make build-whatsapp-native` atau `go build -tags whatsapp_native ./cmd/...`).
|
||||
- **Bridge:** Sambung ke bridge WebSocket luaran. Tetapkan `bridge_url` (contohnya `ws://localhost:3001`) dan biarkan `use_native` sebagai false.
|
||||
|
||||
**Konfigurasi (asli)**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"whatsapp": {
|
||||
"enabled": true,
|
||||
"type": "whatsapp",
|
||||
"use_native": true,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Jika `session_store_path` kosong, sesi akan disimpan dalam `<workspace>/whatsapp/`. Jalankan `picoclaw gateway`; pada larian pertama, imbas kod QR yang dipaparkan dalam terminal menggunakan WhatsApp → Linked Devices.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>QQ</b></summary>
|
||||
|
||||
@@ -244,55 +138,6 @@ picoclaw gateway
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>LINE</b></summary>
|
||||
|
||||
**1. Cipta Akaun Rasmi LINE**
|
||||
|
||||
- Pergi ke [LINE Developers Console](https://developers.line.biz/)
|
||||
- Cipta provider → Cipta saluran Messaging API
|
||||
- Salin **Channel Secret** dan **Channel Access Token**
|
||||
|
||||
**2. Konfigurasi**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> Webhook LINE diservis pada pelayan Gateway yang dikongsi (`gateway.host`:`gateway.port`, lalai `127.0.0.1:18790`).
|
||||
|
||||
**3. Tetapkan Webhook URL**
|
||||
|
||||
LINE memerlukan HTTPS untuk webhook. Gunakan reverse proxy atau tunnel:
|
||||
|
||||
```bash
|
||||
# Contoh dengan ngrok (port lalai gateway ialah 18790)
|
||||
ngrok http 18790
|
||||
```
|
||||
|
||||
Kemudian tetapkan Webhook URL dalam LINE Developers Console kepada `https://your-domain/webhook/line` dan aktifkan **Use webhook**.
|
||||
|
||||
**4. Jalankan**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
> Dalam sembang kumpulan, bot hanya membalas apabila @disebut. Balasan akan memetik mesej asal.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>WeCom (企业微信)</b></summary>
|
||||
|
||||
@@ -329,7 +174,6 @@ Lihat [Panduan Konfigurasi WeCom](../channels/wecom/README.zh.md) untuk arahan p
|
||||
}
|
||||
```
|
||||
|
||||
> Webhook WeCom diservis pada pelayan Gateway yang dikongsi (`gateway.host`:`gateway.port`, lalai `127.0.0.1:18790`).
|
||||
|
||||
**Quick Setup - WeCom App:**
|
||||
|
||||
|
||||
@@ -4,19 +4,15 @@
|
||||
|
||||
## 💬 Aplicativos de Chat
|
||||
|
||||
Converse com seu picoclaw através do Telegram, Discord, WhatsApp, QQ, DingTalk, LINE, WeCom, Feishu, OneBot, MQTT
|
||||
Converse com seu picoclaw através do Telegram, QQ, DingTalk, WeCom, Feishu, OneBot, MQTT
|
||||
|
||||
> **Nota**: Todos os canais baseados em webhook (LINE, WeCom, etc.) são servidos em um único servidor HTTP Gateway compartilhado (`gateway.host`:`gateway.port`, padrão `127.0.0.1:18790`). Não há portas por canal para configurar. Nota: Feishu usa o modo WebSocket/SDK e não utiliza o servidor HTTP webhook compartilhado.
|
||||
|
||||
| Canal | Dificuldade | Descrição | Documentação |
|
||||
| -------------------- | ------------------ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| **Telegram** | ⭐ Fácil | Recomendado, voz para texto, long polling (sem IP público) | [Documentação](../channels/telegram/README.pt-br.md) |
|
||||
| **Discord** | ⭐ Fácil | Socket Mode, suporte a grupos/DM, ecossistema bot rico | [Documentação](../channels/discord/README.pt-br.md) |
|
||||
| **WhatsApp** | ⭐ Fácil | Nativo (scan QR) ou Bridge URL | [Documentação](#whatsapp) |
|
||||
| **Weixin** | ⭐ Fácil | Scan QR nativo (API Tencent iLink) | [Documentação](#weixin) |
|
||||
| **QQ** | ⭐⭐ Médio | API bot oficial, comunidade chinesa | [Documentação](../channels/qq/README.pt-br.md) |
|
||||
| **DingTalk** | ⭐⭐ Médio | Modo Stream (sem IP público), empresarial | [Documentação](../channels/dingtalk/README.pt-br.md) |
|
||||
| **LINE** | ⭐⭐⭐ Avançado | HTTPS Webhook obrigatório | [Documentação](../channels/line/README.pt-br.md) |
|
||||
| **WeCom (企业微信)** | ⭐⭐⭐ Avançado | Bot de grupo (Webhook), app personalizado (API), AI Bot | [Guia](../channels/wecom/README.pt-br.md) |
|
||||
| **Feishu (飞书)** | ⭐⭐⭐ Avançado | Colaboração empresarial, rico em recursos | [Documentação](../channels/feishu/README.pt-br.md) |
|
||||
| **OneBot** | ⭐⭐ Médio | Compatível com NapCat/Go-CQHTTP, ecossistema comunitário | [Documentação](../channels/onebot/README.pt-br.md) |
|
||||
@@ -72,110 +68,6 @@ Voce tambem pode gerenciar skills instaladas diretamente pelo Telegram:
|
||||
|
||||
</details>
|
||||
|
||||
<a id="discord"></a>
|
||||
<details>
|
||||
<summary><b>Discord</b></summary>
|
||||
|
||||
**1. Criar um bot**
|
||||
|
||||
* Acesse <https://discord.com/developers/applications>
|
||||
* Crie um aplicativo → Bot → Add Bot
|
||||
* Copie o token do bot
|
||||
|
||||
**2. Habilitar intents**
|
||||
|
||||
* Nas configurações do Bot, habilite **MESSAGE CONTENT INTENT**
|
||||
* (Opcional) Habilite **SERVER MEMBERS INTENT** se planeja usar listas de permissão baseadas em dados de membros
|
||||
|
||||
**3. Obter seu User ID**
|
||||
* Configurações do Discord → Avançado → habilite **Developer Mode**
|
||||
* Clique com o botão direito no seu avatar → **Copy User ID**
|
||||
|
||||
**4. Configurar**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**5. Convidar o bot**
|
||||
|
||||
* OAuth2 → URL Generator
|
||||
* Scopes: `bot`
|
||||
* Bot Permissions: `Send Messages`, `Read Message History`
|
||||
* Abra a URL de convite gerada e adicione o bot ao seu servidor
|
||||
|
||||
**Opcional: Modo de ativação em grupo**
|
||||
|
||||
Por padrão, o bot responde a todas as mensagens em um canal do servidor. Para restringir respostas apenas a @menções, adicione:
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "mention_only": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Você também pode ativar por prefixos de palavras-chave (ex.: `!bot`):
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "prefixes": ["!bot"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**6. Executar**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<a id="whatsapp"></a>
|
||||
<details>
|
||||
<summary><b>WhatsApp</b> (nativo via whatsmeow)</summary>
|
||||
|
||||
O PicoClaw pode se conectar ao WhatsApp de duas formas:
|
||||
|
||||
- **Nativo (recomendado):** In-process usando [whatsmeow](https://github.com/tulir/whatsmeow). Sem bridge separado. Defina `"use_native": true` e deixe `bridge_url` vazio. Na primeira execução, escaneie o QR code com o WhatsApp (Dispositivos Vinculados). A sessão é armazenada no seu workspace (ex.: `workspace/whatsapp/`). O canal nativo é **opcional** para manter o binário padrão pequeno; compile com `-tags whatsapp_native` (ex.: `make build-whatsapp-native` ou `go build -tags whatsapp_native ./cmd/...`).
|
||||
- **Bridge:** Conecte-se a um bridge WebSocket externo. Defina `bridge_url` (ex.: `ws://localhost:3001`) e mantenha `use_native` como false.
|
||||
|
||||
**Configurar (nativo)**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"whatsapp": {
|
||||
"enabled": true,
|
||||
"type": "whatsapp",
|
||||
"use_native": true,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Se `session_store_path` estiver vazio, a sessão é armazenada em `<workspace>/whatsapp/`. Execute `picoclaw gateway`; na primeira execução, escaneie o QR code impresso no terminal com WhatsApp → Dispositivos Vinculados.
|
||||
|
||||
</details>
|
||||
|
||||
<a id="weixin"></a>
|
||||
<details>
|
||||
<summary><b>Weixin</b> (WeChat Pessoal)</summary>
|
||||
@@ -292,56 +184,6 @@ picoclaw gateway
|
||||
|
||||
</details>
|
||||
|
||||
<a id="line"></a>
|
||||
<details>
|
||||
<summary><b>LINE</b></summary>
|
||||
|
||||
**1. Criar uma Conta Oficial LINE**
|
||||
|
||||
- Acesse o [LINE Developers Console](https://developers.line.biz/)
|
||||
- Crie um provider → Crie um canal Messaging API
|
||||
- Copie o **Channel Secret** e o **Channel Access Token**
|
||||
|
||||
**2. Configurar**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> O webhook do LINE é servido no servidor Gateway compartilhado (`gateway.host`:`gateway.port`, padrão `127.0.0.1:18790`).
|
||||
|
||||
**3. Configurar URL do Webhook**
|
||||
|
||||
O LINE requer HTTPS para webhooks. Use um proxy reverso ou túnel:
|
||||
|
||||
```bash
|
||||
# Exemplo com ngrok (porta padrão do gateway é 18790)
|
||||
ngrok http 18790
|
||||
```
|
||||
|
||||
Em seguida, defina a URL do Webhook no LINE Developers Console como `https://your-domain/webhook/line` e habilite **Use webhook**.
|
||||
|
||||
**4. Executar**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
> Em chats de grupo, o bot responde apenas quando @mencionado. As respostas citam a mensagem original.
|
||||
|
||||
</details>
|
||||
|
||||
<a id="wecom"></a>
|
||||
<details>
|
||||
<summary><b>WeCom (企业微信)</b></summary>
|
||||
@@ -379,7 +221,6 @@ Veja o [Guia de Configuração do WeCom](../channels/wecom/README.pt-br.md) para
|
||||
}
|
||||
```
|
||||
|
||||
> O webhook do WeCom é servido no servidor Gateway compartilhado (`gateway.host`:`gateway.port`, padrão `127.0.0.1:18790`).
|
||||
|
||||
**Configuração Rápida - WeCom App:**
|
||||
|
||||
|
||||
+1
-160
@@ -4,19 +4,15 @@
|
||||
|
||||
## 💬 Ứng Dụng Chat
|
||||
|
||||
Trò chuyện với picoclaw của bạn qua Telegram, Discord, WhatsApp, QQ, DingTalk, LINE, WeCom, Feishu, OneBot, MQTT
|
||||
Trò chuyện với picoclaw của bạn qua Telegram, QQ, DingTalk, WeCom, Feishu, OneBot, MQTT
|
||||
|
||||
> **Lưu ý**: Tất cả các kênh dựa trên webhook (LINE, WeCom, v.v.) được phục vụ trên một máy chủ HTTP Gateway chung (`gateway.host`:`gateway.port`, mặc định `127.0.0.1:18790`). Không có port riêng cho từng kênh. Lưu ý: Feishu sử dụng chế độ WebSocket/SDK và không sử dụng máy chủ HTTP webhook chung.
|
||||
|
||||
| Kênh | Độ khó | Mô tả | Tài liệu |
|
||||
| -------------------- | ------------------ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
||||
| **Telegram** | ⭐ Dễ | Khuyến nghị, chuyển giọng nói thành văn bản, long polling (không cần IP công khai) | [Tài liệu](../channels/telegram/README.vi.md) |
|
||||
| **Discord** | ⭐ Dễ | Socket Mode, hỗ trợ nhóm/DM, hệ sinh thái bot phong phú | [Tài liệu](../channels/discord/README.vi.md) |
|
||||
| **WhatsApp** | ⭐ Dễ | Bản địa (quét QR) hoặc Bridge URL | [Tài liệu](#whatsapp) |
|
||||
| **Weixin** | ⭐ Dễ | Quét QR gốc (API Tencent iLink) | [Tài liệu](#weixin) |
|
||||
| **QQ** | ⭐⭐ Trung bình | API bot chính thức, cộng đồng Trung Quốc | [Tài liệu](../channels/qq/README.vi.md) |
|
||||
| **DingTalk** | ⭐⭐ Trung bình | Chế độ Stream (không cần IP công khai), doanh nghiệp | [Tài liệu](../channels/dingtalk/README.vi.md) |
|
||||
| **LINE** | ⭐⭐⭐ Nâng cao | Yêu cầu HTTPS Webhook | [Tài liệu](../channels/line/README.vi.md) |
|
||||
| **WeCom (企业微信)** | ⭐⭐⭐ Nâng cao | Bot nhóm (Webhook), ứng dụng tùy chỉnh (API), AI Bot | [Hướng dẫn](../channels/wecom/README.vi.md) |
|
||||
| **Feishu (飞书)** | ⭐⭐⭐ Nâng cao | Cộng tác doanh nghiệp, nhiều tính năng | [Tài liệu](../channels/feishu/README.vi.md) |
|
||||
| **OneBot** | ⭐⭐ Trung bình | Tương thích NapCat/Go-CQHTTP, hệ sinh thái cộng đồng | [Tài liệu](../channels/onebot/README.vi.md) |
|
||||
@@ -72,110 +68,6 @@ Ban cung co the quan ly skill da cai dat truc tiep tu Telegram:
|
||||
|
||||
</details>
|
||||
|
||||
<a id="discord"></a>
|
||||
<details>
|
||||
<summary><b>Discord</b></summary>
|
||||
|
||||
**1. Tạo bot**
|
||||
|
||||
* Truy cập <https://discord.com/developers/applications>
|
||||
* Tạo ứng dụng → Bot → Add Bot
|
||||
* Sao chép bot token
|
||||
|
||||
**2. Bật intents**
|
||||
|
||||
* Trong cài đặt Bot, bật **MESSAGE CONTENT INTENT**
|
||||
* (Tùy chọn) Bật **SERVER MEMBERS INTENT** nếu bạn muốn sử dụng danh sách cho phép dựa trên dữ liệu thành viên
|
||||
|
||||
**3. Lấy User ID**
|
||||
* Cài đặt Discord → Nâng cao → bật **Developer Mode**
|
||||
* Nhấp chuột phải vào avatar → **Copy User ID**
|
||||
|
||||
**4. Cấu hình**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**5. Mời bot**
|
||||
|
||||
* OAuth2 → URL Generator
|
||||
* Scopes: `bot`
|
||||
* Bot Permissions: `Send Messages`, `Read Message History`
|
||||
* Mở URL mời được tạo và thêm bot vào server của bạn
|
||||
|
||||
**Tùy chọn: Chế độ kích hoạt nhóm**
|
||||
|
||||
Mặc định bot phản hồi tất cả tin nhắn trong kênh server. Để giới hạn phản hồi chỉ khi @mention, thêm:
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "mention_only": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Bạn cũng có thể kích hoạt bằng tiền tố từ khóa (ví dụ: `!bot`):
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "prefixes": ["!bot"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**6. Chạy**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<a id="whatsapp"></a>
|
||||
<details>
|
||||
<summary><b>WhatsApp</b> (native qua whatsmeow)</summary>
|
||||
|
||||
PicoClaw có thể kết nối WhatsApp theo hai cách:
|
||||
|
||||
- **Native (khuyến nghị):** In-process sử dụng [whatsmeow](https://github.com/tulir/whatsmeow). Không cần bridge riêng. Đặt `"use_native": true` và để trống `bridge_url`. Lần chạy đầu tiên, quét mã QR bằng WhatsApp (Thiết bị liên kết). Phiên được lưu trong workspace (ví dụ: `workspace/whatsapp/`). Kênh native là **tùy chọn** để giữ binary mặc định nhỏ; build với `-tags whatsapp_native` (ví dụ: `make build-whatsapp-native` hoặc `go build -tags whatsapp_native ./cmd/...`).
|
||||
- **Bridge:** Kết nối đến bridge WebSocket bên ngoài. Đặt `bridge_url` (ví dụ: `ws://localhost:3001`) và giữ `use_native` là false.
|
||||
|
||||
**Cấu hình (native)**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"whatsapp": {
|
||||
"enabled": true,
|
||||
"type": "whatsapp",
|
||||
"use_native": true,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Nếu `session_store_path` trống, phiên được lưu tại `<workspace>/whatsapp/`. Chạy `picoclaw gateway`; lần chạy đầu tiên, quét mã QR hiển thị trong terminal bằng WhatsApp → Thiết bị liên kết.
|
||||
|
||||
</details>
|
||||
|
||||
<a id="weixin"></a>
|
||||
<details>
|
||||
<summary><b>Weixin</b> (WeChat Cá nhân)</summary>
|
||||
@@ -292,56 +184,6 @@ picoclaw gateway
|
||||
|
||||
</details>
|
||||
|
||||
<a id="line"></a>
|
||||
<details>
|
||||
<summary><b>LINE</b></summary>
|
||||
|
||||
**1. Tạo Tài Khoản LINE Official**
|
||||
|
||||
- Truy cập [LINE Developers Console](https://developers.line.biz/)
|
||||
- Tạo provider → Tạo kênh Messaging API
|
||||
- Sao chép **Channel Secret** và **Channel Access Token**
|
||||
|
||||
**2. Cấu hình**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> Webhook LINE được phục vụ trên máy chủ Gateway chung (`gateway.host`:`gateway.port`, mặc định `127.0.0.1:18790`).
|
||||
|
||||
**3. Thiết lập Webhook URL**
|
||||
|
||||
LINE yêu cầu HTTPS cho webhook. Sử dụng reverse proxy hoặc tunnel:
|
||||
|
||||
```bash
|
||||
# Ví dụ với ngrok (port mặc định gateway là 18790)
|
||||
ngrok http 18790
|
||||
```
|
||||
|
||||
Sau đó đặt Webhook URL trong LINE Developers Console thành `https://your-domain/webhook/line` và bật **Use webhook**.
|
||||
|
||||
**4. Chạy**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
> Trong chat nhóm, bot chỉ phản hồi khi được @mention. Phản hồi trích dẫn tin nhắn gốc.
|
||||
|
||||
</details>
|
||||
|
||||
<a id="wecom"></a>
|
||||
<details>
|
||||
<summary><b>WeCom (企业微信)</b></summary>
|
||||
@@ -379,7 +221,6 @@ Xem [Hướng Dẫn Cấu Hình WeCom](../channels/wecom/README.vi.md) để bi
|
||||
}
|
||||
```
|
||||
|
||||
> Webhook WeCom được phục vụ trên máy chủ Gateway chung (`gateway.host`:`gateway.port`, mặc định `127.0.0.1:18790`).
|
||||
|
||||
**Thiết Lập Nhanh - WeCom App:**
|
||||
|
||||
|
||||
+1
-159
@@ -4,7 +4,7 @@
|
||||
|
||||
## 💬 聊天应用集成 (Chat Apps)
|
||||
|
||||
PicoClaw 支持多种聊天平台,使您的 Agent 能够连接到任何地方,包括 Telegram、Discord、WhatsApp、微信、QQ、钉钉、LINE、企业微信、飞书、OneBot、MQTT 等。
|
||||
PicoClaw 支持多种聊天平台,使您的 Agent 能够连接到任何地方,包括 Telegram、微信、QQ、钉钉、企业微信、飞书、OneBot、MQTT 等。
|
||||
|
||||
> **注意**: 依赖 HTTP 回调的渠道共用同一个 Gateway HTTP 服务器(`gateway.host`:`gateway.port`,默认 `127.0.0.1:18790`),无需为每个渠道单独配置端口。飞书、钉钉、企业微信这类 Socket/Stream 模式渠道不依赖共享 webhook 服务器来接收入站消息。
|
||||
|
||||
@@ -13,12 +13,9 @@ 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) | [查看文档](#weixin) |
|
||||
| **QQ** | ⭐⭐ 中等 | 官方机器人 API,适合国内社群 | [查看文档](../channels/qq/README.zh.md) |
|
||||
| **钉钉 (DingTalk)** | ⭐⭐ 中等 | Stream 模式无需公网,企业办公首选 | [查看文档](../channels/dingtalk/README.zh.md) |
|
||||
| **LINE** | ⭐⭐⭐ 较难 | 需要 HTTPS Webhook | [查看文档](../channels/line/README.zh.md) |
|
||||
| **企业微信 (WeCom)** | ⭐⭐⭐ 较难 | 官方 AI Bot WebSocket 接入,支持流式回复和媒体消息 | [查看文档](../channels/wecom/README.zh.md) |
|
||||
| **飞书 (Feishu)** | ⭐⭐⭐ 较难 | 企业级协作,功能丰富 | [查看文档](../channels/feishu/README.zh.md) |
|
||||
| **OneBot** | ⭐⭐ 中等 | 兼容 NapCat/Go-CQHTTP,社区生态丰富 | [查看文档](../channels/onebot/README.zh.md) |
|
||||
@@ -76,111 +73,6 @@ Telegram 侧保留的是命令菜单注册能力;通用命令的实际执行
|
||||
|
||||
</details>
|
||||
|
||||
<a id="discord"></a>
|
||||
<details>
|
||||
<summary><b>Discord</b></summary>
|
||||
|
||||
**1. 创建 Bot**
|
||||
|
||||
* 前往 <https://discord.com/developers/applications>
|
||||
* 创建应用 → Bot → 添加 Bot
|
||||
* 复制 Bot Token
|
||||
|
||||
**2. 启用 Intents**
|
||||
|
||||
* 在 Bot 设置中启用 **MESSAGE CONTENT INTENT**
|
||||
* (可选)启用 **SERVER MEMBERS INTENT**(如需基于成员数据的白名单)
|
||||
|
||||
**3. 获取 User ID**
|
||||
|
||||
* Discord 设置 → 高级 → 启用 **开发者模式**
|
||||
* 右键点击头像 → **复制用户 ID**
|
||||
|
||||
**4. 配置**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "YOUR_BOT_TOKEN",
|
||||
"allow_from": ["YOUR_USER_ID"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**5. 邀请 Bot**
|
||||
|
||||
* OAuth2 → URL Generator
|
||||
* Scopes: `bot`
|
||||
* Bot Permissions: `Send Messages`, `Read Message History`
|
||||
* 打开生成的邀请链接,将 Bot 添加到服务器
|
||||
|
||||
**可选:群组触发模式**
|
||||
|
||||
默认情况下 Bot 会回复服务器频道中的所有消息。如需仅在 @提及时回复:
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "mention_only": true }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
也可通过关键词前缀触发(如 `!bot`):
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"discord": {
|
||||
"group_trigger": { "prefixes": ["!bot"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**6. 运行**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<a id="whatsapp"></a>
|
||||
<details>
|
||||
<summary><b>WhatsApp</b>(原生 whatsmeow)</summary>
|
||||
|
||||
PicoClaw 支持两种 WhatsApp 连接方式:
|
||||
|
||||
- **原生(推荐):** 进程内使用 [whatsmeow](https://github.com/tulir/whatsmeow),无需独立 Bridge。设置 `"use_native": true` 并留空 `bridge_url`。首次运行时用 WhatsApp 扫描 QR 码(关联设备)。会话存储在工作区下(如 `workspace/whatsapp/`)。原生渠道为**可选**构建,使用 `-tags whatsapp_native` 编译(如 `make build-whatsapp-native` 或 `go build -tags whatsapp_native ./cmd/...`)。
|
||||
- **Bridge:** 连接外部 WebSocket Bridge。设置 `bridge_url`(如 `ws://localhost:3001`),保持 `use_native` 为 false。
|
||||
|
||||
**配置(原生)**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"whatsapp": {
|
||||
"enabled": true,
|
||||
"type": "whatsapp",
|
||||
"use_native": true,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
如果 `session_store_path` 为空,会话存储在 `<workspace>/whatsapp/`。运行 `picoclaw gateway`;首次运行时在终端扫描 QR 码(WhatsApp → 关联设备)。
|
||||
|
||||
</details>
|
||||
|
||||
<a id="weixin"></a>
|
||||
<details>
|
||||
<summary><b>微信 (Weixin)</b></summary>
|
||||
@@ -297,56 +189,6 @@ picoclaw gateway
|
||||
|
||||
</details>
|
||||
|
||||
<a id="line"></a>
|
||||
<details>
|
||||
<summary><b>LINE</b></summary>
|
||||
|
||||
**1. 创建 LINE Official Account**
|
||||
|
||||
- 前往 [LINE Developers Console](https://developers.line.biz/)
|
||||
- 创建 Provider → 创建 Messaging API Channel
|
||||
- 复制 **Channel Secret** 和 **Channel Access Token**
|
||||
|
||||
**2. 配置**
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_list": {
|
||||
"line": {
|
||||
"enabled": true,
|
||||
"type": "line",
|
||||
"channel_secret": "YOUR_CHANNEL_SECRET",
|
||||
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
|
||||
"webhook_path": "/webhook/line",
|
||||
"allow_from": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> LINE Webhook 挂载在共享 Gateway 服务器上(`gateway.host`:`gateway.port`,默认 `127.0.0.1:18790`)。
|
||||
|
||||
**3. 设置 Webhook URL**
|
||||
|
||||
LINE 要求 HTTPS Webhook。使用反向代理或隧道:
|
||||
|
||||
```bash
|
||||
# 示例:使用 ngrok(Gateway 默认端口 18790)
|
||||
ngrok http 18790
|
||||
```
|
||||
|
||||
然后在 LINE Developers Console 中将 Webhook URL 设置为 `https://your-domain/webhook/line` 并启用 **Use webhook**。
|
||||
|
||||
**4. 运行**
|
||||
|
||||
```bash
|
||||
picoclaw gateway
|
||||
```
|
||||
|
||||
> 在群聊中,Bot 仅在被 @提及时回复。回复会引用原始消息。
|
||||
|
||||
</details>
|
||||
|
||||
<a id="feishu"></a>
|
||||
<details>
|
||||
<summary><b>飞书 (Feishu)</b></summary>
|
||||
|
||||
@@ -149,7 +149,7 @@ dammi le ultime news
|
||||
- Les commandes slash génériques sont exécutées via un chemin unique dans `pkg/agent/loop.go` via `commands.Executor`.
|
||||
- Les adaptateurs de canaux ne consomment plus les commandes génériques localement ; ils transmettent le texte entrant au chemin bus/agent. Telegram enregistre toujours automatiquement au démarrage les commandes prises en charge, comme `/start`, `/help`, `/show`, `/list`, `/use` et `/btw`.
|
||||
- Une commande slash inconnue (par exemple `/foo`) passe au traitement LLM normal.
|
||||
- Une commande enregistrée mais non prise en charge sur le canal actuel (par exemple `/show` sur WhatsApp) renvoie une erreur explicite à l'utilisateur et arrête le traitement ultérieur.
|
||||
- Une commande enregistrée mais non prise en charge sur le canal actuel renvoie une erreur explicite à l'utilisateur et arrête le traitement ultérieur.
|
||||
|
||||
### 🔒 Sandbox de Sécurité
|
||||
|
||||
@@ -208,7 +208,7 @@ Même avec `restrict_to_workspace: false`, l'outil `exec` bloque ces commandes d
|
||||
|
||||
| Clé de configuration | Type | Par défaut | Description |
|
||||
|----------------------|------|------------|-------------|
|
||||
| `tools.exec.allow_remote` | bool | `false` | Autoriser l'outil exec depuis les canaux distants (Telegram/Discord etc.) |
|
||||
| `tools.exec.allow_remote` | bool | `false` | Autoriser l'outil exec depuis les canaux distants (Telegram/Feishu etc.) |
|
||||
| `tools.exec.enable_deny_patterns` | bool | `true` | Activer l'interception des commandes dangereuses |
|
||||
| `tools.exec.custom_deny_patterns` | string[] | `[]` | Patterns regex personnalisés à bloquer |
|
||||
| `tools.exec.custom_allow_patterns` | string[] | `[]` | Patterns regex personnalisés à autoriser |
|
||||
|
||||
@@ -116,7 +116,7 @@ export PICOCLAW_BUILTIN_SKILLS=/path/to/skills
|
||||
- I comandi slash generici vengono eseguiti tramite un unico percorso in `pkg/agent/loop.go` via `commands.Executor`.
|
||||
- Gli adattatori dei canali non consumano più localmente i comandi generici; inoltrano il testo in entrata al percorso bus/agent. Telegram registra ancora automaticamente i comandi supportati all'avvio.
|
||||
- Un comando slash sconosciuto (ad esempio `/foo`) viene passato all'elaborazione LLM come se fosse un messaggio dell'utente.
|
||||
- Un comando registrato ma non supportato sul canale corrente (ad esempio `/show` su WhatsApp) restituisce un errore esplicito all'utente e interrompe l'elaborazione.
|
||||
- Un comando registrato ma non supportato sul canale corrente restituisce un errore esplicito all'utente e interrompe l'elaborazione.
|
||||
|
||||
### Allowlist dei Tool per Agent
|
||||
|
||||
@@ -238,7 +238,7 @@ Anche con `restrict_to_workspace: false`, lo strumento `exec` blocca questi coma
|
||||
|
||||
| Chiave di configurazione | Tipo | Predefinito | Descrizione |
|
||||
|--------------------------|------|-------------|-------------|
|
||||
| `tools.exec.allow_remote` | bool | `false` | Consente lo strumento exec da canali remoti (Telegram/Discord ecc.) |
|
||||
| `tools.exec.allow_remote` | bool | `false` | Consente lo strumento exec da canali remoti (Telegram/Feishu ecc.) |
|
||||
| `tools.exec.enable_deny_patterns` | bool | `true` | Abilita l'intercettazione dei comandi pericolosi |
|
||||
| `tools.exec.custom_deny_patterns` | string[] | `[]` | Pattern regex personalizzati da bloccare |
|
||||
| `tools.exec.custom_allow_patterns` | string[] | `[]` | Pattern regex personalizzati da consentire |
|
||||
|
||||
@@ -150,7 +150,7 @@ dammi le ultime news
|
||||
- 汎用スラッシュコマンドは `pkg/agent/loop.go` 内の `commands.Executor` を通じて統一的に実行されます。
|
||||
- チャネルアダプターはローカルで汎用コマンドを消費しなくなりました。受信テキストを bus/agent パスに転送するだけです。Telegram は起動時に `/start`、`/help`、`/show`、`/list`、`/use`、`/btw` などのサポート済みコマンドを自動登録します。
|
||||
- 未登録のスラッシュコマンド(例: `/foo`)は通常の LLM 処理にパススルーされます。
|
||||
- 登録済みだが現在のチャネルでサポートされていないコマンド(例: WhatsApp での `/show`)は、明示的なユーザー向けエラーを返し、以降の処理を停止します。
|
||||
- 登録済みだが現在のチャネルでサポートされていないコマンドは、明示的なユーザー向けエラーを返し、以降の処理を停止します。
|
||||
|
||||
### 🔒 セキュリティサンドボックス
|
||||
|
||||
@@ -209,7 +209,7 @@ PicoClaw はデフォルトでサンドボックス環境で実行されます
|
||||
|
||||
| 設定キー | 型 | デフォルト値 | 説明 |
|
||||
|----------|------|-------------|------|
|
||||
| `tools.exec.allow_remote` | bool | `false` | リモートチャネル(Telegram/Discord など)からの exec ツール実行を許可 |
|
||||
| `tools.exec.allow_remote` | bool | `false` | リモートチャネル(Telegram/Feishu など)からの exec ツール実行を許可 |
|
||||
| `tools.exec.enable_deny_patterns` | bool | `true` | 危険なコマンドのインターセプトを有効化 |
|
||||
| `tools.exec.custom_deny_patterns` | string[] | `[]` | カスタムブロック正規表現パターン |
|
||||
| `tools.exec.custom_allow_patterns` | string[] | `[]` | カスタム許可正規表現パターン |
|
||||
|
||||
@@ -188,7 +188,7 @@ dammi le ultime news
|
||||
- Unknown slash command (for example `/foo`) passes through to normal LLM processing.
|
||||
- `/new` clears the current session's history and summary, like `/clear`. `/new <prompt>` clears them and immediately runs the supplied prompt; subsequent messages continue that fresh conversation. The model, workspace, and system instructions remain active. Spaces, tabs, and newlines can separate the command from its prompt.
|
||||
- If the same session already has a running or queued task, `/new` (with or without a prompt) replies with the current task's name and asks you to retry later. It does not interrupt the task or queue the new prompt. Other sessions can still use `/new`.
|
||||
- Registered but unsupported command on the current channel (for example `/show` on WhatsApp) returns an explicit user-facing error and stops further processing.
|
||||
- Registered but unsupported command on the current channel returns an explicit user-facing error and stops further processing.
|
||||
|
||||
### Session Isolation
|
||||
|
||||
@@ -455,7 +455,7 @@ Use `mode = lines` when:
|
||||
|
||||
| Config Key | Type | Default | Description |
|
||||
|------------|------|---------|-------------|
|
||||
| `tools.exec.allow_remote` | bool | `false` | Allow exec tool from remote channels (Telegram/Discord etc.) |
|
||||
| `tools.exec.allow_remote` | bool | `false` | Allow exec tool from remote channels (Telegram/Feishu etc.) |
|
||||
| `tools.exec.enable_deny_patterns` | bool | `true` | Enable dangerous command interception |
|
||||
| `tools.exec.custom_deny_patterns` | string[] | `[]` | Custom regex patterns to block |
|
||||
| `tools.exec.custom_allow_patterns` | string[] | `[]` | Custom regex patterns to allow |
|
||||
|
||||
@@ -135,7 +135,7 @@ dammi le ultime news
|
||||
- Generic slash command dilaksanakan melalui satu laluan dalam `pkg/agent/loop.go` melalui `commands.Executor`.
|
||||
- Adapter saluran tidak lagi menggunakan generic command secara setempat; ia memajukan teks masuk ke laluan bus/agent. Telegram masih auto-register arahan yang disokong semasa startup seperti `/start`, `/help`, `/show`, `/list`, `/use`, dan `/btw`.
|
||||
- Slash command yang tidak dikenali (contohnya `/foo`) akan diteruskan ke pemprosesan LLM biasa.
|
||||
- Arahan yang didaftarkan tetapi tidak disokong pada saluran semasa (contohnya `/show` di WhatsApp) akan memulangkan ralat yang jelas kepada pengguna dan menghentikan pemprosesan lanjut.
|
||||
- Arahan yang didaftarkan tetapi tidak disokong pada saluran semasa akan memulangkan ralat yang jelas kepada pengguna dan menghentikan pemprosesan lanjut.
|
||||
|
||||
### 🔒 Security Sandbox
|
||||
|
||||
@@ -194,7 +194,7 @@ Walaupun dengan `restrict_to_workspace: false`, tool `exec` menyekat arahan berb
|
||||
|
||||
| Kunci Config | Jenis | Lalai | Penerangan |
|
||||
| ---------------------------------- | -------- | ------- | ------------------------------------------------------------ |
|
||||
| `tools.exec.allow_remote` | bool | `false` | Benarkan tool exec dari saluran jauh (Telegram/Discord dll.) |
|
||||
| `tools.exec.allow_remote` | bool | `false` | Benarkan tool exec dari saluran jauh (Telegram/Feishu dll.) |
|
||||
| `tools.exec.enable_deny_patterns` | bool | `true` | Aktifkan pemintasan arahan berbahaya |
|
||||
| `tools.exec.custom_deny_patterns` | string[] | `[]` | Corak regex tersuai untuk disekat |
|
||||
| `tools.exec.custom_allow_patterns` | string[] | `[]` | Corak regex tersuai untuk dibenarkan |
|
||||
|
||||
@@ -150,7 +150,7 @@ dammi le ultime news
|
||||
- Comandos slash genéricos são executados através de um único caminho em `pkg/agent/loop.go` via `commands.Executor`.
|
||||
- Os adaptadores de canal não consomem mais comandos genéricos localmente; eles encaminham o texto de entrada para o caminho bus/agent. O Telegram ainda registra automaticamente na inicialização comandos suportados como `/start`, `/help`, `/show`, `/list`, `/use` e `/btw`.
|
||||
- Comando slash desconhecido (por exemplo `/foo`) passa para o processamento normal do LLM.
|
||||
- Comando registrado mas não suportado no canal atual (por exemplo `/show` no WhatsApp) retorna um erro explícito ao usuário e interrompe o processamento.
|
||||
- Comando registrado mas não suportado no canal atual retorna um erro explícito ao usuário e interrompe o processamento.
|
||||
|
||||
### 🔒 Sandbox de Segurança
|
||||
|
||||
@@ -209,7 +209,7 @@ Mesmo com `restrict_to_workspace: false`, a ferramenta `exec` bloqueia estes com
|
||||
|
||||
| Config Key | Type | Default | Description |
|
||||
|------------|------|---------|-------------|
|
||||
| `tools.exec.allow_remote` | bool | `false` | Allow exec tool from remote channels (Telegram/Discord etc.) |
|
||||
| `tools.exec.allow_remote` | bool | `false` | Allow exec tool from remote channels (Telegram/Feishu etc.) |
|
||||
| `tools.exec.enable_deny_patterns` | bool | `true` | Enable dangerous command interception |
|
||||
| `tools.exec.custom_deny_patterns` | string[] | `[]` | Custom regex patterns to block |
|
||||
| `tools.exec.custom_allow_patterns` | string[] | `[]` | Custom regex patterns to allow |
|
||||
|
||||
@@ -150,7 +150,7 @@ dammi le ultime news
|
||||
- Lệnh slash chung được thực thi qua một đường dẫn duy nhất trong `pkg/agent/loop.go` qua `commands.Executor`.
|
||||
- Adapter kênh không còn xử lý lệnh chung cục bộ; chúng chuyển tiếp văn bản đầu vào đến đường dẫn bus/agent. Telegram vẫn tự động đăng ký khi khởi động các lệnh được hỗ trợ như `/start`, `/help`, `/show`, `/list`, `/use`, va `/btw`.
|
||||
- Lệnh slash không xác định (ví dụ `/foo`) được chuyển sang xử lý LLM bình thường.
|
||||
- Lệnh đã đăng ký nhưng không được hỗ trợ trên kênh hiện tại (ví dụ `/show` trên WhatsApp) trả về lỗi rõ ràng cho người dùng và dừng xử lý tiếp.
|
||||
- Lệnh đã đăng ký nhưng không được hỗ trợ trên kênh hiện tại trả về lỗi rõ ràng cho người dùng và dừng xử lý tiếp.
|
||||
|
||||
### 🔒 Sandbox Bảo Mật
|
||||
|
||||
@@ -209,7 +209,7 @@ Ngay cả khi `restrict_to_workspace: false`, công cụ `exec` chặn các lệ
|
||||
|
||||
| Config Key | Type | Default | Description |
|
||||
|------------|------|---------|-------------|
|
||||
| `tools.exec.allow_remote` | bool | `false` | Allow exec tool from remote channels (Telegram/Discord etc.) |
|
||||
| `tools.exec.allow_remote` | bool | `false` | Allow exec tool from remote channels (Telegram/Feishu etc.) |
|
||||
| `tools.exec.enable_deny_patterns` | bool | `true` | Enable dangerous command interception |
|
||||
| `tools.exec.custom_deny_patterns` | string[] | `[]` | Custom regex patterns to block |
|
||||
| `tools.exec.custom_allow_patterns` | string[] | `[]` | Custom regex patterns to allow |
|
||||
|
||||
@@ -182,7 +182,7 @@ dammi le ultime news
|
||||
- 未注册的斜杠命令(例如 `/foo`)会透传给 LLM 按普通输入处理。
|
||||
- `/new` 与 `/clear` 一样,清除当前会话的历史和摘要。`/new <prompt>` 会先清除,再立即执行后面的新问题,后续消息继续这段新对话。当前模型、工作区和系统提示保持生效;命令与问题之间可以使用空格、制表符或换行分隔。
|
||||
- 如果同一会话已有正在执行或等待执行的任务,`/new`(包括带新问题的形式)会回复当前任务名称,提示稍后重试;不会打断旧任务,也不会将新问题加入队列。其他会话仍可使用 `/new`。
|
||||
- 已注册但当前 channel 不支持的命令(例如 WhatsApp 上的 `/show`)会返回明确的用户可见错误,并停止后续处理。
|
||||
- 已注册但当前 channel 不支持的命令会返回明确的用户可见错误,并停止后续处理。
|
||||
|
||||
### Session 隔离
|
||||
|
||||
@@ -321,7 +321,7 @@ PicoClaw 默认在沙箱环境中运行。Agent 只能访问配置的工作区
|
||||
|
||||
| 配置键 | 类型 | 默认值 | 描述 |
|
||||
|--------|------|--------|------|
|
||||
| `tools.exec.allow_remote` | bool | `false` | 允许从远程渠道(Telegram/Discord 等)执行 exec 工具 |
|
||||
| `tools.exec.allow_remote` | bool | `false` | 允许从远程渠道(Telegram/Feishu 等)执行 exec 工具 |
|
||||
| `tools.exec.enable_deny_patterns` | bool | `true` | 启用危险命令拦截 |
|
||||
| `tools.exec.custom_deny_patterns` | string[] | `[]` | 自定义阻止的正则表达式模式 |
|
||||
| `tools.exec.custom_allow_patterns` | string[] | `[]` | 自定义允许的正则表达式模式 |
|
||||
|
||||
@@ -373,20 +373,6 @@ picoclaw agent -m "Hello"
|
||||
"token": "123456:ABC...",
|
||||
"allow_from": ["123456789"]
|
||||
},
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "",
|
||||
"allow_from": [""]
|
||||
},
|
||||
"whatsapp": {
|
||||
"enabled": false,
|
||||
"type": "whatsapp",
|
||||
"bridge_url": "ws://localhost:3001",
|
||||
"use_native": false,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
},
|
||||
"feishu": {
|
||||
"enabled": false,
|
||||
"type": "feishu",
|
||||
|
||||
@@ -385,20 +385,6 @@ picoclaw agent -m "こんにちは"
|
||||
"token": "123456:ABC...",
|
||||
"allow_from": ["123456789"]
|
||||
},
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "",
|
||||
"allow_from": [""]
|
||||
},
|
||||
"whatsapp": {
|
||||
"enabled": false,
|
||||
"type": "whatsapp",
|
||||
"bridge_url": "ws://localhost:3001",
|
||||
"use_native": false,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
},
|
||||
"feishu": {
|
||||
"enabled": false,
|
||||
"type": "feishu",
|
||||
|
||||
@@ -609,20 +609,6 @@ picoclaw agent -m "Hello"
|
||||
"token": "123456:ABC...",
|
||||
"allow_from": ["123456789"]
|
||||
},
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "",
|
||||
"allow_from": [""]
|
||||
},
|
||||
"whatsapp": {
|
||||
"enabled": false,
|
||||
"type": "whatsapp",
|
||||
"bridge_url": "ws://localhost:3001",
|
||||
"use_native": false,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
},
|
||||
"feishu": {
|
||||
"enabled": false,
|
||||
"type": "feishu",
|
||||
|
||||
@@ -373,20 +373,6 @@ picoclaw agent -m "Hello"
|
||||
"token": "123456:ABC...",
|
||||
"allow_from": ["123456789"]
|
||||
},
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "",
|
||||
"allow_from": [""]
|
||||
},
|
||||
"whatsapp": {
|
||||
"enabled": false,
|
||||
"type": "whatsapp",
|
||||
"bridge_url": "ws://localhost:3001",
|
||||
"use_native": false,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
},
|
||||
"feishu": {
|
||||
"enabled": false,
|
||||
"type": "feishu",
|
||||
|
||||
@@ -373,20 +373,6 @@ picoclaw agent -m "Hello"
|
||||
"token": "123456:ABC...",
|
||||
"allow_from": ["123456789"]
|
||||
},
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "",
|
||||
"allow_from": [""]
|
||||
},
|
||||
"whatsapp": {
|
||||
"enabled": false,
|
||||
"type": "whatsapp",
|
||||
"bridge_url": "ws://localhost:3001",
|
||||
"use_native": false,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
},
|
||||
"feishu": {
|
||||
"enabled": false,
|
||||
"type": "feishu",
|
||||
|
||||
@@ -503,20 +503,6 @@ picoclaw agent -m "你好"
|
||||
"token": "123456:ABC...",
|
||||
"allow_from": ["123456789"]
|
||||
},
|
||||
"discord": {
|
||||
"enabled": true,
|
||||
"type": "discord",
|
||||
"token": "",
|
||||
"allow_from": [""]
|
||||
},
|
||||
"whatsapp": {
|
||||
"enabled": false,
|
||||
"type": "whatsapp",
|
||||
"bridge_url": "ws://localhost:3001",
|
||||
"use_native": false,
|
||||
"session_store_path": "",
|
||||
"allow_from": []
|
||||
},
|
||||
"feishu": {
|
||||
"enabled": false,
|
||||
"type": "feishu",
|
||||
|
||||
@@ -36,7 +36,7 @@ This guide explains how to configure both for real deployments.
|
||||
}
|
||||
```
|
||||
|
||||
### Route only Discord mentions in one workspace
|
||||
### Route only Feishu mentions in one workspace
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -48,11 +48,11 @@ This guide explains how to configure both for real deployments.
|
||||
"dispatch": {
|
||||
"rules": [
|
||||
{
|
||||
"name": "discord mentions",
|
||||
"name": "feishu mentions",
|
||||
"agent": "support",
|
||||
"when": {
|
||||
"channel": "discord",
|
||||
"space": "guild:t001",
|
||||
"channel": "feishu",
|
||||
"chat": "oc_group001",
|
||||
"mentioned": true
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ If no rule matches, PicoClaw falls back to the default agent.
|
||||
|
||||
| Field | Meaning | Example |
|
||||
| --- | --- | --- |
|
||||
| `channel` | Channel name | `telegram`, `discord`, `feishu` |
|
||||
| `channel` | Channel name | `telegram`, `weixin`, `feishu` |
|
||||
| `account` | Normalized account ID | `default`, `bot2` |
|
||||
| `space` | Workspace, guild, or similar container | `guild:t001`, `guild:123456` |
|
||||
| `chat` | Direct chat, group, or channel | `direct:user123`, `group:-100123`, `channel:c123` |
|
||||
@@ -202,7 +202,7 @@ Example:
|
||||
{
|
||||
"session": {
|
||||
"identity_links": {
|
||||
"john": ["discord:u123", "legacy-user-42"]
|
||||
"john": ["feishu:u123", "legacy-user-42"]
|
||||
}
|
||||
},
|
||||
"agents": {
|
||||
|
||||
@@ -36,7 +36,7 @@ PicoClaw 里用户能直接感知到的“路由”主要有两部分:
|
||||
}
|
||||
```
|
||||
|
||||
### 只处理某个 Discord server 里的 @提及
|
||||
### 只处理某个 Feishu group 里的 @提及
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -48,11 +48,11 @@ PicoClaw 里用户能直接感知到的“路由”主要有两部分:
|
||||
"dispatch": {
|
||||
"rules": [
|
||||
{
|
||||
"name": "discord mentions",
|
||||
"name": "feishu mentions",
|
||||
"agent": "support",
|
||||
"when": {
|
||||
"channel": "discord",
|
||||
"space": "guild:t001",
|
||||
"channel": "feishu",
|
||||
"chat": "oc_group001",
|
||||
"mentioned": true
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ agents.dispatch.rules
|
||||
|
||||
| 字段 | 含义 | 示例 |
|
||||
| --- | --- | --- |
|
||||
| `channel` | Channel 名称 | `telegram`、`discord`、`feishu` |
|
||||
| `channel` | Channel 名称 | `telegram`、`weixin`、`feishu` |
|
||||
| `account` | 归一化后的 account ID | `default`、`bot2` |
|
||||
| `space` | workspace、guild 等上层容器 | `guild:t001`、`guild:123456` |
|
||||
| `chat` | 私聊、群或频道 | `direct:user123`、`group:-100123`、`channel:c123` |
|
||||
@@ -202,7 +202,7 @@ agents.dispatch.rules
|
||||
{
|
||||
"session": {
|
||||
"identity_links": {
|
||||
"john": ["discord:u123", "legacy-user-42"]
|
||||
"john": ["feishu:u123", "legacy-user-42"]
|
||||
}
|
||||
},
|
||||
"agents": {
|
||||
|
||||
@@ -73,8 +73,8 @@ If your channel exposes a `space` value, you can route by workspace or guild ins
|
||||
|
||||
Use this when:
|
||||
|
||||
- a Discord server assistant should share context across channels
|
||||
- a Discord guild assistant should share context across channels
|
||||
- a Feishu group assistant should share context across channels
|
||||
- a Feishu group assistant should share context across channels
|
||||
|
||||
### Split by thread or forum topic
|
||||
|
||||
@@ -212,7 +212,7 @@ Example:
|
||||
"session": {
|
||||
"dimensions": ["chat", "sender"],
|
||||
"identity_links": {
|
||||
"john": ["discord:u123", "u123", "legacy-user-42"]
|
||||
"john": ["feishu:u123", "u123", "legacy-user-42"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ Switch to:
|
||||
}
|
||||
```
|
||||
|
||||
### The same user does not share memory across Discord and Telegram
|
||||
### The same user does not share memory across Feishu and Telegram
|
||||
|
||||
That is expected.
|
||||
PicoClaw still separates sessions by channel even if you use `sender`.
|
||||
|
||||
@@ -73,8 +73,8 @@ Session 数据保存在工作区目录下,通常是:
|
||||
|
||||
适用场景:
|
||||
|
||||
- Discord server 里的 assistant 想跨多个 channel 共享上下文
|
||||
- Discord guild 里的 assistant 想跨多个 channel 共享上下文
|
||||
- Feishu group 里的 assistant 想跨多个 channel 共享上下文
|
||||
- Feishu group 里的 assistant 想跨多个 channel 共享上下文
|
||||
|
||||
### 按线程或论坛 topic 隔离
|
||||
|
||||
@@ -212,7 +212,7 @@ Telegram forum 消息在默认 `chat` 模式下就会保留 topic 隔离。
|
||||
"session": {
|
||||
"dimensions": ["chat", "sender"],
|
||||
"identity_links": {
|
||||
"john": ["discord:u123", "u123", "legacy-user-42"]
|
||||
"john": ["feishu:u123", "u123", "legacy-user-42"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -244,7 +244,7 @@ Telegram forum 消息在默认 `chat` 模式下就会保留 topic 隔离。
|
||||
}
|
||||
```
|
||||
|
||||
### 同一个用户在 Discord 和 Telegram 之间没有共享记忆
|
||||
### 同一个用户在 Feishu 和 Telegram 之间没有共享记忆
|
||||
|
||||
这是当前实现下的预期行为。
|
||||
即使使用了 `sender`,PicoClaw 仍然会按 channel 做基础隔离。
|
||||
|
||||
@@ -365,13 +365,10 @@ Parlez à votre PicoClaw via plus de 17 plateformes de messagerie :
|
||||
| Channel | Configuration | Protocole | Docs |
|
||||
|---------|---------------|-----------|------|
|
||||
| **Telegram** | Facile (token bot) | Long polling | [Guide](../channels/telegram/README.fr.md) |
|
||||
| **Discord** | Facile (token bot + intents) | WebSocket | [Guide](../channels/discord/README.fr.md) |
|
||||
| **WhatsApp** | Facile (scan QR ou URL bridge) | Natif / Bridge | [Guide](../guides/chat-apps.fr.md#whatsapp) |
|
||||
| **Weixin** | Facile (scan QR natif) | iLink API | [Guide](../guides/chat-apps.fr.md#weixin) |
|
||||
| **QQ** | Facile (AppID + AppSecret) | WebSocket | [Guide](../channels/qq/README.fr.md) |
|
||||
| **DingTalk** | Moyen (identifiants client) | Stream | [Guide](../channels/dingtalk/README.fr.md) |
|
||||
| **Feishu / Lark** | Moyen (App ID + Secret) | WebSocket/SDK | [Guide](../channels/feishu/README.fr.md) |
|
||||
| **LINE** | Moyen (identifiants + webhook) | Webhook | [Guide](../channels/line/README.fr.md) |
|
||||
| **WeCom** | Facile (QR login ou manuel) | WebSocket | [Guide](../channels/wecom/README.fr.md) |
|
||||
| **OneBot** | Moyen (URL WebSocket) | OneBot v11 | [Guide](../channels/onebot/README.fr.md) |
|
||||
|
||||
|
||||
@@ -364,13 +364,10 @@ Bicara dengan PicoClaw Anda melalui 17+ platform pesan:
|
||||
| Channel | Pengaturan | Protocol | Dokumentasi |
|
||||
|---------|------------|----------|-------------|
|
||||
| **Telegram** | Mudah (bot token) | Long polling | [Panduan](../channels/telegram/README.md) |
|
||||
| **Discord** | Mudah (bot token + intents) | WebSocket | [Panduan](../channels/discord/README.md) |
|
||||
| **WhatsApp** | Mudah (scan QR atau bridge URL) | Native / Bridge | [Panduan](../guides/chat-apps.md#whatsapp) |
|
||||
| **Weixin** | Mudah (scan QR native) | iLink API | [Panduan](../guides/chat-apps.md#weixin) |
|
||||
| **QQ** | Mudah (AppID + AppSecret) | WebSocket | [Panduan](../channels/qq/README.md) |
|
||||
| **DingTalk** | Sedang (client credentials) | Stream | [Panduan](../channels/dingtalk/README.md) |
|
||||
| **Feishu / Lark** | Sedang (App ID + Secret) | WebSocket/SDK | [Panduan](../channels/feishu/README.md) |
|
||||
| **LINE** | Sedang (credentials + webhook) | Webhook | [Panduan](../channels/line/README.md) |
|
||||
| **WeCom** | Mudah (login QR atau manual) | WebSocket | [Panduan](../channels/wecom/README.md) |
|
||||
| **OneBot** | Sedang (WebSocket URL) | OneBot v11 | [Panduan](../channels/onebot/README.md) |
|
||||
|
||||
|
||||
@@ -364,13 +364,10 @@ Parla con il tuo PicoClaw attraverso 17+ piattaforme di messaggistica:
|
||||
| Channel | Configurazione | Protocollo | Docs |
|
||||
|---------|----------------|------------|------|
|
||||
| **Telegram** | Facile (bot token) | Long polling | [Guida](../channels/telegram/README.md) |
|
||||
| **Discord** | Facile (bot token + intents) | WebSocket | [Guida](../channels/discord/README.md) |
|
||||
| **WhatsApp** | Facile (QR scan o bridge URL) | Nativo / Bridge | [Guida](../guides/chat-apps.md#whatsapp) |
|
||||
| **Weixin** | Facile (scan QR nativo) | iLink API | [Guida](../guides/chat-apps.md#weixin) |
|
||||
| **QQ** | Facile (AppID + AppSecret) | WebSocket | [Guida](../channels/qq/README.md) |
|
||||
| **DingTalk** | Medio (credenziali client) | Stream | [Guida](../channels/dingtalk/README.md) |
|
||||
| **Feishu / Lark** | Medio (App ID + Secret) | WebSocket/SDK | [Guida](../channels/feishu/README.md) |
|
||||
| **LINE** | Medio (credenziali + webhook) | Webhook | [Guida](../channels/line/README.md) |
|
||||
| **WeCom** | Facile (login QR o manuale) | WebSocket | [Guida](../channels/wecom/README.md) |
|
||||
| **OneBot** | Medio (WebSocket URL) | OneBot v11 | [Guida](../channels/onebot/README.md) |
|
||||
|
||||
|
||||
@@ -365,13 +365,10 @@ Provider の完全な設定詳細は [Provider とモデル](../guides/providers
|
||||
| Channel | セットアップ | Protocol | ドキュメント |
|
||||
|---------|------------|----------|------------|
|
||||
| **Telegram** | 簡単(bot トークン) | Long polling | [ガイド](../channels/telegram/README.ja.md) |
|
||||
| **Discord** | 簡単(bot トークン + intents) | WebSocket | [ガイド](../channels/discord/README.ja.md) |
|
||||
| **WhatsApp** | 簡単(QR スキャンまたは bridge URL) | Native / Bridge | [ガイド](../guides/chat-apps.ja.md#whatsapp) |
|
||||
| **微信 (Weixin)** | 簡単(QR スキャン) | iLink API | [ガイド](../guides/chat-apps.ja.md#weixin) |
|
||||
| **QQ** | 簡単(AppID + AppSecret) | WebSocket | [ガイド](../channels/qq/README.ja.md) |
|
||||
| **DingTalk** | 中級(クライアント認証情報) | Stream | [ガイド](../channels/dingtalk/README.ja.md) |
|
||||
| **Feishu / Lark** | 中級(App ID + Secret) | WebSocket/SDK | [ガイド](../channels/feishu/README.ja.md) |
|
||||
| **LINE** | 中級(認証情報 + webhook) | Webhook | [ガイド](../channels/line/README.ja.md) |
|
||||
| **WeCom** | 簡単(QR ログインまたは手動) | WebSocket | [ガイド](../channels/wecom/README.ja.md) |
|
||||
| **OneBot** | 中級(WebSocket URL) | OneBot v11 | [ガイド](../channels/onebot/README.ja.md) |
|
||||
|
||||
|
||||
@@ -367,13 +367,10 @@ PicoClaw는 `model_list` 설정을 통해 30개 이상의 LLM 프로바이더를
|
||||
| 채널 | 설정 | 프로토콜 | 문서 |
|
||||
|---------|------|----------|------|
|
||||
| **Telegram** | 쉬움(봇 토큰) | Long polling | [가이드](../channels/telegram/README.md) |
|
||||
| **Discord** | 쉬움(봇 토큰 + intents) | WebSocket | [가이드](../channels/discord/README.md) |
|
||||
| **WhatsApp** | 쉬움(QR 스캔 또는 브리지 URL) | Native / Bridge | [가이드](../guides/chat-apps.md#whatsapp) |
|
||||
| **Weixin** | 쉬움(네이티브 QR 스캔) | iLink API | [가이드](../guides/chat-apps.md#weixin) |
|
||||
| **QQ** | 쉬움(AppID + AppSecret) | WebSocket | [가이드](../channels/qq/README.md) |
|
||||
| **DingTalk** | 중간(클라이언트 자격 증명) | Stream | [가이드](../channels/dingtalk/README.md) |
|
||||
| **Feishu / Lark** | 중간(App ID + Secret) | WebSocket/SDK | [가이드](../channels/feishu/README.md) |
|
||||
| **LINE** | 중간(인증 정보 + webhook) | Webhook | [가이드](../channels/line/README.md) |
|
||||
| **WeCom** | 쉬움(QR 로그인 또는 수동 설정) | WebSocket | [가이드](../channels/wecom/README.md) |
|
||||
| **OneBot** | 중간(WebSocket URL) | OneBot v11 | [가이드](../channels/onebot/README.md) |
|
||||
|
||||
|
||||
@@ -362,13 +362,10 @@ Bercakap dengan PicoClaw anda melalui 17+ platform pemesejan:
|
||||
| Saluran | Persediaan | Protokol | Dok |
|
||||
|---------|-----------|----------|-----|
|
||||
| **Telegram** | Mudah (token bot) | Long polling | [Panduan](../channels/telegram/README.md) |
|
||||
| **Discord** | Mudah (token bot + intents) | WebSocket | [Panduan](../channels/discord/README.md) |
|
||||
| **WhatsApp** | Mudah (imbas QR atau URL jambatan) | Natif / Jambatan | [Panduan](../guides/chat-apps.ms.md#whatsapp) |
|
||||
| **Weixin** | Mudah (imbas QR natif) | iLink API | [Panduan](../guides/chat-apps.ms.md#weixin) |
|
||||
| **QQ** | Mudah (AppID + AppSecret) | WebSocket | [Panduan](../channels/qq/README.md) |
|
||||
| **DingTalk** | Sederhana (kelayakan klien) | Stream | [Panduan](../channels/dingtalk/README.md) |
|
||||
| **Feishu / Lark** | Sederhana (App ID + Secret) | WebSocket/SDK | [Panduan](../channels/feishu/README.md) |
|
||||
| **LINE** | Sederhana (kelayakan + webhook) | Webhook | [Panduan](../channels/line/README.md) |
|
||||
| **WeCom** | Mudah (log masuk QR atau manual) | WebSocket | [Panduan](../channels/wecom/README.md) |
|
||||
| **OneBot** | Sederhana (URL WebSocket) | OneBot v11 | [Panduan](../channels/onebot/README.md) |
|
||||
|
||||
|
||||
@@ -365,13 +365,10 @@ Converse com seu PicoClaw por meio de mais de 17 plataformas de mensagens:
|
||||
| Channel | Configuração | Protocolo | Docs |
|
||||
|---------|--------------|-----------|------|
|
||||
| **Telegram** | Fácil (bot token) | Long polling | [Guia](../channels/telegram/README.pt-br.md) |
|
||||
| **Discord** | Fácil (bot token + intents) | WebSocket | [Guia](../channels/discord/README.pt-br.md) |
|
||||
| **WhatsApp** | Fácil (QR scan ou bridge URL) | Nativo / Bridge | [Guia](../guides/chat-apps.pt-br.md#whatsapp) |
|
||||
| **Weixin** | Fácil (scan QR nativo) | iLink API | [Guia](../guides/chat-apps.pt-br.md#weixin) |
|
||||
| **QQ** | Fácil (AppID + AppSecret) | WebSocket | [Guia](../channels/qq/README.pt-br.md) |
|
||||
| **DingTalk** | Médio (credenciais do cliente) | Stream | [Guia](../channels/dingtalk/README.pt-br.md) |
|
||||
| **Feishu / Lark** | Médio (App ID + Secret) | WebSocket/SDK | [Guia](../channels/feishu/README.pt-br.md) |
|
||||
| **LINE** | Médio (credenciais + webhook) | Webhook | [Guia](../channels/line/README.pt-br.md) |
|
||||
| **WeCom** | Fácil (login QR ou manual) | WebSocket | [Guia](../channels/wecom/README.pt-br.md) |
|
||||
| **OneBot** | Médio (WebSocket URL) | OneBot v11 | [Guia](../channels/onebot/README.pt-br.md) |
|
||||
|
||||
|
||||
@@ -365,13 +365,10 @@ Trò chuyện với PicoClaw của bạn qua 17+ nền tảng nhắn tin:
|
||||
| Channel | Thiết lập | Protocol | Tài liệu |
|
||||
|---------|-----------|----------|----------|
|
||||
| **Telegram** | Dễ (bot token) | Long polling | [Hướng dẫn](../channels/telegram/README.vi.md) |
|
||||
| **Discord** | Dễ (bot token + intents) | WebSocket | [Hướng dẫn](../channels/discord/README.vi.md) |
|
||||
| **WhatsApp** | Dễ (quét QR hoặc bridge URL) | Native / Bridge | [Hướng dẫn](../guides/chat-apps.vi.md#whatsapp) |
|
||||
| **Weixin** | Dễ (quét QR gốc) | iLink API | [Hướng dẫn](../guides/chat-apps.vi.md#weixin) |
|
||||
| **QQ** | Dễ (AppID + AppSecret) | WebSocket | [Hướng dẫn](../channels/qq/README.vi.md) |
|
||||
| **DingTalk** | Trung bình (client credentials) | Stream | [Hướng dẫn](../channels/dingtalk/README.vi.md) |
|
||||
| **Feishu / Lark** | Trung bình (App ID + Secret) | WebSocket/SDK | [Hướng dẫn](../channels/feishu/README.vi.md) |
|
||||
| **LINE** | Trung bình (credentials + webhook) | Webhook | [Hướng dẫn](../channels/line/README.vi.md) |
|
||||
| **WeCom** | Dễ (đăng nhập QR hoặc thủ công) | WebSocket | [Hướng dẫn](../channels/wecom/README.vi.md) |
|
||||
| **OneBot** | Trung bình (WebSocket URL) | OneBot v11 | [Hướng dẫn](../channels/onebot/README.vi.md) |
|
||||
|
||||
|
||||
@@ -365,13 +365,10 @@ PicoClaw 通过 `model_list` 配置支持 30+ LLM Provider,使用 `协议/模
|
||||
| Channel | 配置难度 | 协议 | 文档 |
|
||||
|---------|----------|------|------|
|
||||
| **Telegram** | 简单(bot token) | 长轮询 | [指南](../channels/telegram/README.zh.md) |
|
||||
| **Discord** | 简单(bot token + intents) | WebSocket | [指南](../channels/discord/README.zh.md) |
|
||||
| **WhatsApp** | 简单(扫码或 bridge URL) | 原生 / Bridge | [指南](../guides/chat-apps.zh.md#whatsapp) |
|
||||
| **微信 (Weixin)** | 简单(扫码登录) | iLink API | [指南](../guides/chat-apps.zh.md#weixin) |
|
||||
| **QQ** | 简单(AppID + AppSecret) | WebSocket | [指南](../channels/qq/README.zh.md) |
|
||||
| **钉钉** | 中等(client credentials) | Stream | [指南](../channels/dingtalk/README.zh.md) |
|
||||
| **飞书 / Lark** | 中等(App ID + Secret) | WebSocket/SDK | [指南](../channels/feishu/README.zh.md) |
|
||||
| **LINE** | 中等(credentials + webhook) | Webhook | [指南](../channels/line/README.zh.md) |
|
||||
| **企业微信** | 简单(扫码登录或手动配置) | WebSocket | [指南](../channels/wecom/README.zh.md) |
|
||||
| **OneBot** | 中等(WebSocket URL) | OneBot v11 | [指南](../channels/onebot/README.zh.md) |
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ PicoClaw uses a schema versioning system for `config.json` to ensure smooth upgr
|
||||
- **Changes**:
|
||||
- Added `enabled` field to `ModelConfig` — allows disabling individual model entries without removing them
|
||||
- During V1→V2 migration, `enabled` is auto-inferred: models with API keys or the reserved `local-model` name are enabled; others default to disabled
|
||||
- Migrated legacy channel fields: Discord `mention_only` → `group_trigger.mention_only`, OneBot `group_trigger_prefix` → `group_trigger.prefixes`
|
||||
- Migrated legacy channel fields: Channel `mention_only` → `group_trigger.mention_only`, OneBot `group_trigger_prefix` → `group_trigger.prefixes`
|
||||
- V0 configs now migrate directly to CurrentVersion (V2) instead of going through V1
|
||||
- `makeBackup()` now uses date-only suffix (e.g., `config.json.20260330.bak`) and also backs up `.security.yml`
|
||||
|
||||
|
||||
@@ -53,17 +53,12 @@ channels:
|
||||
app_secret: "your-feishu-app-secret"
|
||||
encrypt_key: "your-feishu-encrypt-key"
|
||||
verification_token: "your-feishu-verification-token"
|
||||
discord:
|
||||
token: "your-discord-bot-token"
|
||||
weixin:
|
||||
token: "your-weixin-token"
|
||||
qq:
|
||||
app_secret: "your-qq-app-secret"
|
||||
dingtalk:
|
||||
client_secret: "your-dingtalk-client-secret"
|
||||
line:
|
||||
channel_secret: "your-line-channel-secret"
|
||||
channel_access_token: "your-line-channel-access-token"
|
||||
onebot:
|
||||
access_token: "your-onebot-access-token"
|
||||
wecom:
|
||||
@@ -215,8 +210,6 @@ channels:
|
||||
app_secret: "value"
|
||||
encrypt_key: "value"
|
||||
verification_token: "value"
|
||||
discord:
|
||||
token: "value"
|
||||
```
|
||||
|
||||
**Mapping:**
|
||||
|
||||
@@ -11,7 +11,7 @@ When the LLM uses a tool that returns its own credentials (e.g., a tool that ech
|
||||
Sensitive values are collected from [`.security.yml`](./credential_encryption.md) — the centralized storage for all sensitive configuration (API keys, tokens, secrets stored alongside `config.json`). This includes:
|
||||
|
||||
- Model API keys
|
||||
- Channel tokens (Telegram, Discord, etc.)
|
||||
- Channel tokens (Telegram, etc.)
|
||||
- Web tool API keys (Brave, Tavily, Perplexity, etc.)
|
||||
- Skills tokens (GitHub, ClawHub)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ PicoClaw 可以从工具调用结果中过滤敏感值(API 密钥、令牌、
|
||||
敏感值从 `.security.yml` 中收集 —— 这是所有敏感配置的集中存储,包括:
|
||||
|
||||
- 模型 API 密钥
|
||||
- 频道令牌(Telegram、Discord 等)
|
||||
- 频道令牌(Telegram 等)
|
||||
- Web 工具 API 密钥(Brave、Tavily、Perplexity 等)
|
||||
- 技能令牌(GitHub、ClawHub)
|
||||
|
||||
|
||||
Reference in new issue
Block a user