agent-messenger 1.3.6 → 1.5.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.
Files changed (127) hide show
  1. package/.claude-plugin/README.md +38 -14
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.github/workflows/ci.yml +3 -0
  4. package/CONTRIBUTING.md +24 -1
  5. package/README.md +12 -8
  6. package/dist/package.json +1 -1
  7. package/dist/src/cli.d.ts.map +1 -1
  8. package/dist/src/cli.js +3 -0
  9. package/dist/src/cli.js.map +1 -1
  10. package/dist/src/platforms/discord/cli.d.ts +2 -2
  11. package/dist/src/platforms/discord/cli.d.ts.map +1 -1
  12. package/dist/src/platforms/discord/cli.js +23 -1
  13. package/dist/src/platforms/discord/cli.js.map +1 -1
  14. package/dist/src/platforms/discord/commands/file.d.ts.map +1 -1
  15. package/dist/src/platforms/discord/commands/file.js +13 -7
  16. package/dist/src/platforms/discord/commands/file.js.map +1 -1
  17. package/dist/src/platforms/discord/commands/friend.d.ts.map +1 -1
  18. package/dist/src/platforms/discord/commands/friend.js +30 -30
  19. package/dist/src/platforms/discord/commands/friend.js.map +1 -1
  20. package/dist/src/platforms/discord/commands/index.d.ts +7 -0
  21. package/dist/src/platforms/discord/commands/index.d.ts.map +1 -1
  22. package/dist/src/platforms/discord/commands/index.js +7 -0
  23. package/dist/src/platforms/discord/commands/index.js.map +1 -1
  24. package/dist/src/platforms/discord/commands/snapshot.d.ts.map +1 -1
  25. package/dist/src/platforms/discord/commands/snapshot.js +1 -2
  26. package/dist/src/platforms/discord/commands/snapshot.js.map +1 -1
  27. package/dist/src/platforms/discord/ensure-auth.d.ts +2 -0
  28. package/dist/src/platforms/discord/ensure-auth.d.ts.map +1 -0
  29. package/dist/src/platforms/discord/ensure-auth.js +31 -0
  30. package/dist/src/platforms/discord/ensure-auth.js.map +1 -0
  31. package/dist/src/platforms/slack/cli.d.ts +2 -2
  32. package/dist/src/platforms/slack/cli.d.ts.map +1 -1
  33. package/dist/src/platforms/slack/cli.js +15 -0
  34. package/dist/src/platforms/slack/cli.js.map +1 -1
  35. package/dist/src/platforms/slack/client.d.ts +1 -0
  36. package/dist/src/platforms/slack/client.d.ts.map +1 -1
  37. package/dist/src/platforms/slack/client.js +13 -0
  38. package/dist/src/platforms/slack/client.js.map +1 -1
  39. package/dist/src/platforms/slack/commands/channel.d.ts.map +1 -1
  40. package/dist/src/platforms/slack/commands/channel.js +2 -0
  41. package/dist/src/platforms/slack/commands/channel.js.map +1 -1
  42. package/dist/src/platforms/slack/commands/file.d.ts.map +1 -1
  43. package/dist/src/platforms/slack/commands/file.js +13 -5
  44. package/dist/src/platforms/slack/commands/file.js.map +1 -1
  45. package/dist/src/platforms/slack/commands/message.d.ts.map +1 -1
  46. package/dist/src/platforms/slack/commands/message.js +12 -6
  47. package/dist/src/platforms/slack/commands/message.js.map +1 -1
  48. package/dist/src/platforms/slack/commands/reaction.d.ts.map +1 -1
  49. package/dist/src/platforms/slack/commands/reaction.js +3 -0
  50. package/dist/src/platforms/slack/commands/reaction.js.map +1 -1
  51. package/dist/src/platforms/slack/commands/sections.d.ts.map +1 -1
  52. package/dist/src/platforms/slack/commands/sections.js +5 -6
  53. package/dist/src/platforms/slack/commands/sections.js.map +1 -1
  54. package/dist/src/platforms/slack/commands/snapshot.d.ts.map +1 -1
  55. package/dist/src/platforms/slack/commands/snapshot.js +1 -2
  56. package/dist/src/platforms/slack/commands/snapshot.js.map +1 -1
  57. package/dist/src/platforms/slack/commands/unread.d.ts.map +1 -1
  58. package/dist/src/platforms/slack/commands/unread.js +2 -0
  59. package/dist/src/platforms/slack/commands/unread.js.map +1 -1
  60. package/dist/src/platforms/slack/commands/user.js +8 -8
  61. package/dist/src/platforms/slack/ensure-auth.d.ts +2 -0
  62. package/dist/src/platforms/slack/ensure-auth.d.ts.map +1 -0
  63. package/dist/src/platforms/slack/ensure-auth.js +30 -0
  64. package/dist/src/platforms/slack/ensure-auth.js.map +1 -0
  65. package/dist/src/platforms/slackbot/client.d.ts +1 -0
  66. package/dist/src/platforms/slackbot/client.d.ts.map +1 -1
  67. package/dist/src/platforms/slackbot/client.js +13 -0
  68. package/dist/src/platforms/slackbot/client.js.map +1 -1
  69. package/dist/src/platforms/slackbot/commands/channel.d.ts.map +1 -1
  70. package/dist/src/platforms/slackbot/commands/channel.js +3 -2
  71. package/dist/src/platforms/slackbot/commands/channel.js.map +1 -1
  72. package/dist/src/platforms/slackbot/commands/message.d.ts.map +1 -1
  73. package/dist/src/platforms/slackbot/commands/message.js +18 -12
  74. package/dist/src/platforms/slackbot/commands/message.js.map +1 -1
  75. package/dist/src/platforms/slackbot/commands/reaction.d.ts.map +1 -1
  76. package/dist/src/platforms/slackbot/commands/reaction.js +8 -6
  77. package/dist/src/platforms/slackbot/commands/reaction.js.map +1 -1
  78. package/dist/src/platforms/teams/cli.d.ts +2 -2
  79. package/dist/src/platforms/teams/cli.d.ts.map +1 -1
  80. package/dist/src/platforms/teams/cli.js +15 -0
  81. package/dist/src/platforms/teams/cli.js.map +1 -1
  82. package/dist/src/platforms/teams/commands/file.js +12 -12
  83. package/dist/src/platforms/teams/commands/file.js.map +1 -1
  84. package/dist/src/platforms/teams/commands/snapshot.d.ts.map +1 -1
  85. package/dist/src/platforms/teams/commands/snapshot.js +1 -2
  86. package/dist/src/platforms/teams/commands/snapshot.js.map +1 -1
  87. package/dist/src/platforms/teams/ensure-auth.d.ts +2 -0
  88. package/dist/src/platforms/teams/ensure-auth.d.ts.map +1 -0
  89. package/dist/src/platforms/teams/ensure-auth.js +32 -0
  90. package/dist/src/platforms/teams/ensure-auth.js.map +1 -0
  91. package/e2e/README.md +1 -1
  92. package/package.json +1 -1
  93. package/skills/agent-discord/SKILL.md +22 -22
  94. package/skills/agent-slack/SKILL.md +28 -40
  95. package/skills/agent-teams/SKILL.md +41 -65
  96. package/skills/agent-teams/references/common-patterns.md +63 -49
  97. package/src/cli.ts +4 -0
  98. package/src/platforms/discord/cli.ts +30 -0
  99. package/src/platforms/discord/commands/file.ts +13 -7
  100. package/src/platforms/discord/commands/friend.ts +34 -34
  101. package/src/platforms/discord/commands/index.ts +7 -0
  102. package/src/platforms/discord/commands/snapshot.ts +1 -2
  103. package/src/platforms/discord/ensure-auth.test.ts +123 -0
  104. package/src/platforms/discord/ensure-auth.ts +31 -0
  105. package/src/platforms/slack/cli.ts +16 -0
  106. package/src/platforms/slack/client.test.ts +101 -0
  107. package/src/platforms/slack/client.ts +22 -0
  108. package/src/platforms/slack/commands/channel.ts +2 -0
  109. package/src/platforms/slack/commands/file.ts +15 -5
  110. package/src/platforms/slack/commands/message.ts +17 -6
  111. package/src/platforms/slack/commands/reaction.ts +3 -0
  112. package/src/platforms/slack/commands/sections.ts +8 -9
  113. package/src/platforms/slack/commands/snapshot.ts +1 -2
  114. package/src/platforms/slack/commands/unread.ts +2 -0
  115. package/src/platforms/slack/commands/user.ts +8 -8
  116. package/src/platforms/slack/ensure-auth.test.ts +186 -0
  117. package/src/platforms/slack/ensure-auth.ts +30 -0
  118. package/src/platforms/slackbot/client.test.ts +87 -0
  119. package/src/platforms/slackbot/client.ts +21 -0
  120. package/src/platforms/slackbot/commands/channel.ts +3 -2
  121. package/src/platforms/slackbot/commands/message.ts +18 -12
  122. package/src/platforms/slackbot/commands/reaction.ts +8 -6
  123. package/src/platforms/teams/cli.ts +16 -0
  124. package/src/platforms/teams/commands/file.ts +12 -12
  125. package/src/platforms/teams/commands/snapshot.ts +1 -2
  126. package/src/platforms/teams/ensure-auth.test.ts +167 -0
  127. package/src/platforms/teams/ensure-auth.ts +34 -0
