expose task control and deduplicated operations through MCP
This commit is contained in:
@@ -176,7 +176,7 @@ public class StudioApplicationConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
Shipper shipper(CompilerBuildGateway compiler, PackerWorkspaceService packer, ObjectMapper mapper,
|
||||
StudioShipperService shipper(CompilerBuildGateway compiler, PackerWorkspaceService packer, ObjectMapper mapper,
|
||||
OperationExecutor operations, p.studio.api.automation.ProjectAccess access) {
|
||||
return new StudioShipperService(compiler, packer, mapper, operations, access);
|
||||
}
|
||||
@@ -313,12 +313,20 @@ public class StudioApplicationConfiguration {
|
||||
return new p.studio.core.language.TaskLanguageQueries(projects, language);
|
||||
}
|
||||
|
||||
@Bean
|
||||
p.studio.api.automation.TaskTools taskTools(p.studio.core.project.ProjectAccessRegistry projects,
|
||||
ProjectCatalog catalog, p.studio.core.shipper.SavedProjectPreparation shipper,
|
||||
java.util.Optional<p.studio.core.runtime.HeadlessGateway> headless) {
|
||||
return new p.studio.core.session.DefaultTaskTools(projects, catalog, shipper, headless);
|
||||
}
|
||||
|
||||
@Bean
|
||||
p.studio.app.mcp.McpToolRegistry mcpToolRegistry(p.studio.app.mcp.McpToolCatalog catalog, ObjectMapper mapper,
|
||||
p.studio.api.automation.ProjectKnowledge knowledge, p.studio.api.automation.LanguageQueries language) {
|
||||
// Control/build/runtime/operation providers are connected in PLN-0139 step 20.
|
||||
p.studio.api.automation.ProjectKnowledge knowledge, p.studio.api.automation.LanguageQueries language,
|
||||
p.studio.api.automation.TaskTools tasks, java.util.Optional<p.studio.core.runtime.HeadlessGateway> headless) {
|
||||
var handlers = new java.util.LinkedHashMap<>(p.studio.app.mcp.McpProjectKnowledgeTools.handlers(knowledge, mapper));
|
||||
handlers.putAll(p.studio.app.mcp.McpLanguageTools.handlers(language, mapper));
|
||||
handlers.putAll(p.studio.app.mcp.McpTaskTools.handlers(tasks, mapper, headless.isPresent()));
|
||||
return new p.studio.app.mcp.McpToolRegistry(catalog, mapper, handlers);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user