Skip to content

Commit df20d40

Browse files
Update imports after server.component package move
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 99776c1 commit df20d40

10 files changed

Lines changed: 22 additions & 450 deletions

File tree

docs/components.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Handlers must **return** `McpCompleteCompletion` and take **exactly one** parame
152152

153153
```java
154154
import com.github.thought2code.mcp.annotated.annotation.McpResourceCompletion;
155-
import com.github.thought2code.mcp.annotated.component.completion.McpCompleteCompletion;
155+
import com.github.thought2code.mcp.annotated.server.component.completion.McpCompleteCompletion;
156156
import io.modelcontextprotocol.spec.McpSchema;
157157
import java.nio.file.Files;
158158
import java.nio.file.Path;
@@ -188,7 +188,7 @@ public class MyCompletions {
188188

189189
```java
190190
import com.github.thought2code.mcp.annotated.annotation.McpPromptCompletion;
191-
import com.github.thought2code.mcp.annotated.component.completion.McpCompleteCompletion;
191+
import com.github.thought2code.mcp.annotated.server.component.completion.McpCompleteCompletion;
192192
import io.modelcontextprotocol.spec.McpSchema;
193193
import java.util.List;
194194

src/main/java/com/github/thought2code/mcp/annotated/annotation/McpPromptCompletion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.github.thought2code.mcp.annotated.annotation;
22

3-
import com.github.thought2code.mcp.annotated.component.completion.McpCompleteCompletion;
3+
import com.github.thought2code.mcp.annotated.server.component.completion.McpCompleteCompletion;
44
import com.github.thought2code.mcp.annotated.util.StringHelper;
55
import java.lang.annotation.ElementType;
66
import java.lang.annotation.Retention;

src/main/java/com/github/thought2code/mcp/annotated/annotation/McpResourceCompletion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.github.thought2code.mcp.annotated.annotation;
22

3-
import com.github.thought2code.mcp.annotated.component.completion.McpCompleteCompletion;
3+
import com.github.thought2code.mcp.annotated.server.component.completion.McpCompleteCompletion;
44
import java.lang.annotation.ElementType;
55
import java.lang.annotation.Retention;
66
import java.lang.annotation.RetentionPolicy;

