@emotion-machine/claw-messenger 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/channel.d.ts +1 -0
- package/dist/channel.js +5 -2
- package/dist/index.js +1 -1
- package/package.json +7 -3
- package/src/types/openclaw.d.ts +1 -1
package/README.md
CHANGED
|
@@ -57,8 +57,17 @@ The plugin registers two tools your agent can call:
|
|
|
57
57
|
2. Create an API key from the dashboard
|
|
58
58
|
3. Install the plugin: `openclaw plugins install @emotion-machine/claw-messenger`
|
|
59
59
|
4. Add the config above with your API key
|
|
60
|
-
5.
|
|
60
|
+
5. Restart OpenClaw so the channel connects
|
|
61
|
+
6. Check the listener before the first controlled send:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
curl https://claw-messenger.onrender.com/api/agent/readiness \
|
|
65
|
+
-H "Authorization: Bearer ${CLAW_API_KEY}"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Continue only after the response is `{"ready":true,"action":"send_controlled_test"}`. If the action is `connect_agent`, restart OpenClaw and check again. Keep the key in the authorization header, never in the URL.
|
|
69
|
+
7. Send one message to a phone you control, reply in the same thread, and confirm the reply reaches your agent
|
|
61
70
|
|
|
62
71
|
## License
|
|
63
72
|
|
|
64
|
-
UNLICENSED
|
|
73
|
+
UNLICENSED
|
package/dist/channel.d.ts
CHANGED
|
@@ -21,4 +21,5 @@ export declare function createGroup(to: string[], text: string): Promise<{
|
|
|
21
21
|
ok: boolean;
|
|
22
22
|
} & SendResult>;
|
|
23
23
|
export declare const clawMessengerPlugin: ChannelPlugin<ResolvedAccount>;
|
|
24
|
+
export declare function handleInboundMessage(data: Record<string, unknown>, accountId: string, account: ResolvedAccount, ctx: any): Promise<void>;
|
|
24
25
|
export {};
|
package/dist/channel.js
CHANGED
|
@@ -439,7 +439,7 @@ export const clawMessengerPlugin = {
|
|
|
439
439
|
// versions doesn't include it. Newer OpenClaw calls this; older versions ignore it.
|
|
440
440
|
clawMessengerPlugin.describeMessageTool = describeClawMessageTool;
|
|
441
441
|
// -- Inbound message handler --
|
|
442
|
-
async function handleInboundMessage(data, accountId, account, ctx) {
|
|
442
|
+
export async function handleInboundMessage(data, accountId, account, ctx) {
|
|
443
443
|
const normalized = normalizeInboundMessage(data);
|
|
444
444
|
if (!normalized.ok) {
|
|
445
445
|
ctx.log?.warn?.(`[${accountId}] Dropping inbound message: ${normalized.reason}`);
|
|
@@ -488,7 +488,10 @@ async function handleInboundMessage(data, accountId, account, ctx) {
|
|
|
488
488
|
agentId: route.agentId,
|
|
489
489
|
});
|
|
490
490
|
const envelopeOptions = runtime.channel.reply.resolveEnvelopeFormatOptions(cfg);
|
|
491
|
-
const previousTimestamp = runtime.channel.session.readSessionUpdatedAt(
|
|
491
|
+
const previousTimestamp = runtime.channel.session.readSessionUpdatedAt({
|
|
492
|
+
storePath,
|
|
493
|
+
sessionKey: routeSessionKey,
|
|
494
|
+
});
|
|
492
495
|
const rawBody = text || (allMedia.length > 0 ? "<media:image>" : "");
|
|
493
496
|
if (!rawBody)
|
|
494
497
|
return;
|
package/dist/index.js
CHANGED
|
@@ -99,7 +99,7 @@ const plugin = {
|
|
|
99
99
|
const ws = getWsClient(status.accountId);
|
|
100
100
|
const diagnostics = ws?.getDiagnostics() ?? { errors: [], connectionLog: [] };
|
|
101
101
|
const report = {
|
|
102
|
-
plugin_version: "0.1.
|
|
102
|
+
plugin_version: "0.1.14",
|
|
103
103
|
node_version: process.version,
|
|
104
104
|
connected: status.connected,
|
|
105
105
|
server_url: status.serverUrl,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emotion-machine/claw-messenger",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "iMessage, RCS & SMS channel plugin for OpenClaw
|
|
3
|
+
"version": "0.1.14",
|
|
4
|
+
"description": "iMessage, RCS & SMS channel plugin for OpenClaw agents, powered by Claw Messenger, the Mac-free iMessage API for AI agents. Send and receive real texts from Linux, Docker, Windows, or any cloud. No phone or Mac required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"openclaw",
|
|
19
19
|
"openclaw-plugin",
|
|
20
20
|
"imessage",
|
|
21
|
+
"imessage-api",
|
|
22
|
+
"ai-agents",
|
|
23
|
+
"no-mac",
|
|
24
|
+
"claw-messenger",
|
|
21
25
|
"rcs",
|
|
22
26
|
"sms",
|
|
23
27
|
"emotion-machine",
|
|
@@ -33,7 +37,7 @@
|
|
|
33
37
|
"build": "tsc",
|
|
34
38
|
"dev": "tsc --watch",
|
|
35
39
|
"clean": "rm -rf dist",
|
|
36
|
-
"test": "npm run build && node --test tests/*.test.mjs",
|
|
40
|
+
"test": "npm run build && node --loader ./tests/openclaw-loader.mjs --test tests/*.test.mjs",
|
|
37
41
|
"prepare": "test -d dist || npm run build",
|
|
38
42
|
"prepublishOnly": "npm run clean && npm run build"
|
|
39
43
|
},
|
package/src/types/openclaw.d.ts
CHANGED
|
@@ -199,7 +199,7 @@ declare module "openclaw/plugin-sdk" {
|
|
|
199
199
|
};
|
|
200
200
|
session: {
|
|
201
201
|
resolveStorePath(store: any, opts?: { agentId?: string }): string;
|
|
202
|
-
readSessionUpdatedAt(
|
|
202
|
+
readSessionUpdatedAt(ctx: { storePath: string; sessionKey: string }): number | null;
|
|
203
203
|
recordSessionMetaFromInbound(ctx: any): Promise<void>;
|
|
204
204
|
recordInboundSession(ctx: any): void;
|
|
205
205
|
updateLastRoute(ctx: any): void;
|