-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.toml
More file actions
74 lines (58 loc) · 2.92 KB
/
config.example.toml
File metadata and controls
74 lines (58 loc) · 2.92 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Coacker Configuration
# Copy this file to config.toml and edit as needed.
# ─── 项目配置 (审查什么) ───
[project]
root = "." # 项目根目录
entry = "packages/brain/src/index.ts" # 入口文件 (分析起点)
intent = "Comprehensive code review" # 审查意图
origin = "" # GitHub origin (owner/repo) — 用于自动提交 issue
mainBranch = "main" # 主分支名 (默认 "main", 可设为 "master" 等)
# ─── 输出配置 ───
[output]
dir = "./output" # 报告和知识文件输出目录
# ─── Backend (怎么连接 IDE) ───
[backend]
type = "ag"
[backend.ag]
endpointUrl = "http://localhost:9222" # CDP debug endpoint
timeout = 30000 # Connection timeout (ms)
humanize = true # Simulate human typing rhythm
windowTitle = "Coacker" # Window title to connect to
# ─── Toolkit (可选辅助工具,Brain 用来预处理上下文) ───
# --- AST 分析器: 二选一 ---
# 方式 A: 单语言 (向后兼容)
# [backend.toolkit.ast]
# languagePath = "./tree-sitter-typescript.wasm"
# 方式 B: 多语言 (推荐) — 自动从 tree-sitter-wasms 包解析 WASM
# [[backend.toolkit.ast.languages]]
# lang = "solidity" # 可选: typescript, solidity, rust
# [[backend.toolkit.ast.languages]]
# lang = "typescript"
# [backend.toolkit.mcp]
# command = "npx" # MCP Server 启动命令
# args = ["rust-analyzer-mcp"] # MCP Server 参数
# [backend.toolkit.sandbox]
# baseDir = "." # Sandbox 工作目录
# allowedCommands = ["npx", "semgrep", "slither"] # 额外允许的命令 (SAST 工具等)
# [backend.toolkit.repoMap]
# tokenBudget = 1024 # RepoMap prompt 预算 (tokens)
# fileGlobs = ["**/*.ts", "**/*.rs", "**/*.sol"] # 扫描的文件类型
# ─── Brain (审查管道调优) ───
[brain]
type = "audit"
[brain.audit]
maxGapRounds = 2 # Gap Analyzer iteration limit (0 = disable)
maxSubTasks = 3 # Max sub-tasks per round
# knowledgeDir = ".coacker/docs" # 预设领域知识目录
# [brain.audit.spinBreaker]
# maxConsecutiveSpins = 2 # 连续 N 轮低价值 findings 后自动停止
[brain.validate]
maxReviewAttempts = 3 # Review-retry loop limit
excludeLabels = ["wontfix", "duplicate", "invalid"] # Blacklist: skip issues with these labels
draftOnFailure = true # Mark draft on failure
# [brain.validate.sast]
# command = "npx" # SAST 工具命令
# args = ["semgrep", "--config=auto", "."] # SAST 工具参数
# ─── Player ───
[player]
taskTimeout = 300 # Per-task timeout (seconds)