feat(pbs): add sprite animation and shared Studio authoring

Implement DEC-0084 with factory-only Sprite/Animator structs, complete result
lowering, validated animation sidecars, generated PBS factories and JavaFX/MCP
authoring through shared services.

Qualify native dev/release with ordinary and optimized producers, zero-allocation
playback, private-cycle reclamation, canonical Composer pixels, installed JARs
and JavaFX lifecycle. Preserve the runtime checkout and existing host ABI.
This commit is contained in:
2026-11-05 15:16:07 +00:00
parent 1d8b8c2101
commit bf31184d4d
151 changed files with 4823 additions and 98 deletions
+2
View File
@@ -1,3 +1,5 @@
plugins {
id("gradle.java-library-conventions")
}
dependencies { api(project(":prometeu-animation")) }
@@ -12,8 +12,11 @@ public record AssetSummary(
AssetFamily family,
Path root,
boolean preload,
boolean hasDiagnostics) {
boolean hasDiagnostics, String assetUuid) {
public AssetSummary(AssetReference reference,String name,AssetRegistrationState registrationState,AssetBuildParticipation buildParticipation,Integer assetId,AssetFamily family,Path root,boolean preload,boolean hasDiagnostics) {
this(reference,name,registrationState,buildParticipation,assetId,family,root,preload,hasDiagnostics,null);
}
public AssetSummary {
Objects.requireNonNull(reference, "reference");
name = Objects.requireNonNull(name, "name").trim();
@@ -0,0 +1,26 @@
package p.studio.api.assets.animation;
import p.animation.*;
import p.studio.api.project.ProjectReference;
import p.studio.api.automation.CanonicalCapture;
import java.util.*;
public interface AnimationService {
enum Operation { LIST, GET, VALIDATE, PREVIEW, SAVE, DELETE, PREPARE_REBIND, APPLY_REBIND }
record Request(Operation operation,ProjectReference project,UUID assetUuid,String animatorId,String clipName,
Long elapsedTicks,Integer paletteId,String expectedRevision,AnimationDocument document,String proposalHash,String expectedBankRevision) {
public Request { Objects.requireNonNull(operation);Objects.requireNonNull(project); }
public static Request get(ProjectReference project,UUID bank){return new Request(Operation.GET,project,bank,null,null,null,null,null,null,null,null);}
public static Request save(ProjectReference project,UUID bank,String revision,AnimationDocument document){return new Request(Operation.SAVE,project,bank,null,null,null,null,revision,document,null,null);}
}
record View(UUID assetUuid,String revision,String json,AnimationDocument document,List<AnimationDocument.Binding> availableBindings,
String bankRevision,List<AnimationDiagnostic> diagnostics) {
public View { availableBindings=List.copyOf(availableBindings);diagnostics=List.copyOf(diagnostics); }
}
record Preview(UUID assetUuid,String documentRevision,AnimationTimeline.Observation observation,long elapsedTicks,int paletteId,CanonicalCapture image) {}
record Response(View view,List<View> definitions,Preview preview,AnimationRebind.Proposal proposal,List<AnimationDiagnostic> diagnostics) {
public Response { definitions=List.copyOf(definitions);diagnostics=List.copyOf(diagnostics); }
public static Response of(View view){return new Response(view,List.of(),null,null,view.diagnostics());}
}
Response execute(Request request);
}
@@ -0,0 +1,8 @@
package p.studio.api.assets.animation;
import java.nio.file.Path;
import java.util.function.Function;
import p.studio.api.project.ProjectReference;
/** Task adapter resolves the project only after existing session authority admission. */
public interface AnimationTasks {
AnimationService.Response execute(Path root,String taskId,Function<ProjectReference,AnimationService.Request> request);
}
@@ -17,8 +17,11 @@ public record AssetWorkspaceAssetSummary(
AssetStudioGlyphSpecialization glyphSpecialization,
Path assetRoot,
boolean preload,
boolean hasDiagnostics) {
boolean hasDiagnostics, String assetUuid) {
public AssetWorkspaceAssetSummary(AssetReference assetReference,String assetName,AssetWorkspaceAssetState state,AssetWorkspaceBuildParticipation buildParticipation,Integer assetId,AssetFamily assetFamily,AssetStudioGlyphSpecialization glyphSpecialization,Path assetRoot,boolean preload,boolean hasDiagnostics) {
this(assetReference,assetName,state,buildParticipation,assetId,assetFamily,glyphSpecialization,assetRoot,preload,hasDiagnostics,null);
}
public AssetWorkspaceAssetSummary {
Objects.requireNonNull(assetReference, "assetReference");
assetName = Objects.requireNonNull(assetName, "assetName").trim();
@@ -14,7 +14,7 @@ public record AutomationFailure(Code code, String message, Map<String, Object> r
UNSUPPORTED_LANGUAGE, UNSUPPORTED_CAPABILITY, REFERENCE_NOT_FOUND, DOCUMENTATION_UNAVAILABLE,
OUTSIDE_PROJECT_SCOPE, READ_ONLY_SCOPE, OPERATION_NOT_FOUND, CLIENT_REQUEST_CONFLICT,
RUNTIME_UNAVAILABLE, RUNTIME_INCOMPATIBLE, SESSION_NOT_FOUND, BUILD_NOT_FOUND,
NO_FRAME_AVAILABLE, LIMIT_EXCEEDED, NOT_CANCELABLE, MEMCARD_ERROR, INFRASTRUCTURE_FAILURE
ANIMATION_INVALID, ANIMATION_CONFLICT, NO_FRAME_AVAILABLE, LIMIT_EXCEEDED, NOT_CANCELABLE, MEMCARD_ERROR, INFRASTRUCTURE_FAILURE
}
public AutomationFailure {
Objects.requireNonNull(code); Objects.requireNonNull(message);