agent-messenger 2.6.3 → 2.8.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 (515) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.github/workflows/ci.yml +6 -0
  3. package/.oxfmtrc.json +13 -1
  4. package/.oxlintrc.json +10 -1
  5. package/README.md +1 -1
  6. package/dist/package.json +59 -58
  7. package/dist/src/platforms/channeltalk/client.d.ts.map +1 -1
  8. package/dist/src/platforms/channeltalk/client.js +2 -2
  9. package/dist/src/platforms/channeltalk/client.js.map +1 -1
  10. package/dist/src/platforms/channeltalk/commands/auth.d.ts.map +1 -1
  11. package/dist/src/platforms/channeltalk/commands/auth.js.map +1 -1
  12. package/dist/src/platforms/channeltalk/commands/message.d.ts.map +1 -1
  13. package/dist/src/platforms/channeltalk/commands/message.js.map +1 -1
  14. package/dist/src/platforms/channeltalk/commands/snapshot.d.ts.map +1 -1
  15. package/dist/src/platforms/channeltalk/commands/snapshot.js.map +1 -1
  16. package/dist/src/platforms/channeltalk/ensure-auth.d.ts.map +1 -1
  17. package/dist/src/platforms/channeltalk/ensure-auth.js.map +1 -1
  18. package/dist/src/platforms/channeltalk/token-extractor.d.ts +9 -23
  19. package/dist/src/platforms/channeltalk/token-extractor.d.ts.map +1 -1
  20. package/dist/src/platforms/channeltalk/token-extractor.js +109 -341
  21. package/dist/src/platforms/channeltalk/token-extractor.js.map +1 -1
  22. package/dist/src/platforms/channeltalkbot/client.d.ts +1 -1
  23. package/dist/src/platforms/channeltalkbot/client.d.ts.map +1 -1
  24. package/dist/src/platforms/channeltalkbot/client.js +4 -4
  25. package/dist/src/platforms/channeltalkbot/client.js.map +1 -1
  26. package/dist/src/platforms/channeltalkbot/commands/auth.d.ts.map +1 -1
  27. package/dist/src/platforms/channeltalkbot/commands/auth.js +4 -1
  28. package/dist/src/platforms/channeltalkbot/commands/auth.js.map +1 -1
  29. package/dist/src/platforms/channeltalkbot/commands/shared.d.ts.map +1 -1
  30. package/dist/src/platforms/channeltalkbot/commands/shared.js.map +1 -1
  31. package/dist/src/platforms/discord/commands/auth.js.map +1 -1
  32. package/dist/src/platforms/discord/commands/whoami.d.ts.map +1 -1
  33. package/dist/src/platforms/discord/commands/whoami.js.map +1 -1
  34. package/dist/src/platforms/discord/token-extractor.d.ts +2 -10
  35. package/dist/src/platforms/discord/token-extractor.d.ts.map +1 -1
  36. package/dist/src/platforms/discord/token-extractor.js +38 -172
  37. package/dist/src/platforms/discord/token-extractor.js.map +1 -1
  38. package/dist/src/platforms/discordbot/client.d.ts.map +1 -1
  39. package/dist/src/platforms/discordbot/client.js.map +1 -1
  40. package/dist/src/platforms/instagram/cli.d.ts.map +1 -1
  41. package/dist/src/platforms/instagram/cli.js +1 -4
  42. package/dist/src/platforms/instagram/cli.js.map +1 -1
  43. package/dist/src/platforms/instagram/client.d.ts.map +1 -1
  44. package/dist/src/platforms/instagram/client.js +8 -7
  45. package/dist/src/platforms/instagram/client.js.map +1 -1
  46. package/dist/src/platforms/instagram/commands/auth.d.ts.map +1 -1
  47. package/dist/src/platforms/instagram/commands/auth.js.map +1 -1
  48. package/dist/src/platforms/instagram/commands/chat.d.ts.map +1 -1
  49. package/dist/src/platforms/instagram/commands/chat.js.map +1 -1
  50. package/dist/src/platforms/instagram/commands/message.d.ts.map +1 -1
  51. package/dist/src/platforms/instagram/commands/message.js.map +1 -1
  52. package/dist/src/platforms/instagram/commands/shared.d.ts.map +1 -1
  53. package/dist/src/platforms/instagram/commands/shared.js.map +1 -1
  54. package/dist/src/platforms/instagram/credential-manager.d.ts.map +1 -1
  55. package/dist/src/platforms/instagram/credential-manager.js +1 -1
  56. package/dist/src/platforms/instagram/credential-manager.js.map +1 -1
  57. package/dist/src/platforms/instagram/ensure-auth.d.ts.map +1 -1
  58. package/dist/src/platforms/instagram/ensure-auth.js.map +1 -1
  59. package/dist/src/platforms/instagram/token-extractor.d.ts +7 -19
  60. package/dist/src/platforms/instagram/token-extractor.d.ts.map +1 -1
  61. package/dist/src/platforms/instagram/token-extractor.js +44 -270
  62. package/dist/src/platforms/instagram/token-extractor.js.map +1 -1
  63. package/dist/src/platforms/instagram/types.d.ts.map +1 -1
  64. package/dist/src/platforms/instagram/types.js +4 -2
  65. package/dist/src/platforms/instagram/types.js.map +1 -1
  66. package/dist/src/platforms/kakaotalk/auth/kakao-login.d.ts.map +1 -1
  67. package/dist/src/platforms/kakaotalk/auth/kakao-login.js +18 -4
  68. package/dist/src/platforms/kakaotalk/auth/kakao-login.js.map +1 -1
  69. package/dist/src/platforms/kakaotalk/client.d.ts.map +1 -1
  70. package/dist/src/platforms/kakaotalk/client.js +3 -3
  71. package/dist/src/platforms/kakaotalk/client.js.map +1 -1
  72. package/dist/src/platforms/kakaotalk/commands/auth.d.ts.map +1 -1
  73. package/dist/src/platforms/kakaotalk/commands/auth.js +15 -9
  74. package/dist/src/platforms/kakaotalk/commands/auth.js.map +1 -1
  75. package/dist/src/platforms/kakaotalk/commands/shared.d.ts.map +1 -1
  76. package/dist/src/platforms/kakaotalk/commands/shared.js.map +1 -1
  77. package/dist/src/platforms/kakaotalk/protocol/connection.d.ts.map +1 -1
  78. package/dist/src/platforms/kakaotalk/protocol/connection.js.map +1 -1
  79. package/dist/src/platforms/kakaotalk/protocol/crypto.js +1 -1
  80. package/dist/src/platforms/kakaotalk/protocol/crypto.js.map +1 -1
  81. package/dist/src/platforms/kakaotalk/protocol/session.d.ts.map +1 -1
  82. package/dist/src/platforms/kakaotalk/protocol/session.js +1 -3
  83. package/dist/src/platforms/kakaotalk/protocol/session.js.map +1 -1
  84. package/dist/src/platforms/kakaotalk/token-extractor.js +5 -2
  85. package/dist/src/platforms/kakaotalk/token-extractor.js.map +1 -1
  86. package/dist/src/platforms/kakaotalk/types.d.ts.map +1 -1
  87. package/dist/src/platforms/kakaotalk/types.js +4 -2
  88. package/dist/src/platforms/kakaotalk/types.js.map +1 -1
  89. package/dist/src/platforms/line/cli.d.ts.map +1 -1
  90. package/dist/src/platforms/line/cli.js +1 -4
  91. package/dist/src/platforms/line/cli.js.map +1 -1
  92. package/dist/src/platforms/line/client.d.ts.map +1 -1
  93. package/dist/src/platforms/line/client.js +5 -13
  94. package/dist/src/platforms/line/client.js.map +1 -1
  95. package/dist/src/platforms/line/commands/chat.d.ts.map +1 -1
  96. package/dist/src/platforms/line/commands/chat.js.map +1 -1
  97. package/dist/src/platforms/line/commands/message.d.ts.map +1 -1
  98. package/dist/src/platforms/line/commands/message.js.map +1 -1
  99. package/dist/src/platforms/line/listener.js +1 -1
  100. package/dist/src/platforms/line/listener.js.map +1 -1
  101. package/dist/src/platforms/slack/cli.d.ts.map +1 -1
  102. package/dist/src/platforms/slack/cli.js.map +1 -1
  103. package/dist/src/platforms/slack/client-mappers.d.ts +14 -0
  104. package/dist/src/platforms/slack/client-mappers.d.ts.map +1 -0
  105. package/dist/src/platforms/slack/client-mappers.js +245 -0
  106. package/dist/src/platforms/slack/client-mappers.js.map +1 -0
  107. package/dist/src/platforms/slack/client.d.ts +0 -1
  108. package/dist/src/platforms/slack/client.d.ts.map +1 -1
  109. package/dist/src/platforms/slack/client.js +41 -455
  110. package/dist/src/platforms/slack/client.js.map +1 -1
  111. package/dist/src/platforms/slack/commands/channel.d.ts.map +1 -1
  112. package/dist/src/platforms/slack/commands/channel.js.map +1 -1
  113. package/dist/src/platforms/slack/commands/emoji.d.ts.map +1 -1
  114. package/dist/src/platforms/slack/commands/emoji.js +1 -3
  115. package/dist/src/platforms/slack/commands/emoji.js.map +1 -1
  116. package/dist/src/platforms/slack/commands/message.d.ts.map +1 -1
  117. package/dist/src/platforms/slack/commands/message.js.map +1 -1
  118. package/dist/src/platforms/slack/commands/reminder.d.ts.map +1 -1
  119. package/dist/src/platforms/slack/commands/reminder.js.map +1 -1
  120. package/dist/src/platforms/slack/commands/user.d.ts.map +1 -1
  121. package/dist/src/platforms/slack/commands/user.js.map +1 -1
  122. package/dist/src/platforms/slack/commands/usergroup.d.ts.map +1 -1
  123. package/dist/src/platforms/slack/commands/usergroup.js.map +1 -1
  124. package/dist/src/platforms/slack/commands/whoami.d.ts.map +1 -1
  125. package/dist/src/platforms/slack/commands/whoami.js.map +1 -1
  126. package/dist/src/platforms/slack/token-extractor.d.ts +2 -6
  127. package/dist/src/platforms/slack/token-extractor.d.ts.map +1 -1
  128. package/dist/src/platforms/slack/token-extractor.js +35 -229
  129. package/dist/src/platforms/slack/token-extractor.js.map +1 -1
  130. package/dist/src/platforms/slackbot/cli.d.ts.map +1 -1
  131. package/dist/src/platforms/slackbot/cli.js +1 -1
  132. package/dist/src/platforms/slackbot/cli.js.map +1 -1
  133. package/dist/src/platforms/teams/client.d.ts.map +1 -1
  134. package/dist/src/platforms/teams/client.js +1 -1
  135. package/dist/src/platforms/teams/client.js.map +1 -1
  136. package/dist/src/platforms/teams/commands/auth.d.ts.map +1 -1
  137. package/dist/src/platforms/teams/commands/auth.js +4 -1
  138. package/dist/src/platforms/teams/commands/auth.js.map +1 -1
  139. package/dist/src/platforms/teams/commands/whoami.d.ts.map +1 -1
  140. package/dist/src/platforms/teams/commands/whoami.js.map +1 -1
  141. package/dist/src/platforms/teams/token-extractor.d.ts +6 -18
  142. package/dist/src/platforms/teams/token-extractor.d.ts.map +1 -1
  143. package/dist/src/platforms/teams/token-extractor.js +71 -324
  144. package/dist/src/platforms/teams/token-extractor.js.map +1 -1
  145. package/dist/src/platforms/telegram/cli.d.ts.map +1 -1
  146. package/dist/src/platforms/telegram/cli.js +1 -4
  147. package/dist/src/platforms/telegram/cli.js.map +1 -1
  148. package/dist/src/platforms/telegram/client.d.ts.map +1 -1
  149. package/dist/src/platforms/telegram/client.js.map +1 -1
  150. package/dist/src/platforms/telegram/commands/auth.d.ts.map +1 -1
  151. package/dist/src/platforms/telegram/commands/auth.js +1 -1
  152. package/dist/src/platforms/telegram/commands/auth.js.map +1 -1
  153. package/dist/src/platforms/telegram/commands/chat.d.ts.map +1 -1
  154. package/dist/src/platforms/telegram/commands/chat.js.map +1 -1
  155. package/dist/src/platforms/telegram/commands/message.d.ts.map +1 -1
  156. package/dist/src/platforms/telegram/commands/message.js.map +1 -1
  157. package/dist/src/platforms/telegram/commands/whoami.js +1 -1
  158. package/dist/src/platforms/telegram/commands/whoami.js.map +1 -1
  159. package/dist/src/platforms/telegram/credential-manager.d.ts.map +1 -1
  160. package/dist/src/platforms/telegram/credential-manager.js +6 -2
  161. package/dist/src/platforms/telegram/credential-manager.js.map +1 -1
  162. package/dist/src/platforms/telegram/my-telegram-org.js.map +1 -1
  163. package/dist/src/platforms/webex/cli.d.ts.map +1 -1
  164. package/dist/src/platforms/webex/cli.js +1 -4
  165. package/dist/src/platforms/webex/cli.js.map +1 -1
  166. package/dist/src/platforms/webex/client.d.ts.map +1 -1
  167. package/dist/src/platforms/webex/client.js +19 -15
  168. package/dist/src/platforms/webex/client.js.map +1 -1
  169. package/dist/src/platforms/webex/commands/auth.d.ts.map +1 -1
  170. package/dist/src/platforms/webex/commands/auth.js +1 -3
  171. package/dist/src/platforms/webex/commands/auth.js.map +1 -1
  172. package/dist/src/platforms/webex/commands/member.d.ts.map +1 -1
  173. package/dist/src/platforms/webex/commands/member.js +1 -3
  174. package/dist/src/platforms/webex/commands/member.js.map +1 -1
  175. package/dist/src/platforms/webex/commands/message.d.ts.map +1 -1
  176. package/dist/src/platforms/webex/commands/message.js.map +1 -1
  177. package/dist/src/platforms/webex/commands/snapshot.d.ts.map +1 -1
  178. package/dist/src/platforms/webex/commands/snapshot.js.map +1 -1
  179. package/dist/src/platforms/webex/commands/space.d.ts.map +1 -1
  180. package/dist/src/platforms/webex/commands/space.js.map +1 -1
  181. package/dist/src/platforms/webex/commands/whoami.d.ts.map +1 -1
  182. package/dist/src/platforms/webex/commands/whoami.js.map +1 -1
  183. package/dist/src/platforms/webex/credential-manager.d.ts.map +1 -1
  184. package/dist/src/platforms/webex/credential-manager.js.map +1 -1
  185. package/dist/src/platforms/webex/ensure-auth.d.ts.map +1 -1
  186. package/dist/src/platforms/webex/ensure-auth.js +1 -3
  187. package/dist/src/platforms/webex/ensure-auth.js.map +1 -1
  188. package/dist/src/platforms/webex/index.d.ts +1 -1
  189. package/dist/src/platforms/webex/index.d.ts.map +1 -1
  190. package/dist/src/platforms/webex/index.js.map +1 -1
  191. package/dist/src/platforms/webex/markdown-to-html.d.ts +3 -0
  192. package/dist/src/platforms/webex/markdown-to-html.d.ts.map +1 -0
  193. package/dist/src/platforms/webex/markdown-to-html.js +161 -0
  194. package/dist/src/platforms/webex/markdown-to-html.js.map +1 -0
  195. package/dist/src/platforms/webex/token-extractor.d.ts.map +1 -1
  196. package/dist/src/platforms/webex/token-extractor.js +5 -14
  197. package/dist/src/platforms/webex/token-extractor.js.map +1 -1
  198. package/dist/src/platforms/wechatbot/client.d.ts.map +1 -1
  199. package/dist/src/platforms/wechatbot/client.js.map +1 -1
  200. package/dist/src/platforms/wechatbot/commands/message.d.ts.map +1 -1
  201. package/dist/src/platforms/wechatbot/commands/message.js.map +1 -1
  202. package/dist/src/platforms/whatsapp/cli.d.ts.map +1 -1
  203. package/dist/src/platforms/whatsapp/cli.js +1 -4
  204. package/dist/src/platforms/whatsapp/cli.js.map +1 -1
  205. package/dist/src/platforms/whatsapp/commands/chat.d.ts.map +1 -1
  206. package/dist/src/platforms/whatsapp/commands/chat.js.map +1 -1
  207. package/dist/src/platforms/whatsapp/commands/message.d.ts.map +1 -1
  208. package/dist/src/platforms/whatsapp/commands/message.js.map +1 -1
  209. package/dist/src/platforms/whatsapp/commands/shared.d.ts.map +1 -1
  210. package/dist/src/platforms/whatsapp/commands/shared.js.map +1 -1
  211. package/dist/src/platforms/whatsapp/credential-manager.d.ts.map +1 -1
  212. package/dist/src/platforms/whatsapp/credential-manager.js +1 -1
  213. package/dist/src/platforms/whatsapp/credential-manager.js.map +1 -1
  214. package/dist/src/platforms/whatsapp/ensure-auth.d.ts.map +1 -1
  215. package/dist/src/platforms/whatsapp/ensure-auth.js.map +1 -1
  216. package/dist/src/platforms/whatsappbot/client.d.ts.map +1 -1
  217. package/dist/src/platforms/whatsappbot/client.js +2 -2
  218. package/dist/src/platforms/whatsappbot/client.js.map +1 -1
  219. package/dist/src/platforms/whatsappbot/commands/auth.d.ts.map +1 -1
  220. package/dist/src/platforms/whatsappbot/commands/auth.js +4 -1
  221. package/dist/src/platforms/whatsappbot/commands/auth.js.map +1 -1
  222. package/dist/src/platforms/whatsappbot/commands/message.d.ts.map +1 -1
  223. package/dist/src/platforms/whatsappbot/commands/message.js.map +1 -1
  224. package/dist/src/platforms/whatsappbot/commands/shared.d.ts.map +1 -1
  225. package/dist/src/platforms/whatsappbot/commands/shared.js.map +1 -1
  226. package/dist/src/shared/chromium/browsers.d.ts +7 -0
  227. package/dist/src/shared/chromium/browsers.d.ts.map +1 -0
  228. package/dist/src/shared/chromium/browsers.js +89 -0
  229. package/dist/src/shared/chromium/browsers.js.map +1 -0
  230. package/dist/src/shared/chromium/cookie-reader.d.ts +20 -0
  231. package/dist/src/shared/chromium/cookie-reader.d.ts.map +1 -0
  232. package/dist/src/shared/chromium/cookie-reader.js +99 -0
  233. package/dist/src/shared/chromium/cookie-reader.js.map +1 -0
  234. package/dist/src/shared/chromium/decryptor.d.ts +42 -0
  235. package/dist/src/shared/chromium/decryptor.d.ts.map +1 -0
  236. package/dist/src/shared/chromium/decryptor.js +205 -0
  237. package/dist/src/shared/chromium/decryptor.js.map +1 -0
  238. package/dist/src/shared/chromium/index.d.ts +6 -0
  239. package/dist/src/shared/chromium/index.d.ts.map +1 -0
  240. package/dist/src/shared/chromium/index.js +4 -0
  241. package/dist/src/shared/chromium/index.js.map +1 -0
  242. package/dist/src/shared/chromium/types.d.ts +11 -0
  243. package/dist/src/shared/chromium/types.d.ts.map +1 -0
  244. package/dist/src/shared/chromium/types.js +2 -0
  245. package/dist/src/shared/chromium/types.js.map +1 -0
  246. package/dist/src/shared/utils/derived-key-cache.d.ts +1 -1
  247. package/dist/src/shared/utils/derived-key-cache.d.ts.map +1 -1
  248. package/dist/src/shared/utils/linux-keyring.js +4 -1
  249. package/dist/src/shared/utils/linux-keyring.js.map +1 -1
  250. package/dist/src/tui/adapters/kakaotalk-adapter.d.ts.map +1 -1
  251. package/dist/src/tui/adapters/kakaotalk-adapter.js +6 -1
  252. package/dist/src/tui/adapters/kakaotalk-adapter.js.map +1 -1
  253. package/dist/src/tui/adapters/telegram-adapter.js +1 -1
  254. package/dist/src/tui/adapters/telegram-adapter.js.map +1 -1
  255. package/dist/src/tui/adapters/webex-adapter.js +1 -1
  256. package/dist/src/tui/adapters/webex-adapter.js.map +1 -1
  257. package/dist/src/tui/app.d.ts.map +1 -1
  258. package/dist/src/tui/app.js +112 -23
  259. package/dist/src/tui/app.js.map +1 -1
  260. package/dist/src/tui/utils.d.ts.map +1 -1
  261. package/dist/src/tui/utils.js +11 -13
  262. package/dist/src/tui/utils.js.map +1 -1
  263. package/dist/src/tui/views/channel-picker.d.ts.map +1 -1
  264. package/dist/src/tui/views/channel-picker.js.map +1 -1
  265. package/dist/src/tui/views/workspace-picker.d.ts.map +1 -1
  266. package/dist/src/tui/views/workspace-picker.js.map +1 -1
  267. package/docs/content/docs/cli/channeltalk.mdx +24 -22
  268. package/docs/content/docs/cli/channeltalkbot.mdx +7 -7
  269. package/docs/content/docs/cli/instagram.mdx +4 -4
  270. package/docs/content/docs/cli/kakaotalk.mdx +9 -8
  271. package/docs/content/docs/cli/line.mdx +14 -14
  272. package/docs/content/docs/cli/webex.mdx +19 -19
  273. package/docs/content/docs/cli/wechatbot.mdx +12 -11
  274. package/docs/content/docs/cli/whatsapp.mdx +5 -4
  275. package/docs/content/docs/cli/whatsappbot.mdx +11 -11
  276. package/docs/content/docs/index.mdx +7 -7
  277. package/docs/content/docs/meta.json +1 -9
  278. package/docs/content/docs/sdk/channeltalk.mdx +5 -6
  279. package/docs/content/docs/sdk/channeltalkbot.mdx +6 -12
  280. package/docs/content/docs/sdk/discord.mdx +36 -43
  281. package/docs/content/docs/sdk/instagram.mdx +18 -18
  282. package/docs/content/docs/sdk/kakaotalk.mdx +27 -18
  283. package/docs/content/docs/sdk/line.mdx +8 -13
  284. package/docs/content/docs/sdk/meta.json +14 -1
  285. package/docs/content/docs/sdk/slack.mdx +36 -42
  286. package/docs/content/docs/sdk/teams.mdx +2 -8
  287. package/docs/content/docs/sdk/webex.mdx +2 -12
  288. package/docs/content/docs/sdk/wechatbot.mdx +1 -5
  289. package/docs/content/docs/sdk/whatsapp.mdx +10 -19
  290. package/docs/content/docs/sdk/whatsappbot.mdx +2 -10
  291. package/docs/content/docs/tui.mdx +23 -23
  292. package/docs/src/app/page.tsx +353 -108
  293. package/e2e/channeltalkbot.e2e.test.ts +1 -5
  294. package/e2e/config.ts +6 -2
  295. package/package.json +59 -58
  296. package/scripts/prepublish.ts +1 -3
  297. package/skills/agent-channeltalk/SKILL.md +1 -1
  298. package/skills/agent-channeltalkbot/SKILL.md +1 -1
  299. package/skills/agent-discord/SKILL.md +1 -1
  300. package/skills/agent-discordbot/SKILL.md +1 -1
  301. package/skills/agent-instagram/SKILL.md +1 -1
  302. package/skills/agent-kakaotalk/SKILL.md +1 -1
  303. package/skills/agent-line/SKILL.md +1 -1
  304. package/skills/agent-slack/SKILL.md +1 -1
  305. package/skills/agent-slackbot/SKILL.md +1 -1
  306. package/skills/agent-teams/SKILL.md +1 -1
  307. package/skills/agent-telegram/SKILL.md +1 -1
  308. package/skills/agent-webex/SKILL.md +1 -1
  309. package/skills/agent-wechatbot/SKILL.md +1 -1
  310. package/skills/agent-whatsapp/SKILL.md +1 -1
  311. package/skills/agent-whatsappbot/SKILL.md +1 -1
  312. package/src/platforms/channeltalk/client.test.ts +116 -29
  313. package/src/platforms/channeltalk/client.ts +26 -6
  314. package/src/platforms/channeltalk/commands/auth.test.ts +5 -5
  315. package/src/platforms/channeltalk/commands/auth.ts +19 -5
  316. package/src/platforms/channeltalk/commands/message.test.ts +2 -6
  317. package/src/platforms/channeltalk/commands/message.ts +5 -1
  318. package/src/platforms/channeltalk/commands/snapshot.test.ts +19 -4
  319. package/src/platforms/channeltalk/commands/snapshot.ts +5 -1
  320. package/src/platforms/channeltalk/ensure-auth.test.ts +20 -17
  321. package/src/platforms/channeltalk/ensure-auth.ts +6 -7
  322. package/src/platforms/channeltalk/index.ts +0 -1
  323. package/src/platforms/channeltalk/token-extractor.test.ts +33 -25
  324. package/src/platforms/channeltalk/token-extractor.ts +120 -372
  325. package/src/platforms/channeltalkbot/client.test.ts +1 -3
  326. package/src/platforms/channeltalkbot/client.ts +39 -13
  327. package/src/platforms/channeltalkbot/commands/auth.test.ts +3 -1
  328. package/src/platforms/channeltalkbot/commands/auth.ts +4 -1
  329. package/src/platforms/channeltalkbot/commands/bot.test.ts +13 -5
  330. package/src/platforms/channeltalkbot/commands/message.test.ts +12 -6
  331. package/src/platforms/channeltalkbot/commands/shared.ts +6 -2
  332. package/src/platforms/channeltalkbot/commands/snapshot.test.ts +17 -5
  333. package/src/platforms/channeltalkbot/credential-manager.test.ts +1 -1
  334. package/src/platforms/channeltalkbot/index.test.ts +0 -2
  335. package/src/platforms/channeltalkbot/index.ts +0 -1
  336. package/src/platforms/discord/commands/auth.test.ts +6 -4
  337. package/src/platforms/discord/commands/auth.ts +14 -14
  338. package/src/platforms/discord/commands/whoami.test.ts +2 -4
  339. package/src/platforms/discord/commands/whoami.ts +2 -0
  340. package/src/platforms/discord/ensure-auth.test.ts +5 -3
  341. package/src/platforms/discord/index.ts +0 -1
  342. package/src/platforms/discord/listener.test.ts +7 -1
  343. package/src/platforms/discord/token-extractor.test.ts +18 -12
  344. package/src/platforms/discord/token-extractor.ts +46 -190
  345. package/src/platforms/discordbot/client.ts +1 -4
  346. package/src/platforms/discordbot/commands/auth.test.ts +3 -1
  347. package/src/platforms/discordbot/commands/channel.test.ts +3 -1
  348. package/src/platforms/discordbot/commands/message.test.ts +3 -1
  349. package/src/platforms/discordbot/commands/server.test.ts +3 -1
  350. package/src/platforms/discordbot/commands/snapshot.test.ts +3 -1
  351. package/src/platforms/discordbot/commands/thread.test.ts +3 -1
  352. package/src/platforms/discordbot/commands/user.test.ts +3 -1
  353. package/src/platforms/instagram/cli.ts +1 -4
  354. package/src/platforms/instagram/client.test.ts +3 -8
  355. package/src/platforms/instagram/client.ts +39 -34
  356. package/src/platforms/instagram/commands/auth.test.ts +13 -12
  357. package/src/platforms/instagram/commands/auth.ts +136 -71
  358. package/src/platforms/instagram/commands/chat.test.ts +21 -24
  359. package/src/platforms/instagram/commands/chat.ts +2 -0
  360. package/src/platforms/instagram/commands/message.test.ts +29 -24
  361. package/src/platforms/instagram/commands/message.ts +3 -4
  362. package/src/platforms/instagram/commands/shared.ts +2 -5
  363. package/src/platforms/instagram/commands/whoami.test.ts +4 -6
  364. package/src/platforms/instagram/credential-manager.ts +2 -6
  365. package/src/platforms/instagram/ensure-auth.test.ts +1 -4
  366. package/src/platforms/instagram/ensure-auth.ts +6 -3
  367. package/src/platforms/instagram/listener.test.ts +7 -3
  368. package/src/platforms/instagram/token-extractor.test.ts +4 -16
  369. package/src/platforms/instagram/token-extractor.ts +55 -309
  370. package/src/platforms/instagram/types.test.ts +2 -6
  371. package/src/platforms/instagram/types.ts +4 -2
  372. package/src/platforms/kakaotalk/auth/kakao-login.ts +30 -8
  373. package/src/platforms/kakaotalk/client.test.ts +37 -25
  374. package/src/platforms/kakaotalk/client.ts +23 -12
  375. package/src/platforms/kakaotalk/commands/auth.test.ts +6 -18
  376. package/src/platforms/kakaotalk/commands/auth.ts +101 -47
  377. package/src/platforms/kakaotalk/commands/chat.test.ts +8 -11
  378. package/src/platforms/kakaotalk/commands/message.test.ts +15 -24
  379. package/src/platforms/kakaotalk/commands/shared.ts +1 -0
  380. package/src/platforms/kakaotalk/commands/whoami.test.ts +6 -10
  381. package/src/platforms/kakaotalk/credential-manager.test.ts +1 -4
  382. package/src/platforms/kakaotalk/index.test.ts +1 -0
  383. package/src/platforms/kakaotalk/index.ts +0 -2
  384. package/src/platforms/kakaotalk/listener.test.ts +7 -1
  385. package/src/platforms/kakaotalk/protocol/connection.ts +4 -1
  386. package/src/platforms/kakaotalk/protocol/crypto.ts +1 -1
  387. package/src/platforms/kakaotalk/protocol/session.ts +12 -6
  388. package/src/platforms/kakaotalk/token-extractor.ts +5 -5
  389. package/src/platforms/kakaotalk/types.ts +8 -7
  390. package/src/platforms/line/cli.ts +1 -4
  391. package/src/platforms/line/client.ts +12 -20
  392. package/src/platforms/line/commands/auth.test.ts +2 -1
  393. package/src/platforms/line/commands/chat.test.ts +2 -1
  394. package/src/platforms/line/commands/chat.ts +1 -4
  395. package/src/platforms/line/commands/friend.test.ts +2 -1
  396. package/src/platforms/line/commands/message.test.ts +2 -1
  397. package/src/platforms/line/commands/message.ts +2 -9
  398. package/src/platforms/line/commands/whoami.test.ts +2 -1
  399. package/src/platforms/line/credential-manager.test.ts +1 -2
  400. package/src/platforms/line/index.test.ts +1 -0
  401. package/src/platforms/line/listener.ts +1 -1
  402. package/src/platforms/line/types.test.ts +1 -0
  403. package/src/platforms/slack/cli.ts +3 -1
  404. package/src/platforms/slack/client-mappers.ts +297 -0
  405. package/src/platforms/slack/client.test.ts +532 -17
  406. package/src/platforms/slack/client.ts +69 -458
  407. package/src/platforms/slack/commands/channel.ts +1 -4
  408. package/src/platforms/slack/commands/emoji.test.ts +6 -4
  409. package/src/platforms/slack/commands/emoji.ts +20 -22
  410. package/src/platforms/slack/commands/message.ts +6 -1
  411. package/src/platforms/slack/commands/pin.test.ts +14 -12
  412. package/src/platforms/slack/commands/reminder.ts +7 -6
  413. package/src/platforms/slack/commands/user.ts +6 -1
  414. package/src/platforms/slack/commands/usergroup.test.ts +3 -3
  415. package/src/platforms/slack/commands/usergroup.ts +10 -7
  416. package/src/platforms/slack/commands/whoami.test.ts +1 -1
  417. package/src/platforms/slack/commands/whoami.ts +2 -0
  418. package/src/platforms/slack/index.ts +0 -2
  419. package/src/platforms/slack/listener.test.ts +1 -0
  420. package/src/platforms/slack/token-extractor.test.ts +7 -12
  421. package/src/platforms/slack/token-extractor.ts +47 -255
  422. package/src/platforms/slackbot/cli.ts +8 -1
  423. package/src/platforms/slackbot/commands/auth.test.ts +3 -1
  424. package/src/platforms/teams/client.ts +1 -1
  425. package/src/platforms/teams/commands/auth.test.ts +1 -1
  426. package/src/platforms/teams/commands/auth.ts +4 -1
  427. package/src/platforms/teams/commands/whoami.test.ts +2 -4
  428. package/src/platforms/teams/commands/whoami.ts +2 -0
  429. package/src/platforms/teams/index.ts +0 -1
  430. package/src/platforms/teams/token-extractor.ts +82 -350
  431. package/src/platforms/telegram/app-config.test.ts +1 -0
  432. package/src/platforms/telegram/chat-utils.test.ts +5 -1
  433. package/src/platforms/telegram/cli.ts +2 -4
  434. package/src/platforms/telegram/client.test.ts +16 -3
  435. package/src/platforms/telegram/client.ts +14 -4
  436. package/src/platforms/telegram/commands/auth.test.ts +1 -0
  437. package/src/platforms/telegram/commands/auth.ts +3 -4
  438. package/src/platforms/telegram/commands/chat.test.ts +2 -5
  439. package/src/platforms/telegram/commands/chat.ts +1 -0
  440. package/src/platforms/telegram/commands/message.test.ts +2 -5
  441. package/src/platforms/telegram/commands/message.ts +1 -0
  442. package/src/platforms/telegram/commands/shared.test.ts +1 -0
  443. package/src/platforms/telegram/commands/whoami.test.ts +5 -7
  444. package/src/platforms/telegram/commands/whoami.ts +1 -1
  445. package/src/platforms/telegram/credential-manager.test.ts +1 -0
  446. package/src/platforms/telegram/credential-manager.ts +11 -2
  447. package/src/platforms/telegram/my-telegram-org.ts +6 -2
  448. package/src/platforms/telegram/types.test.ts +1 -0
  449. package/src/platforms/webex/app-config.test.ts +1 -0
  450. package/src/platforms/webex/cli.ts +1 -4
  451. package/src/platforms/webex/client.test.ts +39 -12
  452. package/src/platforms/webex/client.ts +30 -61
  453. package/src/platforms/webex/commands/auth.test.ts +7 -1
  454. package/src/platforms/webex/commands/auth.ts +12 -15
  455. package/src/platforms/webex/commands/member.test.ts +1 -3
  456. package/src/platforms/webex/commands/member.ts +14 -19
  457. package/src/platforms/webex/commands/message.ts +4 -15
  458. package/src/platforms/webex/commands/snapshot.test.ts +28 -3
  459. package/src/platforms/webex/commands/snapshot.ts +3 -3
  460. package/src/platforms/webex/commands/space.test.ts +3 -3
  461. package/src/platforms/webex/commands/space.ts +2 -9
  462. package/src/platforms/webex/commands/whoami.test.ts +12 -5
  463. package/src/platforms/webex/commands/whoami.ts +2 -0
  464. package/src/platforms/webex/credential-manager.ts +11 -2
  465. package/src/platforms/webex/ensure-auth.ts +1 -3
  466. package/src/platforms/webex/index.ts +1 -7
  467. package/src/platforms/webex/markdown-to-html.test.ts +141 -0
  468. package/src/platforms/webex/markdown-to-html.ts +194 -0
  469. package/src/platforms/webex/token-extractor.ts +6 -29
  470. package/src/platforms/wechatbot/cli.ts +0 -0
  471. package/src/platforms/wechatbot/client.test.ts +6 -2
  472. package/src/platforms/wechatbot/client.ts +6 -1
  473. package/src/platforms/wechatbot/commands/auth.test.ts +3 -7
  474. package/src/platforms/wechatbot/commands/message.test.ts +1 -4
  475. package/src/platforms/wechatbot/commands/message.ts +5 -1
  476. package/src/platforms/wechatbot/commands/template.test.ts +1 -4
  477. package/src/platforms/wechatbot/commands/user.test.ts +2 -7
  478. package/src/platforms/whatsapp/cli.ts +1 -4
  479. package/src/platforms/whatsapp/commands/auth.test.ts +19 -22
  480. package/src/platforms/whatsapp/commands/chat.test.ts +21 -24
  481. package/src/platforms/whatsapp/commands/chat.ts +2 -0
  482. package/src/platforms/whatsapp/commands/message.test.ts +22 -24
  483. package/src/platforms/whatsapp/commands/message.ts +3 -5
  484. package/src/platforms/whatsapp/commands/shared.ts +2 -5
  485. package/src/platforms/whatsapp/commands/whoami.test.ts +2 -2
  486. package/src/platforms/whatsapp/credential-manager.ts +2 -6
  487. package/src/platforms/whatsapp/ensure-auth.test.ts +1 -4
  488. package/src/platforms/whatsapp/ensure-auth.ts +14 -6
  489. package/src/platforms/whatsapp/index.ts +0 -2
  490. package/src/platforms/whatsappbot/client.test.ts +13 -7
  491. package/src/platforms/whatsappbot/client.ts +18 -4
  492. package/src/platforms/whatsappbot/commands/auth.ts +4 -1
  493. package/src/platforms/whatsappbot/commands/message.test.ts +12 -2
  494. package/src/platforms/whatsappbot/commands/message.ts +16 -3
  495. package/src/platforms/whatsappbot/commands/shared.ts +3 -1
  496. package/src/platforms/whatsappbot/commands/whoami.test.ts +1 -3
  497. package/src/platforms/whatsappbot/index.ts +0 -2
  498. package/src/shared/chromium/browsers.test.ts +274 -0
  499. package/src/shared/chromium/browsers.ts +86 -0
  500. package/src/shared/chromium/cookie-reader.test.ts +274 -0
  501. package/src/shared/chromium/cookie-reader.ts +111 -0
  502. package/src/shared/chromium/decryptor.test.ts +449 -0
  503. package/src/shared/chromium/decryptor.ts +227 -0
  504. package/src/shared/chromium/index.ts +11 -0
  505. package/src/shared/chromium/types.ts +11 -0
  506. package/src/shared/utils/derived-key-cache.ts +1 -1
  507. package/src/shared/utils/linux-keyring.ts +4 -4
  508. package/src/tui/adapters/kakaotalk-adapter.ts +6 -1
  509. package/src/tui/adapters/telegram-adapter.ts +1 -1
  510. package/src/tui/adapters/webex-adapter.ts +1 -1
  511. package/src/tui/app.ts +149 -59
  512. package/src/tui/utils.test.ts +144 -145
  513. package/src/tui/utils.ts +27 -29
  514. package/src/tui/views/channel-picker.ts +1 -1
  515. package/src/tui/views/workspace-picker.ts +1 -1
