An idea parked while #38 was being built, so it is not lost. A root like gmail:label:<name>, one Markdown file per thread, read-only like the calendar root, so a client's mail thread can sit beside the contract it is about and an agent can read both.
Open questions before this is refined: the shape of a thread as Markdown (one file, messages as sections, quoted replies stripped or kept); attachments (same as calendar attachments, under <thread>.assets/); what the identity of a thread is when a label is removed or a message is added; the gmail.readonly scope and whether the OAuth app's consent screen needs re-verification for it.
An idea parked while #38 was being built, so it is not lost. A root like
gmail:label:<name>, one Markdown file per thread, read-only like the calendar root, so a client's mail thread can sit beside the contract it is about and an agent can read both.Open questions before this is refined: the shape of a thread as Markdown (one file, messages as sections, quoted replies stripped or kept); attachments (same as calendar attachments, under
<thread>.assets/); what the identity of a thread is when a label is removed or a message is added; thegmail.readonlyscope and whether the OAuth app's consent screen needs re-verification for it.