I would like to know what dynare assumes if there are two random exogenous processes and want to get the IRFs of only one shock.
Suppose for instance that there are two random processes, TFP and government spending, say both are AR(1) and want to see what happens if there is a one standard deviation increase (i.e a shock) in TFP ?

Then what dynare assumes for the** other** shock ? it assumes for instance that the other exogenous variable is constant along the trajectory path ?

At first order, there is certainty equivalence and linearity. The total IRFs to two shocks are simply the sum of the IRFs to the individual shocks. Thus, you do not need to assume anything. You can just generate the IRFs for each shock independently of all others (by moving along the diagonal of the covariance matrix).
Things only become complicated if there is correlation between the two shocks. In this case, you have to orthogonalize the shocks. Dynare does this via a Cholesky decomposition.

At higher order, there is an additional complication as you lose linearity. In this case, the same applies as at second order, but the IRFs are generated as Generalized Impulse Response Functions.