22 lines
907 B
Java
22 lines
907 B
Java
package p.studio.api.automation;
|
|
|
|
import p.studio.api.operation.OperationSubscription;
|
|
import java.nio.file.Path;
|
|
import java.util.Optional;
|
|
|
|
/** Connection assistance only. Copying credentials never grants project authority. */
|
|
public interface AgentConnectionGuide {
|
|
Optional<String> endpoint();
|
|
/** Explicit secret-bearing export for the clipboard; never persist or log this string. */
|
|
String configuration(Path openProjectRoot);
|
|
OperationSubscription subscribe(Runnable changed);
|
|
|
|
static AgentConnectionGuide unavailable() {
|
|
return new AgentConnectionGuide() {
|
|
public Optional<String> endpoint() { return Optional.empty(); }
|
|
public String configuration(Path root) { throw new IllegalStateException("Connection unavailable"); }
|
|
public OperationSubscription subscribe(Runnable changed) { changed.run(); return () -> {}; }
|
|
};
|
|
}
|
|
}
|