Skip to content

Support inbound iMessage image attachments #189

Description

@owainlewis

Outcome

An accepted iMessage can include supported local image attachments, which Push forwards through the shared image pipeline to Codex, Pi, or Claude.

Dependencies

Constraints

  • Read attachment metadata through the Messages database without reading image bytes during polling.
  • Join attachments to their message while preserving one inbound message per Messages row.
  • Read attachment bytes only inside the accepted worker.
  • Canonicalize and verify each path under the Messages attachment directory before opening it.
  • Reject missing files, directories, escaping symlinks, and unsupported types.
  • Support JPEG, PNG, and WebP directly.
  • Convert HEIC and HEIF to a private temporary JPEG using macOS system image tooling, then apply the shared size limit to the result.
  • Preserve text decoding, reply-marker filtering, group rejection, cursors, and sender allowlists.
  • Document the added Full Disk Access implications and local conversion behavior.

Acceptance criteria

  • Image-only iMessages from accepted conversations are processed.
  • Text plus image messages preserve both inputs.
  • Several supported attachments preserve database order up to the shared limit.
  • Polling does not load attachment bytes.
  • Paths outside the Messages attachment directory are rejected.
  • Missing and unsupported attachments receive an actionable reply without invoking the backend.
  • HEIC input is converted to JPEG and all temporary files are removed after the turn.
  • Existing iMessage text behavior and cursor tests pass.
  • Codex, Pi, and Claude receive the prepared images.
  • Documentation covers formats, limits, privacy, and macOS permissions.

Checks

cargo test --locked imessage
cargo test --locked gateway
cargo fmt --all --check
cargo clippy --locked --all-targets -- -D warnings
cargo build --locked
cargo test --locked
mkdocs build --strict

Manually send a JPEG screenshot and an iPhone HEIC photo through iMessage. Confirm both are understood and no converted files remain.

Out of scope

  • iMessage image replies
  • Videos, Live Photo video components, stickers, PDFs, and other documents
  • Group chats
  • Durable storage of image bytes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions