Files
zclaw_openfang/hands/predictor.HAND.toml
iven 8bcabbfb43
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: 代码质量清理 - 移除死代码和遗留别名
基于全面审计报告的 P0-P2 修复工作:

P0 (已完成):
- intelligence 模块: 精确注释 dead_code 标注原因(Tauri runtime 注册)
- compactor.rs: 实现 LLM 摘要生成(compact_with_llm)
- pipeline_commands.rs: 替换 println! 为 tracing 宏

P1 (已完成):
- 移除 8 个 gateway_* 向后兼容别名(OpenClaw 遗留)
- 前端 tauri-gateway.ts 改为调用 zclaw_* 命令
- 清理 generation.rs 6 个重复的实例方法(-217 行)
- A2A dead_code 注释更新

P2 (已完成):
- Predictor/Lead HAND.toml 设置 enabled=false
- Wasm/Native SkillMode 添加未实现说明
- browser/mod.rs 移除未使用的 re-export(消除 4 个警告)

文档更新:
- feature-checklist.md 从 v0.4.0 更新到 v0.6.0
- CLAUDE.md Hands 状态更新

验证: cargo check 零警告, 42 测试通过, 净减 371 行代码
2026-03-27 00:54:57 +08:00

150 lines
3.1 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Predictor Hand - 预测分析能力包
#
# ZCLAW Hand 配置
# 这个 Hand 提供预测分析、趋势预测和数据建模能力
#
# ⚠️ 注意: 此 Hand 尚未实现 Rust 后端,仅作为设计文档保留。
# 启用状态设为 false前端不会显示为可用能力。
[hand]
name = "predictor"
version = "1.0.0"
description = "预测分析能力包 - 执行回归、分类和时间序列预测(未实现)"
author = "ZCLAW Team"
# Hand 类型
type = "data"
# 未实现,禁用此 Hand
enabled = false
# 是否需要人工审批才能执行
requires_approval = false
# 默认超时时间(秒)
timeout = 600
# 最大并发执行数
max_concurrent = 2
# 能力标签
tags = ["prediction", "analytics", "forecasting", "ml", "statistics"]
[hand.config]
# 模型配置
default_model = "auto" # auto, regression, classification, timeseries
model_storage = "/tmp/zclaw/predictor/models"
# 训练配置
train_test_split = 0.8
cross_validation = 5
# 输出配置
output_format = "report" # report, json, chart
include_visualization = true
confidence_level = 0.95
# 特征工程
auto_feature_selection = true
max_features = 50
[hand.triggers]
# 触发器配置
manual = true
schedule = true
webhook = false
# 事件触发器
[[hand.triggers.events]]
type = "data.updated"
pattern = ".*(forecast|predict|analyze).*"
priority = 7
[[hand.triggers.events]]
type = "chat.intent"
pattern = "预测|分析|趋势|forecast|predict|analyze|trend"
priority = 5
[hand.permissions]
# 权限要求
requires = [
"file.read",
"file.write",
"compute.ml"
]
# RBAC 角色要求
roles = ["operator.read", "operator.write"]
# 速率限制
[hand.rate_limit]
max_requests = 20
window_seconds = 3600 # 1 hour
# 审计配置
[hand.audit]
log_inputs = true
log_outputs = true
retention_days = 30
# 参数定义
[[hand.parameters]]
name = "dataSource"
label = "数据源"
type = "text"
required = true
description = "数据文件路径或 URL"
[[hand.parameters]]
name = "model"
label = "模型类型"
type = "select"
required = true
options = ["regression", "classification", "timeseries"]
description = "预测模型的类型"
[[hand.parameters]]
name = "targetColumn"
label = "目标列"
type = "text"
required = true
description = "要预测的目标变量列名"
[[hand.parameters]]
name = "featureColumns"
label = "特征列"
type = "text"
required = false
description = "用于预测的特征列(逗号分隔,留空自动选择)"
# 工作流步骤
[[hand.workflow]]
id = "load"
name = "加载数据"
description = "读取和验证输入数据"
[[hand.workflow]]
id = "preprocess"
name = "数据预处理"
description = "清洗数据、处理缺失值、特征工程"
[[hand.workflow]]
id = "train"
name = "训练模型"
description = "训练预测模型并进行交叉验证"
[[hand.workflow]]
id = "evaluate"
name = "评估模型"
description = "计算模型性能指标"
[[hand.workflow]]
id = "predict"
name = "执行预测"
description = "使用训练好的模型进行预测"
[[hand.workflow]]
id = "report"
name = "生成报告"
description = "生成包含可视化的分析报告"