Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Sources/MCP/Base/Transports/HTTPServer/HTTPServerTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,18 @@ public protocol HTTPContextProviding: Sendable {
func httpRequestContext(for id: ID) async -> HTTPRequest?
}

/// A transport-internal mapping between private routed ids and client wire ids.
package protocol RoutedRequestIDProviding: Sendable {
func originalRequestID(for routedID: ID) async -> ID?

/// Returns `nil` when the wire id has no active exchange or is ambiguous.
func routedRequestID(for originalID: ID) async -> ID?
}

package protocol CancelledHTTPExchangeCompleting: Sendable {
func completeCancelledExchange(for routedID: ID, reason: String?) async
}

// MARK: - JSON-RPC Message Classification

/// Classifies a raw JSON-RPC message for routing purposes.
Expand Down
Loading
Loading