fix: 通过本地完整测试发现的 11 个 bug

🔴 致命(5个):
- Bug1: onebot11.json 格式错误(旧 {http:{},ws:{}} → network.httpServers/httppClients)
- Bug2: 端口映射错位(WebUI 6099, OneBot API 6097 独立端口)
- Bug3: 变量名含空格 NAP CAT_HOST → NAPCAT_HOST(14脚本+2SKILL+README)
- Bug4: heredoc 单引号阻止变量展开
- Bug5: process.py 缺失 _get_high_risk_words() 方法

🟡 重要(3个):
- Bug6: onebot11.json 默认不存在(cat > 而非 edit)
- Bug7: API 须登录后才响应(新增扫码引导步骤)
- Bug8: qqrebot systemd 依赖 napcat 服务

🟢 中等(3个):
- Bug9: Skills 占位符缺 YOUR_NAPCAT_HOST sed 覆盖
- Bug10: venv 不可用需降级方案
- Bug11: 端口 25580 冲突处理
已验证全链路:NapCat + qqrebot + 插件 + OpenClaw Gateway + AI 回复
This commit is contained in:
root
2026-05-04 19:47:26 +08:00
parent 79ea8175c4
commit 9dff73e7bc
18 changed files with 171 additions and 131 deletions

View File

@ -28,7 +28,7 @@ import sys
import argparse
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
def delete_friend(user_id: int) -> dict:

View File

@ -19,7 +19,7 @@ import os
import argparse
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
FILES_DIR = "YOUR_WORKSPACE_PATH/files"

View File

@ -13,7 +13,7 @@ import sys
import argparse
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
def get_friend_list():

View File

@ -23,7 +23,7 @@ import os
import argparse
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
FILES_DIR = "YOUR_WORKSPACE_PATH/files"
DEFAULT_GID = YOUR_GROUP_ID # Liquid Studio 群

View File

@ -13,7 +13,7 @@ import sys
import argparse
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
def get_group_list():

View File

@ -23,7 +23,7 @@ import argparse
import requests
from datetime import datetime
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
def get_group_msg_history(group_id: str, count: int) -> list[dict]:

View File

@ -28,7 +28,7 @@ import sys
import argparse
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
def get_group_list():

View File

@ -41,7 +41,7 @@ import argparse
import requests
from datetime import datetime
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
def api_call(endpoint: str, params: dict = None) -> dict:

View File

@ -42,7 +42,7 @@ except ImportError:
# === NapCat 回退 ===
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
SHARED_DIR = "YOUR_SHARED_DIR"
CONTAINER_FILES = "/app/napcat/share"
OCR_TIMEOUT = 60

View File

@ -27,7 +27,7 @@ import sys
import argparse
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
def get_stranger_info(user_id):

View File

@ -23,7 +23,7 @@ import subprocess
import requests
TARGET_DIR = "YOUR_SHARED_DIR"
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
HISTORY_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), ".send_history.json")
SCRIPT_PATH = os.path.abspath(__file__)
GATEWAY_URL = "http://127.0.0.1:18789"

View File

@ -21,7 +21,7 @@ import sys
import argparse
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
def send_like(user_id: int, times: int = 1) -> dict:

View File

@ -28,7 +28,7 @@ import requests
import os
# go-cqhttp HTTP API 地址(与 qqrebot 配置文件一致)
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
# 默认接收用户(管理员)
DEFAULT_USER = "YOUR_ADMIN_QQ"

View File

@ -15,7 +15,7 @@ import base64
import argparse
import requests
CQHTTP_URL = "http://YOUR_NAP CAT_HOST:25570"
CQHTTP_URL = "http://YOUR_NAPCAT_HOST:25570"
DEFAULT_GID = YOUR_GROUP_ID # Liquid Studio 群