refactor(config): make config.Channel to multiple instance support

add new field type to Channel struct
config.channels refactor to channel_list
update config version to 3
update the docs
This commit is contained in:
Cytown
2026-04-12 00:57:26 +08:00
parent 2b2bc26f8e
commit 667fc85d54
185 changed files with 6390 additions and 4181 deletions
+33 -19
View File
@@ -44,9 +44,10 @@ PicoClaw は複数のチャットプラットフォームをサポートして
```json
{
"channels": {
"channel_list": {
"telegram": {
"enabled": true,
"type": "telegram",
"token": "YOUR_BOT_TOKEN",
"allow_from": ["YOUR_USER_ID"]
}
@@ -95,9 +96,10 @@ Telegram 側はコマンドメニュー登録機能を保持し、汎用コマ
```json
{
"channels": {
"channel_list": {
"discord": {
"enabled": true,
"type": "discord",
"token": "YOUR_BOT_TOKEN",
"allow_from": ["YOUR_USER_ID"]
}
@@ -118,7 +120,7 @@ Telegram 側はコマンドメニュー登録機能を保持し、汎用コマ
```json
{
"channels": {
"channel_list": {
"discord": {
"group_trigger": { "mention_only": true }
}
@@ -130,7 +132,7 @@ Telegram 側はコマンドメニュー登録機能を保持し、汎用コマ
```json
{
"channels": {
"channel_list": {
"discord": {
"group_trigger": { "prefixes": ["!bot"] }
}
@@ -159,9 +161,10 @@ PicoClaw は 2 つの WhatsApp 接続方式をサポートしています:
```json
{
"channels": {
"channel_list": {
"whatsapp": {
"enabled": true,
"type": "whatsapp",
"use_native": true,
"session_store_path": "",
"allow_from": []
@@ -193,9 +196,10 @@ WeChat モバイルアプリで表示された QR コードをスキャンして
(オプション)ボットと会話できるユーザーを制限するために `allow_from` に WeChat ユーザー ID を追加します:
```json
{
"channels": {
"channel_list": {
"weixin": {
"enabled": true,
"type": "weixin",
"token": "YOUR_TOKEN",
"allow_from": ["YOUR_USER_ID"]
}
@@ -223,9 +227,10 @@ picoclaw gateway
```json
{
"channels": {
"channel_list": {
"matrix": {
"enabled": true,
"type": "matrix",
"homeserver": "https://matrix.org",
"user_id": "@your-bot:matrix.org",
"access_token": "YOUR_MATRIX_ACCESS_TOKEN",
@@ -259,9 +264,10 @@ QQ 開放プラットフォームでは、OpenClaw 互換ボットのワンク
```json
{
"channels": {
"channel_list": {
"qq": {
"enabled": true,
"type": "qq",
"app_id": "YOUR_APP_ID",
"app_secret": "YOUR_APP_SECRET",
"allow_from": []
@@ -302,9 +308,10 @@ QQ 開放プラットフォームでは、OpenClaw 互換ボットのワンク
```json
{
"channels": {
"channel_list": {
"slack": {
"enabled": true,
"type": "slack",
"bot_token": "xoxb-YOUR-BOT-TOKEN",
"app_token": "xapp-YOUR-APP-TOKEN",
"allow_from": []
@@ -329,9 +336,10 @@ picoclaw gateway
```json
{
"channels": {
"channel_list": {
"irc": {
"enabled": true,
"type": "irc",
"server": "irc.libera.chat:6697",
"tls": true,
"nick": "picoclaw-bot",
@@ -369,9 +377,10 @@ picoclaw gateway
```json
{
"channels": {
"channel_list": {
"dingtalk": {
"enabled": true,
"type": "dingtalk",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"allow_from": []
@@ -404,9 +413,10 @@ picoclaw gateway
```json
{
"channels": {
"channel_list": {
"line": {
"enabled": true,
"type": "line",
"channel_secret": "YOUR_CHANNEL_SECRET",
"channel_access_token": "YOUR_CHANNEL_ACCESS_TOKEN",
"webhook_path": "/webhook/line",
@@ -456,9 +466,10 @@ PicoClaw は WebSocket/SDK モードで飛書に接続します — 公開 Webho
```json
{
"channels": {
"channel_list": {
"feishu": {
"enabled": true,
"type": "feishu",
"app_id": "cli_xxx",
"app_secret": "YOUR_APP_SECRET",
"allow_from": []
@@ -504,9 +515,10 @@ PicoClaw は 3 種類の WeCom 統合をサポートしています:
```json
{
"channels": {
"channel_list": {
"wecom": {
"enabled": true,
"type": "wecom",
"token": "YOUR_TOKEN",
"encoding_aes_key": "YOUR_ENCODING_AES_KEY",
"webhook_url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY",
@@ -537,7 +549,7 @@ PicoClaw は 3 種類の WeCom 統合をサポートしています:
```json
{
"channels": {
"channel_list": {
"wecom_app": {
"enabled": true,
"corp_id": "wwxxxxxxxxxxxxxxxx",
@@ -572,7 +584,7 @@ picoclaw gateway
```json
{
"channels": {
"channel_list": {
"wecom_aibot": {
"enabled": true,
"token": "YOUR_TOKEN",
@@ -610,9 +622,10 @@ OneBot v11 互換の QQ ボットフレームワークをインストールし
```json
{
"channels": {
"channel_list": {
"onebot": {
"enabled": true,
"type": "onebot",
"ws_url": "ws://127.0.0.1:8080",
"access_token": "",
"allow_from": []
@@ -643,9 +656,10 @@ Sipeed AI カメラハードウェア向けの統合チャネルです。
```json
{
"channels": {
"channel_list": {
"maixcam": {
"enabled": true
"enabled": true,
"type": "maixcam"
}
}
}
+7 -2
View File
@@ -287,7 +287,7 @@ PicoClaw はリクエスト送信前に外側の `litellm/` プレフィック
```json
{
"version": 2,
"version": 3,
"model_list": [
{
"model_name": "glm-4.7",
@@ -373,19 +373,22 @@ picoclaw agent -m "こんにちは"
"api_key": "gsk_xxx"
}
},
"channels": {
"channel_list": {
"telegram": {
"enabled": true,
"type": "telegram",
"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": "",
@@ -393,6 +396,7 @@ picoclaw agent -m "こんにちは"
},
"feishu": {
"enabled": false,
"type": "feishu",
"app_id": "cli_xxx",
"app_secret": "xxx",
"encrypt_key": "",
@@ -401,6 +405,7 @@ picoclaw agent -m "こんにちは"
},
"qq": {
"enabled": false,
"type": "qq",
"app_id": "",
"app_secret": "",
"allow_from": []
+1
View File
@@ -345,6 +345,7 @@ MCP ツールは外部の Model Context Protocol サーバーとの統合を可
},
"slack": {
"enabled": true,
"type": "slack",
"command": "npx",
"args": [
"-y",