Skip to content

Commit 1ef33c9

Browse files
authored
Merge pull request #474 from swordkee/main
add wecom and wecomApp
2 parents 2fb2a73 + 0f70f78 commit 1ef33c9

File tree

15 files changed

+3808
-7
lines changed

15 files changed

+3808
-7
lines changed

README.fr.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Et voilà ! Vous avez un assistant IA fonctionnel en 2 minutes.
262262

263263
## 💬 Applications de Chat
264264

265-
Discutez avec votre PicoClaw via Telegram, Discord, DingTalk ou LINE
265+
Discutez avec votre PicoClaw via Telegram, Discord, DingTalk, LINE ou WeCom
266266

267267
| Canal | Configuration |
268268
| ------------ | -------------------------------------- |
@@ -271,6 +271,7 @@ Discutez avec votre PicoClaw via Telegram, Discord, DingTalk ou LINE
271271
| **QQ** | Facile (AppID + AppSecret) |
272272
| **DingTalk** | Moyen (identifiants de l'application) |
273273
| **LINE** | Moyen (identifiants + URL de webhook) |
274+
| **WeCom** | Moyen (CorpID + configuration webhook) |
274275

275276
<details>
276277
<summary><b>Telegram</b> (Recommandé)</summary>
@@ -470,6 +471,87 @@ picoclaw gateway
470471
471472
</details>
472473

474+
<details>
475+
<summary><b>WeCom (WeChat Work)</b></summary>
476+
477+
PicoClaw prend en charge deux types d'intégration WeCom :
478+
479+
**Option 1 : WeCom Bot (Robot Intelligent)** - Configuration plus facile, prend en charge les discussions de groupe
480+
**Option 2 : WeCom App (Application Personnalisée)** - Plus de fonctionnalités, messagerie proactive
481+
482+
Voir le [Guide de Configuration WeCom App](docs/wecom-app-configuration.md) pour des instructions détaillées.
483+
484+
**Configuration Rapide - WeCom Bot :**
485+
486+
**1. Créer un bot**
487+
488+
* Accédez à la Console d'Administration WeCom → Discussion de Groupe → Ajouter un Bot de Groupe
489+
* Copiez l'URL du webhook (format : `https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx`)
490+
491+
**2. Configurer**
492+
493+
```json
494+
{
495+
"channels": {
496+
"wecom": {
497+
"enabled": true,
498+
"token": "YOUR_TOKEN",
499+
"encoding_aes_key": "YOUR_ENCODING_AES_KEY",
500+
"webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY",
501+
"webhook_host": "0.0.0.0",
502+
"webhook_port": 18793,
503+
"webhook_path": "/webhook/wecom",
504+
"allow_from": []
505+
}
506+
}
507+
}
508+
```
509+
510+
**Configuration Rapide - WeCom App :**
511+
512+
**1. Créer une application**
513+
514+
* Accédez à la Console d'Administration WeCom → Gestion des Applications → Créer une Application
515+
* Copiez l'**AgentId** et le **Secret**
516+
* Accédez à la page "Mon Entreprise", copiez le **CorpID**
517+
518+
**2. Configurer la réception des messages**
519+
520+
* Dans les détails de l'application, cliquez sur "Recevoir les Messages" → "Configurer l'API"
521+
* Définissez l'URL sur `http://your-server:18792/webhook/wecom-app`
522+
* Générez le **Token** et l'**EncodingAESKey**
523+
524+
**3. Configurer**
525+
526+
```json
527+
{
528+
"channels": {
529+
"wecom_app": {
530+
"enabled": true,
531+
"corp_id": "wwxxxxxxxxxxxxxxxx",
532+
"corp_secret": "YOUR_CORP_SECRET",
533+
"agent_id": 1000002,
534+
"token": "YOUR_TOKEN",
535+
"encoding_aes_key": "YOUR_ENCODING_AES_KEY",
536+
"webhook_host": "0.0.0.0",
537+
"webhook_port": 18792,
538+
"webhook_path": "/webhook/wecom-app",
539+
"allow_from": []
540+
}
541+
}
542+
}
543+
```
544+
545+
**4. Lancer**
546+
547+
```bash
548+
picoclaw gateway
549+
```
550+
551+
> **Note** : WeCom App nécessite l'ouverture du port 18792 pour les callbacks webhook. Utilisez un proxy inverse pour HTTPS en production.
552+
553+
</details>
554+
473555
## <img src="assets/clawdchat-icon.png" width="24" height="24" alt="ClawdChat"> Rejoignez le Réseau Social d'Agents
474556

475557
Connectez PicoClaw au Réseau Social d'Agents simplement en envoyant un seul message via le CLI ou n'importe quelle application de chat intégrée.

README.ja.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ picoclaw agent -m "What is 2+2?"
226226

227227
## 💬 チャットアプリ
228228

229-
Telegram、Discord、QQ、DingTalk、LINE で PicoClaw と会話できます
229+
Telegram、Discord、QQ、DingTalk、LINE、WeCom で PicoClaw と会話できます
230230

231231
| チャネル | セットアップ |
232232
|---------|------------|
@@ -235,6 +235,7 @@ Telegram、Discord、QQ、DingTalk、LINE で PicoClaw と会話できます
235235
| **QQ** | 簡単(AppID + AppSecret) |
236236
| **DingTalk** | 普通(アプリ認証情報) |
237237
| **LINE** | 普通(認証情報 + Webhook URL) |
238+
| **WeCom** | 普通(CorpID + Webhook設定) |
238239

239240
<details>
240241
<summary><b>Telegram</b>(推奨)</summary>
@@ -430,6 +431,87 @@ picoclaw gateway
430431
431432
</details>
432433

434+
<details>
435+
<summary><b>WeCom (企業微信)</b></summary>
436+
437+
PicoClaw は2種類の WeCom 統合をサポートしています:
438+
439+
**オプション1: WeCom Bot (智能ロボット)** - 簡単な設定、グループチャット対応
440+
**オプション2: WeCom App (自作アプリ)** - より多機能、アクティブメッセージング対応
441+
442+
詳細な設定手順は [WeCom App Configuration Guide](docs/wecom-app-configuration.md) を参照してください。
443+
444+
**クイックセットアップ - WeCom Bot:**
445+
446+
**1. ボットを作成**
447+
448+
* WeCom 管理コンソール → グループチャット → グループボットを追加
449+
* Webhook URL をコピー(形式: `https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx`
450+
451+
**2. 設定**
452+
453+
```json
454+
{
455+
"channels": {
456+
"wecom": {
457+
"enabled": true,
458+
"token": "YOUR_TOKEN",
459+
"encoding_aes_key": "YOUR_ENCODING_AES_KEY",
460+
"webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY",
461+
"webhook_host": "0.0.0.0",
462+
"webhook_port": 18793,
463+
"webhook_path": "/webhook/wecom",
464+
"allow_from": []
465+
}
466+
}
467+
}
468+
```
469+
470+
**クイックセットアップ - WeCom App:**
471+
472+
**1. アプリを作成**
473+
474+
* WeCom 管理コンソール → アプリ管理 → アプリを作成
475+
* **AgentId****Secret** をコピー
476+
* "マイ会社" ページで **CorpID** をコピー
477+
478+
**2. メッセージ受信を設定**
479+
480+
* アプリ詳細で "メッセージを受信" → "APIを設定" をクリック
481+
* URL を `http://your-server:18792/webhook/wecom-app` に設定
482+
* **Token****EncodingAESKey** を生成
483+
484+
**3. 設定**
485+
486+
```json
487+
{
488+
"channels": {
489+
"wecom_app": {
490+
"enabled": true,
491+
"corp_id": "wwxxxxxxxxxxxxxxxx",
492+
"corp_secret": "YOUR_CORP_SECRET",
493+
"agent_id": 1000002,
494+
"token": "YOUR_TOKEN",
495+
"encoding_aes_key": "YOUR_ENCODING_AES_KEY",
496+
"webhook_host": "0.0.0.0",
497+
"webhook_port": 18792,
498+
"webhook_path": "/webhook/wecom-app",
499+
"allow_from": []
500+
}
501+
}
502+
}
503+
```
504+
505+
**4. 起動**
506+
507+
```bash
508+
picoclaw gateway
509+
```
510+
511+
> **注意**: WeCom App は Webhook コールバック用にポート 18792 を開放する必要があります。本番環境では HTTPS 用のリバースプロキシを使用してください。
512+
513+
</details>
514+
433515
## ⚙️ 設定
434516

435517
設定ファイル: `~/.picoclaw/config.json`

README.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ That's it! You have a working AI assistant in 2 minutes.
264264

265265
## 💬 Chat Apps
266266

267-
Talk to your picoclaw through Telegram, Discord, DingTalk, or LINE
267+
Talk to your picoclaw through Telegram, Discord, DingTalk, LINE, or WeCom
268268

269269
| Channel | Setup |
270270
| ------------ | ---------------------------------- |
@@ -273,6 +273,7 @@ Talk to your picoclaw through Telegram, Discord, DingTalk, or LINE
273273
| **QQ** | Easy (AppID + AppSecret) |
274274
| **DingTalk** | Medium (app credentials) |
275275
| **LINE** | Medium (credentials + webhook URL) |
276+
| **WeCom** | Medium (CorpID + webhook setup) |
276277

277278
<details>
278279
<summary><b>Telegram</b> (Recommended)</summary>
@@ -477,6 +478,87 @@ picoclaw gateway
477478
478479
</details>
479480

481+
<details>
482+
<summary><b>WeCom (企业微信)</b></summary>
483+
484+
PicoClaw supports two types of WeCom integration:
485+
486+
**Option 1: WeCom Bot (智能机器人)** - Easier setup, supports group chats
487+
**Option 2: WeCom App (自建应用)** - More features, proactive messaging
488+
489+
See [WeCom App Configuration Guide](docs/wecom-app-configuration.md) for detailed setup instructions.
490+
491+
**Quick Setup - WeCom Bot:**
492+
493+
**1. Create a bot**
494+
495+
* Go to WeCom Admin Console → Group Chat → Add Group Bot
496+
* Copy the webhook URL (format: `https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx`)
497+
498+
**2. Configure**
499+
500+
```json
501+
{
502+
"channels": {
503+
"wecom": {
504+
"enabled": true,
505+
"token": "YOUR_TOKEN",
506+
"encoding_aes_key": "YOUR_ENCODING_AES_KEY",
507+
"webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY",
508+
"webhook_host": "0.0.0.0",
509+
"webhook_port": 18793,
510+
"webhook_path": "/webhook/wecom",
511+
"allow_from": []
512+
}
513+
}
514+
}
515+
```
516+
517+
**Quick Setup - WeCom App:**
518+
519+
**1. Create an app**
520+
521+
* Go to WeCom Admin Console → App Management → Create App
522+
* Copy **AgentId** and **Secret**
523+
* Go to "My Company" page, copy **CorpID**
524+
525+
**2. Configure receive message**
526+
527+
* In App details, click "Receive Message" → "Set API"
528+
* Set URL to `http://your-server:18792/webhook/wecom-app`
529+
* Generate **Token** and **EncodingAESKey**
530+
531+
**3. Configure**
532+
533+
```json
534+
{
535+
"channels": {
536+
"wecom_app": {
537+
"enabled": true,
538+
"corp_id": "wwxxxxxxxxxxxxxxxx",
539+
"corp_secret": "YOUR_CORP_SECRET",
540+
"agent_id": 1000002,
541+
"token": "YOUR_TOKEN",
542+
"encoding_aes_key": "YOUR_ENCODING_AES_KEY",
543+
"webhook_host": "0.0.0.0",
544+
"webhook_port": 18792,
545+
"webhook_path": "/webhook/wecom-app",
546+
"allow_from": []
547+
}
548+
}
549+
}
550+
```
551+
552+
**4. Run**
553+
554+
```bash
555+
picoclaw gateway
556+
```
557+
558+
> **Note**: WeCom App requires opening port 18792 for webhook callbacks. Use a reverse proxy for HTTPS.
559+
560+
</details>
561+
480562
## <img src="assets/clawdchat-icon.png" width="24" height="24" alt="ClawdChat"> Join the Agent Social Network
481563

482564
Connect Picoclaw to the Agent Social Network simply by sending a single message via the CLI or any integrated Chat App.

0 commit comments

Comments
 (0)