Skip to content

Commit 4f23aa0

Browse files
committed
Save work
1 parent e8b8c3e commit 4f23aa0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1899
-1228
lines changed

docs/src/main/asciidoc/mp/guides/upgrade_3x.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ NOTE: See xref:{rootdir}/mp/integrations/oci.adoc#oci-compatibility[Resolving co
166166
167167
Deprecations in the following classes:
168168
169-
* `ResourceTemp` - old configuration approach (since 2.0)
169+
* `Resource` - old configuration approach (since 2.0)
170170
* `ThreadPoolSupplier` - Named thread pools (since 2.4.2)
171171
172172
More information in the following link:https://github.com/oracle/helidon/issues/4363[Task].

docs/src/main/asciidoc/mp/testing/testing-common.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ include::{sourcedir}/mp/testing/TestingSnippets.java[tag=snippet_16, indent=0]
325325
----
326326
<1> CDI discovery is disabled
327327
<2> Add JAXRS (Jersey) support
328-
<3> Add `MyResource` to the CDI container
328+
<3> Add `WeatherResource` to the CDI container
329329
// end::examples[]
330330
331331
== Mock Support

docs/src/main/asciidoc/se/guides/upgrade.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ include::{sourcedir}/se/guides/UpgradeSnippets.java[tag=snippet_3, indent=0]
8383
8484
== Resource Class When Loaded from Config
8585
86-
The configuration approach to `ResourceTemp` class was using prefixes which was not aligned with our approach to configuration.
86+
The configuration approach to `Resource` class was using prefixes which was not aligned with our approach to configuration.
8787
All usages were refactored as follows:
8888
89-
1. The `ResourceTemp` class expects a config node `resource` that will be used to read it
89+
1. The `Resource` class expects a config node `resource` that will be used to read it
9090
2. The feature set remains unchanged - we support path, classpath, url, content as plain text, and content as base64
9191
3. Classes using resources are changed as well, such as `KeyConfig` - see details below
9292
@@ -121,14 +121,14 @@ The new JSON MediaSupport classes are:
121121
122122
== Security: OidcConfig
123123
124-
Configuration has been updated to use the new `ResourceTemp` approach:
124+
Configuration has been updated to use the new `Resource` approach:
125125
126126
1. `oidc-metadata.resource` is the new key for loading `oidc-metadata` from local resource
127127
2. `sign-jwk.resource` is the new key for loading signing JWK resource
128128
129129
== Security: JwtProvider and JwtAuthProvider
130130
131-
Configuration has been updated to use the new `ResourceTemp` approach:
131+
Configuration has been updated to use the new `Resource` approach:
132132
133133
1. `jwk.resource` is the new key for loading JWK for verifying signatures
134134
2. `jwt.resource` is also used for outbound as key for loading JWK for signing tokens
@@ -172,7 +172,7 @@ pem:
172172
173173
== GrpcTlsDescriptor
174174
175-
Configuration has been updated to use the new `ResourceTemp` approach:
175+
Configuration has been updated to use the new `Resource` approach:
176176
177177
1. `tls-cert.resource` is the new key for certificate
178178
2. `tls-key.resource` is the new key for private key

docs/src/main/asciidoc/se/guides/upgrade_3x.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ NOTE: See xref:{rootdir}/se/integrations/oci.adoc#oci-compatibility[Resolving co
144144
145145
Deprecations in the following classes:
146146
147-
* `ResourceTemp` - old configuration approach (since 2.0)
147+
* `Resource` - old configuration approach (since 2.0)
148148
* `ThreadPoolSupplier` - Named thread pools (since 2.4.2)
149149
150150
More information in the following link:https://github.com/oracle/helidon/issues/4363[Task].

integrations/mcp/server/pom.xml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
<artifactId>helidon-integrations-mcp-server</artifactId>
3131

3232
<dependencies>
33-
<dependency>
34-
<groupId>io.modelcontextprotocol.sdk</groupId>
35-
<artifactId>mcp</artifactId>
36-
<version>0.8.1</version>
37-
</dependency>
3833
<dependency>
3934
<groupId>io.helidon.webserver</groupId>
4035
<artifactId>helidon-webserver</artifactId>
@@ -43,18 +38,14 @@
4338
<groupId>io.helidon.webserver</groupId>
4439
<artifactId>helidon-webserver-sse</artifactId>
4540
</dependency>
46-
<dependency>
47-
<groupId>io.helidon.webclient</groupId>
48-
<artifactId>helidon-webclient</artifactId>
49-
</dependency>
5041
<dependency>
5142
<groupId>io.helidon.http.media</groupId>
5243
<artifactId>helidon-http-media-jackson</artifactId>
5344
</dependency>
45+
<!-- TODO - To be removed -->
5446
<dependency>
55-
<groupId>io.helidon.logging</groupId>
56-
<artifactId>helidon-logging-jul</artifactId>
57-
<scope>runtime</scope>
47+
<groupId>io.helidon.webclient</groupId>
48+
<artifactId>helidon-webclient</artifactId>
5849
</dependency>
5950
<dependency>
6051
<groupId>io.helidon.webserver.testing.junit5</groupId>

