Today the envelope exists in several hands: pg-js buildMime/extract, Outlook's hand-rolled multipart MIME parser (src/lib/mime.ts), per-app detection logic, and three inconsistent meanings of the x-postguard header (cryptify stamps a pg-core version, addons stamp a hardcoded "0.1.0" marker, decrypt flows stamp "decrypted"). The audit traces multiple cross-client breakages to this duplication (tier-3 detection, data.bin zip asymmetry).
After the app imports land: export detection/parse helpers from packages/pg-js, delete the per-app parsers, and document the header semantics once. Depends on the four import issues.
Child of the monorepo umbrella; part of encryption4all/postguard#247 (workstream B).
Today the envelope exists in several hands: pg-js
buildMime/extract, Outlook's hand-rolled multipart MIME parser (src/lib/mime.ts), per-app detection logic, and three inconsistent meanings of thex-postguardheader (cryptify stamps a pg-core version, addons stamp a hardcoded "0.1.0" marker, decrypt flows stamp "decrypted"). The audit traces multiple cross-client breakages to this duplication (tier-3 detection, data.bin zip asymmetry).After the app imports land: export detection/parse helpers from
packages/pg-js, delete the per-app parsers, and document the header semantics once. Depends on the four import issues.Child of the monorepo umbrella; part of encryption4all/postguard#247 (workstream B).