feat: OpenAPI and MCP from the same serve handlers (#20)
Tests / Test (push) Failing after 5s
Tests / Release (semver) (push) Skipped

Agents get GET /openapi.json and POST /mcp. Tool names match
search/get/stats/audit paths so PicoClaw does not need shebangs.
This commit is contained in:
2026-08-13 21:26:06 +01:00
committed by GitHub
co-authored by GitHub
parent 2fede46dcd
commit 77c635b16b
11 changed files with 442 additions and 9 deletions
+8 -1
View File
@@ -69,4 +69,11 @@ Conflicting pairings (≥2 yes vs ≥2 no) = hypothesis (OQ1 → v2 resolution).
(`system_ladybug`). They do not exec Python. Control questions for recall@5
live in `internal/brain/rank` so CI can test the table without libladybug.
Python `bin/kb/{get,stats,eval}` remain for GitHub Actions until the runner
has ladybug cgo. Index/write is still `bin/kb/index`.
has ladybug cgo. Index/write is still `bin/kb/index`.
## Agent API (D20)
`bin/brain/serve.go` exposes the same `internal/httpapi.Ops` table as OpenAPI
(`GET /openapi.json`) and MCP (`POST /mcp` JSON-RPC `tools/list` +
`tools/call`). Tool names match paths: `search`, `get`, `stats`, `audit`.
Agents should use these endpoints instead of shebang CLIs.