feat(studio): integrate project MCP setup and lifecycle
Intrepid/Prometeu/Studio/pipeline/pr-master This commit looks good
Test / Build skipped: 15, passed: 926
Intrepid/Prometeu/Studio/pipeline/head This commit looks good

This commit is contained in:
2026-09-29 19:24:28 +01:00
parent 97cf5e1919
commit d0737df0ac
48 changed files with 2048 additions and 225 deletions
@@ -0,0 +1,28 @@
package p.studio.api.automation;
import java.nio.file.Path;
/** Required grant participant. Preparation/publication may do IO; activation/invalidation must not. */
public interface AutomationConnectionLifecycle {
Publication prepare(Path projectRoot) throws Exception;
final class OwnershipConflict extends Exception {
public OwnershipConflict() { super("Another Studio instance owns this project's connection. Reclaim or close it before granting here."); }
}
interface Publication extends AutoCloseable {
void publish() throws Exception;
void activate();
void invalidate();
@Override void close() throws Exception;
}
static AutomationConnectionLifecycle none() {
return root -> new Publication() {
public void publish() { }
public void activate() { }
public void invalidate() { }
public void close() { }
};
}
}