There is this (folklore?) fact: for a commutative ring $R$, the category of $R$-modules is equivalent to the category of internal abelian groups in the slice category $\operatorname{Commutative rings}/R$.
I would like to replace here $\operatorname{Commutative rings}$ with some ($\infty$-?)category $\bf X$ of symmetric monoidal (should I say E$_\infty$?) stable $\infty$-categories. Then presumably "internal abelian groups" is not relevant, as stable $\infty$-categories have their own intrinsic sort of "abelian group" structure. On the other hand, also presumably, just taking slice over $R$ would not give any notion of module readily: for whatever kind of morphism $f:R'\to R$ of monoidal $\infty$-categories, I don't see any sensible way to define some action of $R$ on the fibre of $f$ (or is there any?).
So my question is what kind of structures in ${\bf X}/R$ would provide good notion of $R$-module in the stable $\infty$-setting? Or maybe there are different notions of module and some of them must be captured in entirely different ways?