-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml.example
More file actions
43 lines (36 loc) · 2.25 KB
/
Copy pathconfig.yaml.example
File metadata and controls
43 lines (36 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# ============================================================
# Code Shield 服务端配置模版文件 (config.yaml.example)
# 使用方法:复制本文件为 config.yaml,并根据实际情况修改配置值
# ============================================================
# ── HTTP 服务 ──
server:
port: ":8080" # 服务监听端口
# external_url: "http://127.0.0.1:8080" # 外部访问基准 URL(邮件等通知链接跳转,缺省默认为本地端口地址)
# worker_count: 5 # 全局任务并发数,默认 5
# gin_log: true # 是否打印 GIN 框架请求日志,默认 false
# read_timeout: 15s # 读取 HTTP 请求超时时间,默认 15s
# write_timeout: 15s # 写入响应超时时间,默认 15s
# idle_timeout: 60s # keep-alive 空闲连接超时时间,默认 60s
# ── 数据存储 ──
storage:
root: "." # 数据根目录,下设 codes/ 和 reports/ 子目录(建议配置为绝对路径)
# ── AI 引擎 ──
ai:
backend: "claude" # AI 驱动 CLI 后端:可选 claude 或 opencode,默认 claude
# debug_logs: true # 是否输出 AI 引擎底层的 debug 级别日志,默认 false。开启后会在报告同级目录下生成 .debug.log 文件方便定位
# output_format: "text" # AI 输出的格式:text 或 json(对 claude 来说是 text/stream-json,对 opencode 来说是 default/json),默认 text
# ── 多 LLM 服务器并发配置 (可选) ──
# 启用多 LLM 服务器配置时,全局任务并发数限制会被本配置的并发总和自动拓展,
# 每次 AI 扫描时根据后端类型自动映射对应的模型名称,精准控制每台服务器的并发负载。
# models:
# - opencode: "models/glm5.1"
# claude: "glm5.1"
# concurrent: 5
# - opencode: "models/qwen3.5"
# concurrent: 2
# ── 通知服务 ──
notification:
webhook: "http://127.0.0.1:8081/api/notify/email" # 分析完毕后发送报告卡片通知的回调地址
# ── 认证 ──
auth:
jwt_secret: "" # JWT 签名密钥(用于校验由 code-bench 签发的 Token,需保持一致;留空则启动时随机生成临时密钥)