feat(LocalRunnerClient): support registering CommonMcp

This commit is contained in:
2026-01-08 22:28:12 +08:00
parent 4f36c0dd2d
commit 8ca475beeb

View File

@@ -105,9 +105,22 @@ public class LocalRunnerClient extends RunnerClient {
}
registerDescMcp();
registerDynamicActionMcp();
registerCommonMcp();
setupShutdownHook();
}
private void registerCommonMcp() {
val ctx = new WatchContext(Path.of(MCP_SERVER_PATH), watchService);
val common = new LocalWatchEventProcessor.Common(existedMetaActions, mcpClients, ctx);
new LocalWatchServiceBuild.BuildRegistry(ctx)
.initialLoad(common.buildLoad())
.registerCreate(common.buildCreate())
.registerDelete(common.buildDelete())
.registerModify(common.buildModify())
.registerOverflow(common.buildOverflow())
.commit(executor);
}
private void registerDescMcp() {
InProcessMcpTransport.Pair pair = InProcessMcpTransport.pair();
McpSchema.ServerCapabilities serverCapabilities = McpSchema.ServerCapabilities.builder()