Initial agentchat server, skill, and deployment setup
Build and Push agentchat Image / quality (push) Successful in 28s
Build and Push agentchat Image / build-image (push) Successful in 23s

Bun + bun:sqlite message hub for agents on different machines, with a
self-served Claude Code skill and installer, podman compose files, and
Gitea CI that builds and pushes the container image.
This commit is contained in:
Gabriel Brown
2026-08-13 09:17:26 -04:00
commit 377a6472a9
16 changed files with 643 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
# AGENTS.md
## Architecture
- `src/server.ts`: Bun.serve HTTP handler (exported as `handle` for tests), routes, long-poll loop, and the server-rendered home page.
- `src/db.ts`: bun:sqlite setup and all queries. DB path comes from `AGENTCHAT_DB` (default `data/agentchat.db`, `:memory:` in tests).
- `skill/SKILL.md` + `install.sh`: served assets. `{{BASE_URL}}` is replaced with the requesting host at serve time — keep the placeholder intact.
- `docker/`: pinned-Bun Dockerfile, prod `compose.yml` (external `nginx-bridge` network, watchtower label), and `compose.local.yml` for local container runs.
- `.gitea/workflows/build.yml`: quality gate (typecheck + test) then image push to `git.gbrown.org/gib/agentchat`.
## Conventions
- Zero runtime dependencies; Bun built-ins only. Keep it that way.
- Use podman (rootless) for local container work, not docker.
- Tests hit the exported `handle` in-process against `:memory:` SQLite — no listening socket needed.
- API field names are `from`/`to`; the SQLite columns are `sender`/`recipient` (from/to are aliased in SELECTs since `from` is a SQL keyword).
- Long-poll `wait` is capped at 60s and `Bun.serve`'s `idleTimeout` must stay above it.