Skip to content
CAI
Software that uses CAICheck a score

openclaw/imsg

64.2

Adequate · 15 November 2026

21.9k

lines of production code

Swift

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Introduce IMCore bridge CLI commands for chat and message management

This change adds a new set of CLI commands in \Sources/imsg/Commands\ that interact with the IMCore bridge (requiring \imsg launch\ with SIP disabled) to manage iMessage chats and messages. Users can now create chats (\chat-create\), manage group properties like names and photos (\chat-name\, \chat-photo\), and modify participants (\chat-add-member\, \chat-remove-member\). It also introduces message manipulation commands including sending attachments (\send-attachment\), editing (\edit\), unsending (\unsend\), deleting (\delete-message\), and sending tapback reactions (\tapback\). Additionally, it provides commands for inspecting chat backgrounds (\chat-background\), listing recent conversations (\chats\), viewing message history (\history\), and checking account status (\account\).

Sources/imsg/Commands · high confidence

Introduce secure, cross-platform IMsgCore foundation with hardened IPC and contact resolution

This change establishes the core \IMsgCore\ module, replacing previous ad-hoc implementations with a structured, secure foundation. It adds a robust contact resolution system that supports both native macOS Contacts and a fallback direct-read of the AddressBook SQLite store (for environments like SSH without Contacts framework access). Message delivery is hardened via a new \BridgeLaunchCoordinator\ that serializes Messages.app launches and enforces strict security on IPC paths (rejecting symlinks, enforcing 0700/0600 permissions). The module also introduces secure attachment handling via \AttachmentSource\ (using \O\_NOFOLLOW\ and \openat\ to prevent symlink attacks) and bounded external process execution for AppleScript and FFmpeg conversions, ensuring no hangs or unbounded resource usage.

Sources/IMsgCore · high confidence

Introduce structured CLI and RPC interfaces for iMessage management

The imsg module now provides a structured command-line interface and an RPC server for interacting with iMessage and SMS data. Users can now access detailed message metadata in JSON output, including thread originator GUIDs, reply context (text and sender), and native poll events. The new CLI supports commands for sending messages, managing reactions, and querying chat history, while the RPC layer exposes methods for real-time event watching, message sending with tracked IDs, and poll interactions. Chat targeting is now more robust, supporting resolution by chat ID, identifier, or GUID, and allowing recipient names to be resolved via the system Contacts framework. Attachment display and poll voting are now handled with dedicated logic, providing clearer output for attachments and detailed snapshots of poll selections.

Sources/imsg · high confidence

Introduce v2 bridge helper with hardened security and new messaging capabilities

The IMsgHelper module has been restructured into a new v2 bridge architecture that replaces the legacy single-file IPC with a secure, queue-based directory system. This update hardens security by enforcing 0700 permissions on IPC directories and rejecting any file paths that traverse symbolic links, preventing potential data exfiltration. Functionally, the bridge now supports sending native iMessage polls (including votes and unvotes), stickers, and rich links, while also enabling Name & Photo sharing features. The bootstrap process has been adjusted to delay initialization on the main queue to ensure stability on macOS 26, and attachment staging is now properly scoped to chat GUIDs to ensure reliable delivery.

Sources/IMsgHelper · high confidence

New build and documentation site scripts

Added a suite of new scripts to support the project's build and documentation workflows. The \build-universal.sh\ script now handles macOS universal binaries, explicitly including the arm64e architecture slice for the bridge helper to ensure compatibility with macOS 26 Messages. A new \build-linux.sh\ script enables static Linux releases using Swift 6.4's native build system. Documentation is now built via \build-docs-site.mjs\, which generates a static site with a table of contents, syntax highlighting, and a dark mode theme, and includes a \llms.txt\ index for AI agents. Supporting scripts include \patch-deps.sh\ to fix dependency bundle lookups and privacy manifests, \generate-version.sh\ to produce version metadata, and \check-linux.sh\ to validate the Linux build in Docker.

scripts · high confidence

Behavioural changes

Add Info.plist with usage descriptions for Messages and Contacts

The imsg resource bundle now includes an Info.plist file that declares the app's bundle identifiers and specifies usage descriptions for NSAppleEvents and NSContacts. This ensures the application properly requests permission to send messages via Messages.app and resolve contact names for conversations, addressing previous missing privacy declarations.

