Implements v0.0.1 of OpenBrain: - FastAPI REST API (capture, search, recent, stats) with Bearer auth - MCP server (streamable HTTP at /mcp) exposing all 4 tools - pgvector schema (vector(1024) for bge-m3) - asyncpg connection pool with lazy init + graceful close - Ollama embedding client with fallback (stores thought without vector if Ollama unreachable) - Woodpecker CI pipeline (lint + kaniko build + push to Gitea registry) - Portainer/Swarm deployment compose - Mosaic framework files: AGENTS.md, PRD.md, TASKS.md, scratchpad Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
Scratchpad: v0.0.1 Build
Date: 2026-03-02 Objective: Build and deploy alpha OpenBrain service
Plan
- Scaffold project structure
- Core brain operations (capture, search, recent, stats)
- FastAPI REST + MCP server (single process)
- pgvector schema
- Dockerfile
- Portainer compose
- Woodpecker CI pipeline
- Mosaic framework files (AGENTS.md, PRD.md, TASKS.md)
- Initial commit + push
- Woodpecker secrets verified
- DNS + Traefik config for brain.woltje.com
- Host init.sql copy + Portainer stack deploy
- Smoke test via MCP
Decisions
- Single Python process for REST + MCP (avoids 2-container overhead for alpha)
- Streamable HTTP MCP transport (not stdio — deployed service, needs HTTP)
- bge-m3 via existing Ollama at 10.1.1.42 (verified live)
- vector(1024) — bge-m3 native, no padding
- Graceful fallback: thoughts stored without embedding if Ollama unreachable
- pgvector/pgvector:pg17 official image — no custom build needed
Blockers / Notes
- Woodpecker CI secrets (GITEA_USERNAME, GITEA_TOKEN) must be set for build pipeline
- DNS record for brain.woltje.com needs to be created
- Init SQL must be on host at /opt/openbrain/init.sql before first Portainer deploy
- MCP auth: headers passed via Claude Code settings — confirm MCP SDK accepts headers on streamable HTTP
Risks
- MCP streamable HTTP transport is newer spec — need to verify Claude Code supports it
- Fallback: switch to SSE transport (mcp.server.sse.SseServerTransport)