agent-messenger 2.7.0 → 2.9.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 -12
- 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 +4 -2
- package/dist/src/platforms/channeltalk/commands/snapshot.d.ts.map +1 -1
- package/dist/src/platforms/channeltalk/commands/snapshot.js +86 -31
- 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/channeltalkbot/commands/snapshot.d.ts +3 -1
- package/dist/src/platforms/channeltalkbot/commands/snapshot.d.ts.map +1 -1
- package/dist/src/platforms/channeltalkbot/commands/snapshot.js +110 -60
- package/dist/src/platforms/channeltalkbot/commands/snapshot.js.map +1 -1
- package/dist/src/platforms/discord/commands/auth.js.map +1 -1
- package/dist/src/platforms/discord/commands/snapshot.d.ts +1 -0
- package/dist/src/platforms/discord/commands/snapshot.d.ts.map +1 -1
- package/dist/src/platforms/discord/commands/snapshot.js +48 -34
- package/dist/src/platforms/discord/commands/snapshot.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/discordbot/commands/snapshot.d.ts +2 -0
- package/dist/src/platforms/discordbot/commands/snapshot.d.ts.map +1 -1
- package/dist/src/platforms/discordbot/commands/snapshot.js +46 -34
- package/dist/src/platforms/discordbot/commands/snapshot.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/snapshot.d.ts.map +1 -1
- package/dist/src/platforms/slack/commands/snapshot.js +75 -55
- package/dist/src/platforms/slack/commands/snapshot.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/snapshot.d.ts +1 -0
- package/dist/src/platforms/teams/commands/snapshot.d.ts.map +1 -1
- package/dist/src/platforms/teams/commands/snapshot.js +44 -31
- package/dist/src/platforms/teams/commands/snapshot.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 +1 -0
- package/dist/src/platforms/webex/commands/snapshot.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/snapshot.js +14 -7
- 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/agent-skills.mdx +0 -10
- package/docs/content/docs/cli/channeltalk.mdx +42 -30
- package/docs/content/docs/cli/channeltalkbot.mdx +23 -13
- package/docs/content/docs/cli/discord.mdx +23 -7
- package/docs/content/docs/cli/discordbot.mdx +23 -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/slack.mdx +24 -7
- package/docs/content/docs/cli/teams.mdx +24 -8
- package/docs/content/docs/cli/webex.mdx +34 -21
- 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 +19 -9
- package/skills/agent-channeltalk/references/common-patterns.md +10 -9
- package/skills/agent-channeltalkbot/SKILL.md +19 -9
- package/skills/agent-channeltalkbot/references/common-patterns.md +10 -9
- package/skills/agent-discord/SKILL.md +18 -9
- package/skills/agent-discord/references/common-patterns.md +8 -7
- package/skills/agent-discordbot/SKILL.md +18 -9
- 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 +19 -10
- package/skills/agent-slack/references/common-patterns.md +4 -7
- package/skills/agent-slackbot/SKILL.md +1 -1
- package/skills/agent-teams/SKILL.md +18 -9
- package/skills/agent-teams/references/common-patterns.md +9 -7
- package/skills/agent-telegram/SKILL.md +1 -1
- package/skills/agent-webex/SKILL.md +13 -4
- package/skills/agent-webex/references/common-patterns.md +8 -2
- 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 +77 -30
- package/src/platforms/channeltalk/commands/snapshot.ts +112 -34
- 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 +43 -13
- package/src/platforms/channeltalkbot/commands/snapshot.ts +131 -64
- 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/snapshot.test.ts +1 -1
- package/src/platforms/discord/commands/snapshot.ts +58 -42
- 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 +43 -19
- package/src/platforms/discordbot/commands/snapshot.ts +54 -37
- 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/snapshot.test.ts +63 -8
- package/src/platforms/slack/commands/snapshot.ts +98 -66
- 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/snapshot.test.ts +1 -1
- package/src/platforms/teams/commands/snapshot.ts +53 -38
- 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 +42 -4
- package/src/platforms/webex/commands/snapshot.ts +19 -11
- 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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { mkdir } from 'node:fs/promises'
|
|
2
|
+
|
|
2
3
|
import pkg from '../../../package.json' with { type: 'json' }
|
|
3
4
|
import { findFuzzyChats, mergeChats, normalizeChatSearchText } from './chat-utils'
|
|
4
5
|
import { TdjsonBinding } from './tdlib'
|
|
@@ -90,7 +91,9 @@ export class TelegramTdlibClient {
|
|
|
90
91
|
application_version: `agent-messenger/${pkg.version}`,
|
|
91
92
|
})
|
|
92
93
|
|
|
93
|
-
state = (await this.waitForAuthorizationStateChange(
|
|
94
|
+
state = (await this.waitForAuthorizationStateChange(
|
|
95
|
+
'authorizationStateWaitTdlibParameters',
|
|
96
|
+
)) as TdAuthorizationState
|
|
94
97
|
}
|
|
95
98
|
|
|
96
99
|
return state
|
|
@@ -431,7 +434,9 @@ export class TelegramTdlibClient {
|
|
|
431
434
|
}
|
|
432
435
|
|
|
433
436
|
const chats = await this.searchChats(reference, 20)
|
|
434
|
-
const exactMatch = chats.find(
|
|
437
|
+
const exactMatch = chats.find(
|
|
438
|
+
(chat) => normalizeChatSearchText(chat.title) === normalizeChatSearchText(reference),
|
|
439
|
+
)
|
|
435
440
|
|
|
436
441
|
if (exactMatch) {
|
|
437
442
|
return this.call({
|
|
@@ -490,7 +495,9 @@ export class TelegramTdlibClient {
|
|
|
490
495
|
const pending = this.pendingMessages.get(update.old_message_id)
|
|
491
496
|
if (pending) {
|
|
492
497
|
this.pendingMessages.delete(update.old_message_id)
|
|
493
|
-
pending.reject(
|
|
498
|
+
pending.reject(
|
|
499
|
+
new TelegramError(update.error_message ?? 'Message send failed', update.error_code ?? 'send_failed'),
|
|
500
|
+
)
|
|
494
501
|
}
|
|
495
502
|
return event
|
|
496
503
|
}
|
|
@@ -527,7 +534,10 @@ export class TelegramTdlibClient {
|
|
|
527
534
|
this.handleEvent(event)
|
|
528
535
|
}
|
|
529
536
|
|
|
530
|
-
throw new TelegramError(
|
|
537
|
+
throw new TelegramError(
|
|
538
|
+
`Timed out waiting for authorization state change from ${previousType ?? 'unknown state'}.`,
|
|
539
|
+
'timeout',
|
|
540
|
+
)
|
|
531
541
|
}
|
|
532
542
|
|
|
533
543
|
private async waitForAuthorizationState(targetType: string, timeoutMs: number = 15000): Promise<any> {
|
|
@@ -2,9 +2,10 @@ import { Writable } from 'node:stream'
|
|
|
2
2
|
|
|
3
3
|
import { Command } from 'commander'
|
|
4
4
|
|
|
5
|
+
import { info, error as stderrError } from '@/shared/utils/stderr'
|
|
6
|
+
|
|
5
7
|
import { handleError } from '../../../shared/utils/error-handler'
|
|
6
8
|
import { formatOutput } from '../../../shared/utils/output'
|
|
7
|
-
import { info, error as stderrError } from '@/shared/utils/stderr'
|
|
8
9
|
import { getTelegramAppCredentials } from '../app-config'
|
|
9
10
|
import { TelegramTdlibClient } from '../client'
|
|
10
11
|
import { TelegramCredentialManager } from '../credential-manager'
|
|
@@ -226,9 +227,7 @@ async function handleNonInteractiveProvisioning(
|
|
|
226
227
|
}
|
|
227
228
|
|
|
228
229
|
if (!options.phone) {
|
|
229
|
-
console.log(
|
|
230
|
-
formatOutput({ next_action: 'provide_phone', message: 'Provide --phone flag to start login.' }, pretty),
|
|
231
|
-
)
|
|
230
|
+
console.log(formatOutput({ next_action: 'provide_phone', message: 'Provide --phone flag to start login.' }, pretty))
|
|
232
231
|
process.exit(0)
|
|
233
232
|
}
|
|
234
233
|
|
|
@@ -11,9 +11,7 @@ const mockSearchChats = mock(() =>
|
|
|
11
11
|
Promise.resolve([{ id: 'chat-1', title: 'General', type: 'supergroup', unread_count: 0 }]),
|
|
12
12
|
)
|
|
13
13
|
|
|
14
|
-
const mockGetChat = mock(() =>
|
|
15
|
-
Promise.resolve({ id: 'chat-1', title: 'General', type: 'supergroup', unread_count: 0 }),
|
|
16
|
-
)
|
|
14
|
+
const mockGetChat = mock(() => Promise.resolve({ id: 'chat-1', title: 'General', type: 'supergroup', unread_count: 0 }))
|
|
17
15
|
|
|
18
16
|
const mockClient = {
|
|
19
17
|
listChats: mockListChats,
|
|
@@ -22,8 +20,7 @@ const mockClient = {
|
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
mock.module('./shared', () => ({
|
|
25
|
-
withTelegramClient: async (_opts: unknown, fn: (client: typeof mockClient) => Promise<unknown>) =>
|
|
26
|
-
fn(mockClient),
|
|
23
|
+
withTelegramClient: async (_opts: unknown, fn: (client: typeof mockClient) => Promise<unknown>) => fn(mockClient),
|
|
27
24
|
}))
|
|
28
25
|
|
|
29
26
|
import { chatCommand } from './chat'
|
|
@@ -7,9 +7,7 @@ const mockListMessages = mock(() =>
|
|
|
7
7
|
]),
|
|
8
8
|
)
|
|
9
9
|
|
|
10
|
-
const mockSendMessage = mock(() =>
|
|
11
|
-
Promise.resolve({ id: 3, text: 'Sent message', sender_id: 'user-1', date: 3000 }),
|
|
12
|
-
)
|
|
10
|
+
const mockSendMessage = mock(() => Promise.resolve({ id: 3, text: 'Sent message', sender_id: 'user-1', date: 3000 }))
|
|
13
11
|
|
|
14
12
|
const mockClient = {
|
|
15
13
|
listMessages: mockListMessages,
|
|
@@ -17,8 +15,7 @@ const mockClient = {
|
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
mock.module('./shared', () => ({
|
|
20
|
-
withTelegramClient: async (_opts: unknown, fn: (client: typeof mockClient) => Promise<unknown>) =>
|
|
21
|
-
fn(mockClient),
|
|
18
|
+
withTelegramClient: async (_opts: unknown, fn: (client: typeof mockClient) => Promise<unknown>) => fn(mockClient),
|
|
22
19
|
}))
|
|
23
20
|
|
|
24
21
|
import { messageCommand } from './message'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, spyOn, test } from 'bun:test'
|
|
2
2
|
|
|
3
3
|
import { TelegramTdlibClient } from '../client'
|
|
4
|
-
import type { TelegramAccount } from '../types'
|
|
5
4
|
import { TelegramCredentialManager } from '../credential-manager'
|
|
5
|
+
import type { TelegramAccount } from '../types'
|
|
6
6
|
import * as sharedModule from './shared'
|
|
7
7
|
import { whoamiAction } from './whoami'
|
|
8
8
|
|
|
@@ -28,12 +28,10 @@ let consoleLogSpy: ReturnType<typeof spyOn>
|
|
|
28
28
|
describe('whoami command', () => {
|
|
29
29
|
beforeEach(() => {
|
|
30
30
|
getAuthStatusSpy = spyOn(TelegramTdlibClient.prototype, 'getAuthStatus').mockResolvedValue(mockAuthStatus)
|
|
31
|
-
withTelegramClientSpy = spyOn(sharedModule, 'withTelegramClient').mockImplementation(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
)
|
|
31
|
+
withTelegramClientSpy = spyOn(sharedModule, 'withTelegramClient').mockImplementation(async (_opts, fn) => {
|
|
32
|
+
const fakeClient = Object.create(TelegramTdlibClient.prototype) as TelegramTdlibClient
|
|
33
|
+
return fn(fakeClient, {} as TelegramAccount, new TelegramCredentialManager())
|
|
34
|
+
})
|
|
37
35
|
consoleLogSpy = spyOn(console, 'log').mockImplementation(() => {})
|
|
38
36
|
})
|
|
39
37
|
|
|
@@ -13,7 +13,7 @@ export async function whoamiAction(options: { account?: string; pretty?: boolean
|
|
|
13
13
|
account_id: status.account_id,
|
|
14
14
|
phone_number: status.phone_number,
|
|
15
15
|
authenticated: status.authenticated,
|
|
16
|
-
...status.user && { user: status.user },
|
|
16
|
+
...(status.user && { user: status.user }),
|
|
17
17
|
}
|
|
18
18
|
console.log(formatOutput(output, options.pretty))
|
|
19
19
|
})
|
|
@@ -2,6 +2,7 @@ import { existsSync } from 'node:fs'
|
|
|
2
2
|
import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises'
|
|
3
3
|
import { homedir } from 'node:os'
|
|
4
4
|
import { join } from 'node:path'
|
|
5
|
+
|
|
5
6
|
import {
|
|
6
7
|
createAccountId,
|
|
7
8
|
type TelegramAccount,
|
|
@@ -87,14 +88,22 @@ export class TelegramCredentialManager {
|
|
|
87
88
|
const oldPaths = this.getAccountPaths(normalizedOldAccountId)
|
|
88
89
|
const newPaths = this.getAccountPaths(account.account_id)
|
|
89
90
|
|
|
90
|
-
if (
|
|
91
|
+
if (
|
|
92
|
+
normalizedOldAccountId !== account.account_id &&
|
|
93
|
+
existsSync(oldPaths.account_dir) &&
|
|
94
|
+
existsSync(newPaths.account_dir)
|
|
95
|
+
) {
|
|
91
96
|
throw new TelegramError(
|
|
92
97
|
`Can't migrate Telegram account data from "${normalizedOldAccountId}" to "${account.account_id}" because the target TDLib directory already exists: ${newPaths.account_dir}`,
|
|
93
98
|
'account_migration_conflict',
|
|
94
99
|
)
|
|
95
100
|
}
|
|
96
101
|
|
|
97
|
-
if (
|
|
102
|
+
if (
|
|
103
|
+
normalizedOldAccountId !== account.account_id &&
|
|
104
|
+
existsSync(oldPaths.account_dir) &&
|
|
105
|
+
!existsSync(newPaths.account_dir)
|
|
106
|
+
) {
|
|
98
107
|
await mkdir(this.tdlibRootDir, { recursive: true })
|
|
99
108
|
await rename(oldPaths.account_dir, newPaths.account_dir)
|
|
100
109
|
}
|
|
@@ -187,8 +187,12 @@ function isCreateApplicationPage(html: string): boolean {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
function extractAppCredentials(html: string): { api_id: number; api_hash: string } {
|
|
190
|
-
const apiIdMatch = html.match(
|
|
191
|
-
|
|
190
|
+
const apiIdMatch = html.match(
|
|
191
|
+
/<span class="form-control input-xlarge uneditable-input"[^>]*><strong>(\d+)<\/strong><\/span>/,
|
|
192
|
+
)
|
|
193
|
+
const apiHashMatch = html.match(
|
|
194
|
+
/<span class="form-control input-xlarge uneditable-input"[^>]*>([a-f0-9]{32})<\/span>/,
|
|
195
|
+
)
|
|
192
196
|
|
|
193
197
|
if (!apiIdMatch?.[1] || !apiHashMatch?.[1]) {
|
|
194
198
|
throw new TelegramError('Failed to parse my.telegram.org response', 'parse_error')
|
|
@@ -18,10 +18,7 @@ function isAuthCommand(command: CommandType): boolean {
|
|
|
18
18
|
|
|
19
19
|
const program = new Command()
|
|
20
20
|
|
|
21
|
-
program
|
|
22
|
-
.name('agent-webex')
|
|
23
|
-
.description('CLI tool for Cisco Webex communication')
|
|
24
|
-
.version(pkg.version)
|
|
21
|
+
program.name('agent-webex').description('CLI tool for Cisco Webex communication').version(pkg.version)
|
|
25
22
|
|
|
26
23
|
program.hook('preAction', async (_thisCommand, actionCommand) => {
|
|
27
24
|
if (isAuthCommand(actionCommand)) return
|
|
@@ -155,9 +155,7 @@ describe('WebexClient', () => {
|
|
|
155
155
|
const client = await new WebexClient().login({ token: 'test-token' })
|
|
156
156
|
await client.sendMessage('room1', '**bold**', { markdown: true })
|
|
157
157
|
|
|
158
|
-
expect(fetchCalls[0].options?.body).toBe(
|
|
159
|
-
JSON.stringify({ roomId: 'room1', markdown: '**bold**' }),
|
|
160
|
-
)
|
|
158
|
+
expect(fetchCalls[0].options?.body).toBe(JSON.stringify({ roomId: 'room1', markdown: '**bold**' }))
|
|
161
159
|
})
|
|
162
160
|
})
|
|
163
161
|
|
|
@@ -168,9 +166,7 @@ describe('WebexClient', () => {
|
|
|
168
166
|
const client = await new WebexClient().login({ token: 'test-token' })
|
|
169
167
|
await client.sendDirectMessage('user@example.com', 'Hello')
|
|
170
168
|
|
|
171
|
-
expect(fetchCalls[0].options?.body).toBe(
|
|
172
|
-
JSON.stringify({ toPersonEmail: 'user@example.com', text: 'Hello' }),
|
|
173
|
-
)
|
|
169
|
+
expect(fetchCalls[0].options?.body).toBe(JSON.stringify({ toPersonEmail: 'user@example.com', text: 'Hello' }))
|
|
174
170
|
})
|
|
175
171
|
|
|
176
172
|
test('sends markdown direct message when option set', async () => {
|
|
@@ -246,9 +242,7 @@ describe('WebexClient', () => {
|
|
|
246
242
|
|
|
247
243
|
expect(fetchCalls[0].url).toBe('https://webexapis.com/v1/messages/msg1')
|
|
248
244
|
expect(fetchCalls[0].options?.method).toBe('PUT')
|
|
249
|
-
expect(fetchCalls[0].options?.body).toBe(
|
|
250
|
-
JSON.stringify({ roomId: 'room1', text: 'Edited text' }),
|
|
251
|
-
)
|
|
245
|
+
expect(fetchCalls[0].options?.body).toBe(JSON.stringify({ roomId: 'room1', text: 'Edited text' }))
|
|
252
246
|
})
|
|
253
247
|
|
|
254
248
|
test('sends markdown when option set', async () => {
|
|
@@ -257,9 +251,7 @@ describe('WebexClient', () => {
|
|
|
257
251
|
const client = await new WebexClient().login({ token: 'test-token' })
|
|
258
252
|
await client.editMessage('msg1', 'room1', '**edited**', { markdown: true })
|
|
259
253
|
|
|
260
|
-
expect(fetchCalls[0].options?.body).toBe(
|
|
261
|
-
JSON.stringify({ roomId: 'room1', markdown: '**edited**' }),
|
|
262
|
-
)
|
|
254
|
+
expect(fetchCalls[0].options?.body).toBe(JSON.stringify({ roomId: 'room1', markdown: '**edited**' }))
|
|
263
255
|
})
|
|
264
256
|
})
|
|
265
257
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { WebexMembership, WebexMessage, WebexPerson, WebexSpace } from './types'
|
|
2
|
-
import { WebexError } from './types'
|
|
3
1
|
import { WebexCredentialManager } from './credential-manager'
|
|
4
2
|
import { WebexEncryptionService } from './encryption'
|
|
5
3
|
import { markdownToHtml, stripMarkdown } from './markdown-to-html'
|
|
4
|
+
import type { WebexMembership, WebexMessage, WebexPerson, WebexSpace } from './types'
|
|
5
|
+
import { WebexError } from './types'
|
|
6
6
|
|
|
7
7
|
const BASE_URL = 'https://webexapis.com/v1'
|
|
8
8
|
const MAX_RETRIES = 3
|
|
@@ -36,10 +36,7 @@ export class WebexClient {
|
|
|
36
36
|
const config = await credManager.loadConfig()
|
|
37
37
|
const token = await credManager.getToken(config?.clientId, config?.clientSecret)
|
|
38
38
|
if (!token) {
|
|
39
|
-
throw new WebexError(
|
|
40
|
-
'No Webex credentials found. Run "auth login" to authenticate.',
|
|
41
|
-
'no_credentials',
|
|
42
|
-
)
|
|
39
|
+
throw new WebexError('No Webex credentials found. Run "auth login" to authenticate.', 'no_credentials')
|
|
43
40
|
}
|
|
44
41
|
this.deviceUrl = config?.deviceUrl ?? null
|
|
45
42
|
this.tokenType = config?.tokenType ?? null
|
|
@@ -63,10 +60,7 @@ export class WebexClient {
|
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
private getBucketKey(method: string, path: string): string {
|
|
66
|
-
const normalized = path.replace(
|
|
67
|
-
/\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?=\/|$)/gi,
|
|
68
|
-
'/{id}',
|
|
69
|
-
)
|
|
63
|
+
const normalized = path.replace(/\/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?=\/|$)/gi, '/{id}')
|
|
70
64
|
return `${method}:${normalized}`
|
|
71
65
|
}
|
|
72
66
|
|
|
@@ -152,10 +146,7 @@ export class WebexClient {
|
|
|
152
146
|
errors?: Array<{ description: string }>
|
|
153
147
|
trackingId?: string
|
|
154
148
|
} | null
|
|
155
|
-
const message =
|
|
156
|
-
errorBody?.message ??
|
|
157
|
-
errorBody?.errors?.[0]?.description ??
|
|
158
|
-
`HTTP ${response.status}`
|
|
149
|
+
const message = errorBody?.message ?? errorBody?.errors?.[0]?.description ?? `HTTP ${response.status}`
|
|
159
150
|
throw new WebexError(message, `http_${response.status}`)
|
|
160
151
|
}
|
|
161
152
|
|
|
@@ -186,11 +177,7 @@ export class WebexClient {
|
|
|
186
177
|
return this.request<WebexSpace>('GET', `/rooms/${spaceId}`)
|
|
187
178
|
}
|
|
188
179
|
|
|
189
|
-
async sendMessage(
|
|
190
|
-
roomId: string,
|
|
191
|
-
text: string,
|
|
192
|
-
options?: { markdown?: boolean },
|
|
193
|
-
): Promise<WebexMessage> {
|
|
180
|
+
async sendMessage(roomId: string, text: string, options?: { markdown?: boolean }): Promise<WebexMessage> {
|
|
194
181
|
if (this.useInternalAPI) {
|
|
195
182
|
return this.sendMessageInternal(roomId, text, options)
|
|
196
183
|
}
|
|
@@ -227,10 +214,7 @@ export class WebexClient {
|
|
|
227
214
|
|
|
228
215
|
if (!response.ok) {
|
|
229
216
|
const errorBody = (await response.json().catch(() => null)) as { message?: string } | null
|
|
230
|
-
throw new WebexError(
|
|
231
|
-
errorBody?.message ?? `HTTP ${response.status}`,
|
|
232
|
-
`http_${response.status}`,
|
|
233
|
-
)
|
|
217
|
+
throw new WebexError(errorBody?.message ?? `HTTP ${response.status}`, `http_${response.status}`)
|
|
234
218
|
}
|
|
235
219
|
|
|
236
220
|
if (response.status === 204) return undefined as T
|
|
@@ -319,11 +303,7 @@ export class WebexClient {
|
|
|
319
303
|
return this.activityToMessage(result, roomId)
|
|
320
304
|
}
|
|
321
305
|
|
|
322
|
-
async sendDirectMessage(
|
|
323
|
-
personEmail: string,
|
|
324
|
-
text: string,
|
|
325
|
-
options?: { markdown?: boolean },
|
|
326
|
-
): Promise<WebexMessage> {
|
|
306
|
+
async sendDirectMessage(personEmail: string, text: string, options?: { markdown?: boolean }): Promise<WebexMessage> {
|
|
327
307
|
if (this.useInternalAPI) {
|
|
328
308
|
const roomId = await this.findDirectRoomByEmail(personEmail)
|
|
329
309
|
if (!roomId) {
|
|
@@ -340,10 +320,7 @@ export class WebexClient {
|
|
|
340
320
|
private async findDirectRoomByEmail(email: string): Promise<string | null> {
|
|
341
321
|
const rooms = await this.request<{ items: WebexSpace[] }>('GET', `/rooms?type=direct&max=100`)
|
|
342
322
|
for (const room of rooms.items) {
|
|
343
|
-
const members = await this.request<{ items: WebexMembership[] }>(
|
|
344
|
-
'GET',
|
|
345
|
-
`/memberships?roomId=${room.id}&max=10`,
|
|
346
|
-
)
|
|
323
|
+
const members = await this.request<{ items: WebexMembership[] }>('GET', `/memberships?roomId=${room.id}&max=10`)
|
|
347
324
|
if (members.items.some((m) => m.personEmail === email)) {
|
|
348
325
|
return room.id
|
|
349
326
|
}
|
|
@@ -372,9 +349,7 @@ export class WebexClient {
|
|
|
372
349
|
if (this.useInternalAPI) {
|
|
373
350
|
const activity = await this.internalRequest<InternalActivity>(`/activities/${messageId}`)
|
|
374
351
|
const convId = activity.target?.id ?? ''
|
|
375
|
-
const roomId = convId
|
|
376
|
-
? Buffer.from(`ciscospark://urn:TEAM:unknown/ROOM/${convId}`).toString('base64')
|
|
377
|
-
: ''
|
|
352
|
+
const roomId = convId ? Buffer.from(`ciscospark://urn:TEAM:unknown/ROOM/${convId}`).toString('base64') : ''
|
|
378
353
|
return this.activityToMessage(activity, roomId)
|
|
379
354
|
}
|
|
380
355
|
return this.request<WebexMessage>('GET', `/messages/${messageId}`)
|
|
@@ -430,11 +405,7 @@ export class WebexClient {
|
|
|
430
405
|
return this.request<WebexMessage>('PUT', `/messages/${messageId}`, body)
|
|
431
406
|
}
|
|
432
407
|
|
|
433
|
-
async listPeople(options?: {
|
|
434
|
-
email?: string
|
|
435
|
-
displayName?: string
|
|
436
|
-
max?: number
|
|
437
|
-
}): Promise<WebexPerson[]> {
|
|
408
|
+
async listPeople(options?: { email?: string; displayName?: string; max?: number }): Promise<WebexPerson[]> {
|
|
438
409
|
const params = new URLSearchParams()
|
|
439
410
|
if (options?.email) params.set('email', options.email)
|
|
440
411
|
if (options?.displayName) params.set('displayName', options.displayName)
|
|
@@ -448,24 +419,15 @@ export class WebexClient {
|
|
|
448
419
|
async listMyMemberships(options?: { max?: number }): Promise<WebexMembership[]> {
|
|
449
420
|
const params = new URLSearchParams()
|
|
450
421
|
params.set('max', String(options?.max ?? 100))
|
|
451
|
-
const data = await this.request<{ items: WebexMembership[] }>(
|
|
452
|
-
'GET',
|
|
453
|
-
`/memberships?${params}`,
|
|
454
|
-
)
|
|
422
|
+
const data = await this.request<{ items: WebexMembership[] }>('GET', `/memberships?${params}`)
|
|
455
423
|
return data.items
|
|
456
424
|
}
|
|
457
425
|
|
|
458
|
-
async listMemberships(
|
|
459
|
-
roomId: string,
|
|
460
|
-
options?: { max?: number },
|
|
461
|
-
): Promise<WebexMembership[]> {
|
|
426
|
+
async listMemberships(roomId: string, options?: { max?: number }): Promise<WebexMembership[]> {
|
|
462
427
|
const params = new URLSearchParams()
|
|
463
428
|
params.set('roomId', roomId)
|
|
464
429
|
if (options?.max) params.set('max', String(options.max))
|
|
465
|
-
const data = await this.request<{ items: WebexMembership[] }>(
|
|
466
|
-
'GET',
|
|
467
|
-
`/memberships?${params}`,
|
|
468
|
-
)
|
|
430
|
+
const data = await this.request<{ items: WebexMembership[] }>('GET', `/memberships?${params}`)
|
|
469
431
|
return data.items
|
|
470
432
|
}
|
|
471
433
|
}
|
|
@@ -90,7 +90,13 @@ describe('auth commands', () => {
|
|
|
90
90
|
await loginAction({ clientId: 'my-id', clientSecret: 'my-secret', pretty: false })
|
|
91
91
|
|
|
92
92
|
expect(WebexCredentialManager.prototype.requestDeviceCode).toHaveBeenCalledWith('my-id')
|
|
93
|
-
expect(WebexCredentialManager.prototype.pollDeviceToken).toHaveBeenCalledWith(
|
|
93
|
+
expect(WebexCredentialManager.prototype.pollDeviceToken).toHaveBeenCalledWith(
|
|
94
|
+
'd',
|
|
95
|
+
0.01,
|
|
96
|
+
300,
|
|
97
|
+
'my-id',
|
|
98
|
+
'my-secret',
|
|
99
|
+
)
|
|
94
100
|
})
|
|
95
101
|
|
|
96
102
|
test('saves tokenType as oauth in config', async () => {
|
|
@@ -41,7 +41,12 @@ async function resolveClientCredentials(options: {
|
|
|
41
41
|
return getWebexAppCredentials()
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
export async function loginAction(options: {
|
|
44
|
+
export async function loginAction(options: {
|
|
45
|
+
token?: string
|
|
46
|
+
clientId?: string
|
|
47
|
+
clientSecret?: string
|
|
48
|
+
pretty?: boolean
|
|
49
|
+
}): Promise<void> {
|
|
45
50
|
try {
|
|
46
51
|
const credManager = new WebexCredentialManager()
|
|
47
52
|
|
|
@@ -110,9 +115,7 @@ export async function statusAction(options: { pretty?: boolean }): Promise<void>
|
|
|
110
115
|
const token = await credManager.getToken(config?.clientId, config?.clientSecret)
|
|
111
116
|
|
|
112
117
|
if (!token) {
|
|
113
|
-
console.log(
|
|
114
|
-
formatOutput({ error: 'Not authenticated. Run "auth login" first.' }, options.pretty),
|
|
115
|
-
)
|
|
118
|
+
console.log(formatOutput({ error: 'Not authenticated. Run "auth login" first.' }, options.pretty))
|
|
116
119
|
process.exit(1)
|
|
117
120
|
return
|
|
118
121
|
}
|
|
@@ -139,10 +142,7 @@ export async function statusAction(options: { pretty?: boolean }): Promise<void>
|
|
|
139
142
|
|
|
140
143
|
export async function extractAction(options: { pretty?: boolean; debug?: boolean }): Promise<void> {
|
|
141
144
|
try {
|
|
142
|
-
const extractor = new WebexTokenExtractor(
|
|
143
|
-
undefined,
|
|
144
|
-
options.debug ? (msg) => debug(`[debug] ${msg}`) : undefined,
|
|
145
|
-
)
|
|
145
|
+
const extractor = new WebexTokenExtractor(undefined, options.debug ? (msg) => debug(`[debug] ${msg}`) : undefined)
|
|
146
146
|
|
|
147
147
|
if (options.debug) {
|
|
148
148
|
debug('[debug] Searching browser profiles for Webex tokens...')
|
|
@@ -154,7 +154,8 @@ export async function extractAction(options: { pretty?: boolean; debug?: boolean
|
|
|
154
154
|
console.log(
|
|
155
155
|
formatOutput(
|
|
156
156
|
{
|
|
157
|
-
error:
|
|
157
|
+
error:
|
|
158
|
+
'No Webex token found in any browser. Make sure you are logged in to web.webex.com in Chrome, Edge, Arc, or Brave.',
|
|
158
159
|
hint: 'Run "auth login" for OAuth Device Grant flow, or --debug for more info.',
|
|
159
160
|
},
|
|
160
161
|
options.pretty,
|
|
@@ -175,9 +176,7 @@ export async function extractAction(options: { pretty?: boolean; debug?: boolean
|
|
|
175
176
|
tokenType: 'extracted',
|
|
176
177
|
deviceUrl: extracted.deviceUrl,
|
|
177
178
|
userId: extracted.userId,
|
|
178
|
-
encryptionKeys: extracted.encryptionKeys
|
|
179
|
-
? Object.fromEntries(extracted.encryptionKeys)
|
|
180
|
-
: undefined,
|
|
179
|
+
encryptionKeys: extracted.encryptionKeys ? Object.fromEntries(extracted.encryptionKeys) : undefined,
|
|
181
180
|
})
|
|
182
181
|
|
|
183
182
|
console.log(
|
|
@@ -201,9 +200,7 @@ export async function logoutAction(options: { pretty?: boolean }): Promise<void>
|
|
|
201
200
|
const config = await credManager.loadConfig()
|
|
202
201
|
|
|
203
202
|
if (!config) {
|
|
204
|
-
console.log(
|
|
205
|
-
formatOutput({ error: 'Not authenticated. Run "auth login" first.' }, options.pretty),
|
|
206
|
-
)
|
|
203
|
+
console.log(formatOutput({ error: 'Not authenticated. Run "auth login" first.' }, options.pretty))
|
|
207
204
|
process.exit(1)
|
|
208
205
|
return
|
|
209
206
|
}
|
|
@@ -47,9 +47,7 @@ describe('member commands', () => {
|
|
|
47
47
|
|
|
48
48
|
beforeEach(() => {
|
|
49
49
|
mockListMemberships.mockReset().mockImplementation(() => Promise.resolve(mockMembers))
|
|
50
|
-
mockLogin.mockReset().mockImplementation(() =>
|
|
51
|
-
Promise.resolve({ listMemberships: mockListMemberships }),
|
|
52
|
-
)
|
|
50
|
+
mockLogin.mockReset().mockImplementation(() => Promise.resolve({ listMemberships: mockListMemberships }))
|
|
53
51
|
mockHandleError.mockReset().mockImplementation((err: Error) => {
|
|
54
52
|
throw err
|
|
55
53
|
})
|
|
@@ -5,10 +5,7 @@ import { formatOutput } from '@/shared/utils/output'
|
|
|
5
5
|
|
|
6
6
|
import { WebexClient } from '../client'
|
|
7
7
|
|
|
8
|
-
export async function listAction(
|
|
9
|
-
spaceId: string,
|
|
10
|
-
options: { limit?: number; pretty?: boolean },
|
|
11
|
-
): Promise<void> {
|
|
8
|
+
export async function listAction(spaceId: string, options: { limit?: number; pretty?: boolean }): Promise<void> {
|
|
12
9
|
try {
|
|
13
10
|
const client = await new WebexClient().login()
|
|
14
11
|
const members = await client.listMemberships(spaceId, { max: options.limit })
|
|
@@ -28,18 +25,16 @@ export async function listAction(
|
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
export const memberCommand = new Command('member')
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
),
|
|
45
|
-
)
|
|
28
|
+
export const memberCommand = new Command('member').description('Member commands').addCommand(
|
|
29
|
+
new Command('list')
|
|
30
|
+
.description('List members of a space')
|
|
31
|
+
.argument('<space-id>', 'Space ID')
|
|
32
|
+
.option('--limit <n>', 'Number of members to retrieve', '100')
|
|
33
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
34
|
+
.action((spaceId, options) =>
|
|
35
|
+
listAction(spaceId, {
|
|
36
|
+
limit: parseInt(options.limit, 10),
|
|
37
|
+
pretty: options.pretty,
|
|
38
|
+
}),
|
|
39
|
+
),
|
|
40
|
+
)
|
|
@@ -29,10 +29,7 @@ export async function sendAction(
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export async function listAction(
|
|
33
|
-
spaceId: string,
|
|
34
|
-
options: { limit?: number; pretty?: boolean },
|
|
35
|
-
): Promise<void> {
|
|
32
|
+
export async function listAction(spaceId: string, options: { limit?: number; pretty?: boolean }): Promise<void> {
|
|
36
33
|
try {
|
|
37
34
|
const client = await new WebexClient().login()
|
|
38
35
|
const limit = options.limit ?? 50
|
|
@@ -52,10 +49,7 @@ export async function listAction(
|
|
|
52
49
|
}
|
|
53
50
|
}
|
|
54
51
|
|
|
55
|
-
export async function getAction(
|
|
56
|
-
messageId: string,
|
|
57
|
-
options: { pretty?: boolean },
|
|
58
|
-
): Promise<void> {
|
|
52
|
+
export async function getAction(messageId: string, options: { pretty?: boolean }): Promise<void> {
|
|
59
53
|
try {
|
|
60
54
|
const client = await new WebexClient().login()
|
|
61
55
|
const message = await client.getMessage(messageId)
|
|
@@ -74,15 +68,10 @@ export async function getAction(
|
|
|
74
68
|
}
|
|
75
69
|
}
|
|
76
70
|
|
|
77
|
-
export async function deleteAction(
|
|
78
|
-
messageId: string,
|
|
79
|
-
options: { force?: boolean; pretty?: boolean },
|
|
80
|
-
): Promise<void> {
|
|
71
|
+
export async function deleteAction(messageId: string, options: { force?: boolean; pretty?: boolean }): Promise<void> {
|
|
81
72
|
try {
|
|
82
73
|
if (!options.force) {
|
|
83
|
-
console.log(
|
|
84
|
-
formatOutput({ warning: 'Use --force to confirm deletion', messageId }, options.pretty),
|
|
85
|
-
)
|
|
74
|
+
console.log(formatOutput({ warning: 'Use --force to confirm deletion', messageId }, options.pretty))
|
|
86
75
|
return process.exit(0)
|
|
87
76
|
}
|
|
88
77
|
|