@@ -65,12 +65,12 @@ This command:
65
65
 
66
66
  ### Token Types
67
67
 
68
- | Type | Lifetime | Best For |
69
- | --- | --- | --- |
70
- | Browser Extraction (recommended) | Session-based (re-extract when expired) | Interactive use, sending as yourself |
71
- | OAuth Device Grant | 14-day access, 90-day refresh (auto-refresh) | Fallback when no browser session |
72
- | Bot Token | Never expires | CI/CD, long-running automation |
73
- | Personal Access Token (PAT) | 12 hours | Quick testing |
68
+ | Type | Lifetime | Best For |
69
+ | -------------------------------- | -------------------------------------------- | ------------------------------------ |
70
+ | Browser Extraction (recommended) | Session-based (re-extract when expired) | Interactive use, sending as yourself |
71
+ | OAuth Device Grant | 14-day access, 90-day refresh (auto-refresh) | Fallback when no browser session |
72
+ | Bot Token | Never expires | CI/CD, long-running automation |
73
+ | Personal Access Token (PAT) | 12 hours | Quick testing |
74
74
 
75
75
  ### Authentication Commands
76
76
 
@@ -101,9 +101,9 @@ agent-webex auth logout
101
101
 
102
102
  Override the built-in Integration credentials with your own:
