  Chern-Weil theory provides for each invariant polynomial on a Lie algebra g a
map from g-connections to differential cocycles whose volume holonomy is the
corresponding Chern-Simons theory action functional. Kotov and Strobl have
observed that this naturally generalizes from Lie algebras to dg-manifolds and
dg-bundles and that the Chern-Simons action functional associated this way to
an $n$-symplectic manifold is the action functional of the AKSZ $\sigma$-model
whose target space is the given $n$-symplectic manifold (examples of this are
the Poisson sigma-model or the Courant sigma-model, including ordinary
Chern-Simons theory, or higher dimensional abelian Chern-Simons theory). Here
we show how, within the framework of the higher Chern-Weil theory in smooth
infinity-groupoids, this result can be naturally recovered and enhanced to a
morphism of higher stacks, the same way as ordinary Chern-Simons theory is
enhanced to a morphism from the stack of principal G-bundles with connections
to the 3-stack of line 3-bundles with connections.
