agent-messenger 2.7.0 → 2.8.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-plugin/plugin.json +1 -1
- package/.github/workflows/ci.yml +6 -0
- package/.oxfmtrc.json +13 -1
- package/.oxlintrc.json +10 -1
- package/README.md +1 -1
- package/dist/package.json +59 -58
- package/dist/src/platforms/channeltalk/client.d.ts.map +1 -1
- package/dist/src/platforms/channeltalk/client.js +2 -2
- package/dist/src/platforms/channeltalk/client.js.map +1 -1
- package/dist/src/platforms/channeltalk/commands/auth.d.ts.map +1 -1
- package/dist/src/platforms/channeltalk/commands/auth.js.map +1 -1
- package/dist/src/platforms/channeltalk/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/channeltalk/commands/message.js.map +1 -1
- package/dist/src/platforms/channeltalk/commands/snapshot.d.ts.map +1 -1
- package/dist/src/platforms/channeltalk/commands/snapshot.js.map +1 -1
- package/dist/src/platforms/channeltalk/ensure-auth.d.ts.map +1 -1
- package/dist/src/platforms/channeltalk/ensure-auth.js.map +1 -1
- package/dist/src/platforms/channeltalk/token-extractor.d.ts +9 -23
- package/dist/src/platforms/channeltalk/token-extractor.d.ts.map +1 -1
- package/dist/src/platforms/channeltalk/token-extractor.js +109 -341
- package/dist/src/platforms/channeltalk/token-extractor.js.map +1 -1
- package/dist/src/platforms/channeltalkbot/client.d.ts +1 -1
- package/dist/src/platforms/channeltalkbot/client.d.ts.map +1 -1
- package/dist/src/platforms/channeltalkbot/client.js +4 -4
- package/dist/src/platforms/channeltalkbot/client.js.map +1 -1
- package/dist/src/platforms/channeltalkbot/commands/auth.d.ts.map +1 -1
- package/dist/src/platforms/channeltalkbot/commands/auth.js +4 -1
- package/dist/src/platforms/channeltalkbot/commands/auth.js.map +1 -1
- package/dist/src/platforms/channeltalkbot/commands/shared.d.ts.map +1 -1
- package/dist/src/platforms/channeltalkbot/commands/shared.js.map +1 -1
- package/dist/src/platforms/discord/commands/auth.js.map +1 -1
- package/dist/src/platforms/discord/commands/whoami.d.ts.map +1 -1
- package/dist/src/platforms/discord/commands/whoami.js.map +1 -1
- package/dist/src/platforms/discord/token-extractor.d.ts +2 -10
- package/dist/src/platforms/discord/token-extractor.d.ts.map +1 -1
- package/dist/src/platforms/discord/token-extractor.js +38 -172
- package/dist/src/platforms/discord/token-extractor.js.map +1 -1
- package/dist/src/platforms/discordbot/client.d.ts.map +1 -1
- package/dist/src/platforms/discordbot/client.js.map +1 -1
- package/dist/src/platforms/instagram/cli.d.ts.map +1 -1
- package/dist/src/platforms/instagram/cli.js +1 -4
- package/dist/src/platforms/instagram/cli.js.map +1 -1
- package/dist/src/platforms/instagram/client.d.ts.map +1 -1
- package/dist/src/platforms/instagram/client.js +8 -7
- package/dist/src/platforms/instagram/client.js.map +1 -1
- package/dist/src/platforms/instagram/commands/auth.d.ts.map +1 -1
- package/dist/src/platforms/instagram/commands/auth.js.map +1 -1
- package/dist/src/platforms/instagram/commands/chat.d.ts.map +1 -1
- package/dist/src/platforms/instagram/commands/chat.js.map +1 -1
- package/dist/src/platforms/instagram/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/instagram/commands/message.js.map +1 -1
- package/dist/src/platforms/instagram/commands/shared.d.ts.map +1 -1
- package/dist/src/platforms/instagram/commands/shared.js.map +1 -1
- package/dist/src/platforms/instagram/credential-manager.d.ts.map +1 -1
- package/dist/src/platforms/instagram/credential-manager.js +1 -1
- package/dist/src/platforms/instagram/credential-manager.js.map +1 -1
- package/dist/src/platforms/instagram/ensure-auth.d.ts.map +1 -1
- package/dist/src/platforms/instagram/ensure-auth.js.map +1 -1
- package/dist/src/platforms/instagram/token-extractor.d.ts +7 -19
- package/dist/src/platforms/instagram/token-extractor.d.ts.map +1 -1
- package/dist/src/platforms/instagram/token-extractor.js +44 -270
- package/dist/src/platforms/instagram/token-extractor.js.map +1 -1
- package/dist/src/platforms/instagram/types.d.ts.map +1 -1
- package/dist/src/platforms/instagram/types.js +4 -2
- package/dist/src/platforms/instagram/types.js.map +1 -1
- package/dist/src/platforms/kakaotalk/auth/kakao-login.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/auth/kakao-login.js +18 -4
- package/dist/src/platforms/kakaotalk/auth/kakao-login.js.map +1 -1
- package/dist/src/platforms/kakaotalk/client.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/client.js +3 -3
- package/dist/src/platforms/kakaotalk/client.js.map +1 -1
- package/dist/src/platforms/kakaotalk/commands/auth.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/commands/auth.js +15 -9
- package/dist/src/platforms/kakaotalk/commands/auth.js.map +1 -1
- package/dist/src/platforms/kakaotalk/commands/shared.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/commands/shared.js.map +1 -1
- package/dist/src/platforms/kakaotalk/protocol/connection.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/protocol/connection.js.map +1 -1
- package/dist/src/platforms/kakaotalk/protocol/crypto.js +1 -1
- package/dist/src/platforms/kakaotalk/protocol/crypto.js.map +1 -1
- package/dist/src/platforms/kakaotalk/protocol/session.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/protocol/session.js +1 -3
- package/dist/src/platforms/kakaotalk/protocol/session.js.map +1 -1
- package/dist/src/platforms/kakaotalk/token-extractor.js +5 -2
- package/dist/src/platforms/kakaotalk/token-extractor.js.map +1 -1
- package/dist/src/platforms/kakaotalk/types.d.ts.map +1 -1
- package/dist/src/platforms/kakaotalk/types.js +4 -2
- package/dist/src/platforms/kakaotalk/types.js.map +1 -1
- package/dist/src/platforms/line/cli.d.ts.map +1 -1
- package/dist/src/platforms/line/cli.js +1 -4
- package/dist/src/platforms/line/cli.js.map +1 -1
- package/dist/src/platforms/line/client.d.ts.map +1 -1
- package/dist/src/platforms/line/client.js +5 -13
- package/dist/src/platforms/line/client.js.map +1 -1
- package/dist/src/platforms/line/commands/chat.d.ts.map +1 -1
- package/dist/src/platforms/line/commands/chat.js.map +1 -1
- package/dist/src/platforms/line/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/line/commands/message.js.map +1 -1
- package/dist/src/platforms/line/listener.js +1 -1
- package/dist/src/platforms/line/listener.js.map +1 -1
- package/dist/src/platforms/slack/cli.d.ts.map +1 -1
- package/dist/src/platforms/slack/cli.js.map +1 -1
- package/dist/src/platforms/slack/client-mappers.d.ts +14 -0
- package/dist/src/platforms/slack/client-mappers.d.ts.map +1 -0
- package/dist/src/platforms/slack/client-mappers.js +245 -0
- package/dist/src/platforms/slack/client-mappers.js.map +1 -0
- package/dist/src/platforms/slack/client.d.ts +0 -1
- package/dist/src/platforms/slack/client.d.ts.map +1 -1
- package/dist/src/platforms/slack/client.js +41 -455
- package/dist/src/platforms/slack/client.js.map +1 -1
- package/dist/src/platforms/slack/commands/channel.d.ts.map +1 -1
- package/dist/src/platforms/slack/commands/channel.js.map +1 -1
- package/dist/src/platforms/slack/commands/emoji.d.ts.map +1 -1
- package/dist/src/platforms/slack/commands/emoji.js +1 -3
- package/dist/src/platforms/slack/commands/emoji.js.map +1 -1
- package/dist/src/platforms/slack/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/slack/commands/message.js.map +1 -1
- package/dist/src/platforms/slack/commands/reminder.d.ts.map +1 -1
- package/dist/src/platforms/slack/commands/reminder.js.map +1 -1
- package/dist/src/platforms/slack/commands/user.d.ts.map +1 -1
- package/dist/src/platforms/slack/commands/user.js.map +1 -1
- package/dist/src/platforms/slack/commands/usergroup.d.ts.map +1 -1
- package/dist/src/platforms/slack/commands/usergroup.js.map +1 -1
- package/dist/src/platforms/slack/commands/whoami.d.ts.map +1 -1
- package/dist/src/platforms/slack/commands/whoami.js.map +1 -1
- package/dist/src/platforms/slack/token-extractor.d.ts +2 -6
- package/dist/src/platforms/slack/token-extractor.d.ts.map +1 -1
- package/dist/src/platforms/slack/token-extractor.js +35 -229
- package/dist/src/platforms/slack/token-extractor.js.map +1 -1
- package/dist/src/platforms/slackbot/cli.d.ts.map +1 -1
- package/dist/src/platforms/slackbot/cli.js +1 -1
- package/dist/src/platforms/slackbot/cli.js.map +1 -1
- package/dist/src/platforms/teams/client.d.ts.map +1 -1
- package/dist/src/platforms/teams/client.js +1 -1
- package/dist/src/platforms/teams/client.js.map +1 -1
- package/dist/src/platforms/teams/commands/auth.d.ts.map +1 -1
- package/dist/src/platforms/teams/commands/auth.js +4 -1
- package/dist/src/platforms/teams/commands/auth.js.map +1 -1
- package/dist/src/platforms/teams/commands/whoami.d.ts.map +1 -1
- package/dist/src/platforms/teams/commands/whoami.js.map +1 -1
- package/dist/src/platforms/teams/token-extractor.d.ts +6 -18
- package/dist/src/platforms/teams/token-extractor.d.ts.map +1 -1
- package/dist/src/platforms/teams/token-extractor.js +71 -324
- package/dist/src/platforms/teams/token-extractor.js.map +1 -1
- package/dist/src/platforms/telegram/cli.d.ts.map +1 -1
- package/dist/src/platforms/telegram/cli.js +1 -4
- package/dist/src/platforms/telegram/cli.js.map +1 -1
- package/dist/src/platforms/telegram/client.d.ts.map +1 -1
- package/dist/src/platforms/telegram/client.js.map +1 -1
- package/dist/src/platforms/telegram/commands/auth.d.ts.map +1 -1
- package/dist/src/platforms/telegram/commands/auth.js +1 -1
- package/dist/src/platforms/telegram/commands/auth.js.map +1 -1
- package/dist/src/platforms/telegram/commands/chat.d.ts.map +1 -1
- package/dist/src/platforms/telegram/commands/chat.js.map +1 -1
- package/dist/src/platforms/telegram/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/telegram/commands/message.js.map +1 -1
- package/dist/src/platforms/telegram/commands/whoami.js +1 -1
- package/dist/src/platforms/telegram/commands/whoami.js.map +1 -1
- package/dist/src/platforms/telegram/credential-manager.d.ts.map +1 -1
- package/dist/src/platforms/telegram/credential-manager.js +6 -2
- package/dist/src/platforms/telegram/credential-manager.js.map +1 -1
- package/dist/src/platforms/telegram/my-telegram-org.js.map +1 -1
- package/dist/src/platforms/webex/cli.d.ts.map +1 -1
- package/dist/src/platforms/webex/cli.js +1 -4
- package/dist/src/platforms/webex/cli.js.map +1 -1
- package/dist/src/platforms/webex/client.d.ts.map +1 -1
- package/dist/src/platforms/webex/client.js +3 -7
- package/dist/src/platforms/webex/client.js.map +1 -1
- package/dist/src/platforms/webex/commands/auth.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/auth.js +1 -3
- package/dist/src/platforms/webex/commands/auth.js.map +1 -1
- package/dist/src/platforms/webex/commands/member.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/member.js +1 -3
- package/dist/src/platforms/webex/commands/member.js.map +1 -1
- package/dist/src/platforms/webex/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/message.js.map +1 -1
- package/dist/src/platforms/webex/commands/snapshot.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/snapshot.js.map +1 -1
- package/dist/src/platforms/webex/commands/space.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/space.js.map +1 -1
- package/dist/src/platforms/webex/commands/whoami.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/whoami.js.map +1 -1
- package/dist/src/platforms/webex/credential-manager.d.ts.map +1 -1
- package/dist/src/platforms/webex/credential-manager.js.map +1 -1
- package/dist/src/platforms/webex/ensure-auth.d.ts.map +1 -1
- package/dist/src/platforms/webex/ensure-auth.js +1 -3
- package/dist/src/platforms/webex/ensure-auth.js.map +1 -1
- package/dist/src/platforms/webex/index.d.ts +1 -1
- package/dist/src/platforms/webex/index.d.ts.map +1 -1
- package/dist/src/platforms/webex/index.js.map +1 -1
- package/dist/src/platforms/webex/markdown-to-html.js.map +1 -1
- package/dist/src/platforms/webex/token-extractor.d.ts.map +1 -1
- package/dist/src/platforms/webex/token-extractor.js +5 -14
- package/dist/src/platforms/webex/token-extractor.js.map +1 -1
- package/dist/src/platforms/wechatbot/client.d.ts.map +1 -1
- package/dist/src/platforms/wechatbot/client.js.map +1 -1
- package/dist/src/platforms/wechatbot/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/wechatbot/commands/message.js.map +1 -1
- package/dist/src/platforms/whatsapp/cli.d.ts.map +1 -1
- package/dist/src/platforms/whatsapp/cli.js +1 -4
- package/dist/src/platforms/whatsapp/cli.js.map +1 -1
- package/dist/src/platforms/whatsapp/commands/chat.d.ts.map +1 -1
- package/dist/src/platforms/whatsapp/commands/chat.js.map +1 -1
- package/dist/src/platforms/whatsapp/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/whatsapp/commands/message.js.map +1 -1
- package/dist/src/platforms/whatsapp/commands/shared.d.ts.map +1 -1
- package/dist/src/platforms/whatsapp/commands/shared.js.map +1 -1
- package/dist/src/platforms/whatsapp/credential-manager.d.ts.map +1 -1
- package/dist/src/platforms/whatsapp/credential-manager.js +1 -1
- package/dist/src/platforms/whatsapp/credential-manager.js.map +1 -1
- package/dist/src/platforms/whatsapp/ensure-auth.d.ts.map +1 -1
- package/dist/src/platforms/whatsapp/ensure-auth.js.map +1 -1
- package/dist/src/platforms/whatsappbot/client.d.ts.map +1 -1
- package/dist/src/platforms/whatsappbot/client.js +2 -2
- package/dist/src/platforms/whatsappbot/client.js.map +1 -1
- package/dist/src/platforms/whatsappbot/commands/auth.d.ts.map +1 -1
- package/dist/src/platforms/whatsappbot/commands/auth.js +4 -1
- package/dist/src/platforms/whatsappbot/commands/auth.js.map +1 -1
- package/dist/src/platforms/whatsappbot/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/whatsappbot/commands/message.js.map +1 -1
- package/dist/src/platforms/whatsappbot/commands/shared.d.ts.map +1 -1
- package/dist/src/platforms/whatsappbot/commands/shared.js.map +1 -1
- package/dist/src/shared/chromium/browsers.d.ts +7 -0
- package/dist/src/shared/chromium/browsers.d.ts.map +1 -0
- package/dist/src/shared/chromium/browsers.js +89 -0
- package/dist/src/shared/chromium/browsers.js.map +1 -0
- package/dist/src/shared/chromium/cookie-reader.d.ts +20 -0
- package/dist/src/shared/chromium/cookie-reader.d.ts.map +1 -0
- package/dist/src/shared/chromium/cookie-reader.js +99 -0
- package/dist/src/shared/chromium/cookie-reader.js.map +1 -0
- package/dist/src/shared/chromium/decryptor.d.ts +42 -0
- package/dist/src/shared/chromium/decryptor.d.ts.map +1 -0
- package/dist/src/shared/chromium/decryptor.js +205 -0
- package/dist/src/shared/chromium/decryptor.js.map +1 -0
- package/dist/src/shared/chromium/index.d.ts +6 -0
- package/dist/src/shared/chromium/index.d.ts.map +1 -0
- package/dist/src/shared/chromium/index.js +4 -0
- package/dist/src/shared/chromium/index.js.map +1 -0
- package/dist/src/shared/chromium/types.d.ts +11 -0
- package/dist/src/shared/chromium/types.d.ts.map +1 -0
- package/dist/src/shared/chromium/types.js +2 -0
- package/dist/src/shared/chromium/types.js.map +1 -0
- package/dist/src/shared/utils/derived-key-cache.d.ts +1 -1
- package/dist/src/shared/utils/derived-key-cache.d.ts.map +1 -1
- package/dist/src/shared/utils/linux-keyring.js +4 -1
- package/dist/src/shared/utils/linux-keyring.js.map +1 -1
- package/dist/src/tui/adapters/kakaotalk-adapter.d.ts.map +1 -1
- package/dist/src/tui/adapters/kakaotalk-adapter.js +6 -1
- package/dist/src/tui/adapters/kakaotalk-adapter.js.map +1 -1
- package/dist/src/tui/adapters/telegram-adapter.js +1 -1
- package/dist/src/tui/adapters/telegram-adapter.js.map +1 -1
- package/dist/src/tui/adapters/webex-adapter.js +1 -1
- package/dist/src/tui/adapters/webex-adapter.js.map +1 -1
- package/dist/src/tui/app.d.ts.map +1 -1
- package/dist/src/tui/app.js +112 -23
- package/dist/src/tui/app.js.map +1 -1
- package/dist/src/tui/utils.d.ts.map +1 -1
- package/dist/src/tui/utils.js +11 -13
- package/dist/src/tui/utils.js.map +1 -1
- package/dist/src/tui/views/channel-picker.d.ts.map +1 -1
- package/dist/src/tui/views/channel-picker.js.map +1 -1
- package/dist/src/tui/views/workspace-picker.d.ts.map +1 -1
- package/dist/src/tui/views/workspace-picker.js.map +1 -1
- package/docs/content/docs/cli/channeltalk.mdx +24 -22
- package/docs/content/docs/cli/channeltalkbot.mdx +7 -7
- package/docs/content/docs/cli/instagram.mdx +4 -4
- package/docs/content/docs/cli/kakaotalk.mdx +9 -8
- package/docs/content/docs/cli/line.mdx +14 -14
- package/docs/content/docs/cli/webex.mdx +19 -19
- package/docs/content/docs/cli/wechatbot.mdx +12 -11
- package/docs/content/docs/cli/whatsapp.mdx +5 -4
- package/docs/content/docs/cli/whatsappbot.mdx +11 -11
- package/docs/content/docs/index.mdx +7 -7
- package/docs/content/docs/meta.json +1 -9
- package/docs/content/docs/sdk/channeltalk.mdx +5 -6
- package/docs/content/docs/sdk/channeltalkbot.mdx +6 -12
- package/docs/content/docs/sdk/discord.mdx +36 -43
- package/docs/content/docs/sdk/instagram.mdx +18 -18
- package/docs/content/docs/sdk/kakaotalk.mdx +27 -18
- package/docs/content/docs/sdk/line.mdx +8 -13
- package/docs/content/docs/sdk/meta.json +14 -1
- package/docs/content/docs/sdk/slack.mdx +36 -42
- package/docs/content/docs/sdk/teams.mdx +2 -8
- package/docs/content/docs/sdk/webex.mdx +2 -12
- package/docs/content/docs/sdk/wechatbot.mdx +1 -5
- package/docs/content/docs/sdk/whatsapp.mdx +10 -19
- package/docs/content/docs/sdk/whatsappbot.mdx +2 -10
- package/docs/content/docs/tui.mdx +23 -23
- package/docs/src/app/page.tsx +353 -108
- package/e2e/channeltalkbot.e2e.test.ts +1 -5
- package/e2e/config.ts +6 -2
- package/package.json +59 -58
- package/scripts/prepublish.ts +1 -3
- package/skills/agent-channeltalk/SKILL.md +1 -1
- package/skills/agent-channeltalkbot/SKILL.md +1 -1
- package/skills/agent-discord/SKILL.md +1 -1
- package/skills/agent-discordbot/SKILL.md +1 -1
- package/skills/agent-instagram/SKILL.md +1 -1
- package/skills/agent-kakaotalk/SKILL.md +1 -1
- package/skills/agent-line/SKILL.md +1 -1
- package/skills/agent-slack/SKILL.md +1 -1
- package/skills/agent-slackbot/SKILL.md +1 -1
- package/skills/agent-teams/SKILL.md +1 -1
- package/skills/agent-telegram/SKILL.md +1 -1
- package/skills/agent-webex/SKILL.md +1 -1
- package/skills/agent-wechatbot/SKILL.md +1 -1
- package/skills/agent-whatsapp/SKILL.md +1 -1
- package/skills/agent-whatsappbot/SKILL.md +1 -1
- package/src/platforms/channeltalk/client.test.ts +116 -29
- package/src/platforms/channeltalk/client.ts +26 -6
- package/src/platforms/channeltalk/commands/auth.test.ts +5 -5
- package/src/platforms/channeltalk/commands/auth.ts +19 -5
- package/src/platforms/channeltalk/commands/message.test.ts +2 -6
- package/src/platforms/channeltalk/commands/message.ts +5 -1
- package/src/platforms/channeltalk/commands/snapshot.test.ts +19 -4
- package/src/platforms/channeltalk/commands/snapshot.ts +5 -1
- package/src/platforms/channeltalk/ensure-auth.test.ts +20 -17
- package/src/platforms/channeltalk/ensure-auth.ts +6 -7
- package/src/platforms/channeltalk/index.ts +0 -1
- package/src/platforms/channeltalk/token-extractor.test.ts +33 -25
- package/src/platforms/channeltalk/token-extractor.ts +120 -372
- package/src/platforms/channeltalkbot/client.test.ts +1 -3
- package/src/platforms/channeltalkbot/client.ts +39 -13
- package/src/platforms/channeltalkbot/commands/auth.test.ts +3 -1
- package/src/platforms/channeltalkbot/commands/auth.ts +4 -1
- package/src/platforms/channeltalkbot/commands/bot.test.ts +13 -5
- package/src/platforms/channeltalkbot/commands/message.test.ts +12 -6
- package/src/platforms/channeltalkbot/commands/shared.ts +6 -2
- package/src/platforms/channeltalkbot/commands/snapshot.test.ts +17 -5
- package/src/platforms/channeltalkbot/credential-manager.test.ts +1 -1
- package/src/platforms/channeltalkbot/index.test.ts +0 -2
- package/src/platforms/channeltalkbot/index.ts +0 -1
- package/src/platforms/discord/commands/auth.test.ts +6 -4
- package/src/platforms/discord/commands/auth.ts +14 -14
- package/src/platforms/discord/commands/whoami.test.ts +2 -4
- package/src/platforms/discord/commands/whoami.ts +2 -0
- package/src/platforms/discord/ensure-auth.test.ts +5 -3
- package/src/platforms/discord/index.ts +0 -1
- package/src/platforms/discord/listener.test.ts +7 -1
- package/src/platforms/discord/token-extractor.test.ts +18 -12
- package/src/platforms/discord/token-extractor.ts +46 -190
- package/src/platforms/discordbot/client.ts +1 -4
- package/src/platforms/discordbot/commands/auth.test.ts +3 -1
- package/src/platforms/discordbot/commands/channel.test.ts +3 -1
- package/src/platforms/discordbot/commands/message.test.ts +3 -1
- package/src/platforms/discordbot/commands/server.test.ts +3 -1
- package/src/platforms/discordbot/commands/snapshot.test.ts +3 -1
- package/src/platforms/discordbot/commands/thread.test.ts +3 -1
- package/src/platforms/discordbot/commands/user.test.ts +3 -1
- package/src/platforms/instagram/cli.ts +1 -4
- package/src/platforms/instagram/client.test.ts +3 -8
- package/src/platforms/instagram/client.ts +39 -34
- package/src/platforms/instagram/commands/auth.test.ts +13 -12
- package/src/platforms/instagram/commands/auth.ts +136 -71
- package/src/platforms/instagram/commands/chat.test.ts +21 -24
- package/src/platforms/instagram/commands/chat.ts +2 -0
- package/src/platforms/instagram/commands/message.test.ts +29 -24
- package/src/platforms/instagram/commands/message.ts +3 -4
- package/src/platforms/instagram/commands/shared.ts +2 -5
- package/src/platforms/instagram/commands/whoami.test.ts +4 -6
- package/src/platforms/instagram/credential-manager.ts +2 -6
- package/src/platforms/instagram/ensure-auth.test.ts +1 -4
- package/src/platforms/instagram/ensure-auth.ts +6 -3
- package/src/platforms/instagram/listener.test.ts +7 -3
- package/src/platforms/instagram/token-extractor.test.ts +4 -16
- package/src/platforms/instagram/token-extractor.ts +55 -309
- package/src/platforms/instagram/types.test.ts +2 -6
- package/src/platforms/instagram/types.ts +4 -2
- package/src/platforms/kakaotalk/auth/kakao-login.ts +30 -8
- package/src/platforms/kakaotalk/client.test.ts +37 -25
- package/src/platforms/kakaotalk/client.ts +23 -12
- package/src/platforms/kakaotalk/commands/auth.test.ts +6 -18
- package/src/platforms/kakaotalk/commands/auth.ts +101 -47
- package/src/platforms/kakaotalk/commands/chat.test.ts +8 -11
- package/src/platforms/kakaotalk/commands/message.test.ts +15 -24
- package/src/platforms/kakaotalk/commands/shared.ts +1 -0
- package/src/platforms/kakaotalk/commands/whoami.test.ts +6 -10
- package/src/platforms/kakaotalk/credential-manager.test.ts +1 -4
- package/src/platforms/kakaotalk/index.test.ts +1 -0
- package/src/platforms/kakaotalk/index.ts +0 -2
- package/src/platforms/kakaotalk/listener.test.ts +7 -1
- package/src/platforms/kakaotalk/protocol/connection.ts +4 -1
- package/src/platforms/kakaotalk/protocol/crypto.ts +1 -1
- package/src/platforms/kakaotalk/protocol/session.ts +12 -6
- package/src/platforms/kakaotalk/token-extractor.ts +5 -5
- package/src/platforms/kakaotalk/types.ts +8 -7
- package/src/platforms/line/cli.ts +1 -4
- package/src/platforms/line/client.ts +12 -20
- package/src/platforms/line/commands/auth.test.ts +2 -1
- package/src/platforms/line/commands/chat.test.ts +2 -1
- package/src/platforms/line/commands/chat.ts +1 -4
- package/src/platforms/line/commands/friend.test.ts +2 -1
- package/src/platforms/line/commands/message.test.ts +2 -1
- package/src/platforms/line/commands/message.ts +2 -9
- package/src/platforms/line/commands/whoami.test.ts +2 -1
- package/src/platforms/line/credential-manager.test.ts +1 -2
- package/src/platforms/line/index.test.ts +1 -0
- package/src/platforms/line/listener.ts +1 -1
- package/src/platforms/line/types.test.ts +1 -0
- package/src/platforms/slack/cli.ts +3 -1
- package/src/platforms/slack/client-mappers.ts +297 -0
- package/src/platforms/slack/client.test.ts +532 -17
- package/src/platforms/slack/client.ts +69 -458
- package/src/platforms/slack/commands/channel.ts +1 -4
- package/src/platforms/slack/commands/emoji.test.ts +6 -4
- package/src/platforms/slack/commands/emoji.ts +20 -22
- package/src/platforms/slack/commands/message.ts +6 -1
- package/src/platforms/slack/commands/pin.test.ts +14 -12
- package/src/platforms/slack/commands/reminder.ts +7 -6
- package/src/platforms/slack/commands/user.ts +6 -1
- package/src/platforms/slack/commands/usergroup.test.ts +3 -3
- package/src/platforms/slack/commands/usergroup.ts +10 -7
- package/src/platforms/slack/commands/whoami.test.ts +1 -1
- package/src/platforms/slack/commands/whoami.ts +2 -0
- package/src/platforms/slack/index.ts +0 -2
- package/src/platforms/slack/listener.test.ts +1 -0
- package/src/platforms/slack/token-extractor.test.ts +7 -12
- package/src/platforms/slack/token-extractor.ts +47 -255
- package/src/platforms/slackbot/cli.ts +8 -1
- package/src/platforms/slackbot/commands/auth.test.ts +3 -1
- package/src/platforms/teams/client.ts +1 -1
- package/src/platforms/teams/commands/auth.test.ts +1 -1
- package/src/platforms/teams/commands/auth.ts +4 -1
- package/src/platforms/teams/commands/whoami.test.ts +2 -4
- package/src/platforms/teams/commands/whoami.ts +2 -0
- package/src/platforms/teams/index.ts +0 -1
- package/src/platforms/teams/token-extractor.ts +82 -350
- package/src/platforms/telegram/app-config.test.ts +1 -0
- package/src/platforms/telegram/chat-utils.test.ts +5 -1
- package/src/platforms/telegram/cli.ts +2 -4
- package/src/platforms/telegram/client.test.ts +16 -3
- package/src/platforms/telegram/client.ts +14 -4
- package/src/platforms/telegram/commands/auth.test.ts +1 -0
- package/src/platforms/telegram/commands/auth.ts +3 -4
- package/src/platforms/telegram/commands/chat.test.ts +2 -5
- package/src/platforms/telegram/commands/chat.ts +1 -0
- package/src/platforms/telegram/commands/message.test.ts +2 -5
- package/src/platforms/telegram/commands/message.ts +1 -0
- package/src/platforms/telegram/commands/shared.test.ts +1 -0
- package/src/platforms/telegram/commands/whoami.test.ts +5 -7
- package/src/platforms/telegram/commands/whoami.ts +1 -1
- package/src/platforms/telegram/credential-manager.test.ts +1 -0
- package/src/platforms/telegram/credential-manager.ts +11 -2
- package/src/platforms/telegram/my-telegram-org.ts +6 -2
- package/src/platforms/telegram/types.test.ts +1 -0
- package/src/platforms/webex/app-config.test.ts +1 -0
- package/src/platforms/webex/cli.ts +1 -4
- package/src/platforms/webex/client.test.ts +4 -12
- package/src/platforms/webex/client.ts +14 -52
- package/src/platforms/webex/commands/auth.test.ts +7 -1
- package/src/platforms/webex/commands/auth.ts +12 -15
- package/src/platforms/webex/commands/member.test.ts +1 -3
- package/src/platforms/webex/commands/member.ts +14 -19
- package/src/platforms/webex/commands/message.ts +4 -15
- package/src/platforms/webex/commands/snapshot.test.ts +28 -3
- package/src/platforms/webex/commands/snapshot.ts +3 -3
- package/src/platforms/webex/commands/space.test.ts +3 -3
- package/src/platforms/webex/commands/space.ts +2 -9
- package/src/platforms/webex/commands/whoami.test.ts +12 -5
- package/src/platforms/webex/commands/whoami.ts +2 -0
- package/src/platforms/webex/credential-manager.ts +11 -2
- package/src/platforms/webex/ensure-auth.ts +1 -3
- package/src/platforms/webex/index.ts +1 -7
- package/src/platforms/webex/markdown-to-html.test.ts +6 -18
- package/src/platforms/webex/markdown-to-html.ts +8 -8
- package/src/platforms/webex/token-extractor.ts +6 -29
- package/src/platforms/wechatbot/client.test.ts +6 -2
- package/src/platforms/wechatbot/client.ts +6 -1
- package/src/platforms/wechatbot/commands/auth.test.ts +3 -7
- package/src/platforms/wechatbot/commands/message.test.ts +1 -4
- package/src/platforms/wechatbot/commands/message.ts +5 -1
- package/src/platforms/wechatbot/commands/template.test.ts +1 -4
- package/src/platforms/wechatbot/commands/user.test.ts +2 -7
- package/src/platforms/whatsapp/cli.ts +1 -4
- package/src/platforms/whatsapp/commands/auth.test.ts +19 -22
- package/src/platforms/whatsapp/commands/chat.test.ts +21 -24
- package/src/platforms/whatsapp/commands/chat.ts +2 -0
- package/src/platforms/whatsapp/commands/message.test.ts +22 -24
- package/src/platforms/whatsapp/commands/message.ts +3 -5
- package/src/platforms/whatsapp/commands/shared.ts +2 -5
- package/src/platforms/whatsapp/commands/whoami.test.ts +2 -2
- package/src/platforms/whatsapp/credential-manager.ts +2 -6
- package/src/platforms/whatsapp/ensure-auth.test.ts +1 -4
- package/src/platforms/whatsapp/ensure-auth.ts +14 -6
- package/src/platforms/whatsapp/index.ts +0 -2
- package/src/platforms/whatsappbot/client.test.ts +13 -7
- package/src/platforms/whatsappbot/client.ts +18 -4
- package/src/platforms/whatsappbot/commands/auth.ts +4 -1
- package/src/platforms/whatsappbot/commands/message.test.ts +12 -2
- package/src/platforms/whatsappbot/commands/message.ts +16 -3
- package/src/platforms/whatsappbot/commands/shared.ts +3 -1
- package/src/platforms/whatsappbot/commands/whoami.test.ts +1 -3
- package/src/platforms/whatsappbot/index.ts +0 -2
- package/src/shared/chromium/browsers.test.ts +274 -0
- package/src/shared/chromium/browsers.ts +86 -0
- package/src/shared/chromium/cookie-reader.test.ts +274 -0
- package/src/shared/chromium/cookie-reader.ts +111 -0
- package/src/shared/chromium/decryptor.test.ts +449 -0
- package/src/shared/chromium/decryptor.ts +227 -0
- package/src/shared/chromium/index.ts +11 -0
- package/src/shared/chromium/types.ts +11 -0
- package/src/shared/utils/derived-key-cache.ts +1 -1
- package/src/shared/utils/linux-keyring.ts +4 -4
- package/src/tui/adapters/kakaotalk-adapter.ts +6 -1
- package/src/tui/adapters/telegram-adapter.ts +1 -1
- package/src/tui/adapters/webex-adapter.ts +1 -1
- package/src/tui/app.ts +149 -59
- package/src/tui/utils.test.ts +144 -145
- package/src/tui/utils.ts +27 -29
- package/src/tui/views/channel-picker.ts +1 -1
- package/src/tui/views/workspace-picker.ts +1 -1
|
@@ -33,13 +33,13 @@ No app creation. No admin approval. No waiting.
|
|
|
33
33
|
|
|
34
34
|
## Key Features
|
|
35
35
|
|
|
36
|
-
| Feature | Description
|
|
37
|
-
| ------------------- |
|
|
38
|
-
| **Auto-extraction** | Pulls tokens from desktop apps automatically
|
|
39
|
-
| **Multi-platform** | Slack, Discord, Microsoft Teams, Telegram, WhatsApp, LINE, Instagram, KakaoTalk, and Channel Talk (beta)
|
|
40
|
-
| **Multi-workspace** | Switch between workspaces/servers easily
|
|
41
|
-
| **JSON output** | Machine-readable by default, `--pretty` for humans
|
|
42
|
-
| **Comprehensive** | Messages, channels, users, reactions, files
|
|
36
|
+
| Feature | Description |
|
|
37
|
+
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| **Auto-extraction** | Pulls tokens from desktop apps automatically |
|
|
39
|
+
| **Multi-platform** | Slack, Discord, Microsoft Teams, Telegram, WhatsApp, LINE, Instagram, KakaoTalk, and Channel Talk (beta) |
|
|
40
|
+
| **Multi-workspace** | Switch between workspaces/servers easily |
|
|
41
|
+
| **JSON output** | Machine-readable by default, `--pretty` for humans |
|
|
42
|
+
| **Comprehensive** | Messages, channels, users, reactions, files |
|
|
43
43
|
| **Bot support** | [`agent-slackbot`](/docs/cli/slackbot), [`agent-discordbot`](/docs/cli/discordbot), and [`agent-channeltalkbot`](/docs/cli/channeltalkbot) for server-side and CI/CD |
|
|
44
44
|
|
|
45
45
|
## Why Not MCP?
|
|
@@ -10,11 +10,7 @@ npm install agent-messenger
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import {
|
|
14
|
-
ChannelClient,
|
|
15
|
-
ChannelCredentialManager,
|
|
16
|
-
ChannelError,
|
|
17
|
-
} from 'agent-messenger/channeltalk'
|
|
13
|
+
import { ChannelClient, ChannelCredentialManager, ChannelError } from 'agent-messenger/channeltalk'
|
|
18
14
|
```
|
|
19
15
|
|
|
20
16
|
## ChannelClient
|
|
@@ -299,7 +295,10 @@ const manager = new ChannelCredentialManager()
|
|
|
299
295
|
const creds = await manager.getCredentials()
|
|
300
296
|
if (!creds) throw new Error('No credentials')
|
|
301
297
|
|
|
302
|
-
const client = await new ChannelClient().login({
|
|
298
|
+
const client = await new ChannelClient().login({
|
|
299
|
+
accountCookie: creds.account_cookie,
|
|
300
|
+
sessionCookie: creds.session_cookie,
|
|
301
|
+
})
|
|
303
302
|
const account = await client.getAccount()
|
|
304
303
|
console.log(`Logged in as ${account.name} (${account.email})`)
|
|
305
304
|
|
|
@@ -10,11 +10,7 @@ npm install agent-messenger
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import {
|
|
14
|
-
ChannelBotClient,
|
|
15
|
-
ChannelBotCredentialManager,
|
|
16
|
-
ChannelBotError,
|
|
17
|
-
} from 'agent-messenger/channeltalkbot'
|
|
13
|
+
import { ChannelBotClient, ChannelBotCredentialManager, ChannelBotError } from 'agent-messenger/channeltalkbot'
|
|
18
14
|
```
|
|
19
15
|
|
|
20
16
|
## ChannelBotClient
|
|
@@ -123,8 +119,8 @@ const file = await client.getGroupFileUrl(groupId, fileKey)
|
|
|
123
119
|
// → { url: string }
|
|
124
120
|
|
|
125
121
|
// Resolve a group by ID or @name (auto-detects format)
|
|
126
|
-
const resolved = await client.resolveGroup('@engineering')
|
|
127
|
-
const byId = await client.resolveGroup('abc123')
|
|
122
|
+
const resolved = await client.resolveGroup('@engineering') // by name
|
|
123
|
+
const byId = await client.resolveGroup('abc123') // by ID
|
|
128
124
|
// → ChannelBotGroup
|
|
129
125
|
```
|
|
130
126
|
|
|
@@ -296,7 +292,7 @@ for (const chat of chats) {
|
|
|
296
292
|
|
|
297
293
|
if (lastMsg?.plainText?.includes('hours')) {
|
|
298
294
|
const reply = ChannelBotClient.wrapTextInBlocks(
|
|
299
|
-
|
|
295
|
+
"Our support hours are Mon–Fri 9am–6pm KST. We'll get back to you shortly!",
|
|
300
296
|
)
|
|
301
297
|
await client.sendUserChatMessage(chat.id, reply, 'Support Bot')
|
|
302
298
|
await client.closeUserChat(chat.id, 'Support Bot')
|
|
@@ -317,9 +313,7 @@ const client = await new ChannelBotClient().login({ accessKey, accessSecret })
|
|
|
317
313
|
const group = await client.resolveGroup('@engineering')
|
|
318
314
|
|
|
319
315
|
// Send deployment notification
|
|
320
|
-
const blocks = ChannelBotClient.wrapTextInBlocks(
|
|
321
|
-
'Deployment v2.1.0 complete — all services healthy'
|
|
322
|
-
)
|
|
316
|
+
const blocks = ChannelBotClient.wrapTextInBlocks('Deployment v2.1.0 complete — all services healthy')
|
|
323
317
|
await client.sendGroupMessage(group.id, blocks, 'Deploy Bot')
|
|
324
318
|
|
|
325
319
|
// Verify delivery
|
|
@@ -388,7 +382,7 @@ for (const chat of openChats.slice(0, 5)) {
|
|
|
388
382
|
|
|
389
383
|
// Send acknowledgment
|
|
390
384
|
const reply = ChannelBotClient.wrapTextInBlocks(
|
|
391
|
-
'Your request has been received. A team member will follow up shortly.'
|
|
385
|
+
'Your request has been received. A team member will follow up shortly.',
|
|
392
386
|
)
|
|
393
387
|
await client.sendUserChatMessage(chat.id, reply, 'Support Bot')
|
|
394
388
|
}
|
|
@@ -10,12 +10,7 @@ npm install agent-messenger
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import {
|
|
14
|
-
DiscordClient,
|
|
15
|
-
DiscordCredentialManager,
|
|
16
|
-
DiscordError,
|
|
17
|
-
DiscordListener,
|
|
18
|
-
} from 'agent-messenger/discord'
|
|
13
|
+
import { DiscordClient, DiscordCredentialManager, DiscordError, DiscordListener } from 'agent-messenger/discord'
|
|
19
14
|
```
|
|
20
15
|
|
|
21
16
|
## DiscordClient
|
|
@@ -183,12 +178,12 @@ const limited = await client.searchMembers(serverId, 'alice', 5)
|
|
|
183
178
|
// Search messages in a server
|
|
184
179
|
const results = await client.searchMessages(serverId, 'deployment failed')
|
|
185
180
|
const filtered = await client.searchMessages(serverId, 'API design', {
|
|
186
|
-
channelId: '123456789',
|
|
187
|
-
authorId: '987654321',
|
|
188
|
-
has: 'file',
|
|
189
|
-
sortBy: 'timestamp',
|
|
190
|
-
sortOrder: 'desc',
|
|
191
|
-
limit: 10,
|
|
181
|
+
channelId: '123456789', // limit to a specific channel
|
|
182
|
+
authorId: '987654321', // limit to a specific author
|
|
183
|
+
has: 'file', // 'file' | 'image' | 'video' | 'embed' | 'link' | 'sticker'
|
|
184
|
+
sortBy: 'timestamp', // 'timestamp' | 'relevance'
|
|
185
|
+
sortOrder: 'desc', // 'asc' | 'desc'
|
|
186
|
+
limit: 10, // max 25
|
|
192
187
|
offset: 0,
|
|
193
188
|
})
|
|
194
189
|
// → { results: DiscordSearchResult[], total: number }
|
|
@@ -200,8 +195,8 @@ const filtered = await client.searchMessages(serverId, 'API design', {
|
|
|
200
195
|
// Create a thread in a channel
|
|
201
196
|
const thread = await client.createThread(channelId, 'Bug Report: Login Issue')
|
|
202
197
|
const configured = await client.createThread(channelId, 'Design Review', {
|
|
203
|
-
auto_archive_duration: 1440,
|
|
204
|
-
rate_limit_per_user: 5,
|
|
198
|
+
auto_archive_duration: 1440, // minutes: 60, 1440, 4320, or 10080
|
|
199
|
+
rate_limit_per_user: 5, // seconds between messages (slow mode)
|
|
205
200
|
})
|
|
206
201
|
// → DiscordChannel (with thread_metadata)
|
|
207
202
|
|
|
@@ -236,7 +231,7 @@ listener.on('discord_event', (event) => {
|
|
|
236
231
|
|
|
237
232
|
listener.on('error', (err) => console.error(err))
|
|
238
233
|
|
|
239
|
-
await listener.start()
|
|
234
|
+
await listener.start() // connects via Gateway WebSocket
|
|
240
235
|
// listener.stop() // clean shutdown
|
|
241
236
|
```
|
|
242
237
|
|
|
@@ -252,21 +247,22 @@ const listener = new DiscordListener(client, {
|
|
|
252
247
|
|
|
253
248
|
### Available Events
|
|
254
249
|
|
|
255
|
-
| Event
|
|
256
|
-
|
|
257
|
-
| `message_create`
|
|
258
|
-
| `message_update`
|
|
259
|
-
| `message_delete`
|
|
260
|
-
| `message_reaction_add` / `message_reaction_remove`
|
|
261
|
-
| `guild_member_add` / `guild_member_remove`
|
|
262
|
-
| `typing_start`
|
|
263
|
-
| `presence_update`
|
|
264
|
-
| `channel_create` / `channel_update` / `channel_delete` | Channel lifecycle
|
|
265
|
-
| `discord_event`
|
|
266
|
-
| `connected` / `disconnected`
|
|
267
|
-
| `error`
|
|
250
|
+
| Event | Description |
|
|
251
|
+
| ------------------------------------------------------ | ------------------------------------------ |
|
|
252
|
+
| `message_create` | New message in a channel or DM |
|
|
253
|
+
| `message_update` | Message content edited |
|
|
254
|
+
| `message_delete` | Message deleted |
|
|
255
|
+
| `message_reaction_add` / `message_reaction_remove` | Reaction changes |
|
|
256
|
+
| `guild_member_add` / `guild_member_remove` | Member joins/leaves server |
|
|
257
|
+
| `typing_start` | Typing indicator |
|
|
258
|
+
| `presence_update` | User online/idle/dnd/offline status |
|
|
259
|
+
| `channel_create` / `channel_update` / `channel_delete` | Channel lifecycle |
|
|
260
|
+
| `discord_event` | Catch-all for every Gateway dispatch event |
|
|
261
|
+
| `connected` / `disconnected` | Connection lifecycle |
|
|
262
|
+
| `error` | Connection or protocol error |
|
|
268
263
|
|
|
269
264
|
Features:
|
|
265
|
+
|
|
270
266
|
- Gateway intents configurable (non-privileged defaults — `MessageContent`, `GuildMembers`, `GuildPresences` require opt-in)
|
|
271
267
|
- Auto-reconnect with exponential backoff
|
|
272
268
|
- Heartbeat keepalive with zombie connection detection
|
|
@@ -422,21 +418,21 @@ const thread = await client.createThread(channelId, 'Project Alpha — Kickoff',
|
|
|
422
418
|
})
|
|
423
419
|
|
|
424
420
|
// Post welcome message in the thread
|
|
425
|
-
await client.sendMessage(
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
421
|
+
await client.sendMessage(
|
|
422
|
+
thread.id,
|
|
423
|
+
[
|
|
424
|
+
'👋 Welcome to **Project Alpha**!',
|
|
425
|
+
'',
|
|
426
|
+
'📋 **Resources** — links and docs will be pinned here',
|
|
427
|
+
'🧵 **Discussions** — use threads to keep things organized',
|
|
428
|
+
'🚀 **Goal** — ship the MVP by end of Q1',
|
|
429
|
+
].join('\n'),
|
|
430
|
+
)
|
|
432
431
|
|
|
433
432
|
// Look up team members and notify them
|
|
434
433
|
const members = await client.searchMembers(serverId, 'alice')
|
|
435
434
|
for (const member of members.slice(0, 3)) {
|
|
436
|
-
await client.sendMessage(
|
|
437
|
-
thread.id,
|
|
438
|
-
`Hey <@${member.user.id}>, you're on the Alpha team — see you here!`,
|
|
439
|
-
)
|
|
435
|
+
await client.sendMessage(thread.id, `Hey <@${member.user.id}>, you're on the Alpha team — see you here!`)
|
|
440
436
|
}
|
|
441
437
|
```
|
|
442
438
|
|
|
@@ -457,10 +453,7 @@ for (const mention of mentions) {
|
|
|
457
453
|
await client.addReaction(mention.channel_id, mention.id, '👀')
|
|
458
454
|
|
|
459
455
|
// Reply with acknowledgment
|
|
460
|
-
await client.sendMessage(
|
|
461
|
-
mention.channel_id,
|
|
462
|
-
`Thanks for the ping <@${mention.author.id}> — on it!`,
|
|
463
|
-
)
|
|
456
|
+
await client.sendMessage(mention.channel_id, `Thanks for the ping <@${mention.author.id}> — on it!`)
|
|
464
457
|
|
|
465
458
|
// Set a note on the user for context
|
|
466
459
|
const existing = await client.getUserNote(mention.author.id)
|
|
@@ -147,12 +147,12 @@ await listener.start()
|
|
|
147
147
|
|
|
148
148
|
### Events
|
|
149
149
|
|
|
150
|
-
| Event
|
|
151
|
-
|
|
152
|
-
| `message`
|
|
153
|
-
| `connected`
|
|
154
|
-
| `disconnected` | —
|
|
155
|
-
| `error`
|
|
150
|
+
| Event | Payload | Description |
|
|
151
|
+
| -------------- | ------------------------- | --------------------------------------- |
|
|
152
|
+
| `message` | `InstagramMessageSummary` | New message received |
|
|
153
|
+
| `connected` | `{ userId: string }` | Initial poll completed, listener active |
|
|
154
|
+
| `disconnected` | — | Listener stopped |
|
|
155
|
+
| `error` | `Error` | Network or API error |
|
|
156
156
|
|
|
157
157
|
The listener seeds its seen-message set on startup, so it only emits `message` events for messages that arrive after `start()`.
|
|
158
158
|
|
|
@@ -227,8 +227,8 @@ import type {
|
|
|
227
227
|
|
|
228
228
|
```typescript
|
|
229
229
|
interface InstagramChatSummary {
|
|
230
|
-
id: string
|
|
231
|
-
name: string
|
|
230
|
+
id: string // Thread ID
|
|
231
|
+
name: string // Thread title or participant names
|
|
232
232
|
type: 'private' | 'group'
|
|
233
233
|
is_group: boolean
|
|
234
234
|
participant_count: number
|
|
@@ -237,13 +237,13 @@ interface InstagramChatSummary {
|
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
interface InstagramMessageSummary {
|
|
240
|
-
id: string
|
|
240
|
+
id: string // Message item ID
|
|
241
241
|
thread_id: string
|
|
242
|
-
from: string
|
|
242
|
+
from: string // User pk (numeric ID)
|
|
243
243
|
from_name?: string
|
|
244
|
-
timestamp: string
|
|
244
|
+
timestamp: string // ISO 8601
|
|
245
245
|
is_outgoing: boolean
|
|
246
|
-
type: string
|
|
246
|
+
type: string // 'text', 'media', 'reel_share', 'link', 'like', etc.
|
|
247
247
|
text?: string
|
|
248
248
|
media_url?: string
|
|
249
249
|
}
|
|
@@ -253,10 +253,10 @@ interface InstagramMessageSummary {
|
|
|
253
253
|
|
|
254
254
|
```typescript
|
|
255
255
|
import {
|
|
256
|
-
createAccountId,
|
|
257
|
-
getMessageType,
|
|
258
|
-
extractMessageText,
|
|
259
|
-
extractMediaUrl,
|
|
256
|
+
createAccountId, // Normalize a username to an account ID
|
|
257
|
+
getMessageType, // Extract message type from API item
|
|
258
|
+
extractMessageText, // Extract text from any message type
|
|
259
|
+
extractMediaUrl, // Extract media URL from any message type
|
|
260
260
|
} from 'agent-messenger/instagram'
|
|
261
261
|
```
|
|
262
262
|
|
|
@@ -272,7 +272,7 @@ import { InstagramClient } from 'agent-messenger/instagram'
|
|
|
272
272
|
const client = await new InstagramClient().login()
|
|
273
273
|
|
|
274
274
|
const chats = await client.listChats(50)
|
|
275
|
-
const unread = chats.filter(c => c.unread_count > 0)
|
|
275
|
+
const unread = chats.filter((c) => c.unread_count > 0)
|
|
276
276
|
|
|
277
277
|
console.log(`${unread.length} threads with unread messages:`)
|
|
278
278
|
for (const chat of unread) {
|
|
@@ -294,7 +294,7 @@ const client = await new InstagramClient().login()
|
|
|
294
294
|
|
|
295
295
|
// Find the user
|
|
296
296
|
const users = await client.searchUsers('alice_smith')
|
|
297
|
-
const alice = users.find(u => u.username === 'alice_smith')
|
|
297
|
+
const alice = users.find((u) => u.username === 'alice_smith')
|
|
298
298
|
|
|
299
299
|
if (alice) {
|
|
300
300
|
const msg = await client.sendMessageToUser(alice.pk, 'Hey! Wanted to follow up on our chat.')
|
|
@@ -10,10 +10,7 @@ npm install agent-messenger
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import {
|
|
14
|
-
KakaoTalkClient,
|
|
15
|
-
KakaoCredentialManager,
|
|
16
|
-
} from 'agent-messenger/kakaotalk'
|
|
13
|
+
import { KakaoTalkClient, KakaoCredentialManager } from 'agent-messenger/kakaotalk'
|
|
17
14
|
```
|
|
18
15
|
|
|
19
16
|
## KakaoTalkClient
|
|
@@ -119,16 +116,16 @@ await listener.start()
|
|
|
119
116
|
|
|
120
117
|
### Events
|
|
121
118
|
|
|
122
|
-
| Event
|
|
123
|
-
|
|
124
|
-
| `message`
|
|
125
|
-
| `member_joined`
|
|
126
|
-
| `member_left`
|
|
127
|
-
| `read`
|
|
128
|
-
| `kakaotalk_event` | `KakaoTalkPushGenericEvent` | Catch-all for all push events
|
|
129
|
-
| `connected`
|
|
130
|
-
| `disconnected`
|
|
131
|
-
| `error`
|
|
119
|
+
| Event | Payload | Description |
|
|
120
|
+
| ----------------- | --------------------------- | ------------------------------------- |
|
|
121
|
+
| `message` | `KakaoTalkPushMessageEvent` | New message received |
|
|
122
|
+
| `member_joined` | `KakaoTalkPushMemberEvent` | Member joined a chat |
|
|
123
|
+
| `member_left` | `KakaoTalkPushMemberEvent` | Member left a chat |
|
|
124
|
+
| `read` | `KakaoTalkPushReadEvent` | Read receipt (unread count decreased) |
|
|
125
|
+
| `kakaotalk_event` | `KakaoTalkPushGenericEvent` | Catch-all for all push events |
|
|
126
|
+
| `connected` | `{ userId: string }` | Connected to LOCO server |
|
|
127
|
+
| `disconnected` | — | Disconnected (will auto-reconnect) |
|
|
128
|
+
| `error` | `Error` | Connection or protocol error |
|
|
132
129
|
|
|
133
130
|
### Reconnection
|
|
134
131
|
|
|
@@ -211,11 +208,15 @@ const manager = new KakaoCredentialManager()
|
|
|
211
208
|
const account = await manager.getAccount()
|
|
212
209
|
if (!account) throw new Error('Not authenticated')
|
|
213
210
|
|
|
214
|
-
const client = await new KakaoTalkClient().login({
|
|
211
|
+
const client = await new KakaoTalkClient().login({
|
|
212
|
+
oauthToken: account.oauth_token,
|
|
213
|
+
userId: account.user_id,
|
|
214
|
+
deviceUuid: account.device_uuid,
|
|
215
|
+
})
|
|
215
216
|
|
|
216
217
|
try {
|
|
217
218
|
const chats = await client.getChats({ all: true })
|
|
218
|
-
const unread = chats.filter(c => c.unread_count > 0)
|
|
219
|
+
const unread = chats.filter((c) => c.unread_count > 0)
|
|
219
220
|
console.log(`${unread.length} chats with unread messages:`)
|
|
220
221
|
for (const chat of unread) {
|
|
221
222
|
console.log(` ${chat.display_name} — ${chat.unread_count} unread`)
|
|
@@ -236,7 +237,11 @@ const manager = new KakaoCredentialManager()
|
|
|
236
237
|
const account = await manager.getAccount()
|
|
237
238
|
if (!account) throw new Error('Not authenticated')
|
|
238
239
|
|
|
239
|
-
const client = await new KakaoTalkClient().login({
|
|
240
|
+
const client = await new KakaoTalkClient().login({
|
|
241
|
+
oauthToken: account.oauth_token,
|
|
242
|
+
userId: account.user_id,
|
|
243
|
+
deviceUuid: account.device_uuid,
|
|
244
|
+
})
|
|
240
245
|
|
|
241
246
|
try {
|
|
242
247
|
const chats = await client.getChats({ search: 'Team' })
|
|
@@ -262,7 +267,11 @@ const manager = new KakaoCredentialManager()
|
|
|
262
267
|
const account = await manager.getAccount()
|
|
263
268
|
if (!account) throw new Error('Not authenticated')
|
|
264
269
|
|
|
265
|
-
const client = await new KakaoTalkClient().login({
|
|
270
|
+
const client = await new KakaoTalkClient().login({
|
|
271
|
+
oauthToken: account.oauth_token,
|
|
272
|
+
userId: account.user_id,
|
|
273
|
+
deviceUuid: account.device_uuid,
|
|
274
|
+
})
|
|
266
275
|
const chatId = '9876543210'
|
|
267
276
|
|
|
268
277
|
let lastLogId: string | undefined
|
|
@@ -10,12 +10,7 @@ npm install agent-messenger
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import {
|
|
14
|
-
LineClient,
|
|
15
|
-
LineListener,
|
|
16
|
-
LineError,
|
|
17
|
-
LineCredentialManager,
|
|
18
|
-
} from 'agent-messenger/line'
|
|
13
|
+
import { LineClient, LineListener, LineError, LineCredentialManager } from 'agent-messenger/line'
|
|
19
14
|
```
|
|
20
15
|
|
|
21
16
|
## LineClient
|
|
@@ -164,13 +159,13 @@ await listener.start()
|
|
|
164
159
|
|
|
165
160
|
### Events
|
|
166
161
|
|
|
167
|
-
| Event
|
|
168
|
-
|
|
169
|
-
| `message`
|
|
170
|
-
| `line_event`
|
|
171
|
-
| `connected`
|
|
172
|
-
| `disconnected` | —
|
|
173
|
-
| `error`
|
|
162
|
+
| Event | Payload | Description |
|
|
163
|
+
| -------------- | ------------------------ | ---------------------------------- |
|
|
164
|
+
| `message` | `LinePushMessageEvent` | New message received |
|
|
165
|
+
| `line_event` | `LinePushGenericEvent` | Catch-all for all LINE events |
|
|
166
|
+
| `connected` | `{ account_id: string }` | Connected to LINE server |
|
|
167
|
+
| `disconnected` | — | Disconnected (will auto-reconnect) |
|
|
168
|
+
| `error` | `Error` | Connection or protocol error |
|
|
174
169
|
|
|
175
170
|
### Reconnection
|
|
176
171
|
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "TypeScript SDK",
|
|
3
|
-
"pages": [
|
|
3
|
+
"pages": [
|
|
4
|
+
"slack",
|
|
5
|
+
"discord",
|
|
6
|
+
"teams",
|
|
7
|
+
"webex",
|
|
8
|
+
"whatsapp",
|
|
9
|
+
"whatsappbot",
|
|
10
|
+
"line",
|
|
11
|
+
"wechatbot",
|
|
12
|
+
"instagram",
|
|
13
|
+
"kakaotalk",
|
|
14
|
+
"channeltalk",
|
|
15
|
+
"channeltalkbot"
|
|
16
|
+
]
|
|
4
17
|
}
|
|
@@ -10,12 +10,7 @@ npm install agent-messenger
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import {
|
|
14
|
-
SlackClient,
|
|
15
|
-
SlackListener,
|
|
16
|
-
SlackError,
|
|
17
|
-
SlackCredentialManager,
|
|
18
|
-
} from 'agent-messenger/slack'
|
|
13
|
+
import { SlackClient, SlackListener, SlackError, SlackCredentialManager } from 'agent-messenger/slack'
|
|
19
14
|
```
|
|
20
15
|
|
|
21
16
|
## SlackClient
|
|
@@ -81,8 +76,8 @@ const url = await client.getPermalink(channel, ts)
|
|
|
81
76
|
|
|
82
77
|
// Search messages across workspace
|
|
83
78
|
const results = await client.searchMessages('keyword', {
|
|
84
|
-
sort: 'timestamp',
|
|
85
|
-
sortDir: 'desc',
|
|
79
|
+
sort: 'timestamp', // 'score' | 'timestamp'
|
|
80
|
+
sortDir: 'desc', // 'asc' | 'desc'
|
|
86
81
|
count: 20,
|
|
87
82
|
})
|
|
88
83
|
// → SlackSearchResult[]
|
|
@@ -122,7 +117,7 @@ const channel = await client.getChannel(channelId)
|
|
|
122
117
|
|
|
123
118
|
// Resolve channel name to ID (passes IDs through unchanged)
|
|
124
119
|
const id = await client.resolveChannel('general')
|
|
125
|
-
const id = await client.resolveChannel('C0ABC123')
|
|
120
|
+
const id = await client.resolveChannel('C0ABC123') // returned as-is
|
|
126
121
|
|
|
127
122
|
// Open a DM (or group DM) — returns existing channel if already open
|
|
128
123
|
const dm = await client.openConversation('U0ABC123')
|
|
@@ -384,25 +379,26 @@ listener.on('slack_event', (event) => {
|
|
|
384
379
|
|
|
385
380
|
listener.on('error', (err) => console.error(err))
|
|
386
381
|
|
|
387
|
-
await listener.start()
|
|
382
|
+
await listener.start() // connects via RTM WebSocket
|
|
388
383
|
// listener.stop() // clean shutdown
|
|
389
384
|
```
|
|
390
385
|
|
|
391
386
|
### Available Events
|
|
392
387
|
|
|
393
|
-
| Event
|
|
394
|
-
|
|
395
|
-
| `message`
|
|
396
|
-
| `reaction_added` / `reaction_removed`
|
|
397
|
-
| `member_joined_channel` / `member_left_channel`
|
|
398
|
-
| `user_typing`
|
|
399
|
-
| `presence_change`
|
|
400
|
-
| `channel_created` / `channel_deleted` / `channel_rename` / `channel_archive` / `channel_unarchive` | Channel lifecycle
|
|
401
|
-
| `slack_event`
|
|
402
|
-
| `connected` / `disconnected`
|
|
403
|
-
| `error`
|
|
388
|
+
| Event | Description |
|
|
389
|
+
| -------------------------------------------------------------------------------------------------- | --------------------------------------- |
|
|
390
|
+
| `message` | New message, edit, delete, thread reply |
|
|
391
|
+
| `reaction_added` / `reaction_removed` | Reaction changes |
|
|
392
|
+
| `member_joined_channel` / `member_left_channel` | Member changes |
|
|
393
|
+
| `user_typing` | Typing indicator |
|
|
394
|
+
| `presence_change` | User active/away status |
|
|
395
|
+
| `channel_created` / `channel_deleted` / `channel_rename` / `channel_archive` / `channel_unarchive` | Channel lifecycle |
|
|
396
|
+
| `slack_event` | Catch-all for every RTM event |
|
|
397
|
+
| `connected` / `disconnected` | Connection lifecycle |
|
|
398
|
+
| `error` | Connection or API error |
|
|
404
399
|
|
|
405
400
|
Features:
|
|
401
|
+
|
|
406
402
|
- No channel subscription needed — receives all workspace events
|
|
407
403
|
- Auto-reconnect with exponential backoff
|
|
408
404
|
- Ping/pong keepalive
|
|
@@ -514,13 +510,16 @@ await client.addBookmark(channel.id, 'Figma Designs', 'https://figma.com/file/ab
|
|
|
514
510
|
})
|
|
515
511
|
|
|
516
512
|
// Pin welcome message
|
|
517
|
-
const welcome = await client.sendMessage(
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
513
|
+
const welcome = await client.sendMessage(
|
|
514
|
+
channel.id,
|
|
515
|
+
[
|
|
516
|
+
'Welcome to *Project Alpha*! 🎉',
|
|
517
|
+
'',
|
|
518
|
+
'📋 *Resources* — check the bookmarks above',
|
|
519
|
+
'🧵 *Discussions* — use threads to keep things organized',
|
|
520
|
+
'📌 *Decisions* — pin important messages',
|
|
521
|
+
].join('\n'),
|
|
522
|
+
)
|
|
524
523
|
await client.pinMessage(channel.id, welcome.ts)
|
|
525
524
|
```
|
|
526
525
|
|
|
@@ -549,11 +548,7 @@ listener.on('message', async (event) => {
|
|
|
549
548
|
|
|
550
549
|
listener.on('reaction_added', async (event) => {
|
|
551
550
|
if (event.reaction === 'ticket' && event.user !== auth.user_id) {
|
|
552
|
-
await client.sendMessage(
|
|
553
|
-
event.item.channel,
|
|
554
|
-
`Ticket created for <@${event.user}>'s message.`,
|
|
555
|
-
event.item.ts,
|
|
556
|
-
)
|
|
551
|
+
await client.sendMessage(event.item.channel, `Ticket created for <@${event.user}>'s message.`, event.item.ts)
|
|
557
552
|
}
|
|
558
553
|
})
|
|
559
554
|
|
|
@@ -626,11 +621,7 @@ for (const result of results) {
|
|
|
626
621
|
await client.addReaction(result.channel.id, result.ts, 'eyes')
|
|
627
622
|
|
|
628
623
|
// Reply in thread
|
|
629
|
-
await client.sendMessage(
|
|
630
|
-
result.channel.id,
|
|
631
|
-
'Flagged for review — will follow up shortly.',
|
|
632
|
-
result.ts,
|
|
633
|
-
)
|
|
624
|
+
await client.sendMessage(result.channel.id, 'Flagged for review — will follow up shortly.', result.ts)
|
|
634
625
|
|
|
635
626
|
// Schedule a follow-up reminder
|
|
636
627
|
const inOneHour = Math.floor(Date.now() / 1000) + 3600
|
|
@@ -663,9 +654,12 @@ for (const file of files.slice(0, 5)) {
|
|
|
663
654
|
// Re-upload to archive
|
|
664
655
|
const uploaded = await client.uploadFile([target], buffer, file.name)
|
|
665
656
|
|
|
666
|
-
await client.sendMessage(
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
657
|
+
await client.sendMessage(
|
|
658
|
+
target,
|
|
659
|
+
[
|
|
660
|
+
`📎 Archived *${file.name}* from <#${source}>`,
|
|
661
|
+
`Original uploader: <@${file.user}> · ${(file.size / 1024).toFixed(0)} KB`,
|
|
662
|
+
].join('\n'),
|
|
663
|
+
)
|
|
670
664
|
}
|
|
671
665
|
```
|
|
@@ -10,11 +10,7 @@ npm install agent-messenger
|
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
|
-
import {
|
|
14
|
-
TeamsClient,
|
|
15
|
-
TeamsCredentialManager,
|
|
16
|
-
TeamsError,
|
|
17
|
-
} from 'agent-messenger/teams'
|
|
13
|
+
import { TeamsClient, TeamsCredentialManager, TeamsError } from 'agent-messenger/teams'
|
|
18
14
|
```
|
|
19
15
|
|
|
20
16
|
## TeamsClient
|
|
@@ -306,9 +302,7 @@ for (const channel of channels.slice(0, 5)) {
|
|
|
306
302
|
const messages = await client.getMessages(teamId, channel.id, 1)
|
|
307
303
|
const latest = messages[0]
|
|
308
304
|
if (latest) {
|
|
309
|
-
console.log(
|
|
310
|
-
`#${channel.name}: "${latest.content.slice(0, 60)}" — ${latest.author.displayName}`,
|
|
311
|
-
)
|
|
305
|
+
console.log(`#${channel.name}: "${latest.content.slice(0, 60)}" — ${latest.author.displayName}`)
|
|
312
306
|
} else {
|
|
313
307
|
console.log(`#${channel.name}: (no messages)`)
|
|
314
308
|
}
|