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
|
+
/**
|
|
2
|
+
* Core type definitions for agent-slack
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
// Zod validation schemas
|
|
6
|
+
export const SlackChannelSchema = z.object({
|
|
7
|
+
id: z.string(),
|
|
8
|
+
name: z.string(),
|
|
9
|
+
is_private: z.boolean(),
|
|
10
|
+
is_archived: z.boolean(),
|
|
11
|
+
created: z.number(),
|
|
12
|
+
creator: z.string(),
|
|
13
|
+
topic: z
|
|
14
|
+
.object({
|
|
15
|
+
value: z.string(),
|
|
16
|
+
creator: z.string(),
|
|
17
|
+
last_set: z.number(),
|
|
18
|
+
})
|
|
19
|
+
.optional(),
|
|
20
|
+
purpose: z
|
|
21
|
+
.object({
|
|
22
|
+
value: z.string(),
|
|
23
|
+
creator: z.string(),
|
|
24
|
+
last_set: z.number(),
|
|
25
|
+
})
|
|
26
|
+
.optional(),
|
|
27
|
+
});
|
|
28
|
+
export const SlackMessageSchema = z.object({
|
|
29
|
+
ts: z.string(),
|
|
30
|
+
text: z.string(),
|
|
31
|
+
user: z.string().optional(),
|
|
32
|
+
username: z.string().optional(),
|
|
33
|
+
type: z.string(),
|
|
34
|
+
thread_ts: z.string().optional(),
|
|
35
|
+
reply_count: z.number().optional(),
|
|
36
|
+
replies: z
|
|
37
|
+
.array(z.object({
|
|
38
|
+
user: z.string(),
|
|
39
|
+
ts: z.string(),
|
|
40
|
+
}))
|
|
41
|
+
.optional(),
|
|
42
|
+
edited: z
|
|
43
|
+
.object({
|
|
44
|
+
user: z.string(),
|
|
45
|
+
ts: z.string(),
|
|
46
|
+
})
|
|
47
|
+
.optional(),
|
|
48
|
+
});
|
|
49
|
+
export const SlackUserSchema = z.object({
|
|
50
|
+
id: z.string(),
|
|
51
|
+
name: z.string(),
|
|
52
|
+
real_name: z.string(),
|
|
53
|
+
is_admin: z.boolean(),
|
|
54
|
+
is_owner: z.boolean(),
|
|
55
|
+
is_bot: z.boolean(),
|
|
56
|
+
is_app_user: z.boolean(),
|
|
57
|
+
profile: z
|
|
58
|
+
.object({
|
|
59
|
+
email: z.string().optional(),
|
|
60
|
+
phone: z.string().optional(),
|
|
61
|
+
title: z.string().optional(),
|
|
62
|
+
status_text: z.string().optional(),
|
|
63
|
+
})
|
|
64
|
+
.optional(),
|
|
65
|
+
});
|
|
66
|
+
export const SlackReactionSchema = z.object({
|
|
67
|
+
name: z.string(),
|
|
68
|
+
count: z.number(),
|
|
69
|
+
users: z.array(z.string()),
|
|
70
|
+
});
|
|
71
|
+
export const SlackFileSchema = z.object({
|
|
72
|
+
id: z.string(),
|
|
73
|
+
name: z.string(),
|
|
74
|
+
title: z.string(),
|
|
75
|
+
mimetype: z.string(),
|
|
76
|
+
size: z.number(),
|
|
77
|
+
url_private: z.string(),
|
|
78
|
+
created: z.number(),
|
|
79
|
+
user: z.string(),
|
|
80
|
+
channels: z.array(z.string()).optional(),
|
|
81
|
+
});
|
|
82
|
+
export const WorkspaceCredentialsSchema = z.object({
|
|
83
|
+
workspace_id: z.string(),
|
|
84
|
+
workspace_name: z.string(),
|
|
85
|
+
token: z.string(),
|
|
86
|
+
cookie: z.string(),
|
|
87
|
+
});
|
|
88
|
+
export const ConfigSchema = z.object({
|
|
89
|
+
current_workspace: z.string().nullable(),
|
|
90
|
+
workspaces: z.record(z.string(), WorkspaceCredentialsSchema),
|
|
91
|
+
});
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/utils/error-handler.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAG9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/utils/error-handler.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,KAAY;IACtC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;IACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAEpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/utils/output.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,IAAa,EAAE,MAAgB;IAC1D,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;AACtE,CAAC"}
|
package/docs/discord.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# Discord Integration
|
|
2
|
+
|
|
3
|
+
Detailed documentation for Discord integration in agent-messenger.
|
|
4
|
+
|
|
5
|
+
> **Note**: `agent-discord` is a convenient shortcut for `agent-messenger discord`.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# 1. Extract credentials from Discord desktop app (zero-config!)
|
|
11
|
+
agent-discord auth extract
|
|
12
|
+
|
|
13
|
+
# 2. Get guild snapshot
|
|
14
|
+
agent-discord snapshot
|
|
15
|
+
|
|
16
|
+
# 3. Send a message
|
|
17
|
+
agent-discord message send <channel-id> "Hello from AI agent!"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Authentication
|
|
21
|
+
|
|
22
|
+
### Seamless Token Extraction
|
|
23
|
+
|
|
24
|
+
agent-discord automatically extracts your Discord credentials from the desktop app:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
agent-discord auth extract
|
|
28
|
+
|
|
29
|
+
# Use --debug for troubleshooting
|
|
30
|
+
agent-discord auth extract --debug
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This command:
|
|
34
|
+
- Auto-detects your platform (macOS/Linux/Windows)
|
|
35
|
+
- Extracts Discord user token from the desktop app
|
|
36
|
+
- Validates token against Discord API
|
|
37
|
+
- Discovers ALL joined guilds (servers)
|
|
38
|
+
- Stores credentials securely in `~/.config/agent-messenger/`
|
|
39
|
+
|
|
40
|
+
### Authentication Commands
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Check auth status
|
|
44
|
+
agent-discord auth status
|
|
45
|
+
|
|
46
|
+
# Logout (clear stored credentials)
|
|
47
|
+
agent-discord auth logout
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Guild Management
|
|
51
|
+
|
|
52
|
+
Discord uses "guilds" (servers) instead of workspaces. You must select a guild before using most commands.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# List all guilds
|
|
56
|
+
agent-discord guild list
|
|
57
|
+
|
|
58
|
+
# Switch to a different guild
|
|
59
|
+
agent-discord guild switch <guild-id>
|
|
60
|
+
|
|
61
|
+
# Show current guild
|
|
62
|
+
agent-discord guild current
|
|
63
|
+
|
|
64
|
+
# Get guild info
|
|
65
|
+
agent-discord guild info <guild-id>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Commands
|
|
69
|
+
|
|
70
|
+
### Message Commands
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Send a message
|
|
74
|
+
agent-discord message send <channel-id> <content>
|
|
75
|
+
agent-discord message send 123456789 "Hello world"
|
|
76
|
+
|
|
77
|
+
# List messages
|
|
78
|
+
agent-discord message list <channel-id>
|
|
79
|
+
agent-discord message list 123456789 --limit 50
|
|
80
|
+
|
|
81
|
+
# Get a specific message
|
|
82
|
+
agent-discord message get <channel-id> <message-id>
|
|
83
|
+
|
|
84
|
+
# Delete a message
|
|
85
|
+
agent-discord message delete <channel-id> <message-id> --force
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Channel Commands
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# List channels in current guild
|
|
92
|
+
agent-discord channel list
|
|
93
|
+
|
|
94
|
+
# Get channel info
|
|
95
|
+
agent-discord channel info <channel-id>
|
|
96
|
+
|
|
97
|
+
# Get channel message history
|
|
98
|
+
agent-discord channel history <channel-id>
|
|
99
|
+
agent-discord channel history 123456789 --limit 100
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### User Commands
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# List guild members
|
|
106
|
+
agent-discord user list
|
|
107
|
+
|
|
108
|
+
# Get user info
|
|
109
|
+
agent-discord user info <user-id>
|
|
110
|
+
|
|
111
|
+
# Get current authenticated user
|
|
112
|
+
agent-discord user me
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Reaction Commands
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Add reaction
|
|
119
|
+
agent-discord reaction add <channel-id> <message-id> <emoji>
|
|
120
|
+
agent-discord reaction add 123456789 987654321 thumbsup
|
|
121
|
+
|
|
122
|
+
# Remove reaction
|
|
123
|
+
agent-discord reaction remove <channel-id> <message-id> <emoji>
|
|
124
|
+
|
|
125
|
+
# List reactions on a message
|
|
126
|
+
agent-discord reaction list <channel-id> <message-id>
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### File Commands
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Upload file to channel
|
|
133
|
+
agent-discord file upload <channel-id> <path>
|
|
134
|
+
agent-discord file upload 123456789 ./report.pdf
|
|
135
|
+
|
|
136
|
+
# List files in channel
|
|
137
|
+
agent-discord file list <channel-id>
|
|
138
|
+
|
|
139
|
+
# Get file info
|
|
140
|
+
agent-discord file info <channel-id> <file-id>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Snapshot Command
|
|
144
|
+
|
|
145
|
+
Get comprehensive guild state for AI agents:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# Full snapshot (channels, members, recent messages)
|
|
149
|
+
agent-discord snapshot
|
|
150
|
+
|
|
151
|
+
# Filtered snapshots
|
|
152
|
+
agent-discord snapshot --channels-only
|
|
153
|
+
agent-discord snapshot --users-only
|
|
154
|
+
|
|
155
|
+
# Limit messages per channel
|
|
156
|
+
agent-discord snapshot --limit 10
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Global Options
|
|
160
|
+
|
|
161
|
+
All commands support these options:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
--pretty # Pretty-print JSON output (default is compact JSON)
|
|
165
|
+
--guild <id> # Use specific guild (overrides current guild)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Key Differences from Slack
|
|
169
|
+
|
|
170
|
+
| Concept | Slack | Discord |
|
|
171
|
+
|---------|-------|---------|
|
|
172
|
+
| Server | Workspace | Guild |
|
|
173
|
+
| Channel ID | Alphanumeric (C01234567) | Numeric snowflake (123456789012345678) |
|
|
174
|
+
| Message ID | Timestamp (1234567890.123456) | Numeric snowflake (123456789012345678) |
|
|
175
|
+
| User ID | Alphanumeric (U01234567) | Numeric snowflake (123456789012345678) |
|
|
176
|
+
| Threads | Thread timestamps | Thread channels |
|
|
177
|
+
|
|
178
|
+
## AI Agent Integration
|
|
179
|
+
|
|
180
|
+
See `skills/agent-messenger/` directory for:
|
|
181
|
+
- Complete skill documentation
|
|
182
|
+
- Runnable templates
|
package/docs/slack.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Slack Integration
|
|
2
|
+
|
|
3
|
+
Detailed documentation for Slack integration in agent-messenger.
|
|
4
|
+
|
|
5
|
+
> **Note**: `agent-slack` is a convenient shortcut for `agent-messenger slack`.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# 1. Extract credentials from Slack desktop app (zero-config!)
|
|
11
|
+
agent-slack auth extract
|
|
12
|
+
|
|
13
|
+
# 2. Get workspace snapshot
|
|
14
|
+
agent-slack snapshot
|
|
15
|
+
|
|
16
|
+
# 3. Send a message
|
|
17
|
+
agent-slack message send general "Hello from AI agent!"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Authentication
|
|
21
|
+
|
|
22
|
+
### Seamless Token Extraction
|
|
23
|
+
|
|
24
|
+
agent-slack automatically extracts your Slack credentials from the desktop app:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
agent-slack auth extract
|
|
28
|
+
|
|
29
|
+
# Use --debug for troubleshooting
|
|
30
|
+
agent-slack auth extract --debug
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This command:
|
|
34
|
+
- Auto-detects your platform (macOS/Linux/Windows)
|
|
35
|
+
- Supports both direct download and App Store versions on macOS
|
|
36
|
+
- Extracts xoxc token and xoxd cookie
|
|
37
|
+
- Validates tokens against Slack API
|
|
38
|
+
- Discovers ALL logged-in workspaces
|
|
39
|
+
- Stores credentials securely in `~/.config/agent-messenger/`
|
|
40
|
+
|
|
41
|
+
### Multi-Workspace Management
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# List all authenticated workspaces
|
|
45
|
+
agent-slack workspace list
|
|
46
|
+
|
|
47
|
+
# Switch to a different workspace
|
|
48
|
+
agent-slack workspace switch <workspace-id>
|
|
49
|
+
|
|
50
|
+
# Show current workspace
|
|
51
|
+
agent-slack workspace current
|
|
52
|
+
|
|
53
|
+
# Check auth status
|
|
54
|
+
agent-slack auth status
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Commands
|
|
58
|
+
|
|
59
|
+
### Message Commands
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Send a message
|
|
63
|
+
agent-slack message send <channel> <text>
|
|
64
|
+
agent-slack message send general "Hello world"
|
|
65
|
+
|
|
66
|
+
# Send a threaded reply
|
|
67
|
+
agent-slack message send general "Reply" --thread <ts>
|
|
68
|
+
|
|
69
|
+
# List messages
|
|
70
|
+
agent-slack message list <channel>
|
|
71
|
+
agent-slack message list general --limit 50
|
|
72
|
+
|
|
73
|
+
# Search messages across workspace
|
|
74
|
+
agent-slack message search <query>
|
|
75
|
+
agent-slack message search "project update" --limit 50
|
|
76
|
+
|
|
77
|
+
# Update a message
|
|
78
|
+
agent-slack message update <channel> <ts> <new-text>
|
|
79
|
+
|
|
80
|
+
# Delete a message
|
|
81
|
+
agent-slack message delete <channel> <ts> --force
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Channel Commands
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# List channels (excludes archived by default)
|
|
88
|
+
agent-slack channel list
|
|
89
|
+
agent-slack channel list --type public
|
|
90
|
+
agent-slack channel list --include-archived
|
|
91
|
+
|
|
92
|
+
# Get channel info
|
|
93
|
+
agent-slack channel info <channel>
|
|
94
|
+
agent-slack channel info general
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### User Commands
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# List users
|
|
101
|
+
agent-slack user list
|
|
102
|
+
agent-slack user list --include-bots
|
|
103
|
+
|
|
104
|
+
# Get user info
|
|
105
|
+
agent-slack user info <user>
|
|
106
|
+
|
|
107
|
+
# Get current user
|
|
108
|
+
agent-slack user me
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Reaction Commands
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
# Add reaction
|
|
115
|
+
agent-slack reaction add <channel> <ts> <emoji>
|
|
116
|
+
agent-slack reaction add general 1234567890.123456 thumbsup
|
|
117
|
+
|
|
118
|
+
# Remove reaction
|
|
119
|
+
agent-slack reaction remove <channel> <ts> <emoji>
|
|
120
|
+
|
|
121
|
+
# List reactions
|
|
122
|
+
agent-slack reaction list <channel> <ts>
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### File Commands
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Upload file
|
|
129
|
+
agent-slack file upload <channel> <path>
|
|
130
|
+
agent-slack file upload general ./report.pdf
|
|
131
|
+
|
|
132
|
+
# List files
|
|
133
|
+
agent-slack file list
|
|
134
|
+
agent-slack file list --channel general
|
|
135
|
+
|
|
136
|
+
# Get file info
|
|
137
|
+
agent-slack file info <file-id>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Snapshot Command
|
|
141
|
+
|
|
142
|
+
Get comprehensive workspace state for AI agents:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Full snapshot
|
|
146
|
+
agent-slack snapshot
|
|
147
|
+
|
|
148
|
+
# Filtered snapshots
|
|
149
|
+
agent-slack snapshot --channels-only
|
|
150
|
+
agent-slack snapshot --users-only
|
|
151
|
+
|
|
152
|
+
# Limit messages per channel
|
|
153
|
+
agent-slack snapshot --limit 10
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## AI Agent Integration
|
|
157
|
+
|
|
158
|
+
See `skills/agent-messenger/` directory for:
|
|
159
|
+
- Complete skill documentation
|
|
160
|
+
- Runnable templates
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-messenger",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Multi-platform messaging CLI for AI agents (Slack, Discord, Teams)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "dist/cli.js",
|
|
7
|
+
"main": "dist/cli.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"agent-messenger": "./src/cli.ts",
|
|
10
|
+
"amsg": "./src/cli.ts",
|
|
11
|
+
"agent-slack": "./src/platforms/slack/cli.ts",
|
|
12
|
+
"agent-discord": "./src/platforms/discord/cli.ts"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc && sed -i '' '1s|#!/usr/bin/env bun|#!/usr/bin/env node|' dist/cli.js",
|
|
16
|
+
"test": "bun test",
|
|
17
|
+
"typecheck": "tsc --noEmit",
|
|
18
|
+
"lint": "biome check .",
|
|
19
|
+
"format": "biome format --write .",
|
|
20
|
+
"dev": "bun --hot ./dist/cli.js",
|
|
21
|
+
"prepublishOnly": "bun run build"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@slack/web-api": "^6.9.0",
|
|
25
|
+
"commander": "^11.1.0",
|
|
26
|
+
"zod": "^3.22.4",
|
|
27
|
+
"classic-level": "^1.3.0",
|
|
28
|
+
"better-sqlite3": "^9.2.2"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@biomejs/biome": "^2.3.13",
|
|
32
|
+
"@types/better-sqlite3": "^7.6.8",
|
|
33
|
+
"@types/bun": "latest",
|
|
34
|
+
"@types/node": "^20.10.6",
|
|
35
|
+
"typescript": "^5.9.3"
|
|
36
|
+
}
|
|
37
|
+
}
|