agent-messenger 2.7.0 → 2.9.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 (553) 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 -12
  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 +4 -2
  15. package/dist/src/platforms/channeltalk/commands/snapshot.d.ts.map +1 -1
  16. package/dist/src/platforms/channeltalk/commands/snapshot.js +86 -31
  17. package/dist/src/platforms/channeltalk/commands/snapshot.js.map +1 -1
  18. package/dist/src/platforms/channeltalk/ensure-auth.d.ts.map +1 -1
  19. package/dist/src/platforms/channeltalk/ensure-auth.js.map +1 -1
  20. package/dist/src/platforms/channeltalk/token-extractor.d.ts +9 -23
  21. package/dist/src/platforms/channeltalk/token-extractor.d.ts.map +1 -1
  22. package/dist/src/platforms/channeltalk/token-extractor.js +109 -341
  23. package/dist/src/platforms/channeltalk/token-extractor.js.map +1 -1
  24. package/dist/src/platforms/channeltalkbot/client.d.ts +1 -1
  25. package/dist/src/platforms/channeltalkbot/client.d.ts.map +1 -1
  26. package/dist/src/platforms/channeltalkbot/client.js +4 -4
  27. package/dist/src/platforms/channeltalkbot/client.js.map +1 -1
  28. package/dist/src/platforms/channeltalkbot/commands/auth.d.ts.map +1 -1
  29. package/dist/src/platforms/channeltalkbot/commands/auth.js +4 -1
  30. package/dist/src/platforms/channeltalkbot/commands/auth.js.map +1 -1
  31. package/dist/src/platforms/channeltalkbot/commands/shared.d.ts.map +1 -1
  32. package/dist/src/platforms/channeltalkbot/commands/shared.js.map +1 -1
  33. package/dist/src/platforms/channeltalkbot/commands/snapshot.d.ts +3 -1
  34. package/dist/src/platforms/channeltalkbot/commands/snapshot.d.ts.map +1 -1
  35. package/dist/src/platforms/channeltalkbot/commands/snapshot.js +110 -60
  36. package/dist/src/platforms/channeltalkbot/commands/snapshot.js.map +1 -1
  37. package/dist/src/platforms/discord/commands/auth.js.map +1 -1
  38. package/dist/src/platforms/discord/commands/snapshot.d.ts +1 -0
  39. package/dist/src/platforms/discord/commands/snapshot.d.ts.map +1 -1
  40. package/dist/src/platforms/discord/commands/snapshot.js +48 -34
  41. package/dist/src/platforms/discord/commands/snapshot.js.map +1 -1
  42. package/dist/src/platforms/discord/commands/whoami.d.ts.map +1 -1
  43. package/dist/src/platforms/discord/commands/whoami.js.map +1 -1
  44. package/dist/src/platforms/discord/token-extractor.d.ts +2 -10
  45. package/dist/src/platforms/discord/token-extractor.d.ts.map +1 -1
  46. package/dist/src/platforms/discord/token-extractor.js +38 -172
  47. package/dist/src/platforms/discord/token-extractor.js.map +1 -1
  48. package/dist/src/platforms/discordbot/client.d.ts.map +1 -1
  49. package/dist/src/platforms/discordbot/client.js.map +1 -1
  50. package/dist/src/platforms/discordbot/commands/snapshot.d.ts +2 -0
  51. package/dist/src/platforms/discordbot/commands/snapshot.d.ts.map +1 -1
  52. package/dist/src/platforms/discordbot/commands/snapshot.js +46 -34
  53. package/dist/src/platforms/discordbot/commands/snapshot.js.map +1 -1
  54. package/dist/src/platforms/instagram/cli.d.ts.map +1 -1
  55. package/dist/src/platforms/instagram/cli.js +1 -4
  56. package/dist/src/platforms/instagram/cli.js.map +1 -1
  57. package/dist/src/platforms/instagram/client.d.ts.map +1 -1
  58. package/dist/src/platforms/instagram/client.js +8 -7
  59. package/dist/src/platforms/instagram/client.js.map +1 -1
  60. package/dist/src/platforms/instagram/commands/auth.d.ts.map +1 -1
  61. package/dist/src/platforms/instagram/commands/auth.js.map +1 -1
  62. package/dist/src/platforms/instagram/commands/chat.d.ts.map +1 -1
  63. package/dist/src/platforms/instagram/commands/chat.js.map +1 -1
  64. package/dist/src/platforms/instagram/commands/message.d.ts.map +1 -1
  65. package/dist/src/platforms/instagram/commands/message.js.map +1 -1
  66. package/dist/src/platforms/instagram/commands/shared.d.ts.map +1 -1
  67. package/dist/src/platforms/instagram/commands/shared.js.map +1 -1
  68. package/dist/src/platforms/instagram/credential-manager.d.ts.map +1 -1
  69. package/dist/src/platforms/instagram/credential-manager.js +1 -1
  70. package/dist/src/platforms/instagram/credential-manager.js.map +1 -1
  71. package/dist/src/platforms/instagram/ensure-auth.d.ts.map +1 -1
  72. package/dist/src/platforms/instagram/ensure-auth.js.map +1 -1
  73. package/dist/src/platforms/instagram/token-extractor.d.ts +7 -19
  74. package/dist/src/platforms/instagram/token-extractor.d.ts.map +1 -1
  75. package/dist/src/platforms/instagram/token-extractor.js +44 -270
  76. package/dist/src/platforms/instagram/token-extractor.js.map +1 -1
  77. package/dist/src/platforms/instagram/types.d.ts.map +1 -1
  78. package/dist/src/platforms/instagram/types.js +4 -2
  79. package/dist/src/platforms/instagram/types.js.map +1 -1
  80. package/dist/src/platforms/kakaotalk/auth/kakao-login.d.ts.map +1 -1
  81. package/dist/src/platforms/kakaotalk/auth/kakao-login.js +18 -4
  82. package/dist/src/platforms/kakaotalk/auth/kakao-login.js.map +1 -1
  83. package/dist/src/platforms/kakaotalk/client.d.ts.map +1 -1
  84. package/dist/src/platforms/kakaotalk/client.js +3 -3
  85. package/dist/src/platforms/kakaotalk/client.js.map +1 -1
  86. package/dist/src/platforms/kakaotalk/commands/auth.d.ts.map +1 -1
  87. package/dist/src/platforms/kakaotalk/commands/auth.js +15 -9
  88. package/dist/src/platforms/kakaotalk/commands/auth.js.map +1 -1
  89. package/dist/src/platforms/kakaotalk/commands/shared.d.ts.map +1 -1
  90. package/dist/src/platforms/kakaotalk/commands/shared.js.map +1 -1
  91. package/dist/src/platforms/kakaotalk/protocol/connection.d.ts.map +1 -1
  92. package/dist/src/platforms/kakaotalk/protocol/connection.js.map +1 -1
  93. package/dist/src/platforms/kakaotalk/protocol/crypto.js +1 -1
  94. package/dist/src/platforms/kakaotalk/protocol/crypto.js.map +1 -1
  95. package/dist/src/platforms/kakaotalk/protocol/session.d.ts.map +1 -1
  96. package/dist/src/platforms/kakaotalk/protocol/session.js +1 -3
  97. package/dist/src/platforms/kakaotalk/protocol/session.js.map +1 -1
  98. package/dist/src/platforms/kakaotalk/token-extractor.js +5 -2
  99. package/dist/src/platforms/kakaotalk/token-extractor.js.map +1 -1
  100. package/dist/src/platforms/kakaotalk/types.d.ts.map +1 -1
  101. package/dist/src/platforms/kakaotalk/types.js +4 -2
  102. package/dist/src/platforms/kakaotalk/types.js.map +1 -1
  103. package/dist/src/platforms/line/cli.d.ts.map +1 -1
  104. package/dist/src/platforms/line/cli.js +1 -4
  105. package/dist/src/platforms/line/cli.js.map +1 -1
  106. package/dist/src/platforms/line/client.d.ts.map +1 -1
  107. package/dist/src/platforms/line/client.js +5 -13
  108. package/dist/src/platforms/line/client.js.map +1 -1
  109. package/dist/src/platforms/line/commands/chat.d.ts.map +1 -1
  110. package/dist/src/platforms/line/commands/chat.js.map +1 -1
  111. package/dist/src/platforms/line/commands/message.d.ts.map +1 -1
  112. package/dist/src/platforms/line/commands/message.js.map +1 -1
  113. package/dist/src/platforms/line/listener.js +1 -1
  114. package/dist/src/platforms/line/listener.js.map +1 -1
  115. package/dist/src/platforms/slack/cli.d.ts.map +1 -1
  116. package/dist/src/platforms/slack/cli.js.map +1 -1
  117. package/dist/src/platforms/slack/client-mappers.d.ts +14 -0
  118. package/dist/src/platforms/slack/client-mappers.d.ts.map +1 -0
  119. package/dist/src/platforms/slack/client-mappers.js +245 -0
  120. package/dist/src/platforms/slack/client-mappers.js.map +1 -0
  121. package/dist/src/platforms/slack/client.d.ts +0 -1
  122. package/dist/src/platforms/slack/client.d.ts.map +1 -1
  123. package/dist/src/platforms/slack/client.js +41 -455
  124. package/dist/src/platforms/slack/client.js.map +1 -1
  125. package/dist/src/platforms/slack/commands/channel.d.ts.map +1 -1
  126. package/dist/src/platforms/slack/commands/channel.js.map +1 -1
  127. package/dist/src/platforms/slack/commands/emoji.d.ts.map +1 -1
  128. package/dist/src/platforms/slack/commands/emoji.js +1 -3
  129. package/dist/src/platforms/slack/commands/emoji.js.map +1 -1
  130. package/dist/src/platforms/slack/commands/message.d.ts.map +1 -1
  131. package/dist/src/platforms/slack/commands/message.js.map +1 -1
  132. package/dist/src/platforms/slack/commands/reminder.d.ts.map +1 -1
  133. package/dist/src/platforms/slack/commands/reminder.js.map +1 -1
  134. package/dist/src/platforms/slack/commands/snapshot.d.ts.map +1 -1
  135. package/dist/src/platforms/slack/commands/snapshot.js +75 -55
  136. package/dist/src/platforms/slack/commands/snapshot.js.map +1 -1
  137. package/dist/src/platforms/slack/commands/user.d.ts.map +1 -1
  138. package/dist/src/platforms/slack/commands/user.js.map +1 -1
  139. package/dist/src/platforms/slack/commands/usergroup.d.ts.map +1 -1
  140. package/dist/src/platforms/slack/commands/usergroup.js.map +1 -1
  141. package/dist/src/platforms/slack/commands/whoami.d.ts.map +1 -1
  142. package/dist/src/platforms/slack/commands/whoami.js.map +1 -1
  143. package/dist/src/platforms/slack/token-extractor.d.ts +2 -6
  144. package/dist/src/platforms/slack/token-extractor.d.ts.map +1 -1
  145. package/dist/src/platforms/slack/token-extractor.js +35 -229
  146. package/dist/src/platforms/slack/token-extractor.js.map +1 -1
  147. package/dist/src/platforms/slackbot/cli.d.ts.map +1 -1
  148. package/dist/src/platforms/slackbot/cli.js +1 -1
  149. package/dist/src/platforms/slackbot/cli.js.map +1 -1
  150. package/dist/src/platforms/teams/client.d.ts.map +1 -1
  151. package/dist/src/platforms/teams/client.js +1 -1
  152. package/dist/src/platforms/teams/client.js.map +1 -1
  153. package/dist/src/platforms/teams/commands/auth.d.ts.map +1 -1
  154. package/dist/src/platforms/teams/commands/auth.js +4 -1
  155. package/dist/src/platforms/teams/commands/auth.js.map +1 -1
  156. package/dist/src/platforms/teams/commands/snapshot.d.ts +1 -0
  157. package/dist/src/platforms/teams/commands/snapshot.d.ts.map +1 -1
  158. package/dist/src/platforms/teams/commands/snapshot.js +44 -31
  159. package/dist/src/platforms/teams/commands/snapshot.js.map +1 -1
  160. package/dist/src/platforms/teams/commands/whoami.d.ts.map +1 -1
  161. package/dist/src/platforms/teams/commands/whoami.js.map +1 -1
  162. package/dist/src/platforms/teams/token-extractor.d.ts +6 -18
  163. package/dist/src/platforms/teams/token-extractor.d.ts.map +1 -1
  164. package/dist/src/platforms/teams/token-extractor.js +71 -324
  165. package/dist/src/platforms/teams/token-extractor.js.map +1 -1
  166. package/dist/src/platforms/telegram/cli.d.ts.map +1 -1
  167. package/dist/src/platforms/telegram/cli.js +1 -4
  168. package/dist/src/platforms/telegram/cli.js.map +1 -1
  169. package/dist/src/platforms/telegram/client.d.ts.map +1 -1
  170. package/dist/src/platforms/telegram/client.js.map +1 -1
  171. package/dist/src/platforms/telegram/commands/auth.d.ts.map +1 -1
  172. package/dist/src/platforms/telegram/commands/auth.js +1 -1
  173. package/dist/src/platforms/telegram/commands/auth.js.map +1 -1
  174. package/dist/src/platforms/telegram/commands/chat.d.ts.map +1 -1
  175. package/dist/src/platforms/telegram/commands/chat.js.map +1 -1
  176. package/dist/src/platforms/telegram/commands/message.d.ts.map +1 -1
  177. package/dist/src/platforms/telegram/commands/message.js.map +1 -1
  178. package/dist/src/platforms/telegram/commands/whoami.js +1 -1
  179. package/dist/src/platforms/telegram/commands/whoami.js.map +1 -1
  180. package/dist/src/platforms/telegram/credential-manager.d.ts.map +1 -1
  181. package/dist/src/platforms/telegram/credential-manager.js +6 -2
  182. package/dist/src/platforms/telegram/credential-manager.js.map +1 -1
  183. package/dist/src/platforms/telegram/my-telegram-org.js.map +1 -1
  184. package/dist/src/platforms/webex/cli.d.ts.map +1 -1
  185. package/dist/src/platforms/webex/cli.js +1 -4
  186. package/dist/src/platforms/webex/cli.js.map +1 -1
  187. package/dist/src/platforms/webex/client.d.ts.map +1 -1
  188. package/dist/src/platforms/webex/client.js +3 -7
  189. package/dist/src/platforms/webex/client.js.map +1 -1
  190. package/dist/src/platforms/webex/commands/auth.d.ts.map +1 -1
  191. package/dist/src/platforms/webex/commands/auth.js +1 -3
  192. package/dist/src/platforms/webex/commands/auth.js.map +1 -1
  193. package/dist/src/platforms/webex/commands/member.d.ts.map +1 -1
  194. package/dist/src/platforms/webex/commands/member.js +1 -3
  195. package/dist/src/platforms/webex/commands/member.js.map +1 -1
  196. package/dist/src/platforms/webex/commands/message.d.ts.map +1 -1
  197. package/dist/src/platforms/webex/commands/message.js.map +1 -1
  198. package/dist/src/platforms/webex/commands/snapshot.d.ts +1 -0
  199. package/dist/src/platforms/webex/commands/snapshot.d.ts.map +1 -1
  200. package/dist/src/platforms/webex/commands/snapshot.js +14 -7
  201. package/dist/src/platforms/webex/commands/snapshot.js.map +1 -1
  202. package/dist/src/platforms/webex/commands/space.d.ts.map +1 -1
  203. package/dist/src/platforms/webex/commands/space.js.map +1 -1
  204. package/dist/src/platforms/webex/commands/whoami.d.ts.map +1 -1
  205. package/dist/src/platforms/webex/commands/whoami.js.map +1 -1
  206. package/dist/src/platforms/webex/credential-manager.d.ts.map +1 -1
  207. package/dist/src/platforms/webex/credential-manager.js.map +1 -1
  208. package/dist/src/platforms/webex/ensure-auth.d.ts.map +1 -1
  209. package/dist/src/platforms/webex/ensure-auth.js +1 -3
  210. package/dist/src/platforms/webex/ensure-auth.js.map +1 -1
  211. package/dist/src/platforms/webex/index.d.ts +1 -1
  212. package/dist/src/platforms/webex/index.d.ts.map +1 -1
  213. package/dist/src/platforms/webex/index.js.map +1 -1
  214. package/dist/src/platforms/webex/markdown-to-html.js.map +1 -1
  215. package/dist/src/platforms/webex/token-extractor.d.ts.map +1 -1
  216. package/dist/src/platforms/webex/token-extractor.js +5 -14
  217. package/dist/src/platforms/webex/token-extractor.js.map +1 -1
  218. package/dist/src/platforms/wechatbot/client.d.ts.map +1 -1
  219. package/dist/src/platforms/wechatbot/client.js.map +1 -1
  220. package/dist/src/platforms/wechatbot/commands/message.d.ts.map +1 -1
  221. package/dist/src/platforms/wechatbot/commands/message.js.map +1 -1
  222. package/dist/src/platforms/whatsapp/cli.d.ts.map +1 -1
  223. package/dist/src/platforms/whatsapp/cli.js +1 -4
  224. package/dist/src/platforms/whatsapp/cli.js.map +1 -1
  225. package/dist/src/platforms/whatsapp/commands/chat.d.ts.map +1 -1
  226. package/dist/src/platforms/whatsapp/commands/chat.js.map +1 -1
  227. package/dist/src/platforms/whatsapp/commands/message.d.ts.map +1 -1
  228. package/dist/src/platforms/whatsapp/commands/message.js.map +1 -1
  229. package/dist/src/platforms/whatsapp/commands/shared.d.ts.map +1 -1
  230. package/dist/src/platforms/whatsapp/commands/shared.js.map +1 -1
  231. package/dist/src/platforms/whatsapp/credential-manager.d.ts.map +1 -1
  232. package/dist/src/platforms/whatsapp/credential-manager.js +1 -1
  233. package/dist/src/platforms/whatsapp/credential-manager.js.map +1 -1
  234. package/dist/src/platforms/whatsapp/ensure-auth.d.ts.map +1 -1
  235. package/dist/src/platforms/whatsapp/ensure-auth.js.map +1 -1
  236. package/dist/src/platforms/whatsappbot/client.d.ts.map +1 -1
  237. package/dist/src/platforms/whatsappbot/client.js +2 -2
  238. package/dist/src/platforms/whatsappbot/client.js.map +1 -1
  239. package/dist/src/platforms/whatsappbot/commands/auth.d.ts.map +1 -1
  240. package/dist/src/platforms/whatsappbot/commands/auth.js +4 -1
  241. package/dist/src/platforms/whatsappbot/commands/auth.js.map +1 -1
  242. package/dist/src/platforms/whatsappbot/commands/message.d.ts.map +1 -1
  243. package/dist/src/platforms/whatsappbot/commands/message.js.map +1 -1
  244. package/dist/src/platforms/whatsappbot/commands/shared.d.ts.map +1 -1
  245. package/dist/src/platforms/whatsappbot/commands/shared.js.map +1 -1
  246. package/dist/src/shared/chromium/browsers.d.ts +7 -0
  247. package/dist/src/shared/chromium/browsers.d.ts.map +1 -0
  248. package/dist/src/shared/chromium/browsers.js +89 -0
  249. package/dist/src/shared/chromium/browsers.js.map +1 -0
  250. package/dist/src/shared/chromium/cookie-reader.d.ts +20 -0
  251. package/dist/src/shared/chromium/cookie-reader.d.ts.map +1 -0
  252. package/dist/src/shared/chromium/cookie-reader.js +99 -0
  253. package/dist/src/shared/chromium/cookie-reader.js.map +1 -0
  254. package/dist/src/shared/chromium/decryptor.d.ts +42 -0
  255. package/dist/src/shared/chromium/decryptor.d.ts.map +1 -0
  256. package/dist/src/shared/chromium/decryptor.js +205 -0
  257. package/dist/src/shared/chromium/decryptor.js.map +1 -0
  258. package/dist/src/shared/chromium/index.d.ts +6 -0
  259. package/dist/src/shared/chromium/index.d.ts.map +1 -0
  260. package/dist/src/shared/chromium/index.js +4 -0
  261. package/dist/src/shared/chromium/index.js.map +1 -0
  262. package/dist/src/shared/chromium/types.d.ts +11 -0
  263. package/dist/src/shared/chromium/types.d.ts.map +1 -0
  264. package/dist/src/shared/chromium/types.js +2 -0
  265. package/dist/src/shared/chromium/types.js.map +1 -0
  266. package/dist/src/shared/utils/derived-key-cache.d.ts +1 -1
  267. package/dist/src/shared/utils/derived-key-cache.d.ts.map +1 -1
  268. package/dist/src/shared/utils/linux-keyring.js +4 -1
  269. package/dist/src/shared/utils/linux-keyring.js.map +1 -1
  270. package/dist/src/tui/adapters/kakaotalk-adapter.d.ts.map +1 -1
  271. package/dist/src/tui/adapters/kakaotalk-adapter.js +6 -1
  272. package/dist/src/tui/adapters/kakaotalk-adapter.js.map +1 -1
  273. package/dist/src/tui/adapters/telegram-adapter.js +1 -1
  274. package/dist/src/tui/adapters/telegram-adapter.js.map +1 -1
  275. package/dist/src/tui/adapters/webex-adapter.js +1 -1
  276. package/dist/src/tui/adapters/webex-adapter.js.map +1 -1
  277. package/dist/src/tui/app.d.ts.map +1 -1
  278. package/dist/src/tui/app.js +112 -23
  279. package/dist/src/tui/app.js.map +1 -1
  280. package/dist/src/tui/utils.d.ts.map +1 -1
  281. package/dist/src/tui/utils.js +11 -13
  282. package/dist/src/tui/utils.js.map +1 -1
  283. package/dist/src/tui/views/channel-picker.d.ts.map +1 -1
  284. package/dist/src/tui/views/channel-picker.js.map +1 -1
  285. package/dist/src/tui/views/workspace-picker.d.ts.map +1 -1
  286. package/dist/src/tui/views/workspace-picker.js.map +1 -1
  287. package/docs/content/docs/agent-skills.mdx +0 -10
  288. package/docs/content/docs/cli/channeltalk.mdx +42 -30
  289. package/docs/content/docs/cli/channeltalkbot.mdx +23 -13
  290. package/docs/content/docs/cli/discord.mdx +23 -7
  291. package/docs/content/docs/cli/discordbot.mdx +23 -7
  292. package/docs/content/docs/cli/instagram.mdx +4 -4
  293. package/docs/content/docs/cli/kakaotalk.mdx +9 -8
  294. package/docs/content/docs/cli/line.mdx +14 -14
  295. package/docs/content/docs/cli/slack.mdx +24 -7
  296. package/docs/content/docs/cli/teams.mdx +24 -8
  297. package/docs/content/docs/cli/webex.mdx +34 -21
  298. package/docs/content/docs/cli/wechatbot.mdx +12 -11
  299. package/docs/content/docs/cli/whatsapp.mdx +5 -4
  300. package/docs/content/docs/cli/whatsappbot.mdx +11 -11
  301. package/docs/content/docs/index.mdx +7 -7
  302. package/docs/content/docs/meta.json +1 -9
  303. package/docs/content/docs/sdk/channeltalk.mdx +5 -6
  304. package/docs/content/docs/sdk/channeltalkbot.mdx +6 -12
  305. package/docs/content/docs/sdk/discord.mdx +36 -43
  306. package/docs/content/docs/sdk/instagram.mdx +18 -18
  307. package/docs/content/docs/sdk/kakaotalk.mdx +27 -18
  308. package/docs/content/docs/sdk/line.mdx +8 -13
  309. package/docs/content/docs/sdk/meta.json +14 -1
  310. package/docs/content/docs/sdk/slack.mdx +36 -42
  311. package/docs/content/docs/sdk/teams.mdx +2 -8
  312. package/docs/content/docs/sdk/webex.mdx +2 -12
  313. package/docs/content/docs/sdk/wechatbot.mdx +1 -5
  314. package/docs/content/docs/sdk/whatsapp.mdx +10 -19
  315. package/docs/content/docs/sdk/whatsappbot.mdx +2 -10
  316. package/docs/content/docs/tui.mdx +23 -23
  317. package/docs/src/app/page.tsx +353 -108
  318. package/e2e/channeltalkbot.e2e.test.ts +1 -5
  319. package/e2e/config.ts +6 -2
  320. package/package.json +59 -58
  321. package/scripts/prepublish.ts +1 -3
  322. package/skills/agent-channeltalk/SKILL.md +19 -9
  323. package/skills/agent-channeltalk/references/common-patterns.md +10 -9
  324. package/skills/agent-channeltalkbot/SKILL.md +19 -9
  325. package/skills/agent-channeltalkbot/references/common-patterns.md +10 -9
  326. package/skills/agent-discord/SKILL.md +18 -9
  327. package/skills/agent-discord/references/common-patterns.md +8 -7
  328. package/skills/agent-discordbot/SKILL.md +18 -9
  329. package/skills/agent-instagram/SKILL.md +1 -1
  330. package/skills/agent-kakaotalk/SKILL.md +1 -1
  331. package/skills/agent-line/SKILL.md +1 -1
  332. package/skills/agent-slack/SKILL.md +19 -10
  333. package/skills/agent-slack/references/common-patterns.md +4 -7
  334. package/skills/agent-slackbot/SKILL.md +1 -1
  335. package/skills/agent-teams/SKILL.md +18 -9
  336. package/skills/agent-teams/references/common-patterns.md +9 -7
  337. package/skills/agent-telegram/SKILL.md +1 -1
  338. package/skills/agent-webex/SKILL.md +13 -4
  339. package/skills/agent-webex/references/common-patterns.md +8 -2
  340. package/skills/agent-wechatbot/SKILL.md +1 -1
  341. package/skills/agent-whatsapp/SKILL.md +1 -1
  342. package/skills/agent-whatsappbot/SKILL.md +1 -1
  343. package/src/platforms/channeltalk/client.test.ts +116 -29
  344. package/src/platforms/channeltalk/client.ts +26 -6
  345. package/src/platforms/channeltalk/commands/auth.test.ts +5 -5
  346. package/src/platforms/channeltalk/commands/auth.ts +19 -5
  347. package/src/platforms/channeltalk/commands/message.test.ts +2 -6
  348. package/src/platforms/channeltalk/commands/message.ts +5 -1
  349. package/src/platforms/channeltalk/commands/snapshot.test.ts +77 -30
  350. package/src/platforms/channeltalk/commands/snapshot.ts +112 -34
  351. package/src/platforms/channeltalk/ensure-auth.test.ts +20 -17
  352. package/src/platforms/channeltalk/ensure-auth.ts +6 -7
  353. package/src/platforms/channeltalk/index.ts +0 -1
  354. package/src/platforms/channeltalk/token-extractor.test.ts +33 -25
  355. package/src/platforms/channeltalk/token-extractor.ts +120 -372
  356. package/src/platforms/channeltalkbot/client.test.ts +1 -3
  357. package/src/platforms/channeltalkbot/client.ts +39 -13
  358. package/src/platforms/channeltalkbot/commands/auth.test.ts +3 -1
  359. package/src/platforms/channeltalkbot/commands/auth.ts +4 -1
  360. package/src/platforms/channeltalkbot/commands/bot.test.ts +13 -5
  361. package/src/platforms/channeltalkbot/commands/message.test.ts +12 -6
  362. package/src/platforms/channeltalkbot/commands/shared.ts +6 -2
  363. package/src/platforms/channeltalkbot/commands/snapshot.test.ts +43 -13
  364. package/src/platforms/channeltalkbot/commands/snapshot.ts +131 -64
  365. package/src/platforms/channeltalkbot/credential-manager.test.ts +1 -1
  366. package/src/platforms/channeltalkbot/index.test.ts +0 -2
  367. package/src/platforms/channeltalkbot/index.ts +0 -1
  368. package/src/platforms/discord/commands/auth.test.ts +6 -4
  369. package/src/platforms/discord/commands/auth.ts +14 -14
  370. package/src/platforms/discord/commands/snapshot.test.ts +1 -1
  371. package/src/platforms/discord/commands/snapshot.ts +58 -42
  372. package/src/platforms/discord/commands/whoami.test.ts +2 -4
  373. package/src/platforms/discord/commands/whoami.ts +2 -0
  374. package/src/platforms/discord/ensure-auth.test.ts +5 -3
  375. package/src/platforms/discord/index.ts +0 -1
  376. package/src/platforms/discord/listener.test.ts +7 -1
  377. package/src/platforms/discord/token-extractor.test.ts +18 -12
  378. package/src/platforms/discord/token-extractor.ts +46 -190
  379. package/src/platforms/discordbot/client.ts +1 -4
  380. package/src/platforms/discordbot/commands/auth.test.ts +3 -1
  381. package/src/platforms/discordbot/commands/channel.test.ts +3 -1
  382. package/src/platforms/discordbot/commands/message.test.ts +3 -1
  383. package/src/platforms/discordbot/commands/server.test.ts +3 -1
  384. package/src/platforms/discordbot/commands/snapshot.test.ts +43 -19
  385. package/src/platforms/discordbot/commands/snapshot.ts +54 -37
  386. package/src/platforms/discordbot/commands/thread.test.ts +3 -1
  387. package/src/platforms/discordbot/commands/user.test.ts +3 -1
  388. package/src/platforms/instagram/cli.ts +1 -4
  389. package/src/platforms/instagram/client.test.ts +3 -8
  390. package/src/platforms/instagram/client.ts +39 -34
  391. package/src/platforms/instagram/commands/auth.test.ts +13 -12
  392. package/src/platforms/instagram/commands/auth.ts +136 -71
  393. package/src/platforms/instagram/commands/chat.test.ts +21 -24
  394. package/src/platforms/instagram/commands/chat.ts +2 -0
  395. package/src/platforms/instagram/commands/message.test.ts +29 -24
  396. package/src/platforms/instagram/commands/message.ts +3 -4
  397. package/src/platforms/instagram/commands/shared.ts +2 -5
  398. package/src/platforms/instagram/commands/whoami.test.ts +4 -6
  399. package/src/platforms/instagram/credential-manager.ts +2 -6
  400. package/src/platforms/instagram/ensure-auth.test.ts +1 -4
  401. package/src/platforms/instagram/ensure-auth.ts +6 -3
  402. package/src/platforms/instagram/listener.test.ts +7 -3
  403. package/src/platforms/instagram/token-extractor.test.ts +4 -16
  404. package/src/platforms/instagram/token-extractor.ts +55 -309
  405. package/src/platforms/instagram/types.test.ts +2 -6
  406. package/src/platforms/instagram/types.ts +4 -2
  407. package/src/platforms/kakaotalk/auth/kakao-login.ts +30 -8
  408. package/src/platforms/kakaotalk/client.test.ts +37 -25
  409. package/src/platforms/kakaotalk/client.ts +23 -12
  410. package/src/platforms/kakaotalk/commands/auth.test.ts +6 -18
  411. package/src/platforms/kakaotalk/commands/auth.ts +101 -47
  412. package/src/platforms/kakaotalk/commands/chat.test.ts +8 -11
  413. package/src/platforms/kakaotalk/commands/message.test.ts +15 -24
  414. package/src/platforms/kakaotalk/commands/shared.ts +1 -0
  415. package/src/platforms/kakaotalk/commands/whoami.test.ts +6 -10
  416. package/src/platforms/kakaotalk/credential-manager.test.ts +1 -4
  417. package/src/platforms/kakaotalk/index.test.ts +1 -0
  418. package/src/platforms/kakaotalk/index.ts +0 -2
  419. package/src/platforms/kakaotalk/listener.test.ts +7 -1
  420. package/src/platforms/kakaotalk/protocol/connection.ts +4 -1
  421. package/src/platforms/kakaotalk/protocol/crypto.ts +1 -1
  422. package/src/platforms/kakaotalk/protocol/session.ts +12 -6
  423. package/src/platforms/kakaotalk/token-extractor.ts +5 -5
  424. package/src/platforms/kakaotalk/types.ts +8 -7
  425. package/src/platforms/line/cli.ts +1 -4
  426. package/src/platforms/line/client.ts +12 -20
  427. package/src/platforms/line/commands/auth.test.ts +2 -1
  428. package/src/platforms/line/commands/chat.test.ts +2 -1
  429. package/src/platforms/line/commands/chat.ts +1 -4
  430. package/src/platforms/line/commands/friend.test.ts +2 -1
  431. package/src/platforms/line/commands/message.test.ts +2 -1
  432. package/src/platforms/line/commands/message.ts +2 -9
  433. package/src/platforms/line/commands/whoami.test.ts +2 -1
  434. package/src/platforms/line/credential-manager.test.ts +1 -2
  435. package/src/platforms/line/index.test.ts +1 -0
  436. package/src/platforms/line/listener.ts +1 -1
  437. package/src/platforms/line/types.test.ts +1 -0
  438. package/src/platforms/slack/cli.ts +3 -1
  439. package/src/platforms/slack/client-mappers.ts +297 -0
  440. package/src/platforms/slack/client.test.ts +532 -17
  441. package/src/platforms/slack/client.ts +69 -458
  442. package/src/platforms/slack/commands/channel.ts +1 -4
  443. package/src/platforms/slack/commands/emoji.test.ts +6 -4
  444. package/src/platforms/slack/commands/emoji.ts +20 -22
  445. package/src/platforms/slack/commands/message.ts +6 -1
  446. package/src/platforms/slack/commands/pin.test.ts +14 -12
  447. package/src/platforms/slack/commands/reminder.ts +7 -6
  448. package/src/platforms/slack/commands/snapshot.test.ts +63 -8
  449. package/src/platforms/slack/commands/snapshot.ts +98 -66
  450. package/src/platforms/slack/commands/user.ts +6 -1
  451. package/src/platforms/slack/commands/usergroup.test.ts +3 -3
  452. package/src/platforms/slack/commands/usergroup.ts +10 -7
  453. package/src/platforms/slack/commands/whoami.test.ts +1 -1
  454. package/src/platforms/slack/commands/whoami.ts +2 -0
  455. package/src/platforms/slack/index.ts +0 -2
  456. package/src/platforms/slack/listener.test.ts +1 -0
  457. package/src/platforms/slack/token-extractor.test.ts +7 -12
  458. package/src/platforms/slack/token-extractor.ts +47 -255
  459. package/src/platforms/slackbot/cli.ts +8 -1
  460. package/src/platforms/slackbot/commands/auth.test.ts +3 -1
  461. package/src/platforms/teams/client.ts +1 -1
  462. package/src/platforms/teams/commands/auth.test.ts +1 -1
  463. package/src/platforms/teams/commands/auth.ts +4 -1
  464. package/src/platforms/teams/commands/snapshot.test.ts +1 -1
  465. package/src/platforms/teams/commands/snapshot.ts +53 -38
  466. package/src/platforms/teams/commands/whoami.test.ts +2 -4
  467. package/src/platforms/teams/commands/whoami.ts +2 -0
  468. package/src/platforms/teams/index.ts +0 -1
  469. package/src/platforms/teams/token-extractor.ts +82 -350
  470. package/src/platforms/telegram/app-config.test.ts +1 -0
  471. package/src/platforms/telegram/chat-utils.test.ts +5 -1
  472. package/src/platforms/telegram/cli.ts +2 -4
  473. package/src/platforms/telegram/client.test.ts +16 -3
  474. package/src/platforms/telegram/client.ts +14 -4
  475. package/src/platforms/telegram/commands/auth.test.ts +1 -0
  476. package/src/platforms/telegram/commands/auth.ts +3 -4
  477. package/src/platforms/telegram/commands/chat.test.ts +2 -5
  478. package/src/platforms/telegram/commands/chat.ts +1 -0
  479. package/src/platforms/telegram/commands/message.test.ts +2 -5
  480. package/src/platforms/telegram/commands/message.ts +1 -0
  481. package/src/platforms/telegram/commands/shared.test.ts +1 -0
  482. package/src/platforms/telegram/commands/whoami.test.ts +5 -7
  483. package/src/platforms/telegram/commands/whoami.ts +1 -1
  484. package/src/platforms/telegram/credential-manager.test.ts +1 -0
  485. package/src/platforms/telegram/credential-manager.ts +11 -2
  486. package/src/platforms/telegram/my-telegram-org.ts +6 -2
  487. package/src/platforms/telegram/types.test.ts +1 -0
  488. package/src/platforms/webex/app-config.test.ts +1 -0
  489. package/src/platforms/webex/cli.ts +1 -4
  490. package/src/platforms/webex/client.test.ts +4 -12
  491. package/src/platforms/webex/client.ts +14 -52
  492. package/src/platforms/webex/commands/auth.test.ts +7 -1
  493. package/src/platforms/webex/commands/auth.ts +12 -15
  494. package/src/platforms/webex/commands/member.test.ts +1 -3
  495. package/src/platforms/webex/commands/member.ts +14 -19
  496. package/src/platforms/webex/commands/message.ts +4 -15
  497. package/src/platforms/webex/commands/snapshot.test.ts +42 -4
  498. package/src/platforms/webex/commands/snapshot.ts +19 -11
  499. package/src/platforms/webex/commands/space.test.ts +3 -3
  500. package/src/platforms/webex/commands/space.ts +2 -9
  501. package/src/platforms/webex/commands/whoami.test.ts +12 -5
  502. package/src/platforms/webex/commands/whoami.ts +2 -0
  503. package/src/platforms/webex/credential-manager.ts +11 -2
  504. package/src/platforms/webex/ensure-auth.ts +1 -3
  505. package/src/platforms/webex/index.ts +1 -7
  506. package/src/platforms/webex/markdown-to-html.test.ts +6 -18
  507. package/src/platforms/webex/markdown-to-html.ts +8 -8
  508. package/src/platforms/webex/token-extractor.ts +6 -29
  509. package/src/platforms/wechatbot/client.test.ts +6 -2
  510. package/src/platforms/wechatbot/client.ts +6 -1
  511. package/src/platforms/wechatbot/commands/auth.test.ts +3 -7
  512. package/src/platforms/wechatbot/commands/message.test.ts +1 -4
  513. package/src/platforms/wechatbot/commands/message.ts +5 -1
  514. package/src/platforms/wechatbot/commands/template.test.ts +1 -4
  515. package/src/platforms/wechatbot/commands/user.test.ts +2 -7
  516. package/src/platforms/whatsapp/cli.ts +1 -4
  517. package/src/platforms/whatsapp/commands/auth.test.ts +19 -22
  518. package/src/platforms/whatsapp/commands/chat.test.ts +21 -24
  519. package/src/platforms/whatsapp/commands/chat.ts +2 -0
  520. package/src/platforms/whatsapp/commands/message.test.ts +22 -24
  521. package/src/platforms/whatsapp/commands/message.ts +3 -5
  522. package/src/platforms/whatsapp/commands/shared.ts +2 -5
  523. package/src/platforms/whatsapp/commands/whoami.test.ts +2 -2
  524. package/src/platforms/whatsapp/credential-manager.ts +2 -6
  525. package/src/platforms/whatsapp/ensure-auth.test.ts +1 -4
  526. package/src/platforms/whatsapp/ensure-auth.ts +14 -6
  527. package/src/platforms/whatsapp/index.ts +0 -2
  528. package/src/platforms/whatsappbot/client.test.ts +13 -7
  529. package/src/platforms/whatsappbot/client.ts +18 -4
  530. package/src/platforms/whatsappbot/commands/auth.ts +4 -1
  531. package/src/platforms/whatsappbot/commands/message.test.ts +12 -2
  532. package/src/platforms/whatsappbot/commands/message.ts +16 -3
  533. package/src/platforms/whatsappbot/commands/shared.ts +3 -1
  534. package/src/platforms/whatsappbot/commands/whoami.test.ts +1 -3
  535. package/src/platforms/whatsappbot/index.ts +0 -2
  536. package/src/shared/chromium/browsers.test.ts +274 -0
  537. package/src/shared/chromium/browsers.ts +86 -0
  538. package/src/shared/chromium/cookie-reader.test.ts +274 -0
  539. package/src/shared/chromium/cookie-reader.ts +111 -0
  540. package/src/shared/chromium/decryptor.test.ts +449 -0
  541. package/src/shared/chromium/decryptor.ts +227 -0
  542. package/src/shared/chromium/index.ts +11 -0
  543. package/src/shared/chromium/types.ts +11 -0
  544. package/src/shared/utils/derived-key-cache.ts +1 -1
  545. package/src/shared/utils/linux-keyring.ts +4 -4
  546. package/src/tui/adapters/kakaotalk-adapter.ts +6 -1
  547. package/src/tui/adapters/telegram-adapter.ts +1 -1
  548. package/src/tui/adapters/webex-adapter.ts +1 -1
  549. package/src/tui/app.ts +149 -59
  550. package/src/tui/utils.test.ts +144 -145
  551. package/src/tui/utils.ts +27 -29
  552. package/src/tui/views/channel-picker.ts +1 -1
  553. package/src/tui/views/workspace-picker.ts +1 -1
