Phase 2 of foreman: the daemon now acts as a transparent Ollama proxy.
- internal/ollama: Client interface and HTTP implementation for chat
(streaming + non-streaming), embed, tags, ps with auth forwarding,
NDJSON streaming via bufio.Scanner, and connection vs HTTP error
classification via custom error types.
- internal/ollama: ModelInventory with background poller for /api/tags
and /api/ps, degraded mode on target unreachable with model retention,
automatic recovery on reconnect.
- internal/server: Passthrough routes (/api/chat, /api/tags, /api/ps,
/api/embed, /api/embeddings) with model validation, chat serialization
gate (capacity-1 channel), concurrent embedding bypass (ADR-0013),
NDJSON streaming with per-chunk flush, and degraded health reporting.
- cmd/foreman: Full serve wiring with Ollama client, poller goroutine,
embedder warmup (keep_alive:-1), and signal-based shutdown.
The Mac is now usable as a go-llm target through foreman.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Phase 1 of foreman: initialize the Go module, project layout, and core
infrastructure. Includes env-based configuration (FOREMAN_* namespace),
SQLite-backed durable job queue with WAL mode via modernc.org/sqlite,
stdlib HTTP server with /healthz and optional bearer-token auth middleware,
subcommand dispatch (serve + stubs), Gitea CI workflow, multi-stage
distroless Dockerfile, and comprehensive tests for all packages.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>