Commit graph

11 commits

Author SHA1 Message Date
Snider
bad718da8d revert: remove domains array, keep single domain config
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
Multi-domain handled at app level via config override.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-03 17:08:52 +00:00
Snider
b75fa0ba57 feat: add mcp.domains config for multi-domain portal support
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
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>
2026-03-03 16:59:28 +00:00
Snider
8efd939ce4 fix: derive MCP portal domain from APP_DOMAIN
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
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>
2026-03-03 16:51:16 +00:00
Snider
331796c1da feat: add dedicated brain database connection for remote MariaDB
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
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>
2026-03-03 15:14:01 +00:00
Snider
02cc11d2cf chore: update default brain URLs to *.lthn.lan convention
Some checks failed
CI / PHP 8.3 (push) Failing after 2s
CI / PHP 8.4 (push) Failing after 2s
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>
2026-03-03 13:19:59 +00:00
Snider
c697a6657f chore(brain): use HTTPS for Qdrant via Traefik
Some checks failed
CI / PHP 8.3 (push) Failing after 3s
CI / PHP 8.4 (push) Failing after 2s
Qdrant is also behind Traefik at qdrant.lan alongside ollama.lan.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-03 10:13:06 +00:00
Snider
f17e1a0b6c chore(brain): use HTTPS for Ollama via Traefik
Some checks are pending
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
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>
2026-03-03 10:12:34 +00:00
Snider
43b470257b feat(brain): configurable embedding model, default to EmbeddingGemma
Some checks failed
CI / PHP 8.3 (push) Failing after 3s
CI / PHP 8.4 (push) Failing after 3s
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>
2026-03-03 10:10:02 +00:00
Snider
eeb6927d8f feat(brain): add BrainService, MCP tools, and registration
- BrainService: Ollama embeddings + Qdrant vector upsert/search/delete
- brain_remember: store knowledge with type, tags, confidence, supersession
- brain_recall: semantic search with filter by project/type/agent/confidence
- brain_forget: workspace-scoped deletion from both stores
- brain_list: MariaDB query with model scopes, no vector search
- Config: brain.ollama_url, brain.qdrant_url, brain.collection
- Boot: BrainService singleton + tool registration via AgentToolRegistry

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 09:39:19 +00:00
darbs-claude
7fba0955e4 refactor: namespace cache keys to prevent collisions (closes #20)
Some checks failed
CI / PHP 8.3 (pull_request) Failing after 1m35s
CI / PHP 8.4 (pull_request) Failing after 1m31s
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>
2026-02-23 06:18:30 +00:00
Snider
1350472d11 monorepo sepration 2026-01-27 00:28:29 +00:00