diff --git a/Sources/LanguageServerProtocol/LanguageServerProtocol.swift b/Sources/LanguageServerProtocol/LanguageServerProtocol.swift index 8ad4bec..3c7af98 100644 --- a/Sources/LanguageServerProtocol/LanguageServerProtocol.swift +++ b/Sources/LanguageServerProtocol/LanguageServerProtocol.swift @@ -10,6 +10,15 @@ public enum ProtocolError: Error { case missingReply } +public enum ClientEvent: Sendable { + public typealias RequestResult = Result + public typealias RequestHandler = @Sendable (RequestResult) async -> Void + + case request(id: JSONId, request: ClientRequest) + case notification(ClientNotification) + case error(Error) +} + public enum ServerEvent: Sendable { public typealias RequestResult = Result public typealias RequestHandler = @Sendable (RequestResult) async -> Void