Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions docs/zh-cn/yuanbao-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 元宝龙虾集成 Skill

## 概述

将元宝 App 与 OpenClaw 原生集成,实现元宝与 OpenClaw 的双向通信。

## 集成流程

### 步骤 1:安装元宝龙虾插件

在已部署 OpenClaw 的设备上运行:

```bash
openclaw plugins install "openclaw-plugin-yuanbao@latest"
```

### 步骤 2:配置元宝通道

1. 打开元宝 App
2. 进入「关联已有 OpenClaw」面板
3. 选择「方式2:通道配置」
4. 复制页面中的 AppID 和 AppSecret
5. 运行配置命令:

```bash
openclaw channels add --channel yuanbao --token "<你的AppID>:<你的AppSecret>"
```

### 步骤 3:重启 OpenClaw 服务

```bash
openclaw gateway restart
```

### 步骤 4:完成关联

在元宝 App 中点击「我已操作」完成关联。

## 配置参数说明

| 参数 | 说明 | 来源 |
|------|------|------|
| AppID | 元宝应用标识 | 元宝 App 配置面板 |
| AppSecret | 元宝应用密钥 | 元宝 App 配置面板 |

## 常见问题

### Q: 插件安装失败?
检查网络连接,确保能访问 npm 仓库。

### Q: 通道配置失败?
确认 AppID 和 AppSecret 格式正确,用冒号分隔。

### Q: 重启后仍无法使用?
检查 OpenClaw 日志,确认插件加载成功。

## 技术细节

- **插件名称**: `openclaw-plugin-yuanbao`
- **通道类型**: `yuanbao`
- **认证方式**: AppID + AppSecret

## 相关命令

```bash
# 查看已安装插件
openclaw plugins list

# 查看通道配置
openclaw channels list

# 移除元宝通道
openclaw channels remove --channel yuanbao
```

## 注意事项

1. AppSecret 需妥善保管,不要泄露
2. 重启服务后需要等待几秒让插件完全加载
3. 如需多设备绑定,每个设备需要独立的 AppID/AppSecret
66 changes: 66 additions & 0 deletions manager/agent/skills/yuanbao-integration/scripts/setup-yuanbao.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个脚本放文档那里引用一下?不要放在skills里

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不会啊,我把这个删掉是不是也可以😄

# setup-yuanbao.sh - 元宝龙虾集成一键配置脚本
#
# 用法:
# ./setup-yuanbao.sh --appid <AppID> --appsecret <AppSecret>
#
# 参数:
# --appid 元宝 AppID(从元宝 App 配置面板获取)
# --appsecret 元宝 AppSecret(从元宝 App 配置面板获取)
#
# 示例:
# ./setup-yuanbao.sh --appid "your_app_id" --appsecret "your_app_secret"

set -e

# 解析参数
APPID=""
APPSECRET=""

while [[ $# -gt 0 ]]; do
case $1 in
--appid)
APPID="$2"
shift 2
;;
--appsecret)
APPSECRET="$2"
shift 2
;;
*)
echo "未知参数: $1"
exit 1
;;
esac
done

if [[ -z "$APPID" || -z "$APPSECRET" ]]; then
echo "用法: $0 --appid <AppID> --appsecret <AppSecret>"
echo ""
echo "请从元宝 App「关联已有 OpenClaw」面板获取 AppID 和 AppSecret"
exit 1
fi

echo "=== 元宝龙虾集成配置 ==="
echo ""

# 步骤 1: 安装插件
echo "[1/4] 安装元宝龙虾插件..."
openclaw plugins install "openclaw-plugin-yuanbao@latest"

# 步骤 2: 配置通道
echo "[2/4] 配置元宝通道..."
openclaw channels add --channel yuanbao --token "${APPID}:${APPSECRET}"

# 步骤 3: 重启服务
echo "[3/4] 重启 OpenClaw 服务..."
openclaw gateway restart

# 步骤 4: 完成
echo "[4/4] 配置完成!"
echo ""
echo "请在元宝 App 中点击「我已操作」完成关联。"
echo ""
echo "验证命令:"
echo " openclaw plugins list"
echo " openclaw channels list"
Loading