103
103
 
104
- | Variable | Description |
105
- | --- | --- |
106
- | `AGENT_WEBEX_CLIENT_ID` | Webex Integration client ID |
104
+ | Variable | Description |
105
+ | --------------------------- | ------------------------------- |
106
+ | `AGENT_WEBEX_CLIENT_ID` | Webex Integration client ID |
107
107
  | `AGENT_WEBEX_CLIENT_SECRET` | Webex Integration client secret |
108
108
 
109
109
  Both must be set together. When set, `auth login` (without `--token`) uses these instead of the built-in credentials.
@@ -194,16 +194,16 @@ All commands support these options:
194
194
 
195
195
  ## Key Differences: Webex vs Slack vs Discord vs Teams
196
196
 
197
- | Concept | Slack | Discord | Teams | Webex |
198
- | --- | --- | --- | --- | --- |
199
- | Server/Workspace | Workspace | Guild | Team | Organization |
200
- | Channel | Channel | Channel | Channel | Space |
201
- | Channel ID format | Alphanumeric (C01234567) | Numeric snowflake | UUID | Base64-encoded opaque ID |
202
- | Message ID format | Timestamp (1234567890.123456) | Numeric snowflake | UUID | Base64-encoded opaque ID |
203
- | Token lifetime | Long-lived | Long-lived | 60-90 minutes | 14 days (auto-refresh) |
204
- | API | Slack Web API | Discord API | Teams Messaging API | Webex REST API |
205
- | Auth method | Desktop app extraction | Desktop app extraction | Desktop app extraction | OAuth Device Grant |
206
- | Rate limits | Moderate | Moderate | Strict | ~600 req/min |
197
+ | Concept | Slack | Discord | Teams | Webex |
198
+ | ----------------- | ----------------------------- | ---------------------- | ---------------------- | ------------------------ |
199
+ | Server/Workspace | Workspace | Guild | Team | Organization |
200
+ | Channel | Channel | Channel | Channel | Space |
201
+ | Channel ID format | Alphanumeric (C01234567) | Numeric snowflake | UUID | Base64-encoded opaque ID |
202
+ | Message ID format | Timestamp (1234567890.123456) | Numeric snowflake | UUID | Base64-encoded opaque ID |
203
+ | Token lifetime | Long-lived | Long-lived | 60-90 minutes | 14 days (auto-refresh) |
204
+ | API | Slack Web API | Discord API | Teams Messaging API | Webex REST API |
205
+ | Auth method | Desktop app extraction | Desktop app extraction | Desktop app extraction | OAuth Device Grant |
206
+ | Rate limits | Moderate | Moderate | Strict | ~600 req/min |
207
207
 
