- ChatWindow now gathers page context (URL, collectionSlug, document ID) - chatEndpoint fetches real AIChatPermissions from database - Agent uses OpenRouter Gemini 3 Flash with maxSteps: 10 for autonomous multi-step tool execution - Fallback default collections when no permissions configured