chore: auto release commit (2026-06-15 17:32:47)
All checks were successful
技能自动化发布 / release (push) Successful in 7s
All checks were successful
技能自动化发布 / release (push) Successful in 7s
This commit is contained in:
@@ -51,7 +51,13 @@ scripts/service/<domain>_adapter/
|
||||
real_rpa.py # 真实系统 RPA(占位,谨慎实现)
|
||||
```
|
||||
|
||||
模板示例:`scripts/service/example_adapter/`(复制改名即用)。
|
||||
模板示例:
|
||||
|
||||
- **四档骨架(占位)**:`scripts/service/example_adapter/` — 复制改名后补齐业务 adapter
|
||||
- **仿真浏览器 RPA 完整案例**:`examples/simulator_browser_rpa/` — mock + simulator_rpa + sandbox 页面 + 测试
|
||||
- **真实浏览器 RPA 完整案例**:`examples/real_browser_rpa/` — 登录/验证码/滚动采集
|
||||
|
||||
> 先判断属于四象限哪一种(`real_browser_rpa` / `real_api` / `simulator_browser_rpa` / `simulator_api`),再读对应 `examples/*/README.md`。示例是**参考架构与边界**,不是业务代码原样复制。
|
||||
|
||||
## 档位 dispatch
|
||||
|
||||
@@ -92,15 +98,29 @@ def get_adapter():
|
||||
依赖 account-manager 或其他兄弟技能时:
|
||||
|
||||
1. 在 `SKILL.md` 的 `metadata.openclaw.dependencies.required` 声明。
|
||||
2. 调用兄弟技能走统一 **`service.sibling_bridge`**(`call_sibling_json`),**不要**在 service 层散落 `subprocess.run`。
|
||||
3. **lease 必须 release**(account-manager 租约);进程被 kill 后可能残留 lease,需在运维文档说明排查方式(查 account-manager lease 列表 / 手动释放)。
|
||||
2. **普通兄弟技能调用**,优先走统一 **`service.sibling_bridge`**(`call_sibling_json`),**不要**在 `task_service.py`、`task_rpa.py` 等业务流程文件中到处散落 `subprocess.run`。
|
||||
3. **account-manager 账号/租约能力**是例外:可参考 `examples/real_browser_rpa/scripts/service/account_client.py`,封装为**单一** `account_client.py`;允许在该文件内部集中通过 subprocess 调 account-manager CLI。
|
||||
4. **不允许**直接 `import account-manager` 的内部 Python 模块(如 `service/`、`util/`、`db/`)。
|
||||
5. **pick lease 后必须 `finally release lease`**;进程被 kill 后可能残留 lease,需在运维文档说明排查方式(查 account-manager lease 列表 / 手动释放)。
|
||||
|
||||
```python
|
||||
# 普通兄弟技能 — 走 sibling_bridge
|
||||
from service.sibling_bridge import call_sibling_json
|
||||
|
||||
result = call_sibling_json("account-manager", ["list", "--limit", "10"])
|
||||
```
|
||||
|
||||
```python
|
||||
# account-manager 账号/租约 — 集中在 account_client.py
|
||||
from service.account_client import pick_web_account, release_lease
|
||||
|
||||
account = pick_web_account(platform="target_platform")
|
||||
try:
|
||||
...
|
||||
finally:
|
||||
release_lease(account.get("lease_token"))
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- `RPA.md` — 三端 RPA 技术选型与拟人/反反爬范式
|
||||
|
||||
Reference in New Issue
Block a user