mail-threading 0.1.1

JWZ email threading (RFC 5256). Reconstruct message threads from References/In-Reply-To headers, with subject fallback for broken clients.
Documentation
{
  "name": "subject-fallback-groups-headerless",
  "description": "Headerless replies with the same normalized subject are merged.",
  "spec": {
    "source": "JWZ",
    "url": "https://www.jwz.org/doc/threading.html",
    "behavior": "subject fallback joins messages with the same base subject when no headers exist"
  },
  "input": [
    {
      "id": "<subject-root@example>",
      "message_id": "<subject-root@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "Hello",
      "date": "2026-05-15T09:00:00Z"
    },
    {
      "id": "<subject-reply@example>",
      "message_id": "<subject-reply@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "Re: Hello",
      "date": "2026-05-15T09:05:00Z"
    },
    {
      "id": "<subject-localized@example>",
      "message_id": "<subject-localized@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "AW: Hello",
      "date": "2026-05-15T09:10:00Z"
    }
  ],
  "expected": {
    "threads": [
      {
        "root": "<subject-root@example>",
        "messages": [
          "<subject-root@example>",
          "<subject-reply@example>",
          "<subject-localized@example>"
        ]
      }
    ]
  }
}