Sources/imsg/Resources · high confidence

Added macOS entitlements for Apple Events and Address Book access

A new entitlements file (imsg.entitlements) has been added to the Resources directory, granting the application permissions to access Apple Events for automation and to read data from the user's Address Book. This change enables the app to resolve contact names and interact with system automation features on macOS.

Resources · high confidence

Test coverage

Added Linux-specific test suite for core messaging components; Added comprehensive test coverage for IMsgCore core components; Added tests for iMessage bridge helper ownership, chat creation, and message identity; Expanded test coverage for CLI commands and bridge integration.

Dependencies

Initial Swift Package Manager configuration for imsg

The project now uses Swift Package Manager for dependency management and build configuration. The package defines a core library (IMsgCore) and a CLI executable (imsg), targeting macOS 14 and Linux. It integrates Commander for CLI parsing, SQLite.swift for database access, CSQLite for Linux compatibility, and PhoneNumberKit (version 5.0.11) for phone number normalization.

(dependencies) · high confidence

Housekeeping

Initial repository scaffolding and configuration

The repository is initialized with core configuration files including a SwiftLint configuration, a Makefile for build and test automation, a Crabbox infrastructure definition, and a comprehensive changelog documenting versions from 0.1.0 through 0.15.10. The project is established as a Swift 6 CLI tool for iMessage/SMS interaction, with the version set to 0.15.10 and copyright updated to 2026.

