agent-messenger 2.6.3 → 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 +19 -15
- 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.d.ts +3 -0
- package/dist/src/platforms/webex/markdown-to-html.d.ts.map +1 -0
- package/dist/src/platforms/webex/markdown-to-html.js +161 -0
- package/dist/src/platforms/webex/markdown-to-html.js.map +1 -0
- 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 +39 -12
- package/src/platforms/webex/client.ts +30 -61
- 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 +141 -0
- package/src/platforms/webex/markdown-to-html.ts +194 -0
- package/src/platforms/webex/token-extractor.ts +6 -29
- package/src/platforms/wechatbot/cli.ts +0 -0
- 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
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
const BLOCK_PLACEHOLDER_PREFIX = '\u0000BLOCK'
|
|
2
|
+
const INLINE_PLACEHOLDER_PREFIX = '\u0000INLINE'
|
|
3
|
+
|
|
4
|
+
export function markdownToHtml(markdown: string): string {
|
|
5
|
+
if (markdown.length === 0) {
|
|
6
|
+
return ''
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const normalized = markdown.replace(/\r\n?/g, '\n')
|
|
10
|
+
if (normalized.trim().length === 0) {
|
|
11
|
+
return normalized
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const { text, blocks } = extractCodeBlocks(normalized)
|
|
15
|
+
const lines = text.split('\n')
|
|
16
|
+
const output: string[] = []
|
|
17
|
+
let paragraph: string[] = []
|
|
18
|
+
|
|
19
|
+
const flushParagraph = () => {
|
|
20
|
+
if (paragraph.length === 0) {
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
output.push(processInline(paragraph.join('\n')).replace(/\n/g, '<br/>'))
|
|
25
|
+
paragraph = []
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
for (let index = 0; index < lines.length; ) {
|
|
29
|
+
const line = lines[index]
|
|
30
|
+
const trimmed = line.trim()
|
|
31
|
+
|
|
32
|
+
if (trimmed.length === 0) {
|
|
33
|
+
flushParagraph()
|
|
34
|
+
index++
|
|
35
|
+
continue
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (isBlockPlaceholder(trimmed)) {
|
|
39
|
+
flushParagraph()
|
|
40
|
+
output.push(trimmed)
|
|
41
|
+
index++
|
|
42
|
+
continue
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const headingMatch = line.match(/^(#{1,6})\s+(.*)$/)
|
|
46
|
+
if (headingMatch) {
|
|
47
|
+
flushParagraph()
|
|
48
|
+
output.push(`<h${headingMatch[1].length}>${processInline(headingMatch[2])}</h${headingMatch[1].length}>`)
|
|
49
|
+
index++
|
|
50
|
+
continue
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (/^---$/.test(trimmed)) {
|
|
54
|
+
flushParagraph()
|
|
55
|
+
output.push('<hr>')
|
|
56
|
+
index++
|
|
57
|
+
continue
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (/^>\s?/.test(line)) {
|
|
61
|
+
flushParagraph()
|
|
62
|
+
const quoteLines: string[] = []
|
|
63
|
+
while (index < lines.length && /^>\s?/.test(lines[index])) {
|
|
64
|
+
quoteLines.push(lines[index].replace(/^>\s?/, ''))
|
|
65
|
+
index++
|
|
66
|
+
}
|
|
67
|
+
output.push(`<blockquote>${processInline(quoteLines.join('\n')).replace(/\n/g, '<br/>')}</blockquote>`)
|
|
68
|
+
continue
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (/^-\s+/.test(line)) {
|
|
72
|
+
flushParagraph()
|
|
73
|
+
const items: string[] = []
|
|
74
|
+
while (index < lines.length && /^-\s+/.test(lines[index])) {
|
|
75
|
+
items.push(`<li>${processInline(lines[index].replace(/^-\s+/, ''))}</li>`)
|
|
76
|
+
index++
|
|
77
|
+
}
|
|
78
|
+
output.push(`<ul>${items.join('')}</ul>`)
|
|
79
|
+
continue
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (/^\d+\.\s+/.test(line)) {
|
|
83
|
+
flushParagraph()
|
|
84
|
+
const items: string[] = []
|
|
85
|
+
while (index < lines.length && /^\d+\.\s+/.test(lines[index])) {
|
|
86
|
+
items.push(`<li>${processInline(lines[index].replace(/^\d+\.\s+/, ''))}</li>`)
|
|
87
|
+
index++
|
|
88
|
+
}
|
|
89
|
+
output.push(`<ol>${items.join('')}</ol>`)
|
|
90
|
+
continue
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
paragraph.push(line)
|
|
94
|
+
index++
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
flushParagraph()
|
|
98
|
+
|
|
99
|
+
return restorePlaceholders(output.join('<br/><br/>'), blocks)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function stripMarkdown(markdown: string): string {
|
|
103
|
+
return markdown
|
|
104
|
+
.replace(/\r\n?/g, '\n')
|
|
105
|
+
.replace(/```([a-zA-Z0-9_-]+)?\n?([\s\S]*?)```/g, (_, _language: string | undefined, code: string) => {
|
|
106
|
+
return code.replace(/\n$/, '')
|
|
107
|
+
})
|
|
108
|
+
.replace(/^---$/gm, '')
|
|
109
|
+
.replace(/^(#{1,6})\s+/gm, '')
|
|
110
|
+
.replace(/^>\s?/gm, '')
|
|
111
|
+
.replace(/^-\s+/gm, '')
|
|
112
|
+
.replace(/^\d+\.\s+/gm, '')
|
|
113
|
+
.replace(/\[([^\]]+)\]\(([^)\n]+)\)/g, '$1')
|
|
114
|
+
.replace(/`([^`\n]+)`/g, '$1')
|
|
115
|
+
.replace(/\*\*\*([^*\n]+)\*\*\*/g, '$1')
|
|
116
|
+
.replace(/\*\*([^*\n]+)\*\*/g, '$1')
|
|
117
|
+
.replace(/(^|[^\w])_([^_\n]+)_(?=[^\w]|$)/g, '$1$2')
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function processInline(markdown: string): string {
|
|
121
|
+
const placeholders: string[] = []
|
|
122
|
+
let text = markdown
|
|
123
|
+
|
|
124
|
+
text = text.replace(/`([^`\n]+)`/g, (_, code: string) => {
|
|
125
|
+
return createInlinePlaceholder(placeholders, `<code>${escapeHtml(code)}</code>`)
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
text = text.replace(/\[([^\]]+)\]\(([^)\n]+)\)/g, (_, label: string, url: string) => {
|
|
129
|
+
if (!isSafeUrl(url)) {
|
|
130
|
+
return processInline(label)
|
|
131
|
+
}
|
|
132
|
+
return createInlinePlaceholder(placeholders, `<a href="${escapeHtml(url)}">${processInline(label)}</a>`)
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
text = escapeHtml(text)
|
|
136
|
+
text = text.replace(/\*\*\*([^*\n]+)\*\*\*/g, '<strong><em>$1</em></strong>')
|
|
137
|
+
text = text.replace(/\*\*([^*\n]+)\*\*/g, '<strong>$1</strong>')
|
|
138
|
+
text = text.replace(/(^|[^\w])_([^_\n]+)_(?=[^\w]|$)/g, '$1<em>$2</em>')
|
|
139
|
+
|
|
140
|
+
return restorePlaceholders(text, placeholders)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function extractCodeBlocks(markdown: string): { text: string; blocks: string[] } {
|
|
144
|
+
const blocks: string[] = []
|
|
145
|
+
const text = markdown.replace(
|
|
146
|
+
/```([a-zA-Z0-9_-]+)?\n([\s\S]*?)\n```/g,
|
|
147
|
+
(_, language: string | undefined, code: string) => {
|
|
148
|
+
const className = language ? ` class="language-${escapeHtml(language)}"` : ''
|
|
149
|
+
return createBlockPlaceholder(blocks, `<pre><code${className}>${escapeHtml(code)}</code></pre>`)
|
|
150
|
+
},
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
return { text, blocks }
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function createBlockPlaceholder(blocks: string[], html: string): string {
|
|
157
|
+
const token = `${BLOCK_PLACEHOLDER_PREFIX}${blocks.length}\u0000`
|
|
158
|
+
blocks.push(html)
|
|
159
|
+
return token
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function createInlinePlaceholder(placeholders: string[], html: string): string {
|
|
163
|
+
const token = `${INLINE_PLACEHOLDER_PREFIX}${placeholders.length}\u0000`
|
|
164
|
+
placeholders.push(html)
|
|
165
|
+
return token
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function isBlockPlaceholder(value: string): boolean {
|
|
169
|
+
return new RegExp(`^${BLOCK_PLACEHOLDER_PREFIX}\\d+\\u0000$`).test(value)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function restorePlaceholders(text: string, values: string[]): string {
|
|
173
|
+
let restored = text
|
|
174
|
+
for (const [index, value] of values.entries()) {
|
|
175
|
+
restored = restored.replaceAll(`${BLOCK_PLACEHOLDER_PREFIX}${index}\u0000`, value)
|
|
176
|
+
restored = restored.replaceAll(`${INLINE_PLACEHOLDER_PREFIX}${index}\u0000`, value)
|
|
177
|
+
}
|
|
178
|
+
return restored
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const SAFE_URL_PATTERN = /^(https?:|mailto:|\/|#)/i
|
|
182
|
+
|
|
183
|
+
function isSafeUrl(url: string): boolean {
|
|
184
|
+
return SAFE_URL_PATTERN.test(url.trim())
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function escapeHtml(value: string): string {
|
|
188
|
+
return value
|
|
189
|
+
.replaceAll('&', '&')
|
|
190
|
+
.replaceAll('<', '<')
|
|
191
|
+
.replaceAll('>', '>')
|
|
192
|
+
.replaceAll('"', '"')
|
|
193
|
+
.replaceAll("'", ''')
|
|
194
|
+
}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
copyFileSync,
|
|
3
|
-
existsSync,
|
|
4
|
-
mkdirSync,
|
|
5
|
-
readdirSync,
|
|
6
|
-
readFileSync,
|
|
7
|
-
rmSync,
|
|
8
|
-
statSync,
|
|
9
|
-
} from 'node:fs'
|
|
1
|
+
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync } from 'node:fs'
|
|
10
2
|
import { homedir, tmpdir } from 'node:os'
|
|
11
3
|
import { join } from 'node:path'
|
|
12
4
|
|
|
@@ -73,8 +65,6 @@ const BROWSERS: BrowserConfig[] = [
|
|
|
73
65
|
},
|
|
74
66
|
]
|
|
75
67
|
|
|
76
|
-
const WEBEX_STORAGE_KEY = '_https://web.webex.com\x00\x01webex-web-client-bounded'
|
|
77
|
-
|
|
78
68
|
interface ScanResult {
|
|
79
69
|
token: ExtractedWebexToken | null
|
|
80
70
|
encryptionKeys: Map<string, string>
|
|
@@ -128,10 +118,7 @@ export class WebexTokenExtractor {
|
|
|
128
118
|
case 'win32':
|
|
129
119
|
relative = browser.win32
|
|
130
120
|
if (!relative) return null
|
|
131
|
-
return join(
|
|
132
|
-
process.env.LOCALAPPDATA || join(homedir(), 'AppData', 'Local'),
|
|
133
|
-
relative,
|
|
134
|
-
)
|
|
121
|
+
return join(process.env.LOCALAPPDATA || join(homedir(), 'AppData', 'Local'), relative)
|
|
135
122
|
default:
|
|
136
123
|
return null
|
|
137
124
|
}
|
|
@@ -176,8 +163,7 @@ export class WebexTokenExtractor {
|
|
|
176
163
|
for (const leveldbDir of profileDirs) {
|
|
177
164
|
this.debug(`Scanning: ${leveldbDir}`)
|
|
178
165
|
|
|
179
|
-
const result = await this.scanViaClassicLevelCopy(leveldbDir)
|
|
180
|
-
?? this.scanRawFiles(leveldbDir)
|
|
166
|
+
const result = (await this.scanViaClassicLevelCopy(leveldbDir)) ?? this.scanRawFiles(leveldbDir)
|
|
181
167
|
|
|
182
168
|
if (result?.token) {
|
|
183
169
|
this.debug(`Found token in: ${leveldbDir}`)
|
|
@@ -339,9 +325,7 @@ export class WebexTokenExtractor {
|
|
|
339
325
|
const innermostMarkerIdx = content.indexOf('"supertoken"')
|
|
340
326
|
|
|
341
327
|
const markerIdx =
|
|
342
|
-
outerObjectMarkerIdx !== -1 ? outerObjectMarkerIdx
|
|
343
|
-
: innermostMarkerIdx !== -1 ? innermostMarkerIdx
|
|
344
|
-
: -1
|
|
328
|
+
outerObjectMarkerIdx !== -1 ? outerObjectMarkerIdx : innermostMarkerIdx !== -1 ? innermostMarkerIdx : -1
|
|
345
329
|
|
|
346
330
|
if (markerIdx === -1) return null
|
|
347
331
|
|
|
@@ -387,11 +371,7 @@ export class WebexTokenExtractor {
|
|
|
387
371
|
try {
|
|
388
372
|
const data = JSON.parse(jsonStr)
|
|
389
373
|
|
|
390
|
-
const supertoken =
|
|
391
|
-
data?.Credentials?.['@']?.supertoken ??
|
|
392
|
-
data?.['@']?.supertoken ??
|
|
393
|
-
data?.supertoken ??
|
|
394
|
-
null
|
|
374
|
+
const supertoken = data?.Credentials?.['@']?.supertoken ?? data?.['@']?.supertoken ?? data?.supertoken ?? null
|
|
395
375
|
|
|
396
376
|
if (!supertoken?.access_token) return null
|
|
397
377
|
|
|
@@ -410,10 +390,7 @@ export class WebexTokenExtractor {
|
|
|
410
390
|
result.expiresAt = Date.now() + supertoken.expires_in * 1000
|
|
411
391
|
}
|
|
412
392
|
|
|
413
|
-
const deviceUrl =
|
|
414
|
-
data?.Device?.['@']?.url ??
|
|
415
|
-
data?.['@']?.deviceUrl ??
|
|
416
|
-
null
|
|
393
|
+
const deviceUrl = data?.Device?.['@']?.url ?? data?.['@']?.deviceUrl ?? null
|
|
417
394
|
if (deviceUrl && typeof deviceUrl === 'string') {
|
|
418
395
|
result.deviceUrl = deviceUrl
|
|
419
396
|
}
|
|
File without changes
|
|
@@ -50,12 +50,16 @@ describe('WeChatBotClient', () => {
|
|
|
50
50
|
describe('login', () => {
|
|
51
51
|
test('throws on empty appId', async () => {
|
|
52
52
|
await expect(new WeChatBotClient().login({ appId: '', appSecret: 'secret' })).rejects.toThrow(WeChatBotError)
|
|
53
|
-
await expect(new WeChatBotClient().login({ appId: '', appSecret: 'secret' })).rejects.toThrow(
|
|
53
|
+
await expect(new WeChatBotClient().login({ appId: '', appSecret: 'secret' })).rejects.toThrow(
|
|
54
|
+
'App ID is required',
|
|
55
|
+
)
|
|
54
56
|
})
|
|
55
57
|
|
|
56
58
|
test('throws on empty appSecret', async () => {
|
|
57
59
|
await expect(new WeChatBotClient().login({ appId: 'wx123', appSecret: '' })).rejects.toThrow(WeChatBotError)
|
|
58
|
-
await expect(new WeChatBotClient().login({ appId: 'wx123', appSecret: '' })).rejects.toThrow(
|
|
60
|
+
await expect(new WeChatBotClient().login({ appId: 'wx123', appSecret: '' })).rejects.toThrow(
|
|
61
|
+
'App Secret is required',
|
|
62
|
+
)
|
|
59
63
|
})
|
|
60
64
|
|
|
61
65
|
test('accepts valid credentials and returns client', async () => {
|
|
@@ -62,7 +62,12 @@ export class WeChatBotClient {
|
|
|
62
62
|
throw new WeChatBotError(`Network error fetching access token: ${msg}`, 'network_error')
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
const data = (await response.json()) as {
|
|
65
|
+
const data = (await response.json()) as {
|
|
66
|
+
access_token?: string
|
|
67
|
+
expires_in?: number
|
|
68
|
+
errcode?: number
|
|
69
|
+
errmsg?: string
|
|
70
|
+
}
|
|
66
71
|
|
|
67
72
|
if (data.errcode) {
|
|
68
73
|
throw new WeChatBotError(data.errmsg ?? `Error ${data.errcode}`, String(data.errcode))
|
|
@@ -13,17 +13,13 @@ mock.module('../client', () => ({
|
|
|
13
13
|
},
|
|
14
14
|
}))
|
|
15
15
|
|
|
16
|
-
const { setAction, statusAction, clearAction, listAction, useAction, removeAction } =
|
|
17
|
-
'@/platforms/wechatbot/commands/auth'
|
|
18
|
-
)
|
|
16
|
+
const { setAction, statusAction, clearAction, listAction, useAction, removeAction } =
|
|
17
|
+
await import('@/platforms/wechatbot/commands/auth')
|
|
19
18
|
|
|
20
19
|
const testDirs: string[] = []
|
|
21
20
|
|
|
22
21
|
function makeCredManager(): WeChatBotCredentialManager {
|
|
23
|
-
const dir = join(
|
|
24
|
-
import.meta.dir,
|
|
25
|
-
`.test-auth-config-${Date.now()}-${Math.random().toString(36).slice(2)}`,
|
|
26
|
-
)
|
|
22
|
+
const dir = join(import.meta.dir, `.test-auth-config-${Date.now()}-${Math.random().toString(36).slice(2)}`)
|
|
27
23
|
testDirs.push(dir)
|
|
28
24
|
return new WeChatBotCredentialManager(dir)
|
|
29
25
|
}
|
|
@@ -24,10 +24,7 @@ const { sendAction, sendNewsAction } = await import('@/platforms/wechatbot/comma
|
|
|
24
24
|
const testDirs: string[] = []
|
|
25
25
|
|
|
26
26
|
function makeCredManager(): WeChatBotCredentialManager {
|
|
27
|
-
const dir = join(
|
|
28
|
-
import.meta.dir,
|
|
29
|
-
`.test-message-config-${Date.now()}-${Math.random().toString(36).slice(2)}`,
|
|
30
|
-
)
|
|
27
|
+
const dir = join(import.meta.dir, `.test-message-config-${Date.now()}-${Math.random().toString(36).slice(2)}`)
|
|
31
28
|
testDirs.push(dir)
|
|
32
29
|
const manager = new WeChatBotCredentialManager(dir)
|
|
33
30
|
return manager
|
|
@@ -28,7 +28,11 @@ export async function sendAction(openId: string, text: string, options: MessageO
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
export async function sendImageAction(
|
|
31
|
+
export async function sendImageAction(
|
|
32
|
+
openId: string,
|
|
33
|
+
mediaId: string,
|
|
34
|
+
options: MessageOptions,
|
|
35
|
+
): Promise<MessageResult> {
|
|
32
36
|
try {
|
|
33
37
|
const client = await getClient(options)
|
|
34
38
|
await client.sendImageMessage(openId, mediaId)
|
|
@@ -31,10 +31,7 @@ const { listAction } = await import('@/platforms/wechatbot/commands/template')
|
|
|
31
31
|
const testDirs: string[] = []
|
|
32
32
|
|
|
33
33
|
function makeCredManager(): WeChatBotCredentialManager {
|
|
34
|
-
const dir = join(
|
|
35
|
-
import.meta.dir,
|
|
36
|
-
`.test-template-config-${Date.now()}-${Math.random().toString(36).slice(2)}`,
|
|
37
|
-
)
|
|
34
|
+
const dir = join(import.meta.dir, `.test-template-config-${Date.now()}-${Math.random().toString(36).slice(2)}`)
|
|
38
35
|
testDirs.push(dir)
|
|
39
36
|
return new WeChatBotCredentialManager(dir)
|
|
40
37
|
}
|
|
@@ -38,10 +38,7 @@ const { listAction } = await import('@/platforms/wechatbot/commands/user')
|
|
|
38
38
|
const testDirs: string[] = []
|
|
39
39
|
|
|
40
40
|
function makeCredManager(): WeChatBotCredentialManager {
|
|
41
|
-
const dir = join(
|
|
42
|
-
import.meta.dir,
|
|
43
|
-
`.test-user-config-${Date.now()}-${Math.random().toString(36).slice(2)}`,
|
|
44
|
-
)
|
|
41
|
+
const dir = join(import.meta.dir, `.test-user-config-${Date.now()}-${Math.random().toString(36).slice(2)}`)
|
|
45
42
|
testDirs.push(dir)
|
|
46
43
|
return new WeChatBotCredentialManager(dir)
|
|
47
44
|
}
|
|
@@ -88,9 +85,7 @@ describe('listAction (user)', () => {
|
|
|
88
85
|
})
|
|
89
86
|
|
|
90
87
|
test('passes nextOpenid option to client', async () => {
|
|
91
|
-
const getFollowersMock = mock(() =>
|
|
92
|
-
Promise.resolve({ total: 1, count: 1, openids: ['openid-3'], next_openid: '' }),
|
|
93
|
-
)
|
|
88
|
+
const getFollowersMock = mock(() => Promise.resolve({ total: 1, count: 1, openids: ['openid-3'], next_openid: '' }))
|
|
94
89
|
mock.module('../client', () => ({
|
|
95
90
|
WeChatBotClient: class MockWeChatBotClient {
|
|
96
91
|
async login() {
|
|
@@ -19,10 +19,7 @@ function isAuthCommand(command: CommandType): boolean {
|
|
|
19
19
|
|
|
20
20
|
const program = new Command()
|
|
21
21
|
|
|
22
|
-
program
|
|
23
|
-
.name('agent-whatsapp')
|
|
24
|
-
.description('CLI tool for WhatsApp via Baileys (linked device)')
|
|
25
|
-
.version(pkg.version)
|
|
22
|
+
program.name('agent-whatsapp').description('CLI tool for WhatsApp via Baileys (linked device)').version(pkg.version)
|
|
26
23
|
|
|
27
24
|
program.hook('preAction', async (_thisCommand, actionCommand) => {
|
|
28
25
|
if (isAuthCommand(actionCommand)) return
|
|
@@ -3,7 +3,9 @@ import { afterEach, beforeEach, describe, expect, mock, spyOn, test } from 'bun:
|
|
|
3
3
|
const originalConsoleLog = console.log
|
|
4
4
|
|
|
5
5
|
mock.module('@/shared/utils/error-handler', () => ({
|
|
6
|
-
handleError: (err: Error) => {
|
|
6
|
+
handleError: (err: Error) => {
|
|
7
|
+
throw err
|
|
8
|
+
},
|
|
7
9
|
}))
|
|
8
10
|
|
|
9
11
|
const mockGetAccount = mock(() => Promise.resolve(null))
|
|
@@ -27,7 +29,9 @@ mock.module('../credential-manager', () => ({
|
|
|
27
29
|
const mockConnect = mock(() => Promise.resolve())
|
|
28
30
|
const mockClose = mock(() => Promise.resolve())
|
|
29
31
|
const mockGetSocket = mock(() => null)
|
|
30
|
-
const mockLogin = mock(function (this: unknown) {
|
|
32
|
+
const mockLogin = mock(function (this: unknown) {
|
|
33
|
+
return Promise.resolve(this)
|
|
34
|
+
})
|
|
31
35
|
|
|
32
36
|
mock.module('../client', () => ({
|
|
33
37
|
WhatsAppClient: class {
|
|
@@ -63,9 +67,12 @@ describe('auth commands', () => {
|
|
|
63
67
|
mockConnect.mockImplementation(() => Promise.resolve())
|
|
64
68
|
mockClose.mockImplementation(() => Promise.resolve())
|
|
65
69
|
mockGetSocket.mockImplementation(() => null)
|
|
66
|
-
mockLogin.mockImplementation(function (this: unknown) {
|
|
70
|
+
mockLogin.mockImplementation(function (this: unknown) {
|
|
71
|
+
return Promise.resolve(this)
|
|
72
|
+
})
|
|
67
73
|
|
|
68
|
-
consoleLogSpy = mock((..._args: unknown[]) => {})
|
|
74
|
+
consoleLogSpy = mock((..._args: unknown[]) => {})
|
|
75
|
+
console.log = consoleLogSpy
|
|
69
76
|
processExitSpy = spyOn(process, 'exit').mockImplementation((_code?: number) => {
|
|
70
77
|
throw new Error(`process.exit(${_code})`)
|
|
71
78
|
})
|
|
@@ -146,9 +153,7 @@ describe('auth commands', () => {
|
|
|
146
153
|
test('outputs error and exits when account not found', async () => {
|
|
147
154
|
mockSetCurrent.mockImplementation(() => Promise.resolve(false))
|
|
148
155
|
|
|
149
|
-
await expect(
|
|
150
|
-
authCommand.parseAsync(['use', 'nonexistent'], { from: 'user' }),
|
|
151
|
-
).rejects.toThrow('process.exit(1)')
|
|
156
|
+
await expect(authCommand.parseAsync(['use', 'nonexistent'], { from: 'user' })).rejects.toThrow('process.exit(1)')
|
|
152
157
|
|
|
153
158
|
expect(processExitSpy).toHaveBeenCalledWith(1)
|
|
154
159
|
const output = JSON.parse(consoleLogSpy.mock.calls[0][0])
|
|
@@ -180,9 +185,7 @@ describe('auth commands', () => {
|
|
|
180
185
|
test('outputs error and exits when no account configured', async () => {
|
|
181
186
|
mockGetAccount.mockImplementation(() => Promise.resolve(null))
|
|
182
187
|
|
|
183
|
-
await expect(
|
|
184
|
-
authCommand.parseAsync(['status'], { from: 'user' }),
|
|
185
|
-
).rejects.toThrow('process.exit(1)')
|
|
188
|
+
await expect(authCommand.parseAsync(['status'], { from: 'user' })).rejects.toThrow('process.exit(1)')
|
|
186
189
|
|
|
187
190
|
expect(processExitSpy).toHaveBeenCalledWith(1)
|
|
188
191
|
const output = JSON.parse(consoleLogSpy.mock.calls[0][0])
|
|
@@ -214,9 +217,9 @@ describe('auth commands', () => {
|
|
|
214
217
|
test('outputs error for specific missing account', async () => {
|
|
215
218
|
mockGetAccount.mockImplementation(() => Promise.resolve(null))
|
|
216
219
|
|
|
217
|
-
await expect(
|
|
218
|
-
|
|
219
|
-
)
|
|
220
|
+
await expect(authCommand.parseAsync(['status', '--account', 'missing-id'], { from: 'user' })).rejects.toThrow(
|
|
221
|
+
'process.exit(1)',
|
|
222
|
+
)
|
|
220
223
|
|
|
221
224
|
expect(processExitSpy).toHaveBeenCalledWith(1)
|
|
222
225
|
const output = JSON.parse(consoleLogSpy.mock.calls[0][0])
|
|
@@ -238,9 +241,7 @@ describe('auth commands', () => {
|
|
|
238
241
|
)
|
|
239
242
|
mockRemoveAccount.mockImplementation(() => Promise.resolve(true))
|
|
240
243
|
|
|
241
|
-
await expect(
|
|
242
|
-
authCommand.parseAsync(['logout'], { from: 'user' }),
|
|
243
|
-
).rejects.toThrow('process.exit(0)')
|
|
244
|
+
await expect(authCommand.parseAsync(['logout'], { from: 'user' })).rejects.toThrow('process.exit(0)')
|
|
244
245
|
|
|
245
246
|
expect(mockRemoveAccount).toHaveBeenCalledWith('plus-12025551234')
|
|
246
247
|
const output = JSON.parse(consoleLogSpy.mock.calls[0][0])
|
|
@@ -252,9 +253,7 @@ describe('auth commands', () => {
|
|
|
252
253
|
test('outputs error and exits when no account configured', async () => {
|
|
253
254
|
mockGetAccount.mockImplementation(() => Promise.resolve(null))
|
|
254
255
|
|
|
255
|
-
await expect(
|
|
256
|
-
authCommand.parseAsync(['logout'], { from: 'user' }),
|
|
257
|
-
).rejects.toThrow('process.exit(1)')
|
|
256
|
+
await expect(authCommand.parseAsync(['logout'], { from: 'user' })).rejects.toThrow('process.exit(1)')
|
|
258
257
|
|
|
259
258
|
expect(processExitSpy).toHaveBeenCalledWith(1)
|
|
260
259
|
const output = JSON.parse(consoleLogSpy.mock.calls[0][0])
|
|
@@ -274,9 +273,7 @@ describe('auth commands', () => {
|
|
|
274
273
|
mockConnect.mockImplementation(() => Promise.reject(new Error('Connection failed')))
|
|
275
274
|
mockRemoveAccount.mockImplementation(() => Promise.resolve(true))
|
|
276
275
|
|
|
277
|
-
await expect(
|
|
278
|
-
authCommand.parseAsync(['logout'], { from: 'user' }),
|
|
279
|
-
).rejects.toThrow('process.exit(0)')
|
|
276
|
+
await expect(authCommand.parseAsync(['logout'], { from: 'user' })).rejects.toThrow('process.exit(0)')
|
|
280
277
|
|
|
281
278
|
expect(mockRemoveAccount).toHaveBeenCalledWith('plus-12025551234')
|
|
282
279
|
const output = JSON.parse(consoleLogSpy.mock.calls[0][0])
|
|
@@ -3,7 +3,9 @@ import { afterEach, beforeEach, describe, expect, mock, spyOn, test } from 'bun:
|
|
|
3
3
|
const originalConsoleLog = console.log
|
|
4
4
|
|
|
5
5
|
mock.module('@/shared/utils/error-handler', () => ({
|
|
6
|
-
handleError: (err: Error) => {
|
|
6
|
+
handleError: (err: Error) => {
|
|
7
|
+
throw err
|
|
8
|
+
},
|
|
7
9
|
}))
|
|
8
10
|
|
|
9
11
|
const mockGetAccount = mock(() =>
|
|
@@ -15,9 +17,7 @@ const mockGetAccount = mock(() =>
|
|
|
15
17
|
updated_at: '2024-01-01T00:00:00.000Z',
|
|
16
18
|
}),
|
|
17
19
|
)
|
|
18
|
-
const mockEnsureAccountPaths = mock(() =>
|
|
19
|
-
Promise.resolve({ account_dir: '/tmp/test', auth_dir: '/tmp/test/auth' }),
|
|
20
|
-
)
|
|
20
|
+
const mockEnsureAccountPaths = mock(() => Promise.resolve({ account_dir: '/tmp/test', auth_dir: '/tmp/test/auth' }))
|
|
21
21
|
|
|
22
22
|
mock.module('../credential-manager', () => ({
|
|
23
23
|
WhatsAppCredentialManager: class {
|
|
@@ -55,7 +55,9 @@ const mockClose = mock(() => Promise.resolve())
|
|
|
55
55
|
|
|
56
56
|
mock.module('../client', () => ({
|
|
57
57
|
WhatsAppClient: class {
|
|
58
|
-
login = mock(function (this: unknown) {
|
|
58
|
+
login = mock(function (this: unknown) {
|
|
59
|
+
return Promise.resolve(this)
|
|
60
|
+
})
|
|
59
61
|
connect = mockConnect
|
|
60
62
|
close = mockClose
|
|
61
63
|
listChats = mockListChats
|
|
@@ -114,7 +116,8 @@ describe('chat commands', () => {
|
|
|
114
116
|
mockConnect.mockImplementation(() => Promise.resolve())
|
|
115
117
|
mockClose.mockImplementation(() => Promise.resolve())
|
|
116
118
|
|
|
117
|
-
consoleLogSpy = mock((..._args: unknown[]) => {})
|
|
119
|
+
consoleLogSpy = mock((..._args: unknown[]) => {})
|
|
120
|
+
console.log = consoleLogSpy
|
|
118
121
|
processExitSpy = spyOn(process, 'exit').mockImplementation((_code?: number) => {
|
|
119
122
|
throw new Error(`process.exit(${_code})`)
|
|
120
123
|
})
|
|
@@ -128,9 +131,7 @@ describe('chat commands', () => {
|
|
|
128
131
|
|
|
129
132
|
describe('list', () => {
|
|
130
133
|
test('lists chats with default limit', async () => {
|
|
131
|
-
await expect(
|
|
132
|
-
chatCommand.parseAsync(['list'], { from: 'user' }),
|
|
133
|
-
).rejects.toThrow('process.exit(0)')
|
|
134
|
+
await expect(chatCommand.parseAsync(['list'], { from: 'user' })).rejects.toThrow('process.exit(0)')
|
|
134
135
|
|
|
135
136
|
expect(mockListChats).toHaveBeenCalledWith(20)
|
|
136
137
|
const output = JSON.parse(consoleLogSpy.mock.calls[0][0])
|
|
@@ -140,17 +141,17 @@ describe('chat commands', () => {
|
|
|
140
141
|
})
|
|
141
142
|
|
|
142
143
|
test('respects --limit option', async () => {
|
|
143
|
-
await expect(
|
|
144
|
-
|
|
145
|
-
)
|
|
144
|
+
await expect(chatCommand.parseAsync(['list', '--limit', '5'], { from: 'user' })).rejects.toThrow(
|
|
145
|
+
'process.exit(0)',
|
|
146
|
+
)
|
|
146
147
|
|
|
147
148
|
expect(mockListChats).toHaveBeenCalledWith(5)
|
|
148
149
|
})
|
|
149
150
|
|
|
150
151
|
test('passes account option to credential manager', async () => {
|
|
151
|
-
await expect(
|
|
152
|
-
|
|
153
|
-
)
|
|
152
|
+
await expect(chatCommand.parseAsync(['list', '--account', 'my-account'], { from: 'user' })).rejects.toThrow(
|
|
153
|
+
'process.exit(0)',
|
|
154
|
+
)
|
|
154
155
|
|
|
155
156
|
expect(mockGetAccount).toHaveBeenCalledWith('my-account')
|
|
156
157
|
})
|
|
@@ -158,9 +159,7 @@ describe('chat commands', () => {
|
|
|
158
159
|
test('exits with error when no account configured', async () => {
|
|
159
160
|
mockGetAccount.mockImplementation(() => Promise.resolve(null))
|
|
160
161
|
|
|
161
|
-
await expect(
|
|
162
|
-
chatCommand.parseAsync(['list'], { from: 'user' }),
|
|
163
|
-
).rejects.toThrow('process.exit(1)')
|
|
162
|
+
await expect(chatCommand.parseAsync(['list'], { from: 'user' })).rejects.toThrow('process.exit(1)')
|
|
164
163
|
|
|
165
164
|
expect(processExitSpy).toHaveBeenCalledWith(1)
|
|
166
165
|
})
|
|
@@ -168,9 +167,7 @@ describe('chat commands', () => {
|
|
|
168
167
|
|
|
169
168
|
describe('search', () => {
|
|
170
169
|
test('searches chats by query', async () => {
|
|
171
|
-
await expect(
|
|
172
|
-
chatCommand.parseAsync(['search', 'Bob'], { from: 'user' }),
|
|
173
|
-
).rejects.toThrow('process.exit(0)')
|
|
170
|
+
await expect(chatCommand.parseAsync(['search', 'Bob'], { from: 'user' })).rejects.toThrow('process.exit(0)')
|
|
174
171
|
|
|
175
172
|
expect(mockSearchChats).toHaveBeenCalledWith('Bob', 20)
|
|
176
173
|
const output = JSON.parse(consoleLogSpy.mock.calls[0][0])
|
|
@@ -180,9 +177,9 @@ describe('chat commands', () => {
|
|
|
180
177
|
})
|
|
181
178
|
|
|
182
179
|
test('respects --limit option', async () => {
|
|
183
|
-
await expect(
|
|
184
|
-
|
|
185
|
-
)
|
|
180
|
+
await expect(chatCommand.parseAsync(['search', 'Alice', '--limit', '3'], { from: 'user' })).rejects.toThrow(
|
|
181
|
+
'process.exit(0)',
|
|
182
|
+
)
|
|
186
183
|
|
|
187
184
|
expect(mockSearchChats).toHaveBeenCalledWith('Alice', 3)
|
|
188
185
|
})
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Command } from 'commander'
|
|
2
|
+
|
|
2
3
|
import { handleError } from '@/shared/utils/error-handler'
|
|
3
4
|
import { formatOutput } from '@/shared/utils/output'
|
|
5
|
+
|
|
4
6
|
import { parseLimitOption, withWhatsAppClient } from './shared'
|
|
5
7
|
|
|
6
8
|
async function listAction(options: { account?: string; pretty?: boolean; limit?: string }): Promise<void> {
|