agent-messenger 1.0.0 → 1.2.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 (512) hide show
  1. package/.claude/commands/release.md +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.github/workflows/ci.yml +1 -1
  4. package/.github/workflows/e2e.yml.disabled +69 -0
  5. package/CONTRIBUTING.md +2 -2
  6. package/README.md +18 -15
  7. package/biome.json +34 -2
  8. package/bun.lock +63 -0
  9. package/dist/package.json +8 -4
  10. package/dist/src/cli.d.ts.map +1 -1
  11. package/dist/src/cli.js +4 -1
  12. package/dist/src/cli.js.map +1 -1
  13. package/dist/src/platforms/discord/cli.js +4 -4
  14. package/dist/src/platforms/discord/cli.js.map +1 -1
  15. package/dist/src/platforms/discord/client.d.ts +26 -5
  16. package/dist/src/platforms/discord/client.d.ts.map +1 -1
  17. package/dist/src/platforms/discord/client.js +115 -17
  18. package/dist/src/platforms/discord/client.js.map +1 -1
  19. package/dist/src/platforms/discord/commands/auth.js +16 -16
  20. package/dist/src/platforms/discord/commands/auth.js.map +1 -1
  21. package/dist/src/platforms/discord/commands/channel.js +4 -4
  22. package/dist/src/platforms/discord/commands/channel.js.map +1 -1
  23. package/dist/src/platforms/discord/commands/dm.d.ts +9 -0
  24. package/dist/src/platforms/discord/commands/dm.d.ts.map +1 -0
  25. package/dist/src/platforms/discord/commands/dm.js +68 -0
  26. package/dist/src/platforms/discord/commands/dm.js.map +1 -0
  27. package/dist/src/platforms/discord/commands/friend.d.ts +3 -0
  28. package/dist/src/platforms/discord/commands/friend.d.ts.map +1 -0
  29. package/dist/src/platforms/discord/commands/friend.js +39 -0
  30. package/dist/src/platforms/discord/commands/friend.js.map +1 -0
  31. package/dist/src/platforms/discord/commands/index.d.ts +1 -1
  32. package/dist/src/platforms/discord/commands/index.d.ts.map +1 -1
  33. package/dist/src/platforms/discord/commands/index.js +1 -1
  34. package/dist/src/platforms/discord/commands/index.js.map +1 -1
  35. package/dist/src/platforms/discord/commands/member.d.ts +3 -0
  36. package/dist/src/platforms/discord/commands/member.d.ts.map +1 -0
  37. package/dist/src/platforms/discord/commands/member.js +47 -0
  38. package/dist/src/platforms/discord/commands/member.js.map +1 -0
  39. package/dist/src/platforms/discord/commands/mention.d.ts +8 -0
  40. package/dist/src/platforms/discord/commands/mention.d.ts.map +1 -0
  41. package/dist/src/platforms/discord/commands/mention.js +47 -0
  42. package/dist/src/platforms/discord/commands/mention.js.map +1 -0
  43. package/dist/src/platforms/discord/commands/message.d.ts +13 -0
  44. package/dist/src/platforms/discord/commands/message.d.ts.map +1 -1
  45. package/dist/src/platforms/discord/commands/message.js +95 -1
  46. package/dist/src/platforms/discord/commands/message.js.map +1 -1
  47. package/dist/src/platforms/discord/commands/note.d.ts +3 -0
  48. package/dist/src/platforms/discord/commands/note.d.ts.map +1 -0
  49. package/dist/src/platforms/discord/commands/note.js +56 -0
  50. package/dist/src/platforms/discord/commands/note.js.map +1 -0
  51. package/dist/src/platforms/discord/commands/profile.d.ts +3 -0
  52. package/dist/src/platforms/discord/commands/profile.d.ts.map +1 -0
  53. package/dist/src/platforms/discord/commands/profile.js +47 -0
  54. package/dist/src/platforms/discord/commands/profile.js.map +1 -0
  55. package/dist/src/platforms/discord/commands/server.d.ts +15 -0
  56. package/dist/src/platforms/discord/commands/server.d.ts.map +1 -0
  57. package/dist/src/platforms/discord/commands/server.js +102 -0
  58. package/dist/src/platforms/discord/commands/server.js.map +1 -0
  59. package/dist/src/platforms/discord/commands/snapshot.js +10 -10
  60. package/dist/src/platforms/discord/commands/snapshot.js.map +1 -1
  61. package/dist/src/platforms/discord/commands/thread.d.ts +10 -0
  62. package/dist/src/platforms/discord/commands/thread.d.ts.map +1 -0
  63. package/dist/src/platforms/discord/commands/thread.js +67 -0
  64. package/dist/src/platforms/discord/commands/thread.js.map +1 -0
  65. package/dist/src/platforms/discord/commands/user.d.ts.map +1 -1
  66. package/dist/src/platforms/discord/commands/user.js +14 -5
  67. package/dist/src/platforms/discord/commands/user.js.map +1 -1
  68. package/dist/src/platforms/discord/credential-manager.d.ts +13 -13
  69. package/dist/src/platforms/discord/credential-manager.d.ts.map +1 -1
  70. package/dist/src/platforms/discord/credential-manager.js +28 -22
  71. package/dist/src/platforms/discord/credential-manager.js.map +1 -1
  72. package/dist/src/platforms/discord/super-properties.d.ts +4 -0
  73. package/dist/src/platforms/discord/super-properties.d.ts.map +1 -0
  74. package/dist/src/platforms/discord/super-properties.js +50 -0
  75. package/dist/src/platforms/discord/super-properties.js.map +1 -0
  76. package/dist/src/platforms/discord/token-extractor.d.ts +6 -1
  77. package/dist/src/platforms/discord/token-extractor.d.ts.map +1 -1
  78. package/dist/src/platforms/discord/token-extractor.js +27 -2
  79. package/dist/src/platforms/discord/token-extractor.js.map +1 -1
  80. package/dist/src/platforms/discord/types.d.ts +389 -22
  81. package/dist/src/platforms/discord/types.d.ts.map +1 -1
  82. package/dist/src/platforms/discord/types.js +46 -4
  83. package/dist/src/platforms/discord/types.js.map +1 -1
  84. package/dist/src/platforms/slack/cli.d.ts.map +1 -1
  85. package/dist/src/platforms/slack/cli.js +7 -2
  86. package/dist/src/platforms/slack/cli.js.map +1 -1
  87. package/dist/src/platforms/slack/client.d.ts +19 -1
  88. package/dist/src/platforms/slack/client.d.ts.map +1 -1
  89. package/dist/src/platforms/slack/client.js +134 -0
  90. package/dist/src/platforms/slack/client.js.map +1 -1
  91. package/dist/src/platforms/slack/commands/activity.d.ts +3 -0
  92. package/dist/src/platforms/slack/commands/activity.d.ts.map +1 -0
  93. package/dist/src/platforms/slack/commands/activity.js +40 -0
  94. package/dist/src/platforms/slack/commands/activity.js.map +1 -0
  95. package/dist/src/platforms/slack/commands/drafts.d.ts +3 -0
  96. package/dist/src/platforms/slack/commands/drafts.d.ts.map +1 -0
  97. package/dist/src/platforms/slack/commands/drafts.js +45 -0
  98. package/dist/src/platforms/slack/commands/drafts.js.map +1 -0
  99. package/dist/src/platforms/slack/commands/index.d.ts +5 -0
  100. package/dist/src/platforms/slack/commands/index.d.ts.map +1 -1
  101. package/dist/src/platforms/slack/commands/index.js +5 -0
  102. package/dist/src/platforms/slack/commands/index.js.map +1 -1
  103. package/dist/src/platforms/slack/commands/saved.d.ts +3 -0
  104. package/dist/src/platforms/slack/commands/saved.d.ts.map +1 -0
  105. package/dist/src/platforms/slack/commands/saved.js +54 -0
  106. package/dist/src/platforms/slack/commands/saved.js.map +1 -0
  107. package/dist/src/platforms/slack/commands/sections.d.ts +3 -0
  108. package/dist/src/platforms/slack/commands/sections.d.ts.map +1 -0
  109. package/dist/src/platforms/slack/commands/sections.js +37 -0
  110. package/dist/src/platforms/slack/commands/sections.js.map +1 -0
  111. package/dist/src/platforms/slack/commands/unread.d.ts +12 -0
  112. package/dist/src/platforms/slack/commands/unread.d.ts.map +1 -0
  113. package/dist/src/platforms/slack/commands/unread.js +89 -0
  114. package/dist/src/platforms/slack/commands/unread.js.map +1 -0
  115. package/dist/src/platforms/slack/credential-manager.d.ts.map +1 -1
  116. package/dist/src/platforms/slack/credential-manager.js +20 -6
  117. package/dist/src/platforms/slack/credential-manager.js.map +1 -1
  118. package/dist/src/platforms/slack/token-extractor.d.ts +8 -1
  119. package/dist/src/platforms/slack/token-extractor.d.ts.map +1 -1
  120. package/dist/src/platforms/slack/token-extractor.js +83 -11
  121. package/dist/src/platforms/slack/token-extractor.js.map +1 -1
  122. package/dist/src/platforms/slack/types.d.ts +52 -0
  123. package/dist/src/platforms/slack/types.d.ts.map +1 -1
  124. package/dist/src/platforms/slack/types.js.map +1 -1
  125. package/dist/src/platforms/teams/cli.d.ts.map +1 -0
  126. package/dist/{cli.js → src/platforms/teams/cli.js} +11 -10
  127. package/dist/src/platforms/teams/cli.js.map +1 -0
  128. package/dist/src/platforms/teams/client.d.ts +32 -0
  129. package/dist/src/platforms/teams/client.d.ts.map +1 -0
  130. package/dist/src/platforms/teams/client.js +202 -0
  131. package/dist/src/platforms/teams/client.js.map +1 -0
  132. package/dist/src/platforms/teams/commands/auth.d.ts +14 -0
  133. package/dist/src/platforms/teams/commands/auth.d.ts.map +1 -0
  134. package/dist/src/platforms/teams/commands/auth.js +176 -0
  135. package/dist/src/platforms/teams/commands/auth.js.map +1 -0
  136. package/dist/src/platforms/teams/commands/channel.d.ts +13 -0
  137. package/dist/src/platforms/teams/commands/channel.d.ts.map +1 -0
  138. package/dist/src/platforms/teams/commands/channel.js +97 -0
  139. package/dist/src/platforms/teams/commands/channel.js.map +1 -0
  140. package/dist/src/platforms/teams/commands/file.d.ts +12 -0
  141. package/dist/src/platforms/teams/commands/file.d.ts.map +1 -0
  142. package/dist/src/platforms/teams/commands/file.js +104 -0
  143. package/dist/src/platforms/teams/commands/file.js.map +1 -0
  144. package/dist/{commands → src/platforms/teams/commands}/index.d.ts +5 -2
  145. package/dist/src/platforms/teams/commands/index.d.ts.map +1 -0
  146. package/dist/{commands → src/platforms/teams/commands}/index.js +5 -2
  147. package/dist/src/platforms/teams/commands/index.js.map +1 -0
  148. package/dist/src/platforms/teams/commands/message.d.ts +17 -0
  149. package/dist/src/platforms/teams/commands/message.d.ts.map +1 -0
  150. package/dist/src/platforms/teams/commands/message.js +133 -0
  151. package/dist/src/platforms/teams/commands/message.js.map +1 -0
  152. package/dist/src/platforms/teams/commands/reaction.d.ts +9 -0
  153. package/dist/src/platforms/teams/commands/reaction.d.ts.map +1 -0
  154. package/dist/src/platforms/teams/commands/reaction.js +68 -0
  155. package/dist/src/platforms/teams/commands/reaction.js.map +1 -0
  156. package/dist/src/platforms/teams/commands/snapshot.d.ts +10 -0
  157. package/dist/src/platforms/teams/commands/snapshot.d.ts.map +1 -0
  158. package/dist/src/platforms/teams/commands/snapshot.js +85 -0
  159. package/dist/src/platforms/teams/commands/snapshot.js.map +1 -0
  160. package/dist/src/platforms/teams/commands/team.d.ts +18 -0
  161. package/dist/src/platforms/teams/commands/team.d.ts.map +1 -0
  162. package/dist/src/platforms/teams/commands/team.js +130 -0
  163. package/dist/src/platforms/teams/commands/team.js.map +1 -0
  164. package/dist/src/platforms/teams/commands/user.d.ts.map +1 -0
  165. package/dist/src/platforms/teams/commands/user.js +88 -0
  166. package/dist/src/platforms/teams/commands/user.js.map +1 -0
  167. package/dist/src/platforms/teams/credential-manager.d.ts +18 -0
  168. package/dist/src/platforms/teams/credential-manager.d.ts.map +1 -0
  169. package/dist/src/platforms/teams/credential-manager.js +81 -0
  170. package/dist/src/platforms/teams/credential-manager.js.map +1 -0
  171. package/dist/src/platforms/teams/index.d.ts +4 -0
  172. package/dist/src/platforms/teams/index.d.ts.map +1 -0
  173. package/dist/src/platforms/teams/index.js +6 -0
  174. package/dist/src/platforms/teams/index.js.map +1 -0
  175. package/dist/src/platforms/teams/token-extractor.d.ts +41 -0
  176. package/dist/src/platforms/teams/token-extractor.d.ts.map +1 -0
  177. package/dist/src/platforms/teams/token-extractor.js +360 -0
  178. package/dist/src/platforms/teams/token-extractor.js.map +1 -0
  179. package/dist/src/platforms/teams/types.d.ts +209 -0
  180. package/dist/src/platforms/teams/types.d.ts.map +1 -0
  181. package/dist/src/platforms/teams/types.js +65 -0
  182. package/dist/src/platforms/teams/types.js.map +1 -0
  183. package/dist/src/shared/utils/derived-key-cache.d.ts +20 -0
  184. package/dist/src/shared/utils/derived-key-cache.d.ts.map +1 -0
  185. package/dist/src/shared/utils/derived-key-cache.js +52 -0
  186. package/dist/src/shared/utils/derived-key-cache.js.map +1 -0
  187. package/docs/README.md +113 -0
  188. package/docs/biome.json +8 -0
  189. package/docs/bun.lock +1426 -0
  190. package/docs/content/docs/agent-skills.mdx +98 -0
  191. package/docs/content/docs/index.mdx +124 -0
  192. package/docs/{discord.md → content/docs/integrations/discord.mdx} +46 -21
  193. package/docs/content/docs/integrations/meta.json +5 -0
  194. package/docs/{slack.md → content/docs/integrations/slack.mdx} +5 -4
  195. package/docs/content/docs/integrations/teams.mdx +322 -0
  196. package/docs/content/docs/meta.json +8 -0
  197. package/docs/content/docs/quick-start.mdx +103 -0
  198. package/docs/eslint.config.mjs +30 -0
  199. package/docs/next.config.ts +10 -0
  200. package/docs/package.json +42 -0
  201. package/docs/postcss.config.mjs +7 -0
  202. package/docs/public/file.svg +1 -0
  203. package/docs/public/globe.svg +1 -0
  204. package/docs/public/next.svg +1 -0
  205. package/docs/public/vercel.svg +1 -0
  206. package/docs/public/window.svg +1 -0
  207. package/docs/source.config.ts +11 -0
  208. package/docs/src/app/api/search/route.ts +4 -0
  209. package/docs/src/app/docs/[[...slug]]/page.tsx +53 -0
  210. package/docs/src/app/docs/layout.tsx +21 -0
  211. package/docs/src/app/globals.css +10 -0
  212. package/docs/src/app/icon.png +0 -0
  213. package/docs/src/app/layout.config.tsx +7 -0
  214. package/docs/src/app/layout.tsx +35 -0
  215. package/docs/src/app/page.tsx +489 -0
  216. package/docs/src/lib/source.ts +15 -0
  217. package/docs/src/mdx-components.tsx +18 -0
  218. package/docs/tsconfig.json +36 -0
  219. package/e2e/README.md +256 -0
  220. package/e2e/config.ts +51 -0
  221. package/e2e/discord.e2e.test.ts +252 -0
  222. package/e2e/helpers.ts +107 -0
  223. package/e2e/slack.e2e.test.ts +309 -0
  224. package/package.json +8 -4
  225. package/scripts/postbuild.ts +15 -0
  226. package/skills/agent-discord/SKILL.md +96 -30
  227. package/skills/agent-discord/references/authentication.md +27 -27
  228. package/skills/agent-discord/references/common-patterns.md +15 -15
  229. package/skills/agent-discord/templates/post-message.sh +6 -6
  230. package/skills/agent-discord/templates/{guild-summary.sh → server-summary.sh} +20 -20
  231. package/skills/agent-slack/SKILL.md +53 -0
  232. package/skills/agent-teams/SKILL.md +292 -0
  233. package/skills/agent-teams/references/authentication.md +375 -0
  234. package/skills/agent-teams/references/common-patterns.md +596 -0
  235. package/skills/agent-teams/templates/monitor-channel.sh +239 -0
  236. package/skills/agent-teams/templates/post-message.sh +224 -0
  237. package/skills/agent-teams/templates/team-summary.sh +210 -0
  238. package/src/cli.ts +4 -0
  239. package/src/platforms/discord/cli.ts +3 -3
  240. package/src/platforms/discord/client.test.ts +15 -15
  241. package/src/platforms/discord/client.ts +163 -17
  242. package/src/platforms/discord/commands/auth.test.ts +53 -37
  243. package/src/platforms/discord/commands/auth.ts +16 -16
  244. package/src/platforms/discord/commands/channel.test.ts +58 -46
  245. package/src/platforms/discord/commands/channel.ts +4 -4
  246. package/src/platforms/discord/commands/dm.test.ts +146 -0
  247. package/src/platforms/discord/commands/dm.ts +85 -0
  248. package/src/platforms/discord/commands/file.test.ts +40 -53
  249. package/src/platforms/discord/commands/friend.test.ts +134 -0
  250. package/src/platforms/discord/commands/friend.ts +45 -0
  251. package/src/platforms/discord/commands/index.ts +1 -1
  252. package/src/platforms/discord/commands/member.test.ts +98 -0
  253. package/src/platforms/discord/commands/member.ts +59 -0
  254. package/src/platforms/discord/commands/mention.test.ts +129 -0
  255. package/src/platforms/discord/commands/mention.ts +59 -0
  256. package/src/platforms/discord/commands/message.test.ts +139 -44
  257. package/src/platforms/discord/commands/message.ts +134 -1
  258. package/src/platforms/discord/commands/note.test.ts +84 -0
  259. package/src/platforms/discord/commands/note.ts +73 -0
  260. package/src/platforms/discord/commands/profile.test.ts +107 -0
  261. package/src/platforms/discord/commands/profile.ts +55 -0
  262. package/src/platforms/discord/commands/reaction.test.ts +54 -42
  263. package/src/platforms/discord/commands/server.test.ts +137 -0
  264. package/src/platforms/discord/commands/{guild.ts → server.ts} +31 -31
  265. package/src/platforms/discord/commands/snapshot.test.ts +1 -1
  266. package/src/platforms/discord/commands/snapshot.ts +10 -10
  267. package/src/platforms/discord/commands/thread.test.ts +121 -0
  268. package/src/platforms/discord/commands/thread.ts +92 -0
  269. package/src/platforms/discord/commands/user.test.ts +8 -8
  270. package/src/platforms/discord/commands/user.ts +16 -5
  271. package/src/platforms/discord/credential-manager.test.ts +137 -136
  272. package/src/platforms/discord/credential-manager.ts +35 -26
  273. package/src/platforms/discord/super-properties.ts +55 -0
  274. package/src/platforms/discord/token-extractor.test.ts +133 -383
  275. package/src/platforms/discord/token-extractor.ts +37 -3
  276. package/src/platforms/discord/types.test.ts +8 -8
  277. package/src/platforms/discord/types.ts +144 -8
  278. package/{tests → src/platforms/slack}/cli.test.ts +3 -3
  279. package/src/platforms/slack/cli.ts +10 -0
  280. package/{tests/slack-client.test.ts → src/platforms/slack/client.test.ts} +1 -1
  281. package/src/platforms/slack/client.ts +172 -1
  282. package/src/platforms/slack/commands/activity.test.ts +147 -0
  283. package/src/platforms/slack/commands/activity.ts +65 -0
  284. package/{tests → src/platforms/slack}/commands/auth.test.ts +25 -13
  285. package/{tests → src/platforms/slack}/commands/channel.test.ts +2 -2
  286. package/src/platforms/slack/commands/drafts.test.ts +136 -0
  287. package/src/platforms/slack/commands/drafts.ts +62 -0
  288. package/{tests → src/platforms/slack}/commands/file.test.ts +2 -2
  289. package/src/platforms/slack/commands/index.ts +5 -0
  290. package/{tests → src/platforms/slack}/commands/message.test.ts +2 -2
  291. package/{tests → src/platforms/slack}/commands/reaction.test.ts +1 -1
  292. package/src/platforms/slack/commands/saved.test.ts +140 -0
  293. package/src/platforms/slack/commands/saved.ts +71 -0
  294. package/src/platforms/slack/commands/sections.test.ts +80 -0
  295. package/src/platforms/slack/commands/sections.ts +50 -0
  296. package/{tests → src/platforms/slack}/commands/snapshot.test.ts +117 -105
  297. package/src/platforms/slack/commands/unread.test.ts +139 -0
  298. package/src/platforms/slack/commands/unread.ts +129 -0
  299. package/{tests → src/platforms/slack}/commands/user.test.ts +3 -3
  300. package/{tests → src/platforms/slack}/commands/workspace.test.ts +44 -95
  301. package/{tests → src/platforms/slack}/credential-manager.test.ts +2 -2
  302. package/src/platforms/slack/credential-manager.ts +22 -7
  303. package/src/platforms/slack/token-extractor-node-test.ts +40 -0
  304. package/src/platforms/slack/token-extractor-node.test.ts +10 -0
  305. package/src/platforms/slack/token-extractor.ts +93 -12
  306. package/{tests → src/platforms/slack}/types.test.ts +1 -1
  307. package/src/platforms/slack/types.ts +58 -0
  308. package/src/platforms/teams/cli.ts +36 -0
  309. package/src/platforms/teams/client.test.ts +500 -0
  310. package/src/platforms/teams/client.ts +365 -0
  311. package/src/platforms/teams/commands/auth.test.ts +99 -0
  312. package/src/platforms/teams/commands/auth.ts +232 -0
  313. package/src/platforms/teams/commands/channel.test.ts +147 -0
  314. package/src/platforms/teams/commands/channel.ts +129 -0
  315. package/src/platforms/teams/commands/file.test.ts +88 -0
  316. package/src/platforms/teams/commands/file.ts +144 -0
  317. package/src/platforms/teams/commands/index.ts +12 -0
  318. package/src/platforms/teams/commands/message.test.ts +110 -0
  319. package/src/platforms/teams/commands/message.ts +188 -0
  320. package/src/platforms/teams/commands/reaction.test.ts +87 -0
  321. package/src/platforms/teams/commands/reaction.ts +104 -0
  322. package/src/platforms/teams/commands/snapshot.test.ts +35 -0
  323. package/src/platforms/teams/commands/snapshot.ts +115 -0
  324. package/src/platforms/teams/commands/team.test.ts +157 -0
  325. package/src/platforms/teams/commands/team.ts +164 -0
  326. package/src/platforms/teams/commands/user.test.ts +83 -0
  327. package/src/platforms/teams/commands/user.ts +112 -0
  328. package/src/platforms/teams/credential-manager.test.ts +178 -0
  329. package/src/platforms/teams/credential-manager.ts +92 -0
  330. package/src/platforms/teams/index.ts +5 -0
  331. package/src/platforms/teams/token-extractor.test.ts +429 -0
  332. package/src/platforms/teams/token-extractor.ts +490 -0
  333. package/src/platforms/teams/types.test.ts +226 -0
  334. package/src/platforms/teams/types.ts +140 -0
  335. package/src/shared/utils/derived-key-cache.test.ts +136 -0
  336. package/src/shared/utils/derived-key-cache.ts +63 -0
  337. package/tsconfig.json +1 -1
  338. package/dist/cli.d.ts.map +0 -1
  339. package/dist/cli.js.map +0 -1
  340. package/dist/commands/auth.d.ts +0 -3
  341. package/dist/commands/auth.d.ts.map +0 -1
  342. package/dist/commands/auth.js +0 -140
  343. package/dist/commands/auth.js.map +0 -1
  344. package/dist/commands/channel.d.ts +0 -3
  345. package/dist/commands/channel.d.ts.map +0 -1
  346. package/dist/commands/channel.js +0 -118
  347. package/dist/commands/channel.js.map +0 -1
  348. package/dist/commands/file.d.ts +0 -3
  349. package/dist/commands/file.d.ts.map +0 -1
  350. package/dist/commands/file.js +0 -113
  351. package/dist/commands/file.js.map +0 -1
  352. package/dist/commands/index.d.ts.map +0 -1
  353. package/dist/commands/index.js.map +0 -1
  354. package/dist/commands/message.d.ts +0 -3
  355. package/dist/commands/message.d.ts.map +0 -1
  356. package/dist/commands/message.js +0 -214
  357. package/dist/commands/message.js.map +0 -1
  358. package/dist/commands/reaction.d.ts +0 -3
  359. package/dist/commands/reaction.d.ts.map +0 -1
  360. package/dist/commands/reaction.js +0 -100
  361. package/dist/commands/reaction.js.map +0 -1
  362. package/dist/commands/snapshot.d.ts +0 -3
  363. package/dist/commands/snapshot.d.ts.map +0 -1
  364. package/dist/commands/snapshot.js +0 -88
  365. package/dist/commands/snapshot.js.map +0 -1
  366. package/dist/commands/user.d.ts.map +0 -1
  367. package/dist/commands/user.js +0 -96
  368. package/dist/commands/user.js.map +0 -1
  369. package/dist/commands/workspace.d.ts +0 -3
  370. package/dist/commands/workspace.d.ts.map +0 -1
  371. package/dist/commands/workspace.js +0 -89
  372. package/dist/commands/workspace.js.map +0 -1
  373. package/dist/lib/credential-manager.d.ts +0 -13
  374. package/dist/lib/credential-manager.d.ts.map +0 -1
  375. package/dist/lib/credential-manager.js +0 -58
  376. package/dist/lib/credential-manager.js.map +0 -1
  377. package/dist/lib/index.d.ts +0 -3
  378. package/dist/lib/index.d.ts.map +0 -1
  379. package/dist/lib/index.js +0 -3
  380. package/dist/lib/index.js.map +0 -1
  381. package/dist/lib/ref-manager.d.ts +0 -26
  382. package/dist/lib/ref-manager.d.ts.map +0 -1
  383. package/dist/lib/ref-manager.js +0 -92
  384. package/dist/lib/ref-manager.js.map +0 -1
  385. package/dist/lib/slack-client.d.ts +0 -37
  386. package/dist/lib/slack-client.d.ts.map +0 -1
  387. package/dist/lib/slack-client.js +0 -379
  388. package/dist/lib/slack-client.js.map +0 -1
  389. package/dist/lib/token-extractor.d.ts +0 -28
  390. package/dist/lib/token-extractor.d.ts.map +0 -1
  391. package/dist/lib/token-extractor.js +0 -401
  392. package/dist/lib/token-extractor.js.map +0 -1
  393. package/dist/src/platforms/discord/client.test.d.ts +0 -2
  394. package/dist/src/platforms/discord/client.test.d.ts.map +0 -1
  395. package/dist/src/platforms/discord/client.test.js +0 -367
  396. package/dist/src/platforms/discord/client.test.js.map +0 -1
  397. package/dist/src/platforms/discord/commands/auth.test.d.ts +0 -2
  398. package/dist/src/platforms/discord/commands/auth.test.d.ts.map +0 -1
  399. package/dist/src/platforms/discord/commands/auth.test.js +0 -65
  400. package/dist/src/platforms/discord/commands/auth.test.js.map +0 -1
  401. package/dist/src/platforms/discord/commands/channel.test.d.ts +0 -2
  402. package/dist/src/platforms/discord/commands/channel.test.d.ts.map +0 -1
  403. package/dist/src/platforms/discord/commands/channel.test.js +0 -136
  404. package/dist/src/platforms/discord/commands/channel.test.js.map +0 -1
  405. package/dist/src/platforms/discord/commands/file.test.d.ts +0 -2
  406. package/dist/src/platforms/discord/commands/file.test.d.ts.map +0 -1
  407. package/dist/src/platforms/discord/commands/file.test.js +0 -83
  408. package/dist/src/platforms/discord/commands/file.test.js.map +0 -1
  409. package/dist/src/platforms/discord/commands/guild.test.d.ts +0 -2
  410. package/dist/src/platforms/discord/commands/guild.test.d.ts.map +0 -1
  411. package/dist/src/platforms/discord/commands/guild.test.js +0 -100
  412. package/dist/src/platforms/discord/commands/guild.test.js.map +0 -1
  413. package/dist/src/platforms/discord/commands/message.test.d.ts +0 -2
  414. package/dist/src/platforms/discord/commands/message.test.d.ts.map +0 -1
  415. package/dist/src/platforms/discord/commands/message.test.js +0 -91
  416. package/dist/src/platforms/discord/commands/message.test.js.map +0 -1
  417. package/dist/src/platforms/discord/commands/reaction.test.d.ts +0 -2
  418. package/dist/src/platforms/discord/commands/reaction.test.d.ts.map +0 -1
  419. package/dist/src/platforms/discord/commands/reaction.test.js +0 -115
  420. package/dist/src/platforms/discord/commands/reaction.test.js.map +0 -1
  421. package/dist/src/platforms/discord/commands/snapshot.test.d.ts +0 -2
  422. package/dist/src/platforms/discord/commands/snapshot.test.d.ts.map +0 -1
  423. package/dist/src/platforms/discord/commands/snapshot.test.js +0 -25
  424. package/dist/src/platforms/discord/commands/snapshot.test.js.map +0 -1
  425. package/dist/src/platforms/discord/commands/user.test.d.ts +0 -2
  426. package/dist/src/platforms/discord/commands/user.test.d.ts.map +0 -1
  427. package/dist/src/platforms/discord/commands/user.test.js +0 -103
  428. package/dist/src/platforms/discord/commands/user.test.js.map +0 -1
  429. package/dist/src/platforms/discord/credential-manager.test.d.ts +0 -2
  430. package/dist/src/platforms/discord/credential-manager.test.d.ts.map +0 -1
  431. package/dist/src/platforms/discord/credential-manager.test.js +0 -136
  432. package/dist/src/platforms/discord/credential-manager.test.js.map +0 -1
  433. package/dist/src/platforms/discord/token-extractor.test.d.ts +0 -2
  434. package/dist/src/platforms/discord/token-extractor.test.d.ts.map +0 -1
  435. package/dist/src/platforms/discord/token-extractor.test.js +0 -789
  436. package/dist/src/platforms/discord/token-extractor.test.js.map +0 -1
  437. package/dist/src/platforms/discord/types.test.d.ts +0 -2
  438. package/dist/src/platforms/discord/types.test.d.ts.map +0 -1
  439. package/dist/src/platforms/discord/types.test.js +0 -211
  440. package/dist/src/platforms/discord/types.test.js.map +0 -1
  441. package/dist/src/shared/utils/concurrency.test.d.ts +0 -2
  442. package/dist/src/shared/utils/concurrency.test.d.ts.map +0 -1
  443. package/dist/src/shared/utils/concurrency.test.js +0 -39
  444. package/dist/src/shared/utils/concurrency.test.js.map +0 -1
  445. package/dist/tests/cli.test.d.ts +0 -2
  446. package/dist/tests/cli.test.d.ts.map +0 -1
  447. package/dist/tests/cli.test.js +0 -83
  448. package/dist/tests/cli.test.js.map +0 -1
  449. package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/CURRENT +0 -1
  450. package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOCK +0 -0
  451. package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOG +0 -3
  452. package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOG.old +0 -1
  453. package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/MANIFEST-000004 +0 -0
  454. package/dist/tests/commands/auth.test.d.ts +0 -2
  455. package/dist/tests/commands/auth.test.d.ts.map +0 -1
  456. package/dist/tests/commands/auth.test.js +0 -304
  457. package/dist/tests/commands/auth.test.js.map +0 -1
  458. package/dist/tests/commands/channel.test.d.ts +0 -2
  459. package/dist/tests/commands/channel.test.d.ts.map +0 -1
  460. package/dist/tests/commands/channel.test.js +0 -166
  461. package/dist/tests/commands/channel.test.js.map +0 -1
  462. package/dist/tests/commands/file.test.d.ts +0 -2
  463. package/dist/tests/commands/file.test.d.ts.map +0 -1
  464. package/dist/tests/commands/file.test.js +0 -175
  465. package/dist/tests/commands/file.test.js.map +0 -1
  466. package/dist/tests/commands/message.test.d.ts +0 -2
  467. package/dist/tests/commands/message.test.d.ts.map +0 -1
  468. package/dist/tests/commands/message.test.js +0 -293
  469. package/dist/tests/commands/message.test.js.map +0 -1
  470. package/dist/tests/commands/reaction.test.d.ts +0 -2
  471. package/dist/tests/commands/reaction.test.d.ts.map +0 -1
  472. package/dist/tests/commands/reaction.test.js +0 -84
  473. package/dist/tests/commands/reaction.test.js.map +0 -1
  474. package/dist/tests/commands/snapshot.test.d.ts +0 -2
  475. package/dist/tests/commands/snapshot.test.d.ts.map +0 -1
  476. package/dist/tests/commands/snapshot.test.js +0 -280
  477. package/dist/tests/commands/snapshot.test.js.map +0 -1
  478. package/dist/tests/commands/user.test.d.ts +0 -2
  479. package/dist/tests/commands/user.test.d.ts.map +0 -1
  480. package/dist/tests/commands/user.test.js +0 -117
  481. package/dist/tests/commands/user.test.js.map +0 -1
  482. package/dist/tests/commands/workspace.test.d.ts +0 -2
  483. package/dist/tests/commands/workspace.test.d.ts.map +0 -1
  484. package/dist/tests/commands/workspace.test.js +0 -453
  485. package/dist/tests/commands/workspace.test.js.map +0 -1
  486. package/dist/tests/credential-manager.test.d.ts +0 -2
  487. package/dist/tests/credential-manager.test.d.ts.map +0 -1
  488. package/dist/tests/credential-manager.test.js +0 -199
  489. package/dist/tests/credential-manager.test.js.map +0 -1
  490. package/dist/tests/slack-client.test.d.ts +0 -2
  491. package/dist/tests/slack-client.test.d.ts.map +0 -1
  492. package/dist/tests/slack-client.test.js +0 -741
  493. package/dist/tests/slack-client.test.js.map +0 -1
  494. package/dist/tests/types.test.d.ts +0 -2
  495. package/dist/tests/types.test.d.ts.map +0 -1
  496. package/dist/tests/types.test.js +0 -215
  497. package/dist/tests/types.test.js.map +0 -1
  498. package/dist/types/index.d.ts +0 -369
  499. package/dist/types/index.d.ts.map +0 -1
  500. package/dist/types/index.js +0 -92
  501. package/dist/types/index.js.map +0 -1
  502. package/dist/utils/error-handler.d.ts +0 -2
  503. package/dist/utils/error-handler.d.ts.map +0 -1
  504. package/dist/utils/error-handler.js +0 -5
  505. package/dist/utils/error-handler.js.map +0 -1
  506. package/dist/utils/output.d.ts +0 -2
  507. package/dist/utils/output.d.ts.map +0 -1
  508. package/dist/utils/output.js +0 -4
  509. package/dist/utils/output.js.map +0 -1
  510. package/src/platforms/discord/commands/guild.test.ts +0 -117
  511. /package/dist/{cli.d.ts → src/platforms/teams/cli.d.ts} +0 -0
  512. /package/dist/{commands → src/platforms/teams/commands}/user.d.ts +0 -0
