New 'domains' key accepts comma-separated MCP_DOMAINS env var,
falling back to single MCP_DOMAIN value for backward compatibility.
Co-Authored-By: Virgil <virgil@lethean.io>
Instead of hardcoding mcp.host.uk.com as the default, derive it from
APP_DOMAIN env var so it works automatically per environment without
needing a separate MCP_DOMAIN override.
Co-Authored-By: Virgil <virgil@lethean.io>
Brain memories can now be stored in a separate database, co-located
with Qdrant vectors on the homelab. Defaults to the app's main DB
when no BRAIN_DB_* env vars are set (zero-config for existing installs).
- Add brain.database config with BRAIN_DB_* env var support
- Register 'brain' database connection in Boot.php
- Set BrainMemory model to use 'brain' connection
- Update BrainService transactions to use brain connection
- Update migration to use brain connection, drop workspace FK
(cross-database FKs not supported)
- Add migration to drop FK on existing installs
- Update default URLs from *.lthn.lan to *.lthn.sh
Co-Authored-By: Virgil <virgil@lethean.io>
Ollama and Qdrant defaults now use ollama.lthn.lan and
qdrant.lthn.lan to match the homelab service mesh naming.
Co-Authored-By: Virgil <virgil@lethean.io>
Ollama is behind Traefik reverse proxy on ollama.lan, so no port
needed and TLS should be enforced by default.
Co-Authored-By: Virgil <virgil@lethean.io>
Make embedding model swappable via BRAIN_EMBEDDING_MODEL env var.
Switch default from nomic-embed-text to embeddinggemma (Gemma 3
based, 2x better cluster separation in benchmarks).
Default Ollama URL now points to ollama.lan (Linux homelab GPU).
Co-Authored-By: Virgil <virgil@lethean.io>
Replace hardcoded cache key in ForAgentsController with a config-based
key (`mcp.cache.for_agents_key`) and configurable TTL
(`mcp.cache.for_agents_ttl`). This prevents collisions with other modules
or packages that might use the same flat cache key.
- Add `cacheKey()` method on ForAgentsController, reads from config
- Add `cache` section to config.php with default key and TTL
- Dynamic Cache-Control max-age now follows the configured TTL
- Add ForAgentsControllerTest covering key customisation,
cache storage, invalidation, TTL, and response structure
Refs: TODO.md CQ-003
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>