integrations/mcp/server/src/main/java/io/helidon/integrations/mcp/server/BinaryResourceReader.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
import io.helidon.webclient.api.HttpClientResponse;
2020
import io.helidon.webclient.api.WebClient;
2121

22-
import io.modelcontextprotocol.spec.McpSchema;
23-
24-
public class BinaryResourceReader implements ResourceReader {
22+
class BinaryResourceReader implements ResourceReader {
2523

2624
private final String uri;
2725

@@ -30,7 +28,7 @@ public BinaryResourceReader(String uri) {
3028
}
3129

3230
@Override
33-
public McpSchema.ResourceContents read() {
31+
public McpJsonRPC.ResourceContents read() {
3432
if (uri.startsWith("http")) {
3533
return new HttpResourceReader(uri).read();
3634
}
@@ -46,14 +44,14 @@ static class HttpResourceReader implements ResourceReader {
4644
}
4745

4846
@Override
49-
public McpSchema.ResourceContents read() {
47+
public McpJsonRPC.ResourceContents read() {
5048
WebClient client = WebClient.builder()
5149
.baseUri(uri)
5250
.build();
5351
try (HttpClientResponse request = client.get().request()) {
5452
String mimeType = request.headers().get(HeaderNames.CONTENT_TYPE).get();
5553
String data = request.entity().as(String.class);
56-
return new McpSchema.BlobResourceContents(uri, mimeType, data);
54+
return new McpJsonRPC.BlobResourceContents(uri, mimeType, data);
5755
}
5856
}
5957
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package io.helidon.integrations.mcp.server;
22

3-
public enum CapabilitiesTemp {
3+
public enum Capabilities {
44
TOOL_LIST_CHANGED,
55
RESOURCE_LIST_CHANGED,
66
RESOURCE_SUBSCRIBE,
7-
PROMPT_LIST_CHANGED
7+
PROMPT_LIST_CHANGED,
8+
LOGGING
89
}

integrations/mcp/server/src/main/java/io/helidon/integrations/mcp/server/FileResourceReader.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929

3030
import io.helidon.common.media.type.MediaTypes;
3131

32-
import io.modelcontextprotocol.spec.McpSchema;
33-
34-
public class FileResourceReader implements ResourceReader {
32+
class FileResourceReader implements ResourceReader {
3533

3634
private final Path path;
3735
private final String uri;
@@ -42,7 +40,7 @@ public FileResourceReader(String uri) {
4240
}
4341

4442
@Override
45-
public McpSchema.ResourceContents read() {
43+
public McpJsonRPC.ResourceContents read() {
4644
try (FileInputStream fis = new FileInputStream(path.toFile())) {
4745
FileLock lock = null;
4846
try {
@@ -53,7 +51,7 @@ public McpSchema.ResourceContents read() {
5351
try {
5452
try (BufferedReader bufferedReader = Files.newBufferedReader(path, StandardCharsets.UTF_8)) {
5553
String content = bufferedReader.lines().collect(Collectors.joining("\n"));
56-
return new McpSchema.TextResourceContents(uri, MediaTypes.TEXT_PLAIN_VALUE, content);
54+
return new McpJsonRPC.TextResourceContents(uri, MediaTypes.TEXT_PLAIN_VALUE, content);
5755
} catch (IOException e) {
5856
throw new McpException(String.format("Cannot read from path '%s'", path), e);
5957
}

integrations/mcp/server/src/main/java/io/helidon/integrations/mcp/server/Handler.java

Lines changed: 0 additions & 8 deletions
This file was deleted.

integrations/mcp/server/src/main/java/io/helidon/integrations/mcp/server/InputSchema.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ public static Builder builder() {
3232
return new Builder();
3333
}
3434

35-
public String asString() {
36-
return schema.toString();
37-
}
38-
3935
public static class Builder {
4036

4137
private final String type;

0 commit comments

Comments
 (0)