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,332 @@
|
|
|
1
|
+
# Authentication Guide
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
agent-slack uses Slack's web client credentials (xoxc token + xoxd cookie) extracted directly from the Slack desktop application. This provides seamless authentication without manual token management.
|
|
6
|
+
|
|
7
|
+
## Token Extraction
|
|
8
|
+
|
|
9
|
+
### Automatic Extraction
|
|
10
|
+
|
|
11
|
+
The simplest way to authenticate:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
agent-slack auth extract
|
|
15
|
+
|
|
16
|
+
# Use --debug for troubleshooting extraction issues
|
|
17
|
+
agent-slack auth extract --debug
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This command:
|
|
21
|
+
1. Detects your operating system (macOS, Linux, Windows)
|
|
22
|
+
2. Locates the Slack desktop app data directory (supports both direct download and App Store versions on macOS)
|
|
23
|
+
3. Reads the LevelDB storage containing session data
|
|
24
|
+
4. Decrypts cookies using macOS Keychain (for sandboxed App Store version)
|
|
25
|
+
5. Validates tokens against Slack API before saving
|
|
26
|
+
6. Extracts xoxc token and xoxd cookie for ALL logged-in workspaces
|
|
27
|
+
7. Stores credentials securely in `~/.config/agent-messenger/slack-credentials.json`
|
|
28
|
+
|
|
29
|
+
### Platform-Specific Paths
|
|
30
|
+
|
|
31
|
+
**macOS (Direct Download):**
|
|
32
|
+
```
|
|
33
|
+
~/Library/Application Support/Slack/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**macOS (App Store / Sandboxed):**
|
|
37
|
+
```
|
|
38
|
+
~/Library/Containers/com.tinyspeck.slackmacgap/Data/Library/Application Support/Slack/
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Linux:**
|
|
42
|
+
```
|
|
43
|
+
~/.config/Slack/
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Windows:**
|
|
47
|
+
```
|
|
48
|
+
%APPDATA%\Slack\
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The tool searches multiple locations within these directories:
|
|
52
|
+
- `Local Storage/leveldb/` - Primary token storage
|
|
53
|
+
- `storage/` - Alternative storage location
|
|
54
|
+
- `Cookies` - Encrypted cookie database (decrypted via Keychain on macOS)
|
|
55
|
+
|
|
56
|
+
### What Gets Extracted
|
|
57
|
+
|
|
58
|
+
For each workspace you're logged into:
|
|
59
|
+
|
|
60
|
+
- **workspace_id**: Team ID (e.g., `T123456`)
|
|
61
|
+
- **workspace_name**: Human-readable workspace name
|
|
62
|
+
- **token**: xoxc token (starts with `xoxc-`)
|
|
63
|
+
- **cookie**: xoxd cookie (starts with `xoxd-`)
|
|
64
|
+
|
|
65
|
+
## Multi-Workspace Management
|
|
66
|
+
|
|
67
|
+
### List Workspaces
|
|
68
|
+
|
|
69
|
+
See all authenticated workspaces:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
agent-slack workspace list
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Output:
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"success": true,
|
|
79
|
+
"data": {
|
|
80
|
+
"current": "T123456",
|
|
81
|
+
"workspaces": [
|
|
82
|
+
{
|
|
83
|
+
"workspace_id": "T123456",
|
|
84
|
+
"workspace_name": "My Company",
|
|
85
|
+
"is_current": true
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"workspace_id": "T789012",
|
|
89
|
+
"workspace_name": "Side Project",
|
|
90
|
+
"is_current": false
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Switch Workspace
|
|
98
|
+
|
|
99
|
+
Change the active workspace:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
agent-slack workspace switch T789012
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
All subsequent commands will use the selected workspace until you switch again.
|
|
106
|
+
|
|
107
|
+
### Current Workspace
|
|
108
|
+
|
|
109
|
+
Check which workspace is active:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
agent-slack workspace current
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Credential Storage
|
|
116
|
+
|
|
117
|
+
### Location
|
|
118
|
+
|
|
119
|
+
Credentials are stored in:
|
|
120
|
+
```
|
|
121
|
+
~/.config/agent-messenger/slack-credentials.json
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Format
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"current_workspace": "T123456",
|
|
129
|
+
"workspaces": {
|
|
130
|
+
"T123456": {
|
|
131
|
+
"workspace_id": "T123456",
|
|
132
|
+
"workspace_name": "My Company",
|
|
133
|
+
"token": "xoxc-1234567890-1234567890-1234567890-abcdef...",
|
|
134
|
+
"cookie": "xoxd-abcdef1234567890..."
|
|
135
|
+
},
|
|
136
|
+
"T789012": {
|
|
137
|
+
"workspace_id": "T789012",
|
|
138
|
+
"workspace_name": "Side Project",
|
|
139
|
+
"token": "xoxc-9876543210-9876543210-9876543210-fedcba...",
|
|
140
|
+
"cookie": "xoxd-fedcba9876543210..."
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Security
|
|
147
|
+
|
|
148
|
+
- File permissions: `0600` (owner read/write only)
|
|
149
|
+
- Tokens are stored in plaintext (same as Slack desktop app)
|
|
150
|
+
- Keep this file secure - it grants full access to your Slack workspaces
|
|
151
|
+
|
|
152
|
+
## Authentication Status
|
|
153
|
+
|
|
154
|
+
Check if you're authenticated:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
agent-slack auth status
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Output when authenticated:
|
|
161
|
+
```json
|
|
162
|
+
{
|
|
163
|
+
"success": true,
|
|
164
|
+
"data": {
|
|
165
|
+
"authenticated": true,
|
|
166
|
+
"workspace_id": "T123456",
|
|
167
|
+
"workspace_name": "My Company",
|
|
168
|
+
"user_id": "U123456",
|
|
169
|
+
"user_name": "john.doe"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Output when not authenticated:
|
|
175
|
+
```json
|
|
176
|
+
{
|
|
177
|
+
"success": false,
|
|
178
|
+
"error": {
|
|
179
|
+
"code": "NO_WORKSPACE",
|
|
180
|
+
"message": "No workspace authenticated. Run: agent-slack auth extract"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Token Lifecycle
|
|
186
|
+
|
|
187
|
+
### When Tokens Expire
|
|
188
|
+
|
|
189
|
+
Slack web tokens can expire or be invalidated when:
|
|
190
|
+
- You log out of Slack desktop app
|
|
191
|
+
- You change your password
|
|
192
|
+
- Workspace admin revokes sessions
|
|
193
|
+
- Token naturally expires (rare)
|
|
194
|
+
|
|
195
|
+
### Re-authentication
|
|
196
|
+
|
|
197
|
+
If commands start failing with auth errors:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Re-extract credentials
|
|
201
|
+
agent-slack auth extract
|
|
202
|
+
|
|
203
|
+
# Verify it worked
|
|
204
|
+
agent-slack auth status
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Troubleshooting
|
|
208
|
+
|
|
209
|
+
### Using Debug Mode
|
|
210
|
+
|
|
211
|
+
For any extraction issues, run with `--debug` to see detailed information:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
agent-slack auth extract --debug
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
This shows:
|
|
218
|
+
- Which Slack directory was found
|
|
219
|
+
- How many workspaces were discovered
|
|
220
|
+
- Token validation results for each workspace
|
|
221
|
+
|
|
222
|
+
### "Slack desktop app not found"
|
|
223
|
+
|
|
224
|
+
**Cause**: Slack desktop app not installed or in non-standard location
|
|
225
|
+
|
|
226
|
+
**Solution**:
|
|
227
|
+
1. Install Slack desktop app
|
|
228
|
+
2. Log in to your workspace(s)
|
|
229
|
+
3. Run `agent-slack auth extract` again
|
|
230
|
+
|
|
231
|
+
### "No workspaces found"
|
|
232
|
+
|
|
233
|
+
**Cause**: Not logged into any workspaces in Slack desktop app
|
|
234
|
+
|
|
235
|
+
**Solution**:
|
|
236
|
+
1. Open Slack desktop app
|
|
237
|
+
2. Sign in to at least one workspace
|
|
238
|
+
3. Run `agent-slack auth extract` again
|
|
239
|
+
|
|
240
|
+
### "Permission denied reading Slack data"
|
|
241
|
+
|
|
242
|
+
**Cause**: Insufficient file system permissions
|
|
243
|
+
|
|
244
|
+
**Solution** (macOS):
|
|
245
|
+
1. Grant Terminal/iTerm full disk access in System Preferences
|
|
246
|
+
2. Security & Privacy → Privacy → Full Disk Access
|
|
247
|
+
3. Add your terminal application
|
|
248
|
+
|
|
249
|
+
### "Invalid token" errors during API calls
|
|
250
|
+
|
|
251
|
+
**Cause**: Token expired or invalidated
|
|
252
|
+
|
|
253
|
+
**Solution**:
|
|
254
|
+
```bash
|
|
255
|
+
# Re-extract fresh credentials
|
|
256
|
+
agent-slack auth extract
|
|
257
|
+
|
|
258
|
+
# Test authentication
|
|
259
|
+
agent-slack auth status
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### "Extracted tokens are invalid" (macOS App Store version)
|
|
263
|
+
|
|
264
|
+
**Cause**: Session may have expired or you're logged out of Slack
|
|
265
|
+
|
|
266
|
+
**Solution**:
|
|
267
|
+
1. Open Slack desktop app
|
|
268
|
+
2. Make sure you're logged in (send a message to verify)
|
|
269
|
+
3. Run `agent-slack auth extract --debug` to see details
|
|
270
|
+
4. If issues persist, try logging out and back into Slack
|
|
271
|
+
|
|
272
|
+
## Security Considerations
|
|
273
|
+
|
|
274
|
+
### What agent-slack Can Access
|
|
275
|
+
|
|
276
|
+
With extracted credentials, agent-slack has the same permissions as you in the Slack desktop app:
|
|
277
|
+
- Read all channels you have access to
|
|
278
|
+
- Send messages as you
|
|
279
|
+
- Upload/download files
|
|
280
|
+
- Manage reactions
|
|
281
|
+
- Access user information
|
|
282
|
+
|
|
283
|
+
### What agent-slack Cannot Do
|
|
284
|
+
|
|
285
|
+
- Access channels you don't have permission for
|
|
286
|
+
- Perform admin operations (unless you're an admin)
|
|
287
|
+
- Access other users' DMs
|
|
288
|
+
- Modify workspace settings (not implemented)
|
|
289
|
+
|
|
290
|
+
### Best Practices
|
|
291
|
+
|
|
292
|
+
1. **Protect credentials.json**: Never commit to version control
|
|
293
|
+
2. **Use workspace switching**: Don't mix personal/work contexts
|
|
294
|
+
3. **Re-extract periodically**: Keep tokens fresh
|
|
295
|
+
4. **Revoke if compromised**: Log out of Slack desktop app to invalidate tokens
|
|
296
|
+
|
|
297
|
+
## Manual Token Management (Advanced)
|
|
298
|
+
|
|
299
|
+
If automatic extraction fails, you can manually create credentials:
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
# Create config directory
|
|
303
|
+
mkdir -p ~/.config/agent-messenger
|
|
304
|
+
|
|
305
|
+
# Create credentials file
|
|
306
|
+
cat > ~/.config/agent-messenger/slack-credentials.json << 'EOF'
|
|
307
|
+
{
|
|
308
|
+
"current_workspace": "T123456",
|
|
309
|
+
"workspaces": {
|
|
310
|
+
"T123456": {
|
|
311
|
+
"workspace_id": "T123456",
|
|
312
|
+
"workspace_name": "My Workspace",
|
|
313
|
+
"token": "xoxc-YOUR-TOKEN-HERE",
|
|
314
|
+
"cookie": "xoxd-YOUR-COOKIE-HERE"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
EOF
|
|
319
|
+
|
|
320
|
+
# Set secure permissions
|
|
321
|
+
chmod 600 ~/.config/agent-messenger/slack-credentials.json
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
To find tokens manually:
|
|
325
|
+
1. Open Slack in browser (not desktop app)
|
|
326
|
+
2. Open DevTools → Network tab
|
|
327
|
+
3. Make any API call (send message, etc.)
|
|
328
|
+
4. Find request to `api.slack.com`
|
|
329
|
+
5. Copy `token` from request payload (xoxc)
|
|
330
|
+
6. Copy `d` cookie from request headers (xoxd)
|
|
331
|
+
|
|
332
|
+
**Note**: Browser tokens may have different permissions than desktop app tokens.
|