3 Commits

Author SHA1 Message Date
9b2dc1ee6b fix: publish port 8001 to host, replace curl healthcheck with python3 urllib 2026-05-12 23:09:03 +00:00
Carlos Garcia
a3fbc9746f fix: remove stale port binding and deprecated version key from compose
- Remove ports: mapping (192.168.2.47:8001:8001 — stale IP from prior host,
  caused 'cannot assign requested address' bind failure). Agent is only
  reachable via activeblue-net; no host exposure needed.
- Remove top-level version: key (obsolete, triggers deprecation warning).

These fixes were applied manually on the miaai host but never committed,
causing git pull to conflict and the Python fixes to silently not apply.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 16:53:54 -04:00
ActiveBlue Build
430ab966b2 feat(service): add FastAPI agent service with 5 routers and Docker setup
- config.py: pydantic-settings with all env vars, privacy mode, per-agent overrides
- app_state.py: global singletons (pool, master agent, registry, llm_router, sweep)
- main.py: FastAPI lifespan startup — DB pool, LLM router, Odoo client, agents, master
- routers/dispatch.py: POST /dispatch with rate limiting and webhook secret auth
- routers/approval.py: GET /approval/pending, POST /approval/respond
- routers/registry.py: GET/POST /registry/agents, POST /registry/backend overrides
- routers/sweep.py: POST /sweep trigger, GET /sweep/status
- routers/health.py: GET /health, GET /health/detailed (DB/Odoo/Ollama checks)
- requirements.txt: pinned deps (fastapi, uvicorn, asyncpg, anthropic, alembic)
- Dockerfile: python:3.11-slim, single uvicorn worker
- docker-compose.yml: agent-service + postgres:15, bound to 192.168.2.47:8001

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 17:54:28 -04:00