```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 valueMap: { [key: string]: number } = {
    K: 0,
    L: 1,
    M: 2,
    N: 3,
    P: 4,
    Q: 5,
    R: 6,
    S: 7,
    T: 8
  };

  if (text.includes('k')) {
    throw new Error('Lower-case glyphs are not allowed');
  }

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

  const invalidGlyph = Array.from(text).find(glyph => !tessariGlyphs.includes(glyph));
  if (invalidGlyph) {
    throw new Error(`Invalid glyph: ${invalidGlyph}`);
  }

  return text.split('').reduce((total, glyph) => total * 9 + valueMap[glyph], 0);
}
```