chore: snapshot main sync

This commit is contained in:
2026-06-17 20:08:31 +00:00
parent b18de2a331
commit 8bd32537cf
354 changed files with 10208 additions and 9230 deletions

View File

@@ -1,6 +1,6 @@
# BooCode architecture
Last updated: 2026-05-25. **Navigation:** `AGENTS.md`. **Deep reference:** `CLAUDE.md`.
Last updated: 2026-06-17. **Navigation:** `AGENTS.md`. **Deep reference:** `CLAUDE.md`.
## System overview
@@ -19,9 +19,9 @@ flowchart TB
BooChat["boocode container<br/>apps/server + built web<br/>:9500"]
BooTerm["booterm container<br/>apps/booterm<br/>:9501"]
PG[("boocode_db<br/>Postgres 16<br/>database: boochat<br/>host :5500")]
CC["codecontext sidecar<br/>:8080 internal"]
end
BooCoder["boocoder.service<br/>apps/coder<br/>:9502"]
BooControl["boocontrol.service<br/>apps/control<br/>:9503"]
Agents["Host CLI agents<br/>opencode goose claude qwen"]
LLM["llama-swap<br/>100.101.41.16:8401"]
end
@@ -30,24 +30,28 @@ flowchart TB
SPA -->|"HTTP /api WS /api/ws"| BooChat
SPA -->|"WS /ws/term"| BooTerm
SPA -->|"HTTP /api/coder proxy<br/>WS direct"| BooCoder
SPA -->|"HTTP /api/control proxy<br/>WS control stream"| BooControl
BooChat --> PG
BooTerm --> PG
BooCoder --> PG
BooChat -->|"HTTP tools"| CC
BooControl --> PG
BooChat -->|"streamText"| LLM
BooCoder -->|"native inference"| LLM
BooControl -->|"gateway / bench / eval / pull"| LLM
BooCoder -->|"ACP or PTY spawn"| Agents
BooCoder -->|"MCP client + boocontext tools"| Agents
Agents --> LLM
```
## Three surfaces, one database
## Four surfaces, one database
| Surface | Code | Runtime | Primary role |
|---------|------|---------|--------------|
| BooChat | `apps/server` + `apps/web` | Docker | Read-only chat, file tools, MCP client, skills |
| BooTerm | `apps/booterm` + terminal panes in `apps/web` | Docker | tmux + xterm.js PTY panes |
| BooCoder | `apps/coder` + `CoderPane` in `apps/web` | Host systemd | Write tools, task queue, ACP/PTY agent dispatch |
| BooControl | `apps/control` + `/control` in `apps/web` | Host systemd | Fleet cockpit, gateway, bench/evals/jobs, reports |
All surfaces share Postgres (`boochat` DB). Cross-surface joins link chats, tasks, and sessions.
@@ -94,7 +98,7 @@ flowchart LR
Inf --> Apply["apply_pending → disk"]
```
Since v2.1.0, BooCoder runs on the host (not Docker). Agent binaries spawn directly no SSH tunnel.
Since v2.1.0, BooCoder runs on the host (not Docker). Agent binaries spawn directly - no SSH tunnel.
See [coder-backends.md](./coder-backends.md) for the full dispatch-backend reference: routing predicates, the warm vs. one-shot lifecycle, agent-session resume, and the provider-discovery pipeline.
@@ -102,10 +106,10 @@ See [coder-backends.md](./coder-backends.md) for the full dispatch-backend refer
| Service | Reachability | Purpose |
|---------|--------------|---------|
| codecontext | `http://codecontext:8080` from Docker network | Code graph / symbol analysis (Go sidecar) |
| llama-swap | `LLAMA_SWAP_URL` env | Local LLM inference + model props |
| SearXNG | `SEARXNG_URL` (Tailscale Fathom) | `web_search` / `web_fetch` when enabled |
| MCP servers | `/data/mcp.json` config | Optional tools (e.g. Context7), read-only in BooChat |
| boocontext | via BooCoder MCP/tool wiring | Tree-sitter code analysis, callgraph, symbols, health, scan |
| MCP servers | `/data/mcp.json` config | Optional tools for chat/coder flows |
## Config and data files
@@ -119,6 +123,7 @@ See [coder-backends.md](./coder-backends.md) for the full dispatch-backend refer
## Deploy topology
- **BooChat + BooTerm + Postgres + codecontext:** `docker compose up --build -d` from `/opt/boocode`
- **BooChat + BooTerm + Postgres:** `docker compose up --build -d` from `/opt/boocode`
- **BooCoder:** `pnpm -C packages/contracts build && pnpm -C apps/server build && pnpm -C apps/coder build && sudo systemctl restart boocoder`
- **Ports bind to Tailscale IP** `100.114.205.53`, not `0.0.0.0` — use that IP for host smoke curls
- **BooControl:** `pnpm -C apps/control build && sudo systemctl restart boocontrol`
- **Ports bind to Tailscale IP** `100.114.205.53`, not `0.0.0.0` - use that IP for host smoke curls