208
208
  ## Troubleshooting
209
209
 
@@ -25,14 +25,14 @@ agent-wechatbot message send oXXXXXXXXXXXXXXX "Hello from the CLI!"
25
25
 
26
26
  WeChat Official Account API works differently from typical messaging APIs:
27
27
 
28
- | Concept | Description |
29
- | ------------------------ | -------------------------------------------------------------------------------- |
30
- | **Send-only** | Cannot list or read received messages. Inbound messages require webhooks. |
31
- | **Customer service messages** | Free-form text, image, and news messages within 48h of user's last interaction. |
32
- | **Template messages** | Pre-approved templates can be sent at any time. Created in the WeChat admin panel. |
33
- | **App ID + App Secret** | Credentials from WeChat Official Account admin panel under Development settings. |
34
- | **OpenID** | Each follower has a unique OpenID scoped to your Official Account. |
35
- | **IP Whitelist** | Your server IP must be added to the account's whitelist or API calls fail (40164). |
28
+ | Concept | Description |
29
+ | ----------------------------- | ---------------------------------------------------------------------------------- |
30
+ | **Send-only** | Cannot list or read received messages. Inbound messages require webhooks. |
31
+ | **Customer service messages** | Free-form text, image, and news messages within 48h of user's last interaction. |
32
+ | **Template messages** | Pre-approved templates can be sent at any time. Created in the WeChat admin panel. |
33
+ | **App ID + App Secret** | Credentials from WeChat Official Account admin panel under Development settings. |
34
+ | **OpenID** | Each follower has a unique OpenID scoped to your Official Account. |
35
+ | **IP Whitelist** | Your server IP must be added to the account's whitelist or API calls fail (40164). |
36
36
 
