feat: 实现循环防护和安全验证功能
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
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(loop_guard): 为LoopGuard添加Clone派生 feat(capabilities): 实现CapabilityManager.validate()安全验证 fix(agentStore): 添加token用量追踪 chore: 删除未实现的Predictor/Lead HAND.toml文件 style(Credits): 移除假数据并标注开发中状态 refactor(Skills): 动态加载技能卡片 perf(configStore): 为定时任务添加localStorage降级 docs: 更新功能文档和版本变更记录
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
# Lead Hand - 销售线索发现能力包
|
||||
#
|
||||
# ZCLAW Hand 配置示例
|
||||
# 这个 Hand 自动发现和筛选销售线索
|
||||
#
|
||||
# ⚠️ 注意: 此 Hand 尚未实现 Rust 后端,仅作为设计文档保留。
|
||||
# 启用状态设为 false,前端不会显示为可用能力。
|
||||
|
||||
[hand]
|
||||
name = "lead"
|
||||
version = "1.0.0"
|
||||
description = "销售线索发现和筛选能力包 - 自动识别潜在客户(未实现)"
|
||||
author = "ZCLAW Team"
|
||||
|
||||
type = "automation"
|
||||
enabled = false
|
||||
requires_approval = true # 线索操作需要审批
|
||||
timeout = 600
|
||||
max_concurrent = 1
|
||||
|
||||
tags = ["sales", "leads", "automation", "discovery", "qualification"]
|
||||
|
||||
[hand.config]
|
||||
# 线索来源
|
||||
sources = ["linkedin", "company_website", "crunchbase", "public_records"]
|
||||
|
||||
# 筛选条件
|
||||
[hand.config.filters]
|
||||
# 最小公司规模
|
||||
min_company_size = 10
|
||||
# 目标行业
|
||||
industries = ["technology", "saas", "fintech", "healthcare"]
|
||||
# 目标地区
|
||||
regions = ["china", "north_america", "europe"]
|
||||
|
||||
# 评分权重
|
||||
[hand.config.scoring]
|
||||
company_fit = 0.4
|
||||
engagement_likelihood = 0.3
|
||||
budget_indication = 0.2
|
||||
timing_signals = 0.1
|
||||
|
||||
[hand.triggers]
|
||||
manual = true
|
||||
schedule = true # 允许定时触发
|
||||
webhook = true
|
||||
|
||||
# 定时触发:每天早上 9 点
|
||||
[[hand.triggers.schedules]]
|
||||
cron = "0 9 * * 1-5" # 工作日 9:00
|
||||
enabled = true
|
||||
timezone = "Asia/Shanghai"
|
||||
|
||||
[hand.permissions]
|
||||
requires = [
|
||||
"web.search",
|
||||
"web.fetch",
|
||||
"api.external",
|
||||
"database.write"
|
||||
]
|
||||
|
||||
roles = ["operator.read", "operator.write", "sales.read"]
|
||||
|
||||
[hand.approval]
|
||||
# 审批流程配置
|
||||
timeout_hours = 24
|
||||
approvers = ["sales_manager", "admin"]
|
||||
auto_approve_after_hours = 0 # 不自动批准
|
||||
|
||||
[hand.rate_limit]
|
||||
max_requests = 100
|
||||
window_seconds = 86400 # 每天
|
||||
|
||||
[hand.audit]
|
||||
log_inputs = true
|
||||
log_outputs = true
|
||||
retention_days = 90 # 销售数据保留更久
|
||||
@@ -1,149 +0,0 @@
|
||||
# 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 = "生成包含可视化的分析报告"
|
||||
Reference in New Issue
Block a user