Clash Blueprint Engine API
    Preparing search index...

    Interface Command

    A reversible user action (the Command pattern). execute performs the change and records forward event(s); undo performs the exact inverse and records the inverse event(s). Redo is simply execute again — commands capture any generated identity on first run so re-execution is deterministic.

    This single abstraction powers undo, redo, history, replay and the future collaboration layer.

    interface Command {
        label: string;
        execute(ctx: CommandContext): Result<void, EngineError>;
        undo(ctx: CommandContext): void;
    }

    Implemented by

    Index
    label: string

    Human-readable label for history UIs ("Add Cannon", "Move building").