```ts
export function tessariValue(text: string): number {
  if (typeof text !== 'string') {
    throw new Error('Input must be a string');
  }

  if (text.length === 0) {
    throw new Error('Input cannot be an empty string');
  }

  const tessariGlyphs = 'KLMNPQRST';
  const glyphValues: { [key: string]: number } = {
    K: 0,
    L: 1,
    M: 2,
    N: 3,
    P: 4,
    Q: 5,
    R: 6,
    S: 7,
    T: 8
  };

  if (text.startsWith('K') && text.length > 1) {
    throw new Error('A numeral padded with a leading K is invalid');
  }

  for (const char of text) {
    if (!tessariGlyphs.includes(char)) {
      throw new Error(`Invalid glyph: ${char}`);
    }
    if (char !== char.toUpperCase()) {
      throw new Error('All glyphs must be uppercase');
    }
  }

  return text.split('').reduce((value, char) => value * 9 + glyphValues[char], 0);
}
```