Observation: the thing you've called "diag", which I'll call $2v$, is the diameter of a circle. Thus $v$ denotes the radius vector. Let's call the left end of the diameter -- the starting point of $h_2$ -- by the name $P$, and the right end by the name $S$.
The circle with diameter $PS$ also contains the endpoint $Q = P + h_2$ of the vector $h_2$. Why? Because a triangle inscribed in a circle with two vertices at the ends of a diameter has a right angle at the third vertex, and conversely, gives a right triangle, a circle built so that the triangle's hypotenuse is its diameter will contain the third vertex (at which the angle will of course be 90 degrees, by the previous statement.)
Furthermore, by moving the vector you've called $h_1$ so that it starts at $P$ and ends at the point $R = P + h_1$, we get another right triangle $PRS$ erected on the diagonal.
If we write down the midpoints of $PQ$ and $PR$, we can express the perpendicular bisectors of the segments $PQ$ and $PR$, find their intersection, $C$, and then $v = C - P$, and the diagonal you're seeking is $2v$. Let's do it.
$M_1 =$ midpoint of $PQ = \frac{P+Q}{2} = P + \frac{1}{2} h_2$.
$M_2 =$ midpoint of $PR = P + \frac{1}{2} h_1$.
Now
\begin{align}
(C - M_1) \cdot h_2 &= 0, \text{ because $C$ lies on the perp bisector of $PQ$} \\
(C - M_2) \cdot h_1 &= 0 \text{ similarly}
\end{align}
Substituting, and using the fact that $C - P = v$, by the definition of $v$, we get
$$
(C - (P + \frac{1}{2} h_2)) \cdot h_2 = 0 \\
(C - (P + \frac{1}{2} h_1)) \cdot h_1 = 0
$$
so
$$
((C - P) - \frac{1}{2} h_2) \cdot h_2 = 0 \\
((C - P) - \frac{1}{2} h_1) \cdot h_1 = 0
$$
so
$$
(v - \frac{1}{2} h_2) \cdot h_2 = 0 \\
(v - \frac{1}{2} h_1) \cdot h_1 = 0
$$
so
$$
v \cdot h_2 = \frac{1}{2} h_2 \cdot h_2 \\
v \cdot h_1 = \frac{1}{2} h_1 \cdot h_1
$$
Now write
$$
v = a h_1 + b h_2
$$
and plug in to solve. To simplify, let $q_{ij} = h_i \cdot h_j$. Then
$$
(a h_1 + b h_2) \cdot h_2 = \frac{1}{2} h_2 \cdot h_2 \\
(a h_1 + b h_2) \cdot h_1 = \frac{1}{2} h_1 \cdot h_1
$$
$$
a q_{12} + b q_{22} = \frac{1}{2} q_{22} \\
a q_{11} + b q_{21} = \frac{1}{2} q_{11}
$$
In matrix form, that says that
$$
\begin{bmatrix}
a & b
\end{bmatrix}
\begin{bmatrix}
q_{11} & q_{12} \\
q_{21} & q_{22}
\end{bmatrix} = \frac{1}{2}\begin{bmatrix}
q_{11} & q_{22}
\end{bmatrix}
$$
so
$$
\begin{bmatrix}
a & b
\end{bmatrix}
= \frac{1}{2}\begin{bmatrix}
q_{11} & q_{22}\end{bmatrix}
\begin{bmatrix}
q_{11} & q_{12} \\
q_{21} & q_{22}
\end{bmatrix}^{-1}
$$
from which you can recover $v$ and then the diagonal, which is $2v$.
I'm sure there's an easier way, but this gets you there.
ADDITIONAL REMARKS: Suppose that we let $k_1$ be $h_1$, rotated 90 degrees in the plane, and similarly for $k_2$ and $h_2$. (If $h_1 = [s, t]$, then $k_1 = [-t, s]$.) Then we can write $v = c k_1 + d k_2$. Now solving
$$
v \cdot h_2 = \frac{1}{2} h_2 \cdot h_2 \\
v \cdot h_1 = \frac{1}{2} h_1 \cdot h_1
$$
gets easy:
$$
(c k_1 + d k_2) \cdot h_2 = \frac{1}{2} h_2 \cdot h_2 \\
(c k_1 + d k_2) \cdot h_1 = \frac{1}{2} h_1 \cdot h_1
$$
becomes
$$
c = \frac{1}{2} \frac{h_2 \cdot h_2}{k_1 \cdot h_2} \\
d = \frac{1}{2} \frac{h_1 \cdot h_1}{k_2 \cdot h_1}
$$
and so
$$
v = \frac{1}{2} \frac{h_2 \cdot h_2}{k_1 \cdot h_2} k_1 +
\frac{1}{2} \frac{h_1 \cdot h_1}{k_2 \cdot h_1} k_2.
$$
You can't get much more vector-based than that!
Note: It turns out that by trig identities, $k2 \cdot h_1 = - k_1 \cdot h_2$, so the expression above simplifies a little:
$$
v = \frac{1}{2} \frac{1}{k_1 \cdot h_2} \left( (h_2 \cdot h_2) k_1 -
(h_1 \cdot h_1) k_2 \right).
$$
And since the thing you want is $2v$, you can even get rid of the $\frac{1}{2}$:
$$
diag = \frac{1}{k_1 \cdot h_2} \left( (h_2 \cdot h_2) k_1 -
(h_1 \cdot h_1) k_2 \right).
$$