惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
A
About on SuperTechFans
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
博客园 - 聂微东
博客园 - Franky
Apple Machine Learning Research
Apple Machine Learning Research
罗磊的独立博客
量子位
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
The GitHub Blog
The GitHub Blog
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Stack Overflow Blog
Stack Overflow Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(imessage): report non-mac default imsg hosts · opencl...
vincentkoc · 2026-05-08 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -2,7 +2,7 @@

22

"name": "@openclaw/imessage",

33

"version": "2026.5.6",

44

"private": true,

5-

"description": "OpenClaw iMessage channel plugin",

5+

"description": "OpenClaw iMessage channel plugin using imsg on a signed-in Mac",

66

"type": "module",

77

"devDependencies": {

88

"@openclaw/plugin-sdk": "workspace:*"

@@ -19,7 +19,7 @@

1919

"detailLabel": "iMessage",

2020

"docsPath": "/channels/imessage",

2121

"docsLabel": "imessage",

22-

"blurb": "this is still a work in progress.",

22+

"blurb": "iMessage via the imsg CLI on a signed-in Mac or SSH wrapper.",

2323

"aliases": [

2424

"imsg"

2525

],

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

import path from "node:path";

12

import type { BaseProbeResult } from "openclaw/plugin-sdk/channel-contract";

23

import { runCommandWithTimeout } from "openclaw/plugin-sdk/process-runtime";

34

import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot";

@@ -17,6 +18,7 @@ export type IMessageProbe = BaseProbeResult & {

1718

export type IMessageProbeOptions = {

1819

cliPath?: string;

1920

dbPath?: string;

21+

platform?: NodeJS.Platform;

2022

runtime?: RuntimeEnv;

2123

};

2224

@@ -28,6 +30,21 @@ type RpcSupportResult = {

2830
2931

const rpcSupportCache = new Map<string, RpcSupportResult>();

3032
33+

function isDefaultLocalIMessageCliPath(cliPath: string): boolean {

34+

const trimmed = cliPath.trim();

35+

return trimmed === "imsg" || (!trimmed.includes("/") && path.basename(trimmed) === "imsg");

36+

}

37+
38+

export function resolveIMessageNonMacHostError(

39+

cliPath: string,

40+

platform: NodeJS.Platform = process.platform,

41+

): string | undefined {

42+

if (platform === "darwin" || !isDefaultLocalIMessageCliPath(cliPath)) {

43+

return undefined;

44+

}

45+

return "iMessage via the default imsg CLI must run on macOS. Run OpenClaw on the signed-in Messages Mac, or set channels.imessage.cliPath to an SSH wrapper that runs imsg on that Mac.";

46+

}

47+
3148

async function probeRpcSupport(cliPath: string, timeoutMs: number): Promise<RpcSupportResult> {

3249

const cached = rpcSupportCache.get(cliPath);

3350

if (cached) {

@@ -76,6 +93,11 @@ export async function probeIMessage(

7693

const effectiveTimeout =

7794

timeoutMs ?? cfg?.channels?.imessage?.probeTimeoutMs ?? DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS;

7895
96+

const nonMacHostError = resolveIMessageNonMacHostError(cliPath, opts.platform);

97+

if (nonMacHostError) {

98+

return { ok: false, fatal: true, error: nonMacHostError };

99+

}

100+
79101

const detected = await detectBinary(cliPath);

80102

if (!detected) {

81103

return { ok: false, error: `imsg not found (${cliPath})` };

Original file line numberDiff line numberDiff line change

@@ -169,7 +169,8 @@ export function createIMessageCliPathTextInput(

169169

export const imessageCompletionNote = {

170170

title: "iMessage next steps",

171171

lines: [

172-

"This is still a work in progress.",

172+

"Run OpenClaw on the Mac signed into Messages, or set cliPath to an SSH wrapper that runs imsg on that Mac.",

173+

"Linux/Windows hosts cannot run the default local imsg path directly.",

173174

"Ensure OpenClaw has Full Disk Access to Messages DB.",

174175

"Grant Automation permission for Messages when prompted.",

175176

"List chats with: imsg chats --limit 20",

Original file line numberDiff line numberDiff line change

@@ -169,6 +169,24 @@ describe("probeIMessage", () => {

169169

expect(createIMessageRpcClientMock).not.toHaveBeenCalled();

170170

});

171171
172+

it("fails fast for default local imsg probes on non-mac hosts", async () => {

173+

const createIMessageRpcClientMock = vi

174+

.spyOn(clientModule, "createIMessageRpcClient")

175+

.mockResolvedValue({

176+

request: vi.fn(),

177+

stop: vi.fn(),

178+

} as unknown as Awaited<ReturnType<typeof clientModule.createIMessageRpcClient>>);

179+
180+

const result = await probeIMessage(1000, { cliPath: "imsg", platform: "linux" });

181+
182+

expect(result.ok).toBe(false);

183+

expect(result.fatal).toBe(true);

184+

expect(result.error).toMatch(/macOS/i);

185+

expect(result.error).toMatch(/SSH wrapper/i);

186+

expect(setupRuntime.detectBinary).not.toHaveBeenCalled();

187+

expect(createIMessageRpcClientMock).not.toHaveBeenCalled();

188+

});

189+
172190

it("status probe uses account-scoped cliPath and dbPath", async () => {

173191

const probeSpy = vi.spyOn(channelRuntimeModule, "probeIMessageAccount").mockResolvedValue({

174192

ok: true,