Increase deprecation levels (#393)
This commit is contained in:
parent
13f858d5d2
commit
2996ce45ea
6 changed files with 5 additions and 12 deletions
|
|
@ -33,7 +33,7 @@ import kotlin.concurrent.atomics.AtomicBoolean
|
|||
import kotlin.concurrent.atomics.ExperimentalAtomicApi
|
||||
import kotlin.time.Duration
|
||||
|
||||
@Deprecated("Use SseClientTransport instead", ReplaceWith("SseClientTransport"), DeprecationLevel.WARNING)
|
||||
@Deprecated("Use SseClientTransport instead", ReplaceWith("SseClientTransport"), DeprecationLevel.ERROR)
|
||||
public typealias SSEClientTransport = SseClientTransport
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
public final class io/modelcontextprotocol/kotlin/sdk/server/KtorServerKt {
|
||||
public static final fun MCP (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function1;)V
|
||||
public static final fun mcp (Lio/ktor/server/application/Application;Lkotlin/jvm/functions/Function1;)V
|
||||
public static final fun mcp (Lio/ktor/server/routing/Routing;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
|
||||
public static final fun mcp (Lio/ktor/server/routing/Routing;Lkotlin/jvm/functions/Function1;)V
|
||||
|
|
|
|||
|
|
@ -60,12 +60,6 @@ public fun Routing.mcp(block: ServerSSESession.() -> Server) {
|
|||
}
|
||||
}
|
||||
|
||||
@Suppress("FunctionName")
|
||||
@Deprecated("Use mcp() instead", ReplaceWith("mcp(block)"), DeprecationLevel.ERROR)
|
||||
public fun Application.MCP(block: ServerSSESession.() -> Server) {
|
||||
mcp(block)
|
||||
}
|
||||
|
||||
@KtorDsl
|
||||
public fun Application.mcp(block: ServerSSESession.() -> Server) {
|
||||
install(SSE)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import kotlin.uuid.Uuid
|
|||
|
||||
internal const val SESSION_ID_PARAM = "sessionId"
|
||||
|
||||
@Deprecated("Use SseServerTransport instead", ReplaceWith("SseServerTransport"), DeprecationLevel.WARNING)
|
||||
@Deprecated("Use SseServerTransport instead", ReplaceWith("SseServerTransport"), DeprecationLevel.ERROR)
|
||||
public typealias SSEServerTransport = SseServerTransport
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ fun runSseMcpServerWithPlainConfiguration(port: Int, wait: Boolean = true) {
|
|||
routing {
|
||||
sse("/sse") {
|
||||
val transport = SseServerTransport("/message", this)
|
||||
val serverSession = server.connect(transport)
|
||||
val serverSession = server.createSession(transport)
|
||||
serverSessions[transport.sessionId] = serverSession
|
||||
|
||||
serverSession.onClose {
|
||||
|
|
@ -197,7 +197,7 @@ fun runMcpServerUsingStdio() {
|
|||
)
|
||||
|
||||
runBlocking {
|
||||
server.connect(transport)
|
||||
server.createSession(transport)
|
||||
val done = Job()
|
||||
server.onClose {
|
||||
done.complete()
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ fun runMcpServer() {
|
|||
)
|
||||
|
||||
runBlocking {
|
||||
val session = server.connect(transport)
|
||||
val session = server.createSession(transport)
|
||||
val done = Job()
|
||||
session.onClose {
|
||||
done.complete()
|
||||
|
|
|
|||
Loading…
Reference in a new issue