ComposioHQ/composio · error · Error

Building Beeper iMessage local-tool binaries requires macOS

Error message

Building Beeper iMessage local-tool binaries requires macOS and the Swift toolchain.

What it means

The build script compiles Swift imessage-cli binaries using macOS-only tooling (swift build, the Accessibility APIs). It hard-fails on any non-darwin platform so Linux/Windows CI doesn't produce confusing downstream errors.

Source

Thrown at ts/packages/cli-local-tools/scripts/build-beeper-imessage-binaries.ts:66

  'Accessibility+Value.swift',
] as const;

const betterSwiftAxConstantReferencePattern =
  /\bkAX[A-Za-z0-9]+(?:Action|ParameterizedAttribute|Attribute|Notification|Subrole|Role|Value)\b/g;
const betterSwiftAxConstantPattern =
  /^kAX(.+?)(Action|ParameterizedAttribute|Attribute|Notification|Subrole|Role|Value)$/;

const betterSwiftAxConstantLiteral = (constantName: string): string => {
  const match = betterSwiftAxConstantPattern.exec(constantName);
  if (!match) {
    throw new Error(`Unsupported BetterSwiftAX constant fallback: ${constantName}`);
  }
  return `"AX${match[1]}"`;
};

const ensurePlatform = () => {
  if (process.platform !== 'darwin') {
    throw new Error(
      'Building Beeper iMessage local-tool binaries requires macOS and the Swift toolchain.'
    );
  }
};

const ensureSubmodule = async () => {
  if (await exists(path.join(submodulePath, 'Package.swift'))) return;

  console.log(`Initializing ${submoduleRelativePath} submodule...`);
  await $`git submodule update --init --recursive -- ${submoduleRelativePath}`.cwd(repoRoot);

  if (!(await exists(path.join(submodulePath, 'Package.swift')))) {
    throw new Error(
      `Missing platform-imessage submodule at ${submoduleRelativePath}. Run: git submodule update --init --recursive -- ${submoduleRelativePath}`
    );
  }
};

View on GitHub (pinned to 64b1b85502)

Solutions

  1. Run the script on a Mac with Xcode/Swift installed (check with `swift --version`).
  2. Skip/gate the script in CI behind a macOS runner or an `process.platform === 'darwin'` condition.

Example fix

// package.json / CI
"scripts": { "build:imessage": "node -e \"if (process.platform==='darwin') require('./scripts/build-beeper-imessage-binaries.ts') \"" }
Defensive patterns

Strategy: validation

Validate before calling

if (process.platform !== 'darwin') {
  console.warn('Skipping Beeper iMessage binary build (requires macOS).');
  process.exit(0);
}

Type guard

const isDarwin = (p: NodeJS.Platform): boolean => p === 'darwin';

Prevention

When it happens

Trigger: Running scripts/build-beeper-imessage-binaries.ts with process.platform !== 'darwin' (Linux or Windows).

Common situations: Generic Linux CI pipelines that run all package scripts; contributors on Linux/Windows trying to build the full local-tools workspace.

Related errors


AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28). Data as JSON: /api/errors/9e4f8442729631cc. Report an issue: GitHub.