37
37
  ## Authentication
38
38
 
@@ -130,9 +130,9 @@ agent-wechatbot user get oABCD1234 --lang en
130
130
 
131
131
  ## Global Options
132
132
 
133
- | Option | Description |
134
- | ---------------- | -------------------------------------- |
135
- | `--pretty` | Human-readable output instead of JSON |
133
+ | Option | Description |
134
+ | ---------------- | --------------------------------------- |
135
+ | `--pretty` | Human-readable output instead of JSON |
136
136
  | `--account <id>` | Use a specific account for this command |
137
137
 
138
138
  ## Storage
@@ -173,6 +173,7 @@ If you get error `40164`, your server's IP is not in the Official Account's whit
173
173
  ### Token errors (40001, 42001)
174
174
 
175
175
  These indicate an expired or invalid access token. The CLI handles automatic token refresh, but if you see persistent errors:
176
+
176
177
  - Verify your App Secret hasn't been reset in the admin panel
177
178
  - Re-run `agent-wechatbot auth set <app-id> <app-secret>` with the current credentials
178
179
 
@@ -114,6 +114,7 @@ agent-whatsapp message react +1234567890 ABC123DEF456 "👍" --from-me
114
114
  ```
115
115
 
116
116
  The `<chat>` argument accepts:
117
+
117
118
  - Phone number: `+1234567890` (auto-resolved to JID)
118
119
  - Individual JID: `1234567890@s.whatsapp.net`
119
120
  - Group JID: `123456789-123345@g.us`
@@ -122,10 +123,10 @@ The `--from-me` flag on `message react` indicates the target message was sent by
122
123
 
123
124
  ## Global Options
124
125
 
125
- | Option | Description |
126
- | ---------------- | ------------------------------------------ |
127
- | `--pretty` | Human-readable output instead of JSON |
128
- | `--account <id>` | Use a specific account for this command |
126
+ | Option | Description |
127
+ | ---------------- | --------------------------------------- |
128
+ | `--pretty` | Human-readable output instead of JSON |
129
+ | `--account <id>` | Use a specific account for this command |
129
130
 
130
131
  ## Storage
131
132
 
@@ -25,13 +25,13 @@ agent-whatsappbot message send 15551234567 "Hello from the CLI!"
25
25
 
26
26
  WhatsApp Business Cloud API works differently from the user-mode WhatsApp integration:
27
27
 
28
- | Concept | Description |
29
- | -------------------- | --------------------------------------------------------------------------- |
30
- | **Send-only** | Cannot list or read received messages. Inbound messages require webhooks. |
31
- | **Template messages** | Required outside the 24-hour customer service window. Must be pre-approved. |
32
- | **Phone Number ID** | Your WhatsApp Business phone number's unique identifier (not the number). |
33
- | **Access Token** | Token from Meta Business Manager with `whatsapp_business_messaging` permission. |
34
- | **Rate limits** | Tier 0-3: 80 msg/s. Tier 4: 1,000 msg/s. Based on business verification. |
28
+ | Concept | Description |
29
+ | --------------------- | ------------------------------------------------------------------------------- |
30
+ | **Send-only** | Cannot list or read received messages. Inbound messages require webhooks. |
31
+ | **Template messages** | Required outside the 24-hour customer service window. Must be pre-approved. |
32
+ | **Phone Number ID** | Your WhatsApp Business phone number's unique identifier (not the number). |
33
+ | **Access Token** | Token from Meta Business Manager with `whatsapp_business_messaging` permission. |
34
+ | **Rate limits** | Tier 0-3: 80 msg/s. Tier 4: 1,000 msg/s. Based on business verification. |
35
35
 
36
36
  ## Authentication
37
37
 
@@ -124,10 +124,10 @@ agent-whatsappbot template get order_confirmation
124
124
 
125
125
  ## Global Options
126
126
 
127
- | Option | Description |
128
- | ---------------- | ------------------------------------------ |
129
- | `--pretty` | Human-readable output instead of JSON |
130
- | `--account <id>` | Use a specific account for this command |
127
+ | Option | Description |
128
+ | ---------------- | --------------------------------------- |
129
+ | `--pretty` | Human-readable output instead of JSON |
130
+ | `--account <id>` | Use a specific account for this command |
131
131
 
132
132
  ## Storage
133
133
 
@@ -33,13 +33,13 @@ No app creation. No admin approval. No waiting.
33
33
 
34
34
  ## Key Features
35
35
 
36
- | Feature | Description |
37
- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
38
- | **Auto-extraction** | Pulls tokens from desktop apps automatically |
39
- | **Multi-platform** | Slack, Discord, Microsoft Teams, Telegram, WhatsApp, LINE, Instagram, KakaoTalk, and Channel Talk (beta) |
40
- | **Multi-workspace** | Switch between workspaces/servers easily |
41
- | **JSON output** | Machine-readable by default, `--pretty` for humans |
42
- | **Comprehensive** | Messages, channels, users, reactions, files |
36
+ | Feature | Description |
37
+ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
38
+ | **Auto-extraction** | Pulls tokens from desktop apps automatically |
39
+ | **Multi-platform** | Slack, Discord, Microsoft Teams, Telegram, WhatsApp, LINE, Instagram, KakaoTalk, and Channel Talk (beta) |
40
+ | **Multi-workspace** | Switch between workspaces/servers easily |
41
+ | **JSON output** | Machine-readable by default, `--pretty` for humans |
42
+ | **Comprehensive** | Messages, channels, users, reactions, files |
43
43
  | **Bot support** | [`agent-slackbot`](/docs/cli/slackbot), [`agent-discordbot`](/docs/cli/discordbot), and [`agent-channeltalkbot`](/docs/cli/channeltalkbot) for server-side and CI/CD |
44
44
 
45
45
  ## Why Not MCP?
@@ -1,11 +1,3 @@
1
1
  {
2
- "pages": [
3
- "index",
4
- "quick-start",
5
- "agent-skills",
6
- "tui",
7
- "---",
8
- "cli",
9
- "sdk"
10
- ]
2
+ "pages": ["index", "quick-start", "agent-skills", "tui", "---", "cli", "sdk"]
11
3
  }
@@ -10,11 +10,7 @@ npm install agent-messenger
10
10
  ```