@@ -0,0 +1,98 @@
1
+ ---
2
+ title: Agent Skills
3
+ description: Teach your AI agent how to use Agent Messenger CLIs effectively.
4
+ icon: Hexagon
5
+ ---
6
+
7
+ Agent Skills are instruction files that teach AI coding agents how to use tools effectively. Agent Messenger includes skills for Slack, Discord, and Teams.
8
+
9
+ ## What Are Agent Skills?
10
+
11
+ When you give an AI agent access to a CLI tool, it needs to know:
12
+ - What commands are available
13
+ - How to format arguments
14
+ - What output to expect
15
+ - Best practices and common patterns
16
+
17
+ Agent Skills provide this knowledge in a structured format that AI agents can understand.
18
+
19
+ ## Installation
20
+
21
+ ### Skills CLI
22
+
23
+ The fastest way to add Agent Messenger skills to your project:
24
+
25
+ ```bash
26
+ npx skills add devxoul/agent-messenger
27
+ ```
28
+
29
+ This adds the skill files to your project's `.skills/` directory.
30
+
31
+ ### Claude Code
32
+
33
+ Add Agent Messenger skills to Claude Code:
34
+
35
+ ```bash
36
+ # From terminal
37
+ claude plugin marketplace add devxoul/agent-messenger
38
+ claude plugin install agent-messenger
39
+ ```
40
+
41
+ Or from within Claude Code:
42
+
43
+ ```
44
+ /plugin marketplace add devxoul/agent-messenger
45
+ /plugin install agent-messenger
46
+ ```
47
+
48
+ ### OpenCode
49
+
50
+ Add to your `opencode.jsonc`:
51
+
52
+ ```jsonc
53
+ {
54
+ "plugins": [
55
+ "agent-messenger@1.1.0"
56
+ ]
57
+ }
58
+ ```
59
+
60
+ ## How It Works
61
+
62
+ Once installed, your AI agent can:
63
+
64
+ 1. **Understand the CLI** - Know what commands exist and how to use them
65
+ 2. **Extract credentials** - Run `agent-slack auth extract` automatically
66
+ 3. **Send messages** - Compose and send messages on your behalf
67
+ 4. **Read context** - Get workspace snapshots to understand conversations
68
+ 5. **React appropriately** - Add reactions, reply in threads, etc.
69
+
70
+ ## Example Interaction
71
+
72
+ With Agent Messenger skills installed, you can ask your AI agent:
73
+
74
+ > "Send a message to #general saying the build passed"
75
+
76
+ The agent will:
77
+ 1. Check if credentials are configured
78
+ 2. Run `agent-slack auth extract` if needed
79
+ 3. Execute `agent-slack message send general "The build passed"`
80
+ 4. Confirm the message was sent
81
+
82
+ ## Skill Contents
83
+
84
+ Each platform skill includes:
85
+
86
+ | Section | Description |
87
+ |---------|-------------|
88
+ | **Authentication** | How to extract and manage tokens |
89
+ | **Commands** | Full command reference with examples |
90
+ | **Output Format** | Expected JSON structure for parsing |
91
+ | **Error Handling** | Common errors and how to recover |
92
+ | **Best Practices** | Tips for reliable agent workflows |
93
+
94
+ ## Learn More
95
+
96
+ - [Agent Skills Documentation](https://agentskills.io/)
97
+ - [Skills CLI](https://skills.sh/)
98
+ - [GitHub Repository](https://github.com/devxoul/agent-messenger)
@@ -0,0 +1,124 @@
1
+ ---
2
+ title: What is Agent Messenger?
3
+ description: Give your AI agent the power to read and send messages across Slack, Discord, Teams and more
4
+ icon: Info
5
+ ---
6
+
7
+ Agent Messenger is a unified, agent-friendly CLI for messaging platforms. It automatically extracts credentials from your desktop apps—no OAuth flows, no API keys, no admin approval needed.
8
+
9
+ ## Why Agent Messenger?
10
+
11
+ ### For AI Agents
12
+
13
+ AI agents need to communicate with humans through messaging platforms. But integrating with Slack, Discord, or Teams traditionally requires:
14
+
15
+ - **OAuth setup** - Creating apps, getting admin approval, managing tokens
16
+ - **API keys** - Storing secrets, handling rotation, security concerns
17
+ - **Platform-specific code** - Learning different APIs for each platform
18
+
19
+ Agent Messenger eliminates all of this. Your agent can start sending messages in seconds.
20
+
21
+ ### For Developers
22
+
23
+ Building AI-powered workflows that interact with messaging platforms shouldn't require a week of OAuth debugging. Agent Messenger provides:
24
+
25
+ - **Zero configuration** - Extract tokens from your existing desktop apps
26
+ - **Unified interface** - Same commands work across all platforms
27
+ - **JSON output** - Perfect for piping into other tools or LLMs
28
+
29
+ ## How It Works
30
+
31
+ Agent Messenger reads authentication tokens directly from your installed desktop apps (Slack, Discord, Teams). These apps store session tokens locally, and Agent Messenger safely extracts them.
32
+
33
+ ```bash
34
+ # Extract credentials from Slack desktop app
35
+ agent-slack auth extract
36
+
37
+ # That's it! Now you can send messages
38
+ agent-slack message send general "Hello from my AI agent!"
39
+ ```
40
+
41
+ No app creation. No admin approval. No waiting.
42
+
43
+ ## Key Features
44
+
45
+ | Feature | Description |
46
+ |---------|-------------|
47
+ | **Auto-extraction** | Pulls tokens from desktop apps automatically |
48
+ | **Multi-platform** | Slack, Discord, and Microsoft Teams |
49
+ | **Multi-workspace** | Switch between workspaces/servers easily |
50
+ | **JSON output** | Machine-readable by default, `--pretty` for humans |
51
+ | **Comprehensive** | Messages, channels, users, reactions, files |
52
+
53
+ ## Why Not MCP?
54
+
55
+ The Model Context Protocol (MCP) is a popular way to give AI agents access to external tools. But it has a fundamental problem: **context bloat**.
56
+
57
+ MCP servers expose all their tools at once. When you connect an MCP server with 50 tools, your AI agent's context window fills up with 50 tool descriptions—even if it only needs one.
58
+
59
+ **Agent Skills + CLI is better:**
60
+
61
+ | MCP Approach | Agent Skills Approach |
62
+ |--------------|----------------------|
63
+ | All tools loaded at once | Load only what you need |
64
+ | Bloated context window | Minimal token usage |
65
+ | Agent confused by options | Focused, relevant tools |
66
+ | Static tool definitions | Dynamic skill loading |
67
+
68
+ With Agent Messenger, your AI agent loads the skill it needs, uses the CLI, and moves on. No wasted tokens.
69
+
70
+ ## Why Not OAuth?
71
+
72
+ Traditional Slack/Discord/Teams integrations require OAuth:
73
+
74
+ 1. Create an app in the platform's developer portal
75
+ 2. Configure OAuth scopes and redirect URLs
76
+ 3. Submit for workspace admin approval
77
+ 4. Wait days (or weeks) for approval
78
+ 5. Handle token refresh, storage, and rotation
79
+
80
+ **Agent Messenger skips all of this.**
81
+
82
+ Your desktop apps already have valid session tokens. Agent Messenger extracts them directly, so you can start sending messages immediately.
83
+
84
+ ### When OAuth Makes Sense
85
+
86
+ OAuth is better when you need:
87
+ - **Server-side bots** - Running 24/7 without your desktop app
88
+ - **Multi-user applications** - Many users authenticating separately
89
+ - **Granular permissions** - Fine-tuned access control
90
+
91
+ Bot support is on our roadmap for these use cases.
92
+
93
+ ## Design Principles
94
+
95
+ ### Zero Configuration
96
+
97
+ The best setup is no setup. Agent Messenger should work the moment you install it.
98
+
99
+ ### AI-First, Human-Friendly
100
+
101
+ Default output is JSON for machines. Add `--pretty` for humans. Both are first-class citizens.
102
+
103
+ ### Unified Interface
104
+
105
+ Learn once, use everywhere. The same commands work across Slack, Discord, and Teams.
106
+
107
+ ### Fail Fast, Fail Clear
108
+
109
+ When something goes wrong, tell the user exactly what and how to fix it. No cryptic error codes.
110
+
111
+ ### Respect Privacy
112
+
113
+ Tokens stay on your machine. Nothing is sent to external servers. Your credentials are yours.
114
+
115
+ ## Next Steps
116
+
117
+ - [Quick Start](/docs/quick-start) - Get running in 30 seconds
118
+ - [Slack](/docs/integrations/slack) - Full Slack command reference
119
+ - [Discord](/docs/integrations/discord) - Full Discord command reference
120
+ - [Teams](/docs/integrations/teams) - Full Teams command reference
121
+
122
+ ## Inspiration
123
+
124
+ Agent Messenger is inspired by [agent-browser](https://github.com/vercel-labs/agent-browser) from Vercel Labs, which takes a similar approach to browser automation for AI agents.
@@ -1,8 +1,9 @@
1
- # Discord Integration
1
+ ---
2
+ title: Discord
3
+ description: Complete reference for the agent-discord CLI.
4
+ ---
2
5
 
3
- Detailed documentation for Discord integration in agent-messenger.
4
-
5
- > **Note**: `agent-discord` is a convenient shortcut for `agent-messenger discord`.
6
+ > **Tip**: `agent-discord` is a shortcut for `agent-messenger discord`.
6
7
 
7
8
  ## Quick Start
8
9
 
@@ -10,7 +11,7 @@ Detailed documentation for Discord integration in agent-messenger.
10
11
  # 1. Extract credentials from Discord desktop app (zero-config!)
11
12
  agent-discord auth extract
12
13
 
13
- # 2. Get guild snapshot
14
+ # 2. Get server snapshot
14
15
  agent-discord snapshot
15
16
 
16
17
  # 3. Send a message
@@ -34,7 +35,7 @@ This command:
34
35
  - Auto-detects your platform (macOS/Linux/Windows)
35
36
  - Extracts Discord user token from the desktop app
36
37
  - Validates token against Discord API
37
- - Discovers ALL joined guilds (servers)
38
+ - Discovers ALL joined servers
38
39
  - Stores credentials securely in `~/.config/agent-messenger/`
39
40
 
40
41
  ### Authentication Commands
@@ -47,22 +48,22 @@ agent-discord auth status
47
48
  agent-discord auth logout
48
49
  ```
49
50
 
50
- ## Guild Management
51
+ ## Server Management
51
52
 
52
- Discord uses "guilds" (servers) instead of workspaces. You must select a guild before using most commands.
53
+ You must select a server before using most commands.
53
54
 
54
55
  ```bash
55
- # List all guilds
56
- agent-discord guild list
56
+ # List all servers
57
+ agent-discord server list
57
58
 
58
- # Switch to a different guild
59
- agent-discord guild switch <guild-id>
59
+ # Switch to a different server
60
+ agent-discord server switch <server-id>
60
61
 
61
- # Show current guild
62
- agent-discord guild current
62
+ # Show current server
63
+ agent-discord server current
63
64
 
64
- # Get guild info
65
- agent-discord guild info <guild-id>
65
+ # Get server info
66
+ agent-discord server info <server-id>
66
67
  ```
67
68
 
68
69
  ## Commands
@@ -83,12 +84,36 @@ agent-discord message get <channel-id> <message-id>
83
84
 
84
85
  # Delete a message
85
86
  agent-discord message delete <channel-id> <message-id> --force
87
+
88
+ # Search messages in current server
89
+ agent-discord message search <query>
90
+ agent-discord message search "bug fix"
91
+
92
+ # Search with filters
93
+ agent-discord message search "meeting" --channel 123456789
94
+ agent-discord message search "report" --author 987654321
95
+ agent-discord message search "screenshot" --has image
96
+
97
+ # Search with sorting and pagination
98
+ agent-discord message search "hello" --sort timestamp --sort-dir desc
99
+ agent-discord message search "test" --limit 10 --offset 20
86
100
  ```
87
101
 
102
+ **Search Options:**
103
+ - `--channel <id>` - Filter by specific channel
104
+ - `--author <id>` - Filter by specific author
105
+ - `--has <type>` - Filter by attachment type: `file`, `image`, `video`, `embed`, `link`, `sticker`
106
+ - `--sort <type>` - Sort by: `timestamp` (default), `relevance`
107
+ - `--sort-dir <dir>` - Sort direction: `asc`, `desc` (default)
108
+ - `--limit <n>` - Number of results (max 25, default 25)
109
+ - `--offset <n>` - Pagination offset (default 0)
110
+
111
+ > **Note:** Search requires a current server to be set. Use `agent-discord server switch <server-id>` first.
112
+
88
113
  ### Channel Commands
89
114
 
90
115
  ```bash
91
- # List channels in current guild
116
+ # List channels in current server
92
117
  agent-discord channel list
93
118
 
94
119
  # Get channel info
@@ -102,7 +127,7 @@ agent-discord channel history 123456789 --limit 100
102
127
  ### User Commands
103
128
 
104
129
  ```bash
105
- # List guild members
130
+ # List server members
106
131
  agent-discord user list
107
132
 
108
133
  # Get user info
@@ -142,7 +167,7 @@ agent-discord file info <channel-id> <file-id>
142
167
 
143
168
  ### Snapshot Command
144
169
 
145
- Get comprehensive guild state for AI agents:
170
+ Get comprehensive server state for AI agents:
146
171
 
147
172
  ```bash
148
173
  # Full snapshot (channels, members, recent messages)
@@ -162,14 +187,14 @@ All commands support these options:
162
187
 
163
188
  ```bash
164
189
  --pretty # Pretty-print JSON output (default is compact JSON)
165
- --guild <id> # Use specific guild (overrides current guild)
190
+ --server <id> # Use specific server (overrides current server)
166
191
  ```
167
192
 
168
193
  ## Key Differences from Slack
169
194
 
170
195
  | Concept | Slack | Discord |
171
196
  |---------|-------|---------|
172
- | Server | Workspace | Guild |
197
+ | Server | Workspace | Server |
173
198
  | Channel ID | Alphanumeric (C01234567) | Numeric snowflake (123456789012345678) |
174
199
  | Message ID | Timestamp (1234567890.123456) | Numeric snowflake (123456789012345678) |
175
200
  | User ID | Alphanumeric (U01234567) | Numeric snowflake (123456789012345678) |
@@ -0,0 +1,5 @@
1
+ {
2
+ "title": "Integrations",
3
+ "icon": "Plug",
4
+ "pages": ["slack", "discord", "teams"]
5
+ }
@@ -1,8 +1,9 @@
1
- # Slack Integration
1
+ ---
2
+ title: Slack
3
+ description: Complete reference for the agent-slack CLI.
4
+ ---
2
5
 
3
- Detailed documentation for Slack integration in agent-messenger.
4
-
5
- > **Note**: `agent-slack` is a convenient shortcut for `agent-messenger slack`.
6
+ > **Tip**: `agent-slack` is a shortcut for `agent-messenger slack`.
6
7
 
7
8
  ## Quick Start
8
9
 
@@ -0,0 +1,322 @@
1
+ ---
2
+ title: Teams
3
+ description: Complete reference for the agent-teams CLI.
4
+ ---
5
+
6
+ > **Tip**: `agent-teams` is a shortcut for `agent-messenger teams`.
7
+
8
+ ## Quick Start
9
+
10
+ ```bash
11
+ # 1. Extract credentials from Teams desktop app (zero-config!)
12
+ agent-teams auth extract
13
+
14
+ # 2. Get team snapshot
15
+ agent-teams snapshot
16
+
17
+ # 3. Send a message
18
+ agent-teams message send <channel-id> "Hello from AI agent!"
19
+ ```
20
+
21
+ ## Authentication
22
+
23
+ ### Seamless Token Extraction
24
+
25
+ agent-teams automatically extracts your Microsoft Teams credentials from the desktop app:
26
+
27
+ ```bash
28
+ agent-teams auth extract
29
+
30
+ # Use --debug for troubleshooting
31
+ agent-teams auth extract --debug
32
+ ```
33
+
34
+ This command:
35
+ - Auto-detects your platform (macOS/Linux/Windows)
36
+ - Extracts Teams access token from the desktop app
37
+ - Validates token against Teams API
38
+ - Discovers ALL joined teams
39
+ - Stores credentials securely in `~/.config/agent-messenger/`
40
+
41
+ ### ⚠️ TOKEN EXPIRY WARNING
42
+
43
+ **Teams tokens expire in 60-90 minutes!** Unlike Slack and Discord tokens which last much longer, Microsoft Teams uses short-lived OAuth tokens.
44
+
45
+ ```bash
46
+ # Check if your token is still valid
47
+ agent-teams auth status
48
+
49
+ # Re-extract when expired (just run extract again)
50
+ agent-teams auth extract
51
+ ```
52
+
53
+ **Best practices for AI agents:**
54
+ - Always check `auth status` before operations
55
+ - Re-run `auth extract` if you get 401 errors
56
+ - Consider automating token refresh in long-running workflows
57
+
58
+ ### Authentication Commands
59
+
60
+ ```bash
61
+ # Check auth status (shows expiry time!)
62
+ agent-teams auth status
63
+
64
+ # Logout (clear stored credentials)
65
+ agent-teams auth logout
66
+ ```
67
+
68
+ ### Supported Teams Versions
69
+
70
+ agent-teams supports both **New Teams** (WebView2-based, com.microsoft.teams2) and **Classic Teams**:
71
+
72
+ | Version | macOS | Windows | Linux |
73
+ |---------|:-----:|:-------:|:-----:|
74
+ | New Teams | ✅ | ✅ | N/A |
75
+ | Classic Teams | ✅ | ✅ | ✅ |
76
+
77
+ ### Manual Token Input (Last Resort)
78
+
79
+ If automatic extraction fails, you can manually provide a token:
80
+
81
+ ```bash
82
+ agent-teams auth extract --token <your-skype-token>
83
+ ```
84
+
85
+ **How to get your token manually:**
86
+
87
+ 1. Open Microsoft Teams in your browser (teams.microsoft.com)
88
+ 2. Open Developer Tools (F12 or Cmd+Option+I)
89
+ 3. Go to **Application** > **Cookies** > `https://teams.microsoft.com`
90
+ 4. Find the cookie named `skypetoken_asm`
91
+ 5. Copy the **Value** (it's a long string starting with `eyJ...`)
92
+ 6. Run: `agent-teams auth extract --token "eyJ..."`
93
+
94
+ > **Note**: Browser tokens also expire in 60-90 minutes. For long-running workflows, you may need to refresh periodically.
95
+
96
+ ## Team Management
97
+
98
+ Teams uses "teams" as the top-level organizational unit. You must select a team before using most commands.
99
+
100
+ ```bash
101
+ # List all teams
102
+ agent-teams team list
103
+
104
+ # Switch to a different team
105
+ agent-teams team switch <team-id>
106
+
107
+ # Show current team
108
+ agent-teams team current
109
+
110
+ # Get team info
111
+ agent-teams team info <team-id>
112
+ ```
113
+
114
+ ## Commands
115
+
116
+ ### Message Commands
117
+
118
+ ```bash
119
+ # Send a message
120
+ agent-teams message send <channel-id> <content>
121
+ agent-teams message send abc123-def456 "Hello world"
122
+
123
+ # List messages
124
+ agent-teams message list <channel-id>
125
+ agent-teams message list abc123-def456 --limit 50
126
+
127
+ # Get a specific message
128
+ agent-teams message get <channel-id> <message-id>
129
+
130
+ # Delete a message
131
+ agent-teams message delete <channel-id> <message-id> --force
132
+
133
+ # Reply to a message (thread)
134
+ agent-teams message reply <channel-id> <message-id> "Reply content"
135
+ ```
136
+
137
+ ### Channel Commands
138
+
139
+ ```bash
140
+ # List channels in current team
141
+ agent-teams channel list
142
+
143
+ # Get channel info
144
+ agent-teams channel info <channel-id>
145
+
146
+ # Get channel message history
147
+ agent-teams channel history <channel-id>
148
+ agent-teams channel history abc123-def456 --limit 100
149
+ ```
150
+
151
+ ### User Commands
152
+
153
+ ```bash
154
+ # List team members
155
+ agent-teams user list
156
+
157
+ # Get user info
158
+ agent-teams user info <user-id>
159
+
160
+ # Get current authenticated user
161
+ agent-teams user me
162
+ ```
163
+
164
+ ### Reaction Commands
165
+
166
+ ```bash
167
+ # Add reaction
168
+ agent-teams reaction add <channel-id> <message-id> <emoji>
169
+ agent-teams reaction add abc123-def456 msg789 like
170
+
171
+ # Remove reaction
172
+ agent-teams reaction remove <channel-id> <message-id> <emoji>
173
+
174
+ # List reactions on a message
175
+ agent-teams reaction list <channel-id> <message-id>
176
+ ```
177
+
178
+ ### File Commands
179
+
180
+ ```bash
181
+ # Upload file to channel
182
+ agent-teams file upload <channel-id> <path>
183
+ agent-teams file upload abc123-def456 ./report.pdf
184
+
185
+ # List files in channel
186
+ agent-teams file list <channel-id>
187
+
188
+ # Get file info
189
+ agent-teams file info <channel-id> <file-id>
190
+
191
+ # Download file
192
+ agent-teams file download <file-id> <output-path>
193
+ ```
194
+
195
+ ### Snapshot Command
196
+
197
+ Get comprehensive team state for AI agents:
198
+
199
+ ```bash
200
+ # Full snapshot (channels, members, recent messages)
201
+ agent-teams snapshot
202
+
203
+ # Filtered snapshots
204
+ agent-teams snapshot --channels-only
205
+ agent-teams snapshot --users-only
206
+
207
+ # Limit messages per channel
208
+ agent-teams snapshot --limit 10
209
+ ```
210
+
211
+ ## Global Options
212
+
213
+ All commands support these options:
214
+
215
+ ```bash
216
+ --pretty # Pretty-print JSON output (default is compact JSON)
217
+ --team <id> # Use specific team (overrides current team)
218
+ ```
219
+
220
+ ## Key Differences: Teams vs Discord vs Slack
221
+
222
+ | Concept | Slack | Discord | Teams |
223
+ |---------|-------|---------|-------|
224
+ | Server/Workspace | Workspace | Guild | Team |
225
+ | Channel ID format | Alphanumeric (C01234567) | Numeric snowflake | UUID (abc123-def456-...) |
226
+ | Message ID format | Timestamp (1234567890.123456) | Numeric snowflake | UUID |
227
+ | User ID format | Alphanumeric (U01234567) | Numeric snowflake | UUID (Azure AD Object ID) |
228
+ | Token lifetime | Long-lived | Long-lived | **60-90 minutes** |
229
+ | API | Slack Web API | Discord API | Teams Messaging API |
230
+ | Threads | Thread timestamps | Thread channels | Reply chains |
231
+ | Rate limits | Moderate | Moderate | Strict |
232
+
233
+ ## Troubleshooting
234
+
235
+ ### Token Expired (401 Unauthorized)
236
+
237
+ ```bash
238
+ # Teams tokens expire in 60-90 minutes! To refresh:
239
+ # 1. Open Microsoft Teams desktop app
240
+ # 2. Send any message (this refreshes your session cookies)
241
+ # 3. Re-extract:
242
+ agent-teams auth extract
243
+ ```
244
+
245
+ ### "No teams found"
246
+
247
+ Ensure you're a member of at least one team in the Teams desktop app, then:
248
+ ```bash
249
+ agent-teams auth extract --debug
250
+ ```
251
+
252
+ ### "Channel not found"
253
+
254
+ Teams channel IDs are UUIDs. Make sure you're using the full ID:
255
+ ```bash
256
+ # Get channel list to find correct IDs
257
+ agent-teams channel list --pretty
258
+ ```
259
+
260
+ ### Rate Limiting (429 Too Many Requests)
261
+
262
+ Teams API has strict rate limits. Wait and retry:
263
+ ```bash
264
+ # Add delays between operations in scripts
265
+ sleep 2
266
+ ```
267
+
268
+ ### Desktop App Not Detected
269
+
270
+ Ensure Teams desktop app is:
271
+ 1. Installed (not just web version)
272
+ 2. Currently running
273
+ 3. Signed in to your account
274
+
275
+ ```bash
276
+ # Debug extraction
277
+ agent-teams auth extract --debug
278
+ ```
279
+
280
+ ### Permission Errors
281
+
282
+ Some operations require specific Microsoft 365 permissions. Check with your IT admin if you encounter persistent 403 errors.
283
+
284
+ ## AI Agent Integration
285
+
286
+ See `skills/agent-messenger/` directory for:
287
+ - Complete skill documentation
288
+ - Runnable templates
289
+
290
+ ### Example: AI Agent Workflow
291
+
292
+ ```bash
293
+ #!/bin/bash
294
+ # Example: Daily standup automation
295
+
296
+ # 1. Check auth (re-extract if needed)
297
+ if ! agent-teams auth status | grep -q "valid"; then
298
+ agent-teams auth extract
299
+ fi
300
+
301
+ # 2. Get team context
302
+ agent-teams snapshot --limit 5 > /tmp/teams-context.json
303
+
304
+ # 3. Send standup reminder
305
+ agent-teams message send $STANDUP_CHANNEL "🌅 Good morning! Time for standup."
306
+ ```
307
+
308
+ ### Token Refresh Pattern for Long-Running Agents
309
+
310
+ ```bash
311
+ # Wrapper function for token-aware operations
312
+ teams_cmd() {
313
+ # Check token validity
314
+ if ! agent-teams auth status 2>/dev/null | grep -q "valid"; then
315
+ agent-teams auth extract
316
+ fi
317
+ agent-teams "$@"
318
+ }
319
+
320
+ # Usage
321
+ teams_cmd message send $CHANNEL "Hello!"
322
+ ```
@@ -0,0 +1,8 @@
1
+ {
2
+ "pages": [
3
+ "index",
4
+ "quick-start",
5
+ "integrations",
6
+ "agent-skills"
7
+ ]
8
+ }