```ts
export function computeSheet(cells: Record<string, string>): Record<string, number> {
  const cellValues = new Map<string, number>();
  const visited = new Set<string>();
  const recursionStack = new Set<string>();

  function getCellValue(cellName: string): number {
    if (recursionStack.has(cellName)) {
      throw new Error("Reference cycle detected");
    }
    if (visited.has(cellName)) {
      return cellValues.get(cellName)!;
    }

    const cellText = cells[cellName];
    if (!cellText) {
      throw new Error(`Cell ${cellName} not found`);
    }

    recursionStack.add(cellName);
    let value: number;

    if (cellText.startsWith("=")) {
      if (cellText.length === 1) {
        throw new Error("Empty formula");
      }

      const terms = cellText.slice(1).split("+").map(term => term.trim());
      value = terms.reduce((sum, term) => {
        if (/^-?\d+$/.test(term)) {
          return sum + parseInt(term, 10);
        } else if (/^[A-Z]+\d+$/.test(term)) {
          return sum + getCellValue(term);
        } else {
          throw new Error(`Malformed term: ${term}`);
        }
      }, 0);
    } else if (/^-?\d+$/.test(cellText)) {
      value = parseInt(cellText, 10);
    } else {
      throw new Error(`Malformed literal: ${cellText}`);
    }

    recursionStack.delete(cellName);
    visited.add(cellName);
    cellValues.set(cellName, value);

    return value;
  }

  for (const cellName in cells) {
    getCellValue(cellName);
  }

  return Object.fromEntries(cellValues);
}
```