mail-threading 0.1.0

Spec-aligned client-side email threading using RFC 5256/JWZ references.
Documentation
{
  "name": "cycle-in-references",
  "description": "An edge that would create a cycle is ignored and all visible messages remain output.",
  "spec": {
    "source": "JWZ",
    "url": "https://www.jwz.org/doc/threading.html",
    "behavior": "thread construction must avoid parent-child cycles"
  },
  "input": [
    {
      "id": "<cycle-a@example>",
      "message_id": "<cycle-a@example>",
      "in_reply_to": "<cycle-b@example>",
      "references": [
        "<cycle-b@example>"
      ],
      "subject": "Cycle",
      "date": "2026-05-15T09:00:00Z"
    },
    {
      "id": "<cycle-b@example>",
      "message_id": "<cycle-b@example>",
      "in_reply_to": "<cycle-a@example>",
      "references": [
        "<cycle-a@example>"
      ],
      "subject": "Re: Cycle",
      "date": "2026-05-15T09:05:00Z"
    }
  ],
  "expected": {
    "threads": [
      {
        "root": "<cycle-b@example>",
        "messages": [
          "<cycle-a@example>",
          "<cycle-b@example>"
        ]
      }
    ]
  }
}