@@ -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.7.0
4
+ version: 2.9.0
5
5
  allowed-tools: Bash(agent-teams:*)
6
6
  metadata:
7
7
  openclaw:
@@ -262,21 +262,30 @@ agent-teams file info <team-id> <channel-id> <file-id>
262
262
 
263
263
  ### Snapshot Command
264
264
 
265
- Get comprehensive team state for AI agents:
265
+ Get team overview for AI agents (brief by default):
266
266
 
267
267
  ```bash
268
- # Full snapshot
268
+ # Brief snapshot (default) — fast, minimal API calls
269
269
  agent-teams snapshot
270
270
 
271
- # Filtered snapshots
272
- agent-teams snapshot --channels-only
273
- agent-teams snapshot --users-only
271
+ # Full snapshot — includes messages and members (slow, large output)
272
+ agent-teams snapshot --full
274
273
 
275
- # Limit messages per channel
276
- agent-teams snapshot --limit 10
274
+ # Filtered full snapshots
275
+ agent-teams snapshot --full --channels-only
276
+ agent-teams snapshot --full --users-only
277
+
278
+ # Limit messages per channel (only with --full)
279
+ agent-teams snapshot --full --limit 10
277
280
  ```
278
281
 
279
- Returns JSON with:
282
+ Default returns brief JSON with:
283
+
284
+ - Team metadata (id, name)
285
+ - Channels (id, name)
286
+ - Hint for next commands
287
+
288
+ With `--full`, returns comprehensive JSON with:
280
289
 