11
11
 
12
12
  ```typescript
13
- import {
14
- ChannelClient,
15
- ChannelCredentialManager,
16
- ChannelError,
17
- } from 'agent-messenger/channeltalk'
13
+ import { ChannelClient, ChannelCredentialManager, ChannelError } from 'agent-messenger/channeltalk'
18
14
  ```
19
15
 
20
16
  ## ChannelClient
@@ -299,7 +295,10 @@ const manager = new ChannelCredentialManager()
299
295
  const creds = await manager.getCredentials()
300
296
  if (!creds) throw new Error('No credentials')
301
297
 
302
- const client = await new ChannelClient().login({ accountCookie: creds.account_cookie, sessionCookie: creds.session_cookie })
298
+ const client = await new ChannelClient().login({
299
+ accountCookie: creds.account_cookie,
300
+ sessionCookie: creds.session_cookie,
301
+ })
303
302
  const account = await client.getAccount()
304
303
  console.log(`Logged in as ${account.name} (${account.email})`)
305
304
 
@@ -10,11 +10,7 @@ npm install agent-messenger
10
10
  ```
11
11
 
12
12
  ```typescript
13
- import {
14
- ChannelBotClient,
15
- ChannelBotCredentialManager,
16
- ChannelBotError,
17
- } from 'agent-messenger/channeltalkbot'
13
+ import { ChannelBotClient, ChannelBotCredentialManager, ChannelBotError } from 'agent-messenger/channeltalkbot'
18
14
  ```
19
15
 
20
16
  ## ChannelBotClient
@@ -123,8 +119,8 @@ const file = await client.getGroupFileUrl(groupId, fileKey)
123
119
  // → { url: string }
124
120
 
125
121
  // Resolve a group by ID or @name (auto-detects format)
126
- const resolved = await client.resolveGroup('@engineering') // by name
127
- const byId = await client.resolveGroup('abc123') // by ID
122
+ const resolved = await client.resolveGroup('@engineering') // by name
123
+ const byId = await client.resolveGroup('abc123') // by ID
128
124
  // → ChannelBotGroup
129
125
  ```
130
126
 
