跳到主要内容

config.yml

完整示例​

server:
port: 3456 # Listening port
cache_ttl_minutes: 90 # Data source cache TTL (minutes)
cache_dir: "cache" # Disk cache directory

datasources:
curseforge:
enabled: true # Fetch CurseForge download counts
concurrency: 5 # Max concurrent requests
github:
enabled: true # Fetch GitHub Issues/PRs
concurrency: 5

retry:
max_attempts: 3 # Max attempts (including the first)
base_delay_ms: 1000 # Base delay (ms, exponential backoff)

ignore_archived: true # Ignore Issues/PRs from archived repos

project_paths:
- "D:/Projects/mods" # Agent project search paths (searched in order)

codacy:
enabled: true # Enable Codacy code-quality analysis
concurrency: 2 # Concurrent analyses
cache_ttl_hours: 24 # Analysis cache TTL
provider: "gh" # Provider (gh = GitHub)
add_wait_minutes: 10 # Wait time after adding a repo

字段参考​

server​

字段类型默认值说明
portint3456HTTP 监听端口
cache_ttl_minutesint90数据源缓存时长
cache_dirstringcache磁盘缓存目录路径

datasources​

控制外部数据源的启用/禁用与并发数。

字段类型说明
curseforgeobjectCurseForge API 配置(下载量)
githubobjectGitHub API 配置(Issue/PR)

每个数据源的子字段:

字段类型说明
enabledbool是否获取该来源
concurrencyint最大并发请求数

获取结果会缓存在磁盘的 cache/<source>/ 下。某个来源被禁用时,已有的缓存值会保留并继续复用。

retry​

针对失败的上游请求,采用指数退避的重试策略。

字段类型默认值说明
max_attemptsint3最大尝试次数(包含首次)
base_delay_msint1000基础延迟,每次尝试翻倍

ignore_archived​

  • true:在汇总统计中跳过已归档仓库的 Issue/PR
  • false:统计所有 Issue/PR

project_paths​

存放智能体项目的目录列表。当用户在智能体界面中选择项目时,系统会按顺序搜索这些路径;如果某个仓库不存在,会自动用 git clone 克隆到第一个可写路径。

  • 留空则默认为当前工作目录

示例:

project_paths:
- "D:/Projects/mods"
- "E:/Workspace/forge"

codacy​

自动分析 GitHub 仓库的代码质量,并用于维护难度评分。

字段类型默认值说明
enabledbooltrue启用分析
concurrencyint2并发分析数
cache_ttl_hoursint24分析缓存时长(过期后重新检查)
providerstringgh仓库托管服务商
add_wait_minutesint10添加仓库后等待分析完成的时间

计算出的难度会缓存在 data/mods.db 中(公式见 rate.yml)。