agent-messenger 2.14.1 → 2.15.0
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/README.md +3 -0
- package/dist/package.json +1 -1
- package/dist/src/platforms/kakaotalk/client.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/client.js +15 -0
- package/dist/src/platforms/kakaotalk/client.js.map +1 -1
- package/dist/src/platforms/kakaotalk/index.d.ts +2 -2
- package/dist/src/platforms/kakaotalk/index.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/index.js +1 -1
- package/dist/src/platforms/kakaotalk/index.js.map +1 -1
- package/dist/src/platforms/kakaotalk/listener.d.ts +1 -1
- package/dist/src/platforms/kakaotalk/listener.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/listener.js +58 -6
- package/dist/src/platforms/kakaotalk/listener.js.map +1 -1
- package/dist/src/platforms/kakaotalk/types.d.ts +46 -1
- package/dist/src/platforms/kakaotalk/types.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/types.js +22 -0
- package/dist/src/platforms/kakaotalk/types.js.map +1 -1
- package/docs/content/docs/cli/kakaotalk.mdx +4 -3
- package/docs/content/docs/sdk/kakaotalk.mdx +2 -0
- 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 +5 -4
- 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/kakaotalk/client.test.ts +61 -0
- package/src/platforms/kakaotalk/client.ts +13 -0
- package/src/platforms/kakaotalk/index.ts +6 -0
- package/src/platforms/kakaotalk/listener.test.ts +383 -0
- package/src/platforms/kakaotalk/listener.ts +69 -12
- package/src/platforms/kakaotalk/types.ts +48 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-messenger",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
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.
|
|
4
|
+
version: 2.15.0
|
|
5
5
|
allowed-tools: Bash(agent-channeltalk:*)
|
|
6
6
|
metadata:
|
|
7
7
|
openclaw:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-kakaotalk
|
|
3
3
|
description: Interact with KakaoTalk - send messages, read chats, manage conversations
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.15.0
|
|
5
5
|
allowed-tools: Bash(agent-kakaotalk:*)
|
|
6
6
|
metadata:
|
|
7
7
|
openclaw:
|
|
@@ -368,10 +368,11 @@ Notes:
|
|
|
368
368
|
|
|
369
369
|
Each message includes:
|
|
370
370
|
- `log_id` — unique message identifier
|
|
371
|
-
- `type` — message type (1 = text, 2 = photo, etc.)
|
|
371
|
+
- `type` — message type (1 = text, 2 = photo, 12 = sticker, 20 = animated sticker, etc.)
|
|
372
372
|
- `author_id` — sender's user ID
|
|
373
373
|
- `author_name` — sender's nickname when known from the chat list (otherwise `null`; only the room's "display members" are cached)
|
|
374
|
-
- `message` — message text content
|
|
374
|
+
- `message` — message text content (empty string for non-text messages like stickers)
|
|
375
|
+
- `attachment` — parsed JSON metadata for non-text messages (e.g. photo URL/dimensions, sticker path), or `null` for plain text. Shape varies by `type`; treat as an opaque object and narrow per message type.
|
|
375
376
|
- `sent_at` — Unix timestamp (milliseconds)
|
|
376
377
|
|
|
377
378
|
#### Fetching More Messages
|
|
@@ -547,7 +548,7 @@ See the [KakaoTalk SDK documentation](https://agent-messenger.dev/docs/sdk/kakao
|
|
|
547
548
|
- No message editing or deletion
|
|
548
549
|
- No open chat (오픈채팅) browsing or joining
|
|
549
550
|
- No search across chats
|
|
550
|
-
-
|
|
551
|
+
- Read-only for rich content: photos, stickers, files, and other non-text messages are exposed via the `attachment` field on each message, but sending them is not supported
|
|
551
552
|
- Chat IDs are numeric and not human-readable — use `chat list` to discover them
|
|
552
553
|
|
|
553
554
|
## Troubleshooting
|
|
@@ -774,6 +774,7 @@ describe('KakaoTalkClient', () => {
|
|
|
774
774
|
author_id: 42,
|
|
775
775
|
author_name: null,
|
|
776
776
|
message: 'hello',
|
|
777
|
+
attachment: null,
|
|
777
778
|
sent_at: 1700000001,
|
|
778
779
|
})
|
|
779
780
|
expect(messages[1]).toEqual({
|
|
@@ -782,6 +783,7 @@ describe('KakaoTalkClient', () => {
|
|
|
782
783
|
author_id: 43,
|
|
783
784
|
author_name: null,
|
|
784
785
|
message: 'world',
|
|
786
|
+
attachment: null,
|
|
785
787
|
sent_at: 1700000002,
|
|
786
788
|
})
|
|
787
789
|
|
|
@@ -858,6 +860,65 @@ describe('KakaoTalkClient', () => {
|
|
|
858
860
|
|
|
859
861
|
client.close()
|
|
860
862
|
})
|
|
863
|
+
|
|
864
|
+
it('parses chatLog.attachment JSON for photo messages', async () => {
|
|
865
|
+
mockGetChatLogs.mockResolvedValueOnce({
|
|
866
|
+
body: {
|
|
867
|
+
status: 0,
|
|
868
|
+
chatLogs: [
|
|
869
|
+
{
|
|
870
|
+
logId: makeLong(20),
|
|
871
|
+
chatId: 100,
|
|
872
|
+
type: 2,
|
|
873
|
+
authorId: 42,
|
|
874
|
+
message: '사진',
|
|
875
|
+
sendAt: 1700000010,
|
|
876
|
+
attachment: '{"k":"path/to/img.jpg","w":1320,"h":2868,"mt":"image/jpeg"}',
|
|
877
|
+
},
|
|
878
|
+
],
|
|
879
|
+
eof: true,
|
|
880
|
+
},
|
|
881
|
+
})
|
|
882
|
+
|
|
883
|
+
const client = await new KakaoTalkClient().login({ oauthToken: 'token', userId: 'user1', deviceUuid: 'device1' })
|
|
884
|
+
const messages = await client.getMessages('100')
|
|
885
|
+
|
|
886
|
+
expect(messages[0].attachment).toEqual({
|
|
887
|
+
k: 'path/to/img.jpg',
|
|
888
|
+
w: 1320,
|
|
889
|
+
h: 2868,
|
|
890
|
+
mt: 'image/jpeg',
|
|
891
|
+
})
|
|
892
|
+
|
|
893
|
+
client.close()
|
|
894
|
+
})
|
|
895
|
+
|
|
896
|
+
it('returns null attachment for malformed JSON', async () => {
|
|
897
|
+
mockGetChatLogs.mockResolvedValueOnce({
|
|
898
|
+
body: {
|
|
899
|
+
status: 0,
|
|
900
|
+
chatLogs: [
|
|
901
|
+
{
|
|
902
|
+
logId: makeLong(21),
|
|
903
|
+
chatId: 100,
|
|
904
|
+
type: 1,
|
|
905
|
+
authorId: 42,
|
|
906
|
+
message: 'broken',
|
|
907
|
+
sendAt: 1700000011,
|
|
908
|
+
attachment: 'not-json',
|
|
909
|
+
},
|
|
910
|
+
],
|
|
911
|
+
eof: true,
|
|
912
|
+
},
|
|
913
|
+
})
|
|
914
|
+
|
|
915
|
+
const client = await new KakaoTalkClient().login({ oauthToken: 'token', userId: 'user1', deviceUuid: 'device1' })
|
|
916
|
+
const messages = await client.getMessages('100')
|
|
917
|
+
|
|
918
|
+
expect(messages[0].attachment).toBeNull()
|
|
919
|
+
|
|
920
|
+
client.close()
|
|
921
|
+
})
|
|
861
922
|
})
|
|
862
923
|
|
|
863
924
|
describe('sendMessage', () => {
|
|
@@ -113,6 +113,18 @@ function longToString(v: unknown): string {
|
|
|
113
113
|
return String(v ?? 0)
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
function parseAttachmentJson(raw: unknown): Record<string, unknown> | null {
|
|
117
|
+
if (typeof raw !== 'string' || raw.length === 0) return null
|
|
118
|
+
try {
|
|
119
|
+
const parsed = JSON.parse(raw) as unknown
|
|
120
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) return null
|
|
121
|
+
const attachment = parsed as Record<string, unknown>
|
|
122
|
+
return Object.keys(attachment).length > 0 ? attachment : null
|
|
123
|
+
} catch {
|
|
124
|
+
return null
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
116
128
|
function parseLong(s: string): Long {
|
|
117
129
|
const big = BigInt(s)
|
|
118
130
|
const low = Number(big & 0xffffffffn)
|
|
@@ -422,6 +434,7 @@ function formatMessages(
|
|
|
422
434
|
author_id: log.authorId as number,
|
|
423
435
|
author_name: nameCache.lookup(chatId, log.authorId as number),
|
|
424
436
|
message: log.message as string,
|
|
437
|
+
attachment: parseAttachmentJson(log.attachment),
|
|
425
438
|
sent_at: log.sendAt as number,
|
|
426
439
|
}))
|
|
427
440
|
}
|
|
@@ -10,11 +10,14 @@ export type {
|
|
|
10
10
|
KakaoChat,
|
|
11
11
|
KakaoConfig,
|
|
12
12
|
KakaoDeviceType,
|
|
13
|
+
KakaoEmoticonKind,
|
|
14
|
+
KakaoEmoticonMessageType,
|
|
13
15
|
KakaoMember,
|
|
14
16
|
KakaoMessage,
|
|
15
17
|
KakaoProfile,
|
|
16
18
|
KakaoSendResult,
|
|
17
19
|
KakaoTalkListenerEventMap,
|
|
20
|
+
KakaoTalkPushEmoticonEvent,
|
|
18
21
|
KakaoTalkPushEvent,
|
|
19
22
|
KakaoTalkPushGenericEvent,
|
|
20
23
|
KakaoTalkPushMemberEvent,
|
|
@@ -22,6 +25,8 @@ export type {
|
|
|
22
25
|
KakaoTalkPushReadEvent,
|
|
23
26
|
} from './types'
|
|
24
27
|
export {
|
|
28
|
+
KAKAO_EMOTICON_KIND_BY_TYPE,
|
|
29
|
+
KAKAO_EMOTICON_MESSAGE_TYPES,
|
|
25
30
|
KakaoAccountCredentialsSchema,
|
|
26
31
|
KakaoChatSchema,
|
|
27
32
|
KakaoConfigSchema,
|
|
@@ -29,6 +34,7 @@ export {
|
|
|
29
34
|
KakaoMessageSchema,
|
|
30
35
|
KakaoProfileSchema,
|
|
31
36
|
KakaoSendResultSchema,
|
|
37
|
+
KakaoTalkPushEmoticonEventSchema,
|
|
32
38
|
KakaoTalkPushMemberEventSchema,
|
|
33
39
|
KakaoTalkPushMessageEventSchema,
|
|
34
40
|
KakaoTalkPushReadEventSchema,
|