feat(web): complete product workflow implementation
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-09-06 08:33:27 +08:00
parent 7e3f6da78b
commit 1184a51ddf
39 changed files with 3736 additions and 160 deletions

View File

@@ -4,6 +4,13 @@ export const WEB_ENGINE_CAPABILITY_REGISTRY_SCHEMA = 1 as const;
export type WebEngineCommandType = WebEngineEditCommand["type"];
export type WebEngineCommandRoute = "MAIN_AUTHORITATIVE" | "MAIN_GUARDED" | "LOCAL_HISTORY" | "PREVIEW";
export type WebEngineOperatorCommand = "listBlenderOperators" | "invokeBlenderOperator";
export interface WebEngineOperatorCapability {
readonly route: "MAIN_READ" | "MAIN_AUTHORITATIVE";
readonly implementation: "SOURCE_BACKED";
}
export interface WebEngineCommandCapability {
readonly family: string;
readonly route: WebEngineCommandRoute;
@@ -117,6 +124,12 @@ export const WEB_ENGINE_COMMAND_CAPABILITIES = {
redo: { family: "HISTORY", route: "LOCAL_HISTORY", implementation: "SOURCE_BACKED" },
} satisfies Record<WebEngineCommandType, WebEngineCommandCapability>;
/** Native operators are deliberately a separate registry from edit commands. */
export const WEB_ENGINE_OPERATOR_CAPABILITIES = {
listBlenderOperators: { route: "MAIN_READ", implementation: "SOURCE_BACKED" },
invokeBlenderOperator: { route: "MAIN_AUTHORITATIVE", implementation: "SOURCE_BACKED" },
} satisfies Record<WebEngineOperatorCommand, WebEngineOperatorCapability>;
export function getWebEngineCommandCapability(type: unknown): WebEngineCommandCapability | null {
if (typeof type !== "string") return null;
return Object.prototype.hasOwnProperty.call(WEB_ENGINE_COMMAND_CAPABILITIES, type)