@@ -1,6 +1,6 @@
1
1
  # Agent Messenger - Claude Code Plugin
2
2
 
3
- Messaging platform interaction skills for AI agents and Claude Code. Supports Slack workspaces and Discord servers.
3
+ Messaging platform interaction skills for AI agents and Claude Code. Supports Slack, Discord, and Microsoft Teams.
4
4
 
5
5
  ## Installation
6
6
 
@@ -36,13 +36,28 @@ Enables AI agents to interact with messaging platforms through CLI interfaces:
36
36
  - **Read channels** and message history
37
37
  - **Manage reactions** (add/remove/list)
38
38
  - **Upload files** to channels
39
+ - **Search messages** across server
39
40
  - **Multi-guild support** with easy switching
40
41
 
42
+ ### Teams (`agent-teams`)
43
+ - **Send messages** to channels
44
+ - **Read channels** and message history
45
+ - **Manage reactions** (add/remove)
46
+ - **Upload files** to channels
47
+ - **Workspace snapshots** for quick overview
48
+ - **Multi-team support** with easy switching
49
+
50
+ ### Slack Bot (`agent-slackbot`)
51
+ - **Send messages** using bot tokens (xoxb-)
52
+ - **Read channels** and message history
53
+ - **Manage reactions** (add/remove/list)
54
+ - Designed for **server-side and CI/CD** use cases
55
+
41
56
  ## Key Features
