"Japan was willing to surrender throughout all of 1945, but only with the gurantee their Emperor would remain"

Yes, it’s actually in the cite of the cite that md-2000 gave, Richard B. Frank’s Downfall: The End of the Japanese Empire, it’s the July 22nd edition of the Magic Diplomatic Summary - all of the diplomatic communications between Satō and Tōgō were being decrypted in real time by Allies and being read by policy makers. The preview pages from Amazon starts a bit awkwardly in mid-sentence, but here’s what’s on page 239 from the Amazon preview:

ETA: Actually I found the whole paragraph from an old post of mine, so here’s the complete paragraph:

The most often repeated condemnation of American diplomacy in the summer of 1945 is that policy makers understood that a promise to retain the Imperial institution was essential to end the war, and that had the United states communicated such a promise, the Suzuki cabinet would likely have promptly surrendered. The answer to this assertion is enshrined in black and white in the July 22 edition of the Magic Diplomatic Summary. There, American policy makers could read for themselves that Ambassador Sato had advised Foreign Minister Togo that the best terms Japan could hope to secure were unconditional surrender, modified only to the extent that the Imperial institution could be retained. Presented by his own ambassador with this offer, Togo expressly rejected it.