turul_mcp_ext_tasks/lib.rs
1//! # MCP Tasks Extension (`io.modelcontextprotocol/tasks`, SEP-2663)
2//!
3//! Spec-neutral host crate for the Tasks extension. Task support differs by
4//! spec line — 2025-11-25 carries tasks in core, while 2026-07-28 moves them
5//! to the `io.modelcontextprotocol/tasks` extension — so each lane lives in
6//! its own feature-gated module rather than a per-spec crate fork.
7//!
8//! Currently implemented: the [`v2026_07_28`] module (SEP-2663 redesigned
9//! lifecycle). The 2025-11-25 reconciliation rides the core protocol crates
10//! today and is not re-hosted here yet.
11//!
12//! ## The 2026-07-28 lifecycle (SEP-2663)
13//!
14//! - polling via `tasks/get` (`pollIntervalMs` hint) — no blocking `tasks/result`
15//! - `tasks/update` delivers input responses to `input_required` tasks
16//! - no `tasks/list`
17//! - unsolicited task handles allowed (`CreateTaskResult` with
18//! `resultType: "task"` in lieu of any standard result)
19//! - optional `notifications/tasks` status pushes, subscribed via
20//! `subscriptions/listen` with `taskIds` filter fields
21//!
22//! Adding this crate as a dependency is the opt-in — extensions are disabled
23//! by default. Server-side dispatch lives in `turul-mcp-server` behind its
24//! `ext-tasks` feature (`.with_ext_tasks(store)` + `.ext_task_tool(...)`). Schema provenance: `schema/README.md` (vendored from
25//! `modelcontextprotocol/ext-tasks` at a pinned commit).
26//!
27//! See the SEP: <https://modelcontextprotocol.io/seps/2663-tasks-extension>.
28
29#[cfg(feature = "protocol-2026-07-28")]
30pub mod v2026_07_28;
31
32#[cfg(feature = "protocol-2026-07-28")]
33pub use v2026_07_28::{
34 CancelTaskParams, CreateTaskResult, DetailedTask, EXTENSION_IDENTIFIER, GetTaskParams,
35 GetTaskResult, InMemoryTaskStore, InputDelivery, InvalidExtensionIdentifier,
36 METHOD_NOTIFICATIONS_TASKS, METHOD_TASKS_CANCEL, METHOD_TASKS_GET, METHOD_TASKS_UPDATE,
37 Nullable, RESULT_TYPE_TASK, RetentionPolicy, SweepAction, SweepReport, Task, TaskAckResult,
38 TaskFields, TaskState, TaskStatus, TaskStatusNotificationParams, TaskStore, TaskStoreError,
39 TaskSubscriptionAcknowledgedNotifications, TaskSubscriptionNotifications, UpdateTaskParams,
40 capability, declared_by_client, declared_by_server, validate_identifier,
41};