You've already forked agentic-coding-workflow
131 lines
3.5 KiB
YAML
131 lines
3.5 KiB
YAML
# AgentCodingWorkflow 配置文件示例
|
|
#
|
|
# 用法:
|
|
# 1. 复制为 config.yaml(已被 .env / 真实凭据建议放在 .gitignore 之外管理)
|
|
# 2. 启动时设置环境变量:APP_CONFIG_FILE=./config.yaml ./bin/server
|
|
#
|
|
# 加载优先级(后者覆盖前者):默认值 → 本配置文件 → 环境变量(APP_ 前缀)
|
|
# 即同名键存在 APP_xxx 环境变量时,会覆盖此处的值。
|
|
|
|
# 运行环境:development / production / test
|
|
env: development
|
|
|
|
# 本地数据目录(用于落地文件、缓存等)
|
|
data_dir: ./data
|
|
|
|
# 主加密密钥(必填):32 字节的 hex 编码字符串,长度恰好 64 个十六进制字符
|
|
# 生成示例:openssl rand -hex 32
|
|
master_key: "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"
|
|
|
|
http:
|
|
# HTTP 监听地址,格式 host:port,留空 host 表示监听所有网卡
|
|
addr: ":8080"
|
|
|
|
db:
|
|
# PostgreSQL DSN(必填)
|
|
dsn: "postgres://acw:acw@localhost:5432/acw?sslmode=disable"
|
|
|
|
# 首次启动时的管理员种子账号
|
|
bootstrap:
|
|
admin_email: "admin@local"
|
|
admin_password: "changeme"
|
|
|
|
# Workspace 模块(git clone / worktree 落盘 + 各 git verb 超时)
|
|
workspace:
|
|
# workspace clone/worktree 的根目录(程序会在其下自建 workspaces/ 与 tmp/ 子目录)
|
|
data_dir: "./data"
|
|
# 大仓库 clone 上限,按需调高;timeout 走 ctx 优先于 git 进程超时
|
|
clone_timeout: "30m"
|
|
fetch_timeout: "5m"
|
|
push_timeout: "5m"
|
|
# commit / status / worktree 等轻量操作
|
|
ops_timeout: "60s"
|
|
|
|
# git CLI 配置(默认走 PATH 里的 git)
|
|
git:
|
|
binary: "git"
|
|
|
|
# Chat 模块(多模态对话 + LLM endpoints)
|
|
chat:
|
|
attachment:
|
|
# 单文件上限(MB)
|
|
max_file_size_mb: 20
|
|
# 单条消息中所有附件总和上限(MB)
|
|
max_message_size_mb: 50
|
|
# 允许的 MIME 类型白名单。"text/*" 通配任意 text/ 子类型。
|
|
mime_whitelist:
|
|
- image/png
|
|
- image/jpeg
|
|
- image/webp
|
|
- image/gif
|
|
- application/pdf
|
|
- text/*
|
|
stream:
|
|
# SSE ring buffer 在流结束后保留多久,方便前端断线重连。
|
|
ring_buffer_retention_seconds: 300
|
|
history:
|
|
# token 预算的安全余量百分比(5.0 表示在 (context_window - max_output) 上再保留 5%)
|
|
safety_margin_pct: 5.0
|
|
|
|
# 附件存储驱动(当前仅支持 localfs)。生产建议挂载到独立卷。
|
|
storage:
|
|
driver: "localfs"
|
|
localfs:
|
|
base_path: "./data/uploads"
|
|
|
|
# 后台 job runner 配置
|
|
jobs:
|
|
enabled: true
|
|
workers: 2
|
|
shutdown_grace: 30s
|
|
workspace_fetch:
|
|
enabled: true
|
|
interval: 5m
|
|
worktree_prune:
|
|
enabled: true
|
|
interval: 24h
|
|
idle_threshold: 720h
|
|
warning_lead: 72h
|
|
attachment_cleanup:
|
|
enabled: true
|
|
interval: 24h
|
|
retention: 720h
|
|
job_reaper:
|
|
enabled: true
|
|
interval: 1m
|
|
lease_timeout: 5m
|
|
job_purge:
|
|
enabled: true
|
|
interval: 24h
|
|
completed_retention: 168h
|
|
acp_events_purge:
|
|
enabled: true
|
|
interval: 24h
|
|
retention: 168h # 7 天
|
|
|
|
# 通知通道配置
|
|
notify:
|
|
webhook:
|
|
enabled: false
|
|
url: ""
|
|
secret: ""
|
|
timeout: 10s
|
|
topics: []
|
|
|
|
# ACP module: agent subprocess pool + WebSocket fanout + event retention
|
|
acp:
|
|
enabled: true
|
|
max_active_global: 20
|
|
max_active_per_user: 3
|
|
spawn_timeout: 30s
|
|
kill_grace: 5s
|
|
stderr_buffer_lines: 100
|
|
stderr_tail_bytes: 2000
|
|
ws_ping_interval: 30s
|
|
ws_pong_timeout: 60s
|
|
ws_send_buffer: 256
|
|
event_max_payload_bytes: 65536
|
|
event_truncate_field_bytes: 4096
|
|
event_retention_days: 7
|
|
shutdown_grace: 30s
|