42
57
 
43
58
  ### Zero-Config Authentication
44
59
 
45
- Automatically extracts credentials from desktop apps - no manual token copying needed:
60
+ Credentials are automatically extracted from your desktop apps on first command — no manual auth step needed. You can also extract manually:
46
61
 
47
62
  ```bash
48
63
  # Slack
@@ -50,6 +65,9 @@ agent-slack auth extract
50
65
 
51
66
  # Discord
52
67
  agent-discord auth extract
68
+
69
+ # Teams
70
+ agent-teams auth extract
53
71
  ```
54
72
 
55
73
  ### AI-Friendly References (Slack)
@@ -66,7 +84,7 @@ All commands output JSON by default for easy AI consumption. Use `--pretty` for
66
84
 
67
85
  ## Requirements
68
86
 
69
- - Slack desktop app and/or Discord desktop app installed and logged in
87
+ - Desktop app installed and logged in for the platform(s) you want to use (Slack, Discord, and/or Teams)
70
88
  - Node.js 18+ or Bun runtime
71
89
 
72
90
  ## Quick Start
@@ -74,32 +92,36 @@ All commands output JSON by default for easy AI consumption. Use `--pretty` for
74
92
  ### Slack
75
93
 
76
94
  ```bash
77
- # 1. Extract credentials from Slack desktop app
78
- agent-slack auth extract
79
-
80
- # 2. Get workspace snapshot with refs
95
+ # Get workspace snapshot with refs
81
96
  agent-slack snapshot
82
97
 
83
- # 3. Send a message
98
+ # Send a message
84
99
  agent-slack message send general "Hello from AI agent!"
85
100
 
86
- # 4. Use refs for AI-friendly interaction
101
+ # Use refs for AI-friendly interaction
87
102
  agent-slack message send @c1 "Message to first channel"
88
103
  ```
89
104
 
90
105
  ### Discord
91
106
 
92
107
  ```bash
93
- # 1. Extract credentials from Discord desktop app
94
- agent-discord auth extract
95
-
96
- # 2. Get guild snapshot
108
+ # Get guild snapshot
97
109
  agent-discord snapshot
98
110
 
99
- # 3. Send a message (use channel ID)
111
+ # Send a message (use channel ID)
100
112
  agent-discord message send <channel-id> "Hello from AI agent!"
101
113
  ```
