agent-messenger 2.30.0 → 2.32.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.
Files changed (258) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +14 -1
  3. package/bun.lock +42 -2
  4. package/dist/package.json +2 -2
  5. package/dist/src/cli.d.ts.map +1 -1
  6. package/dist/src/cli.js.map +1 -1
  7. package/dist/src/platforms/channeltalk/cli.d.ts.map +1 -1
  8. package/dist/src/platforms/channeltalk/client.d.ts.map +1 -1
  9. package/dist/src/platforms/channeltalk/commands/auth.js.map +1 -1
  10. package/dist/src/platforms/channeltalk/commands/bot.js.map +1 -1
  11. package/dist/src/platforms/channeltalk/commands/chat.js.map +1 -1
  12. package/dist/src/platforms/channeltalk/commands/group.js.map +1 -1
  13. package/dist/src/platforms/channeltalk/commands/manager.js.map +1 -1
  14. package/dist/src/platforms/channeltalk/commands/message.js.map +1 -1
  15. package/dist/src/platforms/channeltalk/commands/shared.js.map +1 -1
  16. package/dist/src/platforms/channeltalk/commands/snapshot.js.map +1 -1
  17. package/dist/src/platforms/channeltalk/commands/whoami.js.map +1 -1
  18. package/dist/src/platforms/channeltalk/credential-manager.d.ts.map +1 -1
  19. package/dist/src/platforms/channeltalk/ensure-auth.d.ts.map +1 -1
  20. package/dist/src/platforms/channeltalk/token-extractor.d.ts.map +1 -1
  21. package/dist/src/platforms/channeltalk/token-extractor.js.map +1 -1
  22. package/dist/src/platforms/channeltalk/types.d.ts.map +1 -1
  23. package/dist/src/platforms/channeltalkbot/cli.d.ts.map +1 -1
  24. package/dist/src/platforms/channeltalkbot/client.d.ts.map +1 -1
  25. package/dist/src/platforms/channeltalkbot/client.js.map +1 -1
  26. package/dist/src/platforms/channeltalkbot/credential-manager.d.ts.map +1 -1
  27. package/dist/src/platforms/channeltalkbot/types.d.ts +1 -1
  28. package/dist/src/platforms/channeltalkbot/types.d.ts.map +1 -1
  29. package/dist/src/platforms/discord/cli.d.ts.map +1 -1
  30. package/dist/src/platforms/discord/client.d.ts +11 -2
  31. package/dist/src/platforms/discord/client.d.ts.map +1 -1
  32. package/dist/src/platforms/discord/client.js +145 -21
  33. package/dist/src/platforms/discord/client.js.map +1 -1
  34. package/dist/src/platforms/discord/commands/mention.d.ts +5 -0
  35. package/dist/src/platforms/discord/commands/mention.d.ts.map +1 -1
  36. package/dist/src/platforms/discord/commands/mention.js +60 -4
  37. package/dist/src/platforms/discord/commands/mention.js.map +1 -1
  38. package/dist/src/platforms/discord/commands/reaction.js +1 -1
  39. package/dist/src/platforms/discord/commands/reaction.js.map +1 -1
  40. package/dist/src/platforms/discord/credential-manager.d.ts.map +1 -1
  41. package/dist/src/platforms/discord/index.d.ts +1 -1
  42. package/dist/src/platforms/discord/index.d.ts.map +1 -1
  43. package/dist/src/platforms/discord/index.js.map +1 -1
  44. package/dist/src/platforms/discord/listener.d.ts +4 -1
  45. package/dist/src/platforms/discord/listener.d.ts.map +1 -1
  46. package/dist/src/platforms/discord/listener.js +28 -1
  47. package/dist/src/platforms/discord/listener.js.map +1 -1
  48. package/dist/src/platforms/discord/remote-auth.js.map +1 -1
  49. package/dist/src/platforms/discord/super-properties.js.map +1 -1
  50. package/dist/src/platforms/discord/token-extractor.d.ts.map +1 -1
  51. package/dist/src/platforms/discord/token-extractor.js.map +1 -1
  52. package/dist/src/platforms/discord/types.d.ts +56 -9
  53. package/dist/src/platforms/discord/types.d.ts.map +1 -1
  54. package/dist/src/platforms/discord/types.js +28 -7
  55. package/dist/src/platforms/discord/types.js.map +1 -1
  56. package/dist/src/platforms/discordbot/cli.d.ts.map +1 -1
  57. package/dist/src/platforms/discordbot/client.d.ts.map +1 -1
  58. package/dist/src/platforms/discordbot/client.js.map +1 -1
  59. package/dist/src/platforms/discordbot/credential-manager.d.ts.map +1 -1
  60. package/dist/src/platforms/discordbot/listener.d.ts.map +1 -1
  61. package/dist/src/platforms/discordbot/listener.js.map +1 -1
  62. package/dist/src/platforms/discordbot/types.d.ts.map +1 -1
  63. package/dist/src/platforms/imessage/cli.d.ts.map +1 -1
  64. package/dist/src/platforms/imessage/client.d.ts.map +1 -1
  65. package/dist/src/platforms/imessage/client.js.map +1 -1
  66. package/dist/src/platforms/imessage/credential-manager.d.ts.map +1 -1
  67. package/dist/src/platforms/imessage/errors.js.map +1 -1
  68. package/dist/src/platforms/imessage/rpc.d.ts.map +1 -1
  69. package/dist/src/platforms/imessage/rpc.js.map +1 -1
  70. package/dist/src/platforms/imessage/types.d.ts.map +1 -1
  71. package/dist/src/platforms/imessage/types.js.map +1 -1
  72. package/dist/src/platforms/instagram/cli.d.ts.map +1 -1
  73. package/dist/src/platforms/instagram/client.d.ts.map +1 -1
  74. package/dist/src/platforms/instagram/client.js.map +1 -1
  75. package/dist/src/platforms/instagram/credential-manager.d.ts.map +1 -1
  76. package/dist/src/platforms/instagram/hybrid-listener.d.ts.map +1 -1
  77. package/dist/src/platforms/instagram/hybrid-listener.js.map +1 -1
  78. package/dist/src/platforms/instagram/listener.d.ts.map +1 -1
  79. package/dist/src/platforms/instagram/mqtt/thrift.d.ts.map +1 -1
  80. package/dist/src/platforms/instagram/mqtt/transport.d.ts.map +1 -1
  81. package/dist/src/platforms/instagram/mqtt/transport.js.map +1 -1
  82. package/dist/src/platforms/instagram/realtime-listener.d.ts.map +1 -1
  83. package/dist/src/platforms/instagram/realtime-listener.js.map +1 -1
  84. package/dist/src/platforms/instagram/token-extractor.d.ts.map +1 -1
  85. package/dist/src/platforms/instagram/types.d.ts.map +1 -1
  86. package/dist/src/platforms/instagram/types.js.map +1 -1
  87. package/dist/src/platforms/kakaotalk/cli.d.ts.map +1 -1
  88. package/dist/src/platforms/kakaotalk/client.d.ts +5 -1
  89. package/dist/src/platforms/kakaotalk/client.d.ts.map +1 -1
  90. package/dist/src/platforms/kakaotalk/client.js +55 -0
  91. package/dist/src/platforms/kakaotalk/client.js.map +1 -1
  92. package/dist/src/platforms/kakaotalk/commands/chat.d.ts.map +1 -1
  93. package/dist/src/platforms/kakaotalk/commands/chat.js +16 -1
  94. package/dist/src/platforms/kakaotalk/commands/chat.js.map +1 -1
  95. package/dist/src/platforms/kakaotalk/credential-manager.d.ts.map +1 -1
  96. package/dist/src/platforms/kakaotalk/index.d.ts +2 -2
  97. package/dist/src/platforms/kakaotalk/index.d.ts.map +1 -1
  98. package/dist/src/platforms/kakaotalk/index.js +1 -1
  99. package/dist/src/platforms/kakaotalk/index.js.map +1 -1
  100. package/dist/src/platforms/kakaotalk/listener.d.ts.map +1 -1
  101. package/dist/src/platforms/kakaotalk/listener.js.map +1 -1
  102. package/dist/src/platforms/kakaotalk/protocol/connection.d.ts.map +1 -1
  103. package/dist/src/platforms/kakaotalk/protocol/connection.js.map +1 -1
  104. package/dist/src/platforms/kakaotalk/protocol/crypto.d.ts.map +1 -1
  105. package/dist/src/platforms/kakaotalk/protocol/session.d.ts +23 -0
  106. package/dist/src/platforms/kakaotalk/protocol/session.d.ts.map +1 -1
  107. package/dist/src/platforms/kakaotalk/protocol/session.js +50 -0
  108. package/dist/src/platforms/kakaotalk/protocol/session.js.map +1 -1
  109. package/dist/src/platforms/kakaotalk/token-extractor.d.ts.map +1 -1
  110. package/dist/src/platforms/kakaotalk/types.d.ts +30 -10
  111. package/dist/src/platforms/kakaotalk/types.d.ts.map +1 -1
  112. package/dist/src/platforms/kakaotalk/types.js +10 -0
  113. package/dist/src/platforms/kakaotalk/types.js.map +1 -1
  114. package/dist/src/platforms/line/cli.d.ts.map +1 -1
  115. package/dist/src/platforms/line/client.d.ts.map +1 -1
  116. package/dist/src/platforms/line/credential-manager.d.ts.map +1 -1
  117. package/dist/src/platforms/line/listener.d.ts.map +1 -1
  118. package/dist/src/platforms/line/types.d.ts +6 -6
  119. package/dist/src/platforms/line/types.d.ts.map +1 -1
  120. package/dist/src/platforms/slack/cli.d.ts.map +1 -1
  121. package/dist/src/platforms/slack/client.d.ts.map +1 -1
  122. package/dist/src/platforms/slack/client.js.map +1 -1
  123. package/dist/src/platforms/slack/credential-manager.d.ts.map +1 -1
  124. package/dist/src/platforms/slack/ensure-auth.js.map +1 -1
  125. package/dist/src/platforms/slack/listener.d.ts.map +1 -1
  126. package/dist/src/platforms/slack/qr-http-login.js.map +1 -1
  127. package/dist/src/platforms/slack/token-extractor.d.ts.map +1 -1
  128. package/dist/src/platforms/slack/token-extractor.js.map +1 -1
  129. package/dist/src/platforms/slackbot/cli.d.ts.map +1 -1
  130. package/dist/src/platforms/slackbot/client.d.ts.map +1 -1
  131. package/dist/src/platforms/slackbot/credential-manager.d.ts.map +1 -1
  132. package/dist/src/platforms/slackbot/listener.d.ts.map +1 -1
  133. package/dist/src/platforms/slackbot/listener.js.map +1 -1
  134. package/dist/src/platforms/slackbot/types.d.ts.map +1 -1
  135. package/dist/src/platforms/teams/app-config.js.map +1 -1
  136. package/dist/src/platforms/teams/cli.d.ts.map +1 -1
  137. package/dist/src/platforms/teams/client.d.ts.map +1 -1
  138. package/dist/src/platforms/teams/client.js.map +1 -1
  139. package/dist/src/platforms/teams/credential-manager.d.ts.map +1 -1
  140. package/dist/src/platforms/teams/device-code.js.map +1 -1
  141. package/dist/src/platforms/teams/device-login.d.ts.map +1 -1
  142. package/dist/src/platforms/teams/device-login.js.map +1 -1
  143. package/dist/src/platforms/teams/listener.d.ts.map +1 -1
  144. package/dist/src/platforms/teams/token-extractor.d.ts.map +1 -1
  145. package/dist/src/platforms/teams/token-extractor.js.map +1 -1
  146. package/dist/src/platforms/teams/token-provider.d.ts.map +1 -1
  147. package/dist/src/platforms/teams/token-provider.js.map +1 -1
  148. package/dist/src/platforms/teams/types.d.ts +14 -14
  149. package/dist/src/platforms/teams/types.d.ts.map +1 -1
  150. package/dist/src/platforms/telegram/cli.d.ts.map +1 -1
  151. package/dist/src/platforms/telegram/client.d.ts.map +1 -1
  152. package/dist/src/platforms/telegram/client.js.map +1 -1
  153. package/dist/src/platforms/telegram/commands/shared.js.map +1 -1
  154. package/dist/src/platforms/telegram/credential-manager.d.ts.map +1 -1
  155. package/dist/src/platforms/telegram/tdlib.d.ts.map +1 -1
  156. package/dist/src/platforms/telegram/types.d.ts.map +1 -1
  157. package/dist/src/platforms/telegram/types.js.map +1 -1
  158. package/dist/src/platforms/telegrambot/cli.d.ts.map +1 -1
  159. package/dist/src/platforms/telegrambot/client.d.ts.map +1 -1
  160. package/dist/src/platforms/telegrambot/credential-manager.d.ts.map +1 -1
  161. package/dist/src/platforms/telegrambot/listener.d.ts.map +1 -1
  162. package/dist/src/platforms/telegrambot/types.d.ts.map +1 -1
  163. package/dist/src/platforms/webex/cli.d.ts.map +1 -1
  164. package/dist/src/platforms/webex/client.d.ts.map +1 -1
  165. package/dist/src/platforms/webex/client.js.map +1 -1
  166. package/dist/src/platforms/webex/credential-manager.d.ts.map +1 -1
  167. package/dist/src/platforms/webex/encryption.d.ts.map +1 -1
  168. package/dist/src/platforms/webex/kms-key-provider.d.ts.map +1 -1
  169. package/dist/src/platforms/webex/listener.d.ts.map +1 -1
  170. package/dist/src/platforms/webex/listener.js.map +1 -1
  171. package/dist/src/platforms/webex/token-extractor.d.ts.map +1 -1
  172. package/dist/src/platforms/webex/types.d.ts +4 -4
  173. package/dist/src/platforms/webex/types.d.ts.map +1 -1
  174. package/dist/src/platforms/webexbot/cli.d.ts.map +1 -1
  175. package/dist/src/platforms/webexbot/client.d.ts.map +1 -1
  176. package/dist/src/platforms/webexbot/credential-manager.d.ts.map +1 -1
  177. package/dist/src/platforms/webexbot/listener.d.ts.map +1 -1
  178. package/dist/src/platforms/webexbot/types.d.ts.map +1 -1
  179. package/dist/src/platforms/wechatbot/cli.d.ts.map +1 -1
  180. package/dist/src/platforms/wechatbot/client.d.ts.map +1 -1
  181. package/dist/src/platforms/wechatbot/credential-manager.d.ts.map +1 -1
  182. package/dist/src/platforms/wechatbot/types.d.ts.map +1 -1
  183. package/dist/src/platforms/whatsapp/cli.d.ts.map +1 -1
  184. package/dist/src/platforms/whatsapp/client.d.ts.map +1 -1
  185. package/dist/src/platforms/whatsapp/credential-manager.d.ts.map +1 -1
  186. package/dist/src/platforms/whatsapp/types.d.ts.map +1 -1
  187. package/dist/src/platforms/whatsapp/types.js.map +1 -1
  188. package/dist/src/platforms/whatsappbot/cli.d.ts.map +1 -1
  189. package/dist/src/platforms/whatsappbot/client.d.ts.map +1 -1
  190. package/dist/src/platforms/whatsappbot/credential-manager.d.ts.map +1 -1
  191. package/dist/src/platforms/whatsappbot/types.d.ts.map +1 -1
  192. package/dist/src/shared/chromium/browsers.js.map +1 -1
  193. package/dist/src/shared/chromium/cli-options.js.map +1 -1
  194. package/dist/src/shared/chromium/cookie-reader.d.ts.map +1 -1
  195. package/dist/src/shared/chromium/decryptor.d.ts.map +1 -1
  196. package/dist/src/shared/sqlite.js.map +1 -1
  197. package/dist/src/shared/utils/derived-key-cache.d.ts.map +1 -1
  198. package/dist/src/tui/adapters/channeltalk-adapter.d.ts.map +1 -1
  199. package/dist/src/tui/adapters/discord-adapter.d.ts.map +1 -1
  200. package/dist/src/tui/adapters/imessage-adapter.d.ts.map +1 -1
  201. package/dist/src/tui/adapters/instagram-adapter.d.ts.map +1 -1
  202. package/dist/src/tui/adapters/kakaotalk-adapter.d.ts.map +1 -1
  203. package/dist/src/tui/adapters/line-adapter.d.ts.map +1 -1
  204. package/dist/src/tui/adapters/slack-adapter.d.ts.map +1 -1
  205. package/dist/src/tui/adapters/teams-adapter.d.ts.map +1 -1
  206. package/dist/src/tui/adapters/telegram-adapter.d.ts.map +1 -1
  207. package/dist/src/tui/adapters/telegram-adapter.js.map +1 -1
  208. package/dist/src/tui/adapters/webex-adapter.d.ts.map +1 -1
  209. package/dist/src/tui/adapters/whatsapp-adapter.d.ts.map +1 -1
  210. package/dist/src/tui/app.js.map +1 -1
  211. package/dist/src/tui/views/channel-picker.d.ts.map +1 -1
  212. package/dist/src/tui/views/workspace-picker.d.ts.map +1 -1
  213. package/docs/content/docs/cli/discord.mdx +7 -0
  214. package/docs/content/docs/cli/kakaotalk.mdx +16 -1
  215. package/docs/content/docs/sdk/discord.mdx +38 -0
  216. package/docs/content/docs/sdk/kakaotalk.mdx +39 -0
  217. package/e2e/README.md +2 -2
  218. package/e2e/discord.e2e.test.ts +16 -2
  219. package/package.json +2 -2
  220. package/skills/agent-channeltalk/SKILL.md +1 -1
  221. package/skills/agent-channeltalkbot/SKILL.md +1 -1
  222. package/skills/agent-discord/SKILL.md +19 -1
  223. package/skills/agent-discordbot/SKILL.md +1 -1
  224. package/skills/agent-imessage/SKILL.md +1 -1
  225. package/skills/agent-instagram/SKILL.md +1 -1
  226. package/skills/agent-kakaotalk/SKILL.md +19 -2
  227. package/skills/agent-line/SKILL.md +1 -1
  228. package/skills/agent-slack/SKILL.md +1 -1
  229. package/skills/agent-slackbot/SKILL.md +1 -1
  230. package/skills/agent-teams/SKILL.md +1 -1
  231. package/skills/agent-telegram/SKILL.md +1 -1
  232. package/skills/agent-telegrambot/SKILL.md +1 -1
  233. package/skills/agent-webex/SKILL.md +1 -1
  234. package/skills/agent-webexbot/SKILL.md +1 -1
  235. package/skills/agent-wechatbot/SKILL.md +1 -1
  236. package/skills/agent-whatsapp/SKILL.md +1 -1
  237. package/skills/agent-whatsappbot/SKILL.md +1 -1
  238. package/src/platforms/discord/client.test.ts +351 -9
  239. package/src/platforms/discord/client.ts +166 -26
  240. package/src/platforms/discord/commands/mention.test.ts +84 -0
  241. package/src/platforms/discord/commands/mention.ts +78 -15
  242. package/src/platforms/discord/commands/reaction.test.ts +1 -1
  243. package/src/platforms/discord/commands/reaction.ts +1 -1
  244. package/src/platforms/discord/index.ts +3 -0
  245. package/src/platforms/discord/listener.test.ts +69 -2
  246. package/src/platforms/discord/listener.ts +31 -2
  247. package/src/platforms/discord/types.test.ts +11 -0
  248. package/src/platforms/discord/types.ts +66 -10
  249. package/src/platforms/kakaotalk/client.test.ts +194 -1
  250. package/src/platforms/kakaotalk/client.ts +58 -0
  251. package/src/platforms/kakaotalk/commands/chat.test.ts +24 -0
  252. package/src/platforms/kakaotalk/commands/chat.ts +23 -0
  253. package/src/platforms/kakaotalk/index.test.ts +10 -0
  254. package/src/platforms/kakaotalk/index.ts +4 -0
  255. package/src/platforms/kakaotalk/protocol/session.test.ts +113 -0
  256. package/src/platforms/kakaotalk/protocol/session.ts +56 -0
  257. package/src/platforms/kakaotalk/types.ts +24 -0
  258. package/tsconfig.json +8 -8
