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
+7
View File
@@ -79,6 +79,13 @@ export function activate(context: vscode.ExtensionContext): void {
output = vscode.window.createOutputChannel("Prometeu LSP");
output.appendLine("Prometeu VS Code extension activated.");
context.subscriptions.push(externalSources,
vscode.languages.registerCodeLensProvider({ scheme: externalScheme, language: "pbs" }, {
provideCodeLenses: document => externalSources.originLenses(document)
}),
vscode.commands.registerCommand("prometeu.openAnimationOrigin", async (uri: vscode.Uri, byteOffset: number) => {
try { await externalSources.openAnimationOrigin(uri, byteOffset); }
catch (error) { void vscode.window.showErrorMessage(String(error)); }
}),
vscode.workspace.registerTextDocumentContentProvider(externalScheme, externalSources),
vscode.window.onDidChangeActiveTextEditor(() => externalSources.refreshStatus()),
vscode.workspace.onDidOpenTextDocument(document => void externalSources.opened(document)),
+22 -1
View File
@@ -3,7 +3,7 @@ import { LanguageClient } from "vscode-languageclient/node";
export const externalScheme = "prometeu-source";
export type ExternalContent = {
descriptor: { uri: string; revision: string; origin: string; name: string; languageId: string; readOnly: true };
descriptor: { uri: string; revision: string; origin: string; name: string; languageId: string; readOnly: true; origins?: { startOffset: number; endOffset: number; definitionPath: string; jsonPointer: string; assetUuid: string }[] };
text: string;
};
@@ -74,6 +74,27 @@ export class ExternalSources implements vscode.TextDocumentContentProvider, vsco
return content.text;
}
originLenses(document: vscode.TextDocument): vscode.CodeLens[] {
if (!this.canQuery(document)) return [];
const content = this.documents.get(document.uri.toString());
return (content?.descriptor.origins ?? []).map(origin => {
const offset = Buffer.from(document.getText(), "utf8").subarray(0, origin.startOffset).toString("utf8").length;
const position = document.positionAt(offset);
return new vscode.CodeLens(new vscode.Range(position, position), {
title: "Open animation definition in Studio", command: "prometeu.openAnimationOrigin",
arguments: [document.uri, origin.startOffset]
});
});
}
async openAnimationOrigin(uri: vscode.Uri, byteOffset: number): Promise<void> {
const document = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString());
if (!document || !this.canQuery(document) || !this.client || !this.consumerId)
throw new Error("Animation source unavailable: navigate again to obtain the current revision.");
await this.client.sendRequest<void>("prometeu/openAnimationOrigin",
{ consumerId: this.consumerId, uri: uri.toString(), offset: byteOffset });
}
async opened(document: vscode.TextDocument): Promise<void> {
if (document.uri.scheme !== externalScheme) return;
const content = this.documents.get(document.uri.toString());