Commit Graph

28 Commits

Author SHA1 Message Date
jeffusion
d375a4c82d feat(api): add config management REST endpoints
Add /admin/api/config routes for runtime configuration:
- GET /: Retrieve all config groups with field metadata and values
- PUT /: Validate and persist configuration overrides
- POST /reset: Reset specified keys to defaults (remove overrides)

Features:
- Sensitive field masking (passwords, secrets, API keys)
- Field validation (URL, enum, number range, boolean)
- Readonly field protection
- Grouped field organization with metadata
2026-03-03 16:32:01 +08:00
jeffusion
d946423d45 feat(config): add runtime config manager with 3-layer priority
Implement ConfigManager with three-layer configuration priority:
- Layer 1: Zod schema defaults
- Layer 2: Environment variables (process.env)
- Layer 3: JSON file overrides (config-overrides.json)

Features:
- Atomic file writes with temp+rename for reliability
- Synchronous load at startup for immediate availability
- Runtime hot-reload via async methods
- Source tracking (default/env/override) per config key
- Full Zod schema validation with type safety

Files added:
- src/config/config-manager.ts: Core manager implementation
- src/config/config-schema.ts: Field metadata and group definitions
- src/config/__tests__/: Unit tests for config manager
- typings/: TypeScript declaration files
2026-03-03 16:31:42 +08:00
accelerator
b4feb0a822 ci: 添加GitHub Actions CI/CD流水线
- CI: PR触发自动化测试(lint + type check + bun test)
- CD: push到main/tag触发Docker镜像构建并发布到GHCR
- 修复Dockerfile中bun.lockb→bun.lock引用
- 修复tsconfig.json排除测试文件避免dist中重复
- 修复file-review-store测试排序时间戳竞态
2026-03-01 14:47:22 +08:00
accelerator
e91ebdc974 fix: 修复E2E测试基础设施
- docker-compose.e2e.yml: 使用简化的Dockerfile.e2e替代主Dockerfile
- e2e/Dockerfile.e2e: 新增E2E专用镜像(跳过前端构建,安装git/ripgrep/curl)
- e2e/seed.sh: 修复mkdir -p src顺序(在写入文件之前创建目录)
- e2e/test.sh: 修复Test 5需要admin JWT认证访问review runs API
2026-03-01 14:14:13 +08:00
accelerator
5c0b4808ee test: 添加E2E测试基础设施(docker-compose + seed + test)
docker-compose.e2e.yml启动Gitea+assistant;seed.sh自动创建用户/仓库/Webhook/PR;test.sh轮询验证AI评论出现

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:46:43 +00:00
accelerator
20b7fae496 test: 添加集成测试(Store→Judge→Policy全链路)
验证完整数据流:入队→Agent findings→Judge去重→Policy分流→Store持久化→发布标记;覆盖幂等去重、重试恢复、并发安全

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:45:11 +00:00
accelerator
95cd9f1309 test: 添加ReAct循环单元测试
Mock OpenAI客户端验证:死循环防护(注入user消息)、fingerprint跨迭代去重、最后迭代强制json_object、工具调用错误处理

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:43:42 +00:00
accelerator
85ab286bf7 test: 添加文件存储和沙箱执行单元测试
覆盖原子写入、幂等去重、失败run清理、崩溃恢复;验证命令白名单、Token泄露修复、环境变量隔离

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:42:10 +00:00
accelerator
d7a70107a2 test: 添加发布策略和Judge代理单元测试
覆盖severity×confidence×humanGate全组合、dropped数组行为;验证fingerprint去重、权重排序、摘要文本

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:40:27 +00:00
accelerator
901ef97a25 docs: 更新README添加Agent审查模式文档
补充Agent模式架构说明、配置项文档和管理API接口说明

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:38:58 +00:00
accelerator
611fcf39d5 feat: 添加Agent审查相关配置项和依赖
新增REVIEW_ENGINE、向量记忆、Reflection/Debate等环境变量;添加@qdrant/js-client-rest和zod-to-json-schema依赖;添加test脚本

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:37:30 +00:00
accelerator
2ce2a5f6a6 feat: 集成Agent审查引擎到应用入口和控制器
webhook控制器支持agent模式的PR/commit入队;admin API新增review runs查询;feedback控制器支持人工审批反馈;Gitea服务扩展commit评论接口

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:36:01 +00:00
accelerator
25d4f56bde feat: 添加审查编排器和引擎入口
ReviewOrchestrator管理完整审查流程(workspace准备→Agent并行审查→Judge聚合→Policy过滤→Gitea发布);ReviewEngine实现任务队列和tick调度

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:34:27 +00:00
accelerator
5ddd858785 feat: 添加发布策略和文件审查存储
PublishPolicy按置信度/严重度/人工门禁分流findings为publishable/gated/dropped;FileReviewStore实现原子写入和失败run自动清理

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:33:03 +00:00
accelerator
4b58f158fc feat: 添加四个分类专家Agent定义
定义correctness、security、reliability、maintainability四个领域专家的focus prompt配置

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:31:33 +00:00
accelerator
1d9ed3d969 feat: 添加多Agent审查代理(specialist/reflexion/judge/critic/debate)
SpecialistAgent实现ReAct循环+指纹去重;ReflexionAgent添加自我反思机制;JudgeAgent聚合去重排序;CriticAgent质量评分;DebateOrchestrator多代理辩论

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:30:08 +00:00
accelerator
956a84acc1 feat: 添加向量记忆和学习系统
基于Qdrant的向量存储实现finding相似度搜索;LearningSystem支持误报学习和Few-shot示例生成

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:28:34 +00:00
accelerator
6186210b4e feat: 添加工具注册表和代码搜索工具
ToolRegistry统一管理Agent可用工具并转换为OpenAI Function格式;实现代码搜索、文件读取、函数引用搜索三个工具

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:26:47 +00:00
accelerator
d1e1e2f33c feat: 添加沙箱执行和本地仓库管理器
SandboxExec实现命令白名单和敏感信息脱敏;LocalRepoManager管理git mirror/worktree;DiffExtractor构建审查上下文

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:25:30 +00:00
accelerator
4c90bf0b9c feat: 添加Agent审查引擎核心类型和Schema定义
定义ReviewRun、Finding、ReviewContext等核心数据结构,以及基于Zod的finding响应校验Schema

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 03:24:12 +00:00
accelerator
3a0cb36f02 feat(admin): 添加后台管理界面和Webhook管理功能
- 添加前端管理界面组件,包括仓库管理、数据表格和仓库表格列
- 添加后端管理API,支持仓库列表、Webhook创建和删除
- 更新Docker配置,支持前端和后端的多阶段构建
- 添加管理员认证功能,包括JWT令牌验证
- 更新配置文件,支持管理员密码和JWT密钥配置
- 更新README文档,添加后台管理功能说明和使用指南
- 优化.gitignore文件,简化Docker构建时的忽略规则
- 更新TypeScript配置,添加路径映射支持
2025-09-24 21:57:24 +08:00
jeffusion
2b088a653d chore: 补充项目cursor rules 2025-04-23 13:54:10 +08:00
jeffusion
e9d4f6776c feat: 增加pr提醒,支持飞书机器人消息通知 2025-04-23 13:38:26 +08:00
jeffusion
b8e5c5eb41 feat: 项目更名并调整接口 2025-04-23 13:37:07 +08:00
jeffusion
ad8aaa0615 [feat] 支持自定义prompt模板 2025-03-19 10:26:03 +08:00
jeffusion
0d09a951b2 [bugfix] 修复对于gitea webhook签名的检查失败问题 2025-03-14 11:52:04 +08:00
jeffusion
e488ebc492 [feat] 优化代码审核接受事件 2025-03-14 11:20:10 +08:00
jeffusion
dc4fb459b4 [feat] 初始化gitea代码AI审核程序 2025-03-14 11:20:02 +08:00