src/main/java/com/github/thought2code/mcp/annotated/compiler/McpToolModelProcessor.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import com.github.thought2code.mcp.annotated.annotation.McpResourceCompletion;
1010
import com.github.thought2code.mcp.annotated.annotation.McpTool;
1111
import com.github.thought2code.mcp.annotated.annotation.McpToolParam;
12-
import com.github.thought2code.mcp.annotated.component.completion.McpCompleteCompletion;
12+
import com.github.thought2code.mcp.annotated.server.component.completion.McpCompleteCompletion;
1313
import com.github.thought2code.mcp.annotated.util.StringHelper;
1414
import java.io.IOException;
1515
import java.io.Writer;
@@ -59,7 +59,7 @@ public final class McpToolModelProcessor extends AbstractProcessor {
5959

6060
private static final String GENERATED_PACKAGE = "com.github.thought2code.mcp.annotated.generated";
6161
private static final String PROVIDER_INTERFACE =
62-
"com.github.thought2code.mcp.annotated.component.spi.ComponentModelProvider";
62+
"com.github.thought2code.mcp.annotated.server.component.spi.ComponentModelProvider";
6363
private static final String PROVIDER_SERVICE_FILE = "META-INF/services/" + PROVIDER_INTERFACE;
6464

6565
private final List<ExecutableElement> tools = new ArrayList<>();
@@ -348,21 +348,23 @@ private void writeProvider() throws IOException {
348348
writer.write("package " + GENERATED_PACKAGE + ";\n\n");
349349
writer.write("import com.github.thought2code.mcp.annotated.McpApplicationContext;\n");
350350
writer.write(
351-
"import com.github.thought2code.mcp.annotated.component.completion.CompletionDefinition;\n");
351+
"import com.github.thought2code.mcp.annotated.server.component.completion.CompletionDefinition;\n");
352352
writer.write(
353-
"import com.github.thought2code.mcp.annotated.component.completion.CompletionInvoker;\n");
353+
"import com.github.thought2code.mcp.annotated.server.component.completion.CompletionInvoker;\n");
354354
writer.write(
355-
"import com.github.thought2code.mcp.annotated.component.prompt.PromptDefinition;\n");
355+
"import com.github.thought2code.mcp.annotated.server.component.prompt.PromptDefinition;\n");
356356
writer.write(
357-
"import com.github.thought2code.mcp.annotated.component.prompt.PromptInvoker;\n");
357+
"import com.github.thought2code.mcp.annotated.server.component.prompt.PromptInvoker;\n");
358358
writer.write(
359-
"import com.github.thought2code.mcp.annotated.component.resource.ResourceDefinition;\n");
359+
"import com.github.thought2code.mcp.annotated.server.component.resource.ResourceDefinition;\n");
360360
writer.write(
361-
"import com.github.thought2code.mcp.annotated.component.resource.ResourceInvoker;\n");
361+
"import com.github.thought2code.mcp.annotated.server.component.resource.ResourceInvoker;\n");
362362
writer.write(
363-
"import com.github.thought2code.mcp.annotated.component.spi.ComponentModelProvider;\n");
364-
writer.write("import com.github.thought2code.mcp.annotated.component.tool.ToolDefinition;\n");
365-
writer.write("import com.github.thought2code.mcp.annotated.component.tool.ToolInvoker;\n");
363+
"import com.github.thought2code.mcp.annotated.server.component.spi.ComponentModelProvider;\n");
364+
writer.write(
365+
"import com.github.thought2code.mcp.annotated.server.component.tool.ToolDefinition;\n");
366+
writer.write(
367+
"import com.github.thought2code.mcp.annotated.server.component.tool.ToolInvoker;\n");
366368
writer.write("import com.github.thought2code.mcp.annotated.enums.McpServerError;\n");
367369
writer.write("import com.github.thought2code.mcp.annotated.reflect.Invocation;\n");
368370
writer.write("import com.github.thought2code.mcp.annotated.util.TypeConverter;\n");

src/main/java/com/github/thought2code/mcp/annotated/server/McpServerBase.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package com.github.thought2code.mcp.annotated.server;
22

33
import com.github.thought2code.mcp.annotated.McpApplicationContext;
4-
import com.github.thought2code.mcp.annotated.component.completion.CompletionSupport;
5-
import com.github.thought2code.mcp.annotated.component.prompt.PromptRegistration;
6-
import com.github.thought2code.mcp.annotated.component.resource.ResourceRegistration;
7-
import com.github.thought2code.mcp.annotated.component.tool.ToolRegistration;
84
import com.github.thought2code.mcp.annotated.configuration.McpServerCapabilities;
95
import com.github.thought2code.mcp.annotated.configuration.McpServerChangeNotification;
106
import com.github.thought2code.mcp.annotated.configuration.McpServerConfiguration;
117
import com.github.thought2code.mcp.annotated.enums.ServerMode;
128
import com.github.thought2code.mcp.annotated.enums.ServerType;
9+
import com.github.thought2code.mcp.annotated.server.component.completion.CompletionSupport;
10+
import com.github.thought2code.mcp.annotated.server.component.prompt.PromptRegistration;
11+
import com.github.thought2code.mcp.annotated.server.component.resource.ResourceRegistration;
12+
import com.github.thought2code.mcp.annotated.server.component.tool.ToolRegistration;
1313
import com.github.thought2code.mcp.annotated.util.InetHelper;
1414
import io.modelcontextprotocol.server.McpAsyncServer;
1515
import io.modelcontextprotocol.server.McpSyncServer;

src/test/java/com/github/thought2code/mcp/annotated/component/completion/CompletionSupportTest.java

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

src/test/java/com/github/thought2code/mcp/annotated/component/prompt/PromptRegistrationTest.java

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

0 commit comments

Comments
 (0)