feat(studio): integrate project MCP setup and lifecycle
This commit is contained in:
@@ -230,13 +230,16 @@ public class StudioApplicationConfiguration {
|
||||
@Bean(destroyMethod = "close")
|
||||
DefaultProjectSessionFactory projectSessionFactory(ProjectLocalStudioStateStore stateStore,
|
||||
ProjectLocalStudioSetupStore setupStore, LspLifecyclePort lsp,
|
||||
p.studio.core.project.ProjectAccessRegistry access, OperationExecutor operations) {
|
||||
return new DefaultProjectSessionFactory(stateStore, setupStore, lsp, access, operations);
|
||||
p.studio.core.project.ProjectAccessRegistry access, OperationExecutor operations,
|
||||
p.studio.api.automation.AutomationConnectionLifecycle connections,
|
||||
p.studio.api.automation.AgentIntegrationPreparation preparation) {
|
||||
return new DefaultProjectSessionFactory(stateStore, setupStore, lsp, access, operations, connections, preparation);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ProjectCatalog projectCatalog(ObjectMapper mapper, ProjectLocalStudioSetupStore setupStore) {
|
||||
return new ProjectCatalogService(resolveDefaultProjectsRoot(), mapper, setupStore);
|
||||
ProjectCatalog projectCatalog(ObjectMapper mapper, ProjectLocalStudioSetupStore setupStore,
|
||||
p.studio.api.automation.AgentIntegrationPreparation preparation) {
|
||||
return new ProjectCatalogService(resolveDefaultProjectsRoot(), mapper, setupStore, preparation);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -340,10 +343,19 @@ public class StudioApplicationConfiguration {
|
||||
return new p.studio.app.mcp.LocalMcpServer(mapper, tools);
|
||||
}
|
||||
|
||||
@Bean
|
||||
p.studio.api.automation.AutomationConnectionLifecycle connectionLifecycle(p.studio.app.mcp.LocalMcpServer server, ObjectMapper mapper) {
|
||||
return new p.studio.app.mcp.ProjectConnectionPublisher(server, mapper);
|
||||
}
|
||||
@Bean
|
||||
p.studio.api.automation.AgentIntegrationPreparation agentPreparation(ObjectMapper mapper) {
|
||||
return new p.studio.app.mcp.StudioAgentPreparation(p.studio.app.install.ManagedStudioInstallation.defaultRoot(), mapper);
|
||||
}
|
||||
@Bean
|
||||
p.studio.api.automation.AgentConnectionGuide connectionGuide(p.studio.app.mcp.LocalMcpServer server,
|
||||
p.studio.core.project.ProjectAccessRegistry projects, ObjectMapper mapper) {
|
||||
return new p.studio.app.mcp.McpConnectionGuide(server, projects, mapper);
|
||||
p.studio.core.project.ProjectAccessRegistry projects, ObjectMapper mapper,
|
||||
p.studio.api.automation.AgentIntegrationPreparation preparation) {
|
||||
return new p.studio.app.mcp.McpConnectionGuide(server, projects, mapper, preparation);
|
||||
}
|
||||
|
||||
private static Path resolveDefaultProjectsRoot() {
|
||||
|
||||
Reference in New Issue
Block a user