Phase 2: Tool calling + Microsoft 365 integrations
- Add tool framework (BaseTool ABC, ToolRegistry, ToolContext/ToolResult)
- Implement agentic loop in LLMFactory.stream_with_tools() with max_rounds and timeout
- Add 9 Microsoft Graph tools: Calendar (3), Mail (3), Teams (1), Planner (2)
- Add Graph Token Manager with Fernet encryption and auto-refresh
- Add consent flow endpoints (start/callback/status/revoke)
- Add admin tool management endpoints (list/toggle)
- Add SSE tool events (tool_start, tool_result, tool_error) in chat endpoint
- Frontend: ToolCallCard component, tool call tracking in chat store
- Frontend: Admin Integrations tab with per-tool enable/disable
- Frontend: Consent banner and M365 connect flow
- Migration 008: tool_definitions, user_graph_tokens, message_tool_calls tables
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>