6. Given a sequence $\left\{a_{n}\right\}$ whose terms are all non-zero. Let the sum of the first $n$ terms of the sequence $\left\{a_{n}\right\}$ be $S_{n}$, and the sum of the first $n$ terms of the sequence $\left\{a_{n}^{2}\right\}$ be $T_{n}$, and $S_{n}^{2}+4 S_{n}-3 T_{n}=0\left(n \in \mathbf{Z}_{+}\right)$. Then the sum of the first $n$ terms of the sequence $\left\{\frac{(n-1)}{n(n+1)} a_{n}\right\}$ is $\qquad$ .
6. $\frac{2^{n+1}}{n+1}-2$.

From $S_{n}^{2}+4 S_{n}-3 T_{n}=0$,
then $S_{n+1}^{2}+4 S_{n+1}-3 T_{n+1}=0$.
(2) - (1) gives
$$
\left(S_{n+1}+S_{n}\right) a_{n+1}+4 a_{n+1}-3 a_{n+1}^{2}=0 \text {. }
$$

Since $a_{n+1} \neq 0$, then
$$
\left(S_{n+1}+S_{n}\right)+4-3 a_{n+1}=0 \text {. }
$$
$$
\text { Hence }\left(S_{n}+S_{n-1}\right)+4-3 a_{n}=0 \text {. }
$$
(3) - (4) gives
$$
\begin{array}{l}
\left(a_{n+1}+a_{n}\right)-3 a_{n+1}+3 a_{n}=0 \\
\Rightarrow a_{n+1}=2 a_{n} .
\end{array}
$$

Since $a_{n} \neq 0$, then $\frac{a_{n+1}}{a_{n}}=2$.
Also, $a_{1}=2, a_{2}=4$, thus, $\frac{a_{2}}{a_{1}}=2$.

Therefore, $a_{n}=2 \times 2^{n-1}=2^{n}$.
$$
\text { Hence } \frac{n-1}{n(n+1)} a_{n}=\frac{(n-1) \cdot 2^{n}}{n(n+1)}=\frac{2^{n+1}}{n+1}-\frac{2^{n}}{n} \text {, }
$$

The sum of the first $n$ terms is
$$
\begin{array}{l}
\frac{0}{1 \times 2} \times 2+\frac{1}{2 \times 3} \times 2^{2}+\cdots+\frac{n-1}{n(n+1)} a_{n} \\
=\frac{2^{n+1}}{n+1}-2 .
\end{array}
$$