(repo-wide) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 60 → 64 (+4.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 76 → 70 (-6.2)
  • Architecture 88 → 96 (+8.2)
  • Maturity 65 → 68 (+3.5)
  • Readiness 45 → 53 (+8.0)
  • Security 87 → 78 (-8.8)
  • Performance 78 → 100 (+21.7)

Resolved (34)

  • Duplicated block (11 lines × 2) (Sources/IMsgCore/MessageStore+MessageConstruction.swift)
  • Duplicated block (11 lines × 2) (Sources/imsg/Commands/BridgeMessagingCommands.swift)
  • Duplicated block (11 lines × 2) (Sources/imsg/Commands/StickerCommand.swift)
  • Duplicated block (11–13 lines × 3) (Sources/imsg/RPCServer+ChatHandlers.swift)
  • Duplicated block (12 lines × 2) (Sources/IMsgCore/IMsgBridgeClient.swift)
  • Duplicated block (12 lines × 3) (Sources/IMsgCore/MessageSendStatus.swift)
  • Duplicated block (14–15 lines × 2) (Sources/imsg/RPCServer+BridgeEventHandlers.swift)
  • Duplicated block (15–17 lines × 2) (Sources/imsg/RPCServer.swift)
  • Duplicated block (18 lines × 2) (Sources/imsg/RPCServer.swift)
  • Duplicated block (5 lines × 2) (Sources/IMsgCore/AttachmentResolver.swift)
  • Duplicated block (6 lines × 3) (Sources/IMsgCore/MessageStore+Chats.swift)
  • Duplicated block (7 lines × 2) (Sources/IMsgCore/MessageStore+SentMessages.swift)
  • Duplicated block (8 lines × 2) (Sources/IMsgCore/TypingIndicator.swift)
  • Duplicated block (8 lines × 2) (Sources/imsg/Commands/HistoryCommand.swift)
  • FileTooLong: scripts/build-docs-site.mjs (scripts/build-docs-site.mjs)
  • Hotspot: Sources/IMsgCore/MessageWatcher.swift (Sources/IMsgCore/MessageWatcher.swift)
  • Hotspot: Sources/imsg/RPCServer+BridgeMessageHandlers.swift (Sources/imsg/RPCServer+BridgeMessageHandlers.swift)
  • Hotspot: Sources/imsg/RPCServer+StickerHandlers.swift (Sources/imsg/RPCServer+StickerHandlers.swift)
  • Hotspot: Sources/imsg/RPCServer+Support.swift (Sources/imsg/RPCServer+Support.swift)
  • Hotspot: Sources/imsg/RPCServer+WatchHandlers.swift (Sources/imsg/RPCServer+WatchHandlers.swift)
  • …and 14 more

New (49)

  • Duplicated block (10 lines × 2) (Sources/imsg/Commands/SendCommand.swift)
  • Duplicated block (10–12 lines × 4) (Sources/imsg/RPCServer+ChatHandlers.swift)
  • Duplicated block (13 lines × 2) (Sources/IMsgCore/MessageStore+MessageConstruction.swift)
  • Duplicated block (14–15 lines × 2) (Sources/imsg/RPCServer+BridgeEventHandlers.swift)
  • Duplicated block (15–17 lines × 2) (Sources/imsg/RPCServer.swift)
  • Duplicated block (16 lines × 2) (Sources/imsg/Commands/StickerCommand.swift)
  • Duplicated block (21 lines × 2) (Sources/imsg/RPCServer.swift)
  • Duplicated block (8 lines × 2) (Sources/imsg/Commands/HistoryCommand.swift)
  • Edited copies of one member (3 members, 16+ corresponding lines) (Sources/imsg/RPCServer+BridgeMessageSupport.swift)
  • Edited copies of one member (3 members, 16+ corresponding lines) (Sources/imsg/RPCServer+ChatHandlers.swift)
  • Edited copies of one member (3 members, 6+ corresponding lines) (Sources/IMsgCore/MessagePollDecoder.swift)
  • Edited copies of one member (5 members, 7+ corresponding lines) (Sources/imsg/RPCParameters.swift)
  • Edited copies of one member (5 members, 7+ corresponding lines) (Sources/imsg/RPCServer+BridgeMessageHandlers.swift)
  • Edited copy of a member (10 corresponding lines) (Sources/imsg/Commands/CompletionsCommand.swift)
  • Edited copy of a member (12 corresponding lines) (Sources/IMsgCore/PollFacts.swift)
  • Edited copy of a member (13 corresponding lines) (Sources/IMsgCore/MessageStore+SentMessages.swift)
  • Edited copy of a member (13 corresponding lines) (Sources/IMsgCore/MessagesLauncher.swift)
  • Edited copy of a member (14 corresponding lines) (Sources/IMsgCore/BridgeFailureClassifier.swift)
  • Edited copy of a member (15 corresponding lines) (Sources/IMsgCore/MessagePolls.swift)
  • Edited copy of a member (15 corresponding lines) (Sources/imsg/RPCParameters.swift)
  • …and 29 more

Changes since last survey

  • 21 commits — 7 feature/other, 14 fixes

By area

  • (root) — 10 commits
  • Sources/IMsgCore — 4 commits
  • Sources/IMsgHelper — 3 commits
  • Sources/imsg — 3 commits
  • Tests/imsgTests — 1 commit

Notable commits

  • fix: fix(ci): schedule weekly CodeQL main scans (#380)
  • fix: fix(helper): set message subject via IMMessageItem setSubject: on macOS 26 (#376)
  • fix: fix(launch): preserve readiness timeout in the bridge login agent (#374)
  • fix: fix(rich-link): let existing any; chats reach the bridge service check (#375)
  • fix: fix(send): verify iMessage sends in unified chats (#373)
  • fix: fix: delete messages outside the loaded transcript (#379)
  • fix: fix: detect unsends recorded as retracted parts (#371)
  • fix: fix: emit bridge typing events from chat item changes (#378)
  • fix: fix: format AppleScript error numbers with ASCII signs (#395)
  • fix: fix: mark pre-dispatch rich-link refusals as not started (#387)
  • fix: fix: preserve recoverable chat deletion (#383)
  • fix: fix: preserve uppercase GUIDs for tracked sends (#391)
  • fix: fix: read custom reactions from their emoji column (#396)
  • fix: fix: verify recovered and tracked send receipts (#399)
  • change: build(deps): update PhoneNumberKit to 5.0.13 (#384)
  • change: build(deps): update phone metadata and CodeQL (#400)
  • change: chore: prepare imsg 0.21.0 release
  • change: docs: remove duplicate tracked-send changelog entry (#401)
  • change: feat: explicitly set the Messages Name and Photo
  • change: feat: mention people in rich and multipart sends
  • …and 1 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

openclaw/imsg was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 264f9252166cf59a586547ea8df0c1721229f83b — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.