type MockCommandHandler<TState, TArgs extends readonly unknown[] = [
]> = (state: TState, ...args: TArgs) => Awaitable<Patch<TState> | void>; Runs a command and returns the state changes it makes. A thrown error becomes the client's BridgeError; throw mockFailure(failure) resolves the client's outcome with the declared failure.