@@ -296,7 +292,7 @@ for (const chat of chats) {
296
292
 
297
293
  if (lastMsg?.plainText?.includes('hours')) {
298
294
  const reply = ChannelBotClient.wrapTextInBlocks(
299
- 'Our support hours are Mon–Fri 9am–6pm KST. We\'ll get back to you shortly!'
295
+ "Our support hours are Mon–Fri 9am–6pm KST. We'll get back to you shortly!",
300
296
  )
301
297
  await client.sendUserChatMessage(chat.id, reply, 'Support Bot')
302
298
  await client.closeUserChat(chat.id, 'Support Bot')
@@ -317,9 +313,7 @@ const client = await new ChannelBotClient().login({ accessKey, accessSecret })
317
313
  const group = await client.resolveGroup('@engineering')
318
314
 
319
315
  // Send deployment notification
320
- const blocks = ChannelBotClient.wrapTextInBlocks(
321
- 'Deployment v2.1.0 complete — all services healthy'
322
- )
316
+ const blocks = ChannelBotClient.wrapTextInBlocks('Deployment v2.1.0 complete — all services healthy')
323
317
  await client.sendGroupMessage(group.id, blocks, 'Deploy Bot')
324
318
 
325
319
  // Verify delivery
@@ -388,7 +382,7 @@ for (const chat of openChats.slice(0, 5)) {
388
382
 
389
383
  // Send acknowledgment
390
384
  const reply = ChannelBotClient.wrapTextInBlocks(
391
- 'Your request has been received. A team member will follow up shortly.'
385
+ 'Your request has been received. A team member will follow up shortly.',
392
386
  )
393
387
  await client.sendUserChatMessage(chat.id, reply, 'Support Bot')
394
388
  }
@@ -10,12 +10,7 @@ npm install agent-messenger
10
10
  ```
11
11
 
12
12
  ```typescript
13
- import {
14
- DiscordClient,
15
- DiscordCredentialManager,
16
- DiscordError,
17
- DiscordListener,
18
- } from 'agent-messenger/discord'
13
+ import { DiscordClient, DiscordCredentialManager, DiscordError, DiscordListener } from 'agent-messenger/discord'
19
14
  ```
20
15
 
21
16
  ## DiscordClient
@@ -183,12 +178,12 @@ const limited = await client.searchMembers(serverId, 'alice', 5)
183
178
  // Search messages in a server
184
179
  const results = await client.searchMessages(serverId, 'deployment failed')
185
180
  const filtered = await client.searchMessages(serverId, 'API design', {
186
- channelId: '123456789', // limit to a specific channel
187
- authorId: '987654321', // limit to a specific author
188
- has: 'file', // 'file' | 'image' | 'video' | 'embed' | 'link' | 'sticker'
189
- sortBy: 'timestamp', // 'timestamp' | 'relevance'
190
- sortOrder: 'desc', // 'asc' | 'desc'
191
- limit: 10, // max 25
181
+ channelId: '123456789', // limit to a specific channel
182
+ authorId: '987654321', // limit to a specific author
183
+ has: 'file', // 'file' | 'image' | 'video' | 'embed' | 'link' | 'sticker'
184
+ sortBy: 'timestamp', // 'timestamp' | 'relevance'
185
+ sortOrder: 'desc', // 'asc' | 'desc'
186
+ limit: 10, // max 25
192
187
  offset: 0,
193
188
  })
194
189
  // → { results: DiscordSearchResult[], total: number }
@@ -200,8 +195,8 @@ const filtered = await client.searchMessages(serverId, 'API design', {
200
195
  // Create a thread in a channel
201
196
  const thread = await client.createThread(channelId, 'Bug Report: Login Issue')
202
197
  const configured = await client.createThread(channelId, 'Design Review', {
203
- auto_archive_duration: 1440, // minutes: 60, 1440, 4320, or 10080
204
- rate_limit_per_user: 5, // seconds between messages (slow mode)
198
+ auto_archive_duration: 1440, // minutes: 60, 1440, 4320, or 10080
199
+ rate_limit_per_user: 5, // seconds between messages (slow mode)
205
200
  })
206
201
  // → DiscordChannel (with thread_metadata)
207
202
 
@@ -236,7 +231,7 @@ listener.on('discord_event', (event) => {
236
231
 
237
232
  listener.on('error', (err) => console.error(err))
238
233
 
239
- await listener.start() // connects via Gateway WebSocket
234
+ await listener.start() // connects via Gateway WebSocket
240
235
  // listener.stop() // clean shutdown
241
236
  ```
242
237
 
@@ -252,21 +247,22 @@ const listener = new DiscordListener(client, {
252
247
 
253
248
  ### Available Events
254
249
 
255
- | Event | Description |
256
- |-------|-------------|
257
- | `message_create` | New message in a channel or DM |
258
- | `message_update` | Message content edited |
259
- | `message_delete` | Message deleted |
260
- | `message_reaction_add` / `message_reaction_remove` | Reaction changes |
261
- | `guild_member_add` / `guild_member_remove` | Member joins/leaves server |
262
- | `typing_start` | Typing indicator |
263
- | `presence_update` | User online/idle/dnd/offline status |
264
- | `channel_create` / `channel_update` / `channel_delete` | Channel lifecycle |
265
- | `discord_event` | Catch-all for every Gateway dispatch event |
266
- | `connected` / `disconnected` | Connection lifecycle |
267
- | `error` | Connection or protocol error |
250
+ | Event | Description |
251
+ | ------------------------------------------------------ | ------------------------------------------ |
252
+ | `message_create` | New message in a channel or DM |
253
+ | `message_update` | Message content edited |
254
+ | `message_delete` | Message deleted |
255
+ | `message_reaction_add` / `message_reaction_remove` | Reaction changes |
256
+ | `guild_member_add` / `guild_member_remove` | Member joins/leaves server |
257
+ | `typing_start` | Typing indicator |
258
+ | `presence_update` | User online/idle/dnd/offline status |
259
+ | `channel_create` / `channel_update` / `channel_delete` | Channel lifecycle |
260
+ | `discord_event` | Catch-all for every Gateway dispatch event |
261
+ | `connected` / `disconnected` | Connection lifecycle |
262
+ | `error` | Connection or protocol error |
268
263
 
269
264
  Features:
265
+
270
266
  - Gateway intents configurable (non-privileged defaults — `MessageContent`, `GuildMembers`, `GuildPresences` require opt-in)
271
267
  - Auto-reconnect with exponential backoff
272
268
  - Heartbeat keepalive with zombie connection detection
@@ -422,21 +418,21 @@ const thread = await client.createThread(channelId, 'Project Alpha — Kickoff',
422
418
  })
423
419
 
424
420
  // Post welcome message in the thread
425
- await client.sendMessage(thread.id, [
426
- '👋 Welcome to **Project Alpha**!',
427
- '',
428
- '📋 **Resources** links and docs will be pinned here',
429
- '🧵 **Discussions** — use threads to keep things organized',
430
- '🚀 **Goal** — ship the MVP by end of Q1',
431
- ].join('\n'))
421
+ await client.sendMessage(
422
+ thread.id,
423
+ [
424
+ '👋 Welcome to **Project Alpha**!',
425
+ '',
426
+ '📋 **Resources** — links and docs will be pinned here',
427
+ '🧵 **Discussions** — use threads to keep things organized',
428
+ '🚀 **Goal** — ship the MVP by end of Q1',
429
+ ].join('\n'),
430
+ )
432
431
 
433
432
  // Look up team members and notify them
434
433
  const members = await client.searchMembers(serverId, 'alice')
435
434
  for (const member of members.slice(0, 3)) {
436
- await client.sendMessage(
437
- thread.id,
438
- `Hey <@${member.user.id}>, you're on the Alpha team — see you here!`,
439
- )
435
+ await client.sendMessage(thread.id, `Hey <@${member.user.id}>, you're on the Alpha team — see you here!`)
440
436
  }
441
437
  ```
442
438
 
@@ -457,10 +453,7 @@ for (const mention of mentions) {
457
453
  await client.addReaction(mention.channel_id, mention.id, '👀')
458
454
 
459
455
  // Reply with acknowledgment
460
- await client.sendMessage(
461
- mention.channel_id,
462
- `Thanks for the ping <@${mention.author.id}> — on it!`,
463
- )
456
+ await client.sendMessage(mention.channel_id, `Thanks for the ping <@${mention.author.id}> — on it!`)
464
457
 
465
458
  // Set a note on the user for context
466
459
  const existing = await client.getUserNote(mention.author.id)
@@ -147,12 +147,12 @@ await listener.start()
147
147
 
148
148
  ### Events
149
149
 
150
- | Event | Payload | Description |
151
- |-------|---------|-------------|
152
- | `message` | `InstagramMessageSummary` | New message received |
153
- | `connected` | `{ userId: string }` | Initial poll completed, listener active |
154
- | `disconnected` | — | Listener stopped |
155
- | `error` | `Error` | Network or API error |
150
+ | Event | Payload | Description |
151
+ | -------------- | ------------------------- | --------------------------------------- |
152
+ | `message` | `InstagramMessageSummary` | New message received |
153
+ | `connected` | `{ userId: string }` | Initial poll completed, listener active |
154
+ | `disconnected` | — | Listener stopped |
155
+ | `error` | `Error` | Network or API error |
156
156
 
157
157
  The listener seeds its seen-message set on startup, so it only emits `message` events for messages that arrive after `start()`.
158
158
 
@@ -227,8 +227,8 @@ import type {
227
227
 
228
228
  ```typescript
229
229
  interface InstagramChatSummary {
230
- id: string // Thread ID
231
- name: string // Thread title or participant names
230
+ id: string // Thread ID
231
+ name: string // Thread title or participant names
232
232
  type: 'private' | 'group'
233
233
  is_group: boolean
234
234
  participant_count: number
@@ -237,13 +237,13 @@ interface InstagramChatSummary {
237
237
  }
238
238
 
239
239
  interface InstagramMessageSummary {
240
- id: string // Message item ID
240
+ id: string // Message item ID
241
241
  thread_id: string
242
- from: string // User pk (numeric ID)
242
+ from: string // User pk (numeric ID)
243
243
  from_name?: string
244
- timestamp: string // ISO 8601
244
+ timestamp: string // ISO 8601
245
245
  is_outgoing: boolean
246
- type: string // 'text', 'media', 'reel_share', 'link', 'like', etc.
246
+ type: string // 'text', 'media', 'reel_share', 'link', 'like', etc.
247
247
  text?: string
248
248
  media_url?: string
249
249
  }
@@ -253,10 +253,10 @@ interface InstagramMessageSummary {
253
253
 
254
254
  ```typescript
255
255
  import {
256
- createAccountId, // Normalize a username to an account ID
257
- getMessageType, // Extract message type from API item
258
- extractMessageText, // Extract text from any message type
259
- extractMediaUrl, // Extract media URL from any message type
256
+ createAccountId, // Normalize a username to an account ID
257
+ getMessageType, // Extract message type from API item
258
+ extractMessageText, // Extract text from any message type
259
+ extractMediaUrl, // Extract media URL from any message type
260
260
  } from 'agent-messenger/instagram'
261
261
  ```
262
262
 
@@ -272,7 +272,7 @@ import { InstagramClient } from 'agent-messenger/instagram'
272
272
  const client = await new InstagramClient().login()
273
273
 
274
274
  const chats = await client.listChats(50)
275
- const unread = chats.filter(c => c.unread_count > 0)
275
+ const unread = chats.filter((c) => c.unread_count > 0)
276
276
 
277
277
  console.log(`${unread.length} threads with unread messages:`)
278
278
  for (const chat of unread) {
@@ -294,7 +294,7 @@ const client = await new InstagramClient().login()
294
294
 
295
295
  // Find the user
296
296
  const users = await client.searchUsers('alice_smith')
297
- const alice = users.find(u => u.username === 'alice_smith')
297
+ const alice = users.find((u) => u.username === 'alice_smith')
298
298
 
299
299
  if (alice) {
300
300
  const msg = await client.sendMessageToUser(alice.pk, 'Hey! Wanted to follow up on our chat.')
@@ -10,10 +10,7 @@ npm install agent-messenger
10
10
  ```
11
11
 
12
12
  ```typescript
13
- import {
14
- KakaoTalkClient,
15
- KakaoCredentialManager,
16
- } from 'agent-messenger/kakaotalk'
13
+ import { KakaoTalkClient, KakaoCredentialManager } from 'agent-messenger/kakaotalk'
17
14
  ```
18
15
 
19
16
  ## KakaoTalkClient
@@ -119,16 +116,16 @@ await listener.start()
119
116
 
120
117
  ### Events
121
118
 
122
- | Event | Payload | Description |
123
- |-------|---------|-------------|
124
- | `message` | `KakaoTalkPushMessageEvent` | New message received |
125
- | `member_joined` | `KakaoTalkPushMemberEvent` | Member joined a chat |
126
- | `member_left` | `KakaoTalkPushMemberEvent` | Member left a chat |
127
- | `read` | `KakaoTalkPushReadEvent` | Read receipt (unread count decreased) |
128
- | `kakaotalk_event` | `KakaoTalkPushGenericEvent` | Catch-all for all push events |
129
- | `connected` | `{ userId: string }` | Connected to LOCO server |
130
- | `disconnected` | — | Disconnected (will auto-reconnect) |
131
- | `error` | `Error` | Connection or protocol error |
119
+ | Event | Payload | Description |
120
+ | ----------------- | --------------------------- | ------------------------------------- |
121
+ | `message` | `KakaoTalkPushMessageEvent` | New message received |
122
+ | `member_joined` | `KakaoTalkPushMemberEvent` | Member joined a chat |
123
+ | `member_left` | `KakaoTalkPushMemberEvent` | Member left a chat |
124
+ | `read` | `KakaoTalkPushReadEvent` | Read receipt (unread count decreased) |
125
+ | `kakaotalk_event` | `KakaoTalkPushGenericEvent` | Catch-all for all push events |
126
+ | `connected` | `{ userId: string }` | Connected to LOCO server |
127
+ | `disconnected` | — | Disconnected (will auto-reconnect) |
128
+ | `error` | `Error` | Connection or protocol error |
132
129
 
133
130
  ### Reconnection
134
131
 
@@ -211,11 +208,15 @@ const manager = new KakaoCredentialManager()
211
208
  const account = await manager.getAccount()
212
209
  if (!account) throw new Error('Not authenticated')
213
210
 
214
- const client = await new KakaoTalkClient().login({ oauthToken: account.oauth_token, userId: account.user_id, deviceUuid: account.device_uuid })
211
+ const client = await new KakaoTalkClient().login({
212
+ oauthToken: account.oauth_token,
213
+ userId: account.user_id,
214
+ deviceUuid: account.device_uuid,
215
+ })
215
216
 
216
217
  try {
217
218
  const chats = await client.getChats({ all: true })
218
- const unread = chats.filter(c => c.unread_count > 0)
219
+ const unread = chats.filter((c) => c.unread_count > 0)
219
220
  console.log(`${unread.length} chats with unread messages:`)
220
221
  for (const chat of unread) {
221
222
  console.log(` ${chat.display_name} — ${chat.unread_count} unread`)
@@ -236,7 +237,11 @@ const manager = new KakaoCredentialManager()
236
237
  const account = await manager.getAccount()
237
238
  if (!account) throw new Error('Not authenticated')
238
239
 
239
- const client = await new KakaoTalkClient().login({ oauthToken: account.oauth_token, userId: account.user_id, deviceUuid: account.device_uuid })
240
+ const client = await new KakaoTalkClient().login({
241
+ oauthToken: account.oauth_token,
242
+ userId: account.user_id,
243
+ deviceUuid: account.device_uuid,
244
+ })
240
245
 
241
246
  try {
242
247
  const chats = await client.getChats({ search: 'Team' })
@@ -262,7 +267,11 @@ const manager = new KakaoCredentialManager()
262
267
  const account = await manager.getAccount()
263
268
  if (!account) throw new Error('Not authenticated')
264
269
 
265
- const client = await new KakaoTalkClient().login({ oauthToken: account.oauth_token, userId: account.user_id, deviceUuid: account.device_uuid })
270
+ const client = await new KakaoTalkClient().login({
271
+ oauthToken: account.oauth_token,
272
+ userId: account.user_id,
273
+ deviceUuid: account.device_uuid,
274
+ })
266
275
  const chatId = '9876543210'
267
276
 
268
277
  let lastLogId: string | undefined
@@ -10,12 +10,7 @@ npm install agent-messenger
10
10
  ```
11
11
 
12
12
  ```typescript
13
- import {
14
- LineClient,
15
- LineListener,
16
- LineError,
17
- LineCredentialManager,
18
- } from 'agent-messenger/line'
13
+ import { LineClient, LineListener, LineError, LineCredentialManager } from 'agent-messenger/line'
19
14
  ```
20
15
 
21
16
  ## LineClient
@@ -164,13 +159,13 @@ await listener.start()
164
159
 
165
160
  ### Events
166
161
 
167
- | Event | Payload | Description |
168
- |-------|---------|-------------|
169
- | `message` | `LinePushMessageEvent` | New message received |
170
- | `line_event` | `LinePushGenericEvent` | Catch-all for all LINE events |
171
- | `connected` | `{ account_id: string }` | Connected to LINE server |
172
- | `disconnected` | — | Disconnected (will auto-reconnect) |
173
- | `error` | `Error` | Connection or protocol error |
162
+ | Event | Payload | Description |
163
+ | -------------- | ------------------------ | ---------------------------------- |
164
+ | `message` | `LinePushMessageEvent` | New message received |
165
+ | `line_event` | `LinePushGenericEvent` | Catch-all for all LINE events |
166
+ | `connected` | `{ account_id: string }` | Connected to LINE server |
167
+ | `disconnected` | — | Disconnected (will auto-reconnect) |
168
+ | `error` | `Error` | Connection or protocol error |
174
169
 
175
170
  ### Reconnection
176
171
 
@@ -1,4 +1,17 @@
1
1
  {
2
2
  "title": "TypeScript SDK",
3
- "pages": ["slack", "discord", "teams", "webex", "whatsapp", "whatsappbot", "line", "wechatbot", "instagram", "kakaotalk", "channeltalk", "channeltalkbot"]
3
+ "pages": [
4
+ "slack",
5
+ "discord",
6
+ "teams",
7
+ "webex",
8
+ "whatsapp",
9
+ "whatsappbot",
10
+ "line",
11
+ "wechatbot",
12
+ "instagram",
13
+ "kakaotalk",
14
+ "channeltalk",
15
+ "channeltalkbot"
16
+ ]
4
17
  }