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,175 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, mock, test } from 'bun:test';
|
|
2
|
+
describe('File Commands', () => {
|
|
3
|
+
let mockClient;
|
|
4
|
+
beforeEach(() => {
|
|
5
|
+
mockClient = {
|
|
6
|
+
uploadFile: mock(async (channels, file, filename) => ({
|
|
7
|
+
id: 'F123',
|
|
8
|
+
name: filename,
|
|
9
|
+
title: filename,
|
|
10
|
+
mimetype: 'text/plain',
|
|
11
|
+
size: file.length,
|
|
12
|
+
url_private: 'https://files.slack.com/files-pri/T123-F123/test.txt',
|
|
13
|
+
created: Math.floor(Date.now() / 1000),
|
|
14
|
+
user: 'U123',
|
|
15
|
+
channels,
|
|
16
|
+
})),
|
|
17
|
+
listFiles: mock(async (channel) => [
|
|
18
|
+
{
|
|
19
|
+
id: 'F123',
|
|
20
|
+
name: 'test.txt',
|
|
21
|
+
title: 'test.txt',
|
|
22
|
+
mimetype: 'text/plain',
|
|
23
|
+
size: 1024,
|
|
24
|
+
url_private: 'https://files.slack.com/files-pri/T123-F123/test.txt',
|
|
25
|
+
created: 1234567890,
|
|
26
|
+
user: 'U123',
|
|
27
|
+
channels: channel ? [channel] : ['C123'],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: 'F456',
|
|
31
|
+
name: 'document.pdf',
|
|
32
|
+
title: 'document.pdf',
|
|
33
|
+
mimetype: 'application/pdf',
|
|
34
|
+
size: 2048,
|
|
35
|
+
url_private: 'https://files.slack.com/files-pri/T123-F456/document.pdf',
|
|
36
|
+
created: 1234567891,
|
|
37
|
+
user: 'U456',
|
|
38
|
+
channels: channel ? [channel] : ['C456'],
|
|
39
|
+
},
|
|
40
|
+
]),
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
describe('file upload', () => {
|
|
44
|
+
test('uploads file to channel', async () => {
|
|
45
|
+
const channel = 'C123';
|
|
46
|
+
const fileBuffer = Buffer.from('test content');
|
|
47
|
+
const filename = 'test.txt';
|
|
48
|
+
const result = await mockClient.uploadFile([channel], fileBuffer, filename);
|
|
49
|
+
expect(result.id).toBeDefined();
|
|
50
|
+
expect(result.name).toBe(filename);
|
|
51
|
+
expect(result.size).toBe(fileBuffer.length);
|
|
52
|
+
expect(result.channels).toContain(channel);
|
|
53
|
+
});
|
|
54
|
+
test('supports --filename override', async () => {
|
|
55
|
+
const channel = 'C123';
|
|
56
|
+
const fileBuffer = Buffer.from('content');
|
|
57
|
+
const customFilename = 'custom-name.txt';
|
|
58
|
+
const result = await mockClient.uploadFile([channel], fileBuffer, customFilename);
|
|
59
|
+
expect(result.name).toBe(customFilename);
|
|
60
|
+
});
|
|
61
|
+
test('returns file with metadata', () => {
|
|
62
|
+
const file = {
|
|
63
|
+
id: 'F123',
|
|
64
|
+
name: 'test.txt',
|
|
65
|
+
title: 'test.txt',
|
|
66
|
+
mimetype: 'text/plain',
|
|
67
|
+
size: 1024,
|
|
68
|
+
url_private: 'https://files.slack.com/files-pri/T123-F123/test.txt',
|
|
69
|
+
created: 1234567890,
|
|
70
|
+
user: 'U123',
|
|
71
|
+
};
|
|
72
|
+
const output = { ...file };
|
|
73
|
+
expect(output.id).toBe('F123');
|
|
74
|
+
expect(output.name).toBe('test.txt');
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
describe('file list', () => {
|
|
78
|
+
test('lists all files in workspace', async () => {
|
|
79
|
+
const files = await mockClient.listFiles();
|
|
80
|
+
expect(files).toHaveLength(2);
|
|
81
|
+
expect(files[0].name).toBe('test.txt');
|
|
82
|
+
expect(files[1].name).toBe('document.pdf');
|
|
83
|
+
});
|
|
84
|
+
test('filters files by channel', async () => {
|
|
85
|
+
const channel = 'C123';
|
|
86
|
+
const files = await mockClient.listFiles(channel);
|
|
87
|
+
expect(files).toBeDefined();
|
|
88
|
+
expect(files.length).toBeGreaterThan(0);
|
|
89
|
+
});
|
|
90
|
+
test('returns files with metadata', () => {
|
|
91
|
+
const files = [
|
|
92
|
+
{
|
|
93
|
+
id: 'F123',
|
|
94
|
+
name: 'test.txt',
|
|
95
|
+
title: 'test.txt',
|
|
96
|
+
mimetype: 'text/plain',
|
|
97
|
+
size: 1024,
|
|
98
|
+
url_private: 'https://files.slack.com/files-pri/T123-F123/test.txt',
|
|
99
|
+
created: 1234567890,
|
|
100
|
+
user: 'U123',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'F456',
|
|
104
|
+
name: 'document.pdf',
|
|
105
|
+
title: 'document.pdf',
|
|
106
|
+
mimetype: 'application/pdf',
|
|
107
|
+
size: 2048,
|
|
108
|
+
url_private: 'https://files.slack.com/files-pri/T123-F456/document.pdf',
|
|
109
|
+
created: 1234567891,
|
|
110
|
+
user: 'U456',
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
const output = files.map((file) => ({ ...file }));
|
|
114
|
+
expect(output).toHaveLength(2);
|
|
115
|
+
expect(output[0].name).toBe('test.txt');
|
|
116
|
+
expect(output[1].name).toBe('document.pdf');
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
describe('file info', () => {
|
|
120
|
+
test('shows file details', async () => {
|
|
121
|
+
const fileId = 'F123';
|
|
122
|
+
const files = await mockClient.listFiles();
|
|
123
|
+
const file = files.find((f) => f.id === fileId);
|
|
124
|
+
expect(file).toBeDefined();
|
|
125
|
+
expect(file?.id).toBe(fileId);
|
|
126
|
+
expect(file?.name).toBe('test.txt');
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
describe('output formatting', () => {
|
|
130
|
+
test('includes file fields in output', () => {
|
|
131
|
+
const file = {
|
|
132
|
+
id: 'F123',
|
|
133
|
+
name: 'test.txt',
|
|
134
|
+
title: 'test.txt',
|
|
135
|
+
mimetype: 'text/plain',
|
|
136
|
+
size: 1024,
|
|
137
|
+
url_private: 'https://files.slack.com/files-pri/T123-F123/test.txt',
|
|
138
|
+
created: 1234567890,
|
|
139
|
+
user: 'U123',
|
|
140
|
+
};
|
|
141
|
+
const output = { ...file };
|
|
142
|
+
expect(output.id).toBeDefined();
|
|
143
|
+
expect(output.name).toBe('test.txt');
|
|
144
|
+
});
|
|
145
|
+
test('formats multiple files', () => {
|
|
146
|
+
const files = [
|
|
147
|
+
{
|
|
148
|
+
id: 'F123',
|
|
149
|
+
name: 'test.txt',
|
|
150
|
+
title: 'test.txt',
|
|
151
|
+
mimetype: 'text/plain',
|
|
152
|
+
size: 1024,
|
|
153
|
+
url_private: 'https://files.slack.com/files-pri/T123-F123/test.txt',
|
|
154
|
+
created: 1234567890,
|
|
155
|
+
user: 'U123',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: 'F456',
|
|
159
|
+
name: 'document.pdf',
|
|
160
|
+
title: 'document.pdf',
|
|
161
|
+
mimetype: 'application/pdf',
|
|
162
|
+
size: 2048,
|
|
163
|
+
url_private: 'https://files.slack.com/files-pri/T123-F456/document.pdf',
|
|
164
|
+
created: 1234567891,
|
|
165
|
+
user: 'U456',
|
|
166
|
+
},
|
|
167
|
+
];
|
|
168
|
+
const output = files.map((file) => ({ ...file }));
|
|
169
|
+
expect(output).toHaveLength(2);
|
|
170
|
+
expect(output[0].name).toBe('test.txt');
|
|
171
|
+
expect(output[1].name).toBe('document.pdf');
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
//# sourceMappingURL=file.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.test.js","sourceRoot":"","sources":["../../../tests/commands/file.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAInE,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,UAAuB,CAAA;IAE3B,UAAU,CAAC,GAAG,EAAE;QACd,UAAU,GAAG;YACX,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE,QAAkB,EAAE,IAAY,EAAE,QAAgB,EAAE,EAAE,CAAC,CAAC;gBAC9E,EAAE,EAAE,MAAM;gBACV,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,QAAQ,EAAE,YAAY;gBACtB,IAAI,EAAE,IAAI,CAAC,MAAM;gBACjB,WAAW,EAAE,sDAAsD;gBACnE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;gBACtC,IAAI,EAAE,MAAM;gBACZ,QAAQ;aACT,CAAC,CAAC;YACH,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,OAAgB,EAAE,EAAE,CAAC;gBAC1C;oBACE,EAAE,EAAE,MAAM;oBACV,IAAI,EAAE,UAAU;oBAChB,KAAK,EAAE,UAAU;oBACjB,QAAQ,EAAE,YAAY;oBACtB,IAAI,EAAE,IAAI;oBACV,WAAW,EAAE,sDAAsD;oBACnE,OAAO,EAAE,UAAU;oBACnB,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;iBACzC;gBACD;oBACE,EAAE,EAAE,MAAM;oBACV,IAAI,EAAE,cAAc;oBACpB,KAAK,EAAE,cAAc;oBACrB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Y;oBACtB,IAAI,EAAE,IAAI;oBACV,WAAW,EAAE,sDAAsD;oBACnE,OAAO,EAAE,UAAU;oBACnB,IAAI,EAAE,MAAM;iBACb;gBACD;oBACE,EAAE,EAAE,MAAM;oBACV,IAAI,EAAE,cAAc;oBACpB,KAAK,EAAE,cAAc;oBACrB,QAAQ,EAAE,iBAAiB;oBAC3B,IAAI,EAAE,IAAI;oBACV,WAAW,EAAE,0DAA0D;oBACvE,OAAO,EAAE,UAAU;oBACnB,IAAI,EAAE,MAAM;iBACb;aACF,CAAA;YAED,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAA;YAEjD,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;YAC9B,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;YACvC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAC7C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.test.d.ts","sourceRoot":"","sources":["../../../tests/commands/message.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, mock, test } from 'bun:test';
|
|
2
|
+
describe('Message Commands', () => {
|
|
3
|
+
let mockClient;
|
|
4
|
+
beforeEach(() => {
|
|
5
|
+
// Mock SlackClient
|
|
6
|
+
mockClient = {
|
|
7
|
+
sendMessage: mock(async (_channel, text, threadTs) => ({
|
|
8
|
+
ts: '1234567890.123456',
|
|
9
|
+
text,
|
|
10
|
+
type: 'message',
|
|
11
|
+
user: 'U123',
|
|
12
|
+
thread_ts: threadTs,
|
|
13
|
+
})),
|
|
14
|
+
getMessages: mock(async (_channel, _limit) => [
|
|
15
|
+
{
|
|
16
|
+
ts: '1234567890.123456',
|
|
17
|
+
text: 'First message',
|
|
18
|
+
type: 'message',
|
|
19
|
+
user: 'U123',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
ts: '1234567890.123457',
|
|
23
|
+
text: 'Second message',
|
|
24
|
+
type: 'message',
|
|
25
|
+
user: 'U456',
|
|
26
|
+
},
|
|
27
|
+
]),
|
|
28
|
+
updateMessage: mock(async (_channel, ts, text) => ({
|
|
29
|
+
ts,
|
|
30
|
+
text,
|
|
31
|
+
type: 'message',
|
|
32
|
+
user: 'U123',
|
|
33
|
+
})),
|
|
34
|
+
deleteMessage: mock(async (_channel, _ts) => {
|
|
35
|
+
// no-op
|
|
36
|
+
}),
|
|
37
|
+
getMessage: mock(async (_channel, ts) => {
|
|
38
|
+
if (ts === '1234567890.123456') {
|
|
39
|
+
return {
|
|
40
|
+
ts: '1234567890.123456',
|
|
41
|
+
text: 'Found single message',
|
|
42
|
+
type: 'message',
|
|
43
|
+
user: 'U123',
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}),
|
|
48
|
+
searchMessages: mock(async (_query, _options) => [
|
|
49
|
+
{
|
|
50
|
+
ts: '1234567890.123456',
|
|
51
|
+
text: 'Found message 1',
|
|
52
|
+
user: 'U123',
|
|
53
|
+
channel: { id: 'C001', name: 'general' },
|
|
54
|
+
permalink: 'https://workspace.slack.com/archives/C001/p1234567890123456',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
ts: '1234567890.123457',
|
|
58
|
+
text: 'Found message 2',
|
|
59
|
+
user: 'U456',
|
|
60
|
+
channel: { id: 'C002', name: 'random' },
|
|
61
|
+
permalink: 'https://workspace.slack.com/archives/C002/p1234567890123457',
|
|
62
|
+
},
|
|
63
|
+
]),
|
|
64
|
+
getThreadReplies: mock(async (_channel, _threadTs, _options) => ({
|
|
65
|
+
messages: [
|
|
66
|
+
{
|
|
67
|
+
ts: '1234567890.123456',
|
|
68
|
+
text: 'Parent message',
|
|
69
|
+
type: 'message',
|
|
70
|
+
user: 'U123',
|
|
71
|
+
thread_ts: '1234567890.123456',
|
|
72
|
+
reply_count: 2,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
ts: '1234567890.123457',
|
|
76
|
+
text: 'First reply',
|
|
77
|
+
type: 'message',
|
|
78
|
+
user: 'U456',
|
|
79
|
+
thread_ts: '1234567890.123456',
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
ts: '1234567890.123458',
|
|
83
|
+
text: 'Second reply',
|
|
84
|
+
type: 'message',
|
|
85
|
+
user: 'U789',
|
|
86
|
+
thread_ts: '1234567890.123456',
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
has_more: false,
|
|
90
|
+
})),
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
describe('message send', () => {
|
|
94
|
+
test('sends message to channel', async () => {
|
|
95
|
+
// Given: A channel and message text
|
|
96
|
+
const channel = 'C123';
|
|
97
|
+
const text = 'Hello, world!';
|
|
98
|
+
// When: Sending message
|
|
99
|
+
const result = await mockClient.sendMessage(channel, text);
|
|
100
|
+
// Then: Should return message with ts
|
|
101
|
+
expect(result.ts).toBeDefined();
|
|
102
|
+
expect(result.text).toBe(text);
|
|
103
|
+
expect(result.type).toBe('message');
|
|
104
|
+
});
|
|
105
|
+
test('sends message to thread', async () => {
|
|
106
|
+
// Given: A channel, message text, and thread ts
|
|
107
|
+
const channel = 'C123';
|
|
108
|
+
const text = 'Reply in thread';
|
|
109
|
+
const threadTs = '1234567890.123456';
|
|
110
|
+
// When: Sending message with thread_ts
|
|
111
|
+
const result = await mockClient.sendMessage(channel, text, threadTs);
|
|
112
|
+
// Then: Should include thread_ts
|
|
113
|
+
expect(result.thread_ts).toBe(threadTs);
|
|
114
|
+
expect(result.text).toBe(text);
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
describe('message list', () => {
|
|
118
|
+
test('lists messages from channel', async () => {
|
|
119
|
+
// Given: A channel
|
|
120
|
+
const channel = 'C123';
|
|
121
|
+
// When: Getting messages
|
|
122
|
+
const messages = await mockClient.getMessages(channel);
|
|
123
|
+
// Then: Should return array of messages
|
|
124
|
+
expect(messages).toHaveLength(2);
|
|
125
|
+
expect(messages[0].text).toBe('First message');
|
|
126
|
+
expect(messages[1].text).toBe('Second message');
|
|
127
|
+
});
|
|
128
|
+
test('respects limit parameter', async () => {
|
|
129
|
+
// Given: A channel and limit
|
|
130
|
+
const channel = 'C123';
|
|
131
|
+
const limit = 10;
|
|
132
|
+
// When: Getting messages with limit
|
|
133
|
+
const messages = await mockClient.getMessages(channel, limit);
|
|
134
|
+
// Then: Should pass limit to API
|
|
135
|
+
expect(messages).toBeDefined();
|
|
136
|
+
});
|
|
137
|
+
test('filters messages by thread', async () => {
|
|
138
|
+
// Given: A channel and thread ts
|
|
139
|
+
const channel = 'C123';
|
|
140
|
+
const _threadTs = '1234567890.123456';
|
|
141
|
+
// When: Getting thread messages
|
|
142
|
+
const messages = await mockClient.getMessages(channel);
|
|
143
|
+
// Then: Should return messages
|
|
144
|
+
expect(messages).toBeDefined();
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
describe('message update', () => {
|
|
148
|
+
test('updates message text', async () => {
|
|
149
|
+
// Given: A channel, message ts, and new text
|
|
150
|
+
const channel = 'C123';
|
|
151
|
+
const ts = '1234567890.123456';
|
|
152
|
+
const newText = 'Updated message';
|
|
153
|
+
// When: Updating message
|
|
154
|
+
const result = await mockClient.updateMessage(channel, ts, newText);
|
|
155
|
+
// Then: Should return updated message
|
|
156
|
+
expect(result.ts).toBe(ts);
|
|
157
|
+
expect(result.text).toBe(newText);
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
describe('message delete', () => {
|
|
161
|
+
test('deletes message', async () => {
|
|
162
|
+
// Given: A channel and message ts
|
|
163
|
+
const channel = 'C123';
|
|
164
|
+
const ts = '1234567890.123456';
|
|
165
|
+
// When: Deleting message
|
|
166
|
+
await mockClient.deleteMessage(channel, ts);
|
|
167
|
+
// Then: Should complete without error
|
|
168
|
+
expect(mockClient.deleteMessage).toHaveBeenCalled();
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
describe('message get', () => {
|
|
172
|
+
test('gets single message by timestamp', async () => {
|
|
173
|
+
// Given: A channel and message ts
|
|
174
|
+
const channel = 'C123';
|
|
175
|
+
const ts = '1234567890.123456';
|
|
176
|
+
// When: Getting message by ts
|
|
177
|
+
const message = await mockClient.getMessage(channel, ts);
|
|
178
|
+
// Then: Should return the message
|
|
179
|
+
expect(message).not.toBeNull();
|
|
180
|
+
expect(message?.ts).toBe(ts);
|
|
181
|
+
expect(message?.text).toBe('Found single message');
|
|
182
|
+
});
|
|
183
|
+
test('returns null for non-existent message', async () => {
|
|
184
|
+
// Given: A channel and non-existent ts
|
|
185
|
+
const channel = 'C123';
|
|
186
|
+
const ts = '9999999999.999999';
|
|
187
|
+
// When: Getting non-existent message
|
|
188
|
+
const message = await mockClient.getMessage(channel, ts);
|
|
189
|
+
// Then: Should return null
|
|
190
|
+
expect(message).toBeNull();
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
describe('message search', () => {
|
|
194
|
+
test('searches messages across workspace', async () => {
|
|
195
|
+
// Given: A search query
|
|
196
|
+
const query = 'hello world';
|
|
197
|
+
// When: Searching messages
|
|
198
|
+
const results = await mockClient.searchMessages(query);
|
|
199
|
+
// Then: Should return matching messages with channel info
|
|
200
|
+
expect(results).toHaveLength(2);
|
|
201
|
+
expect(results[0].text).toBe('Found message 1');
|
|
202
|
+
expect(results[0].channel.name).toBe('general');
|
|
203
|
+
expect(results[0].permalink).toBeDefined();
|
|
204
|
+
});
|
|
205
|
+
test('returns channel info with each result', async () => {
|
|
206
|
+
// Given: A search query
|
|
207
|
+
const query = 'test';
|
|
208
|
+
// When: Searching messages
|
|
209
|
+
const results = await mockClient.searchMessages(query);
|
|
210
|
+
// Then: Each result should have channel info
|
|
211
|
+
for (const result of results) {
|
|
212
|
+
expect(result.channel).toBeDefined();
|
|
213
|
+
expect(result.channel.id).toBeDefined();
|
|
214
|
+
expect(result.channel.name).toBeDefined();
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
describe('message replies', () => {
|
|
219
|
+
test('gets thread replies including parent message', async () => {
|
|
220
|
+
// Given: A channel and thread ts
|
|
221
|
+
const channel = 'C123';
|
|
222
|
+
const threadTs = '1234567890.123456';
|
|
223
|
+
// When: Getting thread replies
|
|
224
|
+
const result = await mockClient.getThreadReplies(channel, threadTs);
|
|
225
|
+
// Then: Should return parent and replies
|
|
226
|
+
expect(result.messages).toHaveLength(3);
|
|
227
|
+
expect(result.messages[0].text).toBe('Parent message');
|
|
228
|
+
expect(result.messages[0].reply_count).toBe(2);
|
|
229
|
+
expect(result.messages[1].text).toBe('First reply');
|
|
230
|
+
expect(result.messages[2].text).toBe('Second reply');
|
|
231
|
+
});
|
|
232
|
+
test('returns has_more flag for pagination', async () => {
|
|
233
|
+
// Given: A channel and thread ts
|
|
234
|
+
const channel = 'C123';
|
|
235
|
+
const threadTs = '1234567890.123456';
|
|
236
|
+
// When: Getting thread replies
|
|
237
|
+
const result = await mockClient.getThreadReplies(channel, threadTs);
|
|
238
|
+
// Then: Should include pagination info
|
|
239
|
+
expect(result.has_more).toBe(false);
|
|
240
|
+
});
|
|
241
|
+
test('all replies have same thread_ts as parent', async () => {
|
|
242
|
+
// Given: A channel and thread ts
|
|
243
|
+
const channel = 'C123';
|
|
244
|
+
const threadTs = '1234567890.123456';
|
|
245
|
+
// When: Getting thread replies
|
|
246
|
+
const result = await mockClient.getThreadReplies(channel, threadTs);
|
|
247
|
+
// Then: All messages should have the same thread_ts
|
|
248
|
+
for (const msg of result.messages) {
|
|
249
|
+
expect(msg.thread_ts).toBe(threadTs);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
describe('output formatting', () => {
|
|
254
|
+
test('formats message output', () => {
|
|
255
|
+
// Given: A message
|
|
256
|
+
const message = {
|
|
257
|
+
ts: '1234567890.123456',
|
|
258
|
+
text: 'Hello',
|
|
259
|
+
type: 'message',
|
|
260
|
+
user: 'U123',
|
|
261
|
+
};
|
|
262
|
+
// When: Formatting output
|
|
263
|
+
const output = { ...message };
|
|
264
|
+
// Then: Should include message fields
|
|
265
|
+
expect(output.ts).toBeDefined();
|
|
266
|
+
expect(output.text).toBe('Hello');
|
|
267
|
+
});
|
|
268
|
+
test('formats multiple messages', () => {
|
|
269
|
+
// Given: Multiple messages
|
|
270
|
+
const messages = [
|
|
271
|
+
{
|
|
272
|
+
ts: '1234567890.123456',
|
|
273
|
+
text: 'First',
|
|
274
|
+
type: 'message',
|
|
275
|
+
user: 'U123',
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
ts: '1234567890.123457',
|
|
279
|
+
text: 'Second',
|
|
280
|
+
type: 'message',
|
|
281
|
+
user: 'U456',
|
|
282
|
+
},
|
|
283
|
+
];
|
|
284
|
+
// When: Formatting
|
|
285
|
+
const output = messages.map((msg) => ({ ...msg }));
|
|
286
|
+
// Then: Should have all messages
|
|
287
|
+
expect(output).toHaveLength(2);
|
|
288
|
+
expect(output[0].text).toBe('First');
|
|
289
|
+
expect(output[1].text).toBe('Second');
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
//# sourceMappingURL=message.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.test.js","sourceRoot":"","sources":["../../../tests/commands/message.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAInE,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,IAAI,UAAuB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ACnC,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE;YACrC,2BAA2B;YAC3B,MAAM,QAAQ,GAAmB;gBAC/B;oBACE,EAAE,EAAE,mBAAmB;oBACvB,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,MAAM;iBACb;gBACD;oBACE,EAAE,EAAE,mBAAmB;oBACvB,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,SAAS;oBACf,IAAI,EAAE,MAAM;iBACb;aACF,CAAA;YAED,mBAAmB;YACnB,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC,CAAA;YAElD,iCAAiC;YACjC,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;YAC9B,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YACpC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACvC,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reaction.test.d.ts","sourceRoot":"","sources":["../../../tests/commands/reaction.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { describe, expect, mock, test } from 'bun:test';
|
|
2
|
+
import { Command } from 'commander';
|
|
3
|
+
import { reactionCommand } from '../../src/platforms/slack/commands/reaction';
|
|
4
|
+
describe('reaction command', () => {
|
|
5
|
+
describe('add subcommand', () => {
|
|
6
|
+
test('adds reaction to message with channel and message ts', async () => {
|
|
7
|
+
const channelId = 'C123';
|
|
8
|
+
const messageTs = '1234567890.123456';
|
|
9
|
+
const emoji = 'thumbsup';
|
|
10
|
+
const mockAddReaction = mock((..._args) => Promise.resolve());
|
|
11
|
+
await mockAddReaction(channelId, messageTs, emoji);
|
|
12
|
+
expect(mockAddReaction).toHaveBeenCalledWith(channelId, messageTs, emoji);
|
|
13
|
+
expect(mockAddReaction).toHaveBeenCalledTimes(1);
|
|
14
|
+
});
|
|
15
|
+
test('handles emoji without colons', async () => {
|
|
16
|
+
const channelId = 'C123';
|
|
17
|
+
const messageTs = '1234567890.123456';
|
|
18
|
+
const emoji = 'thumbsup';
|
|
19
|
+
const mockAddReaction = mock((..._args) => Promise.resolve());
|
|
20
|
+
await mockAddReaction(channelId, messageTs, emoji);
|
|
21
|
+
expect(mockAddReaction).toHaveBeenCalledWith(channelId, messageTs, 'thumbsup');
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
describe('remove subcommand', () => {
|
|
25
|
+
test('removes reaction from message with channel and message ts', async () => {
|
|
26
|
+
const channelId = 'C123';
|
|
27
|
+
const messageTs = '1234567890.123456';
|
|
28
|
+
const emoji = 'thumbsup';
|
|
29
|
+
const mockRemoveReaction = mock((..._args) => Promise.resolve());
|
|
30
|
+
await mockRemoveReaction(channelId, messageTs, emoji);
|
|
31
|
+
expect(mockRemoveReaction).toHaveBeenCalledWith(channelId, messageTs, emoji);
|
|
32
|
+
expect(mockRemoveReaction).toHaveBeenCalledTimes(1);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
describe('list subcommand', () => {
|
|
36
|
+
test('lists reactions on a message', async () => {
|
|
37
|
+
const messageTs = '1234567890.123456';
|
|
38
|
+
const mockMessages = [
|
|
39
|
+
{
|
|
40
|
+
ts: messageTs,
|
|
41
|
+
text: 'Hello',
|
|
42
|
+
type: 'message',
|
|
43
|
+
user: 'U456',
|
|
44
|
+
reactions: [
|
|
45
|
+
{ name: 'thumbsup', count: 2, users: ['U123', 'U456'] },
|
|
46
|
+
{ name: 'heart', count: 1, users: ['U789'] },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
const mockGetMessages = mock(() => Promise.resolve(mockMessages));
|
|
51
|
+
const result = await mockGetMessages();
|
|
52
|
+
expect(result).toHaveLength(1);
|
|
53
|
+
expect(result[0].ts).toBe(messageTs);
|
|
54
|
+
});
|
|
55
|
+
test('returns empty reactions list when no reactions', async () => {
|
|
56
|
+
const messageTs = '1234567890.123456';
|
|
57
|
+
const mockMessages = [
|
|
58
|
+
{
|
|
59
|
+
ts: messageTs,
|
|
60
|
+
text: 'Hello',
|
|
61
|
+
type: 'message',
|
|
62
|
+
user: 'U456',
|
|
63
|
+
reactions: [],
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
const mockGetMessages = mock(() => Promise.resolve(mockMessages));
|
|
67
|
+
const result = await mockGetMessages();
|
|
68
|
+
expect(result).toHaveLength(1);
|
|
69
|
+
expect(result[0].reactions).toEqual([]);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
describe('command structure', () => {
|
|
73
|
+
test('reaction command exists', () => {
|
|
74
|
+
expect(reactionCommand).toBeInstanceOf(Command);
|
|
75
|
+
});
|
|
76
|
+
test('reaction command has correct name', () => {
|
|
77
|
+
expect(reactionCommand.name()).toBe('reaction');
|
|
78
|
+
});
|
|
79
|
+
test('reaction command has description', () => {
|
|
80
|
+
expect(reactionCommand.description()).toBe('Reaction commands');
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=reaction.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reaction.test.js","sourceRoot":"","sources":["../../../tests/commands/reaction.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAA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