Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
重构所有代码和文档中的项目名称,将OpenFang统一更新为ZCLAW。包括: - 配置文件中的项目名称 - 代码注释和文档引用 - 环境变量和路径 - 类型定义和接口名称 - 测试用例和模拟数据 同时优化部分代码结构,移除未使用的模块,并更新相关依赖项。
71 lines
1.4 KiB
TOML
71 lines
1.4 KiB
TOML
# Browser Hand - 浏览器自动化能力包
|
|
#
|
|
# ZCLAW Hand 配置示例
|
|
# 这个 Hand 提供浏览器自动化、网页抓取和交互能力
|
|
|
|
[hand]
|
|
name = "browser"
|
|
version = "1.0.0"
|
|
description = "浏览器自动化能力包 - 自动化网页操作和数据采集"
|
|
author = "ZCLAW Team"
|
|
|
|
type = "automation"
|
|
requires_approval = true # 浏览器操作需要审批
|
|
timeout = 600
|
|
max_concurrent = 2
|
|
|
|
tags = ["browser", "automation", "web-scraping", "selenium", "playwright"]
|
|
|
|
[hand.config]
|
|
# 浏览器引擎: chromium, firefox, webkit
|
|
browser_engine = "chromium"
|
|
|
|
# 是否使用无头模式
|
|
headless = true
|
|
|
|
# 页面加载超时(秒)
|
|
page_timeout = 30
|
|
|
|
# 是否加载图片
|
|
load_images = false
|
|
|
|
# 是否执行 JavaScript
|
|
enable_javascript = true
|
|
|
|
# User-Agent
|
|
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
|
|
|
|
# 代理配置 (可选)
|
|
# proxy = "http://127.0.0.1:7890"
|
|
|
|
[hand.triggers]
|
|
manual = true
|
|
schedule = false
|
|
webhook = true
|
|
|
|
[[hand.triggers.events]]
|
|
type = "chat.intent"
|
|
pattern = "打开网页|访问网站|抓取|爬取|browse|scrape|visit"
|
|
priority = 5
|
|
|
|
[hand.permissions]
|
|
requires = [
|
|
"browser.navigate",
|
|
"browser.click",
|
|
"browser.type",
|
|
"browser.screenshot",
|
|
"browser.evaluate",
|
|
"file.write"
|
|
]
|
|
|
|
roles = ["operator.read"]
|
|
|
|
[hand.rate_limit]
|
|
max_requests = 50
|
|
window_seconds = 3600
|
|
|
|
[hand.audit]
|
|
log_inputs = true
|
|
log_outputs = true
|
|
retention_days = 14
|