The problem/use-case that the feature addresses

Currently one can't filter based on the client issuing the command. It be nice to have that ability. This way a module can make different filtering decisions based on which client issued the command.

As a simple example: if one wanted to prevent some clients (when in specific states, so not an ACL issue) from issuing the shutdown command, one can't do that, as one can't distinguish clients.

Description of the feature

Addition of a new API RMClientState * RM_CommandFilterClientState(RedisModuleCommandFilterCtx *)

RMClientState will include the client id and a curated list of client flags (though if no other data is needed, then perhaps it can just return the client id instead of an allocated struct).

To enable this, RedisModuleCommandFilterCtx which is opaque to the module, will also include the current client

Alternatives you've considered

I don't see any other way of knowing the caller, as only RedisModuleCommandFilterCtx is passed in and it just has argv/argc info today