@@ -144,8 +144,19 @@ const dm = await client.createDM(userId)
144
144
  const mentions = await client.getMentions()
145
145
  const filtered = await client.getMentions({ limit: 10, guildId: serverId })
146
146
  // → DiscordMention[]
147
+
148
+ // Get only unread mentions — the messages behind Discord's unread-mention badge
149
+ const unread = await client.getUnreadMentions()
150
+ const scoped = await client.getUnreadMentions({ guildId: serverId, limit: 200 })
151
+ // → DiscordUnreadMentionsResult { mentions, count, badgeCount, complete, windowDays }
152
+
153
+ // Snapshot per-channel read state directly (one-shot gateway connect)
154
+ const readState = await client.fetchReadState()
155
+ // → DiscordReadState[] { channelId, lastMessageId, mentionCount }
147
156
  ```
148
157
 
158
+ `getUnreadMentions` correlates recent mention history (Discord's 7-day window) with per-channel read state, returning only mentions newer than each channel's read marker. `count` is the number of enumerated unread mentions; `badgeCount` is Discord's own account-wide unread-mention badge total (not narrowed by `guildId`, since read states carry no guild association); `complete` is `true` when the scan exhausted all available mention history (Discord's 7-day window) and `false` when it stopped early at `limit` or a non-advancing cursor.
159
+
149
160
  ### User Notes
150
161
 
151
162
  ```typescript
