Files
zclaw_openfang/hands/clip.HAND.toml
iven 5599c1a4db feat(phase2): complete P1 tasks - Channels, Triggers, Skills CRUD and UI enhancements
Phase 2 P1 Tasks Completed:

API Layer (gateway-client.ts, gatewayStore.ts):
- Add Channels CRUD: getChannel, createChannel, updateChannel, deleteChannel
- Add Triggers CRUD: getTrigger, createTrigger, updateTrigger, deleteTrigger
- Add Skills CRUD: getSkill, createSkill, updateSkill, deleteSkill
- Add Scheduled Tasks API: createScheduledTask, deleteScheduledTask, toggleScheduledTask
- Add loadModels action for dynamic model list

UI Components:
- ModelsAPI.tsx: Dynamic model loading from API with loading/error states
- SchedulerPanel.tsx: Full CreateJobModal with cron/interval/once scheduling
- SecurityStatus.tsx: Loading states, error handling, retry functionality
- WorkflowEditor.tsx: New workflow creation/editing modal (new file)
- WorkflowHistory.tsx: Workflow execution history viewer (new file)
- WorkflowList.tsx: Integrated editor and history access

Configuration:
- Add 4 Hands TOML configs: clip, collector, predictor, twitter

Documentation (SYSTEM_ANALYSIS.md):
- Update API coverage: 65% → 89% (53/62 endpoints)
- Update UI completion: 85% → 92%
- Mark Phase 2 P1 tasks as completed
- Update technical debt cleanup status

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 01:38:34 +08:00

134 lines
2.5 KiB
TOML

# Clip Hand - 视频处理和编辑能力包
#
# OpenFang 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 = "保存处理后的视频文件"