The background is as follows: I have been whittling away at my commutative algebra notes (or, rather at commutative algebra itself, I suppose) recently for the occasion of a course I will be teaching soon.
I just inserted the statement of the theorem that the ring $\overline{\mathbb{Z}}$ of all algebraic integers is a Bezout domain (i.e., all finitely generated ideals are principal; note that this ring is very far from being Noetherian).  I actually don't remember off the top of my head who first proved this result -- and I would be happy to learn, although that's not my main question here.  The reference that sticks in my mind is Kaplansky's 1970 text Commutative Rings, where he proves the following nice generalization:
Theorem: Let $R$ be a Dedekind domain with fraction field $K$ and algebraic closure $\overline{K}$.  Suppose that for every finite subextension $L$ of $\overline{K}/K$, the ideal class group of the integral closure $R_L$ of $R$ in $L$ is a torsion abelian group.  Then the integral closure $S$ of $R$ in $\overline{K}$ is a Bezout domain.
Neat, huh?  Then when I got to deducing the result about $\overline{\mathbb{Z}}$, it hit me: nowhere in these notes do I verify that $\mathbb{Z}$ satisfies the hypotheses of Kaplansky's theorem, namely that the ideal class group of the ring of integers of a number field is always finite.
Don't get me wrong: I wasn't expecting anything different -- I actually don't know of any commutative algebra text which proves this result.  Indeed, it is generally held that the finiteness of the class number is one of the first results of algebraic number theory which is truly number-theoretic in nature and not part of the general study of commutative rings.  But the truth is that I've been bristling at this state of affairs for some time: I would really like there to be a subbranch of mathematics called "abstract algebraic number theory" which proves "general" results like this.  (My reasons for this are, so far as I can recall at the moment, purely psychological and aesthetic: I have no specific ulterior motive here, alas.)  To see past evidence of me flirting with these issues, see this previous MO question (which does not have an accepted answer) and these other notes of mine (which don't actually get off the ground and establish anything exciting).
So let me try once again:

Is there a purely algebraic proof of the finiteness of the class number?

Unfortunately I don't know exactly what I mean here, because the standard proofs that one finds in algebraic number theory texts are certainly "purely algebraic" in nature or can be made so.  (For instance, it is well known that it is convenient but not necessary to use geometry of numbers -- the original proofs of this finiteness result predate Minkowski's work.)  Here are some criteria:

I want a general -- or "structural" -- condition on a Dedekind domain that implies the finiteness of its class group.  (In my previous question, I asked whether finiteness of the residue rings was such a condition.  I still don't know the answer to that.)

This condition should in particular apply to rings of integers of number fields and also to coordinate rings of regular, integral affine curves over finite fields.


Note that already the standard "purely algebraic proofs" of finiteness of class number in the number field case do not in fact proceed by a general method which also works verbatim in the function field case: additional arguments are usually required.  (See for instance Dino Lorenzini's Invitation to Arithmetic Geometry.)  As far as number field / function field unity goes, the best approach I know is the adelic one: Fujisaki's Lemma, which is Theorem 1.1 here (see also the theorem on the last page).  But this is a topological argument, and the topological and valuation theoretic properties of global fields which go into it are quite particular to global fields: I am (dimly) aware of results of Artin-Whaples which characterize global fields as the ones which have these nice properties: the product formula, and so forth.
It is possible that what I am seeking simply doesn't exist.  If you feel like you understand why the finiteness of class number is in some precise way arithmetic rather than algebraic in nature, please do explain it to me!

Added: here are some further musings which might possibly be relevant.
I like to think of three basic theorems of algebraic number theory as being of a kind ("the three finiteness theorems"):
(i) $\mathbb{Z}_K$ is a Dedekind domain which is finitely generated as a $\mathbb{Z}$-module.
(ii) $\operatorname{Pic} \mathbb{Z}_K$ is finite.
(iii) $\mathbb{Z}_K^{\times}$ is finitely generated as a $\mathbb{Z}$-module.
[Yes, there is also a fourth finiteness theorem due to Hermite, on restricted ramification, which is perhaps most important of all...]
The first of these is acceptably "purely algebraic" to me: it is a result about taking the normalization of a Dedekind domain in a finite field extension.  The merit of the adelic approach is that it shows that (ii) and (iii) are closely interrelated: the conjunction of the two of them is formally equivalent to the compactness of the norm one idele class group.  So perhaps it is a mistake to fixate on conditions only ensuring the finiteness of the class group.  For instance, the class of Dedekind domains with finite class group is closed under localization but the class of Dedekind domains which also have finitely generated unit group is not.  However the "Hasse domains" -- i.e. $S$-integer rings of global fields -- do have both of these properties.

Yes, there exist purely algebraic conditions on a Dedekind domain which hold for all rings of integers in global fields and which imply that the class group is finite.
For a finite quotient domain $A$ (i.e., all non-trivial quotients are finite rings), a non-zero ideal $I\subseteq A$ and a non-zero $x\in A$, let $N_{A}(I)=|A/I|$ and $N_{A}(x)=|A/xA|$. Also define $N_{A}(0)=0$.
Call a principal ideal domain $A$ a basic PID if the following conditions are satisfied:

$A$ is a finite quotient domain,

for each $m\in\mathbb{N}$,$$\#\{x\in A\mid N_{A}(x)\leq m\}>m$$
(i.e., $A$ has “enough elements of small norm”),

there exists a constant $C\in\mathbb{N}$ such that for all $x,y\in A$,
$$N_{A}(x+y)\leq C\cdot(N_{A}(x)+N_{A}(y))$$
(i.e., $N_{A}$ satisfies the “quasi-triangle inequality”).


Theorem. Let $A$ be a basic PID and let $B$ be a Dedekind domain which is finitely generated and free as an $A$-module. Then $B$ has finite ideal class group.
For the proof, see here.
It is easy to verify that $\mathbb{Z}$ and $\mathbb{F}_q[t]$ are basic PIDs, so the  ring of integers in any global field satisfies the hypotheses of the above theorem (using the non-trivial fact that rings of integers in global fields are finitely generated over one of these PIDs).
More generally, one can take the class of overrings of Dedekind domains which are finitely generated and free over some basic PIDs. Since it is known that an overring of a Dedekind domain with finite class group also has finite class group, this gives a wider class of algebraically defined Dedekind domains (including $S$-integers like $\mathbb{Z}[\frac{1}{p}]$) with finite class group.
Added: The second condition for basic PIDs can be relaxed to: there exists a constant $c\in\mathbb{N}$ such that for each $m\in\mathbb{N}$,
$$
\#\{x\in A\mid N_{A}(x)\leq c\cdot m\}\geq m.
$$