102
114
 
115
+ ### Teams
116
+
117
+ ```bash
118
+ # Get team snapshot
119
+ agent-teams snapshot
120
+
121
+ # Send a message
122
+ agent-teams message send <team-id> <channel-id> "Hello from AI agent!"
123
+ ```
124
+
103
125
  ## Example Usage
104
126
 
105
127
  ### Slack
@@ -141,4 +163,6 @@ agent-discord file upload <channel-id> ./report.pdf
141
163
 
142
164
  - [GitHub Repository](https://github.com/devxoul/agent-messenger)
143
165
  - [Slack Skill Documentation](https://github.com/devxoul/agent-messenger/blob/main/skills/agent-slack/SKILL.md)
166
+ - [Slack Bot Skill Documentation](https://github.com/devxoul/agent-messenger/blob/main/skills/agent-slackbot/SKILL.md)
144
167
  - [Discord Skill Documentation](https://github.com/devxoul/agent-messenger/blob/main/skills/agent-discord/SKILL.md)
168
+ - [Teams Skill Documentation](https://github.com/devxoul/agent-messenger/blob/main/skills/agent-teams/SKILL.md)
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-messenger",
3
- "version": "1.3.6",
3
+ "version": "1.5.0",
4
4
  "description": "Messaging platform interaction skills for AI agents. Interact with Slack, Discord, and Microsoft Teams - send messages, read channels, manage reactions, upload files, and more through simple CLI interfaces.",
5
5
  "author": {
6
6
  "name": "devxoul",
@@ -20,6 +20,9 @@ jobs:
20
20
  - name: Install dependencies
21
21
  run: bun install --frozen-lockfile
22
22
 
23
+ - name: Typecheck
24
+ run: bun run typecheck
25
+
23
26
  - name: Lint
24
27
  run: bun run lint
25
28
 
package/CONTRIBUTING.md CHANGED
@@ -89,22 +89,32 @@ test(channel): add channel list tests
89
89
  src/
90
90
  cli.ts # Main CLI entry point
91
91
  platforms/
92
- slack/ # Slack platform
92
+ slack/ # Slack platform (user token)
93
93
  cli.ts # Slack CLI entry
94
94
  client.ts # Slack API client
95
95
  credential-manager.ts # Credential storage
96
96
  token-extractor.ts # Auto credential extraction
97
+ ensure-auth.ts # Auto-auth on first command
97
98
  types.ts # TypeScript types
98
99
  commands/ # Command handlers
99
100
  auth.ts
100
101
  channel.ts
101
102
  message.ts
102
103
  ...
104
+ slackbot/ # Slack Bot platform (bot token)
105
+ cli.ts # Slack Bot CLI entry
106
+ client.ts # Slack Bot API client
107
+ commands/ # Command handlers
108
+ auth.ts
109
+ channel.ts
110
+ message.ts
111
+ ...
103
112
  discord/ # Discord platform
104
113
  cli.ts # Discord CLI entry
105
114
  client.ts # Discord API client
106
115
  credential-manager.ts # Credential storage
107
116
  token-extractor.ts # Auto credential extraction
117
+ ensure-auth.ts # Auto-auth on first command
108
118
  types.ts # TypeScript types
109
119
  commands/ # Command handlers
110
120
  auth.ts
@@ -112,6 +122,19 @@ src/
112
122
  server.ts
113
123
  message.ts
114
124
  ...
125
+ teams/ # Microsoft Teams platform
126
+ cli.ts # Teams CLI entry
127
+ client.ts # Teams API client
128
+ credential-manager.ts # Credential storage
129
+ token-extractor.ts # Auto credential extraction
130
+ ensure-auth.ts # Auto-auth on first command
131
+ types.ts # TypeScript types
132
+ commands/ # Command handlers
133
+ auth.ts
134
+ channel.ts
135
+ team.ts
136
+ message.ts
137
+ ...
115
138
  shared/
116
139
  utils/ # Shared utilities
117
140
  ```
package/README.md CHANGED
@@ -10,6 +10,7 @@ Messaging platforms only offer Bot tokens for API access—your AI agent can nev
10
10
 
11
11
  - 🎭 **Act as yourself, not a bot** — Extracted user tokens let your agent operate on your behalf
12
12
  - 🔑 **No API keys needed** — Automatically extracts credentials from your installed desktop apps
13
+ - ⚡ **Zero setup** — Credentials are auto-extracted on first command. No manual auth step required
13
14
  - 🌐 **One interface, multiple platforms** — Learn once, use everywhere (Slack, Discord, Teams)
14
15
  - 🤖 **AI-agent friendly** — JSON output by default, perfect for LLM tool use
15
16
  - 👤 **Human friendly too** — Add `--pretty` for readable output
@@ -72,30 +73,33 @@ Add to your `opencode.jsonc`:
72
73
  Get up and running in 30 seconds:
73
74
 
74
75
  ```bash
75
- # 1. Extract credentials from your Slack desktop app
76
- agent-slack auth extract
77
-
78
- # 2. See your workspace at a glance
76
+ # 1. See your workspace at a glance
79
77
  agent-slack snapshot --pretty
80
78
 
81
- # 3. Send a message
79
+ # 2. Send a message
82
80
  agent-slack message send general "Hello from the CLI!"
83
81
  ```
84
82
 
85
- That's it. No OAuth flows. No API tokens. No configuration files.
83
+ That's it. Credentials are extracted automatically from your Slack desktop app on first run. No OAuth flows. No API tokens. No configuration files.
86
84
 
87
85
  ## 📋 Supported Platforms
88
86
 
89
87
  | Feature | Slack | Discord | Teams |
90
88
  |---------|:-----:|:-------:|:-----:|
91
89
  | Auto credential extraction | ✅ | ✅ | ✅ |
92
- | Send / List / Search messages | ✅ | ✅ | ✅ |
93
- | Threads | ✅ | ✅ | |
90
+ | Send & list messages | ✅ | ✅ | ✅ |
91
+ | Search messages | ✅ | ✅ | |
92
+ | Threads | ✅ | ✅ | — |
94
93
  | Channels & Users | ✅ | ✅ | ✅ |
95
94
  | Reactions | ✅ | ✅ | ✅ |
96
95
  | File uploads | ✅ | ✅ | ✅ |
97
96
  | Workspace snapshots | ✅ | ✅ | ✅ |
98
97
  | Multi-workspace | ✅ | ✅ | ✅ |
98
+ | Activity feed | ✅ | — | — |
99
+ | Drafts | ✅ | — | — |
100
+ | Saved items | ✅ | — | — |
101
+ | Unread messages | ✅ | — | — |
102
+ | Sidebar sections | ✅ | — | — |
99
103
  | Bot support | ✅ | — | — |
100
104
 
101
105
  > ⚠️ **Teams tokens expire in 60-90 minutes.** Re-run `agent-teams auth extract` to refresh. See [Teams Guide](skills/agent-teams/SKILL.md) for details.
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-messenger",
3
- "version": "1.3.6",
3
+ "version": "1.5.0",
4
4
  "description": "Multi-platform messaging CLI for AI agents (Slack, Discord, Teams)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAOnC,QAAA,MAAM,OAAO,SAAgB,CAAA;AAmB7B,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAOnC,QAAA,MAAM,OAAO,SAAgB,CAAA;AAuB7B,eAAe,OAAO,CAAA"}
package/dist/src/cli.js CHANGED
@@ -18,6 +18,9 @@ program.command('discord', 'Interact with Discord guilds', {
18
18
  program.command('teams', 'Interact with Microsoft Teams', {
19
19
  executableFile: join(__dirname, 'platforms', 'teams', `cli${ext}`),
20
20
  });
21
+ program.command('slackbot', 'Interact with Slack using bot tokens', {
22
+ executableFile: join(__dirname, 'platforms', 'slackbot', `cli${ext}`),
23
+ });
21
24
  program.parse(process.argv);
22
25
  export default program;
23
26
  //# sourceMappingURL=cli.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAEvD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CA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/bin/env bun
2
- import { Command } from 'commander';
3
- declare const program: Command;
2
+ import type { Command as CommandType } from 'commander';
3
+ declare const program: CommandType;
4
4
  export default program;
5
5
  //# sourceMappingURL=cli.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../src/platforms/discord/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAanC,QAAA,MAAM,OAAO,SAAgB,CAAA;AAoB7B,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../src/platforms/discord/cli.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAA;AA+BvD,QAAA,MAAM,OAAO,aAAgB,CAAA;AAgC7B,eAAe,OAAO,CAAA"}
@@ -1,7 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
3
  import pkg from '../../../package.json' with { type: 'json' };
4
- import { authCommand, channelCommand, fileCommand, messageCommand, reactionCommand, serverCommand, snapshotCommand, userCommand, } from './commands/index.js';
4
+ import { authCommand, channelCommand, dmCommand, fileCommand, friendCommand, memberCommand, mentionCommand, messageCommand, noteCommand, profileCommand, reactionCommand, serverCommand, snapshotCommand, threadCommand, userCommand, } from './commands/index.js';
5
+ import { ensureDiscordAuth } from './ensure-auth.js';
6
+ function isAuthCommand(command) {
7
+ let cmd = command;
8
+ while (cmd) {
9
+ if (cmd.name() === 'auth')
10
+ return true;
11
+ cmd = cmd.parent;
12
+ }
13
+ return false;
14
+ }
5
15
  const program = new Command();
6
16
  program
7
17
  .name('agent-discord')
@@ -9,13 +19,25 @@ program
9
19
  .version(pkg.version)
10
20
  .option('--pretty', 'Pretty-print JSON output')
11
21
  .option('--server <id>', 'Use specific server');
22
+ program.hook('preAction', async (_thisCommand, actionCommand) => {
23
+ if (isAuthCommand(actionCommand))
24
+ return;
25
+ await ensureDiscordAuth();
26
+ });
12
27
  program.addCommand(authCommand);
13
28
  program.addCommand(serverCommand);
14
29
  program.addCommand(channelCommand);
30
+ program.addCommand(dmCommand);
15
31
  program.addCommand(fileCommand);
32
+ program.addCommand(friendCommand);
33
+ program.addCommand(memberCommand);
34
+ program.addCommand(mentionCommand);
16
35
  program.addCommand(messageCommand);
36
+ program.addCommand(noteCommand);
37
+ program.addCommand(profileCommand);
17
38
  program.addCommand(reactionCommand);
18
39
  program.addCommand(snapshotCommand);
40
+ program.addCommand(threadCommand);
19
41
  program.addCommand(userCommand);
20
42
  program.parse(process.argv);
21
43
  export default program;
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../src/platforms/discord/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,GAAG,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAA;AAC7D,OAAO,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,WAAW,GACZ,MAAM,YAAY,CAAA;AAEnB,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAA;AAE7B,OAAO;KACJ,IAAI,CAAC,eAAe,CAAC;KACrB,WAAW,CAAC,oCAAoC,CAAC;KACjD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;KACpB,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC,CAAA;AAEjD,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;AAC/B,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAA;AACjC,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;AAClC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;AAC/B,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,CAA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AE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAC/C,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBhG;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BhH;AAED,eAAO,MAAM,WAAW,SAmBrB,CAAA"}
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAOnC,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAC/C,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBhG;AAED,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BhH;AAED,eAAO,MAAM,WAAW,SAyBrB,CAAA"}
@@ -80,17 +80,23 @@ export async function infoAction(channelId, fileId, options) {
80
80
  }
81
81
  }
82
82
  export const fileCommand = new Command('file')
83
- .description('file commands')
83
+ .description('File commands')
84
84
  .addCommand(new Command('upload')
85
- .description('upload file to channel')
86
- .argument('<channel>', 'channel ID')
85
+ .description('Upload file to channel')
86
+ .argument('<channel-id>', 'Channel ID')
87
87
  .argument('<path>', 'file path')
88
88
  .option('--filename <name>', 'override filename')
89
+ .option('--pretty', 'Pretty print JSON output')
89
90
  .action(uploadAction))
90
- .addCommand(new Command('list').description('list files in channel').argument('<channel>', 'channel ID').action(listAction))
91
+ .addCommand(new Command('list')
92
+ .description('List files in channel')
93
+ .argument('<channel-id>', 'Channel ID')
94
+ .option('--pretty', 'Pretty print JSON output')
95
+ .action(listAction))
91
96
  .addCommand(new Command('info')
92
- .description('show file details')
93
- .argument('<channel>', 'channel ID')
94
- .argument('<file>', 'file ID')
97
+ .description('Show file details')
98
+ .argument('<channel-id>', 'Channel ID')
99
+ .argument('<file-id>', 'File ID')
100
+ .option('--pretty', 'Pretty print JSON output')
95
101
  .action(infoAction));
96
102
  //# sourceMappingURL=file.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAGhE,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,SAAiB,EACjB,IAAY,EACZ,OAAgD;IAEhD,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,wBAAwB,EAAE,CAAA;QAClD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAA;QAEvC,IAAI,CAAC,MAAM,CAAC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U,CAAC,CACtB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"friend.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/friend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAInC,eAAO,MAAM,aAAa,SAsCzB,CAAA"}
1
+ {"version":3,"file":"friend.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/friend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAmCnC,eAAO,MAAM,aAAa,SAOvB,CAAA"}
@@ -1,37 +1,37 @@
1
1
  import { Command } from 'commander';
2
+ import { handleError } from '../../../shared/utils/error-handler.js';
3
+ import { formatOutput } from '../../../shared/utils/output.js';
2
4
  import { DiscordClient } from '../client.js';
3
5
  import { DiscordCredentialManager } from '../credential-manager.js';
4
- export const friendCommand = new Command('friend').description('Manage Discord relationships (friends)').addCommand(new Command('list')
5
- .description('List all relationships')
6
- .option('--pretty', 'Pretty print output')
7
- .action(async (options) => {
8
- const credManager = new DiscordCredentialManager();
9
- const config = await credManager.load();
10
- if (!config.token) {
11
- throw new Error('No Discord token found. Run auth extract first.');
12
- }
13
- const client = new DiscordClient(config.token);
14
- const relationships = await client.getRelationships();
15
- if (options.pretty) {
16
- const typeNames = {
17
- 1: 'Friend',
18
- 2: 'Blocked',
19
- 3: 'Incoming Request',
20
- 4: 'Outgoing Request',
21
- };
22
- console.log(`\nRelationships (${relationships.length}):\n`);
23
- for (const rel of relationships) {
24
- const displayName = rel.user.global_name || rel.user.username;
25
- const nickname = rel.nickname ? ` (${rel.nickname})` : '';
26
- const type = typeNames[rel.type] || `Type ${rel.type}`;
27
- console.log(` ${displayName}${nickname} - ${type}`);
28
- console.log(` ID: ${rel.user.id}`);
29
- console.log(` Username: ${rel.user.username}`);
30
- console.log();
6
+ async function listAction(options) {
7
+ try {
8
+ const credManager = new DiscordCredentialManager();
9
+ const config = await credManager.load();
10
+ if (!config.token) {
11
+ console.log(formatOutput({ error: 'Not authenticated. Run "auth extract" first.' }, options.pretty));
12
+ process.exit(1);
31
13
  }
14
+ const client = new DiscordClient(config.token);
15
+ const relationships = await client.getRelationships();
16
+ const output = relationships.map((rel) => ({
17
+ user: {
18
+ id: rel.user.id,
19
+ username: rel.user.username,
20
+ global_name: rel.user.global_name,
21
+ },
22
+ type: rel.type,
23
+ nickname: rel.nickname || null,
24
+ }));
25
+ console.log(formatOutput(output, options.pretty));
32
26
  }
33
- else {
34
- console.log(JSON.stringify(relationships, null, 2));
27
+ catch (error) {
28
+ handleError(error);
35
29
  }
36
- }));
30
+ }
31
+ export const friendCommand = new Command('friend')
32
+ .description('Friend commands')
33
+ .addCommand(new Command('list')
34
+ .description('List all relationships')
35
+ .option('--pretty', 'Pretty print JSON output')
36
+ .action(listAction));
37
37
  //# sourceMappingURL=friend.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"friend.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/friend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,wCAAwC,CAAC,CAAC,UAAU,CACjH,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,UAAU,EAAE,qBAAqB,CAAC;KACzC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACxB,MAAM,WAAW,GAAG,IAAI,wBAAwB,EAAE,CAAA;IAClD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAA;IAEvC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CA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,EAAE,GAAG,CAAC,QAAQ,IAAI,IAAI;SAC/B,CAAC,CAAC,CAAA;QAEH,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;IACnD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,WAAW,CAAC,KAAc,CAAC,CAAA;IAC7B,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC;KAC/C,WAAW,CAAC,iBAAiB,CAAC;KAC9B,UAAU,CACT,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,UAAU,CAAC,CACtB,CAAA"}
@@ -1,9 +1,16 @@
1
1
  export { authCommand } from './auth.js';
2
2
  export { channelCommand } from './channel.js';
3
+ export { dmCommand } from './dm.js';
3
4
  export { fileCommand } from './file.js';
5
+ export { friendCommand } from './friend.js';
6
+ export { memberCommand } from './member.js';
7
+ export { mentionCommand } from './mention.js';
4
8
  export { messageCommand } from './message.js';
9
+ export { noteCommand } from './note.js';
10
+ export { profileCommand } from './profile.js';
5
11
  export { reactionCommand } from './reaction.js';
6
12
  export { serverCommand } from './server.js';
7
13
  export { snapshotCommand } from './snapshot.js';
14
+ export { threadCommand } from './thread.js';
8
15
  export { userCommand } from './user.js';
9
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA"}
@@ -1,9 +1,16 @@
1
1
  export { authCommand } from './auth.js';
2
2
  export { channelCommand } from './channel.js';
3
+ export { dmCommand } from './dm.js';
3
4
  export { fileCommand } from './file.js';
5
+ export { friendCommand } from './friend.js';
6
+ export { memberCommand } from './member.js';
7
+ export { mentionCommand } from './mention.js';
4
8
  export { messageCommand } from './message.js';
9
+ export { noteCommand } from './note.js';
10
+ export { profileCommand } from './profile.js';
5
11
  export { reactionCommand } from './reaction.js';
6
12
  export { serverCommand } from './server.js';
7
13
  export { snapshotCommand } from './snapshot.js';
14
+ export { threadCommand } from './thread.js';
8
15
  export { userCommand } from './user.js';
9
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyEhB;AAED,eAAO,MAAM,eAAe,SAaxB,CAAA"}
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyEhB;AAED,eAAO,MAAM,eAAe,SAYxB,CAAA"}
@@ -63,8 +63,7 @@ export async function snapshotAction(options) {
63
63
  handleError(error);
64
64
  }
65
65
  }
66
- export const snapshotCommand = new Command()
67
- .name('snapshot')
66
+ export const snapshotCommand = new Command('snapshot')
68
67
  .description('Get comprehensive server state for AI agents')
69
68
  .option('--channels-only', 'Include only channels (exclude messages and members)')
70
69
  .option('--users-only', 'Include only members (exclude channels and messages)')
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../../src/platforms/discord/commands/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAGhE,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAKpC;IACC,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,wBAAwB,EAAE,CAAA;QAClD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAA;QAEvC,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;YAC5C,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,mDAAmD,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;YACzG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACjB,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,KAAe,CAAC,CAAA;QACxD,MAAM,QAAQ,GAAG,MAAM,CAAC,cAAwB,CAAA;QAChD,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAA;QAExC,MAAM,QAAQ,GAAwB,EAAE,CAAA;QAExC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;QA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cAAc,CAAC;QACnB,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;QAClC,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function ensureDiscordAuth(): Promise<void>;
2
+ //# sourceMappingURL=ensure-auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure-auth.d.ts","sourceRoot":"","sources":["../../../../src/platforms/discord/ensure-auth.ts"],"names":[],"mappings":"AAIA,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CA0BvD"}
@@ -0,0 +1,31 @@
1
+ import { DiscordClient } from './client.js';
2
+ import { DiscordCredentialManager } from './credential-manager.js';
3
+ import { DiscordTokenExtractor } from './token-extractor.js';
4
+ export async function ensureDiscordAuth() {
5
+ try {
6
+ const credManager = new DiscordCredentialManager();
7
+ const token = await credManager.getToken();
8
+ if (token)
9
+ return;
10
+ const extractor = new DiscordTokenExtractor();
11
+ const extracted = await extractor.extract();
12
+ if (!extracted)
13
+ return;
14
+ const client = new DiscordClient(extracted.token);
15
+ const authInfo = await client.testAuth();
16
+ if (!authInfo)
17
+ return;
18
+ const servers = await client.listServers();
19
+ const serverMap = {};
20
+ for (const server of servers) {
21
+ serverMap[server.id] = { server_id: server.id, server_name: server.name };
22
+ }
23
+ await credManager.save({
24
+ token: extracted.token,
25
+ current_server: servers[0]?.id ?? null,
26
+ servers: serverMap,
27
+ });
28
+ }
29
+ catch { }
30
+ }
31
+ //# sourceMappingURL=ensure-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure-auth.js","sourceRoot":"","sources":["../../../../src/platforms/discord/ensure-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;A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2
+ import type { Command as CommandType } from 'commander';
3
+ declare const program: CommandType;
4
4
  export default program;
5
5
  //# sourceMappingURL=cli.d.ts.map