281
290
  - Team metadata (id, name)
282
291
  - Channels (id, name, type, description)
@@ -127,28 +127,30 @@ done
127
127
  # Ensure fresh token
128
128
  agent-teams auth extract 2>/dev/null || true
129
129
 
130
- # Get full snapshot
130
+ # Get brief snapshot (default — fast, minimal output)
131
131
  SNAPSHOT=$(agent-teams snapshot)
132
132
 
133
133
  # Extract key information
134
134
  TEAM_NAME=$(echo "$SNAPSHOT" | jq -r '.team.name // "Unknown"')
135
135
  CHANNEL_COUNT=$(echo "$SNAPSHOT" | jq -r '.channels | length')
136
- MEMBER_COUNT=$(echo "$SNAPSHOT" | jq -r '.members | length')
137
136
 
138
137
  echo "Team: $TEAM_NAME"
139
138
  echo "Channels: $CHANNEL_COUNT"
140
- echo "Members: $MEMBER_COUNT"
141
139
 
142
140
  # List all channels
143
141
  echo -e "\nChannels:"
144
142
  echo "$SNAPSHOT" | jq -r '.channels[] | " #\(.name) (\(.id))"'
145
143
 
146
- # List recent activity
147
- echo -e "\nRecent messages:"
148
- echo "$SNAPSHOT" | jq -r '.recent_messages[] | " [\(.channel_name)] \(.author): \(.content[0:50])"'
144
+ # Then drill into a specific channel for recent activity
145
+ CHANNEL_ID=$(echo "$SNAPSHOT" | jq -r '.channels[0].id // empty')
146
+ TEAM_ID=$(echo "$SNAPSHOT" | jq -r '.team.id // empty')
147
+ if [ -n "$TEAM_ID" ] && [ -n "$CHANNEL_ID" ]; then
148
+ echo -e "\nRecent messages:"
149
+ agent-teams message list "$TEAM_ID" "$CHANNEL_ID" --limit 10
150
+ fi
149
151
  ```
150
152
 
151
- **When to use**: Initial context gathering, status reports, team summaries.
153
+ **When to use**: Initial context gathering, status reports, team summaries. Start with brief snapshot, then use `message list <team-id> <channel-id>` or `member list <team-id>` for details.
152
154
 
153
155
  ## Pattern 4: Find Channel by Name
154
156
 
@@ -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.7.0
4
+ version: 2.9.0
5
5
  allowed-tools: Bash(agent-telegram:*)
6
6
  ---
7
7
 
@@ -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.7.0
4
+ version: 2.9.0
5
5
  allowed-tools: Bash(agent-webex:*)
6
6
  metadata:
7
7
  openclaw:
@@ -247,15 +247,24 @@ agent-webex member list <space-id> --limit 100
247
247
 
248
248
  ### Snapshot Command
249
249
 
250
- Get workspace spaces overview for AI agents:
250
+ Get workspace overview for AI agents (brief by default):
251
251
 
252
252
  ```bash
