agent-messenger 2.20.3 → 2.20.4
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/.claude-plugin/plugin.json +1 -1
- package/dist/package.json +1 -1
- package/dist/src/platforms/webex/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/message.js +15 -39
- package/dist/src/platforms/webex/commands/message.js.map +1 -1
- package/package.json +1 -1
- package/skills/agent-channeltalk/SKILL.md +1 -1
- package/skills/agent-channeltalkbot/SKILL.md +1 -1
- package/skills/agent-discord/SKILL.md +1 -1
- package/skills/agent-discordbot/SKILL.md +1 -1
- package/skills/agent-instagram/SKILL.md +1 -1
- package/skills/agent-kakaotalk/SKILL.md +1 -1
- package/skills/agent-line/SKILL.md +1 -1
- package/skills/agent-slack/SKILL.md +1 -1
- package/skills/agent-slackbot/SKILL.md +1 -1
- package/skills/agent-teams/SKILL.md +1 -1
- package/skills/agent-telegram/SKILL.md +1 -1
- package/skills/agent-telegrambot/SKILL.md +1 -1
- package/skills/agent-webex/SKILL.md +1 -1
- package/skills/agent-wechatbot/SKILL.md +1 -1
- package/skills/agent-whatsapp/SKILL.md +1 -1
- package/skills/agent-whatsappbot/SKILL.md +1 -1
- package/src/platforms/webex/commands/message.test.ts +4 -0
- package/src/platforms/webex/commands/message.ts +16 -43
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-messenger",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.4",
|
|
4
4
|
"description": "Messaging platform interaction skills for AI agents. Interact with Slack, Discord, Microsoft Teams, Webex, Telegram, Telegram Bot, WhatsApp, LINE, Instagram, KakaoTalk, and Channel Talk - send messages, read channels, manage reactions, upload files, and more through simple CLI interfaces.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "agent-messenger",
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-messenger",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.4",
|
|
4
4
|
"description": "Multi-platform messaging CLI for AI agents (Slack, Discord, Teams, Webex, Telegram, Telegram Bot, WhatsApp, LINE, Instagram, KakaoTalk, Channel Talk)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/webex/commands/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/webex/commands/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AA6BnC,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAW9G;AAED,wBAAsB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ/F;AAED,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAanH;AAED,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,OAAO,CAAC,IAAI,CAAC,CAYf;AAED,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAChD,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,eAAO,MAAM,cAAc,SAyDxB,CAAA"}
|
|
@@ -2,6 +2,16 @@ import { Command } from 'commander';
|
|
|
2
2
|
import { handleError } from '../../../shared/utils/error-handler.js';
|
|
3
3
|
import { formatOutput } from '../../../shared/utils/output.js';
|
|
4
4
|
import { WebexClient } from '../client.js';
|
|
5
|
+
function formatMessageOutput(message) {
|
|
6
|
+
return {
|
|
7
|
+
id: message.id,
|
|
8
|
+
roomId: message.roomId,
|
|
9
|
+
text: message.text,
|
|
10
|
+
html: message.html,
|
|
11
|
+
personEmail: message.personEmail,
|
|
12
|
+
created: message.created,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
5
15
|
async function withWebexClient(run) {
|
|
6
16
|
const client = new WebexClient();
|
|
7
17
|
try {
|
|
@@ -15,14 +25,7 @@ async function withWebexClient(run) {
|
|
|
15
25
|
export async function sendAction(spaceId, text, options) {
|
|
16
26
|
try {
|
|
17
27
|
const message = await withWebexClient((client) => client.sendMessage(spaceId, text, { markdown: options.markdown }));
|
|
18
|
-
|
|
19
|
-
id: message.id,
|
|
20
|
-
roomId: message.roomId,
|
|
21
|
-
text: message.text,
|
|
22
|
-
personEmail: message.personEmail,
|
|
23
|
-
created: message.created,
|
|
24
|
-
};
|
|
25
|
-
console.log(formatOutput(output, options.pretty));
|
|
28
|
+
console.log(formatOutput(formatMessageOutput(message), options.pretty));
|
|
26
29
|
}
|
|
27
30
|
catch (error) {
|
|
28
31
|
handleError(error);
|
|
@@ -32,13 +35,7 @@ export async function listAction(spaceId, options) {
|
|
|
32
35
|
try {
|
|
33
36
|
const limit = options.limit ?? 50;
|
|
34
37
|
const messages = await withWebexClient((client) => client.listMessages(spaceId, { max: limit }));
|
|
35
|
-
const output = messages.map(
|
|
36
|
-
id: msg.id,
|
|
37
|
-
roomId: msg.roomId,
|
|
38
|
-
text: msg.text,
|
|
39
|
-
personEmail: msg.personEmail,
|
|
40
|
-
created: msg.created,
|
|
41
|
-
}));
|
|
38
|
+
const output = messages.map(formatMessageOutput);
|
|
42
39
|
console.log(formatOutput(output, options.pretty));
|
|
43
40
|
}
|
|
44
41
|
catch (error) {
|
|
@@ -48,14 +45,7 @@ export async function listAction(spaceId, options) {
|
|
|
48
45
|
export async function getAction(messageId, options) {
|
|
49
46
|
try {
|
|
50
47
|
const message = await withWebexClient((client) => client.getMessage(messageId));
|
|
51
|
-
|
|
52
|
-
id: message.id,
|
|
53
|
-
roomId: message.roomId,
|
|
54
|
-
text: message.text,
|
|
55
|
-
personEmail: message.personEmail,
|
|
56
|
-
created: message.created,
|
|
57
|
-
};
|
|
58
|
-
console.log(formatOutput(output, options.pretty));
|
|
48
|
+
console.log(formatOutput(formatMessageOutput(message), options.pretty));
|
|
59
49
|
}
|
|
60
50
|
catch (error) {
|
|
61
51
|
handleError(error);
|
|
@@ -79,14 +69,7 @@ export async function editAction(messageId, spaceId, text, options) {
|
|
|
79
69
|
const message = await withWebexClient((client) => client.editMessage(messageId, spaceId, text, {
|
|
80
70
|
markdown: options.markdown,
|
|
81
71
|
}));
|
|
82
|
-
|
|
83
|
-
id: message.id,
|
|
84
|
-
roomId: message.roomId,
|
|
85
|
-
text: message.text,
|
|
86
|
-
personEmail: message.personEmail,
|
|
87
|
-
created: message.created,
|
|
88
|
-
};
|
|
89
|
-
console.log(formatOutput(output, options.pretty));
|
|
72
|
+
console.log(formatOutput(formatMessageOutput(message), options.pretty));
|
|
90
73
|
}
|
|
91
74
|
catch (error) {
|
|
92
75
|
handleError(error);
|
|
@@ -95,14 +78,7 @@ export async function editAction(messageId, spaceId, text, options) {
|
|
|
95
78
|
export async function dmAction(email, text, options) {
|
|
96
79
|
try {
|
|
97
80
|
const message = await withWebexClient((client) => client.sendDirectMessage(email, text, { markdown: options.markdown }));
|
|
98
|
-
|
|
99
|
-
id: message.id,
|
|
100
|
-
roomId: message.roomId,
|
|
101
|
-
text: message.text,
|
|
102
|
-
personEmail: message.personEmail,
|
|
103
|
-
created: message.created,
|
|
104
|
-
};
|
|
105
|
-
console.log(formatOutput(output, options.pretty));
|
|
81
|
+
console.log(formatOutput(formatMessageOutput(message), options.pretty));
|
|
106
82
|
}
|
|
107
83
|
catch (error) {
|
|
108
84
|
handleError(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../../src/platforms/webex/commands/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAGvC,KAAK,UAAU,eAAe,CAAI,GAAwC;IACxE,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAA;IAChC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,KAAK,EAAE,CAAA;QACpB,OAAO,MAAM,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,OAAO,EAAE,CAAA;IACxB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,OAAe,EACf,IAAY,EACZ,OAAiD;IAEjD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,e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.20.
|
|
3
|
+
"version": "2.20.4",
|
|
4
4
|
"description": "Multi-platform messaging CLI for AI agents (Slack, Discord, Teams, Webex, Telegram, Telegram Bot, WhatsApp, LINE, Instagram, KakaoTalk, Channel Talk)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-channeltalk
|
|
3
3
|
description: Interact with Channel Talk using extracted desktop app or browser credentials - read chats, send messages, search messages, manage groups
|
|
4
|
-
version: 2.20.
|
|
4
|
+
version: 2.20.4
|
|
5
5
|
allowed-tools: Bash(agent-channeltalk:*)
|
|
6
6
|
metadata:
|
|
7
7
|
openclaw:
|
|
@@ -8,6 +8,7 @@ const mockMessage = {
|
|
|
8
8
|
roomId: 'space_456',
|
|
9
9
|
roomType: 'group' as const,
|
|
10
10
|
text: 'Hello world',
|
|
11
|
+
html: '<p>Hello <a href="https://example.com">world</a></p>',
|
|
11
12
|
personId: 'person_789',
|
|
12
13
|
personEmail: 'user@example.com',
|
|
13
14
|
created: '2025-01-29T10:00:00.000Z',
|
|
@@ -18,6 +19,7 @@ const mockMessage2 = {
|
|
|
18
19
|
roomId: 'space_456',
|
|
19
20
|
roomType: 'group' as const,
|
|
20
21
|
text: 'Second message',
|
|
22
|
+
html: '<p>Second message</p>',
|
|
21
23
|
personId: 'person_789',
|
|
22
24
|
personEmail: 'user@example.com',
|
|
23
25
|
created: '2025-01-29T10:01:00.000Z',
|
|
@@ -133,6 +135,7 @@ it('calls listMessages with limit and outputs array', async () => {
|
|
|
133
135
|
const output = consoleLogSpy.mock.calls[0][0]
|
|
134
136
|
expect(output).toContain('msg_123')
|
|
135
137
|
expect(output).toContain('msg_124')
|
|
138
|
+
expect(output).toContain('https://example.com')
|
|
136
139
|
})
|
|
137
140
|
|
|
138
141
|
it('calls getMessage with correct id and outputs result', async () => {
|
|
@@ -143,6 +146,7 @@ it('calls getMessage with correct id and outputs result', async () => {
|
|
|
143
146
|
const output = consoleLogSpy.mock.calls[0][0]
|
|
144
147
|
expect(output).toContain('msg_123')
|
|
145
148
|
expect(output).toContain('user@example.com')
|
|
149
|
+
expect(output).toContain('https://example.com')
|
|
146
150
|
})
|
|
147
151
|
|
|
148
152
|
it('calls deleteMessage and outputs deleted id when --force flag is set', async () => {
|
|
@@ -6,6 +6,17 @@ import { formatOutput } from '@/shared/utils/output'
|
|
|
6
6
|
import { WebexClient } from '../client'
|
|
7
7
|
import type { WebexMessage } from '../types'
|
|
8
8
|
|
|
9
|
+
function formatMessageOutput(message: WebexMessage) {
|
|
10
|
+
return {
|
|
11
|
+
id: message.id,
|
|
12
|
+
roomId: message.roomId,
|
|
13
|
+
text: message.text,
|
|
14
|
+
html: message.html,
|
|
15
|
+
personEmail: message.personEmail,
|
|
16
|
+
created: message.created,
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
async function withWebexClient<T>(run: (client: WebexClient) => Promise<T>): Promise<T> {
|
|
10
21
|
const client = new WebexClient()
|
|
11
22
|
try {
|
|
@@ -24,15 +35,7 @@ export async function sendAction(
|
|
|
24
35
|
try {
|
|
25
36
|
const message = await withWebexClient((client) => client.sendMessage(spaceId, text, { markdown: options.markdown }))
|
|
26
37
|
|
|
27
|
-
|
|
28
|
-
id: message.id,
|
|
29
|
-
roomId: message.roomId,
|
|
30
|
-
text: message.text,
|
|
31
|
-
personEmail: message.personEmail,
|
|
32
|
-
created: message.created,
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
console.log(formatOutput(output, options.pretty))
|
|
38
|
+
console.log(formatOutput(formatMessageOutput(message), options.pretty))
|
|
36
39
|
} catch (error) {
|
|
37
40
|
handleError(error as Error)
|
|
38
41
|
}
|
|
@@ -43,13 +46,7 @@ export async function listAction(spaceId: string, options: { limit?: number; pre
|
|
|
43
46
|
const limit = options.limit ?? 50
|
|
44
47
|
const messages = await withWebexClient((client) => client.listMessages(spaceId, { max: limit }))
|
|
45
48
|
|
|
46
|
-
const output = messages.map(
|
|
47
|
-
id: msg.id,
|
|
48
|
-
roomId: msg.roomId,
|
|
49
|
-
text: msg.text,
|
|
50
|
-
personEmail: msg.personEmail,
|
|
51
|
-
created: msg.created,
|
|
52
|
-
}))
|
|
49
|
+
const output = messages.map(formatMessageOutput)
|
|
53
50
|
|
|
54
51
|
console.log(formatOutput(output, options.pretty))
|
|
55
52
|
} catch (error) {
|
|
@@ -61,15 +58,7 @@ export async function getAction(messageId: string, options: { pretty?: boolean }
|
|
|
61
58
|
try {
|
|
62
59
|
const message = await withWebexClient((client) => client.getMessage(messageId))
|
|
63
60
|
|
|
64
|
-
|
|
65
|
-
id: message.id,
|
|
66
|
-
roomId: message.roomId,
|
|
67
|
-
text: message.text,
|
|
68
|
-
personEmail: message.personEmail,
|
|
69
|
-
created: message.created,
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
console.log(formatOutput(output, options.pretty))
|
|
61
|
+
console.log(formatOutput(formatMessageOutput(message), options.pretty))
|
|
73
62
|
} catch (error) {
|
|
74
63
|
handleError(error as Error)
|
|
75
64
|
}
|
|
@@ -103,15 +92,7 @@ export async function editAction(
|
|
|
103
92
|
}),
|
|
104
93
|
)
|
|
105
94
|
|
|
106
|
-
|
|
107
|
-
id: message.id,
|
|
108
|
-
roomId: message.roomId,
|
|
109
|
-
text: message.text,
|
|
110
|
-
personEmail: message.personEmail,
|
|
111
|
-
created: message.created,
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
console.log(formatOutput(output, options.pretty))
|
|
95
|
+
console.log(formatOutput(formatMessageOutput(message), options.pretty))
|
|
115
96
|
} catch (error) {
|
|
116
97
|
handleError(error as Error)
|
|
117
98
|
}
|
|
@@ -127,15 +108,7 @@ export async function dmAction(
|
|
|
127
108
|
client.sendDirectMessage(email, text, { markdown: options.markdown }),
|
|
128
109
|
)
|
|
129
110
|
|
|
130
|
-
|
|
131
|
-
id: message.id,
|
|
132
|
-
roomId: message.roomId,
|
|
133
|
-
text: message.text,
|
|
134
|
-
personEmail: message.personEmail,
|
|
135
|
-
created: message.created,
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
console.log(formatOutput(output, options.pretty))
|
|
111
|
+
console.log(formatOutput(formatMessageOutput(message), options.pretty))
|
|
139
112
|
} catch (error) {
|
|
140
113
|
handleError(error as Error)
|
|
141
114
|
}
|