fix: resolve plugin id mismatch warning and log spam

- Rename package to @tencent-connect/qqbot to match manifest id, eliminating 'plugin id mismatch' warning
- Add explicit openclaw.id to clawdbot/moltbot/openclaw config sections
- Remove high-frequency debug logs in channel config callbacks (listAccountIds, resolveAccount, defaultAccountId)
- Add one-click install & run method using upgrade-and-run.sh to README
This commit is contained in:
rianli
2026-03-09 20:33:55 +08:00
parent 11b230a989
commit 58d5f2c019
4 changed files with 29 additions and 18 deletions

View File

@@ -162,8 +162,18 @@ Scan to join the QQ group chat
### Step 2 — Install the Plugin
**Option A: One-Click Install & Run (Recommended)**
```bash
git clone https://github.com/tencent-connect/openclaw-qq.git && cd openclaw-qq
bash ./scripts/upgrade-and-run.sh --appid YOUR_APPID --secret YOUR_SECRET
```
The script handles everything: cleanup old plugins → install deps → register plugin → configure channel → start service. Once done, skip to [Step 4](#step-4--start--test).
**Option B: Manual Step-by-Step**
```bash
# From source (npm package coming soon)
git clone https://github.com/tencent-connect/openclaw-qq.git && cd openclaw-qq
npm install --omit=dev
openclaw plugins install .

View File

@@ -158,8 +158,18 @@
### 第二步 — 安装插件
**方式一:一键安装并启动(推荐)**
```bash
git clone https://github.com/tencent-connect/openclaw-qq.git && cd openclaw-qq
bash ./scripts/upgrade-and-run.sh --appid YOUR_APPID --secret YOUR_SECRET
```
脚本会自动完成:清理旧插件 → 安装依赖 → 注册插件 → 配置通道 → 启动服务。完成后可直接跳到[第四步](#第四步--启动并测试)。
**方式二:手动分步安装**
```bash
# 从源码安装npm 包即将发布)
git clone https://github.com/tencent-connect/openclaw-qq.git && cd openclaw-qq
npm install --omit=dev
openclaw plugins install .

View File

@@ -1,5 +1,5 @@
{
"name": "@tencent-connect/openclaw-qq",
"name": "@tencent-connect/qqbot",
"version": "1.5.4",
"type": "module",
"main": "dist/index.js",
@@ -20,16 +20,19 @@
"moltbot.plugin.json"
],
"clawdbot": {
"id": "qqbot",
"extensions": [
"./index.ts"
]
},
"moltbot": {
"id": "qqbot",
"extensions": [
"./index.ts"
]
},
"openclaw": {
"id": "qqbot",
"extensions": [
"./index.ts"
]

View File

@@ -73,21 +73,9 @@ export const qqbotPlugin: ChannelPlugin<ResolvedQQBotAccount> = {
onboarding: qqbotOnboardingAdapter,
config: {
listAccountIds: (cfg) => {
const ids = listQQBotAccountIds(cfg);
console.log(`[qqbot:channel] listAccountIds: ${JSON.stringify(ids)}`);
return ids;
},
resolveAccount: (cfg, accountId) => {
const account = resolveQQBotAccount(cfg, accountId);
console.log(`[qqbot:channel] resolveAccount: input=${accountId} → resolved=${account.accountId}, appId=${account.appId}, enabled=${account.enabled}`);
return account;
},
defaultAccountId: (cfg) => {
const id = resolveDefaultQQBotAccountId(cfg);
console.log(`[qqbot:channel] defaultAccountId: ${id}`);
return id;
},
listAccountIds: (cfg) => listQQBotAccountIds(cfg),
resolveAccount: (cfg, accountId) => resolveQQBotAccount(cfg, accountId),
defaultAccountId: (cfg) => resolveDefaultQQBotAccountId(cfg),
// 新增:设置账户启用状态
setAccountEnabled: ({ cfg, accountId, enabled }) =>
setAccountEnabledInConfigSection({