253
+ # Brief snapshot (default) — fast, minimal output
253
254
  agent-webex snapshot
255
+
256
+ # Full snapshot — includes type and lastActivity
257
+ agent-webex snapshot --full
254
258
  ```
255
259
 
256
- Returns JSON with:
260
+ Default returns brief JSON with:
261
+
262
+ - Spaces (id, title) — only spaces you're a member of
263
+ - Hint for next commands
264
+
265
+ With `--full`, returns:
257
266
 
258
- - Spaces (id, title, type, lastActivity) — only spaces you're a member of
267
+ - Spaces (id, title, type, lastActivity)
259
268
 
260
269
  For messages or members, use `message list <space-id>` or `member list <space-id>`.
261
270
 
@@ -336,10 +336,16 @@ SPACE_COUNT=$(echo "$SNAPSHOT" | jq -r '.spaces | length')
336
336
  echo "Total spaces: $SPACE_COUNT"
337
337
 
338
338
  # List all spaces
339
- echo "$SNAPSHOT" | jq -r '.spaces[] | " \(.title) (\(.type))"'
339
+ echo "$SNAPSHOT" | jq -r '.spaces[] | " \(.title) (\(.id))"'
340
+
341
+ # Then drill into a specific space for details
342
+ SPACE_ID=$(echo "$SNAPSHOT" | jq -r '.spaces[0].id // empty')
343
+ if [ -n "$SPACE_ID" ]; then
344
+ agent-webex message list "$SPACE_ID" --limit 10
345
+ fi
340
346
  ```
