feat(studio): coordinate integrated AI activity and internal language services
Start project-owned language and authenticated MCP services when opening a project, reusing the embedded LSP backend without a desktop TCP listener. Keep editor overlays separate from saved-file MCP queries. Reserve conflicting editing before ACP prompt delivery and retain protection through native/tool termination, runtime cleanup and document refresh. Preserve drafts on rejected admission, provide cleanup/preparation recovery, distinguish terminal outcomes and redact permission previews. Add lifecycle, language parity, activity, composition and UI regressions and update the canonical Studio contracts. Keep distribution update alignment as the separate WRK-002A follow-up. Validation: complete make -C tooling verify PASSED in 20261127T035822Z-ec5d9266 (1172 unit, 131 compiler fixture, 31 headless tests). Opt-in real-model and native AI-view qualification are outside that gate. Work: WRK-0029; decision: DEC-0001.
This commit is contained in:
@@ -43,11 +43,8 @@ import p.studio.core.project.ProjectLocalStudioStateStore;
|
||||
import p.studio.api.project.ProjectWorkspaceInitializer;
|
||||
import p.studio.core.project.PackerProjectWorkspaceInitializer;
|
||||
import p.studio.api.session.ProjectSessionFactory;
|
||||
import p.studio.app.lsp.LspLifecycleAdapter;
|
||||
import p.studio.core.session.DefaultProjectSessionFactory;
|
||||
import p.studio.core.session.LspLifecyclePort;
|
||||
import p.studio.lsp.api.LspServerLifecycle;
|
||||
import p.studio.lsp.services.LspServerLifecycleImpl;
|
||||
import p.studio.ui.javafx.events.StudioEventBus;
|
||||
import p.studio.ui.javafx.utilities.ThemeService;
|
||||
import p.studio.ui.javafx.utilities.i18n.I18nService;
|
||||
@@ -258,13 +255,10 @@ public class StudioApplicationConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
LspServerLifecycle lspServerLifecycle(p.animation.GlyphBankLayoutSource layouts,StudioEventBus events) {
|
||||
return new LspServerLifecycleImpl(layouts,(root,uuid,pointer)->events.publish(new p.studio.ui.javafx.events.StudioAnimationOriginRequestedEvent(root,uuid,pointer)));
|
||||
}
|
||||
|
||||
@Bean
|
||||
LspLifecyclePort lspLifecyclePort(LspServerLifecycle lifecycle) {
|
||||
return new LspLifecycleAdapter(lifecycle);
|
||||
p.studio.app.lsp.InProcessLanguageWorkspace projectLanguageWorkspace(p.animation.GlyphBankLayoutSource layouts,StudioEventBus events,
|
||||
ProjectCatalog catalog,p.studio.api.automation.ProjectKnowledge knowledge,ObjectMapper mapper) {
|
||||
return new p.studio.app.lsp.InProcessLanguageWorkspace(layouts,
|
||||
(root,uuid,pointer)->events.publish(new p.studio.ui.javafx.events.StudioAnimationOriginRequestedEvent(root,uuid,pointer)),catalog,knowledge,mapper);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -337,7 +331,8 @@ public class StudioApplicationConfiguration {
|
||||
ProjectActivityHistoryStore activityHistoryStore, p.studio.api.automation.AgentConnectionGuide connectionGuide,
|
||||
p.studio.api.assets.animation.AnimationService animationService,ObjectMapper mapper,OperationExecutor operations,
|
||||
p.studio.core.project.ProjectAccessRegistry access,ProjectLocalStudioSetupStore setupStore,
|
||||
p.studio.api.preferences.RuntimeSettingsStore runtimeSettings,p.studio.api.preferences.AgentSettingsStore agentSettings) {
|
||||
p.studio.api.preferences.RuntimeSettingsStore runtimeSettings,p.studio.api.preferences.AgentSettingsStore agentSettings,
|
||||
p.studio.api.automation.AgentIntegrationPreparation preparation) {
|
||||
var factory = new StudioUiFactory(projectCatalog, knownProjects, languageCatalog, projectSessionFactory,
|
||||
executionControllerFactory, projectWorkspaceInitializer, studioExecutor, i18n, theme, eventBus, shipper,
|
||||
assetCatalog, assetCommands, assetPacking, assetDetails, assetCreationCatalog, assetMetadataService,
|
||||
@@ -347,7 +342,12 @@ public class StudioApplicationConfiguration {
|
||||
factory.setAnimationService(animationService);
|
||||
factory.setRuntimeSettings(runtimeSettings);
|
||||
factory.setAgentSettings(agentSettings);
|
||||
factory.setAgentConnections(root->new p.studio.app.acp.CodexAcpConnection(root,mapper));
|
||||
factory.setAgentConnections(root->new p.studio.core.session.ProjectAgentConnection(
|
||||
new p.studio.app.acp.CodexAcpConnection(root,mapper),access.requireAutomation(root),
|
||||
()->setupStore.load(projectCatalog.openProject(root)).agentIntegration().enabled()?preparation.status(root):
|
||||
new p.studio.api.automation.AgentIntegrationPreparation.Result(false,"Project assistant integration is disabled"),
|
||||
()->setupStore.load(projectCatalog.openProject(root)).agentIntegration().enabled()?preparation.prepare(root):
|
||||
new p.studio.api.automation.AgentIntegrationPreparation.Result(false,"Project assistant integration is disabled"),studioExecutor));
|
||||
factory.enableInteractive(new p.studio.core.execution.DefaultExecutionControllerFactory(shipper,
|
||||
new p.studio.app.runtime.studio.StudioRuntimeGateway(mapper),operations,access),
|
||||
(project,setup)->{try(var lease=access.enterManual(project.rootPath())){setupStore.save(project,setup);}});
|
||||
@@ -366,9 +366,8 @@ public class StudioApplicationConfiguration {
|
||||
}
|
||||
|
||||
@Bean
|
||||
p.studio.core.language.LanguageQueryPort automationLanguagePort(LspServerLifecycle lifecycle, ProjectCatalog catalog,
|
||||
p.studio.api.automation.ProjectKnowledge knowledge, ObjectMapper mapper) {
|
||||
return new p.studio.app.lsp.AutomationLspQueries(lifecycle, catalog, knowledge, mapper);
|
||||
p.studio.core.language.LanguageQueryPort automationLanguagePort(p.studio.app.lsp.InProcessLanguageWorkspace workspace) {
|
||||
return workspace.savedQueries();
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
||||
Reference in New Issue
Block a user