Ollama provider, agent registry, canton UX, i18n, and test infrastructure in one commit
fedec65 landed a 6,150-line second-phase commit bundling six independent subsystems: a local Ollama LLM provider with dynamic model discovery, a 20-agent persona registry, per-chat canton context, next-intl i18n scaffolding, Supabase local dev setup, and the first backend test suite. Several pieces have value outside the Swiss legal context; extracting them requires manual splitting.
The Ollama provider (backend/src/lib/llm/ollama.ts) polls ${host}/api/tags to discover available models dynamically, maps them to internal IDs (llama3.2:latest becomes ollama-llama3.2-latest), and wires into the existing resolveModel() path for any ollama-* ID. A new GET /chat/models/ollama endpoint exposes the list to the frontend. The strict privacy mode routes automatically to the user's preferred Ollama model. No API key needed.
The agent registry defines 20 personas, each with a system prompt and a preferredTools array. The list runs from general through litigator, drafter, federal_analyst, a three-way adversarial triad (adversarial_advocate/adversary/judge), and domain specialists like corporate_lawyer, tax_advisor, and cas_specialist (Court of Arbitration for Sport). Per-chat selection is exposed through an AgentSelector component. The persona prompts are Swiss-specific but the registry pattern itself is general.
The Supabase local dev setup is the most straightforwardly portable piece: a complete supabase/config.toml, a full schema snapshot, and dated migrations. The test suite (vitest + supertest + Playwright, claimed 43 backend tests passing) was also missing from upstream.
The catch for adoption: all of this is a single commit. Package-lock churn alone is roughly 2,400 lines across frontend and backend, and the subsystems are intermixed in the file changes.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?