Skip to content

feat: binary content support with encoding flag #279

@flyingrobots

Description

@flyingrobots

Problem

M13 VESSEL content system is text-only by design. readContent hardcodes encoding: 'utf-8', which corrupts binary blobs. Non-UTF-8 content intentionally fails the integrity check, but there's no user-facing guard — a user could content set a PNG and get a confusing integrity error on content show.

Proposed Solution

  1. Add --encoding flag to content set (default: utf-8, option: base64)
  2. Store _content.encoding as a WARP property
  3. readContent uses stored encoding to correctly retrieve binary blobs
  4. Optionally: validate MIME against encoding (reject image/png with utf-8)
  5. Add a guard in contentSet that warns/rejects binary MIME types until encoding support lands

Context

Intentionally deferred from M13. Surfaced across 3 CodeRabbit review threads (PR #276).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions