this repo has no description
1# Guidelines for the AI copilot editor.
2
3Whenever you generate any new OCaml functions, annotate that function's OCamldoc
4with a "TODO:claude" to indicate it is autogenerated. Do this for every function
5you generate and not just the header file.
6
7## Project structure
8
9The `spec/rfc8620.txt` is the core JMAP protocol, which we are aiming to implement
10in OCaml code in this project. We must accurately capture the specification in the
11OCaml interface and never violate it without clear indication.
12
13## Coding Instructions
14
15Read your instructions from this file, and mark successfully completed instructions
16with DONE so that you will know what to do next when reinvoked in the future. If you
17only partially complete the task, then add an extra step with TODO and the remaining
18work.
19
201. DONE Define core OCaml type definitions corresponding to the JMAP protocol
21 specification, in a new Jmap.Types module.
222. DONE Add a `Jmap.Api` module to make JMAP API requests over HTTP and parse the
23 responses into the `Jmap.Types`. Used `Cohttp_lwt_unix` for the HTTP library.
24 Note: There is a compilation issue with the current ezjsonm package on the system.
253. DONE Add a `Jmap_mail` implementation that follows `spec/rfc8621.txt` as part of a
26 separate package. It should use the Jmap module and extend it appropriately.
274. DONE Complete the Jmap_mail implementation so that there are functions to login
28 and list mailboxes and messages in a mailbox.
295. DONE Fastmail provides me with an API token to login via JMAP rather than username
30 and password. Add the appropriate support for this into their API, which is
31 also explained over at https://www.fastmail.com/dev/. The summary is that the
32 auth token needs to add an Authorization header set to "Bearer {value}",
33 where {value} is the value of the token to your API request.
346. DONE Add an example "fastmail_list" binary that will use the authentication token
35 from a JMAP_API_TOKEN env variable and connect to the Fastmail endpoint
36 at https://api.fastmail.com/jmap/session and list the last 100 email with
37 subjects and sender details to stdout.
38