@@ -2154,13 +2154,182 @@ export const RootsListChangedNotificationSchema = NotificationSchema.extend({
21542154 params : NotificationsParamsSchema . optional ( )
21552155} ) ;
21562156
2157+ /* ───────────────────────────────────────────────────────────────────────────
2158+ * Tasks (2025-11-25 wire vocabulary, DEPRECATED)
2159+ *
2160+ * The task message surface defined by the 2025-11-25 protocol revision. These
2161+ * schemas are kept in the neutral layer so the public Task* types stay
2162+ * nameable without a cross-layer import into wire/rev*; the wire-parse
2163+ * contract for them is the FROZEN copy in wire/rev2025-11-25/schemas.ts.
2164+ *
2165+ * They appear in NO role aggregate below and no API signature — nameable-only
2166+ * vocabulary for interop with task-capable 2025 peers (#2248). Removable at
2167+ * the major version that drops 2025-era support.
2168+ * ─────────────────────────────────────────────────────────────────────────── */
2169+
2170+ /**
2171+ * Task creation parameters, used to ask that the server create a task to represent a request.
2172+ *
2173+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2174+ */
2175+ export const TaskCreationParamsSchema = z . looseObject ( {
2176+ /**
2177+ * Requested duration in milliseconds to retain task from creation.
2178+ */
2179+ ttl : z . number ( ) . optional ( ) ,
2180+
2181+ /**
2182+ * Time in milliseconds to wait between task status requests.
2183+ */
2184+ pollInterval : z . number ( ) . optional ( )
2185+ } ) ;
2186+
2187+ /**
2188+ * The status of a task.
2189+ *
2190+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2191+ */
2192+ export const TaskStatusSchema = z . enum ( [ 'working' , 'input_required' , 'completed' , 'failed' , 'cancelled' ] ) ;
2193+
2194+ /**
2195+ * A pollable state object associated with a request.
2196+ *
2197+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2198+ */
2199+ export const TaskSchema = z . object ( {
2200+ taskId : z . string ( ) ,
2201+ status : TaskStatusSchema ,
2202+ /**
2203+ * Time in milliseconds to keep task results available after completion.
2204+ * If `null`, the task has unlimited lifetime until manually cleaned up.
2205+ */
2206+ ttl : z . union ( [ z . number ( ) , z . null ( ) ] ) ,
2207+ /**
2208+ * ISO 8601 timestamp when the task was created.
2209+ */
2210+ createdAt : z . string ( ) ,
2211+ /**
2212+ * ISO 8601 timestamp when the task was last updated.
2213+ */
2214+ lastUpdatedAt : z . string ( ) ,
2215+ pollInterval : z . optional ( z . number ( ) ) ,
2216+ /**
2217+ * Optional diagnostic message for failed tasks or other status information.
2218+ */
2219+ statusMessage : z . optional ( z . string ( ) )
2220+ } ) ;
2221+
2222+ /**
2223+ * Result returned when a task is created, containing the task data wrapped in a `task` field.
2224+ *
2225+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2226+ */
2227+ export const CreateTaskResultSchema = ResultSchema . extend ( {
2228+ task : TaskSchema
2229+ } ) ;
2230+
2231+ /**
2232+ * Parameters for task status notification.
2233+ *
2234+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2235+ */
2236+ export const TaskStatusNotificationParamsSchema = NotificationsParamsSchema . merge ( TaskSchema ) ;
2237+
2238+ /**
2239+ * A notification sent when a task's status changes.
2240+ *
2241+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2242+ */
2243+ export const TaskStatusNotificationSchema = NotificationSchema . extend ( {
2244+ method : z . literal ( 'notifications/tasks/status' ) ,
2245+ params : TaskStatusNotificationParamsSchema
2246+ } ) ;
2247+
2248+ /**
2249+ * A request to get the state of a specific task.
2250+ *
2251+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2252+ */
2253+ export const GetTaskRequestSchema = RequestSchema . extend ( {
2254+ method : z . literal ( 'tasks/get' ) ,
2255+ params : BaseRequestParamsSchema . extend ( {
2256+ taskId : z . string ( )
2257+ } )
2258+ } ) ;
2259+
2260+ /**
2261+ * The response to a {@linkcode GetTaskRequest | tasks/get} request.
2262+ *
2263+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2264+ */
2265+ export const GetTaskResultSchema = ResultSchema . merge ( TaskSchema ) ;
2266+
2267+ /**
2268+ * A request to get the result of a specific task.
2269+ *
2270+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2271+ */
2272+ export const GetTaskPayloadRequestSchema = RequestSchema . extend ( {
2273+ method : z . literal ( 'tasks/result' ) ,
2274+ params : BaseRequestParamsSchema . extend ( {
2275+ taskId : z . string ( )
2276+ } )
2277+ } ) ;
2278+
2279+ /**
2280+ * The response to a `tasks/result` request.
2281+ * The structure matches the result type of the original request.
2282+ * For example, a {@linkcode CallToolRequest | tools/call} task would return the `CallToolResult` structure.
2283+ *
2284+ *
2285+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2286+ */
2287+ export const GetTaskPayloadResultSchema = ResultSchema . loose ( ) ;
2288+
2289+ /**
2290+ * A request to list tasks.
2291+ *
2292+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2293+ */
2294+ export const ListTasksRequestSchema = PaginatedRequestSchema . extend ( {
2295+ method : z . literal ( 'tasks/list' )
2296+ } ) ;
2297+
2298+ /**
2299+ * The response to a {@linkcode ListTasksRequest | tasks/list} request.
2300+ *
2301+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2302+ */
2303+ export const ListTasksResultSchema = PaginatedResultSchema . extend ( {
2304+ tasks : z . array ( TaskSchema )
2305+ } ) ;
2306+
2307+ /**
2308+ * A request to cancel a specific task.
2309+ *
2310+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2311+ */
2312+ export const CancelTaskRequestSchema = RequestSchema . extend ( {
2313+ method : z . literal ( 'tasks/cancel' ) ,
2314+ params : BaseRequestParamsSchema . extend ( {
2315+ taskId : z . string ( )
2316+ } )
2317+ } ) ;
2318+
2319+ /**
2320+ * The response to a {@linkcode CancelTaskRequest | tasks/cancel} request.
2321+ *
2322+ * @deprecated 2025-11-25 wire vocabulary with no SDK runtime; kept importable for interoperability only.
2323+ */
2324+ export const CancelTaskResultSchema = ResultSchema . merge ( TaskSchema ) ;
2325+
21572326/* Client messages */
21582327// NOTE (Q1 increment 2): the role unions below are the NEUTRAL message sets.
21592328// The 2025-era task vocabulary (tasks/* methods, task results, the task
2160- // status notification) is 2025-only WIRE vocabulary and now lives in
2161- // `wire/rev2025-11-25/ schemas.ts`, which also exports the era's full wire
2162- // role unions . The deprecated Task* types remain importable from the types
2163- // barrel (Q1-SD2); they appear in no role aggregate and no API signature .
2329+ // status notification) is 2025-only WIRE vocabulary; the deprecated Task*
2330+ // schemas above are nameable-only and appear in NO role aggregate and no API
2331+ // signature . The era's full wire role unions live in
2332+ // `wire/rev2025-11-25/schemas.ts` .
21642333export const ClientRequestSchema = z . union ( [
21652334 PingRequestSchema ,
21662335 InitializeRequestSchema ,
0 commit comments