-
Notifications
You must be signed in to change notification settings - Fork 485
feat(skills): add yuanbao-integration skill for OpenClaw native integration with Yuanbao App #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nillikechatchat
wants to merge
4
commits into
agentscope-ai:main
Choose a base branch
from
nillikechatchat:feature/yuanbao-integration-skill
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
846930d
feat(skills): add yuanbao-integration SKILL.md
nillikechatchat b488e72
feat(skills): add setup-yuanbao.sh script
nillikechatchat a25d8e3
docs: move yuanbao-integration to docs/zh-cn/
nillikechatchat 9f0cc37
docs: remove old SKILL.md location
nillikechatchat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
66
manager/agent/skills/yuanbao-integration/scripts/setup-yuanbao.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| #!/bin/bash | ||
| # 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" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个脚本放文档那里引用一下?不要放在skills里
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不会啊,我把这个删掉是不是也可以😄