AgentEvalTool/.env.example
sinohqb 349200e51f v0.3-s3: Webhook + OpenClaw HTTP Skill + Markdown/对比报告
## Webhook 通知(S3-1)
- settings.py: 增加 AGENTEVAL_WEBHOOK_URL / AGENTEVAL_WEBHOOK_SECRET
- utils/webhook.py: send_run_webhook(),非阻断,任何异常仅 warning log
- runs.py: run 完成后自动触发 webhook(payload 含 run_id/status/summary/report_url)
- .env.example: 新增 webhook 配置示例

## OpenClaw Skill HTTP 改造(S3-2)
- plugins/openclaw/agenteval_skill.py: 完全重写
  - 改用 HTTP API(POST /api/runs + GET /api/runs/{id} 轮询 + GET /api/reports/{id})
  - 移除 subprocess + CLI 依赖
  - 轮询等待至 completed/failed,支持配置 poll_interval / timeout
  - 返回结构化中文摘要(summary_text),直接可用于 OpenClaw 对话展示

## Markdown 报告导出(S3-3)
- report.py: render_markdown_report() — 完整的 Markdown 表格 + 对话展示
- save_report: 支持 fmt="markdown",输出 .md 文件
- reports.py: GET /api/reports/{run_id}/markdown,Content-Disposition 附件下载
- api.ts: reportsApi.markdownUrl()
- Reports.tsx: 「导出 MD」按钮

## 对比报告(S3-4)
- report.py: generate_compare_report(run_id_1, run_id_2)
  - run_a / run_b 汇总 + delta(pass_rate / passed_cases / passed_rules)
  - case-level diff,标记 changed 用例
- reports.py: GET /api/reports/compare?run1=&run2=
- api.ts: reportsApi.compare()
- Reports.tsx: 完整对比视图
  - Segmented 切换「单次报告」/「对比报告」
  - 双 Select(报告 A vs B)+ 对比按钮
  - 汇总 delta card(pass_rate 变化 + 变化用例数徽章)
  - 用例对比表(通过/失败/改善↑/退步↓)+ 展开规则明细

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-17 11:44:54 +08:00

37 lines
2.2 KiB
Plaintext

# AgentEvalTool environment configuration
# Copy this file to .env and fill in real values. .env is git-ignored.
# ── API security ──────────────────────────────────────────────
# Leave AGENTEVAL_API_KEY empty to disable auth (dev only).
# In production, set a strong random token; clients must send it as X-API-Key.
AGENTEVAL_API_KEY=
# Comma-separated list of allowed CORS origins. Use ["*"] only in dev.
# The first non-localhost URL in this list is also used as the Origin sent
# to OpenClaw during the WebSocket handshake (auto-derives
# AGENTEVAL_OPENCLAW_WS_ORIGIN), so set this to the public URL of the
# deployment in production.
# Example: AGENTEVAL_ALLOWED_ORIGINS=["http://192.168.8.145:8001"]
AGENTEVAL_ALLOWED_ORIGINS=["*"]
# ── OpenClaw proxy ─────────────────────────────────────────────
AGENTEVAL_OPENCLAW_UPSTREAM=http://openclaw-eval:18789
AGENTEVAL_OPENCLAW_WS_UPSTREAM=ws://openclaw-eval:18789
AGENTEVAL_OPENCLAW_PROXY_USER=agenteval
AGENTEVAL_OPENCLAW_AUTH_TOKEN=change-me-in-production
# Optional override. If unset, the proxy derives the Origin from
# AGENTEVAL_ALLOWED_ORIGINS automatically. Only set this if you need to
# send a different Origin than the public URL of this deployment.
# AGENTEVAL_OPENCLAW_WS_ORIGIN=
# ── Frontend ───────────────────────────────────────────────────
# Optional override of the built frontend dist path (default: frontend/web/dist).
# AGENTEVAL_FRONTEND_DIST_PATH=/app/frontend/web/dist
# ── Webhook ────────────────────────────────────────────────────
# If set, AgentEvalTool will POST run completion summaries to this URL.
# Example: AGENTEVAL_WEBHOOK_URL=https://your-service.example.com/webhooks/agenteval
AGENTEVAL_WEBHOOK_URL=
# Optional shared secret included as X-Webhook-Secret header for verification.
AGENTEVAL_WEBHOOK_SECRET=