Smoothed shocks in a regime switching model

Hi all,
How Dynare would compute the smoothed shocks in a model where the state space representation switches regime, like this one:
Xt = A(j) Xt-1 + R(j) epst
Yt = B Xt + const
where epst ~N(0, V(j)). j indexes the regime in place. I know that Dynare does not handle regime switching DSGE, but I just want some hint about how to comoute it and I can code it by myself.
How Dynare would compute the smoothed shocks in a model where the state space representation switches regime, like this one:
Xt = A(j) Xt-1 + R(j) epst
Yt = B Xt + const
where epst ~N(0, V(j)). j indexes the regime in place. I know that Dynare does not handle regime switching DSGE, but I just want some hint about how to comoute it and I can code it by myself.