mirror of
https://github.com/jeffusion/gitea-ai-assistant.git
synced 2026-06-08 07:26:52 +00:00
- Add agent-kernel runtime (MainAgentRunner with while-true state machine, subagent spawning, tool loop, budget control) - Add review-agent entrypoint with read_file/search_code/spawn_subagent tools - Add deterministic publish adapter with cross-specialist finding dedup - Delete old fixed workflow (orchestrator, triage, specialist, judge agents, 4 domain agents, critic/debate/reflexion agents, learning/memory system) - Remove legacy ModelRole (planner/specialist/judge) from LLM types, gateway, config schema, DB, and frontend RoleAssignment UI - Replace RoleAssignment with AgentModelSettings for role-based model config - Add agent config API endpoints (GET/PUT /admin/api/agents/config) - Add review session detail page with observability/findings/logs tabs - Add runtime contract tests and review adapter integration tests - Add E2E mock LLM with scripted behavior support for deterministic testing - Update E2E test script with subagent and finding assertions - Add e2e/README.md with real PR review testing guide - Fix seed.sh to run gitea admin commands as git user (not root) - Update docs (configuration, review-engines, deployment, README) - Remove unused feedback controller, qdrant k8s manifest, embedding migration - Add .omo/ and .opencode/ to .gitignore
106 lines
3.0 KiB
Markdown
106 lines
3.0 KiB
Markdown
# Gitea AI Assistant
|
|
|
|
[](https://opensource.org/licenses/MIT)
|
|
|
|
AI-powered code review assistant for Gitea. It receives webhooks, runs AI review workflows, and posts summary + line-level feedback back to Gitea.
|
|
|
|
- English docs: [./docs/README.md](./docs/README.md)
|
|
- 中文文档: [./docs/README.zh-CN.md](./docs/README.zh-CN.md)
|
|
|
|
## Why this project
|
|
|
|
- 🤖 **Automated PR + commit review** via webhook events (`pull_request`, `status`)
|
|
- 🧠 **Two review engines**: `agent` (native Agent pipeline) and `codex` (Codex CLI pipeline)
|
|
- 🧵 **Pluggable LLM providers**: OpenAI Compatible, OpenAI Responses API, Anthropic, Gemini
|
|
- 📍 **Actionable output**: summary comments and line-level findings
|
|
- 🎛️ **Web Admin UI** for runtime configuration (providers, models, webhook, review policy)
|
|
- 🔔 **Notifications**: Feishu + WeCom (企业微信)
|
|
- 🔐 **Security-first defaults**: webhook signature verification + encrypted API key storage
|
|
|
|
## Product screenshot
|
|
|
|
> Dashboard screenshot is generated from local dev service.
|
|
|
|

|
|
|
|
More screenshots (one per admin menu): [EN](./docs/screenshots.md) | [中文](./docs/screenshots.zh-CN.md)
|
|
|
|
## Architecture (high-level)
|
|
|
|
```
|
|
Gitea Webhook -> Gitea AI Assistant (Hono + Bun) -> LLM Gateway (multi-provider)
|
|
|
|
|
+-> Admin Dashboard (React)
|
|
```
|
|
|
|
For component-level design, see [Architecture docs](./docs/README.md#architecture--design).
|
|
|
|
## Quick start (minimal)
|
|
|
|
### 1) Prerequisites
|
|
|
|
- Bun >= 1.2.5
|
|
- Reachable Gitea instance
|
|
- At least one LLM provider credential
|
|
|
|
### 2) Install
|
|
|
|
```bash
|
|
git clone https://github.com/user/gitea-ai-assistant.git
|
|
cd gitea-ai-assistant
|
|
bun install
|
|
```
|
|
|
|
If lifecycle scripts are disabled in your environment, run:
|
|
|
|
```bash
|
|
bun run bootstrap
|
|
```
|
|
|
|
### 3) Minimal `.env`
|
|
|
|
```bash
|
|
PORT=5174
|
|
ENCRYPTION_KEY= # required, 64 hex chars (openssl rand -hex 32)
|
|
# DATABASE_PATH=./data/assistant.db
|
|
# LOG_LEVEL=info # dev default; use LOG_LEVEL=error in production
|
|
```
|
|
|
|
> `ENCRYPTION_KEY` is mandatory. The app refuses to start without it.
|
|
|
|
### 4) Run
|
|
|
|
```bash
|
|
bun run dev
|
|
# or
|
|
bun run start
|
|
```
|
|
|
|
### 5) Configure in Admin UI
|
|
|
|
Open `http://your-server:5174`, login with default `password` (first boot only), then change it immediately.
|
|
|
|
- Configure Gitea API + tokens
|
|
- Configure webhook secret
|
|
- Configure LLM providers/models
|
|
- Configure review engine and policy
|
|
|
|
### 6) Add webhook in Gitea
|
|
|
|
- URL: `http://your-server:5174/webhook/gitea`
|
|
- Content-Type: `application/json`
|
|
- Secret: same as dashboard webhook secret
|
|
- Events: Pull Request + Status
|
|
|
|
## Progressive disclosure: detailed docs
|
|
|
|
- [Documentation index](./docs/README.md)
|
|
- [Getting started details](./docs/getting-started.md)
|
|
- [Configuration reference](./docs/configuration.md)
|
|
- [Review engines](./docs/review-engines.md)
|
|
- [Deployment (Docker / Compose / Kubernetes)](./docs/deployment.md)
|
|
|
|
## License
|
|
|
|
MIT License
|