agent-messenger 2.36.1 → 2.37.1
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/kakaotalk/chat-classifier.d.ts +5 -4
- package/dist/src/platforms/kakaotalk/chat-classifier.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/chat-classifier.js +15 -9
- package/dist/src/platforms/kakaotalk/chat-classifier.js.map +1 -1
- package/dist/src/platforms/kakaotalk/client.d.ts +33 -1
- package/dist/src/platforms/kakaotalk/client.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/client.js +377 -42
- package/dist/src/platforms/kakaotalk/client.js.map +1 -1
- package/dist/src/platforms/kakaotalk/index.d.ts +4 -3
- package/dist/src/platforms/kakaotalk/index.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/index.js +2 -2
- package/dist/src/platforms/kakaotalk/index.js.map +1 -1
- package/dist/src/platforms/kakaotalk/protocol/connection.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/protocol/connection.js +13 -2
- package/dist/src/platforms/kakaotalk/protocol/connection.js.map +1 -1
- package/dist/src/platforms/kakaotalk/protocol/login-response.d.ts +1 -0
- package/dist/src/platforms/kakaotalk/protocol/login-response.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/protocol/login-response.js +1 -1
- package/dist/src/platforms/kakaotalk/protocol/login-response.js.map +1 -1
- package/dist/src/platforms/kakaotalk/types.d.ts +50 -2
- package/dist/src/platforms/kakaotalk/types.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/types.js +18 -1
- package/dist/src/platforms/kakaotalk/types.js.map +1 -1
- package/docs/content/docs/cli/kakaotalk.mdx +7 -1
- package/docs/content/docs/sdk/kakaotalk.mdx +29 -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-imessage/SKILL.md +1 -1
- package/skills/agent-instagram/SKILL.md +1 -1
- package/skills/agent-kakaotalk/SKILL.md +1 -1
- package/skills/agent-kakaotalk/references/common-patterns.md +36 -0
- 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-webexbot/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/chat-classifier.test.ts +23 -1
- package/src/platforms/kakaotalk/chat-classifier.ts +16 -10
- package/src/platforms/kakaotalk/client.test.ts +1225 -88
- package/src/platforms/kakaotalk/client.ts +476 -45
- package/src/platforms/kakaotalk/index.test.ts +39 -0
- package/src/platforms/kakaotalk/index.ts +12 -1
- package/src/platforms/kakaotalk/protocol/connection.test.ts +87 -0
- package/src/platforms/kakaotalk/protocol/connection.ts +15 -2
- package/src/platforms/kakaotalk/protocol/login-response.test.ts +13 -2
- package/src/platforms/kakaotalk/protocol/login-response.ts +1 -1
- package/src/platforms/kakaotalk/types.ts +41 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/platforms/kakaotalk/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AA2DvB,MAAM,CAAC,MAAM,kBAAkB,GAA6D;IAC1F,aAAa,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,uBAAuB,EAAE;IACjF,gBAAgB,EAAE,EAAE,WAAW,EAAE,kBAAkB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,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA"}
|
|
@@ -171,12 +171,18 @@ Output (JSON by default; `--pretty` pretty-prints the same JSON):
|
|
|
171
171
|
### Member Commands
|
|
172
172
|
|
|
173
173
|
```bash
|
|
174
|
-
# List all members of a chat room
|
|
174
|
+
# List all members of a chat room using a fail-closed, read-only snapshot
|
|
175
175
|
agent-kakaotalk member list <chat-id>
|
|
176
176
|
agent-kakaotalk member list <chat-id> --pretty
|
|
177
177
|
agent-kakaotalk member list <chat-id> --account <account-id>
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
+
Member listing uses two read-only `CHATINFO` observations and two
|
|
181
|
+
`GETMEM` observations. The command returns only when the active count,
|
|
182
|
+
display-member subset, and full member-ID set remain stable across the
|
|
183
|
+
observations. It never enters the room with `CHATONROOM`; incomplete or
|
|
184
|
+
changing snapshots fail instead of returning a guessed member list.
|
|
185
|
+
|
|
180
186
|
Each member includes:
|
|
181
187
|
|
|
182
188
|
- `user_id` — numeric user ID (string for safety)
|
|
@@ -75,6 +75,10 @@ const titled = await client.getChats({ resolveTitles: true })
|
|
|
75
75
|
|
|
76
76
|
// Resolve a single chat's title directly (returns null on error or missing title)
|
|
77
77
|
const title = await client.getChatTitle('9876543210')
|
|
78
|
+
|
|
79
|
+
// Fetch one complete KakaoChat directly via read-only CHATINFO.
|
|
80
|
+
// This also resolves rooms that are not present in the login-time chat list.
|
|
81
|
+
const chat = await client.getChat('9876543210')
|
|
78
82
|
```
|
|
79
83
|
|
|
80
84
|
### Messages
|
|
@@ -89,6 +93,17 @@ const more = await client.getMessages('9876543210', { count: 100 })
|
|
|
89
93
|
|
|
90
94
|
// Get messages after a known log ID
|
|
91
95
|
const newer = await client.getMessages('9876543210', { from: '123456789' })
|
|
96
|
+
|
|
97
|
+
// Reconcile history without dropping older messages when a protocol response
|
|
98
|
+
// contains more than `count`. Continue until `complete` is true.
|
|
99
|
+
let cursor: string | undefined = '123456789'
|
|
100
|
+
do {
|
|
101
|
+
const page = await client.getMessagePage('9876543210', { from: cursor, count: 100 })
|
|
102
|
+
await consume(page.messages)
|
|
103
|
+
if (page.complete) break
|
|
104
|
+
if (!page.next_cursor) throw new Error('KakaoTalk history made no cursor progress')
|
|
105
|
+
cursor = page.next_cursor
|
|
106
|
+
} while (true)
|
|
92
107
|
```
|
|
93
108
|
|
|
94
109
|
Each `KakaoMessage` carries an `author_name: string | null`. The SDK auto-populates this from the same chat-list response that already arrives at login (no extra LOCO calls). It resolves for "display members" — the small set of nicknames KakaoTalk includes in the chat list — and is `null` for everyone else.
|
|
@@ -98,14 +113,27 @@ Each `KakaoMessage` also carries an `attachment: Record<string, unknown> | null`
|
|
|
98
113
|
### Members
|
|
99
114
|
|
|
100
115
|
```typescript
|
|
101
|
-
// List all members
|
|
116
|
+
// List all members through the compatibility array API
|
|
102
117
|
const members = await client.getMembers('9876543210')
|
|
103
118
|
// → KakaoMember[]
|
|
104
119
|
|
|
120
|
+
// Read the exact snapshot contract and its consistency evidence
|
|
121
|
+
const snapshot = await client.getMemberSnapshot('9876543210')
|
|
122
|
+
// → KakaoMemberSnapshot {
|
|
123
|
+
// chat_id, active_members, members, complete: true,
|
|
124
|
+
// consistency_basis: 'stable_double_read_chatinfo_getmem'
|
|
125
|
+
// }
|
|
126
|
+
|
|
105
127
|
// Resolve a specific subset by user_id (LOCO MEMBER) — useful for >100-member rooms
|
|
106
128
|
const subset = await client.getMembersByIds('9876543210', ['1234567890', '9876543210'])
|
|
107
129
|
```
|
|
108
130
|
|
|
131
|
+
`getMemberSnapshot()` compares two read-only `CHATINFO` observations
|
|
132
|
+
and two complete `GETMEM` observations. It succeeds only when the active
|
|
133
|
+
count, display-member subset, and full member-ID set are stable. It does
|
|
134
|
+
not call `CHATONROOM`, so it does not enter the room or advance unread
|
|
135
|
+
state. Any malformed, partial, or changing snapshot fails closed.
|
|
136
|
+
|
|
109
137
|
Each `KakaoMember` includes `user_id`, `nickname`, profile image URLs, `status_message`, `country_iso`, `user_type` (nullable; `null` when the server omits the field), and open-chat-only fields (`open_token`, `open_profile_link_id`, `open_permission` — the last is the OpenChannelUserPerm bitfield: `1`=OWNER, `2`=NONE, `4`=MANAGER, `8`=BOT).
|
|
110
138
|
|
|
111
139
|
### Sending
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-messenger",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.37.1",
|
|
4
4
|
"description": "Multi-platform messaging CLI for AI agents (Slack, Discord, Teams, Webex, Telegram, Telegram Bot, WhatsApp, LINE, iMessage, 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.37.1
|
|
5
5
|
allowed-tools: Bash(agent-channeltalk:*)
|
|
6
6
|
metadata:
|
|
7
7
|
openclaw:
|
|
@@ -57,6 +57,17 @@ agent-kakaotalk message send "$TARGET_CHAT" "Hey Alice!"
|
|
|
57
57
|
|
|
58
58
|
> Note: `display_name` joins the chat's member nicknames. For the user-set room title (matching the KakaoTalk app), see [Pattern 10](#pattern-10-resolve-canonical-room-titles).
|
|
59
59
|
|
|
60
|
+
For an exact chat ID observed from a live event, the SDK can resolve that room
|
|
61
|
+
directly without depending on the login-time list:
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
const chat = await client.getChat('9876543210')
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`getChat()` uses the read-only `CHATINFO` owner. It preserves numeric room types
|
|
68
|
+
and open-chat types `OM` / `OD`; open chats without a `TITLE` meta use the
|
|
69
|
+
OpenLink name as a display-title fallback.
|
|
70
|
+
|
|
60
71
|
## Pattern 3: Send Files, Photos, Videos, and Audio
|
|
61
72
|
|
|
62
73
|
**Use case**: Upload an attachment to a chat (photo, video, voice, generic file, or multi-photo gallery)
|
|
@@ -187,6 +198,31 @@ NEW_MESSAGES=$(agent-kakaotalk message list "$CHAT_ID" --from "$LAST_SEEN")
|
|
|
187
198
|
|
|
188
199
|
**Pagination details**: The CLI prefers KakaoTalk's `MCHATLOGS` flow for history reads, fetching message batches from the requested `--from` point and returning the last N messages after deduplication and ascending sort. If that path cannot provide results, it reads the maximum log ID from the login chat-list watermark (`ll`, falling back to `l.logId`) and calls `SYNCMSG` directly only when that watermark is ahead of the current cursor. The history path never uses `CHATONROOM`, which avoids room-entry side effects. If the watermark is missing or is not ahead of the cursor, the fallback fails closed and returns `[]`. As a safety net, both message flows are capped at 50 internal pages. A warning is printed to stderr only when that cap is actually hit and the returned history may be incomplete.
|
|
189
200
|
|
|
201
|
+
For lossless forward-only SDK pagination, carry `next_cursor` into the next
|
|
202
|
+
exclusive `from` request until `complete` is true:
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
let from = '123456789'
|
|
206
|
+
do {
|
|
207
|
+
const page = await client.getMessagePage(CHAT_ID, { from, count: 80 })
|
|
208
|
+
for (const message of page.messages) {
|
|
209
|
+
await archive(message)
|
|
210
|
+
}
|
|
211
|
+
if (page.complete) break
|
|
212
|
+
if (page.next_cursor === null) {
|
|
213
|
+
throw new Error('KakaoTalk history made no forward progress')
|
|
214
|
+
}
|
|
215
|
+
from = page.next_cursor
|
|
216
|
+
} while (true)
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
`from` is exclusive. `next_cursor` is the last returned log ID, or `null` when
|
|
220
|
+
the server made no forward progress. `complete` is true only when the available
|
|
221
|
+
forward range is exhausted. The SDK prefers `MCHATLOGS`; for late rooms or an
|
|
222
|
+
empty page it reconciles with read-only `CHATINFO` and then calls `SYNCMSG` only
|
|
223
|
+
when the observed maximum log ID is ahead of `from`. This path does not call
|
|
224
|
+
`CHATONROOM`.
|
|
225
|
+
|
|
190
226
|
## Pattern 7: Multi-Chat Broadcast
|
|
191
227
|
|
|
192
228
|
**Use case**: Send the same message to multiple chats
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-webexbot
|
|
3
3
|
description: Interact with Cisco Webex using bot tokens - send messages, reply in threads, upload and download files, look up people, read spaces, manage memberships, stream real-time events
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.37.1
|
|
5
5
|
allowed-tools: Bash(agent-webexbot:*)
|
|
6
6
|
metadata:
|
|
7
7
|
openclaw:
|
|
@@ -19,7 +19,7 @@ describe('classifyKakaoChat', () => {
|
|
|
19
19
|
expect(classifyKakaoChat({ type: 10, active_members: 3 })).toBe('group')
|
|
20
20
|
})
|
|
21
21
|
|
|
22
|
-
for (const type of [2, 13, 14, 15, 16]) {
|
|
22
|
+
for (const type of [2, 13, 14, 15, 16, 'OM', 'OD'] as const) {
|
|
23
23
|
it(`classifies open-chat type ${type} as open regardless of member count`, () => {
|
|
24
24
|
expect(classifyKakaoChat({ type, active_members: 1 })).toBe('open')
|
|
25
25
|
expect(classifyKakaoChat({ type, active_members: 2 })).toBe('open')
|
|
@@ -30,4 +30,26 @@ describe('classifyKakaoChat', () => {
|
|
|
30
30
|
it('classifies a 1-member chat (lone room) as dm', () => {
|
|
31
31
|
expect(classifyKakaoChat({ type: 11, active_members: 1 })).toBe('dm')
|
|
32
32
|
})
|
|
33
|
+
|
|
34
|
+
for (const type of ['DirectChat', 'MultiChat', 'PlusChat', 'MemoChat'] as const) {
|
|
35
|
+
it(`keeps member-count classification for known normal type ${type}`, () => {
|
|
36
|
+
expect(classifyKakaoChat({ type, active_members: 2 })).toBe('dm')
|
|
37
|
+
expect(classifyKakaoChat({ type, active_members: 3 })).toBe('group')
|
|
38
|
+
})
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
it('classifies an unknown string type as unknown regardless of member count', () => {
|
|
42
|
+
expect(
|
|
43
|
+
classifyKakaoChat({
|
|
44
|
+
type: 'UnknownChat',
|
|
45
|
+
active_members: 2,
|
|
46
|
+
}),
|
|
47
|
+
).toBe('unknown')
|
|
48
|
+
expect(
|
|
49
|
+
classifyKakaoChat({
|
|
50
|
+
type: 'UnknownChat',
|
|
51
|
+
active_members: 3,
|
|
52
|
+
}),
|
|
53
|
+
).toBe('unknown')
|
|
54
|
+
})
|
|
33
55
|
})
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { isKnownKakaoChatStringType, type KakaoChat, type KakaoOpenChatType } from './types'
|
|
2
2
|
|
|
3
3
|
export type KakaoChatKind = 'dm' | 'group' | 'open' | 'unknown'
|
|
4
4
|
|
|
5
|
-
// OpenChat-family `type`
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
// OpenChat-family `type` values observed on the wire. Login/chat-list data
|
|
6
|
+
// uses numeric codes while CHATINFO may return the protocol string tags
|
|
7
|
+
// `OM` / `OD`; both forms must share this single classification owner.
|
|
8
|
+
const OPEN_CHAT_TYPES: ReadonlySet<KakaoOpenChatType> = new Set([2, 13, 14, 15, 16, 'OM', 'OD'])
|
|
9
|
+
|
|
10
|
+
export function isOpenKakaoChatType(type: unknown): type is KakaoOpenChatType {
|
|
11
|
+
return OPEN_CHAT_TYPES.has(type as KakaoOpenChatType)
|
|
12
|
+
}
|
|
10
13
|
|
|
11
14
|
/**
|
|
12
15
|
* Classify a KakaoTalk chat as `'dm'`, `'group'`, `'open'`, or `'unknown'`.
|
|
@@ -18,12 +21,15 @@ const OPEN_CHAT_TYPE_CODES: ReadonlySet<number> = new Set([2, 13, 14, 15, 16])
|
|
|
18
21
|
* NOT "simplify" this back to a pure type-code mapping without verifying
|
|
19
22
|
* against a real KakaoTalk session.
|
|
20
23
|
*
|
|
21
|
-
* `'unknown'` is reserved for future protocol drift
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
+
* `'unknown'` is reserved for future string protocol drift so consumers fail
|
|
25
|
+
* closed instead of silently classifying an unrecognized server value by
|
|
26
|
+
* member count.
|
|
24
27
|
*/
|
|
25
28
|
export function classifyKakaoChat(chat: Pick<KakaoChat, 'type' | 'active_members'>): KakaoChatKind {
|
|
26
|
-
if (
|
|
29
|
+
if (isOpenKakaoChatType(chat.type)) return 'open'
|
|
30
|
+
if (typeof chat.type === 'string' && !isKnownKakaoChatStringType(chat.type)) {
|
|
31
|
+
return 'unknown'
|
|
32
|
+
}
|
|
27
33
|
// active_members counts the logged-in user, so a 1:1 DM is exactly 2
|
|
28
34
|
// (self + one other) and a "lone" room with only self is 1.
|
|
29
35
|
if (chat.active_members <= 2) return 'dm'
|