Files
zclaw_openfang/hands/clip.HAND.toml
iven 0d4fa96b82
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
refactor: 统一项目名称从OpenFang到ZCLAW
重构所有代码和文档中的项目名称,将OpenFang统一更新为ZCLAW。包括:
- 配置文件中的项目名称
- 代码注释和文档引用
- 环境变量和路径
- 类型定义和接口名称
- 测试用例和模拟数据

同时优化部分代码结构,移除未使用的模块,并更新相关依赖项。
2026-03-27 07:36:03 +08:00

134 lines
2.5 KiB
TOML

# Clip Hand - 视频处理和编辑能力包
#
# ZCLAW Hand 配置
# 这个 Hand 提供视频处理、剪辑和格式转换能力
[hand]
name = "clip"
version = "1.0.0"
description = "视频处理和编辑能力包 - 支持剪辑、转码、生成竖屏视频"
author = "ZCLAW Team"
# Hand 类型
type = "automation"
# 是否需要人工审批才能执行
requires_approval = false
# 默认超时时间(秒)
timeout = 600
# 最大并发执行数
max_concurrent = 2
# 能力标签
tags = ["video", "editing", "transcoding", "vertical-video", "media"]
[hand.config]
# 输出格式配置
default_format = "mp4" # mp4, webm, gif
default_resolution = "1080p"
# 视频编码设置
video_codec = "h264"
audio_codec = "aac"
bitrate = "auto"
# 生成竖屏视频
vertical_mode = false
vertical_aspect = "9:16"
# 临时文件存储
temp_dir = "/tmp/zclaw/clip"
cleanup_after_complete = true
[hand.triggers]
# 触发器配置
manual = true
schedule = true
webhook = true
# 事件触发器
[[hand.triggers.events]]
type = "file.uploaded"
pattern = "\\.(mp4|mov|avi|mkv|webm)$"
priority = 8
[[hand.triggers.events]]
type = "chat.intent"
pattern = "剪辑|视频|转码|竖屏|clip|video|edit"
priority = 5
[hand.permissions]
# 权限要求
requires = [
"file.read",
"file.write",
"process.execute"
]
# RBAC 角色要求
roles = ["operator.read", "operator.write"]
# 速率限制
[hand.rate_limit]
max_requests = 10
window_seconds = 3600 # 1 hour
# 审计配置
[hand.audit]
log_inputs = true
log_outputs = true
retention_days = 14
# 参数定义
[[hand.parameters]]
name = "inputPath"
label = "输入路径"
type = "text"
required = true
description = "视频文件路径或 URL"
[[hand.parameters]]
name = "outputFormat"
label = "输出格式"
type = "select"
required = false
default = "mp4"
options = ["mp4", "webm", "gif"]
[[hand.parameters]]
name = "trimStart"
label = "开始时间"
type = "number"
required = false
description = "剪辑开始时间(秒)"
[[hand.parameters]]
name = "trimEnd"
label = "结束时间"
type = "number"
required = false
description = "剪辑结束时间(秒)"
# 工作流步骤
[[hand.workflow]]
id = "validate"
name = "验证输入"
description = "检查视频文件格式和可用性"
[[hand.workflow]]
id = "analyze"
name = "分析视频"
description = "获取视频元数据(时长、分辨率、编码)"
[[hand.workflow]]
id = "process"
name = "处理视频"
description = "执行剪辑、转码等操作"
[[hand.workflow]]
id = "output"
name = "输出结果"
description = "保存处理后的视频文件"