| Age | Commit message (Collapse) | Author |
|
An iMessage with several photos arrived with only the first one in the
channel tag: handleInbound took the first image attachment and stopped.
Collect every image attachment instead (same filters as before) and pass
each path in the notification meta as image_path, image_path_2,
image_path_3, ... so the model can Read all of them. A single image still
produces exactly image_path, so existing behaviour is unchanged.
Numbered keys rather than an array or a joined list: Claude Code accepts
only string values in channel meta and renders each key as an attribute
on the <channel> tag, so keys must be plain identifiers; one key per path
also avoids inventing a delimiter for sender-controlled filenames. The
attachments query gains ORDER BY a.ROWID so the numbering follows
attachment ROWID (creation) order. Instructions and README updated to
match; version 0.1.0 -> 0.2.0 in plugin.json and package.json.
Known limits, unchanged by this patch: attachments still downloading
when the message row is first polled (filename NULL) are skipped and,
since the poll watermark has already passed the message, never picked up
later; HEIC is passed through unconverted; attachments with a NULL
mime_type still pass the image filter; no cap on images per message.
|
|
|
|
Brings the imessage channel to parity with recent telegram/discord
hardening:
- Permission-relay capability: declare claude/channel/permission,
handle inbound permission_request notifications by fanning out to
allowlisted DM chats + self-chat, intercept "yes/no <id>" replies
after the gate check and emit structured permission events instead
of relaying as chat. Groups excluded per single-user-mode policy.
- Global unhandledRejection/uncaughtException handlers so the server
logs instead of dying silently.
- IMESSAGE_STATE_DIR env override for the state directory.
- .unref() on both setInterval timers so they don't block shutdown.
- stdin EOF / SIGTERM / SIGINT shutdown handler that closes chat.db
and exits cleanly instead of leaving a zombie poll loop.
Adds zod as a direct dep (already transitively present via the MCP SDK)
for the notification handler schema.
|
|
iMessage bridge for Claude Code. Reads ~/Library/Messages/chat.db
directly for history and new-message polling; sends via AppleScript
to Messages.app. macOS only.
Built-in access control: inbound messages are gated by an allowlist
(default: self-chat only), outbound sends are scoped to the same
allowlist. The /imessage:access skill manages allowlists and policy.
Requires Full Disk Access and Automation TCC grants — both prompted
by macOS on first use.
Ships full source — server.ts runs locally via bun, started by the
.mcp.json command.
|