OptionalmaxSize?: numberOptionalfilter?: (cmd: Command) => booleanOptionalbus?: CommandBus<CommandMap>OptionalundoAction?: stringAction name to register as the undo trigger (e.g. 'cart.undo'). The plugin
registers the bus handler itself and ALWAYS excludes this action from
recording — even if filter would match it. Without this, a hand-wired
bus.register('cart.undo', () => h.undo()) records the trigger command
into history (clearing the redo stack and burying real entries), so undo
works once and redo never enables. Requires bus.
OptionalredoAction?: stringAction name to register as the redo trigger. Same semantics as undoAction.
Unregister the undoAction/redoAction bus handlers (no-op if none).
Reference to the command bus — enables undo() to execute inverse handlers