From 59b44a30e4ab816bc4658cfab3be69b90bf76063 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 2 Jun 2026 13:59:56 +0200
Subject: [PATCH 001/143] chore(deps): bump the other-dependencies group across
5 directories with 4 updates (#789)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps the other-dependencies group with 2 updates in the
/samples/kotlin-mcp-client directory:
[com.anthropic:anthropic-java](https://github.com/anthropics/anthropic-sdk-java)
and [com.gradleup.shadow](https://github.com/GradleUp/shadow).
Bumps the other-dependencies group with 1 update in the
/samples/kotlin-mcp-server directory:
[com.gradleup.shadow](https://github.com/GradleUp/shadow).
Bumps the other-dependencies group with 2 updates in the
/samples/kotlinlang-mcp-server directory:
[com.gradleup.shadow](https://github.com/GradleUp/shadow) and
[ch.qos.logback:logback-classic](https://github.com/qos-ch/logback).
Bumps the other-dependencies group with 1 update in the
/samples/simple-streamable-server directory:
[com.gradleup.shadow](https://github.com/GradleUp/shadow).
Bumps the other-dependencies group with 2 updates in the
/samples/weather-stdio-server directory:
[com.gradleup.shadow](https://github.com/GradleUp/shadow) and
[io.github.oshai:kotlin-logging-jvm](https://github.com/oshai/kotlin-logging).
Updates `com.anthropic:anthropic-java` from 2.34.0 to 2.35.0
Sourced from com.anthropic:anthropic-java's
releases. Full Changelog: v2.34.1...v2.35.0 Full Changelog: v2.34.0...v2.34.1 Sourced from com.anthropic:anthropic-java's
changelog. Full Changelog: v2.34.1...v2.35.0 Full Changelog: v2.34.0...v2.34.1 Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from ch.qos.logback:logback-classic's
releases. 2026-06-01 Release of logback version 1.5.34 • In case certain StackTraceElement values returned by the
Throwable.getStackTrace method are null, StackTraceElementProxy
substitutes a dummy instance instead of throwing an
IllegalArgumentException. This resolves [issues #1040](qos-ch/logback#1040),
reported by Naotsugu Kobayashi. • HardenedObjectInputStream will now throw an InvalidClassException
during deserialization attempts of Proxy classes. This change addresses
potential deserialization whitelist bypass vulnerability reported by York Shen and registered as CVE-2026-10532. • A bitwise identical binary of this version can be reproduced by
building from source code at commit
e62272ac152469aec1ede056c3c7d0d7314e7bfe associated with the tag
v_1.5.34. This release was built using Java "21" 2023-10-17
LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6. 2026-05-27 Release of logback version 1.5.33 • • When processing • • SSL parameters for • When printing the status message field,
• A bit-wise identical binary of this version can be reproduced by
building from source code at commit
124e8b49b55ac34d08743a0646bd463410192647 associated with the tag
v_1.5.33. Release built using Java "21" 2023-10-17 LTS build
21.0.1.+12-LTS-29 under Linux Debian 11.6. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from com.gradleup.shadow's
releases. Sourced from io.github.oshai:kotlin-logging-jvm's
releases. Align to semver. Full Changelog: https://github.com/oshai/kotlin-logging/compare/8.0.03...8.0.4 Sourced from com.gradleup.shadow's
releases. Sourced from org.jetbrains.kotlinx:atomicfu-gradle-plugin's
releases. Sourced from io.mockk:mockk's
releases. Full Changelog: https://github.com/mockk/mockk/compare/1.14.9...v1.14.11 Sourced from ch.qos.logback:logback-classic's
releases. 2026-06-01 Release of logback version 1.5.34 • In case certain StackTraceElement values returned by the
Throwable.getStackTrace method are null, StackTraceElementProxy
substitutes a dummy instance instead of throwing an
IllegalArgumentException. This resolves [issues #1040](qos-ch/logback#1040),
reported by Naotsugu Kobayashi. • HardenedObjectInputStream will now throw an InvalidClassException
during deserialization attempts of Proxy classes. This change addresses
potential deserialization whitelist bypass vulnerability reported by York Shen and registered as CVE-2026-10532. • A bitwise identical binary of this version can be reproduced by
building from source code at commit
e62272ac152469aec1ede056c3c7d0d7314e7bfe associated with the tag
v_1.5.34. This release was built using Java "21" 2023-10-17
LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6. 2026-05-27 Release of logback version 1.5.33 • • When processing • • SSL parameters for • When printing the status message field,
• A bit-wise identical binary of this version can be reproduced by
building from source code at commit
124e8b49b55ac34d08743a0646bd463410192647 associated with the tag
v_1.5.33. Release built using Java "21" 2023-10-17 LTS build
21.0.1.+12-LTS-29 under Linux Debian 11.6. Sourced from tsx's
releases. This release is also available on: Sourced from io.github.oshai:kotlin-logging's
releases. Align to semver. Full Changelog: https://github.com/oshai/kotlin-logging/compare/8.0.03...8.0.4 Sourced from io.netty:netty-bom's
releases. Full Changelog: https://github.com/netty/netty/compare/netty-4.2.14.Final...netty-4.2.15.Final Sourced from hono's
releases. Full Changelog: https://github.com/honojs/hono/compare/v4.12.22...v4.12.23 Full Changelog: https://github.com/honojs/hono/compare/v4.12.21...v4.12.22 This release includes fixes for the following security issues: Affects: Affects: Affects: Affects: Users who use ... (truncated) Sourced from io.modelcontextprotocol:kotlin-sdk-server's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from io.modelcontextprotocol:kotlin-sdk-client's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from io.modelcontextprotocol:kotlin-sdk-testing's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from com.anthropic:anthropic-java's
releases. Full Changelog: v2.40.0...v2.40.1 Full Changelog: v2.39.0...v2.40.0 Full Changelog: v2.38.0...v2.39.0 Full Changelog: v2.37.0...v2.38.0 Full Changelog: v2.36.0...v2.37.0 ... (truncated) Sourced from com.anthropic:anthropic-java's
changelog. Full Changelog: v2.40.0...v2.40.1 Full Changelog: v2.39.0...v2.40.0 Full Changelog: v2.38.0...v2.39.0 Full Changelog: v2.37.0...v2.38.0 Full Changelog: v2.36.0...v2.37.0 Full Changelog: v2.35.0...v2.36.0 ... (truncated) Sourced from io.modelcontextprotocol:kotlin-sdk-client's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from io.modelcontextprotocol:kotlin-sdk-client's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from io.modelcontextprotocol:kotlin-sdk-server's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from io.modelcontextprotocol:kotlin-sdk-client's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from io.modelcontextprotocol:kotlin-sdk-server's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from io.modelcontextprotocol:kotlin-sdk-client's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from io.modelcontextprotocol:kotlin-sdk-server's
releases. Adds a Typed Transport handlers now run on
Handlers moved from DNS rebinding protection enabled by default by Full Changelog: https://github.com/modelcontextprotocol/kotlin-sdk/compare/0.12.0...0.13.0 Sourced from esbuild's
releases. Disallow This release fixes a security issue where HTTP requests to esbuild's
local development server could traverse outside of the serve directory
on Windows using a Thanks to Add integrity checks to the Deno API (GHSA-gv7w-rqvm-qjhr) The previous release of esbuild added integrity checks to esbuild's
npm install script. This release also adds integrity checks to esbuild's
Deno install script. Now esbuild's Deno API will also fail with an error
if the downloaded esbuild binary contains something other than the
expected content. Note that esbuild's Deno API installs from
Thanks to Avoid inlining Previously esbuild's minifier sometimes incorrectly inlined
// Old output (with --minify) // New output (with --minify)Release notes
v2.35.0
2.35.0 (2026-05-28)
Features
v2.34.1
2.34.1 (2026-05-27)
Bug Fixes
Documentation
Changelog
2.35.0 (2026-05-28)
Features
2.34.1 (2026-05-27)
Bug Fixes
Documentation
Commits
65d26cc
release: 2.35.0f901010
feat(api): Add support for claude-opus-4-8, mid-conversation system
blocks, a...bc1bdd9
release: 2.34.1f27e209
fix(structured-outputs): support all nullability annotations (#1254)62ef906
docs: replace literal newlinesdc19d08
ci: run breaking change detection on every branch (#1224)1382286
codegen metadata
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `ch.qos.logback:logback-classic` from 1.5.32 to 1.5.34
Release notes
Logback 1.5.34
Logback 1.5.33
PropertiesConfiguratorModelHandler now registers
properties file URLs to the ConfigurationWatchList when
scan is enabled (via local scan="true" attribute or top-level
configuration scan), ensuring changes are detected and reconfiguration
occurs. This problem was reported in issues/1034.<conversionRule> elements and
both class and converterClass attributes are
specified, silently use the class attribute without issuing a warning.
However, if the attribute values differ, a warning will be issued. This
change was requested in issues/1031.HardenedModelInputStream will no longer accept to
deserialize all classes located under the "java.lang" and
"java.util" packages but a limited number of explicitly
authorized classes in those packages. This potential deserialization
whitelist bypass vulnerability was reported by York Shen and registered as CVE-2026-9828.SSLSocketAppender now enable
hostname verification by default. Moreover, the default protocol is now
"TLSv1.2". This potential vulnerability was reported by York
Shen.ViewStatusMessagesServletBase now escapes special
characters such as "&" as character entities. This
potential vulnerability was reported by York Shen.Commits
e62272a
prepare release 1.5.341e9e926
add resolveProxyClassRejectsDynamicProxies unit test2de5cbe
added StackTraceElementProxyTest, minor edits to AGENTS.md0e9b927
in case StackTraceElement is null use a substitute, fixing
issues/1040f7a0654
prevent resolveProxyClass bypass249b81f
docs are no longer distributed1c3b26a
start work on 1.5.34-SNAPSHOT124e8b4
prepare release 1.5.33d8fd6f2
escapeTags in message field when printing status messages95edbeb
hostnameVerification default to true in SSLParametersConfiguration,
SSL.DEFAU...
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Updates `io.github.oshai:kotlin-logging-jvm` from 8.0.03 to 8.0.4
Release notes
8.0.4
Commits
0aaa57c
bump to semver 8.0.5bf60363
change to semver 8.0.4
Updates `com.gradleup.shadow` from 9.4.1 to 9.4.2
Release notes
9.4.2
Changed
Commits
29c432a
Prepare version 9.4.28aa8e6c
Update dependency org.vafer:jdependency to v2.16 (#2033)
Signed-off-by: dependabot[bot] Release notes
0.33.0
Implementation-*
attributes in their manifests (#592)Commits
fc175fc
Version 0.33.0dc6187a
Update dependencies (#595)8e23c32
Deprecate AFU array types (#591)0d27eb1
Do not use deprecated js(compiler: KotlinJsCompilerType,
...) DSL (#594)6c6b2d6
Fill Implementation-* attributes in JAR's manifests (#592)a658e7d
KT-84955: add a suppressor for gradle plugin error checker for native
target ...1dd25ee
Add logic to handle changed .kotlin_module file name in
test (#581)
Signed-off-by: dependabot[bot] Release notes
v1.14.11
What's Changed
@DOssaA in mockk/mockk#1508@DOssaA in mockk/mockk#1513@ilia1243 in mockk/mockk#1515@Yentis in mockk/mockk#1517@evgenru in mockk/mockk#1519@InjectMockKs
by @ZzAve in mockk/mockk#1525@faraz152 in mockk/mockk#1521@InjectMockKs
dependency order for interface by @neungs-2 in mockk/mockk#1526@InjectMockKs
dependency order for list injection by @ilia1243 in mockk/mockk#1527@snowykte0426
in mockk/mockk#1529@hspedro in mockk/mockk#1530New Contributors
@DOssaA made
their first contribution in mockk/mockk#1508@ilia1243
made their first contribution in mockk/mockk#1515@Yentis made
their first contribution in mockk/mockk#1517@evgenru made
their first contribution in mockk/mockk#1519@ZzAve made
their first contribution in mockk/mockk#1525@faraz152
made their first contribution in mockk/mockk#1521@hspedro made
their first contribution in mockk/mockk#1530Commits
d5617fc
Version bump for v1.14.11d4e6a00
Merge pull request #1530
from hspedro/fix/726-openj9-classcast-message-format98e91bc
fix: handle OpenJ9 CCE message in JvmAutoHinter945f746
Merge pull request #1529
from snowykte0426/fix/1273-jvmtiagent-agp85-native-l...35cc073
[ 1273-jvmtiagent ] chore: stop tracking
.claude/scheduled_tasks.lockd6aa82b
[ 1273-jvmtiagent ] chore: drop useLegacyPackaging workaround85a907c
[ 1273-jvmtiagent ] chore: apply spotless formatting7d9aec1
[ 1273-jvmtiagent ] fix: extract .so when findLibrary returns a path
with '='1d5d30e
[ 1273-jvmtiagent ] test: verify findLibrary resolves mockkjvmtiagent to
a va...21a6a3a
[ 1273-jvmtiagent]fix: pass findLibrary path directly to attach
JvmtiAgent
Signed-off-by: dependabot[bot] Release notes
Logback 1.5.34
Logback 1.5.33
PropertiesConfiguratorModelHandler now registers
properties file URLs to the ConfigurationWatchList when
scan is enabled (via local scan="true" attribute or top-level
configuration scan), ensuring changes are detected and reconfiguration
occurs. This problem was reported in issues/1034.<conversionRule> elements and
both class and converterClass attributes are
specified, silently use the class attribute without issuing a warning.
However, if the attribute values differ, a warning will be issued. This
change was requested in issues/1031.HardenedModelInputStream will no longer accept to
deserialize all classes located under the "java.lang" and
"java.util" packages but a limited number of explicitly
authorized classes in those packages. This potential deserialization
whitelist bypass vulnerability was reported by York Shen and registered as CVE-2026-9828.SSLSocketAppender now enable
hostname verification by default. Moreover, the default protocol is now
"TLSv1.2". This potential vulnerability was reported by York
Shen.ViewStatusMessagesServletBase now escapes special
characters such as "&" as character entities. This
potential vulnerability was reported by York Shen.Commits
e62272a
prepare release 1.5.341e9e926
add resolveProxyClassRejectsDynamicProxies unit test2de5cbe
added StackTraceElementProxyTest, minor edits to AGENTS.md0e9b927
in case StackTraceElement is null use a substitute, fixing
issues/1040f7a0654
prevent resolveProxyClass bypass249b81f
docs are no longer distributed1c3b26a
start work on 1.5.34-SNAPSHOT124e8b4
prepare release 1.5.33d8fd6f2
escapeTags in message field when printing status messages95edbeb
hostnameVerification default to true in SSLParametersConfiguration,
SSL.DEFAU...
Signed-off-by: dependabot[bot] Release notes
v4.22.4
4.22.4
(2026-05-31)
Bug Fixes
Commits
1ce8463
fix: resolve CommonJS directory requires inside dependencies (#803)
Signed-off-by: dependabot[bot] Release notes
8.0.4
Commits
0aaa57c
bump to semver 8.0.5bf60363
change to semver 8.0.4
Updates `io.netty:netty-bom` from 4.2.14.Final to 4.2.15.Final
Release notes
netty-4.2.15.Final
Security fixes
io.netty:netty-codec-haproxy
(high).io.netty:netty-resolver-dns
(high).io.netty:netty-codec-http2.io.netty:netty-codec-redis
(high).io.netty:netty-codec-redis
(high).io.netty:netty-codec-redis
(high).io.netty:netty-codec-classes-quic.io.netty:netty-handler
(high).io.netty:netty-codec-http.io.netty:netty-codec-http3
(high).io.netty:netty-codec-haproxy (high).io.netty:netty-codec-classes-quic
(high).io.netty:netty-handler (high).io.netty:netty-resolver-dns.io.netty:netty-handler (high).io.netty:netty-transport-native-epoll and
io.netty:netty-transport-native-kqueue.io.netty:netty-resolver-dns
(high).io.netty:netty-transport-sctp
(high).io.netty:netty-codec-http2.io.netty:netty-codec-redis
(high).io.netty:netty-codec-http3
(high).io.netty:netty-codec-http2.What's Changed
@dreamlike-ocean
in netty/netty#16836@yawkat in netty/netty#16810@netty-project-bot
in netty/netty#16853@schiemon in
netty/netty#16837@fedinskiy in netty/netty#16844@chrisvest in netty/netty#16885@chrisvest in netty/netty#16893@skyguard1
in netty/netty#16850@netty-project-bot
in netty/netty#16890New Contributors
@schiemon
made their first contribution in netty/netty#16837@fedinskiy
made their first contribution in netty/netty#16844Commits
a41f7b2
[maven-release-plugin] prepare release netty-4.2.15.Final2394530
Auto-port 4.2: MQTT: Reject malformed no-payload packets with non-zero
Remain...0bd1657
Add maxWindowLog parameter to ZstdDecoder to bound memory allocation (#16850)76291f5
Fix SCTP and Redis tests (#16893)e067b6e
Fix revapi warnings (#16885)5a52600
Pass maxAllocation to Brotli and Zstd decoders (#16844)541add0
Merge commit from fork270800e
Merge commit from fork3d45a1e
Merge commit from fork75127ca
Merge commit from fork
Signed-off-by: dependabot[bot] Release notes
v4.12.23
What's Changed
@BlankParticle
in honojs/hono#4543@yusukebe in honojs/hono#4970COMPRESSIBLE_CONTENT_TYPE_REGEX re-export by @na-trium-144
in honojs/hono#4961:: by @yusukebe in honojs/hono#4971v4.12.22
What's Changed
@BlankParticle
in honojs/hono#4952@renatograsso10
in honojs/hono#4912@LeSingh1 in
honojs/hono#4951@ATOM00blue
in honojs/hono#4955@na-trium-144
in honojs/hono#4957New Contributors
@renatograsso10
made their first contribution in honojs/hono#4912@LeSingh1
made their first contribution in honojs/hono#4951@ATOM00blue made
their first contribution in honojs/hono#4955@na-trium-144
made their first contribution in honojs/hono#4957v4.12.21
Security fixes
app.mount() strips mount prefix using undecoded path, causing
incorrect routing for percent-encoded paths
app.mount(). Fixes prefix stripping using the
raw URL pathname instead of the decoded path, where percent-encoded
characters in the mount prefix or path could cause the prefix to be
removed at the wrong position, resulting in the sub-application
receiving an incorrect path. GHSA-2gcr-mfcq-wcc3IP Restriction bypasses static deny rules for non-canonical
IPv6
hono/ip-restriction. Fixes IP address
comparison using string equality, where non-canonical IPv6
representations of a denied address — such as compressed forms or
hex-notation IPv4-mapped addresses — could bypass static deny rules.
GHSA-xrhx-7g5j-rcj5Cookie helper does not sanitize sameSite and priority, allowing
Set-Cookie injection
hono/cookie. Fixes missing validation of
sameSite and priority options against
injection characters (;, \r, \n),
where user-controlled input passed to either option could inject
additional attributes into the Set-Cookie response header.
GHSA-3hrh-pfw6-9m5xJWT middleware accepts any Authorization scheme, not only
Bearer
hono/jwt, hono/jwk. Fixes missing
scheme validation in the Authorization header, where any two-part header
value was accepted regardless of the scheme name, allowing non-Bearer
schemes to pass JWT authentication. GHSA-f577-qrjj-4474
app.mount(),
hono/ip-restriction, hono/cookie, or
hono/jwt/hono/jwk are encouraged to upgrade to
this version.Commits
83bfb3b
4.12.23bcd290a
fix(utils/ipaddr): do not compress a single 0 group to ::
(#4971)c968177
feat(compress): add contentTypeFilter option and
`COMPRESSIBLE_CONTENT_TYPE_R...0265a54
docs(contribution): add AI Usage Policy (#4970)c84c5d2
feat(context): export the Context class publicly (#4543)82dad62
fix(serve-static): normalize all backslashes in file paths, not just the
firs...2f01b77
4.12.226bc0dff
feat: add msgpack as a compressible content type (#4957)7e0555d
fix(deno): echo negotiated WebSocket subprotocol in upgrade response (#4955)f0ed246
fix(compress): respect Accept-Encoding when encoding option is set (#4951)
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Updates `io.modelcontextprotocol:kotlin-sdk-client` from 0.12.0 to
0.13.0
Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Updates `io.modelcontextprotocol:kotlin-sdk-testing` from 0.12.0 to
0.13.0
Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show Release notes
v2.40.1
2.40.1 (2026-06-09)
Bug Fixes
frontier_llm refusal category
(1627fd3)v2.40.0
2.40.0 (2026-06-09)
Features
v2.39.0
2.39.0 (2026-06-09)
Features
Bug Fixes
v2.38.0
2.38.0 (2026-06-06)
Features
v2.37.0
2.37.0 (2026-06-05)
Features
Changelog
2.40.1 (2026-06-09)
Bug Fixes
frontier_llm refusal category
(1627fd3)2.40.0 (2026-06-09)
Features
2.39.0 (2026-06-09)
Features
Bug Fixes
2.38.0 (2026-06-06)
Features
2.37.0 (2026-06-05)
Features
2.36.0 (2026-06-04)
Commits
43b8020
release: 2.40.1 (#350)8f3e69b
release: 2.40.01540132
feat(api): add support for Managed Agents deployments and environment
variabl...a214f31
release: 2.39.0194e2f4
feat(api): add support for claude-mythos-5 and claude-fable-5, with
support f...56a2a49
fix(streaming): merge message_delta usage without dropping or rejecting
itera...a8c6d0f
fix: 3p middleware ordering (#34)79e8568
release: 2.38.0e7c8e6e
feat(api): small updates to Managed Agents typesedc1ae0
release: 2.37.0
Signed-off-by: dependabot[bot] Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Signed-off-by: dependabot[bot] Commits
Signed-off-by: dependabot[bot] Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Updates `io.modelcontextprotocol:kotlin-sdk-server` from 0.12.0 to
0.13.0
Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Signed-off-by: dependabot[bot] Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Updates `io.modelcontextprotocol:kotlin-sdk-server` from 0.12.0 to
0.13.0
Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Signed-off-by: dependabot[bot] Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Updates `io.modelcontextprotocol:kotlin-sdk-server` from 0.12.0 to
0.13.0
Release notes
0.13.0
Description
tasks capability and a typed
elicitation capability, hardens transport lifecycle,
dispatchers, and back-pressure, and enables DNS rebinding protection by
default.Breaking Changes
elicitation capability and new
tasks capability by @devcrocod in #732ClientCapabilities.elicitation is now a typed
ClientCapabilities.Elicitation (form,
url) instead of a raw JsonObject?, and both
ClientCapabilities and ServerCapabilities
gained a typed tasks capability. The constructors of both
types changed and are binary-incompatible; recompilation is
required.Dispatchers.Default by @devcrocod in #778Dispatchers.IO to
Dispatchers.Default (override via
handlerDispatcher), send() now suspends under
back-pressure instead of buffering unbounded, and the two-argument
StdioServerTransport(input, output) constructor is
deprecated in favor of the builder-lambda form. Also fixes a
start()/close() race, consistent
CancellationException propagation, and an
input-Source leak (closes #573,
#574,
#708).@devcrocod in #659enableDnsRebindingProtection now defaults to
true on
mcpStreamableHttp/mcpStatelessStreamableHttp,
and the Route.mcp() / Application.mcp()
overloads gained enableDnsRebindingProtection,
allowedHosts, and allowedOrigins parameters
(binary-incompatible on JVM). Only localhost,
127.0.0.1, and [::1] are allowed by default;
opt out with enableDnsRebindingProtection = false. The
Configuration.enableDnsRebindingProtection,
.allowedHosts, and .allowedOrigins properties
are deprecated in favor of the new DnsRebindingProtection
plugin.Features
tasks capability (list,
cancel, and per-request augmentation for sampling and
elicitation) on ClientCapabilities and
ServerCapabilities, with assertions for
tasks/* and notifications/tasks/status
enforced by Client and ServerSession by @devcrocod in #732handlerDispatcher and
ioDispatcher, plus an optional caller-supplied
CoroutineScope, on transports by @devcrocod in #778Fixed
onClose callbacks on
SseClientTransport when the SSE session ends — whether
closed gracefully or terminated by an error — matching the other client
transports by @jskjw157 in #738Security
@devcrocod in #659TooLongFrameException instead of buffering unbounded when a
peer never sends a newline terminator by @devcrocod in 6e6f805Maintenance
dev.mokksy:mokksy dependency in
favor of MockEngine and embeddedServer by @devcrocod in #754Dependencies
Commits
b7eeeb1
release: 0.13.0 (#796)6e6f805
Merge commit from fork0eb1822
Update Ktor to version 3.4.3 (#785)0adfb3b
fix!: harden lifecycle, dispatchers, back-pressure (#778)37ee423
chore(deps): bump the infrastructure group with 2 updates (#783)ff4b623
chore(deps): bump the other-dependencies group across 3 directories with
3 up...78066a9
chore(deps): bump the all-dependencies group across 1 directory with 2
update...1ff5f00
chore(deps): bump qs from 6.14.2 to 6.15.2 in
/integration-test/src/jvmTest/t...6d5bac1
chore(deps): bump gradle-wrapper from 9.5.0 to 9.5.1 (#776)c854560
chore(deps): bump the all-dependencies group across 1 directory with 2
update...
Signed-off-by: dependabot[bot] Release notes
v0.28.1
\ in local development server HTTP requests (GHSA-g7r4-m6w7-qqqr)\ backslash character. It happened due
to the use of Go's path.Clean() function, which only
handles Unix-style / characters. HTTP requests with paths
containing \ are no longer allowed.@dellalibera for
reporting this issue.registry.npmjs.org by default, but allows the
NPM_CONFIG_REGISTRY environment variable to override this
with a custom package registry. This change means that the esbuild
executable served by NPM_CONFIG_REGISTRY must now match the
expected content.@sondt99 for
reporting this issue.using and await using
declarations (#4482)using and await using declarations into
subsequent uses of that declaration, which then fails to dispose of the
resource correctly. This bug happened because inlining was done for
let and const declarations by avoiding doing
it for var declarations, which no longer worked when more
declaration types were added. Here's an example:// Original code
{
using x = new Resource()
x.activate()
}
new Resource().activate();
{using e=new Resource;e.activate()}
Fix module evaluation when an error is thrown (#4461, #4467)
If an error is thrown during module evaluation, esbuild previously
didn't preserve the state of the module for subsequent module
references. This was observable if import() or
require() is used to import a module multiple times. The
thrown error is supposed to be thrown by every call to
import() or require(), not just the first.
With this release, esbuild will now throw the same error every time you
call import() or require() on a module that
throws during its evaluation.
Fix some edge cases around the new operator (#4477)
Previously esbuild incorrectly printed certain edge cases involving
complex expressions inside the target of a new expression
(specifically an optional chain and/or a tagged template literal). The
generated code for the new target was not correctly wrapped
with parentheses, and either contained a syntax error or had different
semantics. These edge cases have been fixed so that they now correctly
wrap the new target in parentheses. Here is an example of
some affected code:
// Original code
new (foo()`bar`)()
new (foo()?.bar)()
// Old output
new foo()bar();
new (foo())?.bar();
... (truncated)
Sourced from esbuild's changelog.
0.28.1
Disallow
\in local development server HTTP requests (GHSA-g7r4-m6w7-qqqr)This release fixes a security issue where HTTP requests to esbuild's local development server could traverse outside of the serve directory on Windows using a
\backslash character. It happened due to the use of Go'spath.Clean()function, which only handles Unix-style/characters. HTTP requests with paths containing\are no longer allowed.Thanks to
@dellaliberafor reporting this issue.Add integrity checks to the Deno API (GHSA-gv7w-rqvm-qjhr)
The previous release of esbuild added integrity checks to esbuild's npm install script. This release also adds integrity checks to esbuild's Deno install script. Now esbuild's Deno API will also fail with an error if the downloaded esbuild binary contains something other than the expected content.
Note that esbuild's Deno API installs from
registry.npmjs.orgby default, but allows theNPM_CONFIG_REGISTRYenvironment variable to override this with a custom package registry. This change means that the esbuild executable served byNPM_CONFIG_REGISTRYmust now match the expected content.Thanks to
@sondt99for reporting this issue.Avoid inlining
usingandawait usingdeclarations (#4482)Previously esbuild's minifier sometimes incorrectly inlined
usingandawait usingdeclarations into subsequent uses of that declaration, which then fails to dispose of the resource correctly. This bug happened because inlining was done forletandconstdeclarations by avoiding doing it forvardeclarations, which no longer worked when more declaration types were added. Here's an example:// Original code { using x = new Resource() x.activate() }// Old output (with --minify)
new Resource().activate();// New output (with --minify)
{using e=new Resource;e.activate()}
Fix module evaluation when an error is thrown (#4461, #4467)
If an error is thrown during module evaluation, esbuild previously didn't preserve the state of the module for subsequent module references. This was observable if
import()orrequire()is used to import a module multiple times. The thrown error is supposed to be thrown by every call toimport()orrequire(), not just the first. With this release, esbuild will now throw the same error every time you callimport()orrequire()on a module that throws during its evaluation.Fix some edge cases around the
newoperator (#4477)Previously esbuild incorrectly printed certain edge cases involving complex expressions inside the target of a
newexpression (specifically an optional chain and/or a tagged template literal). The generated code for thenewtarget was not correctly wrapped with parentheses, and either contained a syntax error or had different semantics. These edge cases have been fixed so that they now correctly wrap thenewtarget in parentheses. Here is an example of some affected code:// Original code new (foo()`bar`)() new (foo()?.bar)()// Old output
new foo()bar();
new (foo())?.bar();
... (truncated)
bb9db84
publish 0.28.1 to npm9ff053e
security: add integrity checks to the Deno API0a9bf21
enforce non-negative size in gzip parsere2a1a71
security: forbid \\ in local dev server requests83a2cbf
fix #4482:
don't inline using declarations308ad74
fix #4471:
renaming of nested var declarationsf013f5f
fix some typosaafd6e4
chore: fix some minor issues in comments (#4462)15300c3
follow up: cjs evaluation fixes1bda0c3
fix #4461,
fix #4467:
esm evaluation fixesSourced from hono's releases.
v4.12.27
Security fixes
This release includes fixes for the following security issues:
hono/jsx does not isolate context per request
Affects:
hono/jsx,hono/jsx-renderer. During SSR, context was stored process-wide instead of per request, souseContext()/useRequestContext()read after anawaitin an async component could return another concurrent request's value — leading to cross-request data disclosure or authorization checks against the wrong request. GHSA-hvrm-45r6-mjfjServer-Side XSS via JSX escaping bypass in cx()
Affects:
hono/css.cx()marked its composed class name as already-escaped without escaping the input, so untrusted input passed as a class name could break out of the JSXclassattribute during SSR and inject markup (XSS). GHSA-w62v-xxxg-mg59API Gateway v1 adapter can drop a repeated request header value
Affects:
hono/aws-lambda. The API Gateway v1 (and VPC Lattice) adapter de-duplicated repeated header values by substring instead of exact match, dropping a value that is a substring of another (e.g.203.0.113.1dropped when203.0.113.10is present) — affecting logic such asX-Forwarded-For-based IP restriction. GHSA-xgm2-5f3f-mvvc
Users of
hono/jsx/hono/jsx-renderer,hono/css(cx()), or thehono/aws-lambdaAPI Gateway v1 / VPC Lattice adapters are encouraged to upgrade.v4.12.26
What's Changed
- fix(lambda-edge): satisfy Deno lib types for Content-Length body encoding by
@yusukebein honojs/hono#5013- ci: publish to npm from CI with OIDC trusted publishing by
@yusukebein honojs/hono#5028- chore: remove unused devcontainer and gitpod configs by
@yusukebein honojs/hono#5029- chore: replace arg and glob with Bun native APIs in build script by
@yusukebein honojs/hono#5030Full Changelog: https://github.com/honojs/hono/compare/v4.12.25...v4.12.26
v4.12.25
Security fixes
This release includes fixes for the following security issues:
CORS Middleware reflects any Origin with credentials when
origindefaults to the wildcardAffects:
hono/cors. Fixes the wildcard origin reflecting the requestOriginand sendingAccess-Control-Allow-Credentials: truewhencredentials: trueis set without an explicitorigin, where any site a logged-in user visited could make credentialed cross-origin requests and read responses from cookie-authenticated endpoints. GHSA-88fw-hqm2-52qcBody Limit Middleware can be bypassed on AWS Lambda by understating
Content-LengthAffects:
hono/body-limiton AWS Lambda (hono/aws-lambda,hono/lambda-edge). Fixes the request being built with the client-declaredContent-Lengthwhile the body is delivered fully buffered, where a client could declare a smallContent-Lengthwith a much larger body and slip past the configured size limit. GHSA-rv63-4mwf-qqc2Path traversal in
serve-staticon Windows via encoded backslash (%5C)Affects:
serveStaticon Windows (Node, Bun, Deno adapters). Fixes the path guard allowing a lone backslash, where an encoded backslash (%5C) decoded to\was treated as a separator by the Windows path resolver, letting a single URL segment escape into a middleware-guarded subtree. GHSA-wwfh-h76j-fc44AWS Lambda adapter merges multiple
Set-Cookieheaders into one value, dropping cookies on ALB single-header and Lattice
... (truncated)
97c6fe1
4.12.27aa92177
Merge commit from forkcd3f6f7
Merge commit from forkd4853a8
fix(jsx): make merged context-isolation tests pass tsc type check (#5037)6735fea
fix(jsx): cast awaitedFallback through unknown to fix Deno type check
(#5036)fab3b13
Merge commit from fork9f0dadf
ci: use npm Staged publishing (#5035)27b7992
4.12.26d29982c
chore: replace arg and glob with Bun native APIs in build script16215d5
chore: remove unused devcontainer and gitpod configs (#5029)This version was pushed to npm by GitHub Actions, a new releaser for hono since your current version.
Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from com.anthropic:anthropic-java's releases.
v2.43.0
2.43.0 (2026-06-18)
Full Changelog: v2.42.0...v2.43.0
Features
- helpers: introduce x-stainless-helper telemetry + tag the refusal-fallback interceptor (#91) (a14925b)
v2.42.0
2.42.0 (2026-06-18)
Full Changelog: v2.41.1...v2.42.0
Features
- api: add support for new code_execution_20260120 tool (1a1a6b9)
v2.41.1
2.41.1 (2026-06-18)
Full Changelog: v2.41.0...v2.41.1
Chores
Build System
v2.41.0
2.41.0 (2026-06-17)
Full Changelog: v2.40.1...v2.41.0
Bug Fixes
- client: bad model definitions (96787c6)
- foundry: align baseUrl contract with the other SDKs (/anthropic in baseUrl, no path rewrite) (#84) (e651d93)
Chores
Styles
... (truncated)
Sourced from com.anthropic:anthropic-java's changelog.
2.43.0 (2026-06-18)
Full Changelog: v2.42.0...v2.43.0
Features
- helpers: introduce x-stainless-helper telemetry + tag the refusal-fallback interceptor (#91) (a14925b)
2.42.0 (2026-06-18)
Full Changelog: v2.41.1...v2.42.0
Features
- api: add support for new code_execution_20260120 tool (1a1a6b9)
2.41.1 (2026-06-18)
Full Changelog: v2.41.0...v2.41.1
Chores
Build System
2.41.0 (2026-06-17)
Full Changelog: v2.40.1...v2.41.0
Bug Fixes
- client: bad model definitions (96787c6)
- foundry: align baseUrl contract with the other SDKs (/anthropic in baseUrl, no path rewrite) (#84) (e651d93)
Chores
Styles
... (truncated)
8e217ec
release: 2.43.08f4d5be
feat(helpers): introduce x-stainless-helper telemetry + tag the
refusal-fallb...60e15dd
release: 2.42.0e430bfb
feat(api): add support for new code_execution_20260120 tool3c27033
release: 2.41.11d77d61
build: fix signing for publishing (#90)78e23a5
chore: fix release runs-on (#354)946fe2a
release: 2.41.0536e177
style: apply formatting (#88)f719e12
fix(client): bad model definitionsSourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
3f750f0
Update distro size for Gradle 9.6.0 release (#38243)ae93cfa
update distro sizef7e22b5
Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9
Update Gradle wrapper to version 9.6.0-rc-370a8745
Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522
some final polishing for release notesaf308eb
Restore GradleInternal.getRootProject overload for binary compatibility
(#38214)239361b
Restore GradleInternal.getRootProject overload for binary
compatibility896dc44
Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25
Update Gradle wrapper to version 9.6.0-rc-2Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking ... _Description has been truncated_ Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlin-mcp-client/gradle/libs.versions.toml | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/kotlin-mcp-client/gradlew | 4 ++-- samples/kotlin-mcp-client/gradlew.bat | 4 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/kotlin-mcp-server/gradlew | 4 ++-- samples/kotlin-mcp-server/gradlew.bat | 4 ++-- samples/kotlinlang-mcp-server/gradle/libs.versions.toml | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/kotlinlang-mcp-server/gradlew | 4 ++-- samples/kotlinlang-mcp-server/gradlew.bat | 4 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/simple-streamable-server/gradlew | 4 ++-- samples/simple-streamable-server/gradlew.bat | 4 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/weather-stdio-server/gradlew | 4 ++-- samples/weather-stdio-server/gradlew.bat | 4 ++-- 17 files changed, 27 insertions(+), 27 deletions(-) diff --git a/samples/kotlin-mcp-client/gradle/libs.versions.toml b/samples/kotlin-mcp-client/gradle/libs.versions.toml index 033fbdc..7479186 100644 --- a/samples/kotlin-mcp-client/gradle/libs.versions.toml +++ b/samples/kotlin-mcp-client/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -anthropic = "2.40.1" +anthropic = "2.43.0" kotlin = "2.3.21" ktor = "3.3.3" mcp-kotlin = "0.13.0" diff --git a/samples/kotlin-mcp-client/gradle/wrapper/gradle-wrapper.properties b/samples/kotlin-mcp-client/gradle/wrapper/gradle-wrapper.properties index df6a6ad..eb84db6 100644 --- a/samples/kotlin-mcp-client/gradle/wrapper/gradle-wrapper.properties +++ b/samples/kotlin-mcp-client/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/samples/kotlin-mcp-client/gradlew b/samples/kotlin-mcp-client/gradlew index b9bb139..249efbb 100755 --- a/samples/kotlin-mcp-client/gradlew +++ b/samples/kotlin-mcp-client/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/samples/kotlin-mcp-client/gradlew.bat b/samples/kotlin-mcp-client/gradlew.bat index aa5f10b..8508ef6 100644 --- a/samples/kotlin-mcp-client/gradlew.bat +++ b/samples/kotlin-mcp-client/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/samples/kotlin-mcp-server/gradle/wrapper/gradle-wrapper.properties b/samples/kotlin-mcp-server/gradle/wrapper/gradle-wrapper.properties index df6a6ad..eb84db6 100644 --- a/samples/kotlin-mcp-server/gradle/wrapper/gradle-wrapper.properties +++ b/samples/kotlin-mcp-server/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/samples/kotlin-mcp-server/gradlew b/samples/kotlin-mcp-server/gradlew index b9bb139..249efbb 100755 --- a/samples/kotlin-mcp-server/gradlew +++ b/samples/kotlin-mcp-server/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/samples/kotlin-mcp-server/gradlew.bat b/samples/kotlin-mcp-server/gradlew.bat index aa5f10b..8508ef6 100644 --- a/samples/kotlin-mcp-server/gradlew.bat +++ b/samples/kotlin-mcp-server/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml index fdef6d3..69dfe7e 100644 --- a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml +++ b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml @@ -4,7 +4,7 @@ ktor = "3.3.3" mcp-kotlin = "0.13.0" serialization = "1.11.0" coroutines = "1.11.0" -logback = "1.5.34" +logback = "1.5.35" shadow = "9.4.2" [libraries] diff --git a/samples/kotlinlang-mcp-server/gradle/wrapper/gradle-wrapper.properties b/samples/kotlinlang-mcp-server/gradle/wrapper/gradle-wrapper.properties index df6a6ad..eb84db6 100644 --- a/samples/kotlinlang-mcp-server/gradle/wrapper/gradle-wrapper.properties +++ b/samples/kotlinlang-mcp-server/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/samples/kotlinlang-mcp-server/gradlew b/samples/kotlinlang-mcp-server/gradlew index b9bb139..249efbb 100755 --- a/samples/kotlinlang-mcp-server/gradlew +++ b/samples/kotlinlang-mcp-server/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/samples/kotlinlang-mcp-server/gradlew.bat b/samples/kotlinlang-mcp-server/gradlew.bat index aa5f10b..8508ef6 100644 --- a/samples/kotlinlang-mcp-server/gradlew.bat +++ b/samples/kotlinlang-mcp-server/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/samples/simple-streamable-server/gradle/wrapper/gradle-wrapper.properties b/samples/simple-streamable-server/gradle/wrapper/gradle-wrapper.properties index df6a6ad..eb84db6 100644 --- a/samples/simple-streamable-server/gradle/wrapper/gradle-wrapper.properties +++ b/samples/simple-streamable-server/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/samples/simple-streamable-server/gradlew b/samples/simple-streamable-server/gradlew index b9bb139..249efbb 100755 --- a/samples/simple-streamable-server/gradlew +++ b/samples/simple-streamable-server/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/samples/simple-streamable-server/gradlew.bat b/samples/simple-streamable-server/gradlew.bat index aa5f10b..8508ef6 100644 --- a/samples/simple-streamable-server/gradlew.bat +++ b/samples/simple-streamable-server/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel diff --git a/samples/weather-stdio-server/gradle/wrapper/gradle-wrapper.properties b/samples/weather-stdio-server/gradle/wrapper/gradle-wrapper.properties index df6a6ad..eb84db6 100644 --- a/samples/weather-stdio-server/gradle/wrapper/gradle-wrapper.properties +++ b/samples/weather-stdio-server/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/samples/weather-stdio-server/gradlew b/samples/weather-stdio-server/gradlew index b9bb139..249efbb 100755 --- a/samples/weather-stdio-server/gradlew +++ b/samples/weather-stdio-server/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/samples/weather-stdio-server/gradlew.bat b/samples/weather-stdio-server/gradlew.bat index aa5f10b..8508ef6 100644 --- a/samples/weather-stdio-server/gradlew.bat +++ b/samples/weather-stdio-server/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel From a84ff59b53c26feec583cbfffa2e61d50e92c8a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 13:51:56 +0000 Subject: [PATCH 022/143] chore(deps): bump actions/checkout from 6 to 7 in the all-actions group across 1 directory (#852) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the all-actions group with 1 update in the / directory: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 6 to 7 Release notes
Sourced from actions/checkout's releases.
v7.0.0
What's Changed
- block checking out fork pr for pull_request_target and workflow_run by
@aiqiaoyin actions/checkout#2454- Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by
@dependabot[bot] in actions/checkout#2458- Bump flatted from 3.3.1 to 3.4.2 by
@dependabot[bot] in actions/checkout#2460- Bump js-yaml from 4.1.0 to 4.2.0 by
@dependabot[bot] in actions/checkout#2461- Bump
@actions/coreand@actions/tool-cacheand Remove uuid by@dependabot[bot] in actions/checkout#2459- upgrade module to esm and update dependencies by
@aiqiaoyin actions/checkout#2463- Bump the minor-npm-dependencies group across 1 directory with 3 updates by
@dependabot[bot] in actions/checkout#2462- getting ready for checkout v7 release by
@aiqiaoyin actions/checkout#2464- update error wording by
@aiqiaoyin actions/checkout#2467New Contributors
@aiqiaoymade their first contribution in actions/checkout#2454Full Changelog: https://github.com/actions/checkout/compare/v6.0.3...v7.0.0
v6.0.3
What's Changed
- Update changelog by
@ericsciplein actions/checkout#2357- fix: expand merge commit SHA regex and add SHA-256 test cases by
@yaananthin actions/checkout#2414- Fix checkout init for SHA-256 repositories by
@yaananthin actions/checkout#2439- Update changelog for v6.0.3 by
@yaananthin actions/checkout#2446New Contributors
@yaananthmade their first contribution in actions/checkout#2414Full Changelog: https://github.com/actions/checkout/compare/v6...v6.0.3
v6.0.2
What's Changed
- Add orchestration_id to git user-agent when ACTIONS_ORCHESTRATION_ID is set by
@TingluoHuangin actions/checkout#2355- Fix tag handling: preserve annotations and explicit fetch-tags by
@ericsciplein actions/checkout#2356Full Changelog: https://github.com/actions/checkout/compare/v6.0.1...v6.0.2
v6.0.1
What's Changed
- Update all references from v5 and v4 to v6 by
@ericsciplein actions/checkout#2314- Add worktree support for persist-credentials includeIf by
@ericsciplein actions/checkout#2327- Clarify v6 README by
@ericsciplein actions/checkout#2328Full Changelog: https://github.com/actions/checkout/compare/v6...v6.0.1
Changelog
Sourced from actions/checkout's changelog.
Changelog
v7.0.0
- Block checking out fork PR for pull_request_target and workflow_run by
@aiqiaoyin actions/checkout#2454- Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by
@dependabot[bot] in actions/checkout#2458- Bump flatted from 3.3.1 to 3.4.2 by
@dependabot[bot] in actions/checkout#2460- Bump js-yaml from 4.1.0 to 4.2.0 by
@dependabot[bot] in actions/checkout#2461- Bump
@actions/coreand@actions/tool-cacheand Remove uuid by@dependabot[bot] in actions/checkout#2459- upgrade module to esm and update dependencies by
@aiqiaoyin actions/checkout#2463- Bump the minor-npm-dependencies group across 1 directory with 3 updates by
@dependabot[bot] in actions/checkout#2462v6.0.3
- Fix checkout init for SHA-256 repositories by
@yaananthin actions/checkout#2439- fix: expand merge commit SHA regex and add SHA-256 test cases by
@yaananthin actions/checkout#2414v6.0.2
- Fix tag handling: preserve annotations and explicit fetch-tags by
@ericsciplein actions/checkout#2356v6.0.1
- Add worktree support for persist-credentials includeIf by
@ericsciplein actions/checkout#2327v6.0.0
- Persist creds to a separate file by
@ericsciplein actions/checkout#2286- Update README to include Node.js 24 support details and requirements by
@salmanmkcin actions/checkout#2248v5.0.1
- Port v6 cleanup to v5 by
@ericsciplein actions/checkout#2301v5.0.0
- Update actions checkout to use node 24 by
@salmanmkcin actions/checkout#2226v4.3.1
- Port v6 cleanup to v4 by
@ericsciplein actions/checkout#2305v4.3.0
- docs: update README.md by
@motssin actions/checkout#1971- Add internal repos for checking out multiple repositories by
@mouismailin actions/checkout#1977- Documentation update - add recommended permissions to Readme by
@benwellsin actions/checkout#2043- Adjust positioning of user email note and permissions heading by
@joshmgrossin actions/checkout#2044- Update README.md by
@nebuk89in actions/checkout#2194- Update CODEOWNERS for actions by
@TingluoHuangin actions/checkout#2224- Update package dependencies by
@salmanmkcin actions/checkout#2236v4.2.2
url-helper.tsnow leverages well-known environment variables by@jww3in actions/checkout#1941- Expand unit test coverage for
isGhesby@jww3in actions/checkout#1946v4.2.1
- Check out other refs/* by commit if provided, fall back to ref by
@orhantoyin actions/checkout#1924... (truncated)
Commits
9c091bbupdate error wording (#2467)1044a6dgetting ready for checkout v7 release (#2464)f028218Bump the minor-npm-dependencies group across 1 directory with 3 updates (#2462)d914b26upgrade module to esm and update dependencies (#2463)537c7efBump@actions/coreand@actions/tool-cacheand Remove uuid (#2459)130a169Bump js-yaml from 4.1.0 to 4.2.0 (#2461)7d09575Bump flatted from 3.3.1 to 3.4.2 (#2460)0f9f3aaBump actions/publish-immutable-action (#2458)f9e715ablock checking out fork pr for pull_request_target and workflow_run (#2454)- See full diff in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/apidocs.yaml | 2 +- .github/workflows/build.yml | 6 +++--- .github/workflows/codeql.yml | 2 +- .github/workflows/conformance.yml | 8 ++++---- .github/workflows/gradle-publish.yml | 2 +- .github/workflows/samples.yml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/apidocs.yaml b/.github/workflows/apidocs.yaml index 995f7d8..510af19 100644 --- a/.github/workflows/apidocs.yaml +++ b/.github/workflows/apidocs.yaml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v5 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad4cc7a..2b6e415 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: max-workers: 2 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v5 @@ -126,7 +126,7 @@ jobs: contents: read steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v5 @@ -168,7 +168,7 @@ jobs: name: "Build Sample: ${{ matrix.sample }}" timeout-minutes: 10 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v5 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5697b61..f25ec64 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v5 diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 4058d02..2511286 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -25,7 +25,7 @@ jobs: timeout-minutes: 20 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK uses: actions/setup-java@v5 @@ -76,7 +76,7 @@ jobs: - sse-retry steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK uses: actions/setup-java@v5 @@ -107,7 +107,7 @@ jobs: timeout-minutes: 20 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK uses: actions/setup-java@v5 @@ -146,7 +146,7 @@ jobs: - auth/cross-app-access-complete-flow steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK uses: actions/setup-java@v5 diff --git a/.github/workflows/gradle-publish.yml b/.github/workflows/gradle-publish.yml index 6ed0756..f9df053 100644 --- a/.github/workflows/gradle-publish.yml +++ b/.github/workflows/gradle-publish.yml @@ -17,7 +17,7 @@ jobs: packages: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK 21 uses: actions/setup-java@v5 with: diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 2c910fd..89de699 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -36,7 +36,7 @@ jobs: name: Build Sample (${{ matrix.sample }}) timeout-minutes: 10 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v5 From 3274244f7d018d4108d8611c95eb10cc7dbc18ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 21:27:25 +0000 Subject: [PATCH 023/143] chore(deps): bump gradle-wrapper from 9.5.1 to 9.6.0 (#851) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [gradle-wrapper](https://github.com/gradle/gradle) from 9.5.1 to 9.6.0. Release notes
Sourced from gradle-wrapper's releases.
9.6.0
The Gradle team is excited to announce Gradle 9.6.0.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.0 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.0 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
9.6.0 RC3
... (truncated)
Commits
3f750f0Update distro size for Gradle 9.6.0 release (#38243)ae93cfaupdate distro sizef7e22b5Update Gradle wrapper to version 9.6.0-rc-3 (#38227)71a8eb9Update Gradle wrapper to version 9.6.0-rc-370a8745Prepare release notes for Gradle 9.6.0RC3 (#38220)9706522some final polishing for release notesaf308ebRestore GradleInternal.getRootProject overload for binary compatibility (#38214)239361bRestore GradleInternal.getRootProject overload for binary compatibility896dc44Update Gradle wrapper to version 9.6.0-rc-2 (#38187)2d4ec25Update Gradle wrapper to version 9.6.0-rc-2- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 4 ++-- gradlew.bat | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index df6a6ad..eb84db6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/gradlew b/gradlew index b9bb139..249efbb 100755 --- a/gradlew +++ b/gradlew @@ -20,7 +20,7 @@ ############################################################################## # -# Gradle start up script for POSIX generated by Gradle. +# gradlew start up script for POSIX generated by Gradle. # # Important for running: # @@ -29,7 +29,7 @@ # bash, then to run this script, type that shell name before the whole # command line, like: # -# ksh Gradle +# ksh gradlew # # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: diff --git a/gradlew.bat b/gradlew.bat index aa5f10b..8508ef6 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -19,7 +19,7 @@ @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem -@rem Gradle startup script for Windows +@rem gradlew startup script for Windows @rem @rem ########################################################################## @@ -72,7 +72,7 @@ echo location of your Java installation. 1>&2 -@rem Execute Gradle +@rem Execute gradlew @rem endlocal doesn't take effect until after the line is parsed and variables are expanded @rem which allows us to clear the local environment before executing the java command endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel From 2967696e6ca32dcaddb88fe890a2127010e07edb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2026 21:49:27 +0000 Subject: [PATCH 024/143] chore(deps): bump com.vanniktech:gradle-maven-publish-plugin from 0.36.0 to 0.37.0 in the gradle-plugins group across 1 directory (#848) Bumps the gradle-plugins group with 1 update in the / directory: [com.vanniktech:gradle-maven-publish-plugin](https://github.com/vanniktech/gradle-maven-publish-plugin). Updates `com.vanniktech:gradle-maven-publish-plugin` from 0.36.0 to 0.37.0 Release notes
Sourced from com.vanniktech:gradle-maven-publish-plugin's releases.
0.37.0
- When publishing to Maven Central, redundant checksum files are now excluded by default: checksums of
.ascsignature files (gradle/gradle#20232) and thesha256/sha512checksums, which are never read by Gradle or Maven Central. The published checksums can be configured throughchecksums(...)in the DSL or themavenCentralChecksumsGradle property (defaultmd5,sha1). Signature checksum exclusion can be controlled throughexcludeSignatureChecksums()or themavenCentralExcludeSignatureChecksumsGradle property.- Maven Central deployment id is being logged after upload.
Minimum supported versions
- JDK 17
- Gradle 9.0.0
- Android Gradle Plugin 8.13.0
- Kotlin Gradle Plugin 2.2.0
Compatibility tested up to
- JDK 26
- Gradle 9.6.0
- Gradle 9.7.0-milestone-1
- Android Gradle Plugin 9.2.1
- Android Gradle Plugin 9.3.0-rc01
- Android Gradle Plugin 9.4.0-alpha01
- Kotlin Gradle Plugin 2.4.0
0.37.0-rc1
- When publishing to Maven Central, redundant checksum files are now excluded by default: checksums of
.ascsignature files (gradle/gradle#20232) and thesha256/sha512checksums, which are never read by Gradle or Maven Central. The published checksums can be configured throughchecksums(...)in the DSL or themavenCentralChecksumsGradle property (defaultmd5,sha1). Signature checksum exclusion can be controlled throughexcludeSignatureChecksums()or themavenCentralExcludeSignatureChecksumsGradle property.- Maven Central deployment id is being logged after upload.
Minimum supported versions
- JDK 17
- Gradle 9.0.0
- Android Gradle Plugin 8.13.0
- Kotlin Gradle Plugin 2.2.0
Compatibility tested up to
- JDK 26
- Gradle 9.6.0
- Gradle 9.7.0-milestone-1
- Android Gradle Plugin 9.2.1
- Android Gradle Plugin 9.3.0-rc01
- Android Gradle Plugin 9.4.0-alpha01
- Kotlin Gradle Plugin 2.4.0
Changelog
Sourced from com.vanniktech:gradle-maven-publish-plugin's changelog.
0.37.0 (2026-06-21)
- When publishing to Maven Central, redundant checksum files are now excluded by default: checksums of
.ascsignature files (gradle/gradle#20232) and thesha256/sha512checksums, which are never read by Gradle or Maven Central. The published checksums can be configured throughchecksums(...)in the DSL or themavenCentralChecksumsGradle property (defaultmd5,sha1). Signature checksum exclusion can be controlled throughexcludeSignatureChecksums()or themavenCentralExcludeSignatureChecksumsGradle property.- Maven Central deployment id is being logged after upload.
Minimum supported versions
- JDK 17
- Gradle 9.0.0
- Android Gradle Plugin 8.13.0
- Kotlin Gradle Plugin 2.2.0
Compatibility tested up to
- JDK 26
- Gradle 9.6.0
- Gradle 9.7.0-milestone-1
- Android Gradle Plugin 9.2.1
- Android Gradle Plugin 9.3.0-rc01
- Android Gradle Plugin 9.4.0-alpha01
- Kotlin Gradle Plugin 2.4.0
Commits
7017e3denable feature preview (#1381)05f6b6euse 0.37.0-rc1 (#1380)0167c9cChangelog for 0.37.0 (#1379)b652eb3Update dependency java to v26 (#1353)a9f70b3Update dependency com.freeletics.gradle:scripts-formatting-jvm to v0.37.0 (#1...541cf8fLog deployment id and publishing type after Central Portal upload (#1354)d4873e5Update slf4j monorepo to v2 (#1365)42baf9dUpdate android.gradle (#1335)2de1978Update Gradle (#1362)6f03e46Update kotlin monorepo to v2.4.0 (#1352)- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4904ea4..0b2929d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,7 +8,7 @@ kotlin = "2.3.21" kover = "0.9.8" ktlint = "14.2.0" knit = "0.5.1" -mavenPublish = "0.36.0" +mavenPublish = "0.37.0" netty = "4.2.15.Final" # libraries version From cca883aa3ff9c4c700287585c8e5db13d599d14d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jun 2026 00:43:56 +0200 Subject: [PATCH 025/143] chore(deps): bump the kotest group across 1 directory with 3 updates (#847) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the kotest group with 3 updates in the / directory: [io.kotest:kotest-assertions-core](https://github.com/kotest/kotest), [io.kotest:kotest-assertions-json](https://github.com/kotest/kotest) and [io.kotest:kotest-assertions-ktor](https://github.com/kotest/kotest). Updates `io.kotest:kotest-assertions-core` from 6.1.11 to 6.2.1 Release notes
Sourced from io.kotest:kotest-assertions-core's releases.
v6.2.1
What's Changed
- docs: add KDoc to ArrayEq by
@LeoColmanin kotest/kotest#6140- Add support for deprecated Kotlin targets in Android and Native conve… by
@sksamuelin kotest/kotest#6141- Remove usages of K1's KtUltraLightClass from kotest plugin sources by
@sksamuelin kotest/kotest#6143- fix docs by
@alfonsoristoratoin kotest/kotest#6147- remove KotestInternal in TestFactory by
@alfonsoristoratoin kotest/kotest#6146- Fix data objects being considered equal in DataClassEq (#6144) by
@sksamuelin kotest/kotest#6145- Make flaky "throws FileNotFoundException for some time" eventually test deterministic by
@sksamuelin kotest/kotest#6149Full Changelog: https://github.com/kotest/kotest/compare/v6.2.0...v6.2.1
v6.2.0
✨ Features
New matchers / assertions
comparables.shouldBeAtLeast —
@AlexCue987(#5831) MultipleMatcherResult for combining multiple matcher results —@sksamuel(#5723) shouldContainExactCopies for lists —@AlexCue987(#5913) Character matchers —@JordanLongstaff(#5921) shouldBeSingle matcher —@sksamuel(#6028) shouldContainRepeats for strings —@AlexCue987(#6004) Infix form for inspectors —@alfonsoristorato(#5920) Block-asserting overload for shouldBeFailure —@alfonsoristorato(#5927) Per-call Eq overrides via a withEqs DSL —@PreAgile(#6010) Per-element data class diffs in collection comparisons —@PreAgile(#5835)Framework / API
Run data tests singularly —
@alfonsoristorato(#5574) New JVM test-suites module (deprecates JunitXmlReporter) —@sksamuel(#5801) Support isolation modes on all KMP platforms —@sksamuel(#5806) Breadcrumbs support for Kotest spec files —@sksamuel(#5793) Type-safe test metadata API —@PreAgile(#5905) Public API for creating custom styles —@sksamuel(#5814) Support multiple --test args joined by semicolon in KOTEST_INCLUDE_PATTERN —@sksamuel(#5922) Extend life of deprecated Test containers and add onStart —@sksamuel(#5896) Make Arb.stringPattern multiplatform —@wilmveel(#6008) Complete the permutations module —@sksamuel(#6016) Add Wasm WASI target to kotest-property and kotest-property-permutations —@jsoizo(#6129) Make fibonacci interval functions public —@mvanhorn(#6135) Add Android instrumented test module —@sksamuel(#5900)IntelliJ plugin
N-times setter for test invocation —
@alfonsoristorato(#5815) Invocation count on the Kotest producer —@alfonsoristorato(#5837) Singular data-test run on the Kotest producer —@alfonsoristorato(#5843) Amper-aware run-configuration producer —@sksamuel(#5999)... (truncated)
Commits
9ae8a1dMake flaky "throws FileNotFoundException for some time" eventually test deter...a16146fFix data objects being considered equal in DataClassEq (#6144) (#6145)47fe8d4remove KotestInternal in TestFactory (#6146)b39700cfix docs (#6147)8006dbdRemove usages of K1's KtUltraLightClass from kotest plugin sources (#6143)07b21d7Add support for deprecated Kotlin targets in Android and Native conve… (#6141)96f71e0docs: add KDoc to ArrayEq (#6140)7f2b14aCut docs for 6.2ead01c0Override additional Kotlin version properties for IC-261 in release workflowf3134eaalign compile toolchain with minimum supported Kotlin version for KLIB ABI co...- Additional commits viewable in compare view
Updates `io.kotest:kotest-assertions-json` from 6.1.11 to 6.2.1Release notes
Sourced from io.kotest:kotest-assertions-json's releases.
v6.2.1
What's Changed
- docs: add KDoc to ArrayEq by
@LeoColmanin kotest/kotest#6140- Add support for deprecated Kotlin targets in Android and Native conve… by
@sksamuelin kotest/kotest#6141- Remove usages of K1's KtUltraLightClass from kotest plugin sources by
@sksamuelin kotest/kotest#6143- fix docs by
@alfonsoristoratoin kotest/kotest#6147- remove KotestInternal in TestFactory by
@alfonsoristoratoin kotest/kotest#6146- Fix data objects being considered equal in DataClassEq (#6144) by
@sksamuelin kotest/kotest#6145- Make flaky "throws FileNotFoundException for some time" eventually test deterministic by
@sksamuelin kotest/kotest#6149Full Changelog: https://github.com/kotest/kotest/compare/v6.2.0...v6.2.1
v6.2.0
✨ Features
New matchers / assertions
comparables.shouldBeAtLeast —
@AlexCue987(#5831) MultipleMatcherResult for combining multiple matcher results —@sksamuel(#5723) shouldContainExactCopies for lists —@AlexCue987(#5913) Character matchers —@JordanLongstaff(#5921) shouldBeSingle matcher —@sksamuel(#6028) shouldContainRepeats for strings —@AlexCue987(#6004) Infix form for inspectors —@alfonsoristorato(#5920) Block-asserting overload for shouldBeFailure —@alfonsoristorato(#5927) Per-call Eq overrides via a withEqs DSL —@PreAgile(#6010) Per-element data class diffs in collection comparisons —@PreAgile(#5835)Framework / API
Run data tests singularly —
@alfonsoristorato(#5574) New JVM test-suites module (deprecates JunitXmlReporter) —@sksamuel(#5801) Support isolation modes on all KMP platforms —@sksamuel(#5806) Breadcrumbs support for Kotest spec files —@sksamuel(#5793) Type-safe test metadata API —@PreAgile(#5905) Public API for creating custom styles —@sksamuel(#5814) Support multiple --test args joined by semicolon in KOTEST_INCLUDE_PATTERN —@sksamuel(#5922) Extend life of deprecated Test containers and add onStart —@sksamuel(#5896) Make Arb.stringPattern multiplatform —@wilmveel(#6008) Complete the permutations module —@sksamuel(#6016) Add Wasm WASI target to kotest-property and kotest-property-permutations —@jsoizo(#6129) Make fibonacci interval functions public —@mvanhorn(#6135) Add Android instrumented test module —@sksamuel(#5900)IntelliJ plugin
N-times setter for test invocation —
@alfonsoristorato(#5815) Invocation count on the Kotest producer —@alfonsoristorato(#5837) Singular data-test run on the Kotest producer —@alfonsoristorato(#5843) Amper-aware run-configuration producer —@sksamuel(#5999)... (truncated)
Commits
9ae8a1dMake flaky "throws FileNotFoundException for some time" eventually test deter...a16146fFix data objects being considered equal in DataClassEq (#6144) (#6145)47fe8d4remove KotestInternal in TestFactory (#6146)b39700cfix docs (#6147)8006dbdRemove usages of K1's KtUltraLightClass from kotest plugin sources (#6143)07b21d7Add support for deprecated Kotlin targets in Android and Native conve… (#6141)96f71e0docs: add KDoc to ArrayEq (#6140)7f2b14aCut docs for 6.2ead01c0Override additional Kotlin version properties for IC-261 in release workflowf3134eaalign compile toolchain with minimum supported Kotlin version for KLIB ABI co...- Additional commits viewable in compare view
Updates `io.kotest:kotest-assertions-ktor` from 6.1.11 to 6.2.1Release notes
Sourced from io.kotest:kotest-assertions-ktor's releases.
v6.2.1
What's Changed
- docs: add KDoc to ArrayEq by
@LeoColmanin kotest/kotest#6140- Add support for deprecated Kotlin targets in Android and Native conve… by
@sksamuelin kotest/kotest#6141- Remove usages of K1's KtUltraLightClass from kotest plugin sources by
@sksamuelin kotest/kotest#6143- fix docs by
@alfonsoristoratoin kotest/kotest#6147- remove KotestInternal in TestFactory by
@alfonsoristoratoin kotest/kotest#6146- Fix data objects being considered equal in DataClassEq (#6144) by
@sksamuelin kotest/kotest#6145- Make flaky "throws FileNotFoundException for some time" eventually test deterministic by
@sksamuelin kotest/kotest#6149Full Changelog: https://github.com/kotest/kotest/compare/v6.2.0...v6.2.1
v6.2.0
✨ Features
New matchers / assertions
comparables.shouldBeAtLeast —
@AlexCue987(#5831) MultipleMatcherResult for combining multiple matcher results —@sksamuel(#5723) shouldContainExactCopies for lists —@AlexCue987(#5913) Character matchers —@JordanLongstaff(#5921) shouldBeSingle matcher —@sksamuel(#6028) shouldContainRepeats for strings —@AlexCue987(#6004) Infix form for inspectors —@alfonsoristorato(#5920) Block-asserting overload for shouldBeFailure —@alfonsoristorato(#5927) Per-call Eq overrides via a withEqs DSL —@PreAgile(#6010) Per-element data class diffs in collection comparisons —@PreAgile(#5835)Framework / API
Run data tests singularly —
@alfonsoristorato(#5574) New JVM test-suites module (deprecates JunitXmlReporter) —@sksamuel(#5801) Support isolation modes on all KMP platforms —@sksamuel(#5806) Breadcrumbs support for Kotest spec files —@sksamuel(#5793) Type-safe test metadata API —@PreAgile(#5905) Public API for creating custom styles —@sksamuel(#5814) Support multiple --test args joined by semicolon in KOTEST_INCLUDE_PATTERN —@sksamuel(#5922) Extend life of deprecated Test containers and add onStart —@sksamuel(#5896) Make Arb.stringPattern multiplatform —@wilmveel(#6008) Complete the permutations module —@sksamuel(#6016) Add Wasm WASI target to kotest-property and kotest-property-permutations —@jsoizo(#6129) Make fibonacci interval functions public —@mvanhorn(#6135) Add Android instrumented test module —@sksamuel(#5900)IntelliJ plugin
N-times setter for test invocation —
@alfonsoristorato(#5815) Invocation count on the Kotest producer —@alfonsoristorato(#5837) Singular data-test run on the Kotest producer —@alfonsoristorato(#5843) Amper-aware run-configuration producer —@sksamuel(#5999)... (truncated)
Commits
9ae8a1dMake flaky "throws FileNotFoundException for some time" eventually test deter...a16146fFix data objects being considered equal in DataClassEq (#6144) (#6145)47fe8d4remove KotestInternal in TestFactory (#6146)b39700cfix docs (#6147)8006dbdRemove usages of K1's KtUltraLightClass from kotest plugin sources (#6143)07b21d7Add support for deprecated Kotlin targets in Android and Native conve… (#6141)96f71e0docs: add KDoc to ArrayEq (#6140)7f2b14aCut docs for 6.2ead01c0Override additional Kotlin version properties for IC-261 in release workflowf3134eaalign compile toolchain with minimum supported Kotlin version for KLIB ABI co...- Additional commits viewable in compare view
Updates `io.kotest:kotest-assertions-json` from 6.1.11 to 6.2.1Release notes
Sourced from io.kotest:kotest-assertions-json's releases.
v6.2.1
What's Changed
- docs: add KDoc to ArrayEq by
@LeoColmanin kotest/kotest#6140- Add support for deprecated Kotlin targets in Android and Native conve… by
@sksamuelin kotest/kotest#6141- Remove usages of K1's KtUltraLightClass from kotest plugin sources by
@sksamuelin kotest/kotest#6143- fix docs by
@alfonsoristoratoin kotest/kotest#6147- remove KotestInternal in TestFactory by
@alfonsoristoratoin kotest/kotest#6146- Fix data objects being considered equal in DataClassEq (#6144) by
@sksamuelin kotest/kotest#6145- Make flaky "throws FileNotFoundException for some time" eventually test deterministic by
@sksamuelin kotest/kotest#6149Full Changelog: https://github.com/kotest/kotest/compare/v6.2.0...v6.2.1
v6.2.0
✨ Features
New matchers / assertions
comparables.shouldBeAtLeast —
@AlexCue987(#5831) MultipleMatcherResult for combining multiple matcher results —@sksamuel(#5723) shouldContainExactCopies for lists —@AlexCue987(#5913) Character matchers —@JordanLongstaff(#5921) shouldBeSingle matcher —@sksamuel(#6028) shouldContainRepeats for strings —@AlexCue987(#6004) Infix form for inspectors —@alfonsoristorato(#5920) Block-asserting overload for shouldBeFailure —@alfonsoristorato(#5927) Per-call Eq overrides via a withEqs DSL —@PreAgile(#6010) Per-element data class diffs in collection comparisons —@PreAgile(#5835)Framework / API
Run data tests singularly —
@alfonsoristorato(#5574) New JVM test-suites module (deprecates JunitXmlReporter) —@sksamuel(#5801) Support isolation modes on all KMP platforms —@sksamuel(#5806) Breadcrumbs support for Kotest spec files —@sksamuel(#5793) Type-safe test metadata API —@PreAgile(#5905) Public API for creating custom styles —@sksamuel(#5814) Support multiple --test args joined by semicolon in KOTEST_INCLUDE_PATTERN —@sksamuel(#5922) Extend life of deprecated Test containers and add onStart —@sksamuel(#5896) Make Arb.stringPattern multiplatform —@wilmveel(#6008) Complete the permutations module —@sksamuel(#6016) Add Wasm WASI target to kotest-property and kotest-property-permutations —@jsoizo(#6129) Make fibonacci interval functions public —@mvanhorn(#6135) Add Android instrumented test module —@sksamuel(#5900)IntelliJ plugin
N-times setter for test invocation —
@alfonsoristorato(#5815) Invocation count on the Kotest producer —@alfonsoristorato(#5837) Singular data-test run on the Kotest producer —@alfonsoristorato(#5843) Amper-aware run-configuration producer —@sksamuel(#5999)... (truncated)
Commits
9ae8a1dMake flaky "throws FileNotFoundException for some time" eventually test deter...a16146fFix data objects being considered equal in DataClassEq (#6144) (#6145)47fe8d4remove KotestInternal in TestFactory (#6146)b39700cfix docs (#6147)8006dbdRemove usages of K1's KtUltraLightClass from kotest plugin sources (#6143)07b21d7Add support for deprecated Kotlin targets in Android and Native conve… (#6141)96f71e0docs: add KDoc to ArrayEq (#6140)7f2b14aCut docs for 6.2ead01c0Override additional Kotlin version properties for IC-261 in release workflowf3134eaalign compile toolchain with minimum supported Kotlin version for KLIB ABI co...- Additional commits viewable in compare view
Updates `io.kotest:kotest-assertions-ktor` from 6.1.11 to 6.2.1Release notes
Sourced from io.kotest:kotest-assertions-ktor's releases.
v6.2.1
What's Changed
- docs: add KDoc to ArrayEq by
@LeoColmanin kotest/kotest#6140- Add support for deprecated Kotlin targets in Android and Native conve… by
@sksamuelin kotest/kotest#6141- Remove usages of K1's KtUltraLightClass from kotest plugin sources by
@sksamuelin kotest/kotest#6143- fix docs by
@alfonsoristoratoin kotest/kotest#6147- remove KotestInternal in TestFactory by
@alfonsoristoratoin kotest/kotest#6146- Fix data objects being considered equal in DataClassEq (#6144) by
@sksamuelin kotest/kotest#6145- Make flaky "throws FileNotFoundException for some time" eventually test deterministic by
@sksamuelin kotest/kotest#6149Full Changelog: https://github.com/kotest/kotest/compare/v6.2.0...v6.2.1
v6.2.0
✨ Features
New matchers / assertions
comparables.shouldBeAtLeast —
@AlexCue987(#5831) MultipleMatcherResult for combining multiple matcher results —@sksamuel(#5723) shouldContainExactCopies for lists —@AlexCue987(#5913) Character matchers —@JordanLongstaff(#5921) shouldBeSingle matcher —@sksamuel(#6028) shouldContainRepeats for strings —@AlexCue987(#6004) Infix form for inspectors —@alfonsoristorato(#5920) Block-asserting overload for shouldBeFailure —@alfonsoristorato(#5927) Per-call Eq overrides via a withEqs DSL —@PreAgile(#6010) Per-element data class diffs in collection comparisons —@PreAgile(#5835)Framework / API
Run data tests singularly —
@alfonsoristorato(#5574) New JVM test-suites module (deprecates JunitXmlReporter) —@sksamuel(#5801) Support isolation modes on all KMP platforms —@sksamuel(#5806) Breadcrumbs support for Kotest spec files —@sksamuel(#5793) Type-safe test metadata API —@PreAgile(#5905) Public API for creating custom styles —@sksamuel(#5814) Support multiple --test args joined by semicolon in KOTEST_INCLUDE_PATTERN —@sksamuel(#5922) Extend life of deprecated Test containers and add onStart —@sksamuel(#5896) Make Arb.stringPattern multiplatform —@wilmveel(#6008) Complete the permutations module —@sksamuel(#6016) Add Wasm WASI target to kotest-property and kotest-property-permutations —@jsoizo(#6129) Make fibonacci interval functions public —@mvanhorn(#6135) Add Android instrumented test module —@sksamuel(#5900)IntelliJ plugin
N-times setter for test invocation —
@alfonsoristorato(#5815) Invocation count on the Kotest producer —@alfonsoristorato(#5837) Singular data-test run on the Kotest producer —@alfonsoristorato(#5843) Amper-aware run-configuration producer —@sksamuel(#5999)... (truncated)
Commits
9ae8a1dMake flaky "throws FileNotFoundException for some time" eventually test deter...a16146fFix data objects being considered equal in DataClassEq (#6144) (#6145)47fe8d4remove KotestInternal in TestFactory (#6146)b39700cfix docs (#6147)8006dbdRemove usages of K1's KtUltraLightClass from kotest plugin sources (#6143)07b21d7Add support for deprecated Kotlin targets in Android and Native conve… (#6141)96f71e0docs: add KDoc to ArrayEq (#6140)7f2b14aCut docs for 6.2ead01c0Override additional Kotlin version properties for IC-261 in release workflowf3134eaalign compile toolchain with minimum supported Kotlin version for KLIB ABI co...- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0b2929d..b35612e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ netty = "4.2.15.Final" awaitility = "4.3.0" collections-immutable = "0.4.0" coroutines = "1.11.0" -kotest = "6.1.11" +kotest = "6.2.1" kotlinx-io = "0.9.0" ktor = "3.4.3" logging = "8.0.4" From b6f4ad5a9fe52ef4b3937e224854e325771a4207 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jun 2026 21:12:13 +0200 Subject: [PATCH 026/143] chore(deps): bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.4.0 to 0.5.0 in the kotlinx group across 1 directory (#833) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the kotlinx group with 1 update in the / directory: [org.jetbrains.kotlinx:kotlinx-collections-immutable](https://github.com/Kotlin/kotlinx.collections.immutable). Updates `org.jetbrains.kotlinx:kotlinx-collections-immutable` from 0.4.0 to 0.5.0 Release notes
Sourced from org.jetbrains.kotlinx:kotlinx-collections-immutable's releases.
v0.5.0
This release renames the copy-returning methods on
PersistentCollection,PersistentList, andPersistentMapto participial forms (KEEP-0459) —add→adding,put→putting,set→replacingAt,clear→cleared, and the rest. The old imperative names continue to compile in0.5.xas@Deprecated(WARNING), become a compile error in0.6.0, and are removed in0.7.0. First shipped in0.5.0-beta01;0.5.0is the stable release, with only internal fixes since.To migrate, apply the IDE quick-fixes, follow the migration guide, or use the 0.5.x migration skill with an AI assistant — each applies the rename the deprecation warnings name.
Changes since 0.4.0:
- Renamed copy-returning methods to participial forms; deprecated the old names #233
- Enabled the Kotlin return-value checker (
-Xreturn-value-checker=full) for the core module #243- Updated Kotlin to 2.3.0 #242
- Configured JDK release 8 for the Kotlin compiler #239
- Populated
Implementation-*attributes in published JAR manifests #237- Enabled Dokka documentation generation, upgraded to Dokka 2.2.0 #225, #245, #248
Full changelog: https://github.com/Kotlin/kotlinx.collections.immutable/compare/v0.4.0...v0.5.0
v0.5.0-beta01
This release renames copy-returning methods on
PersistentCollection,PersistentList, andPersistentMapto participial forms — the old imperative names continue to compile in0.5.xas@Deprecated(WARNING), become a compile error in0.6.0, and are removed in0.7.0. Concretely,add→adding,put→putting,clear→cleared,set→replacingAt,removeAt→removingAt, and the rest of the family (see the migration guide for the full table). The rename follows KEEP-0459 — Naming Conventions for Copy-Returning Operations.If your code uses any of these methods, please read the migration guide for the full rename table, the deprecation timeline, and the recommended IDE quick-fix workflow.
This is a beta —
0.5.0is planned to drop the-betasuffix soon, and once it ships stable the participial names are committed (any further rename would need its own deprecation cycle). If any of the renames feels awkward or you've hit a migration problem, please share it on [issue #232](Kotlin/kotlinx.collections.immutable#232) before then.What's changed
- Renamed
PersistentCollectionmutating-copy methods to participial forms (add/remove/set/put/clear→adding/removing/setting/putting/clearingand*edvariants) and deprecated the original names #233- Enabled the Kotlin return-value checker (
-Xreturn-value-checker=full) for the core module and annotated select internal helpers with@IgnorableReturnValuewhere discarding the result is intentional #243- Updated Kotlin to version 2.3.0 #242
- Configured JDK release to 8 for the Kotlin compiler #239
- Populated
Implementation-Title/Implementation-Version/Implementation-Vendorin published JAR manifests #237- Enabled Dokka documentation generation and upgraded Dokka to 2.2.0 #225, #245, #248
Changelog
Sourced from org.jetbrains.kotlinx:kotlinx-collections-immutable's changelog.
0.5.0
- Promoted
0.5.0-beta01to stable; no API or behavior changes0.5.0-beta01
- Renamed copy-returning methods on
PersistentCollection,PersistentList, andPersistentMapfrom imperative to participial forms (add/remove/put/clear/set/removeAt/… →adding/removing/putting/cleared/replacingAt/removingAt/…) per KEEP-0459 and deprecated the original names #233- Enabled the Kotlin return-value checker (
-Xreturn-value-checker=full) for the core module and annotated select internal helpers with@IgnorableReturnValuewhere discarding the result is intentional #243- Updated Kotlin to version 2.3.0 #242
- Configured JDK release to 8 for the Kotlin compiler #239
- Populated
Implementation-Title/Implementation-Version/Implementation-Vendorin published JAR manifests #237- Enabled Dokka documentation generation and upgraded Dokka to 2.2.0 #225, #245, #248
Commits
0727896Release v0.5.00e1a24cDocument return values in the KDoc summary instead of@return(#256)2069a62Fix equals/hashCode contract violation in random-operations stress tests (#262)6f7abb9Updated team infra plugin (#260)15a77d7Fix the package-list location (#258)1ab038cAdd.kotlinto.gitignoreto exclude build metadata produced by KGP (#259)dc6ba40Add top-level README for kotlinx-collections-immutable module (#255)a6ad2e1Release v0.5.0-beta0154f4815Rename PersistentCollection methods to participial forms and deprecate origin...753924cAdded missing reference to deployment id parameter (#250)- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b35612e..cf6d374 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ netty = "4.2.15.Final" # libraries version awaitility = "4.3.0" -collections-immutable = "0.4.0" +collections-immutable = "0.5.0" coroutines = "1.11.0" kotest = "6.2.1" kotlinx-io = "0.9.0" From d93f47f1e57a2c1fbdd835679bae7e701cc15096 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 13:14:48 +0200 Subject: [PATCH 027/143] chore(deps): bump ch.qos.logback:logback-classic from 1.5.34 to 1.5.37 (#857) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.5.34 to 1.5.37. Release notes
Sourced from ch.qos.logback:logback-classic's releases.
Logback 1.5.37
2026-06-26 Release of logback version 1.5.37
• Given the numerous vulnerabilities related to conditional configuration processing based on the evaluation of Java expressions using the Janino library, support for such expressions has been removed. Users are offered the an online migration service or the element introduced in version 1.5.20. See the relevant documentation for more details.
• A bitwise identical binary of this version can be reproduced by building from source code at commit c1df7f522e648eec7b4ef6a12c8758fec0f00048 associated with the tag v_1.5.37. Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
Logback 1.5.36
2026-06-25 Release of logback version 1.5.36
• The 'condition' attribute in
<if>elements now reject certain references that are associated with ACE attacks. This issue was reported by "yulate" (yulate531@gmail.com.com) and registered as CVE-2026-13006.• A bitwise identical binary of this version can be reproduced by building from source code at commit 9b94c37562bf25a6a944146701d42ee6c4eee888 associated with the tag v_1.5.36. Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
Logback 1.5.35
026-06-23 Release of logback version 1.5.35
• The 'condition' attribute in
<if>elements now rejects unicode escape sequences (\u and \U). This closes a bypass of the existing prohibition on the new operator in Janino-evaluated conditions. This issue was reported by IcySun (icysun@qq.com) and registered as CVE-2026-13006.• Added
ConfiguratorRank.AUTHENTICATING(rank 100), the highest configurator rank, for certified/authenticating configurators discovered via the ServiceLoader mechanism.ContextInitializernow requires that at most one such configurator exist on the classpath; if more than one is found, initialization aborts with an error.•
ConsoleCharsetPropertyDefineris no longer shipped. The Java 21 multi-release compilation of logback-core has been disabled, which removes this class from the published artifact. Configurations that referencedch.qos.logback.core.property.ConsoleCharsetPropertyDefinerwill need an alternative approach for console charset detection.• The logback-examples module is now included in artifacts published to Maven Central.
•
JoranConfigurator.makeAnotherInstance()andDefaultJoranConfigurator.performMultiStepConfigurationFileSearch()are now protected, allowing derived configurators to override these methods.• A bitwise identical binary of this version can be reproduced by building from source code at commit 08bd1598d565d83444f72983935e7da4746783b7 associated with the tag v_1.5.35. Release built using Java "21" 2023-10-17 LTS build 21.0.1.+12-LTS-29 under Linux Debian 11.6.
Commits
c1df7f5prepare release 1.5.37a189967remove conditional based on janinoaaa9052start work on 1.5.37-SNAPSHOT9b94c37prepare release 1.5.36e6a8280prevent attacks using disallowed references24c4b63start work on 1.5.36-SNAPSHOT08bd159preapre release 1.5.3537d256bindentation changes onlyd3d7307minor commentfa0411aradomize file location- Additional commits viewable in compare view
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---Signed-off-by: dependabot[bot]Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot showignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cf6d374..6faaf2a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -22,7 +22,7 @@ logging = "8.0.4" mockk = "1.14.11" serialization = "1.11.0" slf4j = "2.0.18" -logback = "1.5.34" +logback = "1.5.37" junit = "5.14.4" [libraries] From 4103b87d6952f7e72b0fc9ddfdb2f59a0a39d0ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jun 2026 14:17:43 +0200 Subject: [PATCH 028/143] chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 in the kotlinx group across 1 directory (#855) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the kotlinx group with 1 update in the / directory: [org.jetbrains.kotlinx:kotlinx-io-core](https://github.com/Kotlin/kotlinx-io). Updates `org.jetbrains.kotlinx:kotlinx-io-core` from 0.9.0 to 0.9.1 Release notes
Sourced from org.jetbrains.kotlinx:kotlinx-io-core's releases.
v0.9.1
Features
- Dropped an old workaround for unsupported Android version #508
- Reimplemented module loading for WasmJs #506
Thanks to
@ilgonmicand@MohammedKHCfor their contributions!Changelog
Sourced from org.jetbrains.kotlinx:kotlinx-io-core's changelog.
0.9.1
Published 26 June 2026
Features
Commits
362bdc3Release 0.9.1e5ae2f0Merge branch 'develop'2997cafDrop workaround for Android 4.2.2 getsockname bug (#508)a1d6bd9Use IIFE to asynchronously load a module instead of globalThis (#506)d53d449Update feedback channels in contributing guidelines34f1579Merge branch 'develop'82caeb2Document segment pool configuration (#494)- See full diff in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6faaf2a..ae38db6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,7 +16,7 @@ awaitility = "4.3.0" collections-immutable = "0.5.0" coroutines = "1.11.0" kotest = "6.2.1" -kotlinx-io = "0.9.0" +kotlinx-io = "0.9.1" ktor = "3.4.3" logging = "8.0.4" mockk = "1.14.11" From cd91652be115064c0b9fc43ba1c517893131ba92 Mon Sep 17 00:00:00 2001 From: Pavel Gorgulov Date: Mon, 29 Jun 2026 14:38:44 +0200 Subject: [PATCH 029/143] fix: validate Origin against localhost by default in DNS rebinding protection (#840) Default the `Origin` allowlist to localhost when `DnsRebindingProtection` relies on the localhost host defaults, so a request with a valid `Host` but a hostile (or `null`) `Origin` is no longer accepted. ## How Has This Been Tested? unit tests ## Breaking Changes Behavioral change only ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed --- .../kotlin/sdk/server/HostValidation.kt | 10 ++++ .../kotlin/sdk/server/KtorServer.kt | 21 +++++++-- .../sdk/server/DnsRebindingProtectionTest.kt | 46 +++++++++++++++++++ 3 files changed, 72 insertions(+), 5 deletions(-) diff --git a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/HostValidation.kt b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/HostValidation.kt index 88b56bc..ef010fe 100644 --- a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/HostValidation.kt +++ b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/HostValidation.kt @@ -19,6 +19,16 @@ import io.modelcontextprotocol.kotlin.sdk.types.RPCError */ internal val LOCALHOST_ALLOWED_HOSTS: List = listOf("localhost", "127.0.0.1", "[::1]") +/** + * Default list of `Origin` values allowed for localhost DNS rebinding protection. + * + * Mirrors [LOCALHOST_ALLOWED_HOSTS] but carries a scheme so the values parse as URLs: + * [extractOriginHost] rejects schemeless input. Comparison is hostname-only and + * scheme-agnostic, so these entries also match `https://` origins on the same host. + */ +internal val LOCALHOST_ALLOWED_ORIGINS: List = + listOf("http://localhost", "http://127.0.0.1", "http://[::1]") + /** * Characters that are valid in a URL but must not appear in an HTTP `Host` header. * Rejecting them prevents the parser from accepting malformed values diff --git a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt index d6191df..7e47d76 100644 --- a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt +++ b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt @@ -41,7 +41,9 @@ private val logger = KotlinLogging.logger {} * @param allowedHosts hostnames allowed in the `Host` header. Defaults to `localhost`, `127.0.0.1`, `[::1]`. * @param allowedOrigins origins allowed in the `Origin` header, compared by hostname only * (scheme and port are ignored). Requests without an `Origin` header are allowed. - * Pass `null` to skip origin validation. + * When `null` while the localhost host defaults are in effect (no custom `allowedHosts`), + * the `Origin` header is validated against `localhost`, `127.0.0.1`, `[::1]`. + * With custom `allowedHosts`, `null` skips origin validation. * @param block factory block with access to the [ServerSSESession] * that creates and returns the [Server] to handle the connection. * @throws IllegalStateException if the [SSE] plugin is not installed. @@ -71,7 +73,9 @@ public fun Route.mcp( * @param allowedHosts hostnames allowed in the `Host` header. Defaults to `localhost`, `127.0.0.1`, `[::1]`. * @param allowedOrigins origins allowed in the `Origin` header, compared by hostname only * (scheme and port are ignored). Requests without an `Origin` header are allowed. - * Pass `null` to skip origin validation. + * When `null` while the localhost host defaults are in effect (no custom `allowedHosts`), + * the `Origin` header is validated against `localhost`, `127.0.0.1`, `[::1]`. + * With custom `allowedHosts`, `null` skips origin validation. * @param block factory block with access to the [ServerSSESession] * that creates and returns the [Server] to handle the connection. * @throws IllegalStateException if the [SSE] plugin is not installed. @@ -119,7 +123,9 @@ public fun Route.mcp( * @param allowedHosts hostnames allowed in the `Host` header. Defaults to `localhost`, `127.0.0.1`, `[::1]`. * @param allowedOrigins origins allowed in the `Origin` header, compared by hostname only * (scheme and port are ignored). Requests without an `Origin` header are allowed. - * Pass `null` to skip origin validation. + * When `null` while the localhost host defaults are in effect (no custom `allowedHosts`), + * the `Origin` header is validated against `localhost`, `127.0.0.1`, `[::1]`. + * With custom `allowedHosts`, `null` skips origin validation. * @param block factory block with access to the [ServerSSESession] * that creates and returns the [Server] to handle the connection. */ @@ -205,7 +211,9 @@ private fun Application.mcpStreamableHttp( * If `null` and DNS rebinding protection is enabled, defaults to `localhost`, `127.0.0.1`, `[::1]`. * @param allowedOrigins A list of allowed `Origin` header values, compared by hostname only * (scheme and port are ignored). Requests without an `Origin` header are allowed. - * If `null`, origin validation is disabled. + * When `null` while the localhost host defaults are in effect (no custom `allowedHosts`), + * the `Origin` header is validated against `localhost`, `127.0.0.1`, `[::1]`. + * With custom `allowedHosts`, `null` skips origin validation. * @param eventStore An optional [EventStore] instance to enable resumable event stream functionality. * Allows storing and replaying events. * @param block factory block with access to the [RoutingContext] (for reading request headers) @@ -451,6 +459,9 @@ private fun Route.installDnsRebindingProtection(enabled: Boolean, hosts: List Date: Mon, 29 Jun 2026 15:07:06 +0200 Subject: [PATCH 030/143] chore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [gradle-wrapper](https://github.com/gradle/gradle) from 9.6.0 to 9.6.1. Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
Commits
309d128Update fixed issues in release notes for 9.6.1 (#38328)040a978Update fixed issues in release notes for 9.6.1e0b8325Restore --non-interactive flag instead of --interactive/--no-interactive (#38...946f3e6Limit explicit temp file permission setting to intended use case (#38300)65f8224Restore --non-interactive flag instead of --interactive/--no-interactivee346a5eAdjust CLI flag to configure non-interactive console (#38301)9b53be9Adjust CLI flag to configure non-interactive console0dd3b53Limit explicit temp file permission setting to intended use case48e5ac2Add reproducers25598fdPrepare 9.6.1 patch release (#38293)- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index eb84db6..a9db115 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 From 19db4b04e3d578635d4a60e190bc5f9f23bc53f4 Mon Sep 17 00:00:00 2001 From: Takuya Akamatsu Date: Tue, 30 Jun 2026 00:18:53 +0900 Subject: [PATCH 031/143] fix(client): gate completion/complete on the completions capability (#846) Gate `completion/complete` on the server's `completions` capability instead of `prompts`. closes #845 ## Motivation and Context A server that declares `completions` but not `prompts` is currently rejected for completion. Details in #845. ## How Has This Been Tested? New `ClientAssertCapabilityTest` cases; they fail on `main` and pass with this change. `apiCheck` / `ktlintCheck` / `detekt` pass. ## Breaking Changes None. ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed Co-authored-by: Pavel Gorgulov --- .../kotlin/sdk/client/Client.kt | 9 +++++++-- .../sdk/client/ClientAssertCapabilityTest.kt | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt b/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt index b88cb1b..59f2b7e 100644 --- a/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt +++ b/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt @@ -242,13 +242,18 @@ public open class Client(private val clientInfo: Implementation, options: Client Method.Defined.PromptsGet, Method.Defined.PromptsList, - Method.Defined.CompletionComplete, -> { checkNotNull(serverCapabilities?.prompts) { "Server does not support prompts (required for $method)" } } + Method.Defined.CompletionComplete -> { + checkNotNull(serverCapabilities?.completions) { + "Server does not support completions (required for $method)" + } + } + Method.Defined.ResourcesList, Method.Defined.ResourcesTemplatesList, Method.Defined.ResourcesRead, @@ -394,7 +399,7 @@ public open class Client(private val clientInfo: Implementation, options: Client * @param params The completion request parameters. * @param options Optional request options. * @return The completion result returned by the server, or `null` if none. - * @throws IllegalStateException If the server does not support prompts or completion. + * @throws IllegalStateException If the server does not support completions. */ public suspend fun complete(params: CompleteRequest, options: RequestOptions? = null): CompleteResult = request(params, options) diff --git a/kotlin-sdk-client/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientAssertCapabilityTest.kt b/kotlin-sdk-client/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientAssertCapabilityTest.kt index 2f322ec..e9379a7 100644 --- a/kotlin-sdk-client/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientAssertCapabilityTest.kt +++ b/kotlin-sdk-client/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientAssertCapabilityTest.kt @@ -84,6 +84,25 @@ class ClientAssertCapabilityTest { ex.message.orEmpty() shouldContain "Client does not support tasks" } + @Test + fun `CompletionComplete does not throw when server declared completions`() = runTest { + val client = newTestClient( + serverCapabilities = ServerCapabilities(completions = ServerCapabilities.Completions), + ) + client.exposedAssertCapabilityForMethod(Method.Defined.CompletionComplete) + } + + @Test + fun `CompletionComplete throws when server has no completions capability`() = runTest { + val client = newTestClient( + serverCapabilities = ServerCapabilities(prompts = ServerCapabilities.Prompts()), + ) + val ex = assertFailsWith { + client.exposedAssertCapabilityForMethod(Method.Defined.CompletionComplete) + } + ex.message.orEmpty() shouldContain "Server does not support completions" + } + private suspend fun newTestClient( serverCapabilities: ServerCapabilities = ServerCapabilities(), clientCapabilities: ClientCapabilities = ClientCapabilities(), From 0221b8db3d596a8add753786048126564ad70b78 Mon Sep 17 00:00:00 2001 From: King Star Date: Tue, 30 Jun 2026 15:46:43 +0800 Subject: [PATCH 032/143] fix(client): close stdio read sources during shutdown (#798) ## Summary Fixes `StdioClientTransport.close()` so shutdown does not hang when the stdin read loop is blocked waiting for input. ## Root Cause / Context `StdioClientTransport.closeResources()` stopped the transport coroutine scope and then waited for the scope job to finish. On the JVM, a `Source.readAtMostTo()` call backed by a blocking Java stream does not necessarily return when the coroutine is cancelled. If the read loop stayed blocked, `close()` could wait indefinitely. ## Changes - Close the stdin source during stdio client shutdown before waiting for transport coroutines to finish. - Also close the optional stderr source during shutdown. - Keep source-close failures non-fatal and log them at debug level. - Add a JVM regression test with a `RawSource` that blocks in `readAtMostTo()` until `close()` is called. - Assert the close path completes, emits `onClose`, and does not invoke `onError`. ## Scope / Risk This is limited to `StdioClientTransport` shutdown behavior. It does not change the public API or server transports. The regression coverage is JVM-focused because the reported hang is caused by a blocking Java stream read. ## Verification ```bash ./gradlew :integration-test:jvmTest --tests 'io.modelcontextprotocol.kotlin.sdk.client.StdioClientTransportTest' ./gradlew :kotlin-sdk-client:jvmTest ./gradlew :kotlin-sdk-client:ktlintCheck :integration-test:ktlintCheck :kotlin-sdk-client:detekt :integration-test:detekt :kotlin-sdk-client:apiCheck ``` Closes #514 --- .../sdk/client/StdioClientTransportTest.kt | 61 +++++++++++++++++++ .../kotlin/sdk/client/StdioClientTransport.kt | 10 +++ 2 files changed, 71 insertions(+) diff --git a/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransportTest.kt b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransportTest.kt index 585af3f..fc3c1d3 100644 --- a/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransportTest.kt +++ b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransportTest.kt @@ -7,9 +7,13 @@ import io.modelcontextprotocol.kotlin.sdk.types.McpException import io.modelcontextprotocol.kotlin.test.utils.createSleepyProcessBuilder import io.modelcontextprotocol.kotlin.test.utils.createTeeProcessBuilder import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.async import kotlinx.coroutines.runBlocking import kotlinx.coroutines.test.runTest import kotlinx.coroutines.withTimeout +import kotlinx.coroutines.withTimeoutOrNull +import kotlinx.io.Buffer +import kotlinx.io.RawSource import kotlinx.io.asSink import kotlinx.io.asSource import kotlinx.io.buffered @@ -18,10 +22,12 @@ import org.junit.jupiter.api.Timeout import org.junit.jupiter.api.assertThrows import org.junit.jupiter.api.condition.DisabledOnOs import org.junit.jupiter.api.condition.OS +import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import kotlin.concurrent.atomics.AtomicBoolean import kotlin.concurrent.atomics.ExperimentalAtomicApi import kotlin.test.assertFalse +import kotlin.test.assertNotNull import kotlin.test.assertTrue import kotlin.test.fail import kotlin.time.Duration.Companion.seconds @@ -109,6 +115,43 @@ class StdioClientTransportTest : BaseTransportTest() { } } + @OptIn(ExperimentalAtomicApi::class) + @Test + fun `should close cleanly while stdin read is blocked`(): Unit = runBlocking(Dispatchers.IO) { + val input = BlockingRawSource() + + val transport = StdioClientTransport( + input = input.buffered(), + output = Buffer(), + ) + + val didClose = AtomicBoolean(false) + transport.onClose { didClose.store(true) } + transport.onError { error -> + fail("Unexpected error while closing transport: $error") + } + + transport.start() + + eventually(2.seconds) { + assertTrue(input.readStarted, "Transport should start reading stdin before close") + } + + val closeJob = async { + transport.close() + } + + val closed = withTimeoutOrNull(1.seconds) { + closeJob.await() + } + + input.close() + closeJob.await() + + assertNotNull(closed, "Transport.close() should not wait for stdin to produce data or EOF") + assertTrue(didClose.load(), "Transport should be closed after close() call") + } + @Test fun `should read messages`() = runTest { val processBuilder = createTeeProcessBuilder() @@ -147,4 +190,22 @@ class StdioClientTransportTest : BaseTransportTest() { process.waitFor() process.destroyForcibly() } + + private class BlockingRawSource : RawSource { + private val closed = CountDownLatch(1) + + @Volatile + var readStarted: Boolean = false + private set + + override fun readAtMostTo(sink: Buffer, byteCount: Long): Long { + readStarted = true + closed.await() + return -1L + } + + override fun close() { + closed.countDown() + } + } } diff --git a/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransport.kt b/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransport.kt index 63f681c..5e990ee 100644 --- a/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransport.kt +++ b/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransport.kt @@ -244,10 +244,20 @@ public class StdioClientTransport @JvmOverloads public constructor( override suspend fun closeResources() { withContext(NonCancellable) { scope.stopProcessing("Closed") + closeReadSources() scope.coroutineContext[Job]?.join() // Wait for all coroutines to complete } } + private fun closeReadSources() { + runCatching { input.close() } + .onFailure { logger.debug(it) { "Error closing stdin source" } } + error?.let { source -> + runCatching { source.close() } + .onFailure { logger.debug(it) { "Error closing stderr source" } } + } + } + private fun sendOutboundMessage(message: JSONRPCMessage, sink: Sink, mainScope: CoroutineScope) { try { val json = serializeMessage(message) From d2b1509147722305da481e3c939940253b066ecd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 11:44:40 +0200 Subject: [PATCH 033/143] chore(deps): bump the other-dependencies group across 5 directories with 5 updates (#865) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the other-dependencies group with 3 updates in the /samples/kotlin-mcp-client directory: [gradle-wrapper](https://github.com/gradle/gradle), [com.anthropic:anthropic-java](https://github.com/anthropics/anthropic-sdk-java) and [com.gradleup.shadow](https://github.com/GradleUp/shadow). Bumps the other-dependencies group with 2 updates in the /samples/kotlin-mcp-server directory: [gradle-wrapper](https://github.com/gradle/gradle) and [com.gradleup.shadow](https://github.com/GradleUp/shadow). Bumps the other-dependencies group with 3 updates in the /samples/kotlinlang-mcp-server directory: [gradle-wrapper](https://github.com/gradle/gradle), [com.gradleup.shadow](https://github.com/GradleUp/shadow) and [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback). Bumps the other-dependencies group with 3 updates in the /samples/simple-streamable-server directory: [gradle-wrapper](https://github.com/gradle/gradle), [com.gradleup.shadow](https://github.com/GradleUp/shadow) and [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit-framework). Bumps the other-dependencies group with 2 updates in the /samples/weather-stdio-server directory: [gradle-wrapper](https://github.com/gradle/gradle) and [com.gradleup.shadow](https://github.com/GradleUp/shadow). Updates `gradle-wrapper` from 9.6.0 to 9.6.1 Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
Commits
309d128Update fixed issues in release notes for 9.6.1 (#38328)040a978Update fixed issues in release notes for 9.6.1e0b8325Restore --non-interactive flag instead of --interactive/--no-interactive (#38...946f3e6Limit explicit temp file permission setting to intended use case (#38300)65f8224Restore --non-interactive flag instead of --interactive/--no-interactivee346a5eAdjust CLI flag to configure non-interactive console (#38301)9b53be9Adjust CLI flag to configure non-interactive console0dd3b53Limit explicit temp file permission setting to intended use case48e5ac2Add reproducers25598fdPrepare 9.6.1 patch release (#38293)- Additional commits viewable in compare view
Updates `com.anthropic:anthropic-java` from 2.43.0 to 2.45.0Release notes
Sourced from com.anthropic:anthropic-java's releases.
v2.45.0
2.45.0 (2026-06-29)
Full Changelog: v2.44.1...v2.45.0
Features
- api: add support for 20260318 web fetch and support tools (f38d0e6)
Bug Fixes
v2.44.1
2.44.1 (2026-06-26)
Full Changelog: v2.44.0...v2.44.1
Bug Fixes
- bedrock: use daemon threads for the SSE transcoding pool (#97) (0678c4d)
- skill creation (#119) (5dadc03)
Chores
- api: accept user profile ID's when counting tokens (ee8b72d)
- delete unnecessary dir (#108) (35a9662)
- docs: updates to descriptions and example values (6686e6b)
Build System
- add detekt rules (#109) (86b8f8d)
- derive umbrella Dokka aggregation from re-exported modules (#110) (82c00c7)
v2.44.0
2.44.0 (2026-06-24)
Full Changelog: v2.43.0...v2.44.0
Features
- client: add support for system.message streaming events (e27e961)
Chores
- api: add support for new refusal category (8c1bd29)
... (truncated)
Changelog
Sourced from com.anthropic:anthropic-java's changelog.
2.45.0 (2026-06-29)
Full Changelog: v2.44.1...v2.45.0
Features
- api: add support for 20260318 web fetch and support tools (f38d0e6)
Bug Fixes
2.44.1 (2026-06-26)
Full Changelog: v2.44.0...v2.44.1
Bug Fixes
- bedrock: use daemon threads for the SSE transcoding pool (#97) (0678c4d)
- skill creation (#119) (5dadc03)
Chores
- api: accept user profile ID's when counting tokens (ee8b72d)
- delete unnecessary dir (#108) (35a9662)
- docs: updates to descriptions and example values (6686e6b)
Build System
- add detekt rules (#109) (86b8f8d)
- derive umbrella Dokka aggregation from re-exported modules (#110) (82c00c7)
2.44.0 (2026-06-24)
Full Changelog: v2.43.0...v2.44.0
Features
- client: add support for system.message streaming events (e27e961)
Chores
... (truncated)
Commits
66da1barelease: 2.45.0ae4a759fix: add web tools 20260318 delegate overloads to StructuredMessageCreatePara...89455eefeat(api): add support for 20260318 web fetch and support toolsca57c4erelease: 2.44.12e9d127fix: skill creation (#119)4ee08d6fix(bedrock): use daemon threads for the SSE transcoding pool (#97)b6bf663chore(docs): updates to descriptions and example valuesfea6ca0build: add detekt rules (#109)35963afchore(api): accept user profile ID's when counting tokens0b00c21chore: delete unnecessary dir (#108)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.2 to 9.4.3Release notes
Sourced from com.gradleup.shadow's releases.
9.4.3
Changed
- Update dependencies for resolving CVEs. (#2069)
Commits
44c6ce1Prepare version 9.4.3ba5e0deFix conflictscd13ac5Minor cleanups298cd8aUpdate dependencies- See full diff in compare view
Updates `gradle-wrapper` from 9.6.0 to 9.6.1Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
Commits
309d128Update fixed issues in release notes for 9.6.1 (#38328)040a978Update fixed issues in release notes for 9.6.1e0b8325Restore --non-interactive flag instead of --interactive/--no-interactive (#38...946f3e6Limit explicit temp file permission setting to intended use case (#38300)65f8224Restore --non-interactive flag instead of --interactive/--no-interactivee346a5eAdjust CLI flag to configure non-interactive console (#38301)9b53be9Adjust CLI flag to configure non-interactive console0dd3b53Limit explicit temp file permission setting to intended use case48e5ac2Add reproducers25598fdPrepare 9.6.1 patch release (#38293)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.2 to 9.4.3Release notes
Sourced from com.gradleup.shadow's releases.
9.4.3
Changed
- Update dependencies for resolving CVEs. (#2069)
Commits
44c6ce1Prepare version 9.4.3ba5e0deFix conflictscd13ac5Minor cleanups298cd8aUpdate dependencies- See full diff in compare view
Updates `gradle-wrapper` from 9.6.0 to 9.6.1Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
Commits
309d128Update fixed issues in release notes for 9.6.1 (#38328)040a978Update fixed issues in release notes for 9.6.1e0b8325Restore --non-interactive flag instead of --interactive/--no-interactive (#38...946f3e6Limit explicit temp file permission setting to intended use case (#38300)65f8224Restore --non-interactive flag instead of --interactive/--no-interactivee346a5eAdjust CLI flag to configure non-interactive console (#38301)9b53be9Adjust CLI flag to configure non-interactive console0dd3b53Limit explicit temp file permission setting to intended use case48e5ac2Add reproducers25598fdPrepare 9.6.1 patch release (#38293)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.2 to 9.4.3Release notes
Sourced from com.gradleup.shadow's releases.
9.4.3
Changed
- Update dependencies for resolving CVEs. (#2069)
Commits
44c6ce1Prepare version 9.4.3ba5e0deFix conflictscd13ac5Minor cleanups298cd8aUpdate dependencies- See full diff in compare view
Updates `gradle-wrapper` from 9.6.0 to 9.6.1Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
Commits
309d128Update fixed issues in release notes for 9.6.1 (#38328)040a978Update fixed issues in release notes for 9.6.1e0b8325Restore --non-interactive flag instead of --interactive/--no-interactive (#38...946f3e6Limit explicit temp file permission setting to intended use case (#38300)65f8224Restore --non-interactive flag instead of --interactive/--no-interactivee346a5eAdjust CLI flag to configure non-interactive console (#38301)9b53be9Adjust CLI flag to configure non-interactive console0dd3b53Limit explicit temp file permission setting to intended use case48e5ac2Add reproducers25598fdPrepare 9.6.1 patch release (#38293)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.2 to 9.4.3Release notes
Sourced from com.gradleup.shadow's releases.
9.4.3
Changed
- Update dependencies for resolving CVEs. (#2069)
Commits
44c6ce1Prepare version 9.4.3ba5e0deFix conflictscd13ac5Minor cleanups298cd8aUpdate dependencies- See full diff in compare view
Updates `gradle-wrapper` from 9.6.0 to 9.6.1Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
Commits
309d128Update fixed issues in release notes for 9.6.1 (#38328)040a978Update fixed issues in release notes for 9.6.1e0b8325Restore --non-interactive flag instead of --interactive/--no-interactive (#38...946f3e6Limit explicit temp file permission setting to intended use case (#38300)65f8224Restore --non-interactive flag instead of --interactive/--no-interactivee346a5eAdjust CLI flag to configure non-interactive console (#38301)9b53be9Adjust CLI flag to configure non-interactive console0dd3b53Limit explicit temp file permission setting to intended use case48e5ac2Add reproducers25598fdPrepare 9.6.1 patch release (#38293)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.2 to 9.4.3Release notes
Sourced from com.gradleup.shadow's releases.
9.4.3
Changed
- Update dependencies for resolving CVEs. (#2069)
Commits
44c6ce1Prepare version 9.4.3ba5e0deFix conflictscd13ac5Minor cleanups298cd8aUpdate dependencies- See full diff in compare view
Updates `gradle-wrapper` from 9.6.0 to 9.6.1Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
Commits
309d128Update fixed issues in release notes for 9.6.1 (#38328)040a978Update fixed issues in release notes for 9.6.1e0b8325Restore --non-interactive flag instead of --interactive/--no-interactive (#38...946f3e6Limit explicit temp file permission setting to intended use case (#38300)65f8224Restore --non-interactive flag instead of --interactive/--no-interactivee346a5eAdjust CLI flag to configure non-interactive console (#38301)9b53be9Adjust CLI flag to configure non-interactive console0dd3b53Limit explicit temp file permission setting to intended use case48e5ac2Add reproducers25598fdPrepare 9.6.1 patch release (#38293)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.2 to 9.4.3Release notes
Sourced from com.gradleup.shadow's releases.
9.4.3
Changed
- Update dependencies for resolving CVEs. (#2069)
Commits
44c6ce1Prepare version 9.4.3ba5e0deFix conflictscd13ac5Minor cleanups298cd8aUpdate dependencies- See full diff in compare view
Updates `gradle-wrapper` from 9.6.0 to 9.6.1Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
Commits
309d128Update fixed issues in release notes for 9.6.1 (#38328)040a978Update fixed issues in release notes for 9.6.1e0b8325Restore --non-interactive flag instead of --interactive/--no-interactive (#38...946f3e6Limit explicit temp file permission setting to intended use case (#38300)65f8224Restore --non-interactive flag instead of --interactive/--no-interactivee346a5eAdjust CLI flag to configure non-interactive console (#38301)9b53be9Adjust CLI flag to configure non-interactive console0dd3b53Limit explicit temp file permission setting to intended use case48e5ac2Add reproducers25598fdPrepare 9.6.1 patch release (#38293)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.2 to 9.4.3Release notes
Sourced from com.gradleup.shadow's releases.
9.4.3
Changed
- Update dependencies for resolving CVEs. (#2069)
Commits
44c6ce1Prepare version 9.4.3ba5e0deFix conflictscd13ac5Minor cleanups298cd8aUpdate dependencies- See full diff in compare view
Updates `gradle-wrapper` from 9.6.0 to 9.6.1Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to learn about deprecations, breaking changes and other considerations when upgrading.
For Java, Groovy, Kotlin and Android compatibility, see the full compatibility notes.
Reporting problems
If you find a problem with this release, please file a bug on GitHub Issues adhering to our issue guidelines. If you're not sure you're encountering a bug, please use the forum.
We hope you will build happiness with Gradle, and we look forward to your feedback via Twitter or on GitHub.
Commits
309d128Update fixed issues in release notes for 9.6.1 (#38328)040a978Update fixed issues in release notes for 9.6.1e0b8325Restore --non-interactive flag instead of --interactive/--no-interactive (#38...946f3e6Limit explicit temp file permission setting to intended use case (#38300)65f8224Restore --non-interactive flag instead of --interactive/--no-interactivee346a5eAdjust CLI flag to configure non-interactive console (#38301)9b53be9Adjust CLI flag to configure non-interactive console0dd3b53Limit explicit temp file permission setting to intended use case48e5ac2Add reproducers25598fdPrepare 9.6.1 patch release (#38293)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.2 to 9.4.3Release notes
Sourced from com.gradleup.shadow's releases.
9.4.3
Changed
- Update dependencies for resolving CVEs. (#2069)
Commits
44c6ce1Prepare version 9.4.3ba5e0deFix conflictscd13ac5Minor cleanups298cd8aUpdate dependencies- See full diff in compare view
Updates `gradle-wrapper` from 9.6.0 to 9.6.1Release notes
Sourced from gradle-wrapper's releases.
9.6.1
The Gradle team is excited to announce Gradle 9.6.1.
Here are the highlights of this release:
- Improved Configuration Cache hit rates
- Additional CLI rendering options
- Important project hierarchy lookup deprecations
We would like to thank the following community members for their contributions to this release of Gradle: Aharnish Solanki, Benedikt Johannes, Devendra Reddy Pennabadi, Dmytro Rodionov, Dreeam, Elías Hernández Rodríguez, Eng Zer Jun, FinlayRJW, Kamal Kansal, Marcono1234, Nelson Osacky, Philip Wedemann, Ravi, Roberto Perez Alcolea, Ryan Schmitt, Sebastian Schuberth, seunghun.ham, sk-reddy17, Suvrat Acharya, Vedant Madane.
Upgrade instructions
Switch your build to use Gradle 9.6.1 by updating your wrapper:
./gradlew :wrapper --gradle-version=9.6.1 && ./gradlew :wrapperSee the Gradle 9.x upgrade guide to l... _Description has been truncated_ Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlin-mcp-client/gradle/libs.versions.toml | 4 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/kotlin-mcp-server/gradle/libs.versions.toml | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/kotlinlang-mcp-server/gradle/libs.versions.toml | 4 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/simple-streamable-server/gradle/libs.versions.toml | 4 ++-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- samples/weather-stdio-server/gradle/libs.versions.toml | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/samples/kotlin-mcp-client/gradle/libs.versions.toml b/samples/kotlin-mcp-client/gradle/libs.versions.toml index 7479186..0b9018d 100644 --- a/samples/kotlin-mcp-client/gradle/libs.versions.toml +++ b/samples/kotlin-mcp-client/gradle/libs.versions.toml @@ -1,9 +1,9 @@ [versions] -anthropic = "2.43.0" +anthropic = "2.45.0" kotlin = "2.3.21" ktor = "3.3.3" mcp-kotlin = "0.13.0" -shadow = "9.4.2" +shadow = "9.4.3" slf4j = "2.0.18" [libraries] diff --git a/samples/kotlin-mcp-client/gradle/wrapper/gradle-wrapper.properties b/samples/kotlin-mcp-client/gradle/wrapper/gradle-wrapper.properties index eb84db6..a9db115 100644 --- a/samples/kotlin-mcp-client/gradle/wrapper/gradle-wrapper.properties +++ b/samples/kotlin-mcp-client/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/samples/kotlin-mcp-server/gradle/libs.versions.toml b/samples/kotlin-mcp-server/gradle/libs.versions.toml index bd87373..56bf5f1 100644 --- a/samples/kotlin-mcp-server/gradle/libs.versions.toml +++ b/samples/kotlin-mcp-server/gradle/libs.versions.toml @@ -3,7 +3,7 @@ kotlin = "2.3.21" ktor = "3.3.3" mcp-kotlin = "0.13.0" slf4j = "2.0.18" -shadow = "9.4.2" +shadow = "9.4.3" [libraries] ktor-bom = { group = "io.ktor", name = "ktor-bom", version.ref = "ktor" } diff --git a/samples/kotlin-mcp-server/gradle/wrapper/gradle-wrapper.properties b/samples/kotlin-mcp-server/gradle/wrapper/gradle-wrapper.properties index eb84db6..a9db115 100644 --- a/samples/kotlin-mcp-server/gradle/wrapper/gradle-wrapper.properties +++ b/samples/kotlin-mcp-server/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml index 69dfe7e..26e89b2 100644 --- a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml +++ b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml @@ -4,8 +4,8 @@ ktor = "3.3.3" mcp-kotlin = "0.13.0" serialization = "1.11.0" coroutines = "1.11.0" -logback = "1.5.35" -shadow = "9.4.2" +logback = "1.5.37" +shadow = "9.4.3" [libraries] ktor-bom = { group = "io.ktor", name = "ktor-bom", version.ref = "ktor" } diff --git a/samples/kotlinlang-mcp-server/gradle/wrapper/gradle-wrapper.properties b/samples/kotlinlang-mcp-server/gradle/wrapper/gradle-wrapper.properties index eb84db6..a9db115 100644 --- a/samples/kotlinlang-mcp-server/gradle/wrapper/gradle-wrapper.properties +++ b/samples/kotlinlang-mcp-server/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/samples/simple-streamable-server/gradle/libs.versions.toml b/samples/simple-streamable-server/gradle/libs.versions.toml index ba5b0e7..723994b 100644 --- a/samples/simple-streamable-server/gradle/libs.versions.toml +++ b/samples/simple-streamable-server/gradle/libs.versions.toml @@ -1,10 +1,10 @@ [versions] kotlin = "2.3.21" ktor = "3.3.3" -junit = "6.1.0" +junit = "6.1.1" mcp-kotlin = "0.13.0" slf4j = "2.0.18" -shadow = "9.4.2" +shadow = "9.4.3" [libraries] ktor-bom = { group = "io.ktor", name = "ktor-bom", version.ref = "ktor" } diff --git a/samples/simple-streamable-server/gradle/wrapper/gradle-wrapper.properties b/samples/simple-streamable-server/gradle/wrapper/gradle-wrapper.properties index eb84db6..a9db115 100644 --- a/samples/simple-streamable-server/gradle/wrapper/gradle-wrapper.properties +++ b/samples/simple-streamable-server/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 diff --git a/samples/weather-stdio-server/gradle/libs.versions.toml b/samples/weather-stdio-server/gradle/libs.versions.toml index 3e99ead..e805236 100644 --- a/samples/weather-stdio-server/gradle/libs.versions.toml +++ b/samples/weather-stdio-server/gradle/libs.versions.toml @@ -4,7 +4,7 @@ kotlin = "2.3.21" ktor = "3.3.3" logging = "8.0.4" mcp-kotlin = "0.13.0" -shadow = "9.4.2" +shadow = "9.4.3" slf4j = "2.0.18" [libraries] diff --git a/samples/weather-stdio-server/gradle/wrapper/gradle-wrapper.properties b/samples/weather-stdio-server/gradle/wrapper/gradle-wrapper.properties index eb84db6..a9db115 100644 --- a/samples/weather-stdio-server/gradle/wrapper/gradle-wrapper.properties +++ b/samples/weather-stdio-server/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip networkTimeout=10000 retries=0 retryBackOffMs=500 From bbf77bae93970d382ef97bf1569d57ed6d434ded Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jun 2026 12:18:27 +0200 Subject: [PATCH 034/143] chore(deps): bump @types/node from 26.0.0 to 26.0.1 in /integration-test/src/jvmTest/typescript in the all-dependencies group across 1 directory (#864) Bumps the all-dependencies group with 1 update in the /integration-test/src/jvmTest/typescript directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node). Updates `@types/node` from 26.0.0 to 26.0.1 Commits
- See full diff in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- integration-test/src/jvmTest/typescript/package-lock.json | 8 ++++---- integration-test/src/jvmTest/typescript/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/integration-test/src/jvmTest/typescript/package-lock.json b/integration-test/src/jvmTest/typescript/package-lock.json index 0fa51a9..befd50e 100644 --- a/integration-test/src/jvmTest/typescript/package-lock.json +++ b/integration-test/src/jvmTest/typescript/package-lock.json @@ -15,7 +15,7 @@ "devDependencies": { "@types/cors": "^2.8.19", "@types/express": "^5.0.6", - "@types/node": "^26.0.0", + "@types/node": "^26.0.1", "cors": "^2.8.6", "tsx": "^4.22.4", "typescript": "^6.0.3" @@ -579,9 +579,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.0.tgz", - "integrity": "sha512-vf2YFi1iY9lHGwNJMs01biZFbKJkrZR1T6/MlzjhJLPdntOHLhTrDSnSVcdtvjihi4VQNlrFRIxLsDBlQpAipA==", + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.1.tgz", + "integrity": "sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==", "dev": true, "license": "MIT", "dependencies": { diff --git a/integration-test/src/jvmTest/typescript/package.json b/integration-test/src/jvmTest/typescript/package.json index 00f0961..aa8d9db 100644 --- a/integration-test/src/jvmTest/typescript/package.json +++ b/integration-test/src/jvmTest/typescript/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@types/cors": "^2.8.19", "@types/express": "^5.0.6", - "@types/node": "^26.0.0", + "@types/node": "^26.0.1", "cors": "^2.8.6", "tsx": "^4.22.4", "typescript": "^6.0.3" From 35da063c23e0e89571939d8cb0cba6621d997ebe Mon Sep 17 00:00:00 2001 From: Pavel Gorgulov Date: Tue, 30 Jun 2026 20:43:45 +0200 Subject: [PATCH 035/143] fix: bound request body size in SSE and Streamable HTTP transports (#839) Caps the size of incoming HTTP POST bodies in both server transports so an oversized request can no longer exhaust server memory ## How Has This Been Tested? new tests ## Breaking Changes binary incompatible for SseServerTransport constuctors ## Types of changes - [x] Bug fix (non-breaking change which fixes a - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https: - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed --- kotlin-sdk-server/api/kotlin-sdk-server.api | 15 +-- .../kotlin/sdk/server/KtorServer.kt | 23 +++- .../kotlin/sdk/server/RequestBody.kt | 34 ++++++ .../kotlin/sdk/server/SSEServerTransport.kt | 21 +++- .../server/StreamableHttpServerTransport.kt | 20 +--- .../kotlin/sdk/server/RequestBodyTest.kt | 103 ++++++++++++++++++ .../sdk/server/SseServerTransportTest.kt | 90 +++++++++++++++ .../StreamableHttpServerTransportTest.kt | 38 ++++++- 8 files changed, 308 insertions(+), 36 deletions(-) create mode 100644 kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/RequestBody.kt create mode 100644 kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/RequestBodyTest.kt create mode 100644 kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SseServerTransportTest.kt diff --git a/kotlin-sdk-server/api/kotlin-sdk-server.api b/kotlin-sdk-server/api/kotlin-sdk-server.api index 3acaa64..6094b7c 100644 --- a/kotlin-sdk-server/api/kotlin-sdk-server.api +++ b/kotlin-sdk-server/api/kotlin-sdk-server.api @@ -51,12 +51,12 @@ public final class io/modelcontextprotocol/kotlin/sdk/server/HostValidationKt { } public final class io/modelcontextprotocol/kotlin/sdk/server/KtorServerKt { - public static final fun mcp (Lio/ktor/server/application/Application;ZLjava/util/List;Ljava/util/List;Lkotlin/jvm/functions/Function1;)V - public static final fun mcp (Lio/ktor/server/routing/Route;Ljava/lang/String;ZLjava/util/List;Ljava/util/List;Lkotlin/jvm/functions/Function1;)V - public static final fun mcp (Lio/ktor/server/routing/Route;ZLjava/util/List;Ljava/util/List;Lkotlin/jvm/functions/Function1;)V - public static synthetic fun mcp$default (Lio/ktor/server/application/Application;ZLjava/util/List;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V - public static synthetic fun mcp$default (Lio/ktor/server/routing/Route;Ljava/lang/String;ZLjava/util/List;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V - public static synthetic fun mcp$default (Lio/ktor/server/routing/Route;ZLjava/util/List;Ljava/util/List;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static final fun mcp (Lio/ktor/server/application/Application;ZLjava/util/List;Ljava/util/List;JLkotlin/jvm/functions/Function1;)V + public static final fun mcp (Lio/ktor/server/routing/Route;Ljava/lang/String;ZLjava/util/List;Ljava/util/List;JLkotlin/jvm/functions/Function1;)V + public static final fun mcp (Lio/ktor/server/routing/Route;ZLjava/util/List;Ljava/util/List;JLkotlin/jvm/functions/Function1;)V + public static synthetic fun mcp$default (Lio/ktor/server/application/Application;ZLjava/util/List;Ljava/util/List;JLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static synthetic fun mcp$default (Lio/ktor/server/routing/Route;Ljava/lang/String;ZLjava/util/List;Ljava/util/List;JLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public static synthetic fun mcp$default (Lio/ktor/server/routing/Route;ZLjava/util/List;Ljava/util/List;JLkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun mcpStatelessStreamableHttp (Lio/ktor/server/application/Application;Ljava/lang/String;ZLjava/util/List;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/server/EventStore;Lkotlin/jvm/functions/Function1;)V public static synthetic fun mcpStatelessStreamableHttp$default (Lio/ktor/server/application/Application;Ljava/lang/String;ZLjava/util/List;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/server/EventStore;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public static final fun mcpStreamableHttp (Lio/ktor/server/application/Application;Ljava/lang/String;ZLjava/util/List;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/server/EventStore;Lkotlin/jvm/functions/Function1;)V @@ -208,7 +208,8 @@ public class io/modelcontextprotocol/kotlin/sdk/server/ServerSession : io/modelc } public final class io/modelcontextprotocol/kotlin/sdk/server/SseServerTransport : io/modelcontextprotocol/kotlin/sdk/shared/AbstractTransport { - public fun (Ljava/lang/String;Lio/ktor/server/sse/ServerSSESession;)V + public fun (Ljava/lang/String;Lio/ktor/server/sse/ServerSSESession;J)V + public synthetic fun (Ljava/lang/String;Lio/ktor/server/sse/ServerSSESession;JILkotlin/jvm/internal/DefaultConstructorMarker;)V public fun close (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public final fun getSessionId ()Ljava/lang/String; public final fun handleMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; diff --git a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt index 7e47d76..ec0652b 100644 --- a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt +++ b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt @@ -44,6 +44,8 @@ private val logger = KotlinLogging.logger {} * When `null` while the localhost host defaults are in effect (no custom `allowedHosts`), * the `Origin` header is validated against `localhost`, `127.0.0.1`, `[::1]`. * With custom `allowedHosts`, `null` skips origin validation. + * @param maxRequestBodySize maximum allowed size, in bytes, of an incoming POST body; larger requests are + * rejected with `413 Payload Too Large`. Defaults to 4 MiB. * @param block factory block with access to the [ServerSSESession] * that creates and returns the [Server] to handle the connection. * @throws IllegalStateException if the [SSE] plugin is not installed. @@ -55,10 +57,11 @@ public fun Route.mcp( enableDnsRebindingProtection: Boolean = true, allowedHosts: List ? = null, allowedOrigins: List ? = null, + maxRequestBodySize: Long = DEFAULT_MAX_REQUEST_BODY_SIZE, block: ServerSSESession.() -> Server, ) { route(path) { - mcp(enableDnsRebindingProtection, allowedHosts, allowedOrigins, block) + mcp(enableDnsRebindingProtection, allowedHosts, allowedOrigins, maxRequestBodySize, block) } } @@ -76,15 +79,19 @@ public fun Route.mcp( * When `null` while the localhost host defaults are in effect (no custom `allowedHosts`), * the `Origin` header is validated against `localhost`, `127.0.0.1`, `[::1]`. * With custom `allowedHosts`, `null` skips origin validation. + * @param maxRequestBodySize maximum allowed size, in bytes, of an incoming POST body; larger requests are + * rejected with `413 Payload Too Large`. Defaults to 4 MiB. * @param block factory block with access to the [ServerSSESession] * that creates and returns the [Server] to handle the connection. * @throws IllegalStateException if the [SSE] plugin is not installed. */ @KtorDsl +@Suppress("LongParameterList") public fun Route.mcp( enableDnsRebindingProtection: Boolean = true, allowedHosts: List ? = null, allowedOrigins: List ? = null, + maxRequestBodySize: Long = DEFAULT_MAX_REQUEST_BODY_SIZE, block: ServerSSESession.() -> Server, ) { try { @@ -103,7 +110,7 @@ public fun Route.mcp( val transportManager = TransportManager () sse { - mcpSseEndpoint("", transportManager, block) + mcpSseEndpoint("", transportManager, maxRequestBodySize, block) } post { @@ -126,21 +133,25 @@ public fun Route.mcp( * When `null` while the localhost host defaults are in effect (no custom `allowedHosts`), * the `Origin` header is validated against `localhost`, `127.0.0.1`, `[::1]`. * With custom `allowedHosts`, `null` skips origin validation. + * @param maxRequestBodySize maximum allowed size, in bytes, of an incoming POST body; larger requests are + * rejected with `413 Payload Too Large`. Defaults to 4 MiB. * @param block factory block with access to the [ServerSSESession] * that creates and returns the [Server] to handle the connection. */ @KtorDsl +@Suppress("LongParameterList") public fun Application.mcp( enableDnsRebindingProtection: Boolean = true, allowedHosts: List ? = null, allowedOrigins: List ? = null, + maxRequestBodySize: Long = DEFAULT_MAX_REQUEST_BODY_SIZE, block: ServerSSESession.() -> Server, ) { installMcpContentNegotiation() install(SSE) routing { - mcp(enableDnsRebindingProtection, allowedHosts, allowedOrigins, block) + mcp(enableDnsRebindingProtection, allowedHosts, allowedOrigins, maxRequestBodySize, block) } } @@ -327,9 +338,10 @@ public fun Application.mcpStatelessStreamableHttp( private suspend fun ServerSSESession.mcpSseEndpoint( postEndpoint: String, transportManager: TransportManager , + maxRequestBodySize: Long, block: ServerSSESession.() -> Server, ) { - val transport = mcpSseTransport(postEndpoint, transportManager) + val transport = mcpSseTransport(postEndpoint, transportManager, maxRequestBodySize) val server = block() @@ -348,8 +360,9 @@ private suspend fun ServerSSESession.mcpSseEndpoint( private fun ServerSSESession.mcpSseTransport( postEndpoint: String, transportManager: TransportManager , + maxRequestBodySize: Long, ): SseServerTransport { - val transport = SseServerTransport(postEndpoint, this) + val transport = SseServerTransport(postEndpoint, this, maxRequestBodySize) transportManager.addTransport(transport.sessionId, transport) logger.info { "New SSE connection established and stored with sessionId: ${transport.sessionId}" } diff --git a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/RequestBody.kt b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/RequestBody.kt new file mode 100644 index 0000000..0cc4143 --- /dev/null +++ b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/RequestBody.kt @@ -0,0 +1,34 @@ +package io.modelcontextprotocol.kotlin.sdk.server + +import io.ktor.server.application.ApplicationCall +import io.ktor.server.request.receiveChannel +import io.ktor.utils.io.readRemaining +import kotlinx.io.Buffer +import kotlinx.io.IOException +import kotlinx.io.readString + +/** Default maximum size (in bytes) for an incoming HTTP request body: 4 MiB. */ +internal const val DEFAULT_MAX_REQUEST_BODY_SIZE: Long = 4L * 1024 * 1024 + +/** Signals that an incoming request body exceeded the maximum size a transport is willing to read. */ +internal class RequestBodyTooLargeException(val maxBodySize: Long) : + IOException("Request body exceeds the maximum of $maxBodySize bytes.") + +/** + * Reads the request body as a UTF-8 string, rejecting bodies larger than [maxBytes]. + * + * At most `maxBytes + 1` bytes are ever pulled from the request channel, so an oversized or unframed + * body cannot exhaust memory regardless of the (untrusted) `Content-Length` header. + * + * @throws RequestBodyTooLargeException if the body exceeds [maxBytes] + */ +internal suspend fun ApplicationCall.receiveTextWithLimit(maxBytes: Long): String { + val buffer = Buffer() + val readLimit = if (maxBytes == Long.MAX_VALUE) maxBytes else maxBytes + 1 + val read = receiveChannel().readRemaining(readLimit).transferTo(buffer) + if (read > maxBytes) { + buffer.clear() + throw RequestBodyTooLargeException(maxBytes) + } + return buffer.readString() +} diff --git a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SSEServerTransport.kt b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SSEServerTransport.kt index a6d4618..f525ec2 100644 --- a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SSEServerTransport.kt +++ b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SSEServerTransport.kt @@ -5,7 +5,6 @@ import io.ktor.http.HttpStatusCode import io.ktor.http.encodeURLPath import io.ktor.server.application.ApplicationCall import io.ktor.server.request.contentType -import io.ktor.server.request.receiveText import io.ktor.server.response.respondText import io.ktor.server.sse.ServerSSESession import io.modelcontextprotocol.kotlin.sdk.shared.AbstractTransport @@ -29,10 +28,19 @@ internal const val SESSION_ID_PARAM = "sessionId" * * @param endpoint relative or absolute URL the client will POST messages to * @param session active SSE session used to deliver server-to-client events + * @param maxRequestBodySize maximum allowed size, in bytes, of an incoming POST body; larger requests are + * rejected with `413 Payload Too Large` without being buffered in full. Defaults to 4 MiB. */ @OptIn(ExperimentalAtomicApi::class) -public class SseServerTransport(private val endpoint: String, private val session: ServerSSESession) : - AbstractTransport() { +public class SseServerTransport( + private val endpoint: String, + private val session: ServerSSESession, + private val maxRequestBodySize: Long = DEFAULT_MAX_REQUEST_BODY_SIZE, +) : AbstractTransport() { + init { + require(maxRequestBodySize > 0) { "maxRequestBodySize must be greater than 0" } + } + private val initialized: AtomicBoolean = AtomicBoolean(false) /** Unique identifier for this transport session, generated randomly on creation. */ @@ -77,6 +85,7 @@ public class SseServerTransport(private val endpoint: String, private val sessio val message = "SSE connection not established" call.respondText(message, status = HttpStatusCode.InternalServerError) _onError.invoke(IllegalStateException(message)) + return } val body = try { @@ -85,9 +94,13 @@ public class SseServerTransport(private val endpoint: String, private val sessio error("Unsupported content-type: $ct") } - call.receiveText() + call.receiveTextWithLimit(maxRequestBodySize) } catch (e: CancellationException) { throw e + } catch (e: RequestBodyTooLargeException) { + call.respondText(e.message ?: "Request body too large", status = HttpStatusCode.PayloadTooLarge) + _onError.invoke(e) + return } catch (e: Exception) { call.respondText("Invalid message: ${e.message}", status = HttpStatusCode.BadRequest) _onError.invoke(e) diff --git a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransport.kt b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransport.kt index ae8a39d..c213350 100644 --- a/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransport.kt +++ b/kotlin-sdk-server/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransport.kt @@ -8,7 +8,6 @@ import io.ktor.server.application.ApplicationCall import io.ktor.server.request.contentType import io.ktor.server.request.header import io.ktor.server.request.httpMethod -import io.ktor.server.request.receiveText import io.ktor.server.response.header import io.ktor.server.response.respond import io.ktor.server.response.respondNullable @@ -48,7 +47,6 @@ import kotlin.uuid.Uuid internal const val MCP_SESSION_ID_HEADER = "mcp-session-id" private const val MCP_PROTOCOL_VERSION_HEADER = "mcp-protocol-version" private const val MCP_RESUMPTION_TOKEN_HEADER = "Last-Event-ID" -private const val DEFAULT_MAX_REQUEST_BODY_SIZE: Long = 4L * 1024 * 1024 // 4 MB private const val MIN_PRIMING_EVENT_PROTOCOL_VERSION = "2025-11-25" /** @@ -703,23 +701,13 @@ public class StreamableHttpServerTransport(private val configuration: Configurat } private suspend fun parseBody(call: ApplicationCall): List ? { - val maxSize = configuration.maxRequestBodySize - val contentLength = call.request.header(HttpHeaders.ContentLength)?.toLongOrNull() ?: 0L - if (contentLength > maxSize) { + val body = try { + call.receiveTextWithLimit(configuration.maxRequestBodySize) + } catch (e: RequestBodyTooLargeException) { call.reject( HttpStatusCode.PayloadTooLarge, RPCError.ErrorCode.INVALID_REQUEST, - "Invalid Request: message size exceeds maximum of $maxSize bytes", - ) - return null - } - - val body = call.receiveText() - if (body.length.toLong() > maxSize) { - call.reject( - HttpStatusCode.PayloadTooLarge, - RPCError.ErrorCode.INVALID_REQUEST, - "Invalid Request: message size exceeds maximum of $maxSize bytes", + "Invalid Request: message size exceeds maximum of ${e.maxBodySize} bytes", ) return null } diff --git a/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/RequestBodyTest.kt b/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/RequestBodyTest.kt new file mode 100644 index 0000000..9dc30cf --- /dev/null +++ b/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/RequestBodyTest.kt @@ -0,0 +1,103 @@ +package io.modelcontextprotocol.kotlin.sdk.server + +import io.kotest.matchers.shouldBe +import io.ktor.client.request.post +import io.ktor.client.request.setBody +import io.ktor.client.statement.bodyAsText +import io.ktor.http.HttpStatusCode +import io.ktor.server.response.respondText +import io.ktor.server.routing.post +import io.ktor.server.routing.routing +import io.ktor.server.testing.ApplicationTestBuilder +import io.ktor.server.testing.testApplication +import kotlin.test.Test + +class RequestBodyTest { + + /** Wires a POST endpoint that echoes the body when it fits, or replies 413 when it is too large. */ + private fun ApplicationTestBuilder.installEchoEndpoint(maxBytes: Long) { + install(io.ktor.server.sse.SSE) + application { + routing { + post("/echo") { + val text = try { + call.receiveTextWithLimit(maxBytes) + } catch (e: RequestBodyTooLargeException) { + call.respondText(e.message ?: "too large", status = HttpStatusCode.PayloadTooLarge) + return@post + } + call.respondText(text) + } + } + } + } + + @Test + fun `body under the limit is returned intact`() = testApplication { + installEchoEndpoint(maxBytes = 1024) + val payload = "hello world" + + val response = client.post("/echo") { setBody(payload) } + + response.status shouldBe HttpStatusCode.OK + response.bodyAsText() shouldBe payload + } + + @Test + fun `body exactly at the limit is accepted`() = testApplication { + val payload = "x".repeat(64) + installEchoEndpoint(maxBytes = payload.length.toLong()) + + val response = client.post("/echo") { setBody(payload) } + + response.status shouldBe HttpStatusCode.OK + response.bodyAsText() shouldBe payload + } + + @Test + fun `body exceeding the limit is rejected with 413`() = testApplication { + val payload = "x".repeat(65) + installEchoEndpoint(maxBytes = 64) + + val response = client.post("/echo") { setBody(payload) } + + response.status shouldBe HttpStatusCode.PayloadTooLarge + } + + @Test + fun `large body exceeding the limit is rejected without buffering it whole`() = testApplication { + // 8 MB body against a 4 MB limit: must be rejected. + installEchoEndpoint(maxBytes = 4L * 1024 * 1024) + val payload = "x".repeat(8 * 1024 * 1024) + + val response = client.post("/echo") { setBody(payload) } + + response.status shouldBe HttpStatusCode.PayloadTooLarge + } + + @Test + fun `multibyte UTF-8 body larger than a read chunk decodes intact`() = testApplication { + // Emoji is 4 bytes in UTF-8; a payload larger than the internal read chunk forces the + // accumulated bytes to span multiple chunks. Decoding once at the end must not corrupt + // characters that straddle a chunk boundary. + val unit = "a😀b" // mixes 1- and 4-byte code units so boundaries land mid-character + val payload = unit.repeat(40_000) // well over a 64 KiB read chunk + installEchoEndpoint(maxBytes = payload.encodeToByteArray().size.toLong()) + + val response = client.post("/echo") { setBody(payload) } + + response.status shouldBe HttpStatusCode.OK + response.bodyAsText() shouldBe payload + } + + @Test + fun `body is returned intact when the limit is Long MAX_VALUE`() = testApplication { + installEchoEndpoint(maxBytes = Long.MAX_VALUE) + val payload = "hello world" + + val response = client.post("/echo") { setBody(payload) } + + response.status shouldBe HttpStatusCode.OK + response.bodyAsText() shouldBe payload + } +} diff --git a/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SseServerTransportTest.kt b/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SseServerTransportTest.kt new file mode 100644 index 0000000..a0756f3 --- /dev/null +++ b/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SseServerTransportTest.kt @@ -0,0 +1,90 @@ +package io.modelcontextprotocol.kotlin.sdk.server + +import io.kotest.matchers.shouldBe +import io.ktor.client.request.post +import io.ktor.client.request.prepareGet +import io.ktor.client.request.setBody +import io.ktor.client.statement.HttpResponse +import io.ktor.client.statement.bodyAsChannel +import io.ktor.http.ContentType +import io.ktor.http.HttpStatusCode +import io.ktor.http.contentType +import io.ktor.server.application.install +import io.ktor.server.routing.post +import io.ktor.server.routing.routing +import io.ktor.server.sse.SSE +import io.ktor.server.sse.ServerSSESession +import io.ktor.server.testing.testApplication +import io.ktor.utils.io.readLine +import io.mockk.mockk +import java.util.concurrent.atomic.AtomicBoolean +import kotlin.test.Test + +class SseServerTransportTest : AbstractKtorExtensionsTest() { + + @Test + fun `handlePostMessage on a not-started transport does not deliver the message`() = testApplication { + // A registered onMessage callback opens the delivery gate, so if the not-initialized branch + // falls through it would wrongly hand the message to the application. It must return instead. + val transport = SseServerTransport("/messages", mockk (relaxed = true)) + val delivered = AtomicBoolean(false) + transport.onMessage { delivered.set(true) } + + application { + routing { + post("/messages") { transport.handlePostMessage(call) } + } + } + + val response = client.post("/messages") { + contentType(ContentType.Application.Json) + setBody("""{"jsonrpc":"2.0","id":1,"method":"ping"}""") + } + + response.status shouldBe HttpStatusCode.InternalServerError + delivered.get() shouldBe false + } + + @Test + fun `SSE POST exceeding maxRequestBodySize is rejected with 413`() = testApplication { + application { + install(SSE) + routing { + mcp(enableDnsRebindingProtection = false, maxRequestBodySize = MAX_BODY) { testServer() } + } + } + + client.prepareGet("/").execute { response -> + val sessionId = response.readSessionId() + requireNotNull(sessionId) { "sessionId not found in SSE endpoint event" } + + // A body one byte over the configured limit must be rejected before processing. + val oversized = "x".repeat((MAX_BODY + 1).toInt()) + val postResponse = client.post("/?sessionId=$sessionId") { + contentType(ContentType.Application.Json) + setBody(oversized) + } + postResponse.status shouldBe HttpStatusCode.PayloadTooLarge + } + } + + private suspend fun HttpResponse.readSessionId(): String? { + val channel = bodyAsChannel() + var eventName: String? = null + while (!channel.isClosedForRead) { + val line = channel.readLine() ?: break + when { + line.startsWith("event:") -> eventName = line.substringAfter("event:").trim() + + line.startsWith("data:") && eventName == "endpoint" -> { + return line.substringAfter("data:").trim().substringAfter("sessionId=").ifEmpty { null } + } + } + } + return null + } + + private companion object { + const val MAX_BODY = 1024L + } +} diff --git a/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransportTest.kt b/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransportTest.kt index f6dda15..d7dec4e 100644 --- a/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransportTest.kt +++ b/kotlin-sdk-server/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StreamableHttpServerTransportTest.kt @@ -24,6 +24,8 @@ import io.ktor.server.routing.post import io.ktor.server.routing.routing import io.ktor.server.testing.ApplicationTestBuilder import io.ktor.server.testing.testApplication +import io.ktor.utils.io.ByteReadChannel +import io.ktor.utils.io.readLine import io.ktor.utils.io.readUTF8Line import io.modelcontextprotocol.kotlin.sdk.types.ClientCapabilities import io.modelcontextprotocol.kotlin.sdk.types.EmptyResult @@ -421,6 +423,34 @@ class StreamableHttpServerTransportTest { response.status shouldBe HttpStatusCode.PayloadTooLarge } + @Test + fun `POST with oversized chunked body and no Content-Length returns 413`() = testApplication { + configTestServer() + + val client = createTestClient() + + val transport = StreamableHttpServerTransport( + StreamableHttpServerTransport.Configuration(enableJsonResponse = true, maxRequestBodySize = 1024), + ) + transport.onMessage { message -> + if (message is JSONRPCRequest) { + transport.send(JSONRPCResponse(message.id, EmptyResult())) + } + } + + configureTransportEndpoint(transport) + + // Stream the body as a channel so the client uses chunked transfer-encoding with no + // Content-Length header: the size limit must hold without trusting the (absent) header. + val oversized = ByteReadChannel("x".repeat(4096).encodeToByteArray()) + val response = client.post(path) { + addStreamableHeaders() + setBody(oversized) + } + + response.status shouldBe HttpStatusCode.PayloadTooLarge + } + @ParameterizedTest @MethodSource("maxBodySizeTestCases") fun `POST with custom max request body size validates payload size`( @@ -507,7 +537,7 @@ class StreamableHttpServerTransportTest { // New stream is alive val secondChannel = secondResponse.bodyAsChannel() - val firstLine = secondChannel.readUTF8Line() + val firstLine = secondChannel.readLine() firstLine.shouldNotBeNull() secondChannel.isClosedForRead shouldBe false } @@ -546,7 +576,7 @@ class StreamableHttpServerTransportTest { header("mcp-protocol-version", LATEST_PROTOCOL_VERSION) }.execute { response -> response.status shouldBe HttpStatusCode.OK - response.bodyAsChannel().readUTF8Line() + response.bodyAsChannel().readLine() } // Step 3: Immediately reconnect — the transport should close the stale @@ -561,7 +591,7 @@ class StreamableHttpServerTransportTest { response.headers[MCP_SESSION_ID_HEADER] shouldBe sessionId val channel = response.bodyAsChannel() - val firstLine = channel.readUTF8Line() + val firstLine = channel.readLine() firstLine.shouldNotBeNull() channel.isClosedForRead shouldBe false } @@ -604,7 +634,7 @@ class StreamableHttpServerTransportTest { // Verify the stream is alive by reading at least one line (flush event) val channel = response.bodyAsChannel() - val firstLine = channel.readUTF8Line() + val firstLine = channel.readLine() firstLine.shouldNotBeNull() channel.isClosedForRead shouldBe false } From 57e546d378b8fb7251d7aeecc3452cb9fdf7c9cf Mon Sep 17 00:00:00 2001 From: Pavel Gorgulov Date: Tue, 30 Jun 2026 22:04:15 +0200 Subject: [PATCH 036/143] feat: SEP-1686 Tasks (#844) finished SEP-1686 closes #421 ## Breaking Changes none ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed --- kotlin-sdk-core/api/kotlin-sdk-core.api | 26 ++++++---- .../kotlin/sdk/types/sampling.kt | 9 ++++ .../kotlin/sdk/types/tools.kt | 9 ++++ .../kotlin/sdk/types/SamplingTest.kt | 20 ++++++++ .../kotlin/sdk/types/ToolsTest.kt | 51 +++++++++++++++++++ 5 files changed, 105 insertions(+), 10 deletions(-) diff --git a/kotlin-sdk-core/api/kotlin-sdk-core.api b/kotlin-sdk-core/api/kotlin-sdk-core.api index 1904dc7..cdee342 100644 --- a/kotlin-sdk-core/api/kotlin-sdk-core.api +++ b/kotlin-sdk-core/api/kotlin-sdk-core.api @@ -390,6 +390,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/CallToolRequest : io public final fun getName ()Ljava/lang/String; public fun getParams ()Lio/modelcontextprotocol/kotlin/sdk/types/CallToolRequestParams; public synthetic fun getParams ()Lio/modelcontextprotocol/kotlin/sdk/types/RequestParams; + public final fun getTask ()Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata; public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -421,17 +422,19 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/CallToolRequestBuild public final class io/modelcontextprotocol/kotlin/sdk/types/CallToolRequestParams : io/modelcontextprotocol/kotlin/sdk/types/RequestParams { public static final field Companion Lio/modelcontextprotocol/kotlin/sdk/types/CallToolRequestParams$Companion; - public synthetic fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/json/JsonObject;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/json/JsonObject;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata;Lkotlinx/serialization/json/JsonObject;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata;Lkotlinx/serialization/json/JsonObject;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Lkotlinx/serialization/json/JsonObject; - public final fun component3-VI-3G7E ()Lkotlinx/serialization/json/JsonObject; - public final fun copy-EDEVuBg (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/json/JsonObject;)Lio/modelcontextprotocol/kotlin/sdk/types/CallToolRequestParams; - public static synthetic fun copy-EDEVuBg$default (Lio/modelcontextprotocol/kotlin/sdk/types/CallToolRequestParams;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lio/modelcontextprotocol/kotlin/sdk/types/CallToolRequestParams; + public final fun component3 ()Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata; + public final fun component4-VI-3G7E ()Lkotlinx/serialization/json/JsonObject; + public final fun copy-6R815Ik (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata;Lkotlinx/serialization/json/JsonObject;)Lio/modelcontextprotocol/kotlin/sdk/types/CallToolRequestParams; + public static synthetic fun copy-6R815Ik$default (Lio/modelcontextprotocol/kotlin/sdk/types/CallToolRequestParams;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lio/modelcontextprotocol/kotlin/sdk/types/CallToolRequestParams; public fun equals (Ljava/lang/Object;)Z public final fun getArguments ()Lkotlinx/serialization/json/JsonObject; public fun getMeta-VI-3G7E ()Lkotlinx/serialization/json/JsonObject; public final fun getName ()Ljava/lang/String; + public final fun getTask ()Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata; public fun hashCode ()I public fun toString ()Ljava/lang/String; } @@ -1161,6 +1164,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequest public synthetic fun getParams ()Lio/modelcontextprotocol/kotlin/sdk/types/RequestParams; public final fun getStopSequences ()Ljava/util/List; public final fun getSystemPrompt ()Ljava/lang/String; + public final fun getTask ()Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata; public final fun getTemperature ()Ljava/lang/Double; public fun hashCode ()I public fun toString ()Ljava/lang/String; @@ -1205,11 +1209,12 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequest public final class io/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequestParams : io/modelcontextprotocol/kotlin/sdk/types/RequestParams { public static final field Companion Lio/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequestParams$Companion; - public synthetic fun (ILjava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences;Ljava/lang/String;Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext;Ljava/lang/Double;Ljava/util/List;Lkotlinx/serialization/json/JsonObject;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice;Lkotlinx/serialization/json/JsonObject;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (ILjava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences;Ljava/lang/String;Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext;Ljava/lang/Double;Ljava/util/List;Lkotlinx/serialization/json/JsonObject;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice;Lkotlinx/serialization/json/JsonObject;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILjava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences;Ljava/lang/String;Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext;Ljava/lang/Double;Ljava/util/List;Lkotlinx/serialization/json/JsonObject;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice;Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata;Lkotlinx/serialization/json/JsonObject;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ILjava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences;Ljava/lang/String;Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext;Ljava/lang/Double;Ljava/util/List;Lkotlinx/serialization/json/JsonObject;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice;Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata;Lkotlinx/serialization/json/JsonObject;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()I public final fun component10 ()Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice; - public final fun component11-VI-3G7E ()Lkotlinx/serialization/json/JsonObject; + public final fun component11 ()Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata; + public final fun component12-VI-3G7E ()Lkotlinx/serialization/json/JsonObject; public final fun component2 ()Ljava/util/List; public final fun component3 ()Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences; public final fun component4 ()Ljava/lang/String; @@ -1218,8 +1223,8 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequest public final fun component7 ()Ljava/util/List; public final fun component8 ()Lkotlinx/serialization/json/JsonObject; public final fun component9 ()Ljava/util/List; - public final fun copy-APmi5RE (ILjava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences;Ljava/lang/String;Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext;Ljava/lang/Double;Ljava/util/List;Lkotlinx/serialization/json/JsonObject;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice;Lkotlinx/serialization/json/JsonObject;)Lio/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequestParams; - public static synthetic fun copy-APmi5RE$default (Lio/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequestParams;ILjava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences;Ljava/lang/String;Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext;Ljava/lang/Double;Ljava/util/List;Lkotlinx/serialization/json/JsonObject;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lio/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequestParams; + public final fun copy-7OuPiQU (ILjava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences;Ljava/lang/String;Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext;Ljava/lang/Double;Ljava/util/List;Lkotlinx/serialization/json/JsonObject;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice;Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata;Lkotlinx/serialization/json/JsonObject;)Lio/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequestParams; + public static synthetic fun copy-7OuPiQU$default (Lio/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequestParams;ILjava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences;Ljava/lang/String;Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext;Ljava/lang/Double;Ljava/util/List;Lkotlinx/serialization/json/JsonObject;Ljava/util/List;Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice;Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lio/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequestParams; public fun equals (Ljava/lang/Object;)Z public final fun getIncludeContext ()Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext; public final fun getMaxTokens ()I @@ -1229,6 +1234,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequest public final fun getModelPreferences ()Lio/modelcontextprotocol/kotlin/sdk/types/ModelPreferences; public final fun getStopSequences ()Ljava/util/List; public final fun getSystemPrompt ()Ljava/lang/String; + public final fun getTask ()Lio/modelcontextprotocol/kotlin/sdk/types/TaskMetadata; public final fun getTemperature ()Ljava/lang/Double; public final fun getToolChoice ()Lio/modelcontextprotocol/kotlin/sdk/types/ToolChoice; public final fun getTools ()Ljava/util/List; diff --git a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/sampling.kt b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/sampling.kt index 4526405..7cc2685 100644 --- a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/sampling.kt +++ b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/sampling.kt @@ -182,6 +182,12 @@ public data class CreateMessageRequest(override val params: CreateMessageRequest public val metadata: JsonObject? get() = params.metadata + /** + * Task metadata, if the caller is requesting task-augmented execution. + */ + public val task: TaskMetadata? + get() = params.task + /** * Metadata for this request. May include a progressToken for out-of-band progress notifications. */ @@ -216,6 +222,8 @@ public data class CreateMessageRequest(override val params: CreateMessageRequest * @property toolChoice Optional policy controlling how the model uses the provided [tools]. * The client MUST return an error if this field is present but the client did not advertise * [ClientCapabilities.Sampling.tools]. + * @property task If set, requests task-augmented execution. A receiver that supports it returns + * a [CreateTaskResult] (result via `tasks/result`); otherwise it returns a [CreateMessageResult] directly. * @property meta Optional metadata for this request. May include a progressToken for * out-of-band progress notifications. */ @@ -231,6 +239,7 @@ public data class CreateMessageRequestParams( val metadata: JsonObject? = null, val tools: List ? = null, val toolChoice: ToolChoice? = null, + val task: TaskMetadata? = null, @SerialName("_meta") override val meta: RequestMeta? = null, ) : RequestParams diff --git a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/tools.kt b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/tools.kt index 2ff890a..1f0f54e 100644 --- a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/tools.kt +++ b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/tools.kt @@ -203,6 +203,12 @@ public data class CallToolRequest(override val params: CallToolRequestParams) : public val arguments: JsonObject? get() = params.arguments + /** + * Task metadata, if the caller is requesting task-augmented execution. + */ + public val task: TaskMetadata? + get() = params.task + /** * Metadata for this request. May include a progressToken for out-of-band progress notifications. */ @@ -216,6 +222,8 @@ public data class CallToolRequest(override val params: CallToolRequestParams) : * @property name The name of the tool to invoke. * @property arguments Arguments to pass to the tool. Keys are argument names, values are the argument values. * The structure must match the tool's input schema. + * @property task If set, requests task-augmented execution. A receiver that supports it returns + * a [CreateTaskResult] (result via `tasks/result`); otherwise it returns a [CallToolResult] directly. * @property meta Optional metadata for this request. May include a progressToken for * out-of-band progress notifications. */ @@ -223,6 +231,7 @@ public data class CallToolRequest(override val params: CallToolRequestParams) : public data class CallToolRequestParams( val name: String, val arguments: JsonObject? = null, + val task: TaskMetadata? = null, @SerialName("_meta") override val meta: RequestMeta? = null, ) : RequestParams diff --git a/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/SamplingTest.kt b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/SamplingTest.kt index b2c8cf0..b7bc5cf 100644 --- a/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/SamplingTest.kt +++ b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/SamplingTest.kt @@ -367,6 +367,26 @@ class SamplingTest { decoded.toolChoice shouldBe ToolChoice(mode = ToolChoice.Mode.Required) } + @Test + fun `CreateMessageRequestParams task defaults to null and is omitted when encoding`() { + val params = CreateMessageRequestParams(maxTokens = 100, messages = emptyList()) + params.task shouldBe null + val encoded = McpJson.encodeToString(CreateMessageRequestParams.serializer(), params) + assertEquals(false, "\"task\"" in encoded) + } + + @Test + fun `CreateMessageRequestParams round-trips task`() { + val original = CreateMessageRequestParams( + maxTokens = 100, + messages = emptyList(), + task = TaskMetadata(ttl = 60_000L), + ) + val encoded = McpJson.encodeToString(CreateMessageRequestParams.serializer(), original) + val decoded = McpJson.decodeFromString(CreateMessageRequestParams.serializer(), encoded) + decoded.task shouldBe TaskMetadata(ttl = 60_000L) + } + @Test fun `StopReason ToolUse serialises as toolUse`() { StopReason.ToolUse.value shouldBe "toolUse" diff --git a/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/ToolsTest.kt b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/ToolsTest.kt index d5e1d5a..358866a 100644 --- a/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/ToolsTest.kt +++ b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/types/ToolsTest.kt @@ -319,6 +319,57 @@ class ToolsTest { assertEquals(ProgressToken(77), params.meta?.progressToken) } + @Test + fun `should serialize CallToolRequest with task augmentation`() { + val request = CallToolRequest( + CallToolRequestParams( + name = "long-running", + arguments = buildJsonObject { put("query", "MCP protocol") }, + task = TaskMetadata(ttl = 60_000L), + ), + ) + + verifySerialization( + request, + McpJson, + """ + { + "method": "tools/call", + "params": { + "name": "long-running", + "arguments": { + "query": "MCP protocol" + }, + "task": { + "ttl": 60000 + } + } + } + """.trimIndent(), + ) + + assertEquals(TaskMetadata(ttl = 60_000L), request.task) + } + + @Test + fun `should omit task from CallToolRequest when null`() { + val request = CallToolRequest(CallToolRequestParams(name = "plain")) + + assertEquals(null, request.task) + verifySerialization( + request, + McpJson, + """ + { + "method": "tools/call", + "params": { + "name": "plain" + } + } + """.trimIndent(), + ) + } + @Test fun `should serialize CallToolResult with structured content`() { val result = CallToolResult( From fc7916fdc7f47590b7c33e9c311185727a40d083 Mon Sep 17 00:00:00 2001 From: Pavel Gorgulov Date: Tue, 30 Jun 2026 22:39:53 +0200 Subject: [PATCH 037/143] release: 0.14.0 (#867) Bump version to 0.14.0 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index e5294e8..434144d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,4 +8,4 @@ kotlin.daemon.jvmargs=-Xmx4G kotlin.native.ignoreDisabledTargets=true group=io.modelcontextprotocol -version=0.13.0 +version=0.14.0 From 25678bdded92dd9fc30ef572bcf63814ab8aaf35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 15:56:44 +0200 Subject: [PATCH 038/143] chore(deps): bump org.jetbrains.kotlin.jvm from 2.3.21 to 2.4.0 in /samples/kotlin-mcp-client (#819) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [org.jetbrains.kotlin.jvm](https://github.com/JetBrains/kotlin) from 2.3.21 to 2.4.0. Release notes
Sourced from org.jetbrains.kotlin.jvm's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin.jvm's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlin-mcp-client/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/kotlin-mcp-client/gradle/libs.versions.toml b/samples/kotlin-mcp-client/gradle/libs.versions.toml index 0b9018d..b84f095 100644 --- a/samples/kotlin-mcp-client/gradle/libs.versions.toml +++ b/samples/kotlin-mcp-client/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] anthropic = "2.45.0" -kotlin = "2.3.21" +kotlin = "2.4.0" ktor = "3.3.3" mcp-kotlin = "0.13.0" shadow = "9.4.3" From bb6c1ec2e12d2577f1d045829202ed3308837c99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 11:45:09 +0200 Subject: [PATCH 039/143] chore(deps): bump kotlin from 2.3.21 to 2.4.0 in /samples/kotlinlang-mcp-server (#825) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `kotlin` from 2.3.21 to 2.4.0. Updates `org.jetbrains.kotlin.jvm` from 2.3.21 to 2.4.0 Release notes
Sourced from org.jetbrains.kotlin.jvm's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin.jvm's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Updates `org.jetbrains.kotlin.plugin.serialization` from 2.3.21 to 2.4.0Release notes
Sourced from org.jetbrains.kotlin.plugin.serialization's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin.plugin.serialization's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlinlang-mcp-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml index 26e89b2..39caf34 100644 --- a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml +++ b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin = "2.3.21" +kotlin = "2.4.0" ktor = "3.3.3" mcp-kotlin = "0.13.0" serialization = "1.11.0" From 7937e9cba6e27626da7f747b924f87696b81c223 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 12:11:36 +0200 Subject: [PATCH 040/143] chore(deps): bump io.ktor:ktor-bom from 3.3.3 to 3.5.1 in /samples/kotlin-mcp-server (#860) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [io.ktor:ktor-bom](https://github.com/ktorio/ktor) from 3.3.3 to 3.5.1. Release notes
Sourced from io.ktor:ktor-bom's releases.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Changelog
Sourced from io.ktor:ktor-bom's changelog.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Commits
5ba9d6fRelease 3.5.1 (#5719)a4f145dKTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when… (#5701)2caf278Fix failing :ktor-io:compileDarwinMainKotlinMetadata (#5716)257de90KTOR-8766 Fix multiple invocations of close from DIe77a168Fix cache misses with content negotiation 3x (#5714)ed22950Make huge post test less hugef329069Update dependency com.github.luben:zstd-jni to v1.5.7-116ecd072Update dependency io.swagger.parser.v3:swagger-parser to v2.1.44a0534cdUpdate dependency io.pebbletemplates:pebble to v4.1.28647e53Update dependency com.typesafe:config to v1.4.9- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Most Recent Ignore Conditions Applied to This Pull Request
| Dependency Name | Ignore Conditions | | --- | --- | | io.ktor:ktor-bom | [>= 3.4.a, < 3.5] |Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlin-mcp-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/kotlin-mcp-server/gradle/libs.versions.toml b/samples/kotlin-mcp-server/gradle/libs.versions.toml index 56bf5f1..91c9513 100644 --- a/samples/kotlin-mcp-server/gradle/libs.versions.toml +++ b/samples/kotlin-mcp-server/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.3.21" -ktor = "3.3.3" +ktor = "3.5.1" mcp-kotlin = "0.13.0" slf4j = "2.0.18" shadow = "9.4.3" From c59b87f273480460c292df3c0ec715f74fd1db0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 12:34:29 +0200 Subject: [PATCH 041/143] chore(deps): bump io.ktor:ktor-bom from 3.3.3 to 3.5.1 in /samples/kotlin-mcp-client (#859) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [io.ktor:ktor-bom](https://github.com/ktorio/ktor) from 3.3.3 to 3.5.1. Release notes
Sourced from io.ktor:ktor-bom's releases.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Changelog
Sourced from io.ktor:ktor-bom's changelog.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Commits
5ba9d6fRelease 3.5.1 (#5719)a4f145dKTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when… (#5701)2caf278Fix failing :ktor-io:compileDarwinMainKotlinMetadata (#5716)257de90KTOR-8766 Fix multiple invocations of close from DIe77a168Fix cache misses with content negotiation 3x (#5714)ed22950Make huge post test less hugef329069Update dependency com.github.luben:zstd-jni to v1.5.7-116ecd072Update dependency io.swagger.parser.v3:swagger-parser to v2.1.44a0534cdUpdate dependency io.pebbletemplates:pebble to v4.1.28647e53Update dependency com.typesafe:config to v1.4.9- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Most Recent Ignore Conditions Applied to This Pull Request
| Dependency Name | Ignore Conditions | | --- | --- | | io.ktor:ktor-bom | [>= 3.4.a, < 3.5] |Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlin-mcp-client/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/kotlin-mcp-client/gradle/libs.versions.toml b/samples/kotlin-mcp-client/gradle/libs.versions.toml index b84f095..b5167d9 100644 --- a/samples/kotlin-mcp-client/gradle/libs.versions.toml +++ b/samples/kotlin-mcp-client/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] anthropic = "2.45.0" kotlin = "2.4.0" -ktor = "3.3.3" +ktor = "3.5.1" mcp-kotlin = "0.13.0" shadow = "9.4.3" slf4j = "2.0.18" From d47429dd35767fe1b08c50b7fbbff5292881b2dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 13:35:57 +0200 Subject: [PATCH 042/143] chore(deps): bump io.ktor:ktor-bom from 3.3.3 to 3.5.1 in /samples/simple-streamable-server (#862) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [io.ktor:ktor-bom](https://github.com/ktorio/ktor) from 3.3.3 to 3.5.1. Release notes
Sourced from io.ktor:ktor-bom's releases.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Changelog
Sourced from io.ktor:ktor-bom's changelog.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Commits
5ba9d6fRelease 3.5.1 (#5719)a4f145dKTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when… (#5701)2caf278Fix failing :ktor-io:compileDarwinMainKotlinMetadata (#5716)257de90KTOR-8766 Fix multiple invocations of close from DIe77a168Fix cache misses with content negotiation 3x (#5714)ed22950Make huge post test less hugef329069Update dependency com.github.luben:zstd-jni to v1.5.7-116ecd072Update dependency io.swagger.parser.v3:swagger-parser to v2.1.44a0534cdUpdate dependency io.pebbletemplates:pebble to v4.1.28647e53Update dependency com.typesafe:config to v1.4.9- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Most Recent Ignore Conditions Applied to This Pull Request
| Dependency Name | Ignore Conditions | | --- | --- | | io.ktor:ktor-bom | [>= 3.4.a, < 3.5] |Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/simple-streamable-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/simple-streamable-server/gradle/libs.versions.toml b/samples/simple-streamable-server/gradle/libs.versions.toml index 723994b..dc7393d 100644 --- a/samples/simple-streamable-server/gradle/libs.versions.toml +++ b/samples/simple-streamable-server/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.3.21" -ktor = "3.3.3" +ktor = "3.5.1" junit = "6.1.1" mcp-kotlin = "0.13.0" slf4j = "2.0.18" From a19ec03aa2bd098598f907d9a5639cbdf008f109 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 13:59:49 +0200 Subject: [PATCH 043/143] chore(deps): bump io.ktor:ktor-bom from 3.3.3 to 3.5.1 in /samples/weather-stdio-server (#863) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [io.ktor:ktor-bom](https://github.com/ktorio/ktor) from 3.3.3 to 3.5.1. Release notes
Sourced from io.ktor:ktor-bom's releases.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Changelog
Sourced from io.ktor:ktor-bom's changelog.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Commits
5ba9d6fRelease 3.5.1 (#5719)a4f145dKTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when… (#5701)2caf278Fix failing :ktor-io:compileDarwinMainKotlinMetadata (#5716)257de90KTOR-8766 Fix multiple invocations of close from DIe77a168Fix cache misses with content negotiation 3x (#5714)ed22950Make huge post test less hugef329069Update dependency com.github.luben:zstd-jni to v1.5.7-116ecd072Update dependency io.swagger.parser.v3:swagger-parser to v2.1.44a0534cdUpdate dependency io.pebbletemplates:pebble to v4.1.28647e53Update dependency com.typesafe:config to v1.4.9- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Most Recent Ignore Conditions Applied to This Pull Request
| Dependency Name | Ignore Conditions | | --- | --- | | io.ktor:ktor-bom | [>= 3.4.a, < 3.5] |Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/weather-stdio-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/weather-stdio-server/gradle/libs.versions.toml b/samples/weather-stdio-server/gradle/libs.versions.toml index e805236..4b74090 100644 --- a/samples/weather-stdio-server/gradle/libs.versions.toml +++ b/samples/weather-stdio-server/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] coroutines = "1.11.0" kotlin = "2.3.21" -ktor = "3.3.3" +ktor = "3.5.1" logging = "8.0.4" mcp-kotlin = "0.13.0" shadow = "9.4.3" From 65ce490454a08fee0bb3b522c1653da508f78cb8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 14:22:52 +0200 Subject: [PATCH 044/143] chore(deps): bump io.ktor:ktor-bom from 3.3.3 to 3.5.1 in /samples/kotlinlang-mcp-server (#861) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [io.ktor:ktor-bom](https://github.com/ktorio/ktor) from 3.3.3 to 3.5.1. Release notes
Sourced from io.ktor:ktor-bom's releases.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Changelog
Sourced from io.ktor:ktor-bom's changelog.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Commits
5ba9d6fRelease 3.5.1 (#5719)a4f145dKTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when… (#5701)2caf278Fix failing :ktor-io:compileDarwinMainKotlinMetadata (#5716)257de90KTOR-8766 Fix multiple invocations of close from DIe77a168Fix cache misses with content negotiation 3x (#5714)ed22950Make huge post test less hugef329069Update dependency com.github.luben:zstd-jni to v1.5.7-116ecd072Update dependency io.swagger.parser.v3:swagger-parser to v2.1.44a0534cdUpdate dependency io.pebbletemplates:pebble to v4.1.28647e53Update dependency com.typesafe:config to v1.4.9- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Most Recent Ignore Conditions Applied to This Pull Request
| Dependency Name | Ignore Conditions | | --- | --- | | io.ktor:ktor-bom | [>= 3.4.a, < 3.5] |Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlinlang-mcp-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml index 39caf34..c521eba 100644 --- a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml +++ b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.4.0" -ktor = "3.3.3" +ktor = "3.5.1" mcp-kotlin = "0.13.0" serialization = "1.11.0" coroutines = "1.11.0" From 365f2625e171aa47c7f6e57f5c485047a4937b8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 14:54:36 +0200 Subject: [PATCH 045/143] chore(deps): bump kotlin from 2.3.21 to 2.4.0 in /samples/weather-stdio-server (#829) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `kotlin` from 2.3.21 to 2.4.0. Updates `org.jetbrains.kotlin.jvm` from 2.3.21 to 2.4.0 Release notes
Sourced from org.jetbrains.kotlin.jvm's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin.jvm's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Updates `org.jetbrains.kotlin.plugin.serialization` from 2.3.21 to 2.4.0Release notes
Sourced from org.jetbrains.kotlin.plugin.serialization's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin.plugin.serialization's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/weather-stdio-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/weather-stdio-server/gradle/libs.versions.toml b/samples/weather-stdio-server/gradle/libs.versions.toml index 4b74090..2acaf66 100644 --- a/samples/weather-stdio-server/gradle/libs.versions.toml +++ b/samples/weather-stdio-server/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] coroutines = "1.11.0" -kotlin = "2.3.21" +kotlin = "2.4.0" ktor = "3.5.1" logging = "8.0.4" mcp-kotlin = "0.13.0" From e8ebf19a32830c3e1838e8f588e4969171c6996a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 20:22:33 +0200 Subject: [PATCH 046/143] chore(deps): bump kotlin from 2.3.21 to 2.4.0 in /samples/simple-streamable-server (#827) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `kotlin` from 2.3.21 to 2.4.0. Updates `org.jetbrains.kotlin.jvm` from 2.3.21 to 2.4.0 Release notes
Sourced from org.jetbrains.kotlin.jvm's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin.jvm's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Updates `org.jetbrains.kotlin.plugin.serialization` from 2.3.21 to 2.4.0Release notes
Sourced from org.jetbrains.kotlin.plugin.serialization's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin.plugin.serialization's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/simple-streamable-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/simple-streamable-server/gradle/libs.versions.toml b/samples/simple-streamable-server/gradle/libs.versions.toml index dc7393d..e3f8f6a 100644 --- a/samples/simple-streamable-server/gradle/libs.versions.toml +++ b/samples/simple-streamable-server/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin = "2.3.21" +kotlin = "2.4.0" ktor = "3.5.1" junit = "6.1.1" mcp-kotlin = "0.13.0" From 594ed4aa86ccc9f4777af735035ab7d4f1f4e0fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 18:43:12 +0000 Subject: [PATCH 047/143] chore(deps): bump kotlin from 2.3.21 to 2.4.0 in /samples/kotlin-mcp-server (#822) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `kotlin` from 2.3.21 to 2.4.0. Updates `org.jetbrains.kotlin.jvm` from 2.3.21 to 2.4.0 Release notes
Sourced from org.jetbrains.kotlin.jvm's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin.jvm's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Updates `org.jetbrains.kotlin.plugin.serialization` from 2.3.21 to 2.4.0Release notes
Sourced from org.jetbrains.kotlin.plugin.serialization's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin.plugin.serialization's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlin-mcp-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/kotlin-mcp-server/gradle/libs.versions.toml b/samples/kotlin-mcp-server/gradle/libs.versions.toml index 91c9513..5a6217e 100644 --- a/samples/kotlin-mcp-server/gradle/libs.versions.toml +++ b/samples/kotlin-mcp-server/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin = "2.3.21" +kotlin = "2.4.0" ktor = "3.5.1" mcp-kotlin = "0.13.0" slf4j = "2.0.18" From 1866effd07705bece73f882eb7b210bf04377af8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 22:04:38 +0200 Subject: [PATCH 048/143] chore(deps): bump the ktor group across 1 directory with 15 updates (#832) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the ktor group with 15 updates in the / directory: | Package | From | To | | --- | --- | --- | | [io.ktor:ktor-client-apache5](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-client-auth](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-client-core](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-client-logging](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-server-content-negotiation](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-client-content-negotiation](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-serialization-kotlinx-json](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-server-auth](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-server-core](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-server-sse](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-server-websockets](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-client-mock](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-server-test-host](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-client-cio](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | | [io.ktor:ktor-server-cio](https://github.com/ktorio/ktor) | `3.4.3` | `3.5.1` | Updates `io.ktor:ktor-client-apache5` from 3.4.3 to 3.5.1 Release notes
Sourced from io.ktor:ktor-client-apache5's releases.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Changelog
Sourced from io.ktor:ktor-client-apache5's changelog.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Commits
5ba9d6fRelease 3.5.1 (#5719)a4f145dKTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when… (#5701)2caf278Fix failing :ktor-io:compileDarwinMainKotlinMetadata (#5716)257de90KTOR-8766 Fix multiple invocations of close from DIe77a168Fix cache misses with content negotiation 3x (#5714)ed22950Make huge post test less hugef329069Update dependency com.github.luben:zstd-jni to v1.5.7-116ecd072Update dependency io.swagger.parser.v3:swagger-parser to v2.1.44a0534cdUpdate dependency io.pebbletemplates:pebble to v4.1.28647e53Update dependency com.typesafe:config to v1.4.9- Additional commits viewable in compare view
Updates `io.ktor:ktor-client-auth` from 3.4.3 to 3.5.1Release notes
Sourced from io.ktor:ktor-client-auth's releases.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Changelog
Sourced from io.ktor:ktor-client-auth's changelog.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Commits
5ba9d6fRelease 3.5.1 (#5719)a4f145dKTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when… (#5701)2caf278Fix failing :ktor-io:compileDarwinMainKotlinMetadata (#5716)257de90KTOR-8766 Fix multiple invocations of close from DIe77a168Fix cache misses with content negotiation 3x (#5714)ed22950Make huge post test less hugef329069Update dependency com.github.luben:zstd-jni to v1.5.7-116ecd072Update dependency io.swagger.parser.v3:swagger-parser to v2.1.44a0534cdUpdate dependency io.pebbletemplates:pebble to v4.1.28647e53Update dependency com.typesafe:config to v1.4.9- Additional commits viewable in compare view
Updates `io.ktor:ktor-client-core` from 3.4.3 to 3.5.1Release notes
Sourced from io.ktor:ktor-client-core's releases.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Changelog
Sourced from io.ktor:ktor-client-core's changelog.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Commits
5ba9d6fRelease 3.5.1 (#5719)a4f145dKTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when… (#5701)2caf278Fix failing :ktor-io:compileDarwinMainKotlinMetadata (#5716)257de90KTOR-8766 Fix multiple invocations of close from DIe77a168Fix cache misses with content negotiation 3x (#5714)ed22950Make huge post test less hugef329069Update dependency com.github.luben:zstd-jni to v1.5.7-116ecd072Update dependency io.swagger.parser.v3:swagger-parser to v2.1.44a0534cdUpdate dependency io.pebbletemplates:pebble to v4.1.28647e53Update dependency com.typesafe:config to v1.4.9- Additional commits viewable in compare view
Updates `io.ktor:ktor-client-logging` from 3.4.3 to 3.5.1Release notes
Sourced from io.ktor:ktor-client-logging's releases.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated to the RawSource
- KTOR-8870 File.readChannel: do not close a non-opened file and ignore closing exceptions
- KTOR-9460 Curl: Can't build shared library with Ktor 3.4.2
- KTOR-9607 Crash on Android 7: NoSuchMethodError getInstanceStrong() since 3.5.0
- KTOR-9595 CIO: The engine imports
node:netstatically and breaks wasmJsBrowser webpack build- KTOR-9615 Apache5: The underlying request is not aborted when coroutine Job is cancelled
- KTOR-8443 RoutingBuilder.contentType does not use parameters when matching
- KTOR-9425 SessionTransportTransformerEncrypt init block uses wrong IV size for AES-256 (regression of KTOR-661)
- KTOR-9621 RateLimit plugin is bypassed when the nested authenticate block rejects the request
- KTOR-8766 DI: The close method is called twice on cleanup of AutoCloseable
- KTOR-8695 GMTDate() being offset by 369 years on Windows
- KTOR-9589 Duplicate PROPERTY_SETTER target in
@InternalAPIannotation... (truncated)
Changelog
Sourced from io.ktor:ktor-client-logging's changelog.
3.5.1
Published 25 June 2026
Improvements
- KTOR-9492 OpenAPI plugin: handle requireXxx functions in compiler plugin
- KTOR-9569 Add more details for KDoc of BearerAuthConfig.sendWithoutRequest
- KTOR-9571 Add KDoc for BearerAuthConfig.realm
- KTOR-9570 Add Kdoc for BearerAuthConfig.refreshTokens
Bugfixes
- KTOR-9646 Fix Kotlin 2.4.0 compiler plugin breaking changes
- KTOR-9585 OpenAPI: JsonSchema title is truncated when it contains a dot
- KTOR-9591 OpenAPI:
@JsonClassDiscriminatoron sealed types is ignored when generating OpenAPI discriminator schema- KTOR-9597 OpenAPI: Schema name collisions because
@SerialNameof sealed subtypes is used ascomponents.schemaskey- KTOR-9601 OpenAPI: nullable
@JvmInlinevalue class loses nullability in generated schema- KTOR-9620 Some issues related to digest authentication in 3.5.0
- KTOR-9623 Digest Auth: server must respond with one WWW-Authenticate header for each supported algorithm
- KTOR-9624 Digest Auth: "Unsupported charset in digest authentication header" for a charset name in lowercase
- KTOR-9630 Digest Auth: The plugin sends incorrect nonce when server responds with multiple WWW-Authenticate headers
- KTOR-9565 WebRTC: Peer stops receiving messages after a while on iOS
- KTOR-9610 WebRtcPeerConnection::close causes ClosedReceiveChannelException for other peer
- KTOR-9633 WebRTC statistics fetching race condition
- KTOR-9603 Structured concurrency is violated in WebRTC tests
- KTOR-9671 Darwin: Semicolons in URL path are sanitized
- KTOR-9639 Darwin: WebSocket client crashes the process when a PONG arrives after the session is closed
- KTOR-9575 Darwin: findCharset("UTF-16") maps to NSUTF16LittleEndianStringEncoding causing decoding failure for UTF-16 content with BOM
- KTOR-9661 HttpCache: InvalidCacheStateException is thrown on 304 when no cached entry matches varyKeys
- KTOR-9673 Caching always missing with Content Negotiation
- KTOR-9596 HttpTimeout: HttpRequestTimeoutException on any request with runTest and request timeout defined since 3.5.0
- KTOR-9632 HttpRequestBuilder.timeout call removes capabilities set in DefaultRequest
- KTOR-9252 ContentEncoding: Incomplete gzip response causes client/server to hang indefinitely
- KTOR-9670 Compression: The plugin ignores Accept-Encoding q=0 and most-specific matching
- KTOR-9614 Zstd Compression: "Destination buffer is too small" exception for a particular sequence of bytes
- KTOR-9636 CORS plugin drops OPTIONS preflight requests when allowSameOrigin is on
- KTOR-9659 CORS is skipped when the Origin header contains an IPv6 address
- KTOR-9574 ContentNegotiation: The charset of
Accept-Charsetheader is used for response deserialization- KTOR-9606 KotlinxSerializationConverter: it fails to deserialize an empty channel closed with a delay
- KTOR-9617 OutputStreamContent and WriterContent can exhaust Dispatchers.IO
- KTOR-9629 RawSourceChannel: coroutine cancellation is not propagated ... _Description has been truncated_ Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ae38db6..9e864e8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,7 +17,7 @@ collections-immutable = "0.5.0" coroutines = "1.11.0" kotest = "6.2.1" kotlinx-io = "0.9.1" -ktor = "3.4.3" +ktor = "3.5.1" logging = "8.0.4" mockk = "1.14.11" serialization = "1.11.0" From 4531a4c846ef54a5c9352888b4ab6a6541d33d9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jul 2026 22:37:39 +0200 Subject: [PATCH 049/143] chore(deps): bump dev.detekt:detekt-gradle-plugin from 2.0.0-alpha.3 to 2.0.0-alpha.5 (#849) Bumps [dev.detekt:detekt-gradle-plugin](https://github.com/detekt/detekt) from 2.0.0-alpha.3 to 2.0.0-alpha.5. Release notes
Sourced from dev.detekt:detekt-gradle-plugin's releases.
v2.0.0-alpha.5
2.0.0-alpha.5 - 2026-06-17
This is a hotfix release for
2.0.0-alpha.4where we fixed 2 bugs that were preventing detekt from running correctly.Changelog
- fix: stop leaking ktlint-repackage as a transitive dependency - #9391
- fix: exclude gradle-public-api from published POM - #9408
- Stop accepting unsupported API or language versions passed to CLI - #9410
v2.0.0-alpha.4
2.0.0-alpha.4 - 2026-06-13
This is an alpha release of Detekt 2.0.0. Is built against Kotlin 2.4.0, Gradle 9.5.1, AGP 9.2.1 and is tested against JDK 25.
Notable Changes
- Support Kotlin 2.4.0 - #9218
- Add new rule
LeakingSessionBoundType- #9242- Apply the
indent_styleconfiguration to all the ktlint wrapper rules (previsouly this was applied only to theIndentationrule) - #9315Breaking Changes
Changelog
- fix: prevent ArrayPrimitive crash on unresolved types - #9364
- Update ktlint documentation links - #9354
- Fix PrintStackTrace nested call detection - #9352
- Fix unused import false positive for companion object member extension properties - #9349
- Accept punctuation after a link - #9341
- Fixes UnnecessaryFullyQualifiedName false positive with explicit import shadowing - #9329
- docs: fix KMP type resolution task names - #9316
- Stop publishing ktlint-repackage - #9314
- Stop exposing ktlint's StandardRule to detekt-rules-ktlint-wrapper consumers - #9313
- Include ktlint-repackage in ktlint-wrapper JAR - #9312
- Declare DGP compatibility with Gradle's configuration cache - #9311
- Forward languageVersionSettings to KotlinAnalysisApiEngine.compile - #9305
- docs: add ForbiddenImport configuration example - #9302
- Fix
UnnecessaryFullyQualifiedNameclashes with kotlin package name - #9289- Remove excludeImportStatements from Deprecation rule - #9287
- Improve repackaging of Analysis API dependencies - #9285
- MaxChainedCallsOnSameLine - Fix AA type leaks - #9261
- SuspendFunSwallowedCancellation - Fix AA type leaks - #9256
- feat: Add exhaustive option to OutdatedDocumentation rule, also improve error messages - #9255
- Excluding generated sources by default - #9251
... (truncated)
Commits
9c6ced6Stop accepting unsupported API or language versions passed to CLI (#9410)44526f4fix: exclude gradle-public-api from published POM (#9408)6bad2e8fix: stop leaking ktlint-repackage as a transitive dependency (#9391)fd5683eUpdate dependency path-to-regexp to v0.2.5 (#9397)7865b27fix: resolve npm security vulnerabilities in website and bots dependencies (#...bb582d5Unbreak snapshot publishing (#9394)69866ddUpdate caniuse browser definitions (#9393)bfd3b5dAdd Docs for 2.0.0-alpha.4 (#9388)60300b2Switch to vanniktech/gradle-maven-publish-plugin for publishing (#9357)63e0777Update gradle/actions digest to 3f131e8 (#9386)- Additional commits viewable in compare view
--------- Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: devcrocod --- config/detekt/detekt.yml | 1 - gradle/libs.versions.toml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index 98fce0e..a82b404 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -416,7 +416,6 @@ potential-bugs: Deprecation: active: false aliases: ['DEPRECATION'] - excludeImportStatements: false DontDowncastCollectionTypes: active: false DoubleMutabilityForCollection: diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9e864e8..592fa25 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ # plugins version atomicfu = "0.33.0" binaryCompatibilityValidatorPlugin = "0.18.1" -detekt = "2.0.0-alpha.3" +detekt = "2.0.0-alpha.5" dokka = "2.2.0" kotlin = "2.3.21" kover = "0.9.8" From 420b64d1bb2d35e86adf544499e6748ee314ec72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 3 Jul 2026 13:16:58 +0200 Subject: [PATCH 050/143] chore(deps): bump the kotlin group across 1 directory with 2 updates (#834) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the kotlin group with 2 updates in the / directory: [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) and [org.jetbrains.kotlin:kotlin-serialization](https://github.com/JetBrains/kotlin). Updates `org.jetbrains.kotlin:kotlin-gradle-plugin` from 2.3.21 to 2.4.0 Release notes
Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin:kotlin-gradle-plugin's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Updates `org.jetbrains.kotlin:kotlin-serialization` from 2.3.21 to 2.4.0Release notes
Sourced from org.jetbrains.kotlin:kotlin-serialization's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin:kotlin-serialization's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
Updates `org.jetbrains.kotlin:kotlin-serialization` from 2.3.21 to 2.4.0Release notes
Sourced from org.jetbrains.kotlin:kotlin-serialization's releases.
Kotlin 2.4.0
Changelog
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
... (truncated)
Changelog
Sourced from org.jetbrains.kotlin:kotlin-serialization's changelog.
2.4.0
Analysis API
KT-83867OVERLOAD_RESOLUTION_AMBIGUITY false positive with assertEquals in IJ repoKT-83723[Analysis API] Enable experimental KDoc resolver by defaultKT-83388Analysis API: properly support KMP in KotlinPackageProviderKT-65683Analysis API: Dangling file session creation causes acomputeIfAbsentcontract violationAnalysis API. Code Compilation
KT-78946Evaluation of variable with local class in type parameter leads to InventNamesForLocalClasses exceptionAnalysis API. FIR
KT-68260K2 AA: InvalidFirElementTypeException “For CALLABLE_REFERENCE_EXPRESSION with text::lam1, unexpected element of type: no element found” with illegal callable reference callKT-70896AA: False positive deprecation warning with override of built-in method in JDK mapped classKT-84711K2 IDE sometimes loses FIR plugin-generated declarations after file changesKT-84625Analysis API: collectDesignationPath fails for nested classes inside plugin-generated top-level classesKT-84596Improve K2 Jooq completion performanceKT-84525KaValueParameterSymbol#getHasSynthesizedName returns false for FirDeclarationOrigin.SubstitutionOverride.DeclarationSiteKT-83546Kotlin analysis reach ClsCustomNavigationPolicyKT-84259Move CommonDefaultImportsProvider to the frontend independent moduleKT-82945Analysis API: KotlinIllegalArgumentExceptionWithAttachments: Expected FirResolvedTypeRef with ConeKotlinType but was FirUserTypeRefImplKT-71135AA: exception from sealed inheritors checker whenanalyzeCopyAnalysis API. Infrastructure
Fixes
KT-83905Analysis API: Improve UX with test dataKT-84913Extract compiler classes used by the PSI & Analysis API to a separate moduleKT-64986Analysis API: Implement Analysis API tests for different KMP PlatformsKT-84776The test data manager misses the redundancy check in the update modeKT-84962The test data manager misses -ea flagKT-84388Preserve the EOF status in the test data manager to avoid extra changesKT-84362Analysis API tests produce many warnings due to "not yet loaded registry"KT-84279Test Data Manager fails on a clean buildKT-83913Exclude compiler-based Analysis API tests from Git trackingKT-80379Extract per-module test generators for AA testsKT-84120Move CLI modules out of kotlin-compiler-fe10-for-ideKT-83200Track external dependencies of the Analysis API modulesAnalysis API. Light Classes
KT-82434Light classes should prefer enum entries to propertiesKT-84200SLC: return type is not boxed for delegated methods with generic original methodKT-72451"CCE: class PsiPrimitiveType cannot be cast to class PsiClassType" with same-named enum class and typealiasAnalysis API. PSI
... (truncated)
Commits
add726cAdd ChangeLog for 2.4.0-RC269a4a81[Wasm] Add binaryen per-file arguments8907c63[KGP] Suppress duplicate compiler warning output when --warning-mode=all is a...f9bef12[KGP] Add failing test for duplicate compiler warning output via Problems API7fe49c2KT-86268: Use 2.4.0 toolchain for abiValidation with older CVs13d25e2KT-86268: Regression test addedf7d1a76[JKlib] Fix JAR deserializer configuration.5cec663[JKlib] Wire up JvmBuiltInClassDescriptorFactoryef14611Make the default stability of non-final classesUnknowninstead ofStabled76473a[Gradle] Fix GeneralNativeIT.shouldAllowToOverrideDownloadUrl test failures- Additional commits viewable in compare view
--------- Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: devcrocod --- README.md | 2 +- gradle/libs.versions.toml | 2 +- kotlin-sdk-core/api/kotlin-sdk-core.api | 32 ++++++++++++------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 58a2cad..aefadcf 100644 --- a/README.md +++ b/README.md @@ -729,7 +729,7 @@ val client = Client( ) client.setRequestHandler (Method.Defined.SamplingCreateMessage) { request, _ -> - val content = request.messages.lastOrNull()?.content + val content = request.messages.lastOrNull()?.content?.firstOrNull() val prompt = if (content is TextContent) content.text else "your topic" CreateMessageResult( model = "gpt-4o-mini", diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 592fa25..e7f4683 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ atomicfu = "0.33.0" binaryCompatibilityValidatorPlugin = "0.18.1" detekt = "2.0.0-alpha.5" dokka = "2.2.0" -kotlin = "2.3.21" +kotlin = "2.4.0" kover = "0.9.8" ktlint = "14.2.0" knit = "0.5.1" diff --git a/kotlin-sdk-core/api/kotlin-sdk-core.api b/kotlin-sdk-core/api/kotlin-sdk-core.api index cdee342..1935e9a 100644 --- a/kotlin-sdk-core/api/kotlin-sdk-core.api +++ b/kotlin-sdk-core/api/kotlin-sdk-core.api @@ -415,7 +415,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/CallToolRequestBuild public final fun arguments (Lkotlin/jvm/functions/Function1;)V public final fun arguments (Lkotlinx/serialization/json/JsonObject;)V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/CallToolRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun getName ()Ljava/lang/String; public final fun setName (Ljava/lang/String;)V } @@ -954,7 +954,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/CompleteRequestBuild public fun ()V public final fun argument (Ljava/lang/String;Ljava/lang/String;)V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/CompleteRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun context (Ljava/util/Map;)V public final fun context (Lkotlin/jvm/functions/Function1;)V public final fun ref (Lio/modelcontextprotocol/kotlin/sdk/types/Reference;)V @@ -1188,7 +1188,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequest public final class io/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/CreateMessageRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun getContext ()Lio/modelcontextprotocol/kotlin/sdk/types/IncludeContext; public final fun getMaxTokens ()Ljava/lang/Integer; public final fun getStopSequences ()Ljava/util/List; @@ -1455,7 +1455,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/ElicitRequest$Compan public final class io/modelcontextprotocol/kotlin/sdk/types/ElicitRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/ElicitRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun getMessage ()Ljava/lang/String; public final fun requestedSchema (Lio/modelcontextprotocol/kotlin/sdk/types/ElicitRequestParams$RequestedSchema;)V public final fun requestedSchema (Lkotlin/jvm/functions/Function1;)V @@ -1833,7 +1833,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/GetPromptRequest$Com public final class io/modelcontextprotocol/kotlin/sdk/types/GetPromptRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/GetPromptRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun getArguments ()Ljava/util/Map; public final fun getName ()Ljava/lang/String; public final fun setArguments (Ljava/util/Map;)V @@ -2278,7 +2278,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/InitializeRequest$Co public final class io/modelcontextprotocol/kotlin/sdk/types/InitializeRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/InitializeRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun capabilities (Lio/modelcontextprotocol/kotlin/sdk/types/ClientCapabilities;)V public final fun capabilities (Lkotlin/jvm/functions/Function1;)V public final fun getProtocolVersion ()Ljava/lang/String; @@ -2668,7 +2668,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/ListPromptsRequest$C public final class io/modelcontextprotocol/kotlin/sdk/types/ListPromptsRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/PaginatedRequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/ListPromptsRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; } public final class io/modelcontextprotocol/kotlin/sdk/types/ListPromptsResult : io/modelcontextprotocol/kotlin/sdk/types/PaginatedResult, io/modelcontextprotocol/kotlin/sdk/types/ServerResult { @@ -2739,7 +2739,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/ListResourceTemplate public final class io/modelcontextprotocol/kotlin/sdk/types/ListResourceTemplatesRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/PaginatedRequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/ListResourceTemplatesRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; } public final class io/modelcontextprotocol/kotlin/sdk/types/ListResourceTemplatesResult : io/modelcontextprotocol/kotlin/sdk/types/PaginatedResult, io/modelcontextprotocol/kotlin/sdk/types/ServerResult { @@ -2810,7 +2810,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/ListResourcesRequest public final class io/modelcontextprotocol/kotlin/sdk/types/ListResourcesRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/PaginatedRequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/ListResourcesRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; } public final class io/modelcontextprotocol/kotlin/sdk/types/ListResourcesResult : io/modelcontextprotocol/kotlin/sdk/types/PaginatedResult, io/modelcontextprotocol/kotlin/sdk/types/ServerResult { @@ -2880,7 +2880,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/ListRootsRequest$Com public final class io/modelcontextprotocol/kotlin/sdk/types/ListRootsRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/ListRootsRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; } public final class io/modelcontextprotocol/kotlin/sdk/types/ListRootsResult : io/modelcontextprotocol/kotlin/sdk/types/ClientResult { @@ -3014,7 +3014,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/ListToolsRequest$Com public final class io/modelcontextprotocol/kotlin/sdk/types/ListToolsRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/PaginatedRequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/ListToolsRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; } public final class io/modelcontextprotocol/kotlin/sdk/types/ListToolsResult : io/modelcontextprotocol/kotlin/sdk/types/PaginatedResult, io/modelcontextprotocol/kotlin/sdk/types/ServerResult { @@ -3440,7 +3440,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/PingRequest$Companio public final class io/modelcontextprotocol/kotlin/sdk/types/PingRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/PingRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; } public final class io/modelcontextprotocol/kotlin/sdk/types/PingRequest_dslKt { @@ -3791,7 +3791,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/ReadResourceRequest$ public final class io/modelcontextprotocol/kotlin/sdk/types/ReadResourceRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/ReadResourceRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun getUri ()Ljava/lang/String; public final fun setUri (Ljava/lang/String;)V } @@ -4754,7 +4754,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/SetLevelRequest$Comp public final class io/modelcontextprotocol/kotlin/sdk/types/SetLevelRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/SetLevelRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun getLoggingLevel ()Lio/modelcontextprotocol/kotlin/sdk/types/LoggingLevel; public final fun setLoggingLevel (Lio/modelcontextprotocol/kotlin/sdk/types/LoggingLevel;)V } @@ -4920,7 +4920,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/SubscribeRequest$Com public final class io/modelcontextprotocol/kotlin/sdk/types/SubscribeRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/SubscribeRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun getUri ()Ljava/lang/String; public final fun setUri (Ljava/lang/String;)V } @@ -5688,7 +5688,7 @@ public final class io/modelcontextprotocol/kotlin/sdk/types/UnsubscribeRequest$C public final class io/modelcontextprotocol/kotlin/sdk/types/UnsubscribeRequestBuilder : io/modelcontextprotocol/kotlin/sdk/types/RequestBuilder { public fun ()V public fun build ()Lio/modelcontextprotocol/kotlin/sdk/types/UnsubscribeRequest; - public synthetic fun build$kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; + public synthetic fun build$io_modelcontextprotocol_kotlin_sdk_core ()Lio/modelcontextprotocol/kotlin/sdk/types/Request; public final fun getUri ()Ljava/lang/String; public final fun setUri (Ljava/lang/String;)V } From 19091d35284316f69a0f7505ddb27e5cabf57186 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 12:13:30 +0200 Subject: [PATCH 051/143] chore(deps): bump org.jetbrains.kotlinx:kotlinx-collections-immutable from 0.5.0 to 0.5.1 in the kotlinx group (#873) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the kotlinx group with 1 update: [org.jetbrains.kotlinx:kotlinx-collections-immutable](https://github.com/Kotlin/kotlinx.collections.immutable). Updates `org.jetbrains.kotlinx:kotlinx-collections-immutable` from 0.5.0 to 0.5.1 Release notes
Sourced from org.jetbrains.kotlinx:kotlinx-collections-immutable's releases.
v0.5.1
- Fixed
PersistentOrderedMapBuilderreturning a previously built map frombuild()after updating an entry value throughMutableMap.MutableEntry.setValue#253, #274- Fixed an assertion failure in
PersistentOrderedSetBuilder.build()after interleavedbuildandremove/removeAllcalls #251- Provided a JPMS module descriptor for the JVM artifact — module
kotlinx.collections.immutablecompiled intoMETA-INF/versions/9, the artifact stays Java 8-compatible #268Full changelog: https://github.com/Kotlin/kotlinx.collections.immutable/compare/v0.5.0...v0.5.1
Changelog
Sourced from org.jetbrains.kotlinx:kotlinx-collections-immutable's changelog.
0.5.1
- Fixed
PersistentOrderedMapBuilderreturning a previously built map frombuild()after updating an entry value throughMutableMap.MutableEntry.setValue#253, #274- Fixed an assertion failure in
PersistentOrderedSetBuilder.build()after interleavedbuildandremove/removeAllcalls #251- Provided a JPMS module descriptor for the JVM artifact — module
kotlinx.collections.immutablecompiled intoMETA-INF/versions/9, the artifact stays Java 8-compatible #268Commits
ad741d1Release v0.5.1cb4cf67Applied artifacts validator plugin (#271)e9ca796Restore the direct links write in the ordered map builder entry (#274)6822eedFix the pull request exclusion in the VCS trigger branch filter (#276)8201f28Surface pull request branches on CI for manually started builds (#273)f3dec4fFix ordered set builder cache after removeAll (#251)96bf012Provide a JPMS module descriptor for the JVM artifact (#268)81382a1Migrate ABI validation to the Kotlin Gradle plugin (#264)694d34bInvalidate ordered map builder after entry value updates (#253)1d6fda3Fix the method-rename examples in the 0.5.0 changelog entry (#266)- See full diff in compare view
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---Signed-off-by: dependabot[bot]Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot showignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e7f4683..0d9b5de 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ netty = "4.2.15.Final" # libraries version awaitility = "4.3.0" -collections-immutable = "0.5.0" +collections-immutable = "0.5.1" coroutines = "1.11.0" kotest = "6.2.1" kotlinx-io = "0.9.1" From ea3940ce477c9672b43447b9aedaa9fd98612df5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 12:39:14 +0200 Subject: [PATCH 052/143] chore(deps): bump io.modelcontextprotocol:kotlin-sdk-client from 0.13.0 to 0.14.0 in /samples/kotlin-mcp-client (#875) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [io.modelcontextprotocol:kotlin-sdk-client](https://github.com/modelcontextprotocol/kotlin-sdk) from 0.13.0 to 0.14.0. Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlin-mcp-client/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/kotlin-mcp-client/gradle/libs.versions.toml b/samples/kotlin-mcp-client/gradle/libs.versions.toml index b5167d9..fab3459 100644 --- a/samples/kotlin-mcp-client/gradle/libs.versions.toml +++ b/samples/kotlin-mcp-client/gradle/libs.versions.toml @@ -2,7 +2,7 @@ anthropic = "2.45.0" kotlin = "2.4.0" ktor = "3.5.1" -mcp-kotlin = "0.13.0" +mcp-kotlin = "0.14.0" shadow = "9.4.3" slf4j = "2.0.18" From 04e6d56fd6c5df0dea86cea303b121f3dd3d7ef0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 13:28:48 +0200 Subject: [PATCH 053/143] chore(deps): bump mcp-kotlin from 0.13.0 to 0.14.0 in /samples/kotlin-mcp-server (#876) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `mcp-kotlin` from 0.13.0 to 0.14.0. Updates `io.modelcontextprotocol:kotlin-sdk-client` from 0.13.0 to 0.14.0 Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Updates `io.modelcontextprotocol:kotlin-sdk-server` from 0.13.0 to 0.14.0Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlin-mcp-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/kotlin-mcp-server/gradle/libs.versions.toml b/samples/kotlin-mcp-server/gradle/libs.versions.toml index 5a6217e..6c6ff89 100644 --- a/samples/kotlin-mcp-server/gradle/libs.versions.toml +++ b/samples/kotlin-mcp-server/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] kotlin = "2.4.0" ktor = "3.5.1" -mcp-kotlin = "0.13.0" +mcp-kotlin = "0.14.0" slf4j = "2.0.18" shadow = "9.4.3" From 14c848db417b4c884990af2ce69d1a8bac6e40a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 13:29:15 +0200 Subject: [PATCH 054/143] chore(deps): bump mcp-kotlin from 0.13.0 to 0.14.0 in /samples/kotlinlang-mcp-server (#877) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `mcp-kotlin` from 0.13.0 to 0.14.0. Updates `io.modelcontextprotocol:kotlin-sdk-server` from 0.13.0 to 0.14.0 Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Updates `io.modelcontextprotocol:kotlin-sdk-client` from 0.13.0 to 0.14.0Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Updates `io.modelcontextprotocol:kotlin-sdk-testing` from 0.13.0 to 0.14.0Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/kotlinlang-mcp-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml index c521eba..766b5ab 100644 --- a/samples/kotlinlang-mcp-server/gradle/libs.versions.toml +++ b/samples/kotlinlang-mcp-server/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] kotlin = "2.4.0" ktor = "3.5.1" -mcp-kotlin = "0.13.0" +mcp-kotlin = "0.14.0" serialization = "1.11.0" coroutines = "1.11.0" logback = "1.5.37" From 7ea602a5bf259379c027c315e08b94269db0340e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 13:29:38 +0200 Subject: [PATCH 055/143] chore(deps): bump mcp-kotlin from 0.13.0 to 0.14.0 in /samples/simple-streamable-server (#878) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `mcp-kotlin` from 0.13.0 to 0.14.0. Updates `io.modelcontextprotocol:kotlin-sdk-client` from 0.13.0 to 0.14.0 Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Updates `io.modelcontextprotocol:kotlin-sdk-server` from 0.13.0 to 0.14.0Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/simple-streamable-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/simple-streamable-server/gradle/libs.versions.toml b/samples/simple-streamable-server/gradle/libs.versions.toml index e3f8f6a..21db581 100644 --- a/samples/simple-streamable-server/gradle/libs.versions.toml +++ b/samples/simple-streamable-server/gradle/libs.versions.toml @@ -2,7 +2,7 @@ kotlin = "2.4.0" ktor = "3.5.1" junit = "6.1.1" -mcp-kotlin = "0.13.0" +mcp-kotlin = "0.14.0" slf4j = "2.0.18" shadow = "9.4.3" From 91f7390a95dc7265b1202ad5226aaa8fd1d348a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 14:09:53 +0200 Subject: [PATCH 056/143] chore(deps): bump the other-dependencies group across 5 directories with 2 updates (#882) Bumps the other-dependencies group with 2 updates in the /samples/kotlin-mcp-client directory: [com.anthropic:anthropic-java](https://github.com/anthropics/anthropic-sdk-java) and [com.gradleup.shadow](https://github.com/GradleUp/shadow). Bumps the other-dependencies group with 1 update in the /samples/kotlin-mcp-server directory: [com.gradleup.shadow](https://github.com/GradleUp/shadow). Bumps the other-dependencies group with 1 update in the /samples/kotlinlang-mcp-server directory: [com.gradleup.shadow](https://github.com/GradleUp/shadow). Bumps the other-dependencies group with 1 update in the /samples/simple-streamable-server directory: [com.gradleup.shadow](https://github.com/GradleUp/shadow). Bumps the other-dependencies group with 1 update in the /samples/weather-stdio-server directory: [com.gradleup.shadow](https://github.com/GradleUp/shadow). Updates `com.anthropic:anthropic-java` from 2.45.0 to 2.48.0 Release notes
Sourced from com.anthropic:anthropic-java's releases.
v2.48.0
2.48.0 (2026-07-02)
Full Changelog: v2.47.1...v2.48.0
Features
- api: add agent-memory-2026-07-22 beta header (6603879)
v2.47.1
2.47.1 (2026-07-01)
Full Changelog: v2.47.0...v2.47.1
Chores
- api: remove some nonfunctional types from the SDKs (2f92a48)
v2.47.0
2.47.0 (2026-06-30)
Full Changelog: v2.46.0...v2.47.0
Features
- api: add support for Managed Agents event delta streaming, agent overrides, reverse pagination, vault credential injection scoping, and agent and deployment webhook events (5eed04b)
v2.46.0
2.46.0 (2026-06-30)
Full Changelog: v2.45.0...v2.46.0
Features
- api: add support for claude-sonnet-5 (444f054)
Changelog
Sourced from com.anthropic:anthropic-java's changelog.
2.48.0 (2026-07-02)
Full Changelog: v2.47.1...v2.48.0
Features
- api: add agent-memory-2026-07-22 beta header (6603879)
2.47.1 (2026-07-01)
Full Changelog: v2.47.0...v2.47.1
Chores
- api: remove some nonfunctional types from the SDKs (2f92a48)
2.47.0 (2026-06-30)
Full Changelog: v2.46.0...v2.47.0
Features
- api: add support for Managed Agents event delta streaming, agent overrides, reverse pagination, vault credential injection scoping, and agent and deployment webhook events (5eed04b)
2.46.0 (2026-06-30)
Full Changelog: v2.45.0...v2.46.0
Features
- api: add support for claude-sonnet-5 (444f054)
Commits
db3e617release: 2.48.0a462333feat(api): add agent-memory-2026-07-22 beta header3c6c77brelease: 2.47.10d315e6chore(api): remove some nonfunctional types from the SDKs2093447release: 2.47.04bf9078feat(api): add support for Managed Agents event delta streaming, agent overri...1c9486bcodegen metadatafab7574release: 2.46.0f0b5297feat(api): add support for claude-sonnet-5- See full diff in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in compare view
Updates `com.gradleup.shadow` from 9.4.3 to 9.5.1Release notes
Sourced from com.gradleup.shadow's releases.
9.5.1
Fixed
- Fix eager calls for
toolchainSpecin Kotlin DSL.
This fixes the regression when usingtoolchainwithouttargetCompatibilityin Kotlin DSL.9.5.0
Added
- Check
DuplicatesStrategyfor merging transformers. (#2026)
This will log warnings when an incompatibleDuplicatesStrategy(e.g.,EXCLUDE) is applied in Gradle configuration for built-inResourceTransformers.- Add
KotlinModuleMetadataTransformer. (#2073)- Add R8 as an opt-in
minimize { r8 { ... } }tool for shrinking the final shadowed JAR. (#2077)Changed
- Bump min Gradle requirement to 9.2.0. (#2057)
- Remove
afterEvaluatewhen adding variants. (#2056)- Deprecate
enableKotlinModuleRemappingforShadowJar. (#2073)
ApplyKotlinModuleMetadataTransformerexplicitly to support relocating inside Kotlin module metadata files.- Deprecate everything under
ShadowCopyAction. (#2083)Fixed
- Fix the conflicts when using
afterEvaluatewith other plugins. (#2055)Commits
c33612dPrepare version 9.5.1485e412Fix eager calls for toolchainSpec in Kotlin DSL (#2087)d062fa2Fix DuplicatesStrategyCheckerTest resource loading on Windows (#2085)e71a2c1Add description for shadow configuration (#2084)7ba43b0Prepare next development version6e00cb7Prepare version 9.5.0ca03909Deprecate everything under ShadowCopyAction (#2083)7d7da27Revert "Mark CONSTANT_TIME_FOR_ZIP_ENTRIES as const (#2074)"da18cc0Deprecate enableKotlinModuleRemapping for ShadowJar (#2073)ec6e55aReplace system properties with buildConfig consts (#2082)- Additional commits viewable in Date: Mon, 6 Jul 2026 14:39:33 +0200 Subject: [PATCH 057/143] chore(deps): bump mcp-kotlin from 0.13.0 to 0.14.0 in /samples/weather-stdio-server (#879) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps `mcp-kotlin` from 0.13.0 to 0.14.0. Updates `io.modelcontextprotocol:kotlin-sdk-client` from 0.13.0 to 0.14.0
Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Updates `io.modelcontextprotocol:kotlin-sdk-server` from 0.13.0 to 0.14.0Commits
fc7916frelease: 0.14.0 (#867)57e546dfeat: SEP-1686 Tasks (#844)35da063fix: bound request body size in SSE and Streamable HTTP transports (#839)bbf77bachore(deps): bump@types/nodefrom 26.0.0 to 26.0.1 in /integration-test/src/...d2b1509chore(deps): bump the other-dependencies group across 5 directories with 5 up...0221b8dfix(client): close stdio read sources during shutdown (#798)19db4b0fix(client): gate completion/complete on the completions capability (#846)64cf29fchore(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#856)cd91652fix: validate Origin against localhost by default in DNS rebinding protection...4103b87chore(deps): bump org.jetbrains.kotlinx:kotlinx-io-core from 0.9.0 to 0.9.1 i...- Additional commits viewable in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- samples/weather-stdio-server/gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/weather-stdio-server/gradle/libs.versions.toml b/samples/weather-stdio-server/gradle/libs.versions.toml index ee81756..67fec97 100644 --- a/samples/weather-stdio-server/gradle/libs.versions.toml +++ b/samples/weather-stdio-server/gradle/libs.versions.toml @@ -3,7 +3,7 @@ coroutines = "1.11.0" kotlin = "2.4.0" ktor = "3.5.1" logging = "8.0.4" -mcp-kotlin = "0.13.0" +mcp-kotlin = "0.14.0" shadow = "9.5.1" slf4j = "2.0.18" From 905d4f975e415a1113922465ef8013d9eedfdb21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 13:00:40 +0000 Subject: [PATCH 058/143] chore(deps): bump the all-dependencies group across 1 directory with 2 updates (#880) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the all-dependencies group with 2 updates in the /integration-test/src/jvmTest/typescript directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [tsx](https://github.com/privatenumber/tsx). Updates `@types/node` from 26.0.1 to 26.1.0 Commits
- See full diff in compare view
Updates `tsx` from 4.22.4 to 4.23.0Release notes
Sourced from tsx's releases.
v4.23.0
4.23.0 (2026-07-03)
Bug Fixes
- avoid redundant filesystem probes during module resolution (257bbbb), closes privatenumber/tsx#809
Features
- add multi-scenario startup benchmark suite (c178197), closes privatenumber/tsx#809 #809 hi#signal privatenumber/tsx#145 #809
This release is also available on:
v4.22.5
4.22.5 (2026-07-02)
Bug Fixes
- isolate hook state per async module.register() registration (a305f36)
This release is also available on:
Commits
1dfad37docs: cite esbuild's extension-resolution model in node notes257bbbbfix: avoid redundant filesystem probes during module resolutionc178197feat: add multi-scenario startup benchmark suite51800acdocs: add Node internals knowledge base (notes/node)a305f36fix: isolate hook state per async module.register() registrationca501a9chore: upgrade skills-npm to v1.2.0596cd1ftest: cover __dirname, __filename, & require.cache in CJS TS file75d9bf0test: lock in lenient ESM for ambiguous and CJS-typed packages1472f3etest: cover ESM-syntax dependency with omitted "type" field- See full diff in compare view
Signed-off-by: dependabot[bot]Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../src/jvmTest/typescript/package-lock.json | 16 ++++++++-------- .../src/jvmTest/typescript/package.json | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/integration-test/src/jvmTest/typescript/package-lock.json b/integration-test/src/jvmTest/typescript/package-lock.json index befd50e..4d0c500 100644 --- a/integration-test/src/jvmTest/typescript/package-lock.json +++ b/integration-test/src/jvmTest/typescript/package-lock.json @@ -15,9 +15,9 @@ "devDependencies": { "@types/cors": "^2.8.19", "@types/express": "^5.0.6", - "@types/node": "^26.0.1", + "@types/node": "^26.1.0", "cors": "^2.8.6", - "tsx": "^4.22.4", + "tsx": "^4.23.0", "typescript": "^6.0.3" } }, @@ -579,9 +579,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "26.0.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.1.tgz", - "integrity": "sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw==", + "version": "26.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.0.tgz", + "integrity": "sha512-O0A1G3xPGy4w7AgQdAQYUlQ+BKk2Oovw8eRpofyp5KdBZULnbe+WqaOVNrm705SHphCiG4XHsACrSmPu1f+Kgw==", "dev": true, "license": "MIT", "dependencies": { @@ -1680,9 +1680,9 @@ } }, "node_modules/tsx": { - "version": "4.22.4", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.22.4.tgz", - "integrity": "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.0.tgz", + "integrity": "sha512-eUdUIaCr963q2h5u3+QwvYp0+eqPvn+egeqZUm0hwERCqqx1E3kK5ehbGCvqSE5MQAULr67ww0cA3jKc3YkM1w==", "dev": true, "license": "MIT", "dependencies": { diff --git a/integration-test/src/jvmTest/typescript/package.json b/integration-test/src/jvmTest/typescript/package.json index aa8d9db..bf81140 100644 --- a/integration-test/src/jvmTest/typescript/package.json +++ b/integration-test/src/jvmTest/typescript/package.json @@ -16,9 +16,9 @@ "devDependencies": { "@types/cors": "^2.8.19", "@types/express": "^5.0.6", - "@types/node": "^26.0.1", + "@types/node": "^26.1.0", "cors": "^2.8.6", - "tsx": "^4.22.4", + "tsx": "^4.23.0", "typescript": "^6.0.3" } } From 7937390b4787f758c82c369541374d050fbdcd9b Mon Sep 17 00:00:00 2001 From: Pavel Gorgulov Date: Thu, 9 Jul 2026 17:03:01 +0200 Subject: [PATCH 059/143] test: create the server session before connecting the client (#885) `ChannelTransportTest` connected both sides concurrently, which is racy. `ChannelTransport` starts delivering inbound messages when its read loop launches, which happens before `start()` marks the transport `Operational`. The two run on different dispatchers, so the client's `initialize` could reach the server read loop first and the session's `InitializeResult` was then rejected by the send state gate with `Transport is not ready`. Measured ~3 failures in 600 rounds. `createSession()` does not await the handshake, so creating the session first is enough to order the two. This also matches the usage shown in `createLinkedPair()`'s KDoc. Not addressed here: the transport itself should not deliver inbound messages before it is `Operational`. Fixing that needs a post-`Operational` hook on `AbstractClientTransport` that the read loop awaits. --- .../kotlin/sdk/testing/ChannelTransportTest.kt | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/testing/ChannelTransportTest.kt b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/testing/ChannelTransportTest.kt index ea246db..4d798ce 100644 --- a/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/testing/ChannelTransportTest.kt +++ b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/testing/ChannelTransportTest.kt @@ -6,7 +6,6 @@ import io.modelcontextprotocol.kotlin.sdk.ExperimentalMcpApi import io.modelcontextprotocol.kotlin.sdk.client.Client import io.modelcontextprotocol.kotlin.sdk.server.Server import io.modelcontextprotocol.kotlin.sdk.server.ServerOptions -import io.modelcontextprotocol.kotlin.sdk.server.ServerSession import io.modelcontextprotocol.kotlin.sdk.types.Implementation import io.modelcontextprotocol.kotlin.sdk.types.InitializeRequest import io.modelcontextprotocol.kotlin.sdk.types.InitializeResult @@ -16,9 +15,6 @@ import io.modelcontextprotocol.kotlin.sdk.types.ListResourcesResult import io.modelcontextprotocol.kotlin.sdk.types.Method import io.modelcontextprotocol.kotlin.sdk.types.Resource import io.modelcontextprotocol.kotlin.sdk.types.ServerCapabilities -import kotlinx.coroutines.CompletableDeferred -import kotlinx.coroutines.joinAll -import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import kotlin.test.Test @@ -43,18 +39,9 @@ class ChannelTransportTest { clientInfo = Implementation(name = "test client", version = "1.0"), ) - val serverSessionResult = CompletableDeferred () + val serverSession = server.createSession(serverTransport) + client.connect(clientTransport) - listOf( - launch { - client.connect(clientTransport) - }, - launch { - serverSessionResult.complete(server.createSession(serverTransport)) - }, - ).joinAll() - - val serverSession = serverSessionResult.await() serverSession.setRequestHandler (Method.Defined.Initialize) { _, _ -> InitializeResult( protocolVersion = LATEST_PROTOCOL_VERSION, From beb340006498a73f83205e431344c0ff70687984 Mon Sep 17 00:00:00 2001 From: Pavel Gorgulov Date: Wed, 15 Jul 2026 12:33:29 +0200 Subject: [PATCH 060/143] feat(core): concurrent inbound dispatch behind an initialization gate (#884) Make inbound message handling concurrent after the initialization handshake, so a slow or peer-awaiting handler no longer blocks other messages on the same connection fixes #176, #572 ## Motivation and Context Inbound messages were processed serially on the transport read loop. One slow or peer-awaiting request handler (sampling, elicitation, roots) blocked every later message on that connection, including the responses and `notifications/cancelled` those handlers depend on which could deadlock request/response flows. ## How Has This Been Tested? New and old tests ## Breaking Changes - after the handshake, inbound handlers may run concurrently (processing stays serial during initialization). There is no opt-out flag by design, concurrency is bounded by `maxConcurrentHandlers` / `maxInFlightHandlers`. - `ProtocolOptions` / `ClientOptions` / `ServerOptions` gain new parameters with defaults - `RequestHandlerExtra` is now a coroutine-context element and is no longer user-constructible ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed --- .../kotlin/sdk/client/ClientTest.kt | 38 +- .../ProtocolConcurrencyIntegrationTest.kt | 306 ++++++++++ .../sdk/server/ClientConnectionLoggingTest.kt | 22 +- .../sdk/server/ServerSessionInitializeTest.kt | 2 + kotlin-sdk-client/api/kotlin-sdk-client.api | 4 +- .../kotlin/sdk/client/Client.kt | 10 +- kotlin-sdk-core/api/kotlin-sdk-core.api | 21 +- .../kotlin/sdk/shared/Protocol.kt | 569 +++++++++++++++--- .../kotlin/sdk/types/methods.kt | 9 + .../kotlin/sdk/types/serializers.kt | 9 +- .../sdk/shared/ProtocolConcurrencyTest.kt | 524 ++++++++++++++++ .../kotlin/sdk/shared/ProtocolOptionsTest.kt | 16 + .../ProtocolOutboundCancellationTest.kt | 167 +++++ .../kotlin/sdk/shared/ProtocolTest.kt | 197 ++++-- .../kotlin/sdk/shared/ProtocolTestFakes.kt | 112 ++++ .../sdk/shared/ProtocolConcurrencyJvmTest.kt | 114 ++++ kotlin-sdk-server/api/kotlin-sdk-server.api | 5 +- .../kotlin/sdk/server/Server.kt | 9 +- .../kotlin/sdk/server/ServerSession.kt | 8 + .../server/StreamableHttpServerTransport.kt | 191 +++++- .../StreamableHttpServerTransportTest.kt | 326 ++++++++++ 21 files changed, 2465 insertions(+), 194 deletions(-) create mode 100644 integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/ProtocolConcurrencyIntegrationTest.kt create mode 100644 kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolConcurrencyTest.kt create mode 100644 kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOptionsTest.kt create mode 100644 kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOutboundCancellationTest.kt create mode 100644 kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolTestFakes.kt create mode 100644 kotlin-sdk-core/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolConcurrencyJvmTest.kt diff --git a/integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientTest.kt b/integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientTest.kt index 5dfcf61..54d25ee 100644 --- a/integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientTest.kt +++ b/integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/ClientTest.kt @@ -24,6 +24,7 @@ import io.modelcontextprotocol.kotlin.sdk.types.InitializeRequest import io.modelcontextprotocol.kotlin.sdk.types.InitializeResult import io.modelcontextprotocol.kotlin.sdk.types.IntegerSchema import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCMessage +import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCNotification import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCRequest import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCResponse import io.modelcontextprotocol.kotlin.sdk.types.LATEST_PROTOCOL_VERSION @@ -52,6 +53,7 @@ import io.modelcontextprotocol.kotlin.sdk.types.UntitledSingleSelectEnumSchema import io.modelcontextprotocol.kotlin.sdk.types.UrlElicitationRequiredException import kotlinx.coroutines.CompletableDeferred import kotlinx.coroutines.TimeoutCancellationException +import kotlinx.coroutines.awaitCancellation import kotlinx.coroutines.cancel import kotlinx.coroutines.delay import kotlinx.coroutines.joinAll @@ -71,6 +73,7 @@ import kotlin.test.assertIs import kotlin.test.assertNull import kotlin.test.assertTrue import kotlin.test.fail +import kotlin.time.Duration.Companion.seconds class ClientTest { @Test @@ -543,6 +546,15 @@ class ClientTest { val serverSession = serverSessionResult.await() + // Register the tap after createSession so it chains onto the session's subscription instead + // of pre-empting the handshake. + val cancelledOnWire = CompletableDeferred () + serverTransport.onMessage { message -> + if (message is JSONRPCNotification && message.method == Method.Defined.NotificationsCancelled.value) { + cancelledOnWire.complete(Unit) + } + } + serverSession.setRequestHandler (Method.Defined.ResourcesList) { _, _ -> // Simulate delay def.complete(Unit) @@ -568,6 +580,7 @@ class ClientTest { def.await() runCatching { job.cancel("Cancelled by test") } defCancel.await() + cancelledOnWire.await() defTimeOut.await() } @@ -606,17 +619,9 @@ class ClientTest { val serverSession = serverSessionResult.await() serverSession.setRequestHandler (Method.Defined.ResourcesList) { _, _ -> - // Simulate a delayed response - // Wait ~100ms unless canceled - try { - withTimeout(100L) { - // Just delay here, if timeout is 0 on the client side, this won't return in time - delay(100) - } - } catch (_: Exception) { - // If aborted, just rethrow or return early - } - ListResourcesResult(resources = emptyList()) + // Never respond: the handler runs on a real dispatcher while the 1 ms timeout runs on the + // virtual test clock, so a real-time delay could race it. Parking keeps the test deterministic. + awaitCancellation() } // Request with 1 msec timeout should fail immediately @@ -895,8 +900,8 @@ class ClientTest { ), ) - // Track notifications - var rootListChangedNotificationReceived = false + // The handler runs on Dispatchers.Default after concurrent dispatch is enabled; await the deferred. + val rootListChangedReceived = CompletableDeferred () val serverSessionResult = CompletableDeferred () @@ -915,16 +920,13 @@ class ClientTest { serverSession.setNotificationHandler ( Method.Defined.NotificationsRootsListChanged, ) { - rootListChangedNotificationReceived = true + rootListChangedReceived.complete(Unit) CompletableDeferred(Unit) } client.sendRootsListChanged() - assertTrue( - rootListChangedNotificationReceived, - "Notification should be sent when sendRootsListChanged is called", - ) + withTimeout(5.seconds) { rootListChangedReceived.await() } } @Test diff --git a/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/ProtocolConcurrencyIntegrationTest.kt b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/ProtocolConcurrencyIntegrationTest.kt new file mode 100644 index 0000000..d8d64ec --- /dev/null +++ b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/ProtocolConcurrencyIntegrationTest.kt @@ -0,0 +1,306 @@ +package io.modelcontextprotocol.kotlin.sdk.integration + +import io.kotest.matchers.shouldBe +import io.modelcontextprotocol.kotlin.sdk.ExperimentalMcpApi +import io.modelcontextprotocol.kotlin.sdk.client.Client +import io.modelcontextprotocol.kotlin.sdk.client.ClientOptions +import io.modelcontextprotocol.kotlin.sdk.server.Server +import io.modelcontextprotocol.kotlin.sdk.server.ServerOptions +import io.modelcontextprotocol.kotlin.sdk.server.ServerSession +import io.modelcontextprotocol.kotlin.sdk.shared.InMemoryTransport +import io.modelcontextprotocol.kotlin.sdk.shared.currentRequestHandlerExtra +import io.modelcontextprotocol.kotlin.sdk.testing.ChannelTransport +import io.modelcontextprotocol.kotlin.sdk.types.CallToolRequest +import io.modelcontextprotocol.kotlin.sdk.types.CallToolRequestParams +import io.modelcontextprotocol.kotlin.sdk.types.CallToolResult +import io.modelcontextprotocol.kotlin.sdk.types.ClientCapabilities +import io.modelcontextprotocol.kotlin.sdk.types.CreateMessageRequest +import io.modelcontextprotocol.kotlin.sdk.types.CreateMessageRequestParams +import io.modelcontextprotocol.kotlin.sdk.types.CreateMessageResult +import io.modelcontextprotocol.kotlin.sdk.types.Implementation +import io.modelcontextprotocol.kotlin.sdk.types.InitializeRequest +import io.modelcontextprotocol.kotlin.sdk.types.InitializeRequestParams +import io.modelcontextprotocol.kotlin.sdk.types.InitializedNotification +import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCError +import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCMessage +import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCResponse +import io.modelcontextprotocol.kotlin.sdk.types.LATEST_PROTOCOL_VERSION +import io.modelcontextprotocol.kotlin.sdk.types.ListRootsRequest +import io.modelcontextprotocol.kotlin.sdk.types.ListRootsResult +import io.modelcontextprotocol.kotlin.sdk.types.ListToolsRequest +import io.modelcontextprotocol.kotlin.sdk.types.ListToolsResult +import io.modelcontextprotocol.kotlin.sdk.types.Method +import io.modelcontextprotocol.kotlin.sdk.types.RequestId +import io.modelcontextprotocol.kotlin.sdk.types.Role +import io.modelcontextprotocol.kotlin.sdk.types.SamplingMessage +import io.modelcontextprotocol.kotlin.sdk.types.ServerCapabilities +import io.modelcontextprotocol.kotlin.sdk.types.TextContent +import io.modelcontextprotocol.kotlin.sdk.types.toJSON +import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.launch +import kotlinx.coroutines.runBlocking +import kotlinx.coroutines.withTimeout +import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.CopyOnWriteArrayList +import java.util.concurrent.atomic.AtomicReference +import kotlin.coroutines.cancellation.CancellationException +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.time.Duration.Companion.seconds + +/** + * End-to-end tests for concurrent inbound dispatch enabled after the MCP handshake. + * + * Handlers run on a real [kotlinx.coroutines.Dispatchers.Default], so these use [runBlocking] with + * explicit [withTimeout] guards. A virtual test clock would false-fire timeouts against cross-thread + * real dispatchers. + */ +@OptIn(ExperimentalMcpApi::class) +class ProtocolConcurrencyIntegrationTest { + + private fun rootsClient(): Client = Client( + clientInfo = Implementation(name = "test client", version = "1.0"), + options = ClientOptions( + capabilities = ClientCapabilities(roots = ClientCapabilities.Roots(listChanged = null)), + ), + ) + + private fun toolsServer(): Server = Server( + serverInfo = Implementation(name = "test server", version = "1.0"), + options = ServerOptions( + capabilities = ServerCapabilities(tools = ServerCapabilities.Tools(listChanged = null)), + ), + ) + + // ChannelTransport delivers inbound messages as soon as its read loop starts, which is before + // start() marks it operational. Creating the session first keeps the client's initialize from + // landing on a transport that would reject the session's response. + private suspend fun connect( + client: Client, + clientTransport: ChannelTransport, + server: Server, + serverTransport: ChannelTransport, + ): ServerSession { + val serverSession = server.createSession(serverTransport) + client.connect(clientTransport) + return serverSession + } + + // The motivating deadlock over real serial read loops: a server tool handler makes a + // server-to-client request (roots/list) while still handling the client's tools/call. + @Test + fun `server tool handler can call roots list mid-handling without deadlock`() = runBlocking { + val client = rootsClient() + val server = toolsServer() + val (clientTransport, serverTransport) = ChannelTransport.createLinkedPair() + + val serverSession = connect(client, clientTransport, server, serverTransport) + + // Register the tools/call handler directly on the session so it can call back to the client + // mid-handling. Before concurrent dispatch this would deadlock: the server read loop is + // blocked by the tool handler and can never deliver the roots/list response. + serverSession.setRequestHandler (Method.Defined.ToolsCall) { _, _ -> + val roots = serverSession.request (ListRootsRequest()) + CallToolResult(content = listOf(TextContent(text = "roots=${roots.roots.size}"))) + } + + val result = withTimeout(10.seconds) { + client.callTool(CallToolRequest(CallToolRequestParams("needs-roots"))) + } + val text = (result as CallToolResult).content.filterIsInstance ().single().text + text shouldBe "roots=0" + + client.close() + server.close() + } + + // Client-side mirror: a client sampling handler makes a client-to-server request (tools/list) + // while still handling the server's sampling/createMessage. + @Test + fun `client sampling handler can call the server mid-handling without deadlock`() = runBlocking { + val client = Client( + clientInfo = Implementation(name = "test client", version = "1.0"), + options = ClientOptions( + capabilities = ClientCapabilities(sampling = ClientCapabilities.Sampling()), + ), + ) + val server = toolsServer() + val (clientTransport, serverTransport) = ChannelTransport.createLinkedPair() + + client.setRequestHandler (Method.Defined.SamplingCreateMessage) { _, _ -> + val tools = client.request (ListToolsRequest()) + CreateMessageResult( + role = Role.Assistant, + content = TextContent(text = "tools=${tools.tools.size}"), + model = "test-model", + ) + } + + val serverSession = connect(client, clientTransport, server, serverTransport) + + val result = withTimeout(10.seconds) { + serverSession.request ( + CreateMessageRequest( + CreateMessageRequestParams( + maxTokens = 100, + messages = listOf(SamplingMessage(role = Role.User, content = TextContent(text = "hi"))), + ), + ), + ) + } + val text = result.content.filterIsInstance ().single().text + text shouldBe "tools=0" + + client.close() + server.close() + } + + // Nested-cancel cascade: cancelling the client's tools/call must reach the server tool handler + // over the wire and cascade into its nested roots/list request, cancelling the parked + // client-side roots handler. No tools/call response is ever sent. + @Test + fun `cancelling a tool call cascades into its nested roots list request`() = runBlocking { + val client = rootsClient() + val server = toolsServer() + val (clientTransport, serverTransport) = ChannelTransport.createLinkedPair() + + val capturedToolCallId = AtomicReference (null) + val toolHandlerCancelled = CompletableDeferred () + val rootsHandlerEntered = CompletableDeferred () + val rootsHandlerCancelled = CompletableDeferred () + val parkForever = CompletableDeferred () + val unexpectedToolCallResponse = CompletableDeferred () + + // Tap the server->client direction (client transport inbound) to prove no tools/call + // response is ever delivered once the call is cancelled. + clientTransport.onMessage { message -> + if (message is JSONRPCResponse && message.id == capturedToolCallId.get()) { + unexpectedToolCallResponse.complete(Unit) + } + } + + val serverSession = connect(client, clientTransport, server, serverTransport) + + // Client roots handler parks until cancelled and records the cancellation. + client.setRequestHandler (Method.Defined.RootsList) { _, _ -> + rootsHandlerEntered.complete(Unit) + try { + parkForever.await() + } catch (e: CancellationException) { + rootsHandlerCancelled.complete(e) + throw e + } + } + + // Tool handler makes a nested server->client request and records its own cancellation. + serverSession.setRequestHandler (Method.Defined.ToolsCall) { _, _ -> + val extra = currentRequestHandlerExtra()!! + capturedToolCallId.set(extra.requestId) + try { + extra.sendRequest (ListRootsRequest()) + } catch (e: CancellationException) { + toolHandlerCancelled.complete(e) + throw e + } + CallToolResult(content = listOf(TextContent(text = "unreachable"))) + } + + val call = launch { client.callTool(CallToolRequest(CallToolRequestParams("nested"))) } + + withTimeout(10.seconds) { rootsHandlerEntered.await() } + call.cancel(CancellationException("user aborted")) + + withTimeout(10.seconds) { toolHandlerCancelled.await() } + withTimeout(10.seconds) { rootsHandlerCancelled.await() } + + // The server suppresses the response for a cancelled request, so none is ever sent. + assertFalse( + unexpectedToolCallResponse.isCompleted, + "no tools/call response should be delivered after the call was cancelled", + ) + + client.close() + server.close() + } + + // Init gate plus context element in a high-level handler: initialize and tools/list are + // pipelined before notifications/initialized and answered serially in order. After the + // handshake a high-level addTool handler can observe currentRequestHandlerExtra(). + @Test + fun `pipelined initialize and tools list are processed serially then context element is available`(): Unit = + runBlocking { + val server = toolsServer() + server.addTool(name = "ctx-tool", description = "returns its request id") { + val extra = currentRequestHandlerExtra() + checkNotNull(extra) { "currentRequestHandlerExtra() must be non-null inside a tool handler" } + CallToolResult(content = listOf(TextContent(text = extra.requestId.asText()))) + } + + val (clientTransport, serverTransport) = InMemoryTransport.createLinkedPair() + + val arrivalOrder = CopyOnWriteArrayList () + val pending = ConcurrentHashMap >() + clientTransport.onMessage { message -> + val id = when (message) { + is JSONRPCResponse -> message.id + is JSONRPCError -> message.id + else -> null + } + if (id != null) { + arrivalOrder.add(id) + pending[id]?.complete(message) + } + } + + // Drive the client side manually over the raw transport. + server.createSession(serverTransport) + + val initRequest = InitializeRequest( + InitializeRequestParams( + protocolVersion = LATEST_PROTOCOL_VERSION, + capabilities = ClientCapabilities(), + clientInfo = Implementation(name = "raw-client", version = "1.0"), + ), + ).toJSON() + val toolsListRequest = ListToolsRequest().toJSON() + + val initAnswered = pending.expect(initRequest.id) + val toolsListAnswered = pending.expect(toolsListRequest.id) + + // Pipelined before notifications/initialized: both handled in the serial dispatch phase. + clientTransport.send(initRequest) + clientTransport.send(toolsListRequest) + + withTimeout(10.seconds) { initAnswered.await() } + withTimeout(10.seconds) { toolsListAnswered.await() } + + // Deterministic serial ordering: initialize answered before tools/list. + assertEquals( + listOf(initRequest.id, toolsListRequest.id), + arrivalOrder.toList(), + "pipelined requests must be answered in arrival order", + ) + + // Complete the handshake, then call the high-level tool. + clientTransport.send(InitializedNotification().toJSON()) + + val toolCallRequest = CallToolRequest(CallToolRequestParams("ctx-tool")).toJSON() + val toolCallAnswered = pending.expect(toolCallRequest.id) + clientTransport.send(toolCallRequest) + + val toolCallResponse = withTimeout(10.seconds) { toolCallAnswered.await() } as JSONRPCResponse + val text = (toolCallResponse.result as CallToolResult).content.filterIsInstance ().single().text + // The handler echoed its request id, proving currentRequestHandlerExtra() was available. + text shouldBe toolCallRequest.id.asText() + } + + private fun ConcurrentHashMap >.expect( + id: RequestId, + ): CompletableDeferred = CompletableDeferred ().also { put(id, it) } + + private fun RequestId.asText(): String = when (this) { + is RequestId.StringId -> value + is RequestId.NumberId -> value.toString() + } +} diff --git a/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/ClientConnectionLoggingTest.kt b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/ClientConnectionLoggingTest.kt index 81a3b41..a1cf797 100644 --- a/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/ClientConnectionLoggingTest.kt +++ b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/ClientConnectionLoggingTest.kt @@ -1,5 +1,7 @@ package io.modelcontextprotocol.kotlin.sdk.server +import io.kotest.assertions.nondeterministic.continually +import io.kotest.assertions.nondeterministic.eventually import io.kotest.matchers.collections.shouldBeEmpty import io.kotest.matchers.collections.shouldHaveSize import io.kotest.matchers.shouldBe @@ -17,6 +19,9 @@ import kotlinx.serialization.json.JsonPrimitive import org.junit.jupiter.api.Test import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.EnumSource +import java.util.concurrent.CopyOnWriteArrayList +import kotlin.time.Duration.Companion.milliseconds +import kotlin.time.Duration.Companion.seconds class ClientConnectionLoggingTest : AbstractServerFeaturesTest() { @@ -56,7 +61,7 @@ class ClientConnectionLoggingTest : AbstractServerFeaturesTest() { @ParameterizedTest @EnumSource(LoggingLevel::class) fun `notification should filter logging messages below level`(minLevel: LoggingLevel): Unit = runBlocking { - val receivedMessages = mutableListOf () + val receivedMessages = CopyOnWriteArrayList () client.setNotificationHandler (Method.Defined.NotificationsMessage) { receivedMessages.add(it) CompletableDeferred(Unit) @@ -79,8 +84,10 @@ class ClientConnectionLoggingTest : AbstractServerFeaturesTest() { client.callTool(CallToolRequest(CallToolRequestParams("test-notification-filtered"))) + // Handlers dispatch on Dispatchers.Default after the handshake, so await the expected count + // before asserting order. val expectedLevels = LoggingLevel.entries.filter { it >= minLevel } - receivedMessages shouldHaveSize expectedLevels.size + eventually(5.seconds) { receivedMessages shouldHaveSize expectedLevels.size } receivedMessages.map { it.params.level } shouldBe expectedLevels } @@ -115,7 +122,7 @@ class ClientConnectionLoggingTest : AbstractServerFeaturesTest() { @ParameterizedTest @EnumSource(LoggingLevel::class) fun `sendLoggingMessage should filter messages below level`(minLevel: LoggingLevel): Unit = runBlocking { - val receivedMessages = mutableListOf () + val receivedMessages = CopyOnWriteArrayList () client.setNotificationHandler (Method.Defined.NotificationsMessage) { receivedMessages.add(it) CompletableDeferred(Unit) @@ -138,14 +145,16 @@ class ClientConnectionLoggingTest : AbstractServerFeaturesTest() { client.callTool(CallToolRequest(CallToolRequestParams("test-logging-level"))) + // Handlers dispatch on Dispatchers.Default after the handshake, so await the expected count + // before asserting order. val expectedLevels = LoggingLevel.entries.filter { it >= minLevel } - receivedMessages shouldHaveSize expectedLevels.size + eventually(5.seconds) { receivedMessages shouldHaveSize expectedLevels.size } receivedMessages.map { it.params.level } shouldBe expectedLevels } @Test fun `sendLoggingMessage should send no messages when level is set to highest`(): Unit = runBlocking { - val receivedMessages = mutableListOf () + val receivedMessages = CopyOnWriteArrayList () client.setNotificationHandler (Method.Defined.NotificationsMessage) { receivedMessages.add(it) CompletableDeferred(Unit) @@ -167,6 +176,7 @@ class ClientConnectionLoggingTest : AbstractServerFeaturesTest() { } client.callTool(CallToolRequest(CallToolRequestParams("test-logging-highest"))) - receivedMessages.shouldBeEmpty() + // Handlers dispatch asynchronously, so hold for a window to confirm nothing ever arrives. + continually(500.milliseconds) { receivedMessages.shouldBeEmpty() } } } diff --git a/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/ServerSessionInitializeTest.kt b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/ServerSessionInitializeTest.kt index 5031a9c..82cf91a 100644 --- a/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/ServerSessionInitializeTest.kt +++ b/integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/server/ServerSessionInitializeTest.kt @@ -65,6 +65,8 @@ class ServerSessionInitializeTest { assertEquals("test-client", session.clientVersion?.name) } + // Both initialize requests arrive before notifications/initialized, in the serial dispatch + // phase, so processing and response order stay deterministic. @Test fun `should reject duplicate initialize request`() = runTest { val session = createSession() diff --git a/kotlin-sdk-client/api/kotlin-sdk-client.api b/kotlin-sdk-client/api/kotlin-sdk-client.api index 1493a30..d856f5b 100644 --- a/kotlin-sdk-client/api/kotlin-sdk-client.api +++ b/kotlin-sdk-client/api/kotlin-sdk-client.api @@ -52,8 +52,8 @@ public final class io/modelcontextprotocol/kotlin/sdk/client/ClientKt { public final class io/modelcontextprotocol/kotlin/sdk/client/ClientOptions : io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOptions { public fun ()V - public fun (Lio/modelcontextprotocol/kotlin/sdk/types/ClientCapabilities;Z)V - public synthetic fun (Lio/modelcontextprotocol/kotlin/sdk/types/ClientCapabilities;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Lio/modelcontextprotocol/kotlin/sdk/types/ClientCapabilities;ZLkotlin/coroutines/CoroutineContext;)V + public synthetic fun (Lio/modelcontextprotocol/kotlin/sdk/types/ClientCapabilities;ZLkotlin/coroutines/CoroutineContext;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun getCapabilities ()Lio/modelcontextprotocol/kotlin/sdk/types/ClientCapabilities; } diff --git a/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt b/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt index 59f2b7e..3352104 100644 --- a/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt +++ b/kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt @@ -73,11 +73,13 @@ import kotlinx.collections.immutable.minus import kotlinx.collections.immutable.persistentMapOf import kotlinx.collections.immutable.toPersistentSet import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.Dispatchers import kotlinx.serialization.SerializationException import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.JsonPrimitive import kotlinx.serialization.json.buildJsonArray +import kotlin.coroutines.CoroutineContext import kotlin.coroutines.cancellation.CancellationException private val logger = KotlinLogging.logger {} @@ -87,11 +89,16 @@ private val logger = KotlinLogging.logger {} * * @property capabilities The capabilities this client supports. * @param enforceStrictCapabilities Whether to strictly enforce capabilities when interacting with the server. + * @param handlerCoroutineContext Coroutine context for inbound handlers. See [ProtocolOptions.handlerCoroutineContext]. */ public class ClientOptions( public val capabilities: ClientCapabilities = ClientCapabilities(), enforceStrictCapabilities: Boolean = true, -) : ProtocolOptions(enforceStrictCapabilities = enforceStrictCapabilities) + handlerCoroutineContext: CoroutineContext = Dispatchers.Default, +) : ProtocolOptions( + enforceStrictCapabilities = enforceStrictCapabilities, + handlerCoroutineContext = handlerCoroutineContext, +) /** * Initializes and connects an MCP client using the provided clientInfo [Implementation], client options, @@ -216,6 +223,7 @@ public open class Client(private val clientInfo: Implementation, options: Client serverInstructions = result.instructions notification(InitializedNotification()) + enableConcurrentDispatch() } catch (error: Throwable) { logger.error(error) { "Failed to initialize client: ${error.message}" } close() diff --git a/kotlin-sdk-core/api/kotlin-sdk-core.api b/kotlin-sdk-core/api/kotlin-sdk-core.api index 1935e9a..28d6737 100644 --- a/kotlin-sdk-core/api/kotlin-sdk-core.api +++ b/kotlin-sdk-core/api/kotlin-sdk-core.api @@ -59,6 +59,7 @@ public abstract class io/modelcontextprotocol/kotlin/sdk/shared/Protocol { public abstract fun assertRequestHandlerCapability (Lio/modelcontextprotocol/kotlin/sdk/types/Method;)V public final fun close (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public fun connect (Lio/modelcontextprotocol/kotlin/sdk/shared/Transport;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + protected final fun enableConcurrentDispatch ()V public final fun getFallbackNotificationHandler ()Lkotlin/jvm/functions/Function2; public final fun getFallbackRequestHandler ()Lkotlin/jvm/functions/Function3; public final fun getNotificationHandlers ()Ljava/util/Map; @@ -71,6 +72,7 @@ public abstract class io/modelcontextprotocol/kotlin/sdk/shared/Protocol { public static synthetic fun notification$default (Lio/modelcontextprotocol/kotlin/sdk/shared/Protocol;Lio/modelcontextprotocol/kotlin/sdk/types/Notification;Lio/modelcontextprotocol/kotlin/sdk/types/RequestId;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public fun onClose ()V public fun onError (Ljava/lang/Throwable;)V + protected fun onInitializedNotification ()V public final fun removeNotificationHandler (Lio/modelcontextprotocol/kotlin/sdk/types/Method;)V public final fun removeRequestHandler (Lio/modelcontextprotocol/kotlin/sdk/types/Method;)V public final fun request (Lio/modelcontextprotocol/kotlin/sdk/types/Request;Lio/modelcontextprotocol/kotlin/sdk/shared/RequestOptions;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -84,15 +86,18 @@ public abstract class io/modelcontextprotocol/kotlin/sdk/shared/Protocol { public final class io/modelcontextprotocol/kotlin/sdk/shared/ProtocolKt { public static final field IMPLEMENTATION_NAME Ljava/lang/String; + public static final fun currentRequestHandlerExtra (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun getDEFAULT_REQUEST_TIMEOUT ()J } public class io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOptions { - public synthetic fun (ZJILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (ZJLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ZJLkotlin/coroutines/CoroutineContext;IIILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (ZJLkotlin/coroutines/CoroutineContext;IILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun getEnforceStrictCapabilities ()Z + public final fun getHandlerCoroutineContext ()Lkotlin/coroutines/CoroutineContext; public final fun getTimeout-UwyO8pc ()J public final fun setEnforceStrictCapabilities (Z)V + public final fun setHandlerCoroutineContext (Lkotlin/coroutines/CoroutineContext;)V public final fun setTimeout-LRDsOJo (J)V } @@ -107,8 +112,16 @@ public final class io/modelcontextprotocol/kotlin/sdk/shared/ReadBufferKt { public static final fun serializeMessage (Lio/modelcontextprotocol/kotlin/sdk/types/JSONRPCMessage;)Ljava/lang/String; } -public final class io/modelcontextprotocol/kotlin/sdk/shared/RequestHandlerExtra { - public fun ()V +public final class io/modelcontextprotocol/kotlin/sdk/shared/RequestHandlerExtra : kotlin/coroutines/AbstractCoroutineContextElement { + public static final field Key Lio/modelcontextprotocol/kotlin/sdk/shared/RequestHandlerExtra$Key; + public final fun getMethod ()Lio/modelcontextprotocol/kotlin/sdk/types/Method; + public final fun getRequestId ()Lio/modelcontextprotocol/kotlin/sdk/types/RequestId; + public final fun sendNotification (Lio/modelcontextprotocol/kotlin/sdk/types/Notification;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendRequest (Lio/modelcontextprotocol/kotlin/sdk/types/Request;Lio/modelcontextprotocol/kotlin/sdk/shared/RequestOptions;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun sendRequest$default (Lio/modelcontextprotocol/kotlin/sdk/shared/RequestHandlerExtra;Lio/modelcontextprotocol/kotlin/sdk/types/Request;Lio/modelcontextprotocol/kotlin/sdk/shared/RequestOptions;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; +} + +public final class io/modelcontextprotocol/kotlin/sdk/shared/RequestHandlerExtra$Key : kotlin/coroutines/CoroutineContext$Key { } public final class io/modelcontextprotocol/kotlin/sdk/shared/RequestOptions : io/modelcontextprotocol/kotlin/sdk/shared/TransportSendOptions { diff --git a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/Protocol.kt b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/Protocol.kt index 50dc356..3515b4a 100644 --- a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/Protocol.kt +++ b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/Protocol.kt @@ -27,15 +27,33 @@ import kotlinx.atomicfu.AtomicRef import kotlinx.atomicfu.atomic import kotlinx.atomicfu.getAndUpdate import kotlinx.atomicfu.update +import kotlinx.collections.immutable.PersistentList import kotlinx.collections.immutable.PersistentMap +import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.persistentMapOf import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Deferred -import kotlinx.coroutines.TimeoutCancellationException -import kotlinx.coroutines.withTimeout +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.Job +import kotlinx.coroutines.NonCancellable +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.currentCoroutineContext +import kotlinx.coroutines.job +import kotlinx.coroutines.launch +import kotlinx.coroutines.sync.Semaphore +import kotlinx.coroutines.sync.withPermit +import kotlinx.coroutines.withContext +import kotlinx.coroutines.withTimeoutOrNull import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.JsonPrimitive import kotlinx.serialization.json.encodeToJsonElement +import kotlin.coroutines.AbstractCoroutineContextElement +import kotlin.coroutines.ContinuationInterceptor +import kotlin.coroutines.CoroutineContext import kotlin.coroutines.cancellation.CancellationException import kotlin.time.Duration import kotlin.time.Duration.Companion.seconds @@ -53,17 +71,26 @@ public typealias ProgressCallback = (Progress) -> Unit /** * Additional initialization options. * - * @property enforceStrictCapabilities whether to restrict emitted requests to only those that the - * remote side has indicated it can handle through its advertised capabilities. - * This does NOT affect checking of _local_ side capabilities, as it is considered a logic error - * to mis-specify those. - * Currently defaults to `false` for backwards compatibility with SDK versions that did not advertise - * capabilities correctly; in the future, this will default to `true`. + * [handlerCoroutineContext] is read once when [Protocol.connect] attaches a transport and stays + * fixed until the next [Protocol.connect]. + * + * @property enforceStrictCapabilities whether to restrict emitted requests to only those the remote + * side advertised support for. Local-side capability checks are unaffected. Defaults to `false` for + * backward compatibility with SDK versions that did not advertise capabilities correctly. * @property timeout default timeout for outgoing requests + * @property handlerCoroutineContext coroutine context used to run inbound request and notification + * handlers once initialization has completed. Must contain a real dispatching + * [kotlin.coroutines.ContinuationInterceptor]. `Dispatchers.Unconfined` and unconfined test + * dispatchers are unsupported, since handler resumptions would then run on the transport read loop + * and reintroduce head-of-line blocking. Any [kotlinx.coroutines.Job] in this context is ignored. */ public open class ProtocolOptions( public var enforceStrictCapabilities: Boolean = false, public var timeout: Duration = DEFAULT_REQUEST_TIMEOUT, + public var handlerCoroutineContext: CoroutineContext = Dispatchers.Default, + // Internal handler-concurrency bounds, read once at connect and not part of the public surface. + internal var maxConcurrentHandlers: Int = DEFAULT_MAX_CONCURRENT_HANDLERS, + internal var maxInFlightHandlers: Int = DEFAULT_MAX_IN_FLIGHT_HANDLERS, ) /** @@ -71,6 +98,12 @@ public open class ProtocolOptions( */ public val DEFAULT_REQUEST_TIMEOUT: Duration = 60.seconds +/** Default cap on concurrently executing inbound handlers per connection. */ +internal const val DEFAULT_MAX_CONCURRENT_HANDLERS: Int = 64 + +/** Default cap on launched-but-not-completed inbound handlers per connection. */ +internal const val DEFAULT_MAX_IN_FLIGHT_HANDLERS: Int = 256 + /** * Options that can be given per request. * @@ -121,7 +154,7 @@ public class RequestOptions( override fun hashCode(): Int { var result = super.hashCode() - result = 31 * result + (onProgress?.hashCode() ?: 0) + result = 31 * result + onProgress.hashCode() result = 31 * result + timeout.hashCode() return result } @@ -132,11 +165,70 @@ public class RequestOptions( /** * Extra data given to request handlers. + * + * One instance exists per in-flight inbound request. It is passed as the second parameter to + * low-level handlers registered via [Protocol.setRequestHandler] **and** installed into the + * handler coroutine's [CoroutineContext], so code nested anywhere under the handler can reach it + * via [currentRequestHandlerExtra] without parameter plumbing. + * + * @property requestId the JSON-RPC id of the request being handled + * @property method the request's method */ -public class RequestHandlerExtra +public class RequestHandlerExtra internal constructor( + public val requestId: RequestId, + public val method: Method, + private val protocol: Protocol, + internal val capturedTransport: Transport, +) : AbstractCoroutineContextElement(Key) { + + /** Context key for retrieving the extra from a handler coroutine's context. */ + public companion object Key : CoroutineContext.Key + + /** + * Sends a notification tagged with `relatedRequestId = `[requestId], letting transports + * associate it with the request being handled (e.g. route it onto the request's SSE stream). + */ + public suspend fun sendNotification(notification: Notification) { + protocol.notification(notification, relatedRequestId = requestId) + } + + /** + * Sends a request to the peer tagged with `relatedRequestId = `[requestId]. + * + * Mirrors [Protocol.request]; cancellation of the handler coroutine propagates into this call. + */ + public suspend fun sendRequest(request: Request, options: RequestOptions? = null): T { + val base = options ?: RequestOptions() + return protocol.request( + request, + RequestOptions( + relatedRequestId = requestId, + resumptionToken = base.resumptionToken, + onResumptionToken = base.onResumptionToken, + onProgress = base.onProgress, + timeout = base.timeout, + ), + ) + } +} + +/** The [RequestHandlerExtra] of the MCP request being handled by the current coroutine, or `null` outside a handler. */ +public suspend fun currentRequestHandlerExtra(): RequestHandlerExtra? = currentCoroutineContext()[RequestHandlerExtra] internal val COMPLETED = CompletableDeferred(Unit).also { it.complete(Unit) } +/** Cap on how many recently-cancelled outbound request ids are remembered to quiet late responses/progress. */ +private const val CANCELLED_REQUEST_IDS_REMEMBERED = 256 + +// Bypass set: exempt from both bound tiers so the connection cannot self-block. +// Responses are not listed — they are handled inline before dispatch. +private val CONTROL_METHODS: Set = setOf( + Method.Defined.Ping.value, + Method.Defined.NotificationsCancelled.value, + Method.Defined.NotificationsProgress.value, + Method.Defined.NotificationsInitialized.value, +) + /** * Implements MCP protocol framing on top of a pluggable transport, including * features like request/response linking, notifications, and progress. @@ -144,9 +236,11 @@ internal val COMPLETED = CompletableDeferred(Unit).also { it.complete(Unit) } * @property options protocol-level configuration; `null` falls back to defaults */ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptions?) { + private val connectionRef: AtomicRef = atomic(null) + /** The active transport, or `null` if not connected. */ - public var transport: Transport? = null - private set + public val transport: Transport? + get() = connectionRef.value?.transport private val _requestHandlers: AtomicRef RequestResult?>> = @@ -184,6 +278,21 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio public val progressHandlers: Map get() = _progressHandlers.value + private val recentlyCancelledRequestIds: AtomicRef > = + atomic(persistentListOf()) + + /** Remembers a locally-cancelled outbound request id so its late response/progress is quieted. */ + private fun rememberCancelledRequestId(id: RequestId) { + recentlyCancelledRequestIds.update { current -> + val appended = current.adding(id) + if (appended.size > CANCELLED_REQUEST_IDS_REMEMBERED) appended.removingAt(0) else appended + } + } + + /** Whether [id] was recently cancelled locally (see [rememberCancelledRequestId]). */ + private fun isRecentlyCancelled(id: RequestId?): Boolean = + id != null && recentlyCancelledRequestIds.value.contains(id) + /** * Callback for when the connection is closed for any reason. * @@ -213,6 +322,11 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio public var fallbackNotificationHandler: (suspend (notification: JSONRPCNotification) -> Unit)? = null init { + setNotificationHandler (Method.Defined.NotificationsCancelled) { notification -> + handleCancelledNotification(notification) + COMPLETED + } + setNotificationHandler (Method.Defined.NotificationsProgress) { notification -> onProgress(notification) COMPLETED @@ -223,15 +337,64 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio } } + /** + * Enables concurrent dispatch of inbound messages on the current connection. + * + * Called by subclasses when the MCP initialization phase completes (the client after the + * initialize exchange; the server session on receiving `notifications/initialized`). Until + * then, inbound messages are handled inline in arrival order. Reset by [connect]. + */ + protected fun enableConcurrentDispatch() { + val connection = connectionRef.value ?: return + connection.concurrentDispatchEnabled.value = true + } + + /** + * Router hook invoked whenever `notifications/initialized` is received, before handler lookup. + * + * Runs regardless of which notification handler is registered for the method, so replacing the + * handler via [setNotificationHandler] cannot disable subclass initialization logic. + */ + protected open fun onInitializedNotification() {} + /** * Attaches to the given transport, starts it, and starts listening for messages. * - * The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward. + * The Protocol object assumes ownership of the Transport, replacing any callbacks that have + * already been set, and expects that it is the only user of the Transport instance going forward. + * + * @throws IllegalStateException if this Protocol is already connected; call [close] first. */ public open suspend fun connect(transport: Transport) { - this.transport = transport + val maxConcurrent = options?.maxConcurrentHandlers ?: DEFAULT_MAX_CONCURRENT_HANDLERS + val maxInFlight = options?.maxInFlightHandlers ?: DEFAULT_MAX_IN_FLIGHT_HANDLERS + require(maxConcurrent > 0) { "maxConcurrentHandlers must be positive, but was $maxConcurrent" } + require(maxInFlight >= maxConcurrent) { + "maxInFlightHandlers ($maxInFlight) must be >= maxConcurrentHandlers ($maxConcurrent)" + } + val handlerContext = (options?.handlerCoroutineContext ?: Dispatchers.Default).minusKey(Job) + val interceptor = handlerContext[ContinuationInterceptor] + if (interceptor === Dispatchers.Unconfined || + interceptor?.let { it::class.simpleName?.contains("Unconfined") } == true + ) { + logger.warn { + "handlerCoroutineContext uses an unconfined dispatcher ($interceptor); " + + "handler resumptions will run on the transport read loop and may block unrelated messages" + } + } + val connection = Connection( + transport = transport, + handlerScope = CoroutineScope(SupervisorJob() + handlerContext + CoroutineName("McpProtocol")), + executionSemaphore = Semaphore(maxConcurrent), + maxInFlightHandlers = maxInFlight, + ) + if (!connectionRef.compareAndSet(null, connection)) { + connection.handlerScope.cancel() + error("Protocol is already connected; close() the current connection before connecting a new transport") + } + transport.onClose { - doClose() + doClose(connection) } transport.onError { @@ -239,24 +402,42 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio } transport.onMessage { message -> + if (connectionRef.value !== connection) { + logger.trace { "Dropping message received after close: ${message::class.simpleName}" } + return@onMessage + } when (message) { is JSONRPCResponse -> onResponse(message, null) - is JSONRPCRequest -> onRequest(message) - is JSONRPCNotification -> onNotification(message) + is JSONRPCRequest -> dispatchRequest(connection, message) + is JSONRPCNotification -> dispatchNotification(connection, message) is JSONRPCError -> onResponse(null, message) is JSONRPCEmptyMessage -> Unit } } logger.info { "Starting transport" } - transport.start() + try { + transport.start() + } catch (cause: Throwable) { + // Roll back so the Protocol can be reconnected after a failed start; idempotent with + // a transport-initiated doClose (both CAS on the same connection). + if (connectionRef.compareAndSet(connection, null)) { + connection.handlerScope.cancel() + } + throw cause + } } - private fun doClose() { - val handlersToNotify = _responseHandlers.value.values.toList() - _responseHandlers.getAndSet(persistentMapOf()) + private fun doClose(connection: Connection) { + // A stale onClose from a previous transport must not tear down the successor connection. + if (!connectionRef.compareAndSet(connection, null)) { + logger.trace { "Ignoring close signal from a stale transport" } + return + } + val handlersToNotify = _responseHandlers.getAndSet(persistentMapOf()).values.toList() _progressHandlers.getAndSet(persistentMapOf()) - transport = null + connection.inFlightRequestJobs.getAndSet(persistentMapOf()) + connection.handlerScope.cancel() onClose() val error = McpException(RPCError.ErrorCode.CONNECTION_CLOSED, "Connection closed") @@ -265,6 +446,110 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio } } + private suspend fun dispatchRequest(connection: Connection, request: JSONRPCRequest) { + if (!connection.concurrentDispatchEnabled.value) { + // Serial phase (before the peer completes MCP initialization): inline, in arrival + // order — the delivering coroutine awaits the handler. + onRequest(request, connection, trackCancellation = false) + return + } + val bypass = request.method in CONTROL_METHODS + if (!bypass && !tryAdmit(connection)) { + rejectOverloadedRequest(connection, request) + return + } + // UNDISPATCHED starts the handler synchronously in the delivering coroutine, preserving + // arrival order, then moves to handlerCoroutineContext at its first suspension. + connection.handlerScope.launch(start = CoroutineStart.UNDISPATCHED) { + // Register before any suspension point so a following notifications/cancelled can find + // and cancel even a handler still parked on admission. + registerInFlight(connection, request.id, coroutineContext.job) + try { + if (bypass) { + onRequest(request, connection, trackCancellation = true) + } else { + connection.executionSemaphore.withPermit { + onRequest(request, connection, trackCancellation = true) + } + } + } finally { + if (!bypass) connection.inFlightCount.decrementAndGet() + } + } + } + + private suspend fun dispatchNotification(connection: Connection, notification: JSONRPCNotification) { + if (notification.method == Method.Defined.NotificationsInitialized.value) { + onInitializedNotification() + } + if (!connection.concurrentDispatchEnabled.value) { + onNotification(notification) + return + } + val bypass = notification.method in CONTROL_METHODS + if (!bypass && !tryAdmit(connection)) { + val dropped = IllegalStateException( + "Dropped notification ${notification.method}: too many in-flight messages", + ) + logger.warn { dropped.message } + onError(dropped) + return + } + connection.handlerScope.launch(start = CoroutineStart.UNDISPATCHED) { + try { + if (bypass) { + onNotification(notification) + } else { + connection.executionSemaphore.withPermit { onNotification(notification) } + } + } finally { + if (!bypass) connection.inFlightCount.decrementAndGet() + } + } + } + + private fun tryAdmit(connection: Connection): Boolean { + while (true) { + val current = connection.inFlightCount.value + if (current >= connection.maxInFlightHandlers) return false + if (connection.inFlightCount.compareAndSet(current, current + 1)) return true + } + } + + private suspend fun rejectOverloadedRequest(connection: Connection, request: JSONRPCRequest) { + logger.warn { + "Rejecting request ${request.method} (id: ${request.id}): " + + "in-flight handler limit (${connection.maxInFlightHandlers}) reached" + } + try { + connection.transport.send( + JSONRPCError( + id = request.id, + error = RPCError( + code = RPCError.ErrorCode.INTERNAL_ERROR, + message = "Server is busy: too many in-flight messages", + ), + ), + ) + } catch (e: CancellationException) { + throw e + } catch (cause: Throwable) { + logger.error(cause) { "Failed to send busy rejection for request id: ${request.id}" } + onError(cause) + } + } + + private fun handleCancelledNotification(notification: CancelledNotification) { + val connection = connectionRef.value ?: return + val requestId = notification.params.requestId + val job = connection.inFlightRequestJobs.value[requestId] + if (job == null) { + logger.trace { "Ignoring cancellation for unknown or already-completed request: $requestId" } + return + } + job.cancel("Cancelled by peer: ${notification.params.reason ?: "unknown"}") + } + private suspend fun onNotification(notification: JSONRPCNotification) { logger.trace { "Received notification: ${notification.method}" } @@ -284,15 +569,16 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio } } - private suspend fun onRequest(request: JSONRPCRequest) { + private suspend fun onRequest(request: JSONRPCRequest, connection: Connection, trackCancellation: Boolean) { logger.trace { "Received request: ${request.method} (id: ${request.id})" } val handler = requestHandlers[request.method] ?: fallbackRequestHandler + val capturedTransport = connection.transport if (handler === null) { logger.trace { "No handler found for request: ${request.method}" } try { - transport?.send( + capturedTransport.send( JSONRPCError( id = request.id, error = RPCError( @@ -310,36 +596,77 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio return } - try { - val result = handler(request, RequestHandlerExtra()) - logger.trace { "Request handled successfully: ${request.method} (id: ${request.id})" } + val extra = RequestHandlerExtra( + requestId = request.id, + method = Method.from(request.method), + protocol = this, + capturedTransport = capturedTransport, + ) - transport?.send( - JSONRPCResponse( - id = request.id, - result = result ?: EmptyResult(), - ), - ) + // Registration in the in-flight registry already happened in dispatchRequest's launch + // block (synchronously, pre-suspension). Here we only need the job for suppression checks. + val handlerJob = if (trackCancellation) currentCoroutineContext().job else null + + withContext(extra) { + try { + val result = handler(request, extra) + logger.trace { "Request handled successfully: ${request.method} (id: ${request.id})" } + if (handlerJob?.isCancelled == true) { + logger.trace { "Suppressing response for request cancelled by peer (id: ${request.id})" } + return@withContext + } + capturedTransport.send( + JSONRPCResponse( + id = request.id, + result = result ?: EmptyResult(), + ), + ) + } catch (e: CancellationException) { + // Intentional exception to the always-rethrow-CE convention, only at this boundary. + if (handlerJob == null) throw e // serial phase: inline dispatch is not response-suppressed + if (handlerJob.isCancelled) throw e // genuine peer or close cancel: suppress the response + // CE escaped a live handler job (e.g. a leaked inner withTimeout). Answer + // INTERNAL_ERROR so the peer does not hang until its own timeout. + respondWithError(capturedTransport, request, e) + } catch (cause: Throwable) { + if (handlerJob?.isCancelled == true) { + logger.trace { "Suppressing error response for request cancelled by peer (id: ${request.id})" } + return@withContext + } + respondWithError(capturedTransport, request, cause) + } + } + } + + private fun registerInFlight(connection: Connection, id: RequestId, job: Job) { + val previous = connection.inFlightRequestJobs.getAndUpdate { current -> current.putting(id, job) }[id] + if (previous != null) { + logger.warn { "Duplicate in-flight request id $id; replacing the previous handler job" } + } + job.invokeOnCompletion { + // Identity guard: never evict a successor job registered under a reused id. + connection.inFlightRequestJobs.update { current -> + if (current[id] === job) current.removing(id) else current + } + } + } + + private suspend fun respondWithError(transport: Transport, request: JSONRPCRequest, cause: Throwable) { + logger.error(cause) { "Error handling request: ${request.method} (id: ${request.id})" } + try { + val rpcError = if (cause is McpException) { + RPCError(code = cause.code, message = cause.message.orEmpty(), data = cause.data) + } else { + RPCError(code = RPCError.ErrorCode.INTERNAL_ERROR, message = cause.message ?: "Internal error") + } + transport.send(JSONRPCError(id = request.id, error = rpcError)) } catch (e: CancellationException) { throw e - } catch (cause: Throwable) { - logger.error(cause) { "Error handling request: ${request.method} (id: ${request.id})" } - - try { - val rpcError = if (cause is McpException) { - RPCError(code = cause.code, message = cause.message.orEmpty(), data = cause.data) - } else { - RPCError(code = RPCError.ErrorCode.INTERNAL_ERROR, message = cause.message ?: "Internal error") - } - transport?.send(JSONRPCError(id = request.id, error = rpcError)) - } catch (e: CancellationException) { - throw e - } catch (sendError: Throwable) { - logger.error(sendError) { - "Failed to send error response for request: ${request.method} (id: ${request.id})" - } - // Optionally implement fallback behavior here + } catch (sendError: Throwable) { + logger.error(sendError) { + "Failed to send error response for request: ${request.method} (id: ${request.id})" } + onError(sendError) } } @@ -354,6 +681,10 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio val handler = _progressHandlers.value[progressToken] if (handler == null) { + if (isRecentlyCancelled(progressToken)) { + logger.trace { "Ignoring progress for a locally cancelled request: $progressToken" } + return + } val error = Error( "Received a progress notification for an unknown token: ${McpJson.encodeToString(notification)}", ) @@ -370,7 +701,7 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio val oldResponseHandlers = _responseHandlers.getAndUpdate { current -> if (messageId != null && messageId in current) { - current.remove(messageId) + current.removing(messageId) } else { current } @@ -379,8 +710,12 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio val handler = oldResponseHandlers[messageId] if (handler != null) { - messageId?.let { msg -> _progressHandlers.update { it.remove(msg) } } + messageId?.let { msg -> _progressHandlers.update { it.removing(msg) } } } else { + if (isRecentlyCancelled(messageId)) { + logger.trace { "Ignoring response for a locally cancelled request: $messageId" } + return + } onError( IllegalStateException( "Received a response for an unknown message ID: ${McpJson.encodeToString(error ?: response)}", @@ -438,7 +773,8 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio public suspend fun request(request: Request, options: RequestOptions? = null): T { logger.trace { "Sending request: ${request.method}" } val result = CompletableDeferred () - val transport = transport ?: error("Not connected") + val connection = connectionRef.value ?: error("Not connected") + val transport = connection.transport if (this@Protocol.options?.enforceStrictCapabilities == true) { assertCapabilityForMethod(request.method) @@ -448,7 +784,7 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio options?.onProgress?.let { progressHandler -> logger.trace { "Registering progress handler for request id: $id" } _progressHandlers.update { current -> - current.put(id, progressHandler) + current.putting(id, progressHandler) } val paramsObject = (this.params as? JsonObject) ?: JsonObject(emptyMap()) @@ -467,10 +803,10 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio val jsonRpcRequestId = jsonRpcRequest.id _responseHandlers.update { current -> - current.put(jsonRpcRequestId) { response, error -> + current.putting(jsonRpcRequestId) { response, error -> if (error != null) { result.completeExceptionally(error) - return@put + return@putting } try { @@ -482,42 +818,84 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio } } - val cancel: suspend (Throwable) -> Unit = { reason: Throwable -> - _responseHandlers.update { current -> current.remove(jsonRpcRequestId) } - _progressHandlers.update { current -> current.remove(jsonRpcRequestId) } + if (connectionRef.value !== connection) { + // Connection closed or replaced during registration; nothing would complete this handler. + _responseHandlers.update { it.removing(jsonRpcRequestId) } + _progressHandlers.update { it.removing(jsonRpcRequestId) } + throw McpException(RPCError.ErrorCode.CONNECTION_CLOSED, "Connection closed") + } - val notification = CancelledNotification( - params = CancelledNotificationParams( - requestId = jsonRpcRequestId, - reason = reason.message ?: "Unknown", - ), - ) + val cancelPending: suspend (reason: Throwable, notifyPeer: Boolean) -> Unit = { reason, notifyPeer -> + // Remember before removing: a racing onResponse/onProgress that sees the handler gone + // must also see the id, or it reports a late message as unknown. Order is load-bearing. + rememberCancelledRequestId(jsonRpcRequestId) + _responseHandlers.update { current -> current.removing(jsonRpcRequestId) } + _progressHandlers.update { current -> current.removing(jsonRpcRequestId) } - val jsonRpcNotification = notification.toJSON() - - transport.send(jsonRpcNotification, options) + if (notifyPeer) { + val notification = CancelledNotification( + params = CancelledNotificationParams( + requestId = jsonRpcRequestId, + reason = reason.message ?: "Unknown", + ), + ) + transport.send(notification.toJSON(), options) + } result.completeExceptionally(reason) } + // The MCP spec forbids cancelling `initialize`; local cleanup still runs, + // but no notifications/cancelled goes on the wire (timeout and cancel paths alike). + val notifyPeerOnCancel = request.method != Method.Defined.Initialize + val timeout = options?.timeout ?: DEFAULT_REQUEST_TIMEOUT try { - withTimeout(timeout) { + val response = withTimeoutOrNull(timeout) { logger.trace { "Sending request message with id: $jsonRpcRequestId" } - this@Protocol.transport?.send(jsonRpcRequest, options) + transport.send(jsonRpcRequest, options) + result.await() } - return result.await() - } catch (cause: TimeoutCancellationException) { - logger.error { "Request timed out after ${timeout.inWholeMilliseconds}ms: ${request.method}" } - cancel( - McpException( + if (response == null) { + // Our own request timeout expired. An outer withTimeout's cancellation propagates + // through withTimeoutOrNull instead of returning null and is handled by the catch below. + logger.error { "Request timed out after ${timeout.inWholeMilliseconds}ms: ${request.method}" } + val timeoutError = McpException( code = RPCError.ErrorCode.REQUEST_TIMEOUT, message = "Request timed out", data = JsonObject(mutableMapOf("timeout" to JsonPrimitive(timeout.inWholeMilliseconds))), - ), - ) - result.cancel(cause) + ) + withContext(NonCancellable) { + try { + cancelPending(timeoutError, notifyPeerOnCancel) + } catch (e: Throwable) { + logger.warn(e) { "Failed to notify peer about timed-out request" } + onError(e) + } + } + result.cancel() + throw timeoutError + } + return response + } catch (cause: CancellationException) { + // Plain caller cancellation, or an outer withTimeout that propagated through + // withTimeoutOrNull (only our own deadline returns null there). NonCancellable so the + // cancellation notification still goes out even though the caller's job is cancelled. + // A secondary send failure must never replace the original CancellationException. + withContext(NonCancellable) { + try { + cancelPending(cause, notifyPeerOnCancel) + } catch (e: Throwable) { + logger.warn(e) { "Failed to notify peer about cancelled request" } + onError(e) + } + } throw cause + } finally { + // Backstop for the failed-send path. The success, timeout and cancellation paths already + // removed these handlers, so this only bites when the outbound send failed. + _responseHandlers.update { it.removing(jsonRpcRequestId) } + _progressHandlers.update { it.removing(jsonRpcRequestId) } } } @@ -538,6 +916,11 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio * Registers a handler to invoke when this protocol object receives a request with the given method. * * Note that this will replace any previous request handler for the same method. + * + * Handlers may run concurrently after initialization and are cancelled cooperatively, so always + * re-throw [CancellationException]. Replacing a built-in control-method handler (`ping`, + * `notifications/cancelled`, `notifications/progress`, `notifications/initialized`) with slow + * code degrades connection liveness. */ public inline fun setRequestHandler( method: Method, @@ -556,7 +939,7 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio val wrapped = wrapRequestHandler(method, block) _requestHandlers.update { current -> - current.put(method.value) { jSONRPCRequest, extraHandler -> + current.putting(method.value) { jSONRPCRequest, extraHandler -> val request = jSONRPCRequest.fromJSON() val response = wrapped(request as T, extraHandler) response @@ -582,17 +965,23 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio * Removes the request handler for the given method. */ public fun removeRequestHandler(method: Method) { - _requestHandlers.update { current -> current.remove(method.value) } + _requestHandlers.update { current -> current.removing(method.value) } } /** * Registers a handler to invoke when this protocol object receives a notification with the given method. * * Note that this will replace any previous notification handler for the same method. + * + * Handlers may run concurrently after initialization and are cancelled cooperatively, so always + * re-throw [CancellationException]. Replacing a built-in control-method handler (`ping`, + * `notifications/cancelled`, `notifications/progress`, `notifications/initialized`) with slow + * code degrades connection liveness. Replacing `notifications/cancelled` in particular disables + * inbound request cancellation entirely, since that handler is what cancels the running job. */ public fun setNotificationHandler(method: Method, handler: (notification: T) -> Deferred ) { _notificationHandlers.update { current -> - current.put(method.value) { + current.putting(method.value) { @Suppress("UNCHECKED_CAST") handler(it.fromJSON() as T) } @@ -603,6 +992,22 @@ public abstract class Protocol(@PublishedApi internal val options: ProtocolOptio * Removes the notification handler for the given method. */ public fun removeNotificationHandler(method: Method) { - _notificationHandlers.update { current -> current.remove(method.value) } + _notificationHandlers.update { current -> current.removing(method.value) } + } + + private class Connection( + val transport: Transport, + val handlerScope: CoroutineScope, + val executionSemaphore: Semaphore, + val maxInFlightHandlers: Int, + ) { + /** Init gate: inbound dispatch is inline/serial until this flips. */ + val concurrentDispatchEnabled = atomic(false) + + /** Admission tier: launched-but-not-completed handler jobs (running + parked). */ + val inFlightCount = atomic(0) + + /** In-flight request handler jobs, for `notifications/cancelled`. */ + val inFlightRequestJobs: AtomicRef > = atomic(persistentMapOf()) } } diff --git a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/methods.kt b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/methods.kt index 19f4da5..90403e8 100644 --- a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/methods.kt +++ b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/methods.kt @@ -53,4 +53,13 @@ public sealed interface Method { */ @Serializable public data class Custom(override val value: String) : Method + + public companion object { + private val definedByValue: Map by lazy { + Defined.entries.associateBy { it.value } + } + + /** Resolves a wire method string to a [Defined] entry when known, [Custom] otherwise. */ + internal fun from(value: String): Method = definedByValue[value] ?: Custom(value) + } } diff --git a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/serializers.kt b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/serializers.kt index ab85e6d..6eab14a 100644 --- a/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/serializers.kt +++ b/kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types/serializers.kt @@ -59,18 +59,11 @@ internal object MethodSerializer : KSerializer { override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("io.modelcontextprotocol.kotlin.sdk.types.Method", PrimitiveKind.STRING) - private val definedMethods: Map by lazy { - Method.Defined.entries.associateBy { it.value } - } - override fun serialize(encoder: Encoder, value: Method) { encoder.encodeString(value.value) } - override fun deserialize(decoder: Decoder): Method { - val decodedString = decoder.decodeString() - return definedMethods[decodedString] ?: Method.Custom(decodedString) - } + override fun deserialize(decoder: Decoder): Method = Method.from(decoder.decodeString()) } // ============================================================================ diff --git a/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolConcurrencyTest.kt b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolConcurrencyTest.kt new file mode 100644 index 0000000..b3c95ac --- /dev/null +++ b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolConcurrencyTest.kt @@ -0,0 +1,524 @@ +package io.modelcontextprotocol.kotlin.sdk.shared + +import io.kotest.assertions.throwables.shouldThrow +import io.kotest.matchers.collections.shouldHaveSize +import io.kotest.matchers.shouldBe +import io.kotest.matchers.string.shouldContain +import io.modelcontextprotocol.kotlin.sdk.types.EmptyResult +import io.modelcontextprotocol.kotlin.sdk.types.InitializedNotification +import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCNotification +import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCRequest +import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCResponse +import io.modelcontextprotocol.kotlin.sdk.types.McpException +import io.modelcontextprotocol.kotlin.sdk.types.Method +import io.modelcontextprotocol.kotlin.sdk.types.PingRequest +import io.modelcontextprotocol.kotlin.sdk.types.RPCError +import io.modelcontextprotocol.kotlin.sdk.types.RequestId +import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.async +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch +import kotlinx.coroutines.test.StandardTestDispatcher +import kotlinx.coroutines.test.TestScope +import kotlinx.coroutines.test.advanceTimeBy +import kotlinx.coroutines.test.advanceUntilIdle +import kotlinx.coroutines.test.runCurrent +import kotlinx.coroutines.test.runTest +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.buildJsonObject +import kotlinx.serialization.json.int +import kotlinx.serialization.json.jsonPrimitive +import kotlinx.serialization.json.put +import kotlin.coroutines.cancellation.CancellationException +import kotlin.test.Test +import kotlin.time.Duration.Companion.seconds + +class ProtocolConcurrencyTest { + + private fun TestScope.newProtocol(): TestProtocol = + TestProtocol(ProtocolOptions(handlerCoroutineContext = StandardTestDispatcher(testScheduler))) + + @Test + fun `a suspended slow handler does not block a later fast request`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + protocol.fallbackRequestHandler = { request, _ -> + if (request.method == "test/slow") delay(10.seconds) + EmptyResult() + } + + transport.deliver(JSONRPCRequest(id = RequestId(1L), method = "test/slow")) + transport.deliver(JSONRPCRequest(id = RequestId(2L), method = "test/fast")) + runCurrent() + + responsesOn(transport).map { it.id } shouldBe listOf(RequestId(2L)) + + advanceTimeBy(11.seconds) + runCurrent() + responsesOn(transport).map { it.id } shouldBe listOf(RequestId(2L), RequestId(1L)) + } + + @Test + fun `dispatch is serial until concurrent dispatch is enabled`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + // gate NOT flipped + + protocol.fallbackRequestHandler = { request, _ -> + if (request.method == "test/slow") delay(10.seconds) + EmptyResult() + } + + val delivery = launch { + transport.deliver(JSONRPCRequest(id = RequestId(1L), method = "test/slow")) + transport.deliver(JSONRPCRequest(id = RequestId(2L), method = "test/fast")) + } + runCurrent() + // inline handling: the delivering coroutine is parked inside the slow handler + delivery.isCompleted shouldBe false + responsesOn(transport) shouldBe emptyList() + + advanceTimeBy(11.seconds) + runCurrent() + delivery.isCompleted shouldBe true + responsesOn(transport).map { it.id } shouldBe listOf(RequestId(1L), RequestId(2L)) + } + + // the hook fires before handler lookup and cannot be disabled by a user handler + @Test + fun `initialized notification invokes the router hook even when a user handler is registered`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + + var userHandlerCalled = false + protocol.setNotificationHandler (Method.Defined.NotificationsInitialized) { + userHandlerCalled = true + COMPLETED + } + transport.deliver(JSONRPCNotification(method = Method.Defined.NotificationsInitialized.value)) + runCurrent() + + protocol.initializedNotificationCount shouldBe 1 + userHandlerCalled shouldBe true + } + + @Test + fun `cancelled notification cancels the in-flight handler and suppresses the response`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + val entered = CompletableDeferred () + val sawCancellation = CompletableDeferred () + protocol.fallbackRequestHandler = { _, _ -> + entered.complete(Unit) + try { + delay(10.seconds) + } catch (e: CancellationException) { + sawCancellation.complete(Unit) + throw e + } + EmptyResult() + } + + transport.deliver(JSONRPCRequest(id = RequestId(5L), method = "test/slow")) + runCurrent() + entered.await() + + transport.deliver(cancelledNotification(requestId = RequestId(5L), reason = "user gave up")) + runCurrent() + sawCancellation.await() + advanceUntilIdle() + + responsesOn(transport) shouldBe emptyList() + errorsOn(transport) shouldBe emptyList() // JSONRPCError messages on the wire + protocol.errors shouldBe emptyList() + } + + @Test + fun `cancelled notification for an unknown id is a silent no-op`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + transport.deliver(cancelledNotification(requestId = RequestId(404L), reason = "nope")) + advanceUntilIdle() + + protocol.errors shouldBe emptyList() + } + + @Test + fun `handler leaking CancellationException without being cancelled produces INTERNAL_ERROR`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + protocol.fallbackRequestHandler = { _, _ -> throw CancellationException("leaked") } + + transport.deliver(JSONRPCRequest(id = RequestId(6L), method = "test/leak")) + advanceUntilIdle() + + val error = errorsOn(transport).single() + error.id shouldBe RequestId(6L) + error.error.code shouldBe RPCError.ErrorCode.INTERNAL_ERROR + } + + // suppression race variants + @Test + fun `handler that swallows cancellation and returns normally still gets no response`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + val entered = CompletableDeferred () + protocol.fallbackRequestHandler = { _, _ -> + entered.complete(Unit) + try { + delay(10.seconds) + } catch (_: CancellationException) { + // swallow (anti-pattern) and return normally + } + EmptyResult() + } + + transport.deliver(JSONRPCRequest(id = RequestId(7L), method = "test/swallow")) + runCurrent() + entered.await() + transport.deliver(cancelledNotification(requestId = RequestId(7L), reason = "stop")) + advanceUntilIdle() + + responsesOn(transport) shouldBe emptyList() + } + + @Test + fun `handler throwing non-CE while cancelled gets no error response`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + val entered = CompletableDeferred () + protocol.fallbackRequestHandler = { _, _ -> + entered.complete(Unit) + try { + delay(10.seconds) + } catch (_: CancellationException) { + throw IllegalStateException("boom") + } + EmptyResult() + } + + transport.deliver(JSONRPCRequest(id = RequestId(8L), method = "test/throw")) + runCurrent() + entered.await() + transport.deliver(cancelledNotification(requestId = RequestId(8L), reason = "stop")) + advanceUntilIdle() + + errorsOn(transport) shouldBe emptyList() + protocol.errors shouldBe emptyList() + } + + @Test + fun `suspension-free notification handlers observe strict arrival order`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + val seen = mutableListOf () + protocol.fallbackNotificationHandler = { notification -> + seen.add((notification.params as JsonObject).getValue("i").jsonPrimitive.int) + } + + repeat(20) { i -> + transport.deliver( + JSONRPCNotification(method = "test/event", params = buildJsonObject { put("i", i) }), + ) + } + advanceUntilIdle() + + seen shouldBe (0 until 20).toList() + } + + @Test + fun `reconnect resets the dispatch gate to serial`() = runTest { + val protocol = newProtocol() + val transport1 = RecordingTransport() + protocol.connect(transport1) + protocol.enableConcurrency() + protocol.close() + + val transport2 = RecordingTransport() + protocol.connect(transport2) + protocol.fallbackRequestHandler = { request, _ -> + if (request.method == "test/slow") delay(10.seconds) + EmptyResult() + } + + val delivery = launch { + transport2.deliver(JSONRPCRequest(id = RequestId(1L), method = "test/slow")) + transport2.deliver(JSONRPCRequest(id = RequestId(2L), method = "test/fast")) + } + runCurrent() + delivery.isCompleted shouldBe false // serial again: gate reset + advanceTimeBy(11.seconds) + runCurrent() + responsesOn(transport2).map { it.id } shouldBe listOf(RequestId(1L), RequestId(2L)) + } + + @Test + fun `close cancels in-flight handlers suppresses responses and fails pending outbound requests`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + val entered = CompletableDeferred () + val sawCancellation = CompletableDeferred () + protocol.fallbackRequestHandler = { _, _ -> + entered.complete(Unit) + try { + delay(10.seconds) + } catch (e: CancellationException) { + sawCancellation.complete(Unit) + throw e + } + EmptyResult() + } + transport.deliver(JSONRPCRequest(id = RequestId(9L), method = "test/slow")) + runCurrent() + entered.await() + + // shouldThrow inside the async so its failure does not cancel the (non-supervisor) test scope. + val pending = async { shouldThrow { protocol.request (PingRequest()) } } + transport.awaitRequest() // outbound ping on the wire + + protocol.close() + runCurrent() + + sawCancellation.await() + responsesOn(transport) shouldBe emptyList() + val thrown = pending.await() + thrown.code shouldBe RPCError.ErrorCode.CONNECTION_CLOSED + } + + @Test + fun `message delivered after close is dropped without crash or response`() = runTest { + val protocol = newProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + protocol.close() + + transport.deliver(JSONRPCRequest(id = RequestId(1L), method = "test/anything")) + advanceUntilIdle() + + responsesOn(transport) shouldBe emptyList() + errorsOn(transport) shouldBe emptyList() + } + + @Test + fun `at most maxConcurrentHandlers handlers run concurrently while control messages bypass`() = runTest { + val protocol = TestProtocol( + ProtocolOptions( + handlerCoroutineContext = StandardTestDispatcher(testScheduler), + maxConcurrentHandlers = 2, + ), + ) + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + var entered = 0 + val release = CompletableDeferred () + protocol.fallbackRequestHandler = { _, _ -> + entered += 1 + release.await() + EmptyResult() + } + + repeat(4) { i -> transport.deliver(JSONRPCRequest(id = RequestId(i.toLong()), method = "test/slow")) } + runCurrent() + entered shouldBe 2 // exactly two running, two parked on the semaphore + + // ping (bypass) is answered while saturated + transport.deliver(JSONRPCRequest(id = RequestId(100L), method = Method.Defined.Ping.value)) + runCurrent() + responsesOn(transport).map { it.id } shouldBe listOf(RequestId(100L)) + + // responses (bypass, inline) are processed while saturated + val pending = async { protocol.request (PingRequest()) } + runCurrent() + val outbound = transport.awaitRequest() + transport.deliver(JSONRPCResponse(id = outbound.id, result = EmptyResult())) + runCurrent() + pending.isCompleted shouldBe true + + release.complete(Unit) + advanceUntilIdle() + entered shouldBe 4 + responsesOn(transport) shouldHaveSize 5 + } + + @Test + fun `flood beyond maxInFlightHandlers is rejected fail-fast and the read loop never suspends`() = runTest { + val protocol = TestProtocol( + ProtocolOptions( + handlerCoroutineContext = StandardTestDispatcher(testScheduler), + maxConcurrentHandlers = 1, + maxInFlightHandlers = 4, + ), + ) + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + val release = CompletableDeferred () + protocol.fallbackRequestHandler = { _, _ -> + release.await() + EmptyResult() + } + + // 10 requests delivered back-to-back; delivery must complete without advancing + // virtual time — i.e. the read loop was never suspended on admission. + val delivery = launch { + repeat(10) { i -> transport.deliver(JSONRPCRequest(id = RequestId(i.toLong()), method = "test/slow")) } + } + runCurrent() + delivery.isCompleted shouldBe true + + // 4 admitted (1 running + 3 parked), 6 rejected immediately + val busyErrors = errorsOn(transport) + busyErrors shouldHaveSize 6 + busyErrors.forEach { + it.error.code shouldBe RPCError.ErrorCode.INTERNAL_ERROR + it.error.message shouldBe "Server is busy: too many in-flight messages" + } + + // ping still answered at full saturation + transport.deliver(JSONRPCRequest(id = RequestId(100L), method = Method.Defined.Ping.value)) + runCurrent() + responsesOn(transport).map { it.id } shouldBe listOf(RequestId(100L)) + + release.complete(Unit) + advanceUntilIdle() + responsesOn(transport) shouldHaveSize 5 // ping + the 4 admitted + } + + @Test + fun `overflowing notifications are dropped and reported via onError`() = runTest { + val protocol = TestProtocol( + ProtocolOptions( + handlerCoroutineContext = StandardTestDispatcher(testScheduler), + maxConcurrentHandlers = 1, + maxInFlightHandlers = 2, + ), + ) + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + // parks one handler with a request: holds the sole execution permit and one in-flight slot + val release = CompletableDeferred () + protocol.fallbackRequestHandler = { _, _ -> + release.await() + EmptyResult() + } + transport.deliver(JSONRPCRequest(id = RequestId(1L), method = "test/hog")) + runCurrent() + + // notification 1 is admitted (parked on the semaphore, behind the hogged permit); + // notification 2 overflows the admission cap and is dropped instead of parked. + val notificationRelease = CompletableDeferred () + protocol.fallbackNotificationHandler = { notificationRelease.await() } + transport.deliver(JSONRPCNotification(method = "test/event")) + transport.deliver(JSONRPCNotification(method = "test/event")) + runCurrent() + + protocol.errors shouldHaveSize 1 + protocol.errors.single().message.orEmpty() shouldContain "too many in-flight messages" + errorsOn(transport) shouldBe emptyList() // no wire error for dropped notifications + + release.complete(Unit) + notificationRelease.complete(Unit) + advanceUntilIdle() + } + + @Test + fun `cancelling saturating handlers releases permits and lets parked handlers run`() = runTest { + val protocol = TestProtocol( + ProtocolOptions( + handlerCoroutineContext = StandardTestDispatcher(testScheduler), + maxConcurrentHandlers = 1, + ), + ) + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + val secondCompleted = CompletableDeferred () + protocol.fallbackRequestHandler = { request, _ -> + if (request.method == "test/hog") { + delay(1000.seconds) // cancellable park + error("unreachable") + } + secondCompleted.complete(Unit) + EmptyResult() + } + + transport.deliver(JSONRPCRequest(id = RequestId(1L), method = "test/hog")) // holds the permit + transport.deliver(JSONRPCRequest(id = RequestId(2L), method = "test/next")) // parked on the semaphore + runCurrent() + secondCompleted.isCompleted shouldBe false + + // cancel the hog THROUGH the bypass while saturated + transport.deliver(cancelledNotification(requestId = RequestId(1L), reason = "make room")) + advanceUntilIdle() + + secondCompleted.isCompleted shouldBe true + responsesOn(transport).map { it.id } shouldBe listOf(RequestId(2L)) // hog suppressed, next answered + } + + @Test + fun `a parked handler can itself be cancelled before it ever runs`() = runTest { + val protocol = TestProtocol( + ProtocolOptions( + handlerCoroutineContext = StandardTestDispatcher(testScheduler), + maxConcurrentHandlers = 1, + ), + ) + val transport = RecordingTransport() + protocol.connect(transport) + protocol.enableConcurrency() + + protocol.fallbackRequestHandler = { request, _ -> + if (request.method == "test/hog") { + delay(1000.seconds) // cancellable park + error("unreachable") + } + EmptyResult() + } + + transport.deliver(JSONRPCRequest(id = RequestId(1L), method = "test/hog")) // holds the permit + transport.deliver(JSONRPCRequest(id = RequestId(2L), method = "test/next")) // parked on the semaphore + runCurrent() + + // cancel the parked handler before it ever acquires the permit, then cancel the hog too + transport.deliver(cancelledNotification(requestId = RequestId(2L), reason = "give up while parked")) + transport.deliver(cancelledNotification(requestId = RequestId(1L), reason = "make room")) + advanceUntilIdle() + + // no response for id=2 at all: its withPermit acquire was cancelled before onRequest ever ran + responsesOn(transport) shouldBe emptyList() + errorsOn(transport) shouldBe emptyList() + } +} diff --git a/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOptionsTest.kt b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOptionsTest.kt new file mode 100644 index 0000000..81bf24a --- /dev/null +++ b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOptionsTest.kt @@ -0,0 +1,16 @@ +package io.modelcontextprotocol.kotlin.sdk.shared + +import io.kotest.matchers.shouldBe +import kotlinx.coroutines.Dispatchers +import kotlin.test.Test + +class ProtocolOptionsTest { + + @Test + fun `defaults expose concurrency knobs`() { + val options = ProtocolOptions() + options.handlerCoroutineContext shouldBe Dispatchers.Default + options.maxConcurrentHandlers shouldBe 64 + options.maxInFlightHandlers shouldBe 256 + } +} diff --git a/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOutboundCancellationTest.kt b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOutboundCancellationTest.kt new file mode 100644 index 0000000..38ad556 --- /dev/null +++ b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOutboundCancellationTest.kt @@ -0,0 +1,167 @@ +package io.modelcontextprotocol.kotlin.sdk.shared + +import io.kotest.assertions.throwables.shouldThrow +import io.kotest.matchers.collections.shouldHaveSize +import io.kotest.matchers.nulls.shouldNotBeNull +import io.kotest.matchers.shouldBe +import io.kotest.matchers.string.shouldContain +import io.modelcontextprotocol.kotlin.sdk.types.CancelledNotificationParams +import io.modelcontextprotocol.kotlin.sdk.types.ClientCapabilities +import io.modelcontextprotocol.kotlin.sdk.types.EmptyResult +import io.modelcontextprotocol.kotlin.sdk.types.Implementation +import io.modelcontextprotocol.kotlin.sdk.types.InitializeRequest +import io.modelcontextprotocol.kotlin.sdk.types.InitializeRequestParams +import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCNotification +import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCResponse +import io.modelcontextprotocol.kotlin.sdk.types.LATEST_PROTOCOL_VERSION +import io.modelcontextprotocol.kotlin.sdk.types.McpException +import io.modelcontextprotocol.kotlin.sdk.types.McpJson +import io.modelcontextprotocol.kotlin.sdk.types.Method +import io.modelcontextprotocol.kotlin.sdk.types.PingRequest +import io.modelcontextprotocol.kotlin.sdk.types.RPCError +import io.modelcontextprotocol.kotlin.sdk.types.RequestId +import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.TimeoutCancellationException +import kotlinx.coroutines.async +import kotlinx.coroutines.cancelAndJoin +import kotlinx.coroutines.launch +import kotlinx.coroutines.test.advanceTimeBy +import kotlinx.coroutines.test.runCurrent +import kotlinx.coroutines.test.runTest +import kotlinx.coroutines.withTimeout +import kotlinx.serialization.json.decodeFromJsonElement +import kotlinx.serialization.json.jsonObject +import kotlinx.serialization.json.jsonPrimitive +import kotlinx.serialization.json.long +import kotlin.coroutines.cancellation.CancellationException +import kotlin.test.Test +import kotlin.time.Duration.Companion.seconds + +class ProtocolOutboundCancellationTest { + + @Test + fun `request times out awaiting the response and sends CancelledNotification with timeout reason`() = runTest { + val protocol = TestProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + + val inFlight = async { + shouldThrow { + protocol.request (PingRequest(), RequestOptions(timeout = 5.seconds)) + } + } + val sent = transport.awaitRequest() // request is on the wire; peer never responds + advanceTimeBy(6.seconds) + runCurrent() + + val thrown = inFlight.await() + thrown.code shouldBe RPCError.ErrorCode.REQUEST_TIMEOUT + thrown.data?.jsonObject?.get("timeout")?.jsonPrimitive?.long shouldBe 5.seconds.inWholeMilliseconds + + val cancelledJson = transport.sentWithOptions + .map { it.first } + .filterIsInstance () + .single { it.method == Method.Defined.NotificationsCancelled.value } + val cancelledParams = McpJson.decodeFromJsonElement (cancelledJson.params!!) + cancelledParams.requestId shouldBe sent.id + cancelledParams.reason.shouldNotBeNull() shouldContain "timed out" + } + + @Test + fun `outer withTimeout around request propagates the original timeout exception and notifies the peer`() = runTest { + val protocol = TestProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + + val inFlight = async { + shouldThrow { + withTimeout(1.seconds) { + protocol.request (PingRequest()) + } + } + } + transport.awaitRequest() // request is on the wire; peer never responds + advanceTimeBy(2.seconds) + runCurrent() + inFlight.await() + + transport.sentWithOptions.map { it.first }.filterIsInstance () + .filter { it.method == Method.Defined.NotificationsCancelled.value } shouldHaveSize 1 + } + + @Test + fun `caller cancellation sends CancelledNotification and rethrows the original exception`() = runTest { + val protocol = TestProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + + val cancelled = CompletableDeferred () + val job = launch { + try { + protocol.request (PingRequest()) + } catch (e: CancellationException) { + cancelled.complete(e) + throw e + } + } + transport.awaitRequest() + job.cancelAndJoin() + + cancelled.await() + val wire = transport.sentWithOptions.map { it.first }.filterIsInstance () + .filter { it.method == Method.Defined.NotificationsCancelled.value } + wire shouldHaveSize 1 + } + + @Test + fun `cancelling the initialize request performs local cleanup but sends no CancelledNotification`() = runTest { + val protocol = TestProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + + val job = launch { + protocol.request ( + InitializeRequest( + InitializeRequestParams( + protocolVersion = LATEST_PROTOCOL_VERSION, + capabilities = ClientCapabilities(), + clientInfo = Implementation(name = "t", version = "1"), + ), + ), + ) + } + val sent = transport.awaitRequest() + sent.method shouldBe Method.Defined.Initialize.value + job.cancelAndJoin() + + transport.sentWithOptions.map { it.first }.filterIsInstance () + .filter { it.method == Method.Defined.NotificationsCancelled.value } shouldHaveSize 0 + protocol.responseHandlers shouldBe emptyMap() + } + + @Test + fun `late response for a cancelled request is ignored silently`() = runTest { + val protocol = TestProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + + val job = launch { protocol.request (PingRequest()) } + val sent = transport.awaitRequest() + job.cancelAndJoin() + + transport.deliver(JSONRPCResponse(id = sent.id, result = EmptyResult())) + + protocol.errors shouldHaveSize 0 // no "unknown message ID" onError + } + + @Test + fun `response for a genuinely unknown id still reports onError`() = runTest { + val protocol = TestProtocol() + val transport = RecordingTransport() + protocol.connect(transport) + + transport.deliver(JSONRPCResponse(id = RequestId(999L), result = EmptyResult())) + + protocol.errors shouldHaveSize 1 + } +} diff --git a/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolTest.kt b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolTest.kt index b726c2f..2846ccc 100644 --- a/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolTest.kt +++ b/kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolTest.kt @@ -5,6 +5,9 @@ import io.kotest.matchers.collections.shouldContainExactly import io.kotest.matchers.collections.shouldHaveSize import io.kotest.matchers.nulls.shouldNotBeNull import io.kotest.matchers.shouldBe +import io.kotest.matchers.shouldNotBe +import io.kotest.matchers.string.shouldContain +import io.kotest.matchers.types.shouldBeInstanceOf import io.modelcontextprotocol.kotlin.sdk.types.CustomRequest import io.modelcontextprotocol.kotlin.sdk.types.EmptyResult import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCMessage @@ -13,11 +16,16 @@ import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCRequest import io.modelcontextprotocol.kotlin.sdk.types.JSONRPCResponse import io.modelcontextprotocol.kotlin.sdk.types.McpJson import io.modelcontextprotocol.kotlin.sdk.types.Method +import io.modelcontextprotocol.kotlin.sdk.types.PingRequest +import io.modelcontextprotocol.kotlin.sdk.types.ProgressNotification +import io.modelcontextprotocol.kotlin.sdk.types.ProgressNotificationParams +import io.modelcontextprotocol.kotlin.sdk.types.ProgressToken import io.modelcontextprotocol.kotlin.sdk.types.ReadResourceRequest import io.modelcontextprotocol.kotlin.sdk.types.ReadResourceRequestParams +import io.modelcontextprotocol.kotlin.sdk.types.RequestId import io.modelcontextprotocol.kotlin.sdk.types.RequestMeta import kotlinx.coroutines.async -import kotlinx.coroutines.channels.Channel +import kotlinx.coroutines.launch import kotlinx.coroutines.test.runTest import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.JsonObjectBuilder @@ -30,6 +38,7 @@ import kotlinx.serialization.json.jsonPrimitive import kotlin.coroutines.cancellation.CancellationException import kotlin.test.BeforeTest import kotlin.test.Test +import kotlin.time.Duration.Companion.seconds class ProtocolTest { private lateinit var protocol: TestProtocol @@ -185,64 +194,174 @@ class ProtocolTest { transport.deliver(JSONRPCResponse(sent.id, EmptyResult())) inFlight.await() } -} -private class TestProtocol : Protocol(null) { - val errors = mutableListOf () + @Test + fun `request handler receives enriched extra and ambient context element`() = runTest { + protocol.connect(transport) - override fun onError(error: Throwable) { - errors.add(error) + var seenByParameter: RequestHandlerExtra? = null + var seenAmbient: RequestHandlerExtra? = null + protocol.fallbackRequestHandler = { _, extra -> + seenByParameter = extra + seenAmbient = currentRequestHandlerExtra() + EmptyResult() + } + + transport.deliver(JSONRPCRequest(id = RequestId(7L), method = "custom/echo")) + + seenByParameter shouldNotBe null + seenByParameter?.requestId shouldBe RequestId(7L) + seenByParameter?.method shouldBe Method.Custom("custom/echo") + // the SAME instance flows through both delivery paths + seenAmbient shouldBe seenByParameter } - override fun assertCapabilityForMethod(method: Method) { - // noop - } - override fun assertNotificationCapability(method: Method) { - // noop - } - override fun assertRequestHandlerCapability(method: Method) { - // noop - } -} + @Test + fun `extra method resolves defined methods to Defined entries`() = runTest { + protocol.connect(transport) -private class RecordingTransport : Transport { - private val sentMessages = Channel (Channel.UNLIMITED) - private var onMessageCallback: (suspend (JSONRPCMessage) -> Unit)? = null - private var onCloseCallback: (() -> Unit)? = null + var seenMethod: Method? = null + protocol.setRequestHandler (Method.Defined.Ping) { _, extra -> + seenMethod = extra.method + EmptyResult() + } + transport.deliver(JSONRPCRequest(id = RequestId(1L), method = "ping")) - override suspend fun start() { - // noop + seenMethod shouldBe Method.Defined.Ping } - override suspend fun send(message: JSONRPCMessage, options: TransportSendOptions?) { - sentMessages.send(message) + @Test + fun `extra sendNotification stamps relatedRequestId`() = runTest { + protocol.connect(transport) + + protocol.fallbackRequestHandler = { _, extra -> + extra.sendNotification( + ProgressNotification( + ProgressNotificationParams(progressToken = ProgressToken(1L), progress = 0.5), + ), + ) + EmptyResult() + } + + transport.deliver(JSONRPCRequest(id = RequestId(42L), method = "custom/progressing")) + + val sent = transport.sentWithOptions.first { it.first is JSONRPCNotification } + sent.second?.relatedRequestId shouldBe RequestId(42L) } - override suspend fun close() { - onCloseCallback?.invoke() + @Test + fun `extra sendRequest stamps relatedRequestId and preserves caller options`() = runTest { + protocol.connect(transport) + + protocol.fallbackRequestHandler = { _, extra -> + extra.sendRequest ( + PingRequest(), + RequestOptions(resumptionToken = "tok", onProgress = { }, timeout = 30.seconds), + ) + EmptyResult() + } + + // The serial phase runs the handler inline inside deliver(), and the handler suspends + // awaiting the nested request's response — drive delivery from a child coroutine. + val delivery = launch { + transport.deliver(JSONRPCRequest(id = RequestId(42L), method = "custom/nested")) + } + + val outbound = transport.awaitRequest() + val recorded = transport.sentWithOptions + .first { (it.first as? JSONRPCRequest)?.id == outbound.id } + .second + val options = recorded.shouldBeInstanceOf () + options.relatedRequestId shouldBe RequestId(42L) + options.resumptionToken shouldBe "tok" + options.timeout shouldBe 30.seconds + options.onProgress shouldNotBe null + + transport.deliver(JSONRPCResponse(id = outbound.id, result = EmptyResult())) + delivery.join() } - override fun onClose(block: () -> Unit) { - onCloseCallback = block + @Test + fun `currentRequestHandlerExtra returns null outside handlers`() = runTest { + currentRequestHandlerExtra() shouldBe null } - override fun onError(block: (Throwable) -> Unit) { - // noop + @Test + fun `connect while already connected throws IllegalStateException`() = runTest { + protocol.connect(transport) + shouldThrow { + protocol.connect(RecordingTransport()) + } } - override fun onMessage(block: suspend (JSONRPCMessage) -> Unit) { - onMessageCallback = block + @Test + fun `stale onClose from a previous transport does not tear down the successor connection`() = runTest { + protocol.connect(transport) + val staleCloseCallback = transport.closeCallback ?: error("onClose not registered") + + protocol.close() // disconnect first transport (fires its own doClose) + val second = RecordingTransport() + protocol.connect(second) // reconnect + + staleCloseCallback() // late duplicate close signal from transport #1 + + // successor connection must still be alive + protocol.transport shouldBe second } - suspend fun awaitRequest(): JSONRPCRequest { - val message = sentMessages.receive() - return message as? JSONRPCRequest - ?: error("Expected JSONRPCRequest but received ${message::class.simpleName}") + @Test + fun `failed transport start rolls back the connection and allows reconnect`() = runTest { + val failing = object : Transport { + override suspend fun start(): Unit = error("boom") + override suspend fun send(message: JSONRPCMessage, options: TransportSendOptions?) {} + override suspend fun close() {} + override fun onClose(block: () -> Unit) {} + override fun onError(block: (Throwable) -> Unit) {} + override fun onMessage(block: suspend (JSONRPCMessage) -> Unit) {} + } + shouldThrow { protocol.connect(failing) } + protocol.transport shouldBe null // rolled back + protocol.connect(transport) // reconnect succeeds, no "already connected" + protocol.transport shouldBe transport } - suspend fun deliver(message: JSONRPCMessage) { - val callback = onMessageCallback ?: error("onMessage callback not registered") - callback(message) + @Test + fun `request cleans up its handlers when the transport send fails`() = runTest { + // Send fails without closing the connection, so the leak is not masked by doClose(). + val failingSend = object : Transport { + override suspend fun start() {} + override suspend fun send(message: JSONRPCMessage, options: TransportSendOptions?): Unit = + throw IllegalStateException("send failed") + override suspend fun close() {} + override fun onClose(block: () -> Unit) {} + override fun onError(block: (Throwable) -> Unit) {} + override fun onMessage(block: suspend (JSONRPCMessage) -> Unit) {} + } + protocol.connect(failingSend) + + shouldThrow { + protocol.request (PingRequest(), RequestOptions(onProgress = {})) + } + + protocol.responseHandlers.size shouldBe 0 + protocol.progressHandlers.size shouldBe 0 + } + + @Test + fun `connect rejects non-positive maxConcurrentHandlers`() = runTest { + val error = shouldThrow