agent-messenger 1.3.4 → 1.3.6
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/.env.template +17 -1
- package/bunfig.e2e.toml +3 -0
- package/bunfig.toml +2 -0
- package/dist/package.json +3 -3
- package/dist/src/cli.d.ts.map +1 -1
- package/dist/src/cli.js +4 -3
- package/dist/src/cli.js.map +1 -1
- package/dist/src/platforms/discord/cli.js +1 -1
- package/dist/src/platforms/discord/client.d.ts +1 -1
- package/dist/src/platforms/discord/client.js +1 -1
- package/dist/src/platforms/discord/commands/auth.js +5 -5
- package/dist/src/platforms/discord/commands/channel.js +4 -4
- package/dist/src/platforms/discord/commands/dm.js +4 -4
- package/dist/src/platforms/discord/commands/file.js +4 -4
- package/dist/src/platforms/discord/commands/friend.js +2 -2
- package/dist/src/platforms/discord/commands/index.d.ts +8 -8
- package/dist/src/platforms/discord/commands/index.js +8 -8
- package/dist/src/platforms/discord/commands/member.js +4 -4
- package/dist/src/platforms/discord/commands/mention.js +4 -4
- package/dist/src/platforms/discord/commands/message.js +4 -4
- package/dist/src/platforms/discord/commands/note.js +4 -4
- package/dist/src/platforms/discord/commands/profile.js +4 -4
- package/dist/src/platforms/discord/commands/reaction.js +4 -4
- package/dist/src/platforms/discord/commands/server.js +4 -4
- package/dist/src/platforms/discord/commands/snapshot.js +5 -5
- package/dist/src/platforms/discord/commands/thread.js +4 -4
- package/dist/src/platforms/discord/commands/user.js +4 -4
- package/dist/src/platforms/discord/token-extractor.d.ts +1 -1
- package/dist/src/platforms/discord/token-extractor.js +1 -1
- package/dist/src/platforms/slack/cli.js +1 -1
- package/dist/src/platforms/slack/client.d.ts +1 -1
- package/dist/src/platforms/slack/client.js +3 -3
- package/dist/src/platforms/slack/client.js.map +1 -1
- package/dist/src/platforms/slack/commands/activity.js +4 -4
- package/dist/src/platforms/slack/commands/auth.js +5 -5
- package/dist/src/platforms/slack/commands/channel.js +4 -4
- package/dist/src/platforms/slack/commands/drafts.js +4 -4
- package/dist/src/platforms/slack/commands/file.js +4 -4
- package/dist/src/platforms/slack/commands/index.d.ts +13 -13
- package/dist/src/platforms/slack/commands/index.js +13 -13
- package/dist/src/platforms/slack/commands/message.js +4 -4
- package/dist/src/platforms/slack/commands/reaction.js +4 -4
- package/dist/src/platforms/slack/commands/saved.js +4 -4
- package/dist/src/platforms/slack/commands/sections.js +4 -4
- package/dist/src/platforms/slack/commands/snapshot.js +5 -5
- package/dist/src/platforms/slack/commands/unread.js +4 -4
- package/dist/src/platforms/slack/commands/user.js +4 -4
- package/dist/src/platforms/slack/commands/workspace.js +3 -3
- package/dist/src/platforms/slack/credential-manager.d.ts +1 -1
- package/dist/src/platforms/slack/index.d.ts +2 -2
- package/dist/src/platforms/slack/index.js +2 -2
- package/dist/src/platforms/slack/token-extractor.d.ts +1 -1
- package/dist/src/platforms/slack/token-extractor.js +1 -1
- package/dist/src/platforms/slackbot/cli.js +2 -2
- package/dist/src/platforms/slackbot/client.d.ts +1 -1
- package/dist/src/platforms/slackbot/client.js +1 -1
- package/dist/src/platforms/slackbot/commands/auth.d.ts +1 -1
- package/dist/src/platforms/slackbot/commands/auth.js +3 -3
- package/dist/src/platforms/slackbot/commands/channel.js +3 -3
- package/dist/src/platforms/slackbot/commands/index.d.ts +5 -5
- package/dist/src/platforms/slackbot/commands/index.js +5 -5
- package/dist/src/platforms/slackbot/commands/message.js +3 -3
- package/dist/src/platforms/slackbot/commands/reaction.js +3 -3
- package/dist/src/platforms/slackbot/commands/shared.d.ts +2 -2
- package/dist/src/platforms/slackbot/commands/shared.js +3 -3
- package/dist/src/platforms/slackbot/commands/user.js +3 -3
- package/dist/src/platforms/slackbot/credential-manager.d.ts +1 -1
- package/dist/src/platforms/slackbot/index.d.ts +3 -3
- package/dist/src/platforms/slackbot/index.js +3 -3
- package/dist/src/platforms/teams/cli.js +2 -2
- package/dist/src/platforms/teams/client.d.ts +1 -1
- package/dist/src/platforms/teams/client.js +1 -1
- package/dist/src/platforms/teams/commands/auth.js +5 -5
- package/dist/src/platforms/teams/commands/channel.js +4 -4
- package/dist/src/platforms/teams/commands/file.js +4 -4
- package/dist/src/platforms/teams/commands/index.d.ts +8 -8
- package/dist/src/platforms/teams/commands/index.js +8 -8
- package/dist/src/platforms/teams/commands/message.js +4 -4
- package/dist/src/platforms/teams/commands/reaction.js +4 -4
- package/dist/src/platforms/teams/commands/snapshot.js +5 -5
- package/dist/src/platforms/teams/commands/team.js +4 -4
- package/dist/src/platforms/teams/commands/user.js +4 -4
- package/dist/src/platforms/teams/credential-manager.d.ts +1 -1
- package/dist/src/platforms/teams/token-extractor.d.ts +1 -1
- package/dist/src/platforms/teams/token-extractor.js +1 -1
- package/e2e/README.md +62 -12
- package/e2e/config.ts +38 -0
- package/e2e/discord.e2e.test.ts +49 -2
- package/e2e/helpers.ts +1 -0
- package/e2e/setup.ts +10 -0
- package/e2e/slack.e2e.test.ts +77 -0
- package/e2e/teams.e2e.test.ts +287 -0
- package/package.json +3 -3
- package/scripts/postbuild.ts +2 -0
- package/skills/agent-discord/SKILL.md +11 -5
- package/skills/agent-slack/SKILL.md +11 -5
- package/skills/agent-slackbot/SKILL.md +11 -5
- package/skills/agent-teams/SKILL.md +11 -5
- package/src/cli.ts +4 -3
- package/src/platforms/slack/client.ts +4 -4
|
@@ -337,15 +337,21 @@ Format:
|
|
|
337
337
|
|
|
338
338
|
### `agent-discord: command not found`
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
**`agent-discord` is NOT the npm package name.** The npm package is `agent-messenger`.
|
|
341
|
+
|
|
342
|
+
If the package is installed globally, use `agent-discord` directly:
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
agent-discord message list general
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
If the package is NOT installed, use `bunx agent-messenger discord`:
|
|
341
349
|
|
|
342
350
|
```bash
|
|
343
|
-
|
|
344
|
-
bunx -p agent-messenger agent-discord ...
|
|
345
|
-
pnpm dlx --package agent-messenger agent-discord ...
|
|
351
|
+
bunx agent-messenger discord message list general
|
|
346
352
|
```
|
|
347
353
|
|
|
348
|
-
|
|
354
|
+
**NEVER run `bunx agent-discord`** — it will fail or install a wrong package since `agent-discord` is not the npm package name.
|
|
349
355
|
|
|
350
356
|
## References
|
|
351
357
|
|
|
@@ -319,15 +319,21 @@ Format:
|
|
|
319
319
|
|
|
320
320
|
### `agent-slack: command not found`
|
|
321
321
|
|
|
322
|
-
|
|
322
|
+
**`agent-slack` is NOT the npm package name.** The npm package is `agent-messenger`.
|
|
323
|
+
|
|
324
|
+
If the package is installed globally, use `agent-slack` directly:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
agent-slack message list general
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
If the package is NOT installed, use `bunx agent-messenger slack` (note: `slack` subcommand, not `agent-slack`):
|
|
323
331
|
|
|
324
332
|
```bash
|
|
325
|
-
|
|
326
|
-
bunx -p agent-messenger agent-slack ...
|
|
327
|
-
pnpm dlx --package agent-messenger agent-slack ...
|
|
333
|
+
bunx agent-messenger slack message list general
|
|
328
334
|
```
|
|
329
335
|
|
|
330
|
-
|
|
336
|
+
**NEVER run `bunx agent-slack`** — a separate, unrelated npm package named `agent-slack` exists on npm. It will silently install the **wrong package** with different (fewer) commands.
|
|
331
337
|
|
|
332
338
|
## References
|
|
333
339
|
|
|
@@ -283,15 +283,21 @@ Format:
|
|
|
283
283
|
|
|
284
284
|
### `agent-slackbot: command not found`
|
|
285
285
|
|
|
286
|
-
|
|
286
|
+
**`agent-slackbot` is NOT the npm package name.** The npm package is `agent-messenger`.
|
|
287
|
+
|
|
288
|
+
If the package is installed globally, use `agent-slackbot` directly:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
agent-slackbot message send general "Hello"
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
If the package is NOT installed, use `bunx agent-messenger slackbot`:
|
|
287
295
|
|
|
288
296
|
```bash
|
|
289
|
-
|
|
290
|
-
bunx -p agent-messenger agent-slackbot ...
|
|
291
|
-
pnpm dlx --package agent-messenger agent-slackbot ...
|
|
297
|
+
bunx agent-messenger slackbot message send general "Hello"
|
|
292
298
|
```
|
|
293
299
|
|
|
294
|
-
|
|
300
|
+
**NEVER run `bunx agent-slackbot`** — it will fail or install a wrong package since `agent-slackbot` is not the npm package name.
|
|
295
301
|
|
|
296
302
|
## References
|
|
297
303
|
|
|
@@ -290,15 +290,21 @@ Format:
|
|
|
290
290
|
|
|
291
291
|
### `agent-teams: command not found`
|
|
292
292
|
|
|
293
|
-
|
|
293
|
+
**`agent-teams` is NOT the npm package name.** The npm package is `agent-messenger`.
|
|
294
|
+
|
|
295
|
+
If the package is installed globally, use `agent-teams` directly:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
agent-teams message list general
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
If the package is NOT installed, use `bunx agent-messenger teams`:
|
|
294
302
|
|
|
295
303
|
```bash
|
|
296
|
-
|
|
297
|
-
bunx -p agent-messenger agent-teams ...
|
|
298
|
-
pnpm dlx --package agent-messenger agent-teams ...
|
|
304
|
+
bunx agent-messenger teams message list general
|
|
299
305
|
```
|
|
300
306
|
|
|
301
|
-
|
|
307
|
+
**NEVER run `bunx agent-teams`** — it will fail or install a wrong package since `agent-teams` is not the npm package name.
|
|
302
308
|
|
|
303
309
|
## References
|
|
304
310
|
|
package/src/cli.ts
CHANGED
|
@@ -7,6 +7,7 @@ import pkg from '../package.json' with { type: 'json' }
|
|
|
7
7
|
|
|
8
8
|
const __filename = fileURLToPath(import.meta.url)
|
|
9
9
|
const __dirname = dirname(__filename)
|
|
10
|
+
const ext = __filename.endsWith('.ts') ? '.ts' : '.js'
|
|
10
11
|
|
|
11
12
|
const program = new Command()
|
|
12
13
|
|
|
@@ -14,15 +15,15 @@ program.name('agent-messenger').description('Multi-platform messaging CLI for AI
|
|
|
14
15
|
|
|
15
16
|
// Use absolute paths for CWD-independence
|
|
16
17
|
program.command('slack', 'Interact with Slack workspaces', {
|
|
17
|
-
executableFile: join(__dirname, 'platforms', 'slack',
|
|
18
|
+
executableFile: join(__dirname, 'platforms', 'slack', `cli${ext}`),
|
|
18
19
|
})
|
|
19
20
|
|
|
20
21
|
program.command('discord', 'Interact with Discord guilds', {
|
|
21
|
-
executableFile: join(__dirname, 'platforms', 'discord',
|
|
22
|
+
executableFile: join(__dirname, 'platforms', 'discord', `cli${ext}`),
|
|
22
23
|
})
|
|
23
24
|
|
|
24
25
|
program.command('teams', 'Interact with Microsoft Teams', {
|
|
25
|
-
executableFile: join(__dirname, 'platforms', 'teams',
|
|
26
|
+
executableFile: join(__dirname, 'platforms', 'teams', `cli${ext}`),
|
|
26
27
|
})
|
|
27
28
|
|
|
28
29
|
program.parse(process.argv)
|
|
@@ -526,14 +526,14 @@ export class SlackClient {
|
|
|
526
526
|
|
|
527
527
|
async getActivityFeed(options?: { types?: string; mode?: string; limit?: number }): Promise<SlackActivityItem[]> {
|
|
528
528
|
return this.withRetry(async () => {
|
|
529
|
-
const response = await
|
|
530
|
-
types: options?.types,
|
|
529
|
+
const response = await this.client.apiCall('activity.feed', {
|
|
530
|
+
types: options?.types || 'thread_reply,message_reaction,at_user,at_channel,keyword',
|
|
531
531
|
mode: options?.mode || 'chrono_reads_and_unreads',
|
|
532
532
|
limit: options?.limit || 20,
|
|
533
533
|
})
|
|
534
534
|
this.checkResponse(response)
|
|
535
535
|
|
|
536
|
-
const items = (response.items || []).map((item: any) => ({
|
|
536
|
+
const items = ((response as any).items || []).map((item: any) => ({
|
|
537
537
|
id: item.id || '',
|
|
538
538
|
type: item.type || '',
|
|
539
539
|
channel: item.channel || '',
|
|
@@ -555,7 +555,7 @@ export class SlackClient {
|
|
|
555
555
|
return this.withRetry(async () => {
|
|
556
556
|
const response = await (this.client as any).apiCall('saved.list', {
|
|
557
557
|
cursor,
|
|
558
|
-
limit:
|
|
558
|
+
limit: 50,
|
|
559
559
|
})
|
|
560
560
|
this.checkResponse(response)
|
|
561
561
|
|