Expand description
Task capability implementation.
Tasks let a server run a long-running operation while the caller polls for
status (tasks/get) and, once terminal, the payload (tasks/result).
The store itself (TaskManager, TaskHandle, route_task_store) is
shared with the client side and lives in mcpkit_core::tasks; this
module re-exports it and adds the server-only TaskService.
Structs§
- Task
Event - A task status transition observed by the store.
- Task
Handle - Handle for driving a tracked task to a terminal state.
- Task
Manager - Manager coordinating the lifecycle of tracked tasks.
- Task
Service - Task service implementing the
TaskHandlertrait over aTaskManager. - Task
State - Internal state for a tracked task.
- Task
Status Notifier - Publishes
notifications/tasks/statuswhen a task changes status.
Enums§
- Task
Payload - The terminal outcome of the request a task wraps.
- Task
Route - What a task store decided about a request.
Constants§
- DEFAULT_
TASK_ TTL_ MS - Default retention for a terminal task whose request omitted a
ttl(one hour, in milliseconds). Override viaTaskManager::with_default_ttl. - RELATED_
TASK_ META_ KEY - The
_metakey associating a message with a task (io.modelcontextprotocol/related-task).
Traits§
- Notification
Sink - Where an ambient notification goes on a given transport.
- Task
Observer - Observer notified of every task status transition in a
TaskManager.
Functions§
- route_
task_ store - Serve task queries from a
TaskManagerstore. - session_
task_ store - Build a per-session task store that publishes
notifications/tasks/statusonto the session’s SSE stream registry.