aboutsummaryrefslogtreecommitdiff
path: root/devel/schemata
AgeCommit message (Collapse)Author
2023-07-09schemata: document 'excluded' field in structured outputTim Culverhouse
Include the 'excluded' field in the structured output schema. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2022-07-30CLI/show: support --duplicate for structured outputDavid Bremner
This introduces a new mandatory key for message structures, namely "duplicate". Per convention in devel/schemata this does _not_ increase the format version. This means that clients are responsible for checking that it exists, and not crashing if it does not. The main functional change is teaching mime_node_open to understand a 'duplicate' argument. Support for --duplicate in notmuch-reply would make sense, but we defer it to a later commit.
2022-01-18CLI: print extra headers in structured outputDavid Bremner
This is based on a patch from Johan Parin [1], which is in turn responding to a bug report / feature requiest from Jan Malkhovski. The update to the structured output documented in schemata is intended to be upward compatible, so the format version stays the same [1]: id:20191116162723.18343-1-johan.parin@gmail.com [2]: id:87h8sdemnr.fsf@oxij.org
2021-08-22CLI: define and use format version 5David Bremner
This is a bit of a cheat, since the format does not actually change. On the other hand it is fairly common to do something like this to shared libary SONAMEs when the ABI changes in some subtle way. It does rely on the format-version argument being early enough on the command line to generate a sensible error message.
2021-06-26cli/show: produce "email" element in sigstatusDaniel Kahn Gillmor
When the certificate that signs a message is known to be valid, GMime is capable of reporting on the e-mail address embedded in the certificate. We pass this information along to the caller of "notmuch show", as often only the e-mail address of the certificate has actually been checked/verified. Furthermore, signature verification should probably at some point compare the e-mail address of the caller against the sender address of the message itself. Having to parse what gmime thinks is a "userid" to extract an e-mail address seems clunky and unnecessary if gmime already thinks it knows what the e-mail address is. See id:878s41ax6t.fsf@fifthhorseman.net for more motivation and discussion. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-05-29cli/show: add information about which headers were protectedDaniel Kahn Gillmor
The header-mask member of the per-message crypto object allows a clever UI frontend to mark whether a header was protected (or not). And if it was protected, it contains enough information to show useful detail to an interested user. For example, an MUA could offer a "show what this message's Subject looked like on the wire" feature in expert mode. As before, we only handle Subject for now, but we might be able to handle other headers in the future. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> Amended by db: tweaked schemata notation.
2019-05-26cli/show: emit new whole-message crypto status outputDaniel Kahn Gillmor
This allows MUAs that don't want to think about per-mime-part cryptographic status to have a simple high-level overview of the message's cryptographic state. Sensibly structured encrypted and/or signed messages will work fine with this. The only requirement for the simplest encryption + signing is that the message have all of its encryption and signing protection (the "cryptographic envelope") in a contiguous set of MIME layers at the very outside of the message itself. This is because messages with some subparts signed or encrypted, but with other subparts with no cryptographic protection is very difficult to reason about, and even harder for the user to make sense of or work with. For further characterization of the Cryptographic Envelope and some of the usability tradeoffs, see here: https://dkg.fifthhorseman.net/blog/e-mail-cryptography.html#cryptographic-envelope
2017-07-04devel/schemata: describe version 4David Bremner
Replace numeric errors with human readable flags. Not all sig_error keys will necessarily be generated with a given version of gmime. Drop status "none" as it's currrently unused and I don't know what it's for.
2017-02-28cli/show: add content-disposition to structured output message partsJani Nikula
Help the clients decide how to display parts. Test updates by Mark Walters <markwalters1009@gmail.com>. One more test fix by db
2017-02-26cli/show: list all filenames of a message in the formatted outputJani Nikula
Instead of just having the first filename for the message, list all duplicate filenames of the message as a list in the formatted outputs. This bumps the format version to 3.
2013-11-08search: Add stable queries to thread search resultsAustin Clements
These queries will match exactly the set of messages currently in the thread, even if more messages later arrive. Two queries are provided: one for matched messages and one for unmatched messages. This can be used to fix race conditions with tagging threads from search results. While tagging based on a thread: query can affect messages that arrived after the search, tagging based on stable queries affects only the messages the user was shown in the search UI. Since we want clients to be able to depend on the presence of these queries, this ushers in schema version 2.
2013-11-08schemata: Disambiguate non-terminal namesAustin Clements
Previously, the show schema and the search schema used different "thread" non-terminals. While these schemata don't interact, this is still confusing, so rename search's "thread" to "thread_summary". To further limit confusion, prefix all top-level search non-terminals now begin with "search_".
2012-12-17show: indicate length, encoding of omitted body contentPeter Wang
If a leaf part's body content is omitted, return the encoded length and transfer encoding in --format=json output. This information may be used by the consumer, e.g. to decide whether to download a large attachment over a slow link. Returning the _encoded_ content length is more efficient than returning the _decoded_ content length. Returning the transfer encoding allows the consumer to estimate the decoded content length.
2012-12-16cli: Framework for structured output versioningAustin Clements
Currently there is a period of pain whenever we make backward-incompatible changes to the structured output format, which discourages not only backward-incompatible improvements to the format, but also backwards-compatible additions that may not be "perfect". In the end, these problems limit experimentation and innovation. This series of patches introduces a way for CLI callers to request a specific format version on the command line and to determine if the CLI does not supported the requested version (and perhaps present a useful diagnostic to the user). Since the caller requests a format version, it's also possible for the CLI to support multiple incompatible versions simultaneously, unlike the alternate approach of including version information in the output. This patch lays the groundwork by introducing a versioning convention, standard exit codes, and a utility function to check the requested version and produce standardized diagnostic messages and exit statuses.
2012-12-08Use the S-Expression structured printer in notmuch-show, notmuch-reply and notmuch-search.Peter Feigl
This patch uses the new S-Expression printer in the notmuch CLI (show, search and reply). You can now use --format=sexp for any of them.
2012-12-08Rename the -json printer functions in notmuch-reply and notmuch-show to generic -sprinter functions.Peter Feigl
All the structured output functions in notmuch-reply and notmuch-show are renamed to a generic name (as they do not contain any json-specific code anyway). This patch is a preparation to actually using the new S-Expression sprinter in notmuch-reply and notmuch-show.
2012-11-08devel: Add Reply-to to the schemataAustin Clements
The code got out of sync with the documentation in 7d3c06dc.
2012-07-24schemata: update for --body=true|false optionMark Walters
Previously body: was a compulsory field in a message. The new --body=false option causes notmuch show to omit this field so update schemata to reflect this.
2012-07-09Add missing "tags" field to search schemaAustin Clements
This field is output by search, but it didn't make it into the documentation.
2012-06-30Minor correction to devel/schemataMark Walters
In id:"87sjdm12d1.fsf@awakening.csail.mit.edu" Austin pointed out that devel/schemata needs a slight correction with the new --entire-thread=false option. This is that correction.
2012-06-29Update devel/schemata for --entire-thread=falseMark Walters
Also remove the Json --entire-thread item from devel/TODO.
2012-04-15Sync schemata with current code structureAustin Clements
The schema itself hasn't changed, but many of the references to functions in notmuch-show.c were out of date.
2012-03-19schemata: Add documentation for JSON reply format.Adam Wolfe Gordon
2012-02-27Document the JSON schemata used by show and searchAustin Clements