Phase E of the AFFiNE parity plan (ADR-15): - internal/ai: OpenAI-compatible, Anthropic (official Go SDK) and Ollama drivers; BYOK profiles per workspace and for the instance, with keys encrypted by DOCWELL_SECRET_KEY, failover order, a test call and usage counters. - Embeddings: an indexer that follows PocketBase like the search index, chunks pages along their blocks and keeps vectors in a bbolt file in the data dir (no cgo); progress, ignored pages and extra files. - Chat sessions scoped to a page, space or workspace, streamed as server-sent events, with citations to pages and blocks, fork and history; retrieval only from pages the asker can read. - Writing actions (rewrite, fix, shorter, longer, summarise, translate, continue, custom) in the editor's selection toolbar. - POST /mcp: MCP over Streamable HTTP with personal API tokens; read tokens search and read pages, write tokens also create and update them. - Web app chat panel (Ctrl+J), workspace AI settings, an admin AI page, OpenAPI, generated clients, migration and translations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
175 KiB
175 KiB