Distributed QueueTaskExecutor and Task Progress/Log Forwarding on litestar-queues tools/call with params.task persists TaskRecord and ToolTaskCall (progress_token, session_id, log_level, PrincipalSnapshot) in MCPTaskStore, runs on litestar-queues workers calling ctx.report_progress() and ctx.log() to update MCPTaskStore.update_status_message() and fan out notifications/progress onto strictly matched 2025-* GET /mcp session SSE streams (while 2026-07-28 POST subscriptions/listen carries notifications/tasks and opted-in logLevel notifications/message while excluding notifications/progress), and refreshes log_level from MCPSessionStore on tasks/update. Task Promotion tools/call (params.task) Captures PrincipalSnapshot & owner_id ToolTaskCall.progress_token Persists session_id & log_level request.user & SecurityContext Persists TaskRecord before return Returns CreateTaskResult Durable Store & Broker MCPTaskStore + QueuePlugin Store: litestar_mcp_tasks (TTL) MCPTaskStore.update_status_message() QueueTaskExecutor.submit() / resume() MCPSessionStore log_level refresh on tasks/update • queue="..." Postgres / Redis / SQLSpec Worker Rehydration Replica Worker Execution Rehydrates user, auth & Dishka Restores progress_token & log_level ctx.report_progress() -> statusMessage ctx.log() RFC 5424 severity filter ChannelsPlugin cross-replica fan-out Cooperative CancelScope SSE & Task Control tasks/get • update • cancel 2025-11-25 GET /mcp SSE push: notifications/progress notifications/message MCPInputRequiredResult pause tasks/update refreshes log_level Cross-Replica Safe Cross-Replica Progress, Logging & Transport Isolation Worker ctx.report_progress() & ctx.log() -> update_status_message() + ChannelsPlugin -> 2025-11-25 GET /mcp SSE 2026-07-28 subscriptions/listen: notifications/tasks + opted-in logLevel (excludes progress) | tasks/get statusMessage
Built-In MCPTaskStore, Promoted Progress/Logging, and Elicitation Lifecycle Built-in MCPTaskStore persists strictly owner-scoped TaskRecord and ToolTaskCall metadata (progress_token, session_id, log_level), updates TaskRecord.statusMessage via MCPTaskStore.update_status_message(), and forwards notifications/progress and notifications/message onto 2025-* GET /mcp session SSE streams while 2026-07-28 subscriptions/listen carries taskIds and opted-in logLevel events (excluding progress). Promoted Context tools/call (params.task) Validates task="optional" | "required" Captures ToolTaskCall(progress_token, session_id, log_level, owner_id) Single-writer Store keys with TTL Detaches runner after HTTP return Immediate taskId handle MCPTaskStore State Machine litestar_mcp_tasks Store working -> input_required -> completed Executes tool via internal ASGI dispatch MCPTaskStore.update_status_message() Updates TaskRecord.statusMessage live Filters ctx.log() by session log_level Zero external broker required Session SSE, Poll & Resume GET /mcp SSE • tasks/get • update Forwards notifications/progress & message onto 2025-11-25 GET /mcp session SSE subscriptions/listen: tasks + logLevel only tasks/get returns statusMessage & result tasks/update resumes & refreshes log_level Owner-isolated lookup & tasks/cancel Post-Promotion Progress, RFC 5424 Logging & Transport Rules ToolTaskCall(progress_token, session_id, log_level) -> MCPTaskStore.update_status_message() -> TaskRecord.statusMessage 2025-* GET /mcp: notifications/progress + notifications/message | 2026-07-28 subscriptions/listen: excludes progress