341
347
 
342
- **When to use**: Quick workspace overview to discover space IDs and titles. Use `message list <space-id>` or `member list <space-id>` for details.
348
+ **When to use**: Quick workspace overview to discover space IDs and titles. Start with brief snapshot, then use `message list <space-id>` or `member list <space-id>` for details.
343
349
 
344
350
  ## Pipeline Patterns
345
351
 
@@ -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.7.0
4
+ version: 2.9.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.7.0
4
+ version: 2.9.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.7.0
4
+ version: 2.9.0
5
5
  allowed-tools: Bash(agent-whatsappbot:*)
6
6
  metadata:
7
7
  openclaw:
@@ -48,11 +48,14 @@ describe('ChannelClient', () => {
48
48
 
49
49
  const getHeaders = (callIndex = 0) => fetchCalls[callIndex]?.options?.headers as Record<string, string>
50
50
 
51
- const getJsonBody = (callIndex = 0) => JSON.parse(String(fetchCalls[callIndex]?.options?.body)) as Record<string, unknown>
51
+ const getJsonBody = (callIndex = 0) =>
52
+ JSON.parse(String(fetchCalls[callIndex]?.options?.body)) as Record<string, unknown>
52
53
 
53
54
  test('login() requires account cookie', async () => {
54
55
  await expect(new ChannelClient().login({ accountCookie: '' })).rejects.toThrow(ChannelError)
55
- await expect(new ChannelClient().login({ accountCookie: '', sessionCookie: 'session-cookie' })).rejects.toThrow(ChannelError)
56
+ await expect(new ChannelClient().login({ accountCookie: '', sessionCookie: 'session-cookie' })).rejects.toThrow(
57
+ ChannelError,
58
+ )
56
59
  const client = await new ChannelClient().login({ accountCookie: 'account-cookie' })
57
60
  expect(client).toBeInstanceOf(ChannelClient)
58
61
  const client2 = await new ChannelClient().login({ accountCookie: 'account-cookie', sessionCookie: '' })
@@ -60,7 +63,17 @@ describe('ChannelClient', () => {
60
63
  })
61
64
 
62
65
  test('successful GET request returns unwrapped JSON', async () => {
63
- mockResponse({ account: { id: 'acc-1', name: 'Desk Owner', email: 'owner@example.com', emailVerified: true, language: 'en', country: 'KR', createdAt: 1 } })
66
+ mockResponse({
67
+ account: {
68
+ id: 'acc-1',
69
+ name: 'Desk Owner',
70
+ email: 'owner@example.com',
71
+ emailVerified: true,
72
+ language: 'en',
73
+ country: 'KR',
74
+ createdAt: 1,
75
+ },
76
+ })
64
77
 
65
78
  const client = await new ChannelClient().login({ accountCookie: 'account-cookie', sessionCookie: 'session-cookie' })
66
79
  const account = await client.getAccount()
@@ -70,7 +83,17 @@ describe('ChannelClient', () => {
70
83
  })
71
84
 
72
85
  test('cookie auth headers are set on every request', async () => {
73
- mockResponse({ account: { id: 'acc-1', name: 'Desk Owner', email: 'owner@example.com', emailVerified: true, language: 'en', country: 'KR', createdAt: 1 } })
86
+ mockResponse({
87
+ account: {
88
+ id: 'acc-1',
89
+ name: 'Desk Owner',
90
+ email: 'owner@example.com',
91
+ emailVerified: true,
92
+ language: 'en',
93
+ country: 'KR',
94
+ createdAt: 1,
95
+ },
96
+ })
74
97
  mockResponse({ channel: { id: 'ch-1', name: 'Support' } })
75
98
 
76
99
  const client = await new ChannelClient().login({ accountCookie: 'account-cookie', sessionCookie: 'session-cookie' })
@@ -87,7 +110,17 @@ describe('ChannelClient', () => {
87
110
 
88
111
  test('429 response triggers retry with Retry-After wait', async () => {
89
112
  mockResponse({ errors: [{ message: 'Rate limited' }] }, 429, { 'Retry-After': '0.05' })
90
- mockResponse({ account: { id: 'acc-1', name: 'Desk Owner', email: 'owner@example.com', emailVerified: true, language: 'en', country: 'KR', createdAt: 1 } })
113
+ mockResponse({
114
+ account: {
115
+ id: 'acc-1',
116
+ name: 'Desk Owner',
117
+ email: 'owner@example.com',
118
+ emailVerified: true,
119
+ language: 'en',
120
+ country: 'KR',
121
+ createdAt: 1,
122
+ },
123
+ })
91
124
 
92
125
  const client = await new ChannelClient().login({ accountCookie: 'account-cookie', sessionCookie: 'session-cookie' })
93
126
  const start = Date.now()
@@ -102,7 +135,17 @@ describe('ChannelClient', () => {
102
135
  test('500 response triggers retry with exponential backoff for GET requests', async () => {
103
136
  mockResponse({ errors: [{ message: 'Server error' }] }, 500)
104
137
  mockResponse({ errors: [{ message: 'Server error' }] }, 500)
105
- mockResponse({ account: { id: 'acc-1', name: 'Desk Owner', email: 'owner@example.com', emailVerified: true, language: 'en', country: 'KR', createdAt: 1 } })
138
+ mockResponse({
139
+ account: {
140
+ id: 'acc-1',
141
+ name: 'Desk Owner',
142
+ email: 'owner@example.com',
143
+ emailVerified: true,
144
+ language: 'en',
145
+ country: 'KR',
146
+ createdAt: 1,
147
+ },
148
+ })
106
149
 
107
150
  const client = await new ChannelClient().login({ accountCookie: 'account-cookie', sessionCookie: 'session-cookie' })
108
151
  const start = Date.now()
@@ -147,24 +190,26 @@ describe('ChannelClient', () => {
147
190
  mockResponse(null, 204)
148
191
 
149
192
  const client = await new ChannelClient().login({ accountCookie: 'account-cookie', sessionCookie: 'session-cookie' })
150
- const result = await (client as unknown as { request: <T>(method: string, path: string) => Promise<T> }).request<void>('GET', '/desk/account')
193
+ const result = await (
194
+ client as unknown as { request: <T>(method: string, path: string) => Promise<T> }
195
+ ).request<void>('GET', '/desk/account')
151
196
 
152
197
  expect(result).toBeUndefined()
153
198
  })
154
199
 
155
200
  test('wrapTextInBlocks returns a single text block and extractText joins block and plain text', () => {
156
- expect(ChannelClient.wrapTextInBlocks('Hello world')).toEqual([
157
- { type: 'text', value: 'Hello world' },
158
- ])
159
-
160
- expect(ChannelClient.extractText({
161
- id: 'msg-1',
162
- blocks: [
163
- { type: 'text', value: 'hello' },
164
- { type: 'text', value: 'world' },
165
- ],
166
- plainText: 'fallback',
167
- })).toBe('hello\nworld\nfallback')
201
+ expect(ChannelClient.wrapTextInBlocks('Hello world')).toEqual([{ type: 'text', value: 'Hello world' }])
202
+
203
+ expect(
204
+ ChannelClient.extractText({
205
+ id: 'msg-1',
206
+ blocks: [
207
+ { type: 'text', value: 'hello' },
208
+ { type: 'text', value: 'world' },
209
+ ],
210
+ plainText: 'fallback',
211
+ }),
212
+ ).toBe('hello\nworld\nfallback')
168
213
  })
169
214
 
170
215
  test('listChannels includes query params', async () => {
@@ -220,7 +265,9 @@ describe('ChannelClient', () => {
220
265
  expect(fetchCalls[1].url).toBe('https://desk-api.channel.io/desk/channels/ch-1/groups/grp-1')
221
266
 
222
267
  const messagesUrl = new URL(fetchCalls[2].url)
223
- expect(messagesUrl.origin + messagesUrl.pathname).toBe('https://desk-api.channel.io/desk/channels/ch-1/groups/grp-1/messages')
268
+ expect(messagesUrl.origin + messagesUrl.pathname).toBe(
269
+ 'https://desk-api.channel.io/desk/channels/ch-1/groups/grp-1/messages',
270
+ )
224
271
  expect(messagesUrl.searchParams.get('sortOrder')).toBe('desc')
225
272
  expect(messagesUrl.searchParams.get('limit')).toBe('100')
226
273
  expect(messagesUrl.searchParams.get('since')).toBe('cursor-1')
@@ -251,7 +298,9 @@ describe('ChannelClient', () => {
251
298
  await client.sendDirectChatMessage('ch-1', 'dm-1', blocks, 'req-234')
252
299
 
253
300
  expect(fetchCalls[0].url).toBe('https://desk-api.channel.io/desk/channels/ch-1/direct-chats?limit=200')
254
- expect(fetchCalls[1].url).toBe('https://desk-api.channel.io/desk/channels/ch-1/direct-chats/dm-1/messages?sortOrder=asc&limit=50')
301
+ expect(fetchCalls[1].url).toBe(
302
+ 'https://desk-api.channel.io/desk/channels/ch-1/direct-chats/dm-1/messages?sortOrder=asc&limit=50',
303
+ )
255
304
  expect(fetchCalls[2].url).toBe('https://desk-api.channel.io/desk/channels/ch-1/direct-chats/dm-1/messages')
256
305
  expect(getJsonBody(2)).toEqual({ blocks, requestId: 'req-234' })
257
306
  })
@@ -270,9 +319,13 @@ describe('ChannelClient', () => {
270
319
  await client.getUserChatMessages('ch-1', 'uc-1', { sortOrder: 'desc', limit: 25 })
271
320
  await client.sendUserChatMessage('ch-1', 'uc-1', blocks, 'req-345')
272
321
 
273
- expect(fetchCalls[0].url).toBe('https://desk-api.channel.io/desk/channels/ch-1/user-chats/assigned/me?state=opened&limit=25')
322
+ expect(fetchCalls[0].url).toBe(
323
+ 'https://desk-api.channel.io/desk/channels/ch-1/user-chats/assigned/me?state=opened&limit=25',
324
+ )
274
325
  expect(fetchCalls[1].url).toBe('https://desk-api.channel.io/desk/channels/ch-1/user-chats/uc-1')
275
- expect(fetchCalls[2].url).toBe('https://desk-api.channel.io/desk/channels/ch-1/user-chats/uc-1/messages?sortOrder=desc&limit=25')
326
+ expect(fetchCalls[2].url).toBe(
327
+ 'https://desk-api.channel.io/desk/channels/ch-1/user-chats/uc-1/messages?sortOrder=desc&limit=25',
328
+ )
276
329
  expect(fetchCalls[3].url).toBe('https://desk-api.channel.io/desk/channels/ch-1/user-chats/uc-1/messages')
277
330
  expect(getJsonBody(3)).toEqual({ blocks, requestId: 'req-345' })
278
331
  })
@@ -291,7 +344,9 @@ describe('ChannelClient', () => {
291
344
  mockResponse({ type: 'server_error', errors: [{ message: 'Server error' }] }, 500)
292
345
 
293
346
  const client = await new ChannelClient().login({ accountCookie: 'account-cookie', sessionCookie: 'session-cookie' })
294
- await expect(client.sendGroupMessage('ch-1', 'grp-1', ChannelClient.wrapTextInBlocks('hello'), 'req-123')).rejects.toThrow(ChannelError)
347
+ await expect(
348
+ client.sendGroupMessage('ch-1', 'grp-1', ChannelClient.wrapTextInBlocks('hello'), 'req-123'),
349
+ ).rejects.toThrow(ChannelError)
295
350
  expect(fetchCalls).toHaveLength(1)
296
351
  })
297
352
 
@@ -311,11 +366,35 @@ describe('ChannelClient', () => {
311
366
  })
312
367
 
313
368
  test('rate limit headers delay the next request when remaining is zero', async () => {
314
- mockResponse({ account: { id: 'acc-1', name: 'Desk Owner', email: 'owner@example.com', emailVerified: true, language: 'en', country: 'KR', createdAt: 1 } }, 200, {
315
- 'x-ratelimit-remaining': '0',
316
- 'x-ratelimit-reset': String(Date.now() + 50),
369
+ mockResponse(
370
+ {
371
+ account: {
372
+ id: 'acc-1',
373
+ name: 'Desk Owner',
374
+ email: 'owner@example.com',
375
+ emailVerified: true,
376
+ language: 'en',
377
+ country: 'KR',
378
+ createdAt: 1,
379
+ },
380
+ },
381
+ 200,
382
+ {
383
+ 'x-ratelimit-remaining': '0',
384
+ 'x-ratelimit-reset': String(Date.now() + 50),
385
+ },
386
+ )
387
+ mockResponse({
388
+ account: {
389
+ id: 'acc-2',
390
+ name: 'Desk Owner',
391
+ email: 'owner@example.com',
392
+ emailVerified: true,
393
+ language: 'en',
394
+ country: 'KR',
395
+ createdAt: 2,
396
+ },
317
397
  })
318
- mockResponse({ account: { id: 'acc-2', name: 'Desk Owner', email: 'owner@example.com', emailVerified: true, language: 'en', country: 'KR', createdAt: 2 } })
319
398
 
320
399
  const client = await new ChannelClient().login({ accountCookie: 'account-cookie', sessionCookie: 'session-cookie' })
321
400
  await client.getAccount()
@@ -339,7 +418,15 @@ describe('ChannelClient', () => {
339
418
 
340
419
  test('searchTeamChatMessages builds correct URL with query and limit', async () => {
341
420
  const searchResponse = {
342
- hits: [{ index: 'messages-2026-03', score: 'NaN', source: { id: 'msg-1' }, highlight: {}, searchAfter: [1000, 'msg-1'] }],
421
+ hits: [
422
+ {
423
+ index: 'messages-2026-03',
424
+ score: 'NaN',
425
+ source: { id: 'msg-1' },
426
+ highlight: {},
427
+ searchAfter: [1000, 'msg-1'],
428
+ },
429
+ ],
343
430
  bots: [],
344
431
  sessions: [],
345
432
  groups: [],
@@ -1,3 +1,4 @@
1
+ import { ChannelCredentialManager } from './credential-manager'
1
2
  import type {
2
3
  Channel,
3
4
  ChannelAccount,
@@ -11,7 +12,6 @@ import type {
11
12
  MessageBlock,
12
13
  } from './types'
13
14
  import { ChannelError } from './types'
14
- import { ChannelCredentialManager } from './credential-manager'
15
15
 
16
16
  const BASE_URL = 'https://desk-api.channel.io'
17
17
  const MAX_RETRIES = 3
@@ -99,11 +99,21 @@ export class ChannelClient {
99
99
  }
100
100
 
101
101
  async getManagerRole(channelId: string): Promise<{ permissions: unknown[] }> {
102
- return this.request<{ permissions: unknown[] }>('GET', `/desk/channels/${channelId}/managers/me/role`, undefined, 'role')
102
+ return this.request<{ permissions: unknown[] }>(
103
+ 'GET',
104
+ `/desk/channels/${channelId}/managers/me/role`,
105
+ undefined,
106
+ 'role',
107
+ )
103
108
  }
104
109
 
105
110
  async listGroups(channelId: string, params?: { limit?: number }): Promise<ChannelGroup[]> {
106
- return this.request<ChannelGroup[]>('GET', this.buildPath(`/desk/channels/${channelId}/groups`, params), undefined, 'groups')
111
+ return this.request<ChannelGroup[]>(
112
+ 'GET',
113
+ this.buildPath(`/desk/channels/${channelId}/groups`, params),
114
+ undefined,
115
+ 'groups',
116
+ )
107
117
  }
108
118
 
109
119
  async getGroup(channelId: string, groupId: string): Promise<ChannelGroup> {
@@ -183,7 +193,12 @@ export class ChannelClient {
183
193
  }
184
194
 
185
195
  async getUserChat(channelId: string, chatId: string): Promise<ChannelUserChat> {
186
- return this.request<ChannelUserChat>('GET', `/desk/channels/${channelId}/user-chats/${chatId}`, undefined, 'userChat')
196
+ return this.request<ChannelUserChat>(
197
+ 'GET',
198
+ `/desk/channels/${channelId}/user-chats/${chatId}`,
199
+ undefined,
200
+ 'userChat',
201
+ )
187
202
  }
188
203
 
189
204
  async getUserChatMessages(
@@ -214,7 +229,12 @@ export class ChannelClient {
214
229
  }
215
230
 
216
231
  async listBots(channelId: string, params?: { limit?: number }): Promise<ChannelBot[]> {
217
- return this.request<ChannelBot[]>('GET', this.buildPath(`/desk/channels/${channelId}/bots`, params), undefined, 'bots')
232
+ return this.request<ChannelBot[]>(
233
+ 'GET',
234
+ this.buildPath(`/desk/channels/${channelId}/bots`, params),
235
+ undefined,
236
+ 'bots',
237
+ )
218
238
  }
219
239
 
220
240
  async searchTeamChatMessages(
@@ -344,7 +364,7 @@ export class ChannelClient {
344
364
  }
345
365
 
346
366
  private async createHttpError(response: Response): Promise<ChannelError> {
347
- const errorBody = await response.json().catch(() => ({})) as ChannelApiErrorResponse
367
+ const errorBody = (await response.json().catch(() => ({}))) as ChannelApiErrorResponse
348
368
  const message = errorBody.errors?.[0]?.message || `HTTP ${response.status}`
349
369
  const code = errorBody.type || `http_${response.status}`
350
370
  return new ChannelError(message, code)
@@ -19,9 +19,7 @@ const mockListChannels = mock(() =>
19
19
  { id: 'ws-2', name: 'Workspace 2' },
20
20
  ]),
21
21
  )
22
- const mockExtract = mock(() =>
23
- Promise.resolve([{ accountCookie: 'fresh-account', sessionCookie: 'fresh-session' }]),
24
- )
22
+ const mockExtract = mock(() => Promise.resolve([{ accountCookie: 'fresh-account', sessionCookie: 'fresh-session' }]))
25
23
 
26
24
  import {
27
25
  clearAction,
@@ -50,7 +48,7 @@ setChannelAuthCommandDependenciesForTesting({
50
48
  createCredentialManager: () => ({
51
49
  async getCredentials(workspaceId?: string): Promise<WorkspaceEntry | null> {
52
50
  const targetId = workspaceId ?? currentWorkspaceId
53
- return targetId ? workspaceStore.get(targetId) ?? null : null
51
+ return targetId ? (workspaceStore.get(targetId) ?? null) : null
54
52
  },
55
53
 
56
54
  async setCredentials(entry: WorkspaceEntry): Promise<void> {
@@ -115,7 +113,9 @@ describe('channel auth commands', () => {
115
113
  { id: 'ws-2', name: 'Workspace 2' },
116
114
  ]),
117
115
  )
118
- mockExtract.mockImplementation(() => Promise.resolve([{ accountCookie: 'fresh-account', sessionCookie: 'fresh-session' }]))
116
+ mockExtract.mockImplementation(() =>
117
+ Promise.resolve([{ accountCookie: 'fresh-account', sessionCookie: 'fresh-session' }]),
118
+ )
119
119
  })
120
120
 
121
121
  describe('extractAction', () => {
@@ -50,7 +50,10 @@ type ChannelCredentialManagerLike = Pick<
50
50
  >
51
51
  type ChannelTokenExtractorLike = Pick<ChannelTokenExtractor, 'extract'>
52
52
 
53
- let createChannelClient: (accountCookie: string, sessionCookie?: string) => ChannelClientLike | Promise<ChannelClientLike> = async (
53
+ let createChannelClient: (
54
+ accountCookie: string,
55
+ sessionCookie?: string,
56
+ ) => ChannelClientLike | Promise<ChannelClientLike> = async (
54
57
  accountCookie: string,
55
58
  sessionCookie?: string,
56
59
  ): Promise<ChannelClientLike> => new ChannelClient().login({ accountCookie, sessionCookie })
@@ -60,7 +63,10 @@ let createCredentialManager = (): ChannelCredentialManagerLike => new ChannelCre
60
63
  let createTokenExtractor = (): ChannelTokenExtractorLike => new ChannelTokenExtractor()
61
64
 
62
65
  export function setChannelAuthCommandDependenciesForTesting(dependencies: {
63
- createChannelClient?: (accountCookie: string, sessionCookie?: string) => ChannelClientLike | Promise<ChannelClientLike>
66
+ createChannelClient?: (
67
+ accountCookie: string,
68
+ sessionCookie?: string,
69
+ ) => ChannelClientLike | Promise<ChannelClientLike>
64
70
  createCredentialManager?: () => ChannelCredentialManagerLike
65
71
  createTokenExtractor?: () => ChannelTokenExtractorLike
66
72
  }): void {
@@ -154,7 +160,9 @@ export async function statusAction(options: ActionOptions = {}): Promise<StatusR
154
160
  }
155
161
  }
156
162
 
157
- const storedWorkspace = (await credManager.listAll()).find((workspace) => workspace.workspace_id === creds.workspace_id)
163
+ const storedWorkspace = (await credManager.listAll()).find(
164
+ (workspace) => workspace.workspace_id === creds.workspace_id,
165
+ )
158
166
 
159
167
  try {
160
168
  const client = await createChannelClient(creds.account_cookie, creds.session_cookie ?? undefined)
@@ -205,7 +213,10 @@ export async function listAction(options: ActionOptions = {}): Promise<Workspace
205
213
  }
206
214
  }
207
215
 
208
- export async function useAction(workspaceId: string, options: ActionOptions = {}): Promise<SuccessResult | ErrorResult> {
216
+ export async function useAction(
217
+ workspaceId: string,
218
+ options: ActionOptions = {},
219
+ ): Promise<SuccessResult | ErrorResult> {
209
220
  try {
210
221
  const credManager = options._credManager ?? createCredentialManager()
211
222
  const found = await credManager.setCurrent(workspaceId)
@@ -223,7 +234,10 @@ export async function useAction(workspaceId: string, options: ActionOptions = {}
223
234
  }
224
235
  }
225
236
 
226
- export async function removeAction(workspaceId: string, options: ActionOptions = {}): Promise<SuccessResult | ErrorResult> {
237
+ export async function removeAction(
238
+ workspaceId: string,
239
+ options: ActionOptions = {},
240
+ ): Promise<SuccessResult | ErrorResult> {
227
241
  try {
228
242
  const credManager = options._credManager ?? createCredentialManager()
229
243
  const removed = await credManager.removeWorkspace(workspaceId)
@@ -309,9 +309,7 @@ describe('message commands', () => {
309
309
  test('sendAction sends a group message with wrapped blocks', async () => {
310
310
  const result = await sendAction('group', 'grp-1', 'Hello group')
311
311
 
312
- expect(mockSendGroupMessage).toHaveBeenCalledWith('ws-1', 'grp-1', [
313
- { type: 'text', value: 'Hello group' },
314
- ])
312
+ expect(mockSendGroupMessage).toHaveBeenCalledWith('ws-1', 'grp-1', [{ type: 'text', value: 'Hello group' }])
315
313
  expect(result).toMatchObject({
316
314
  id: 'msg-group-1',
317
315
  channel_id: 'ws-1',
@@ -324,9 +322,7 @@ describe('message commands', () => {
324
322
  test('sendAction sends a user chat message with wrapped blocks', async () => {
325
323
  const result = await sendAction('user-chat', 'chat-1', 'Hello user chat')
326
324
 
327
- expect(mockSendUserChatMessage).toHaveBeenCalledWith('ws-1', 'chat-1', [
328
- { type: 'text', value: 'Hello user chat' },
329
- ])
325
+ expect(mockSendUserChatMessage).toHaveBeenCalledWith('ws-1', 'chat-1', [{ type: 'text', value: 'Hello user chat' }])
330
326
  expect(result).toMatchObject({
331
327
  id: 'msg-user-1',
332
328
  channel_id: 'ws-1',
@@ -70,7 +70,11 @@ export async function sendAction(
70
70
  }
71
71
  }
72
72
 
73
- export async function listAction(chatType: ChatType, chatId: string, options: MessageOptions = {}): Promise<MessageResult> {
73
+ export async function listAction(
74
+ chatType: ChatType,
75
+ chatId: string,
76
+ options: MessageOptions = {},
77
+ ): Promise<MessageResult> {
74
78
  try {
75
79
  const client = await getClient(options)
76
80
  const channelId = await getCurrentWorkspaceId(options)