mail-threading 0.1.3

JWZ email threading (RFC 5256). Reconstruct message threads from References/In-Reply-To headers, with subject fallback for broken clients.
Documentation
{
  "name": "localized-subject-prefixes",
  "description": "Default subject fallback strips common localized reply/forward prefixes.",
  "spec": {
    "source": "JWZ",
    "url": "https://www.jwz.org/doc/threading.html",
    "behavior": "base subject normalization strips reply and forward prefixes"
  },
  "input": [
    {
      "id": "<prefix-root@example>",
      "message_id": "<prefix-root@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "Plan",
      "date": "2026-05-15T09:00:00Z"
    },
    {
      "id": "<prefix-re-numbered@example>",
      "message_id": "<prefix-re-numbered@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "Re[2]: Plan",
      "date": "2026-05-15T09:01:00Z"
    },
    {
      "id": "<prefix-forward@example>",
      "message_id": "<prefix-forward@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "Fwd: Plan",
      "date": "2026-05-15T09:02:00Z"
    },
    {
      "id": "<prefix-aw@example>",
      "message_id": "<prefix-aw@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "AW: Plan",
      "date": "2026-05-15T09:03:00Z"
    },
    {
      "id": "<prefix-sv@example>",
      "message_id": "<prefix-sv@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "SV: Plan",
      "date": "2026-05-15T09:04:00Z"
    },
    {
      "id": "<prefix-antw@example>",
      "message_id": "<prefix-antw@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "Antw: Plan",
      "date": "2026-05-15T09:05:00Z"
    },
    {
      "id": "<prefix-rv@example>",
      "message_id": "<prefix-rv@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "RV: Plan",
      "date": "2026-05-15T09:06:00Z"
    },
    {
      "id": "<prefix-odp@example>",
      "message_id": "<prefix-odp@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "Odp: Plan",
      "date": "2026-05-15T09:07:00Z"
    },
    {
      "id": "<prefix-tr@example>",
      "message_id": "<prefix-tr@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "TR: Plan",
      "date": "2026-05-15T09:08:00Z"
    },
    {
      "id": "<prefix-wg@example>",
      "message_id": "<prefix-wg@example>",
      "in_reply_to": null,
      "references": [],
      "subject": "WG: Plan",
      "date": "2026-05-15T09:09:00Z"
    }
  ],
  "expected": {
    "threads": [
      {
        "root": "<prefix-root@example>",
        "messages": [
          "<prefix-root@example>",
          "<prefix-re-numbered@example>",
          "<prefix-forward@example>",
          "<prefix-aw@example>",
          "<prefix-sv@example>",
          "<prefix-antw@example>",
          "<prefix-rv@example>",
          "<prefix-odp@example>",
          "<prefix-tr@example>",
          "<prefix-wg@example>"
        ]
      }
    ]
  }
}