Skip to content

Commit 11aa3f1

Browse files
committed
fix copyright
1 parent 9925fd4 commit 11aa3f1

31 files changed

+408
-46
lines changed

integrations/mcp/codegen/src/main/java/io/helidon/integrations/mcp/codegen/McpCodegenProvider.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 Oracle and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.helidon.integrations.mcp.codegen;
218

319
import java.util.Set;

integrations/mcp/codegen/src/main/java/io/helidon/integrations/mcp/codegen/McpTypes.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 Oracle and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.helidon.integrations.mcp.codegen;
218

319
import io.helidon.common.types.TypeName;

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,33 @@
2525
*/
2626
@RuntimeType.PrototypedBy(CompletionConfig.class)
2727
public interface Completion extends RuntimeType.Api<CompletionConfig> {
28+
/**
29+
* Create a {@link Completion} instance from its configuration.
30+
*
31+
* @param config completion configuration
32+
* @return completion instance
33+
*/
2834
static Completion create(CompletionConfig config) {
2935
return new CompletionImpl(config.reference(), config.completion());
3036
}
3137

38+
/**
39+
* Create a {@link Completion} instance from its configuration builder.
40+
*
41+
* @param consumer configuration builder
42+
* @return completion instance
43+
*/
3244
static Completion create(Consumer<CompletionConfig.Builder> consumer) {
3345
return CompletionConfig.builder()
3446
.update(consumer)
3547
.build();
3648
}
3749

50+
/**
51+
* Get completion builder.
52+
*
53+
* @return builder
54+
*/
3855
static CompletionConfig.Builder builder() {
3956
return CompletionConfig.builder();
4057
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 Oracle and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.helidon.integrations.mcp.server;
218

319
import java.util.function.Function;

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 Oracle and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.helidon.integrations.mcp.server;
218

319
import java.util.function.Function;

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,6 @@ JsonObjectBuilder json() {
5454
.addAll(root.json());
5555
}
5656

57-
// public static SchemaArray.Builder arrayBuilder() {
58-
// return SchemaArray.builder();
59-
// }
60-
//
61-
// public static SchemaNumber.Builder numberBuilder() {
62-
// return SchemaNumber.builder();
63-
// }
64-
//
65-
// public static SchemaString.Builder stringBuilder() {
66-
// return SchemaString.builder();
67-
// }
68-
//
69-
// public static SchemaBoolean.Builder booleanBuilder() {
70-
// return SchemaBoolean.builder();
71-
// }
72-
7357
public static class Builder {
7458
private String id;
7559
private String title;

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

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,47 @@ public interface McpLogger {
7777
*/
7878
void alert(String message);
7979

80-
80+
/**
81+
* Create a {@link McpLogger} instance by name.
82+
*
83+
* @param name logger name
84+
* @return logger instance
85+
*/
8186
static McpLogger getLogger(String name) {
8287
return new McpLoggerImpl(name);
8388
}
8489

90+
/**
91+
* Logger log levels
92+
*/
8593
enum Level {
94+
/**
95+
* Debug
96+
*/
8697
DEBUG,
98+
/**
99+
* Info
100+
*/
87101
INFO,
102+
/**
103+
* Notice
104+
*/
88105
NOTICE,
106+
/**
107+
* Warning
108+
*/
89109
WARNING,
110+
/**
111+
* Error
112+
*/
90113
ERROR,
114+
/**
115+
* Critical
116+
*/
91117
CRITICAL,
118+
/**
119+
* Alert
120+
*/
92121
ALERT
93122
}
94123
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import jakarta.json.JsonValue;
3636

3737
/**
38-
* Mcp parameters provided to {@link Tool} and {@link Prompt}.
38+
* Mcp client parameters provided to {@link Tool} and {@link Prompt}.
3939
*/
4040
public class McpParameters {
4141
private static final Mappers MAPPERS = Mappers.create();

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,33 @@
3131
@RuntimeType.PrototypedBy(PromptConfig.class)
3232
public interface Prompt extends Jsonable, RuntimeType.Api<PromptConfig> {
3333

34+
/**
35+
* Create a prompt instance from its configuration.
36+
*
37+
* @param config prompt configuration
38+
* @return prompt
39+
*/
3440
static Prompt create(PromptConfig config) {
3541
return new PromptImpl(config.name(), config.description(), config.arguments(), config.prompt());
3642
}
3743

44+
/**
45+
* Create a prompt instance from its configuration builder.
46+
*
47+
* @param consumer configuration builder
48+
* @return prompt
49+
*/
3850
static Prompt create(Consumer<PromptConfig.Builder> consumer) {
3951
return PromptConfig.builder()
4052
.update(consumer)
4153
.build();
4254
}
4355

56+
/**
57+
* Get a prompt builder.
58+
*
59+
* @return builder
60+
*/
4461
static PromptConfig.Builder builder() {
4562
return PromptConfig.builder();
4663
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright (c) 2025 Oracle and/or its affiliates.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package io.helidon.integrations.mcp.server;
18+
19+
/**
20+
* {@link PromptArgument} factory.
21+
*/
22+
public class PromptArguments {
23+
private PromptArguments() {
24+
}
25+
26+
/**
27+
* Create a {@link PromptArgument} instance.
28+
*
29+
* @param name name
30+
* @param description description
31+
* @param required required
32+
* @return prompt argument instance
33+
*/
34+
public static PromptArgument create(String name, String description, boolean required) {
35+
return PromptArgument.builder()
36+
.name(name)
37+
.description(description)
38+
.required(required)
39+
.build();
40+
}
41+
42+
/**
43+
* Create a {@link PromptArgument} instance, required by default.
44+
*
45+
* @param name name
46+
* @param description description
47+
* @return prompt argument instance
48+
*/
49+
public static PromptArgument create(String name, String description) {
50+
return create(name, description, true);
51+
}
52+
53+
/**
54+
* Create a {@link PromptArgument} instance, required, without description.
55+
*
56+
* @param name name
57+
* @return prompt argument instance
58+
*/
59+
public static PromptArgument create(String name) {
60+
return create(name, "none", true);
61+
}
62+
}

0 commit comments

Comments
 (0)