@@ -345,6 +356,9 @@ import type {
345
356
  DiscordReaction,
346
357
  DiscordFile,
347
358
  DiscordMention,
359
+ DiscordReadState,
360
+ DiscordUnreadMention,
361
+ DiscordUnreadMentionsResult,
348
362
  DiscordUserNote,
349
363
  DiscordSearchResult,
350
364
  DiscordSearchResponse,
@@ -478,6 +492,30 @@ for (const mention of mentions) {
478
492
  }
479
493
  ```
480
494
 
495
+ ### Unread Mentions Digest
496
+
497
+ Fetch only unread mentions, reply to each, and mark them read.
498
+
499
+ ```typescript
500
+ import { DiscordClient } from 'agent-messenger/discord'
501
+
502
+ const client = await new DiscordClient().login({ token })
503
+
504
+ const { mentions, count, badgeCount, complete } = await client.getUnreadMentions()
505
+
506
+ console.log(`${count} unread mentions fetched (badge shows ${badgeCount})`)
507
+ if (!complete) {
508
+ console.log('The scan hit the limit — some unread mentions may not have been fetched')
509
+ }
510
+
511
+ for (const mention of mentions) {
512
+ await client.sendMessage(mention.channel_id, `On it <@${mention.author.id}>!`)
513
+
514
+ // Mark the message read so it drops off the unread badge
515
+ await client.ackMessage(mention.channel_id, mention.id)
516
+ }
517
+ ```
518
+
481
519
  ### Search Triage
482
520
 
483
521
  Search for urgent messages, acknowledge with a reaction, and reply with a follow-up.
@@ -126,6 +126,43 @@ await client.sendAttachment('9876543210', [
126
126
 
127
127
  The typed helpers `sendPhoto`, `sendVideo`, `sendAudio`, `sendFile`, and `sendMultiPhoto` remain available when you want to bypass MIME sniffing and dispatch to a specific message_type explicitly.
128
128
 
129
+ ### Leave Chat
130
+
131
+ ```typescript
132
+ const result = await client.leaveChat('9876543210')
133
+ // → { success: true, status_code: 0, chat_id: '9876543210' }
134
+ ```
135
+
136
+ Leaves a chat room by its chat ID. Works on 1:1, group, open, and PlusChat rooms. Returns `success: true` on a successful leave. The departed chat is immediately evicted from the client's cached chat list — a subsequent `getChats()` call will not include it.
137
+
138
+ ### Typing Indicator
139
+
140
+ ```typescript
141
+ // Fire a single typing pulse — the recipient sees the animated "…" dots
142
+ const result = await client.sendTyping('9876543210')
143
+ // → KakaoTypingResult { success: true, status_code: 0, chat_id: '9876543210' }
144
+
145
+ // For OpenChat rooms, pass the linkId
146
+ await client.sendTyping('9876543210', { linkId: '77777' })
147
+ ```
148
+
149
+ The KakaoTalk client-side lifetime is ~5s per pulse — to keep the indicator visible while generating a long reply, re-fire faster than that (e.g. every 3s):
150
+
151
+ ```typescript
152
+ const interval = setInterval(() => {
153
+ client.sendTyping('9876543210').catch(() => {}) // ignore transient errors
154
+ }, 3000)
155
+
156
+ try {
157
+ const reply = await generateReply()
158
+ await client.sendMessage('9876543210', reply)
159
+ } finally {
160
+ clearInterval(interval)
161
+ }
162
+ ```
163
+
164
+ Errors follow the same shape as `markRead`: transport-level failures (non-zero `statusCode`, including the synthetic `-1` LocoConnection emits on disconnect) throw `KakaoTalkError('send_typing_failed')` so `executeWithReconnect` can retry on a fresh session. Non-numeric `chatId` / `linkId` throw `invalid_chat_id` / `invalid_link_id`.
165
+
129
166
  ### Cleanup
130
167
 
131
168
  ```typescript
@@ -239,6 +276,7 @@ import type {
239
276
  KakaoMember,
240
277
  KakaoMessage,
241
278
  KakaoSendResult,
279
+ KakaoTypingResult,
242
280
  KakaoAccountCredentials,
243
281
  KakaoConfig,
244
282
  KakaoDeviceType,
@@ -256,6 +294,7 @@ import {
256
294
  KakaoMemberSchema,
257
295
  KakaoMessageSchema,
258
296
  KakaoSendResultSchema,
297
+ KakaoTypingResultSchema,
259
298
  KakaoAccountCredentialsSchema,
260
299
  KakaoConfigSchema,
261
300
  } from 'agent-messenger/kakaotalk'
package/e2e/README.md CHANGED
@@ -199,10 +199,10 @@ When triggering manually, you can select which platform to test:
199
199
  | ------------- | ------------------------------------------ |
200
200
  | `auth` | status |
201
201
  | `server` | list, current, info |
202
- | `message` | send, list, get\*, delete, ack, search |
202
+ | `message` | send, list, get, delete, ack, search |
203
203
  | `channel` | list, info, history |
204
204
  | `user` | list\*, me, info |
205
- | `reaction` | add\*, list\*, remove\* |
205
+ | `reaction` | add, list, remove |
206
206
  | `file` | upload, list, info |
207
207
  | `snapshot` | default\*, --channels-only, --users-only\* |
208
208
 
@@ -83,7 +83,7 @@ describe('Discord E2E Tests', () => {
83
83
  expect(Array.isArray(data)).toBe(true)
84
84
  })
85
85
 
86
- it.skip('message get retrieves specific message (requires bot token)', async () => {
86
+ it('message get retrieves specific message', async () => {
87
87
  const testId = generateTestId()
88
88
  const { id } = await createTestMessage('discord', DISCORD_TEST_CHANNEL_ID, `Get test ${testId}`)
89
89
  testMessages.push(id)
@@ -194,7 +194,7 @@ describe('Discord E2E Tests', () => {
194
194
  })
195
195
 
196
196
  describe('reaction', () => {
197
- it.skip('reaction add/list/remove lifecycle (requires bot token)', async () => {
197
+ it('reaction add/list/remove lifecycle', async () => {
198
198
  const testId = generateTestId()
199
199
  const { id } = await createTestMessage('discord', DISCORD_TEST_CHANNEL_ID, `Reaction test ${testId}`)
200
200
  testMessages.push(id)
@@ -210,12 +210,26 @@ describe('Discord E2E Tests', () => {
210
210
  // List reactions
211
211
  const listResult = await runCLI('discord', ['reaction', 'list', DISCORD_TEST_CHANNEL_ID, id])
212
212
  expect(listResult.exitCode).toBe(0)
213
+ const listed = parseJSON<{ reactions: Array<{ emoji: { name: string | null }; count: number }> }>(
214
+ listResult.stdout,
215
+ )
216
+ const addedReaction = listed?.reactions.find((reaction) => reaction.emoji.name === '👍')
217
+ expect(addedReaction?.count).toBeGreaterThan(0)
213
218
 
214
219
  await waitForRateLimit()
215
220
 
216
221
  // Remove reaction
217
222
  const removeResult = await runCLI('discord', ['reaction', 'remove', DISCORD_TEST_CHANNEL_ID, id, '👍'])
218
223
  expect(removeResult.exitCode).toBe(0)
224
+
225
+ await waitForRateLimit()
226
+
227
+ const afterRemoveResult = await runCLI('discord', ['reaction', 'list', DISCORD_TEST_CHANNEL_ID, id])
228
+ expect(afterRemoveResult.exitCode).toBe(0)
229
+ const afterRemove = parseJSON<{ reactions: Array<{ emoji: { name: string | null }; count: number }> }>(
230
+ afterRemoveResult.stdout,
231
+ )
232
+ expect(afterRemove?.reactions.find((reaction) => reaction.emoji.name === '👍')).toBeUndefined()
219
233
  }, 15000) // Longer timeout for multiple operations
220
234
  })
221
235
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-messenger",
3
- "version": "2.30.0",
3
+ "version": "2.32.0",
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",
@@ -211,7 +211,7 @@
211
211
  "oxlint": "^1.51.0",
212
212
  "tsc-alias": "^1.8.16",
213
213
  "tsx": "^4.21.0",
214
- "typescript": "^5.9.3"
214
+ "typescript": "^7.0.2"
215
215
  },
216
216
  "optionalDependencies": {
217
217
  "koffi": "^2.15.2",
@@ -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.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-channeltalk:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-channeltalkbot
3
3
  description: Interact with Channel Talk workspaces using API credentials - send messages, read chats, manage groups and bots
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-channeltalkbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-discord
3
3
  description: Interact with Discord servers - send messages, read channels, manage reactions
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-discord:*)
6
6
  metadata:
7
7
  openclaw:
@@ -269,8 +269,20 @@ agent-discord dm create <user-id>
269
269
  agent-discord mention list
270
270
  agent-discord mention list --limit 50
271
271
  agent-discord mention list --guild <server-id>
272
+
273
+ # List only unread mentions (the app's unread-mention badge)
274
+ agent-discord mention unread
275
+ agent-discord mention unread --guild <server-id>
276
+ agent-discord mention unread --limit 200
272
277
  ```
273
278
 
279
+ `mention unread` correlates your recent mention history (last 7 days) with Discord's
280
+ per-channel read state, returning only mentions newer than each channel's read marker.
281
+ Output includes `count` (enumerated unread mentions), `badge_count` (Discord's own
282
+ account-wide unread-mention badge total — not narrowed by `--guild`), and `complete`
283
+ (whether the scan reached the end of history within the 7-day window). `badge_count`
284
+ can exceed `count` when unread mentions fall outside the 7-day window.
285
+
274
286
  ### Friend Commands
275
287
 
276
288
  ```bash
@@ -503,6 +515,12 @@ const { results } = await client.searchMessages(serverId, 'deployment', {
503
515
  limit: 5,
504
516
  })
505
517
 
518
+ // List unread mentions (correlates mention history with per-channel read state)
519
+ const { mentions, count, badgeCount, complete } = await client.getUnreadMentions()
520
+ // count = enumerated unread mentions; badgeCount = account-wide badge total;
521
+ // complete = true when all available mentions (7-day window) were scanned,
522
+ // false when the scan stopped early at the limit or a non-advancing cursor
523
+
506
524
  // Create a thread
507
525
  const thread = await client.createThread(channelId, 'Discussion Topic')
508
526
  await client.sendMessage(thread.id, 'First message in thread')
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-discordbot
3
3
  description: Interact with Discord servers using bot tokens - send messages, read channels, manage reactions
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-discordbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-imessage
3
3
  description: Interact with iMessage on a Mac via the imsg tool - send messages, read chats, watch for new messages
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-imessage:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-instagram
3
3
  description: Interact with Instagram DMs - send messages, read conversations, manage accounts
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-instagram:*)
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.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-kakaotalk:*)
6
6
  metadata:
7
7
  openclaw:
@@ -303,6 +303,23 @@ Output includes:
303
303
  - `unread_count` — unread message count
304
304
  - `last_message` — most recent message preview, including `author_name` when the sender's nickname is known from the chat list (otherwise `null`)
305
305
 
306
+ ### Chat Leave
307
+
308
+ ```bash
309
+ # Leave a chat room (works on 1:1, group, open, and PlusChat rooms)
310
+ agent-kakaotalk chat leave <chat-id>
311
+ agent-kakaotalk chat leave <chat-id> --pretty
312
+ agent-kakaotalk chat leave <chat-id> --account <account-id>
313
+ ```
314
+
315
+ Output (JSON by default; `--pretty` pretty-prints the same JSON):
316
+
317
+ ```json
318
+ { "success": true, "status_code": 0, "chat_id": "9876543210" }
319
+ ```
320
+
321
+ The process exits non-zero when `success` is `false`.
322
+
306
323
  ### Member Commands
307
324
 
308
325
  ```bash
@@ -623,7 +640,7 @@ See the [KakaoTalk SDK documentation](https://agent-messenger.dev/docs/sdk/kakao
623
640
  ## Limitations
624
641
 
625
642
  - Auto-extraction of email/password from the desktop app is **macOS and Windows only** (KakaoTalk desktop is not available on Linux). Linux users must pass `--email` and `--password` (or `--password-file`) explicitly — the LOCO protocol, login flow, and all messaging features work on Linux.
626
- - No channel/chat room creation or management
643
+ - No chat room creation
627
644
  - No friend list management
628
645
  - No reactions or emoji
629
646
  - No message editing or deletion
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-line
3
3
  description: Interact with LINE - send messages, read chats, manage conversations
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-line:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-slack
3
3
  description: Interact with Slack workspaces - send messages, read channels, manage reactions
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-slack:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-slackbot
3
3
  description: Interact with Slack workspaces using bot tokens - send messages, read channels, manage reactions
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-slackbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-teams
3
3
  description: Interact with Microsoft Teams - send messages, read channels, manage reactions
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-teams:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-telegram
3
3
  description: Interact with Telegram through TDLib - authenticate, inspect chats, and send messages
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-telegram:*)
6
6
  ---
7
7
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-telegrambot
3
3
  description: Interact with Telegram using bot tokens - send messages, read chats, manage reactions
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-telegrambot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-webex
3
3
  description: Interact with Cisco Webex - send messages, read spaces, manage memberships
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-webex:*)
6
6
  metadata:
7
7
  openclaw:
@@ -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.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-webexbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-wechatbot
3
3
  description: Interact with WeChat Official Account using API credentials - send messages, manage templates, list followers
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-wechatbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-whatsapp
3
3
  description: Interact with WhatsApp - send messages, read chats, manage conversations
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-whatsapp:*)
6
6
  metadata:
7
7
  openclaw:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: agent-whatsappbot
3
3
  description: Interact with WhatsApp using Cloud API credentials - send messages, manage templates
4
- version: 2.30.0
4
+ version: 2.32.0
5
5
  allowed-tools: Bash(agent-whatsappbot:*)
6
6
  metadata:
7
7
  openclaw: