agent-messenger 1.0.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.
- package/.claude/commands/release.md +92 -0
- package/.claude-plugin/README.md +144 -0
- package/.claude-plugin/marketplace.json +37 -0
- package/.claude-plugin/plugin.json +17 -0
- package/.github/workflows/ci.yml +30 -0
- package/CLAUDE.md +106 -0
- package/CONTRIBUTING.md +131 -0
- package/README.md +140 -0
- package/biome.json +34 -0
- package/bun.lock +252 -0
- package/dist/cli.d.ts +5 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +21 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +140 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/channel.d.ts +3 -0
- package/dist/commands/channel.d.ts.map +1 -0
- package/dist/commands/channel.js +118 -0
- package/dist/commands/channel.js.map +1 -0
- package/dist/commands/file.d.ts +3 -0
- package/dist/commands/file.d.ts.map +1 -0
- package/dist/commands/file.js +113 -0
- package/dist/commands/file.js.map +1 -0
- package/dist/commands/index.d.ts +9 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +9 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/message.d.ts +3 -0
- package/dist/commands/message.d.ts.map +1 -0
- package/dist/commands/message.js +214 -0
- package/dist/commands/message.js.map +1 -0
- package/dist/commands/reaction.d.ts +3 -0
- package/dist/commands/reaction.d.ts.map +1 -0
- package/dist/commands/reaction.js +100 -0
- package/dist/commands/reaction.js.map +1 -0
- package/dist/commands/snapshot.d.ts +3 -0
- package/dist/commands/snapshot.d.ts.map +1 -0
- package/dist/commands/snapshot.js +88 -0
- package/dist/commands/snapshot.js.map +1 -0
- package/dist/commands/user.d.ts +3 -0
- package/dist/commands/user.d.ts.map +1 -0
- package/dist/commands/user.js +96 -0
- package/dist/commands/user.js.map +1 -0
- package/dist/commands/workspace.d.ts +3 -0
- package/dist/commands/workspace.d.ts.map +1 -0
- package/dist/commands/workspace.js +89 -0
- package/dist/commands/workspace.js.map +1 -0
- package/dist/lib/credential-manager.d.ts +13 -0
- package/dist/lib/credential-manager.d.ts.map +1 -0
- package/dist/lib/credential-manager.js +58 -0
- package/dist/lib/credential-manager.js.map +1 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +3 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/ref-manager.d.ts +26 -0
- package/dist/lib/ref-manager.d.ts.map +1 -0
- package/dist/lib/ref-manager.js +92 -0
- package/dist/lib/ref-manager.js.map +1 -0
- package/dist/lib/slack-client.d.ts +37 -0
- package/dist/lib/slack-client.d.ts.map +1 -0
- package/dist/lib/slack-client.js +379 -0
- package/dist/lib/slack-client.js.map +1 -0
- package/dist/lib/token-extractor.d.ts +28 -0
- package/dist/lib/token-extractor.d.ts.map +1 -0
- package/dist/lib/token-extractor.js +401 -0
- package/dist/lib/token-extractor.js.map +1 -0
- package/dist/package.json +37 -0
- package/dist/src/cli.d.ts +5 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +22 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/platforms/discord/cli.d.ts +5 -0
- package/dist/src/platforms/discord/cli.d.ts.map +1 -0
- package/dist/src/platforms/discord/cli.js +22 -0
- package/dist/src/platforms/discord/cli.js.map +1 -0
- package/dist/src/platforms/discord/client.d.ts +34 -0
- package/dist/src/platforms/discord/client.d.ts.map +1 -0
- package/dist/src/platforms/discord/client.js +187 -0
- package/dist/src/platforms/discord/client.js.map +1 -0
- package/dist/src/platforms/discord/client.test.d.ts +2 -0
- package/dist/src/platforms/discord/client.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/client.test.js +367 -0
- package/dist/src/platforms/discord/client.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/auth.d.ts +13 -0
- package/dist/src/platforms/discord/commands/auth.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/auth.js +155 -0
- package/dist/src/platforms/discord/commands/auth.js.map +1 -0
- package/dist/src/platforms/discord/commands/auth.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/auth.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/auth.test.js +65 -0
- package/dist/src/platforms/discord/commands/auth.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/channel.d.ts +13 -0
- package/dist/src/platforms/discord/commands/channel.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/channel.js +99 -0
- package/dist/src/platforms/discord/commands/channel.js.map +1 -0
- package/dist/src/platforms/discord/commands/channel.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/channel.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/channel.test.js +136 -0
- package/dist/src/platforms/discord/commands/channel.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/file.d.ts +13 -0
- package/dist/src/platforms/discord/commands/file.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/file.js +99 -0
- package/dist/src/platforms/discord/commands/file.js.map +1 -0
- package/dist/src/platforms/discord/commands/file.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/file.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/file.test.js +83 -0
- package/dist/src/platforms/discord/commands/file.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/guild.d.ts +15 -0
- package/dist/src/platforms/discord/commands/guild.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/guild.js +102 -0
- package/dist/src/platforms/discord/commands/guild.js.map +1 -0
- package/dist/src/platforms/discord/commands/guild.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/guild.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/guild.test.js +100 -0
- package/dist/src/platforms/discord/commands/guild.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/index.d.ts +9 -0
- package/dist/src/platforms/discord/commands/index.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/index.js +9 -0
- package/dist/src/platforms/discord/commands/index.js.map +1 -0
- package/dist/src/platforms/discord/commands/message.d.ts +17 -0
- package/dist/src/platforms/discord/commands/message.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/message.js +131 -0
- package/dist/src/platforms/discord/commands/message.js.map +1 -0
- package/dist/src/platforms/discord/commands/message.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/message.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/message.test.js +91 -0
- package/dist/src/platforms/discord/commands/message.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/reaction.d.ts +12 -0
- package/dist/src/platforms/discord/commands/reaction.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/reaction.js +99 -0
- package/dist/src/platforms/discord/commands/reaction.js.map +1 -0
- package/dist/src/platforms/discord/commands/reaction.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/reaction.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/reaction.test.js +115 -0
- package/dist/src/platforms/discord/commands/reaction.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/snapshot.d.ts +9 -0
- package/dist/src/platforms/discord/commands/snapshot.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/snapshot.js +80 -0
- package/dist/src/platforms/discord/commands/snapshot.js.map +1 -0
- package/dist/src/platforms/discord/commands/snapshot.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/snapshot.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/snapshot.test.js +25 -0
- package/dist/src/platforms/discord/commands/snapshot.test.js.map +1 -0
- package/dist/src/platforms/discord/commands/user.d.ts +3 -0
- package/dist/src/platforms/discord/commands/user.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/user.js +94 -0
- package/dist/src/platforms/discord/commands/user.js.map +1 -0
- package/dist/src/platforms/discord/commands/user.test.d.ts +2 -0
- package/dist/src/platforms/discord/commands/user.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/commands/user.test.js +103 -0
- package/dist/src/platforms/discord/commands/user.test.js.map +1 -0
- package/dist/src/platforms/discord/credential-manager.d.ts +33 -0
- package/dist/src/platforms/discord/credential-manager.d.ts.map +1 -0
- package/dist/src/platforms/discord/credential-manager.js +73 -0
- package/dist/src/platforms/discord/credential-manager.js.map +1 -0
- package/dist/src/platforms/discord/credential-manager.test.d.ts +2 -0
- package/dist/src/platforms/discord/credential-manager.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/credential-manager.test.js +136 -0
- package/dist/src/platforms/discord/credential-manager.test.js.map +1 -0
- package/dist/src/platforms/discord/token-extractor.d.ts +55 -0
- package/dist/src/platforms/discord/token-extractor.d.ts.map +1 -0
- package/dist/src/platforms/discord/token-extractor.js +462 -0
- package/dist/src/platforms/discord/token-extractor.js.map +1 -0
- package/dist/src/platforms/discord/token-extractor.test.d.ts +2 -0
- package/dist/src/platforms/discord/token-extractor.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/token-extractor.test.js +789 -0
- package/dist/src/platforms/discord/token-extractor.test.js.map +1 -0
- package/dist/src/platforms/discord/types.d.ts +251 -0
- package/dist/src/platforms/discord/types.d.ts.map +1 -0
- package/dist/src/platforms/discord/types.js +74 -0
- package/dist/src/platforms/discord/types.js.map +1 -0
- package/dist/src/platforms/discord/types.test.d.ts +2 -0
- package/dist/src/platforms/discord/types.test.d.ts.map +1 -0
- package/dist/src/platforms/discord/types.test.js +211 -0
- package/dist/src/platforms/discord/types.test.js.map +1 -0
- package/dist/src/platforms/slack/cli.d.ts +5 -0
- package/dist/src/platforms/slack/cli.d.ts.map +1 -0
- package/dist/src/platforms/slack/cli.js +22 -0
- package/dist/src/platforms/slack/cli.js.map +1 -0
- package/dist/src/platforms/slack/client.d.ts +47 -0
- package/dist/src/platforms/slack/client.d.ts.map +1 -0
- package/dist/src/platforms/slack/client.js +412 -0
- package/dist/src/platforms/slack/client.js.map +1 -0
- package/dist/src/platforms/slack/commands/auth.d.ts +3 -0
- package/dist/src/platforms/slack/commands/auth.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/auth.js +156 -0
- package/dist/src/platforms/slack/commands/auth.js.map +1 -0
- package/dist/src/platforms/slack/commands/channel.d.ts +3 -0
- package/dist/src/platforms/slack/commands/channel.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/channel.js +118 -0
- package/dist/src/platforms/slack/commands/channel.js.map +1 -0
- package/dist/src/platforms/slack/commands/file.d.ts +3 -0
- package/dist/src/platforms/slack/commands/file.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/file.js +113 -0
- package/dist/src/platforms/slack/commands/file.js.map +1 -0
- package/dist/src/platforms/slack/commands/index.d.ts +9 -0
- package/dist/src/platforms/slack/commands/index.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/index.js +9 -0
- package/dist/src/platforms/slack/commands/index.js.map +1 -0
- package/dist/src/platforms/slack/commands/message.d.ts +3 -0
- package/dist/src/platforms/slack/commands/message.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/message.js +263 -0
- package/dist/src/platforms/slack/commands/message.js.map +1 -0
- package/dist/src/platforms/slack/commands/reaction.d.ts +3 -0
- package/dist/src/platforms/slack/commands/reaction.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/reaction.js +100 -0
- package/dist/src/platforms/slack/commands/reaction.js.map +1 -0
- package/dist/src/platforms/slack/commands/snapshot.d.ts +3 -0
- package/dist/src/platforms/slack/commands/snapshot.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/snapshot.js +87 -0
- package/dist/src/platforms/slack/commands/snapshot.js.map +1 -0
- package/dist/src/platforms/slack/commands/user.d.ts +3 -0
- package/dist/src/platforms/slack/commands/user.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/user.js +96 -0
- package/dist/src/platforms/slack/commands/user.js.map +1 -0
- package/dist/src/platforms/slack/commands/workspace.d.ts +3 -0
- package/dist/src/platforms/slack/commands/workspace.d.ts.map +1 -0
- package/dist/src/platforms/slack/commands/workspace.js +89 -0
- package/dist/src/platforms/slack/commands/workspace.js.map +1 -0
- package/dist/src/platforms/slack/credential-manager.d.ts +13 -0
- package/dist/src/platforms/slack/credential-manager.d.ts.map +1 -0
- package/dist/src/platforms/slack/credential-manager.js +58 -0
- package/dist/src/platforms/slack/credential-manager.js.map +1 -0
- package/dist/src/platforms/slack/index.d.ts +3 -0
- package/dist/src/platforms/slack/index.d.ts.map +1 -0
- package/dist/src/platforms/slack/index.js +3 -0
- package/dist/src/platforms/slack/index.js.map +1 -0
- package/dist/src/platforms/slack/token-extractor.d.ts +28 -0
- package/dist/src/platforms/slack/token-extractor.d.ts.map +1 -0
- package/dist/src/platforms/slack/token-extractor.js +401 -0
- package/dist/src/platforms/slack/token-extractor.js.map +1 -0
- package/dist/src/platforms/slack/types.d.ts +369 -0
- package/dist/src/platforms/slack/types.d.ts.map +1 -0
- package/dist/src/platforms/slack/types.js +92 -0
- package/dist/src/platforms/slack/types.js.map +1 -0
- package/dist/src/shared/utils/concurrency.d.ts +2 -0
- package/dist/src/shared/utils/concurrency.d.ts.map +1 -0
- package/dist/src/shared/utils/concurrency.js +14 -0
- package/dist/src/shared/utils/concurrency.js.map +1 -0
- package/dist/src/shared/utils/concurrency.test.d.ts +2 -0
- package/dist/src/shared/utils/concurrency.test.d.ts.map +1 -0
- package/dist/src/shared/utils/concurrency.test.js +39 -0
- package/dist/src/shared/utils/concurrency.test.js.map +1 -0
- package/dist/src/shared/utils/error-handler.d.ts +2 -0
- package/dist/src/shared/utils/error-handler.d.ts.map +1 -0
- package/dist/src/shared/utils/error-handler.js +5 -0
- package/dist/src/shared/utils/error-handler.js.map +1 -0
- package/dist/src/shared/utils/output.d.ts +2 -0
- package/dist/src/shared/utils/output.d.ts.map +1 -0
- package/dist/src/shared/utils/output.js +4 -0
- package/dist/src/shared/utils/output.js.map +1 -0
- package/dist/tests/cli.test.d.ts +2 -0
- package/dist/tests/cli.test.d.ts.map +1 -0
- package/dist/tests/cli.test.js +83 -0
- package/dist/tests/cli.test.js.map +1 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/CURRENT +1 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOCK +0 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOG +3 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/LOG.old +1 -0
- package/dist/tests/commands/.test-slack-data/Local Storage/leveldb/MANIFEST-000004 +0 -0
- package/dist/tests/commands/auth.test.d.ts +2 -0
- package/dist/tests/commands/auth.test.d.ts.map +1 -0
- package/dist/tests/commands/auth.test.js +304 -0
- package/dist/tests/commands/auth.test.js.map +1 -0
- package/dist/tests/commands/channel.test.d.ts +2 -0
- package/dist/tests/commands/channel.test.d.ts.map +1 -0
- package/dist/tests/commands/channel.test.js +166 -0
- package/dist/tests/commands/channel.test.js.map +1 -0
- package/dist/tests/commands/file.test.d.ts +2 -0
- package/dist/tests/commands/file.test.d.ts.map +1 -0
- package/dist/tests/commands/file.test.js +175 -0
- package/dist/tests/commands/file.test.js.map +1 -0
- package/dist/tests/commands/message.test.d.ts +2 -0
- package/dist/tests/commands/message.test.d.ts.map +1 -0
- package/dist/tests/commands/message.test.js +293 -0
- package/dist/tests/commands/message.test.js.map +1 -0
- package/dist/tests/commands/reaction.test.d.ts +2 -0
- package/dist/tests/commands/reaction.test.d.ts.map +1 -0
- package/dist/tests/commands/reaction.test.js +84 -0
- package/dist/tests/commands/reaction.test.js.map +1 -0
- package/dist/tests/commands/snapshot.test.d.ts +2 -0
- package/dist/tests/commands/snapshot.test.d.ts.map +1 -0
- package/dist/tests/commands/snapshot.test.js +280 -0
- package/dist/tests/commands/snapshot.test.js.map +1 -0
- package/dist/tests/commands/user.test.d.ts +2 -0
- package/dist/tests/commands/user.test.d.ts.map +1 -0
- package/dist/tests/commands/user.test.js +117 -0
- package/dist/tests/commands/user.test.js.map +1 -0
- package/dist/tests/commands/workspace.test.d.ts +2 -0
- package/dist/tests/commands/workspace.test.d.ts.map +1 -0
- package/dist/tests/commands/workspace.test.js +453 -0
- package/dist/tests/commands/workspace.test.js.map +1 -0
- package/dist/tests/credential-manager.test.d.ts +2 -0
- package/dist/tests/credential-manager.test.d.ts.map +1 -0
- package/dist/tests/credential-manager.test.js +199 -0
- package/dist/tests/credential-manager.test.js.map +1 -0
- package/dist/tests/slack-client.test.d.ts +2 -0
- package/dist/tests/slack-client.test.d.ts.map +1 -0
- package/dist/tests/slack-client.test.js +741 -0
- package/dist/tests/slack-client.test.js.map +1 -0
- package/dist/tests/types.test.d.ts +2 -0
- package/dist/tests/types.test.d.ts.map +1 -0
- package/dist/tests/types.test.js +215 -0
- package/dist/tests/types.test.js.map +1 -0
- package/dist/types/index.d.ts +369 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +92 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/error-handler.d.ts +2 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +5 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/output.d.ts +2 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +4 -0
- package/dist/utils/output.js.map +1 -0
- package/docs/discord.md +182 -0
- package/docs/slack.md +160 -0
- package/package.json +37 -0
- package/skills/agent-discord/SKILL.md +273 -0
- package/skills/agent-discord/references/authentication.md +294 -0
- package/skills/agent-discord/references/common-patterns.md +455 -0
- package/skills/agent-discord/templates/guild-summary.sh +167 -0
- package/skills/agent-discord/templates/monitor-channel.sh +180 -0
- package/skills/agent-discord/templates/post-message.sh +173 -0
- package/skills/agent-slack/SKILL.md +268 -0
- package/skills/agent-slack/references/authentication.md +332 -0
- package/skills/agent-slack/references/common-patterns.md +527 -0
- package/skills/agent-slack/templates/monitor-channel.sh +186 -0
- package/skills/agent-slack/templates/post-message.sh +130 -0
- package/skills/agent-slack/templates/workspace-summary.sh +149 -0
- package/src/cli.ts +29 -0
- package/src/platforms/discord/cli.ts +36 -0
- package/src/platforms/discord/client.test.ts +456 -0
- package/src/platforms/discord/client.ts +281 -0
- package/src/platforms/discord/commands/auth.test.ts +72 -0
- package/src/platforms/discord/commands/auth.ts +206 -0
- package/src/platforms/discord/commands/channel.test.ts +153 -0
- package/src/platforms/discord/commands/channel.ts +127 -0
- package/src/platforms/discord/commands/file.test.ts +98 -0
- package/src/platforms/discord/commands/file.ts +134 -0
- package/src/platforms/discord/commands/guild.test.ts +117 -0
- package/src/platforms/discord/commands/guild.ts +129 -0
- package/src/platforms/discord/commands/index.ts +8 -0
- package/src/platforms/discord/commands/message.test.ts +107 -0
- package/src/platforms/discord/commands/message.ts +182 -0
- package/src/platforms/discord/commands/reaction.test.ts +123 -0
- package/src/platforms/discord/commands/reaction.ts +156 -0
- package/src/platforms/discord/commands/snapshot.test.ts +29 -0
- package/src/platforms/discord/commands/snapshot.ts +104 -0
- package/src/platforms/discord/commands/user.test.ts +115 -0
- package/src/platforms/discord/commands/user.ts +124 -0
- package/src/platforms/discord/credential-manager.test.ts +173 -0
- package/src/platforms/discord/credential-manager.ts +95 -0
- package/src/platforms/discord/token-extractor.test.ts +918 -0
- package/src/platforms/discord/token-extractor.ts +549 -0
- package/src/platforms/discord/types.test.ts +245 -0
- package/src/platforms/discord/types.ts +158 -0
- package/src/platforms/slack/cli.ts +36 -0
- package/src/platforms/slack/client.ts +466 -0
- package/src/platforms/slack/commands/auth.ts +211 -0
- package/src/platforms/slack/commands/channel.ts +158 -0
- package/src/platforms/slack/commands/file.ts +153 -0
- package/src/platforms/slack/commands/index.ts +8 -0
- package/src/platforms/slack/commands/message.ts +369 -0
- package/src/platforms/slack/commands/reaction.ts +166 -0
- package/src/platforms/slack/commands/snapshot.ts +114 -0
- package/src/platforms/slack/commands/user.ts +110 -0
- package/src/platforms/slack/commands/workspace.ts +111 -0
- package/src/platforms/slack/credential-manager.ts +74 -0
- package/src/platforms/slack/index.ts +2 -0
- package/src/platforms/slack/token-extractor.ts +496 -0
- package/src/platforms/slack/types.ts +193 -0
- package/src/shared/utils/concurrency.test.ts +53 -0
- package/src/shared/utils/concurrency.ts +20 -0
- package/src/shared/utils/error-handler.ts +4 -0
- package/src/shared/utils/output.ts +3 -0
- package/tests/cli.test.ts +94 -0
- package/tests/commands/auth.test.ts +383 -0
- package/tests/commands/channel.test.ts +185 -0
- package/tests/commands/file.test.ts +204 -0
- package/tests/commands/message.test.ts +344 -0
- package/tests/commands/reaction.test.ts +101 -0
- package/tests/commands/snapshot.test.ts +308 -0
- package/tests/commands/user.test.ts +138 -0
- package/tests/commands/workspace.test.ts +528 -0
- package/tests/credential-manager.test.ts +241 -0
- package/tests/slack-client.test.ts +916 -0
- package/tests/types.test.ts +241 -0
- package/tsconfig.json +36 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Release Command
|
|
2
|
+
|
|
3
|
+
Bump version and create a new release.
|
|
4
|
+
|
|
5
|
+
## Arguments
|
|
6
|
+
|
|
7
|
+
- `$ARGUMENTS` - The new version number (e.g., `1.2.3`)
|
|
8
|
+
|
|
9
|
+
## Version Files to Update
|
|
10
|
+
|
|
11
|
+
Update the version in these files:
|
|
12
|
+
|
|
13
|
+
1. **package.json** (line 3) - `"version": "X.X.X"`
|
|
14
|
+
2. **.claude-plugin/plugin.json** (line 3) - `"version": "X.X.X"`
|
|
15
|
+
3. **README.md** - OpenCode plugins example: `"agent-messenger@X.X.X"`
|
|
16
|
+
|
|
17
|
+
Note: CLI files and tests read version from package.json automatically.
|
|
18
|
+
|
|
19
|
+
## Release Steps
|
|
20
|
+
|
|
21
|
+
### Step 1: Validate Version Argument
|
|
22
|
+
|
|
23
|
+
Ensure `$ARGUMENTS` is provided and is a valid semver version (e.g., `1.2.3`).
|
|
24
|
+
If not provided, ask the user for the version number.
|
|
25
|
+
|
|
26
|
+
### Step 2: Update Version in All Files
|
|
27
|
+
|
|
28
|
+
Update the version string in each file listed above. Use the Edit tool for precise updates.
|
|
29
|
+
|
|
30
|
+
### Step 3: Build
|
|
31
|
+
|
|
32
|
+
Run the build command:
|
|
33
|
+
```bash
|
|
34
|
+
bun run build
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Ensure the build succeeds before proceeding.
|
|
38
|
+
|
|
39
|
+
### Step 4: Run Tests
|
|
40
|
+
|
|
41
|
+
Run the test suite to ensure nothing is broken:
|
|
42
|
+
```bash
|
|
43
|
+
bun test
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Ensure all tests pass before proceeding.
|
|
47
|
+
|
|
48
|
+
### Step 5: Create Commit
|
|
49
|
+
|
|
50
|
+
Stage and commit all changes including:
|
|
51
|
+
- Version file changes
|
|
52
|
+
- Build output (dist/)
|
|
53
|
+
|
|
54
|
+
Commit message format:
|
|
55
|
+
```
|
|
56
|
+
Bump version to $ARGUMENTS
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Step 6: Create Tag and Push
|
|
60
|
+
|
|
61
|
+
Create a git tag **without** the `v` prefix:
|
|
62
|
+
```bash
|
|
63
|
+
git tag $ARGUMENTS
|
|
64
|
+
git push origin main
|
|
65
|
+
git push origin $ARGUMENTS
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 7: Create GitHub Release
|
|
69
|
+
|
|
70
|
+
Create a GitHub release using `gh release create`:
|
|
71
|
+
- Tag: `$ARGUMENTS` (no `v` prefix)
|
|
72
|
+
- Title: `$ARGUMENTS` (no `v` prefix)
|
|
73
|
+
- Generate release notes automatically
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
gh release create $ARGUMENTS --title "$ARGUMENTS" --generate-notes
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Step 8: Publish to npm
|
|
80
|
+
|
|
81
|
+
Publish the package to npm registry:
|
|
82
|
+
```bash
|
|
83
|
+
npm publish
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Note: The `prepublishOnly` script in package.json will run `bun run build` automatically, but since we already built in Step 3, this is redundant but harmless.
|
|
87
|
+
|
|
88
|
+
## Important Notes
|
|
89
|
+
|
|
90
|
+
- **No `v` prefix**: Tags and release titles must NOT include the `v` prefix (use `1.2.3` not `v1.2.3`)
|
|
91
|
+
- **Build artifacts**: The commit must include the build output in `dist/`
|
|
92
|
+
- **Test validation**: Tests must pass before release
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Agent Messenger - Claude Code Plugin
|
|
2
|
+
|
|
3
|
+
Messaging platform interaction skills for AI agents and Claude Code. Supports Slack workspaces and Discord servers.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Add the marketplace
|
|
9
|
+
claude plugin marketplace add devxoul/agent-messenger
|
|
10
|
+
|
|
11
|
+
# Install the plugin
|
|
12
|
+
claude plugin install agent-messenger
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or within Claude Code:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
/plugin marketplace add devxoul/agent-messenger
|
|
19
|
+
/plugin install agent-messenger
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## What it does
|
|
23
|
+
|
|
24
|
+
Enables AI agents to interact with messaging platforms through CLI interfaces:
|
|
25
|
+
|
|
26
|
+
### Slack (`agent-slack`)
|
|
27
|
+
- **Send messages** to channels and threads
|
|
28
|
+
- **Read channels** and message history
|
|
29
|
+
- **Manage reactions** (add/remove/list)
|
|
30
|
+
- **Upload files** to channels
|
|
31
|
+
- **Search messages** across workspace
|
|
32
|
+
- **Multi-workspace support** with easy switching
|
|
33
|
+
|
|
34
|
+
### Discord (`agent-discord`)
|
|
35
|
+
- **Send messages** to channels
|
|
36
|
+
- **Read channels** and message history
|
|
37
|
+
- **Manage reactions** (add/remove/list)
|
|
38
|
+
- **Upload files** to channels
|
|
39
|
+
- **Multi-guild support** with easy switching
|
|
40
|
+
|
|
41
|
+
## Key Features
|
|
42
|
+
|
|
43
|
+
### Zero-Config Authentication
|
|
44
|
+
|
|
45
|
+
Automatically extracts credentials from desktop apps - no manual token copying needed:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Slack
|
|
49
|
+
agent-slack auth extract
|
|
50
|
+
|
|
51
|
+
# Discord
|
|
52
|
+
agent-discord auth extract
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### AI-Friendly References (Slack)
|
|
56
|
+
|
|
57
|
+
Uses session-scoped references for entities:
|
|
58
|
+
- Channels: `@c1`, `@c2`, `@c3`, ...
|
|
59
|
+
- Messages: `@m1`, `@m2`, `@m3`, ...
|
|
60
|
+
- Users: `@u1`, `@u2`, `@u3`, ...
|
|
61
|
+
- Files: `@f1`, `@f2`, `@f3`, ...
|
|
62
|
+
|
|
63
|
+
### JSON Output
|
|
64
|
+
|
|
65
|
+
All commands output JSON by default for easy AI consumption. Use `--pretty` for human-readable output.
|
|
66
|
+
|
|
67
|
+
## Requirements
|
|
68
|
+
|
|
69
|
+
- Slack desktop app and/or Discord desktop app installed and logged in
|
|
70
|
+
- Node.js 18+ or Bun runtime
|
|
71
|
+
|
|
72
|
+
## Quick Start
|
|
73
|
+
|
|
74
|
+
### Slack
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# 1. Extract credentials from Slack desktop app
|
|
78
|
+
agent-slack auth extract
|
|
79
|
+
|
|
80
|
+
# 2. Get workspace snapshot with refs
|
|
81
|
+
agent-slack snapshot
|
|
82
|
+
|
|
83
|
+
# 3. Send a message
|
|
84
|
+
agent-slack message send general "Hello from AI agent!"
|
|
85
|
+
|
|
86
|
+
# 4. Use refs for AI-friendly interaction
|
|
87
|
+
agent-slack message send @c1 "Message to first channel"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Discord
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# 1. Extract credentials from Discord desktop app
|
|
94
|
+
agent-discord auth extract
|
|
95
|
+
|
|
96
|
+
# 2. Get guild snapshot
|
|
97
|
+
agent-discord snapshot
|
|
98
|
+
|
|
99
|
+
# 3. Send a message (use channel ID)
|
|
100
|
+
agent-discord message send <channel-id> "Hello from AI agent!"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Example Usage
|
|
104
|
+
|
|
105
|
+
### Slack
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# List channels
|
|
109
|
+
agent-slack channel list
|
|
110
|
+
|
|
111
|
+
# Read recent messages
|
|
112
|
+
agent-slack message list general --limit 20
|
|
113
|
+
|
|
114
|
+
# Search messages
|
|
115
|
+
agent-slack message search "project update"
|
|
116
|
+
|
|
117
|
+
# Add reaction to a message
|
|
118
|
+
agent-slack reaction add @c1 @m5 thumbsup
|
|
119
|
+
|
|
120
|
+
# Upload a file
|
|
121
|
+
agent-slack file upload general ./report.pdf
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Discord
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# List channels
|
|
128
|
+
agent-discord channel list
|
|
129
|
+
|
|
130
|
+
# Read recent messages
|
|
131
|
+
agent-discord message list <channel-id> --limit 20
|
|
132
|
+
|
|
133
|
+
# Add reaction to a message
|
|
134
|
+
agent-discord reaction add <channel-id> <message-id> thumbsup
|
|
135
|
+
|
|
136
|
+
# Upload a file
|
|
137
|
+
agent-discord file upload <channel-id> ./report.pdf
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## More Information
|
|
141
|
+
|
|
142
|
+
- [GitHub Repository](https://github.com/devxoul/agent-messenger)
|
|
143
|
+
- [Slack Skill Documentation](https://github.com/devxoul/agent-messenger/blob/main/skills/agent-slack/SKILL.md)
|
|
144
|
+
- [Discord Skill Documentation](https://github.com/devxoul/agent-messenger/blob/main/skills/agent-discord/SKILL.md)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
|
|
3
|
+
"name": "agent-messenger",
|
|
4
|
+
"description": "Messaging platform interaction skills for AI agents - Slack workspaces and Discord servers",
|
|
5
|
+
"owner": {
|
|
6
|
+
"name": "devxoul",
|
|
7
|
+
"url": "https://github.com/devxoul"
|
|
8
|
+
},
|
|
9
|
+
"plugins": [
|
|
10
|
+
{
|
|
11
|
+
"name": "agent-slack",
|
|
12
|
+
"description": "Interact with Slack workspaces through a CLI interface. Features seamless token extraction from Slack desktop app, multi-workspace support, AI-friendly entity references (@c1, @m1, @u1), message operations, channel management, reactions, and file uploads.",
|
|
13
|
+
"version": "0.1.0",
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "devxoul",
|
|
16
|
+
"url": "https://github.com/devxoul"
|
|
17
|
+
},
|
|
18
|
+
"source": "./",
|
|
19
|
+
"category": "productivity",
|
|
20
|
+
"homepage": "https://github.com/devxoul/agent-messenger",
|
|
21
|
+
"keywords": ["slack", "messaging", "workspace", "ai-agent", "cli", "communication"]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "agent-discord",
|
|
25
|
+
"description": "Interact with Discord servers through a CLI interface. Features seamless token extraction from Discord desktop app, multi-guild support, message operations, channel management, reactions, and file uploads.",
|
|
26
|
+
"version": "0.1.0",
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "devxoul",
|
|
29
|
+
"url": "https://github.com/devxoul"
|
|
30
|
+
},
|
|
31
|
+
"source": "./",
|
|
32
|
+
"category": "productivity",
|
|
33
|
+
"homepage": "https://github.com/devxoul/agent-messenger",
|
|
34
|
+
"keywords": ["discord", "messaging", "guild", "server", "ai-agent", "cli", "communication"]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-messenger",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Messaging platform interaction skills for AI agents. Interact with Slack workspaces and Discord servers - send messages, read channels, manage reactions, upload files, and more through simple CLI interfaces.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "devxoul",
|
|
7
|
+
"url": "https://github.com/devxoul"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": ["slack", "discord", "messaging", "workspace", "guild", "ai-agent", "cli", "communication", "productivity"],
|
|
11
|
+
"homepage": "https://github.com/devxoul/agent-messenger",
|
|
12
|
+
"repository": "https://github.com/devxoul/agent-messenger",
|
|
13
|
+
"skills": [
|
|
14
|
+
"./skills/agent-slack",
|
|
15
|
+
"./skills/agent-discord"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
ci:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- uses: oven-sh/setup-bun@v2
|
|
17
|
+
with:
|
|
18
|
+
bun-version: latest
|
|
19
|
+
|
|
20
|
+
- name: Install dependencies
|
|
21
|
+
run: bun install --frozen-lockfile
|
|
22
|
+
|
|
23
|
+
- name: Lint
|
|
24
|
+
run: bun run lint
|
|
25
|
+
|
|
26
|
+
- name: Test
|
|
27
|
+
run: bun test
|
|
28
|
+
|
|
29
|
+
- name: Build
|
|
30
|
+
run: bun run build
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
|
|
2
|
+
Default to using Bun instead of Node.js.
|
|
3
|
+
|
|
4
|
+
- Use `bun <file>` instead of `node <file>` or `ts-node <file>`
|
|
5
|
+
- Use `bun test` instead of `jest` or `vitest`
|
|
6
|
+
- Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
|
|
7
|
+
- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
|
|
8
|
+
- Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
|
|
9
|
+
- Use `bunx <package> <command>` instead of `npx <package> <command>`
|
|
10
|
+
- Bun automatically loads .env, so don't use dotenv.
|
|
11
|
+
|
|
12
|
+
## APIs
|
|
13
|
+
|
|
14
|
+
- `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
|
|
15
|
+
- `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
|
|
16
|
+
- `Bun.redis` for Redis. Don't use `ioredis`.
|
|
17
|
+
- `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
|
|
18
|
+
- `WebSocket` is built-in. Don't use `ws`.
|
|
19
|
+
- Prefer `Bun.file` over `node:fs`'s readFile/writeFile
|
|
20
|
+
- Bun.$`ls` instead of execa.
|
|
21
|
+
|
|
22
|
+
## Testing
|
|
23
|
+
|
|
24
|
+
Use `bun test` to run tests.
|
|
25
|
+
|
|
26
|
+
```ts#index.test.ts
|
|
27
|
+
import { test, expect } from "bun:test";
|
|
28
|
+
|
|
29
|
+
test("hello world", () => {
|
|
30
|
+
expect(1).toBe(1);
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Frontend
|
|
35
|
+
|
|
36
|
+
Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.
|
|
37
|
+
|
|
38
|
+
Server:
|
|
39
|
+
|
|
40
|
+
```ts#index.ts
|
|
41
|
+
import index from "./index.html"
|
|
42
|
+
|
|
43
|
+
Bun.serve({
|
|
44
|
+
routes: {
|
|
45
|
+
"/": index,
|
|
46
|
+
"/api/users/:id": {
|
|
47
|
+
GET: (req) => {
|
|
48
|
+
return new Response(JSON.stringify({ id: req.params.id }));
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
// optional websocket support
|
|
53
|
+
websocket: {
|
|
54
|
+
open: (ws) => {
|
|
55
|
+
ws.send("Hello, world!");
|
|
56
|
+
},
|
|
57
|
+
message: (ws, message) => {
|
|
58
|
+
ws.send(message);
|
|
59
|
+
},
|
|
60
|
+
close: (ws) => {
|
|
61
|
+
// handle close
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
development: {
|
|
65
|
+
hmr: true,
|
|
66
|
+
console: true,
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. `<link>` tags can point to stylesheets and Bun's CSS bundler will bundle.
|
|
72
|
+
|
|
73
|
+
```html#index.html
|
|
74
|
+
<html>
|
|
75
|
+
<body>
|
|
76
|
+
<h1>Hello, world!</h1>
|
|
77
|
+
<script type="module" src="./frontend.tsx"></script>
|
|
78
|
+
</body>
|
|
79
|
+
</html>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
With the following `frontend.tsx`:
|
|
83
|
+
|
|
84
|
+
```tsx#frontend.tsx
|
|
85
|
+
import React from "react";
|
|
86
|
+
import { createRoot } from "react-dom/client";
|
|
87
|
+
|
|
88
|
+
// import .css files directly and it works
|
|
89
|
+
import './index.css';
|
|
90
|
+
|
|
91
|
+
const root = createRoot(document.body);
|
|
92
|
+
|
|
93
|
+
export default function Frontend() {
|
|
94
|
+
return <h1>Hello, world!</h1>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
root.render(<Frontend />);
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Then, run index.ts
|
|
101
|
+
|
|
102
|
+
```sh
|
|
103
|
+
bun --hot ./index.ts
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
For more information, read the Bun API docs in `node_modules/bun-types/docs/**.mdx`.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Contributing to Agent Messenger
|
|
2
|
+
|
|
3
|
+
## Development Setup
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
# Clone the repository
|
|
7
|
+
git clone https://github.com/devxoul/agent-messenger.git
|
|
8
|
+
cd agent-messenger
|
|
9
|
+
|
|
10
|
+
# Install dependencies
|
|
11
|
+
bun install
|
|
12
|
+
|
|
13
|
+
# Link CLI globally for local testing
|
|
14
|
+
bun link
|
|
15
|
+
|
|
16
|
+
# Run tests
|
|
17
|
+
bun test
|
|
18
|
+
|
|
19
|
+
# Build
|
|
20
|
+
bun run build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Running Tests
|
|
24
|
+
|
|
25
|
+
We follow TDD (Test-Driven Development). Tests are co-located with source files.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Run all tests
|
|
29
|
+
bun test
|
|
30
|
+
|
|
31
|
+
# Run specific test file
|
|
32
|
+
bun test src/platforms/slack/commands/message.test.ts
|
|
33
|
+
|
|
34
|
+
# Watch mode
|
|
35
|
+
bun test --watch
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Code Quality
|
|
39
|
+
|
|
40
|
+
We use Biome for linting and formatting, and TypeScript for type checking:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Type check
|
|
44
|
+
bun run typecheck
|
|
45
|
+
|
|
46
|
+
# Lint
|
|
47
|
+
bun run lint
|
|
48
|
+
|
|
49
|
+
# Auto-fix lint issues
|
|
50
|
+
bun run lint --write
|
|
51
|
+
|
|
52
|
+
# Format code
|
|
53
|
+
bun run format
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Commit Conventions
|
|
57
|
+
|
|
58
|
+
Follow conventional commits:
|
|
59
|
+
|
|
60
|
+
- `feat(scope): description` - New features
|
|
61
|
+
- `fix(scope): description` - Bug fixes
|
|
62
|
+
- `docs: description` - Documentation changes
|
|
63
|
+
- `test(scope): description` - Test changes
|
|
64
|
+
- `chore: description` - Build/tooling changes
|
|
65
|
+
- `refactor(scope): description` - Code refactoring
|
|
66
|
+
|
|
67
|
+
Examples:
|
|
68
|
+
```
|
|
69
|
+
feat(slack): add message send command
|
|
70
|
+
feat(discord): add guild switching
|
|
71
|
+
fix(auth): handle missing credentials gracefully
|
|
72
|
+
docs: update README with new examples
|
|
73
|
+
test(channel): add channel list tests
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Pull Request Process
|
|
77
|
+
|
|
78
|
+
1. Create a feature branch from `main`
|
|
79
|
+
2. Write tests first (TDD)
|
|
80
|
+
3. Implement the feature
|
|
81
|
+
4. Ensure all tests pass: `bun test`
|
|
82
|
+
5. Ensure types are correct: `bun run typecheck`
|
|
83
|
+
6. Fix any lint issues: `bun run lint --write`
|
|
84
|
+
7. Submit PR with clear description
|
|
85
|
+
|
|
86
|
+
## Project Structure
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
src/
|
|
90
|
+
cli.ts # Main CLI entry point
|
|
91
|
+
platforms/
|
|
92
|
+
slack/ # Slack platform
|
|
93
|
+
cli.ts # Slack CLI entry
|
|
94
|
+
client.ts # Slack API client
|
|
95
|
+
credential-manager.ts # Credential storage
|
|
96
|
+
token-extractor.ts # Auto credential extraction
|
|
97
|
+
types.ts # TypeScript types
|
|
98
|
+
commands/ # Command handlers
|
|
99
|
+
auth.ts
|
|
100
|
+
channel.ts
|
|
101
|
+
message.ts
|
|
102
|
+
...
|
|
103
|
+
discord/ # Discord platform
|
|
104
|
+
cli.ts # Discord CLI entry
|
|
105
|
+
client.ts # Discord API client
|
|
106
|
+
credential-manager.ts # Credential storage
|
|
107
|
+
token-extractor.ts # Auto credential extraction
|
|
108
|
+
types.ts # TypeScript types
|
|
109
|
+
commands/ # Command handlers
|
|
110
|
+
auth.ts
|
|
111
|
+
channel.ts
|
|
112
|
+
guild.ts
|
|
113
|
+
message.ts
|
|
114
|
+
...
|
|
115
|
+
shared/
|
|
116
|
+
utils/ # Shared utilities
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Tests are co-located with source files (e.g., `client.test.ts` next to `client.ts`).
|
|
120
|
+
|
|
121
|
+
## Testing Guidelines
|
|
122
|
+
|
|
123
|
+
- Write tests FIRST (TDD)
|
|
124
|
+
- Mock platform clients (SlackClient, DiscordClient) in command tests
|
|
125
|
+
- Use descriptive test names
|
|
126
|
+
- Tests are co-located: `foo.ts` -> `foo.test.ts`
|
|
127
|
+
- Aim for high coverage
|
|
128
|
+
|
|
129
|
+
## Questions?
|
|
130
|
+
|
|
131
|
+
Open an issue or start a discussion!
|
package/README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# π¬ Agent Messenger
|
|
2
|
+
|
|
3
|
+
**Give your AI agent the power to read and send messages across Slack, Discord, Teams and more**
|
|
4
|
+
|
|
5
|
+
A unified, agent-friendly CLI for messaging platforms. Zero-config credential extraction from your desktop appsβno OAuth flows, no API keys, no admin approval needed. Works out of the box.
|
|
6
|
+
|
|
7
|
+
## β¨ Why Agent Messenger?
|
|
8
|
+
|
|
9
|
+
- π **No API keys needed** β Automatically extracts credentials from your installed desktop apps
|
|
10
|
+
- π **One interface, multiple platforms** β Learn once, use everywhere (Slack, Discord, Teams)
|
|
11
|
+
- π€ **AI-agent friendly** β JSON output by default, perfect for LLM tool use
|
|
12
|
+
- π€ **Human friendly too** β Add `--pretty` for readable output
|
|
13
|
+
|
|
14
|
+
## π¦ Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g agent-messenger
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or use your favorite package manager.
|
|
21
|
+
|
|
22
|
+
This installs:
|
|
23
|
+
- `agent-slack` β Slack CLI
|
|
24
|
+
- `agent-discord` β Discord CLI
|
|
25
|
+
|
|
26
|
+
## π§© Agent Skills
|
|
27
|
+
|
|
28
|
+
Agent Messenger includes [Agent Skills](https://agentskills.io/) that teach your AI agent how to use these CLIs effectively.
|
|
29
|
+
|
|
30
|
+
### Skills CLI
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx skills add devxoul/agent-messenger
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
See [skills.sh](https://skills.sh/) for more details.
|
|
37
|
+
|
|
38
|
+
### Claude Code
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
claude plugin marketplace add devxoul/agent-messenger
|
|
42
|
+
claude plugin install agent-messenger
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Or within Claude Code:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
/plugin marketplace add devxoul/agent-messenger
|
|
49
|
+
/plugin install agent-messenger
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### OpenCode
|
|
53
|
+
|
|
54
|
+
Add to your `opencode.jsonc`:
|
|
55
|
+
|
|
56
|
+
```jsonc
|
|
57
|
+
{
|
|
58
|
+
"plugins": [
|
|
59
|
+
"agent-messenger@1.0.0"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## π Quick Start
|
|
65
|
+
|
|
66
|
+
Get up and running in 30 seconds:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# 1. Extract credentials from your Slack desktop app
|
|
70
|
+
agent-slack auth extract
|
|
71
|
+
|
|
72
|
+
# 2. See your workspace at a glance
|
|
73
|
+
agent-slack snapshot --pretty
|
|
74
|
+
|
|
75
|
+
# 3. Send a message
|
|
76
|
+
agent-slack message send general "Hello from the CLI!"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
That's it. No OAuth flows. No API tokens. No configuration files.
|
|
80
|
+
|
|
81
|
+
## π Supported Platforms
|
|
82
|
+
|
|
83
|
+
| Feature | Slack | Discord |
|
|
84
|
+
|---------|:-----:|:-------:|
|
|
85
|
+
| Auto credential extraction | β
| β
|
|
|
86
|
+
| Send / List / Search messages | β
| β
|
|
|
87
|
+
| Threads | β
| β
|
|
|
88
|
+
| Channels & Users | β
| β
|
|
|
89
|
+
| Reactions | β
| β
|
|
|
90
|
+
| File uploads | β
| β
|
|
|
91
|
+
| Workspace snapshots | β
| β
|
|
|
92
|
+
| Multi-workspace | β
| β
|
|
|
93
|
+
| Bot support | ποΈ | ποΈ |
|
|
94
|
+
|
|
95
|
+
π **Coming soon**: Microsoft Teams and more
|
|
96
|
+
|
|
97
|
+
## π Platform Guides
|
|
98
|
+
|
|
99
|
+
- **[Slack Guide](docs/slack.md)** β Full command reference for Slack
|
|
100
|
+
- **[Discord Guide](docs/discord.md)** β Full command reference for Discord
|
|
101
|
+
|
|
102
|
+
## π‘ Use Cases
|
|
103
|
+
|
|
104
|
+
**π€ For AI Agents**
|
|
105
|
+
- Give Claude, GPT, or your custom agent the ability to read and send messages
|
|
106
|
+
- Automate Slack/Discord workflows with simple CLI commands
|
|
107
|
+
- Build integrations without OAuth complexity
|
|
108
|
+
|
|
109
|
+
**π©βπ» For Developers**
|
|
110
|
+
- Quick message sending from terminal
|
|
111
|
+
- Scripted notifications and alerts
|
|
112
|
+
- Workspace snapshots for debugging
|
|
113
|
+
|
|
114
|
+
**π₯ For Teams**
|
|
115
|
+
- Automate standups and reminders
|
|
116
|
+
- Cross-post announcements to multiple platforms
|
|
117
|
+
- Build custom notification pipelines
|
|
118
|
+
|
|
119
|
+
## π§ Philosophy
|
|
120
|
+
|
|
121
|
+
**Why not MCP?** MCP servers expose all tools at once, bloating context and confusing agents. **[Agent Skills](https://agentskills.io/) + agent-friendly CLI** offer a better approachβload what you need, when you need it. Fewer tokens, cleaner context, better output.
|
|
122
|
+
|
|
123
|
+
**Why not OAuth?** OAuth requires an app and it requires workspace admin approval to install, which can take days. This tool just worksβzero setup required. Bot support is on the roadmap for those who prefer it.
|
|
124
|
+
|
|
125
|
+
Inspired by [agent-browser](https://github.com/vercel-labs/agent-browser) from Vercel Labs.
|
|
126
|
+
|
|
127
|
+
## π€ Contributing
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
bun install # Install dependencies
|
|
131
|
+
bun link # Link CLI globally for local testing
|
|
132
|
+
bun test # Run tests
|
|
133
|
+
bun typecheck # Type check
|
|
134
|
+
bun lint # Lint
|
|
135
|
+
bun run build # Build
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## π License
|
|
139
|
+
|
|
140
|
+
MIT
|