Which "limit of ultrafilter" functions induce a compact Hausdorff topological structure? Somewhere I saw a brief comment, without proof, that the underlying set functor from compact Hausdorff topological spaces to sets is monadic.  So, I found myself wondering if the former category could be expressed as a sort of pseudo variety of algebras.
A possible candidate for a pseudo-algebraic operation would be the operation of taking limits of ultrafilters.  From this operation, the topology can be recovered: $\mathrm{cl}(S)$ is the set of limits of ultrafilters containing $S$.  So, given an arbitrary function $\lim$ from ultrafilters on $X$ to $X$, define $\mathrm{cl}(S) := \{ \lim \mathcal{F} : \mathcal{F}~\mathrm{ultrafilter~on~}X,~ S \in \mathcal{F} \}$, and let us check Kuratowski's closure axioms:


*

*$\mathrm{cl}(\emptyset) = \emptyset$: vacuously true since no ultrafilter contains $\emptyset$.

*$S \subseteq \mathrm{cl}(S)$: easy to prove with the reasonable assumption that the limit of the principal ultrafilter on $x$ is $x$.

*$\mathrm{cl}(S \cup T) = \mathrm{cl}(S) \cup \mathrm{cl}(T)$: for $\subseteq$, if $S \cup T \in \mathcal{F}$ where $\mathcal{F}$ is an ultrafilter, then either $S \in \mathcal{F}$ so $\lim \mathcal{F} \in \mathrm{cl}(S)$, or $T \in \mathcal{F}$ so $\lim \mathcal{F} \in \mathrm{cl}(T)$.  For $\supseteq$, it suffices to show $\mathrm{cl}$ is increasing: but if $S \subseteq S'$, then every ultrafilter containing $S$ also contains $S'$.

*$\mathrm{cl}(\mathrm{cl}(S)) = \mathrm{cl}(S)$: this is the one that trips me up, and I can't think of any "natural" pseudo-algebraic relation in terms of $\lim$ that would imply this.


Aside from this, it would also be reasonable to require an ultrafilter $\mathcal{F}$ to have limit $x$ based on the induced topology if and only if $\lim \mathcal{F} = x$.  Once you have that, the compactness and Hausdorff property of the induced topology would be immediate.  Again here, though, I haven't quite been able to see if this is automatic or if there's some "natural" pseudo-algebraic relation in terms of $\lim$ that would imply this.  (The "if" direction is easy to prove in general if the Kuratowski closure axioms hold so the topology's closure agrees with $\mathrm{cl}$ as defined; it's the "only if" direction I'm not sure is automatic.)
Furthermore, in order to get the original category, we would want to know that $f : X \to Y$ is continuous if and only if $f$ "commutes" with the limit operations, i.e. for each ultrafilter $\mathcal{F}$ on $X$, $f(\lim_X \mathcal{F}) = \lim_Y (f_* \mathcal{F})$ where $f_* \mathcal{F} = \{ S \subseteq Y : f^{-1}(S) \in \mathcal{F} \}$.  However, as I recall this just reduces to an already known general topological theorem, given the previous paragraph's condition.
So, my question is whether there's a known set of pseudo-algebraic relations which cause a "limit of ultrafilter" operator to induce a compact Hausdorff topology.  Or if not, if there's some known formulation of the category of compact Hausdorff topological spaces as a pseudo variety of algebras along these lines.
 A: A characterization of when a "limit of ultrafilter" operation induces a compact Hausdorff topology follows from simply unraveling what it means for the forgetful functor to be monadic.  Let $\beta:Set\to Set$ be the functor taking a set $S$ to the set of ultrafilters on $S$.  This functor is a monad.  Explicitly, the unit $e_S:S\to \beta S$ takes an element of $S$ and sends it to the corresponding principal ultrafilter.  The composition $\mu_S:\beta\beta S\to \beta S$ is more complicated, but can be described as follows.  The set $\beta S$ has a natural compact Hausdorff topology, that of the free compact Hausdorff space on the set $S$.  So given an ultrafilter on the set $\beta S$, you can take its limit with respect to this topology.  This gives a map $\mu_S:\beta\beta S\to\beta S$, which is the composition map of the monad.
Now the claim is that compact Hausdorff spaces are the same thing as algebras over this monad $\beta$.  This means that a map $L:\beta S\to S$ is the operation taking an ultrafilter to its limit with respect to some compact Hausdorff topology on $S$ iff $L$ is the structure map of an algebra over the monad $\beta$.  This means two things.  First, it means that the composition $$S\stackrel{e_S}\to \beta S\stackrel{L}\to S$$ is the identity.  This just says that the "limit" of a principal ultrafilter is the corresponding point.  Second, it says that the following diagram commutes:
$$\require{AMScd}
\begin{CD}
\beta\beta S @>{\mu_S}>> \beta S\\
@V{\beta(L)}VV @V{L}VV \\
\beta S @>{L}>> S
\end{CD}$$
What does this diagram mean?  It means that if you take an ultrafilter on $\beta S$, take its limit in the natural topology on $\beta S$, and then take the "limit" of that according to $L$, that's the same as first pushing forward your ultrafilter to an ultrafilter on $S$ using $L$, and then taking its "limit" according to $L$.  More conceptually, this is saying that the map $L$ is "continuous" from $\beta S$ to $S$: it preserves limits of ultrafilters, where you compute limits of ultrafilters on $\beta S$ using its natural topology and you compute limits of ultrafilters on $S$ using $L$.
So that's a characterization of when a "limit of ultrafilter" function corresponds to a compact Hausdorff topology.  It needs to satisfy the trivial condition that it does the right thing on principal ultrafilters, and also a much more subtle continuity condition.  The continuity condition can be thought of as an infinite collection of "algebraic" identities: one for each ultrafilter on the set $\beta S$.
