agent-messenger 2.21.0 → 2.22.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/dist/package.json +1 -1
- package/dist/src/platforms/webex/client.d.ts +19 -0
- package/dist/src/platforms/webex/client.d.ts.map +1 -1
- package/dist/src/platforms/webex/client.js +81 -1
- package/dist/src/platforms/webex/client.js.map +1 -1
- package/dist/src/platforms/webexbot/cli.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/cli.js +4 -1
- package/dist/src/platforms/webexbot/cli.js.map +1 -1
- package/dist/src/platforms/webexbot/client.d.ts +20 -0
- package/dist/src/platforms/webexbot/client.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/client.js +15 -1
- package/dist/src/platforms/webexbot/client.js.map +1 -1
- package/dist/src/platforms/webexbot/commands/file.d.ts +22 -0
- package/dist/src/platforms/webexbot/commands/file.d.ts.map +1 -0
- package/dist/src/platforms/webexbot/commands/file.js +64 -0
- package/dist/src/platforms/webexbot/commands/file.js.map +1 -0
- package/dist/src/platforms/webexbot/commands/index.d.ts +3 -0
- package/dist/src/platforms/webexbot/commands/index.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/commands/index.js +3 -0
- package/dist/src/platforms/webexbot/commands/index.js.map +1 -1
- package/dist/src/platforms/webexbot/commands/message.d.ts +7 -0
- package/dist/src/platforms/webexbot/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/commands/message.js +52 -1
- package/dist/src/platforms/webexbot/commands/message.js.map +1 -1
- package/dist/src/platforms/webexbot/commands/snapshot.d.ts +24 -0
- package/dist/src/platforms/webexbot/commands/snapshot.d.ts.map +1 -0
- package/dist/src/platforms/webexbot/commands/snapshot.js +37 -0
- package/dist/src/platforms/webexbot/commands/snapshot.js.map +1 -0
- package/dist/src/platforms/webexbot/commands/user.d.ts +30 -0
- package/dist/src/platforms/webexbot/commands/user.d.ts.map +1 -0
- package/dist/src/platforms/webexbot/commands/user.js +66 -0
- package/dist/src/platforms/webexbot/commands/user.js.map +1 -0
- package/docs/content/docs/cli/webexbot.mdx +2 -0
- package/docs/content/docs/sdk/webexbot.mdx +2 -0
- package/package.json +1 -1
- package/skills/agent-channeltalk/SKILL.md +1 -1
- package/skills/agent-channeltalkbot/SKILL.md +1 -1
- package/skills/agent-discord/SKILL.md +1 -1
- package/skills/agent-discordbot/SKILL.md +1 -1
- package/skills/agent-instagram/SKILL.md +1 -1
- package/skills/agent-kakaotalk/SKILL.md +1 -1
- package/skills/agent-line/SKILL.md +1 -1
- package/skills/agent-slack/SKILL.md +1 -1
- package/skills/agent-slackbot/SKILL.md +1 -1
- package/skills/agent-teams/SKILL.md +1 -1
- package/skills/agent-telegram/SKILL.md +1 -1
- package/skills/agent-telegrambot/SKILL.md +1 -1
- package/skills/agent-webex/SKILL.md +1 -1
- package/skills/agent-webexbot/SKILL.md +58 -5
- package/skills/agent-webexbot/references/common-patterns.md +118 -0
- 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/webex/client.test.ts +10 -0
- package/src/platforms/webex/client.ts +97 -3
- package/src/platforms/webexbot/cli.ts +6 -0
- package/src/platforms/webexbot/client.test.ts +198 -0
- package/src/platforms/webexbot/client.ts +29 -3
- package/src/platforms/webexbot/commands/file.ts +104 -0
- package/src/platforms/webexbot/commands/index.ts +3 -0
- package/src/platforms/webexbot/commands/message.ts +68 -2
- package/src/platforms/webexbot/commands/snapshot.ts +60 -0
- package/src/platforms/webexbot/commands/user.test.ts +77 -0
- package/src/platforms/webexbot/commands/user.ts +98 -0
|
@@ -15,13 +15,42 @@ function formatMessage(message) {
|
|
|
15
15
|
export async function sendAction(space, text, options) {
|
|
16
16
|
try {
|
|
17
17
|
const client = await getClient(options);
|
|
18
|
-
const message = await client.sendMessage(space, text, { markdown: options.markdown });
|
|
18
|
+
const message = await client.sendMessage(space, text, { markdown: options.markdown, parentId: options.parent });
|
|
19
19
|
return formatMessage(message);
|
|
20
20
|
}
|
|
21
21
|
catch (error) {
|
|
22
22
|
return { error: error.message };
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
export async function replyAction(space, parentId, text, options) {
|
|
26
|
+
try {
|
|
27
|
+
const client = await getClient(options);
|
|
28
|
+
const message = await client.sendMessage(space, text, { markdown: options.markdown, parentId });
|
|
29
|
+
return formatMessage(message);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
return { error: error.message };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export async function repliesAction(space, parentId, options) {
|
|
36
|
+
try {
|
|
37
|
+
const client = await getClient(options);
|
|
38
|
+
const max = options.max ? parseInt(options.max, 10) : 50;
|
|
39
|
+
const messages = await client.listReplies(space, parentId, { max });
|
|
40
|
+
return {
|
|
41
|
+
messages: messages.map((msg) => ({
|
|
42
|
+
id: msg.id,
|
|
43
|
+
roomId: msg.roomId,
|
|
44
|
+
text: msg.text,
|
|
45
|
+
personEmail: msg.personEmail,
|
|
46
|
+
created: msg.created,
|
|
47
|
+
})),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
return { error: error.message };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
25
54
|
export async function dmAction(email, text, options) {
|
|
26
55
|
try {
|
|
27
56
|
const client = await getClient(options);
|
|
@@ -88,10 +117,32 @@ export const messageCommand = new Command('message')
|
|
|
88
117
|
.argument('<space>', 'Space/Room ID')
|
|
89
118
|
.argument('<text>', 'Message text')
|
|
90
119
|
.option('--markdown', 'Send as markdown')
|
|
120
|
+
.option('--parent <id>', 'Reply within a thread (parent message ID)')
|
|
91
121
|
.option('--bot <id>', 'Use specific bot')
|
|
92
122
|
.option('--pretty', 'Pretty print JSON output')
|
|
93
123
|
.action(async (space, text, opts) => {
|
|
94
124
|
cliOutput(await sendAction(space, text, opts), opts.pretty);
|
|
125
|
+
}))
|
|
126
|
+
.addCommand(new Command('reply')
|
|
127
|
+
.description('Reply to a message in a thread')
|
|
128
|
+
.argument('<space>', 'Space/Room ID')
|
|
129
|
+
.argument('<parent>', 'Parent message ID')
|
|
130
|
+
.argument('<text>', 'Reply text')
|
|
131
|
+
.option('--markdown', 'Send as markdown')
|
|
132
|
+
.option('--bot <id>', 'Use specific bot')
|
|
133
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
134
|
+
.action(async (space, parent, text, opts) => {
|
|
135
|
+
cliOutput(await replyAction(space, parent, text, opts), opts.pretty);
|
|
136
|
+
}))
|
|
137
|
+
.addCommand(new Command('replies')
|
|
138
|
+
.description('List replies in a thread')
|
|
139
|
+
.argument('<space>', 'Space/Room ID')
|
|
140
|
+
.argument('<parent>', 'Parent message ID')
|
|
141
|
+
.option('--max <n>', 'Number of replies to fetch', '50')
|
|
142
|
+
.option('--bot <id>', 'Use specific bot')
|
|
143
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
144
|
+
.action(async (space, parent, opts) => {
|
|
145
|
+
cliOutput(await repliesAction(space, parent, opts), opts.pretty);
|
|
95
146
|
}))
|
|
96
147
|
.addCommand(new Command('dm')
|
|
97
148
|
.description('Send a direct message by recipient email')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../../src/platforms/webexbot/commands/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAIrD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAqBpC,SAAS,aAAa,CAAC,OAAqB;IAC1C,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1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AAE,IAAe,EAAE,EAAE;IACnD,SAAS,CAAC,MAAM,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;AAC7D,CAAC,CAAC,CACL;KACA,UAAU,CACT,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,gBAAgB,CAAC;KAC7B,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;KAC9B,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;KACpC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;KACtC,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC;KACxC,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC;KACxC,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,KAAK,EAAE,SAAiB,EAAE,KAAa,EAAE,IAAY,EAAE,IAAwC,EAAE,EAAE;IACzG,SAAS,CAAC,MAAM,UAAU,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;AACxE,CAAC,CAAC,CACL,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import type { BotOption } from './shared.js';
|
|
3
|
+
interface SnapshotResult {
|
|
4
|
+
bot?: {
|
|
5
|
+
id: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
emails: string[];
|
|
8
|
+
};
|
|
9
|
+
spaces?: Array<{
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
type?: 'group' | 'direct';
|
|
13
|
+
lastActivity?: string;
|
|
14
|
+
}>;
|
|
15
|
+
hint?: string;
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function snapshotAction(options: BotOption & {
|
|
19
|
+
full?: boolean;
|
|
20
|
+
max?: string;
|
|
21
|
+
}): Promise<SnapshotResult>;
|
|
22
|
+
export declare const snapshotCommand: Command;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/webexbot/commands/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAInC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGzC,UAAU,cAAc;IACtB,GAAG,CAAC,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,MAAM,EAAE,CAAA;KACjB,CAAA;IACD,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;QACzB,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAC,CAAA;IACF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,SAAS,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CA0BnH;AAED,eAAO,MAAM,eAAe,SAQxB,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { cliOutput } from '../../../shared/utils/cli-output.js';
|
|
3
|
+
import { getClient } from './shared.js';
|
|
4
|
+
export async function snapshotAction(options) {
|
|
5
|
+
try {
|
|
6
|
+
const client = await getClient(options);
|
|
7
|
+
const max = options.max ? parseInt(options.max, 10) : 100;
|
|
8
|
+
const [me, spaces] = await Promise.all([client.testAuth(), client.listSpaces({ max })]);
|
|
9
|
+
const result = {
|
|
10
|
+
bot: {
|
|
11
|
+
id: me.id,
|
|
12
|
+
displayName: me.displayName,
|
|
13
|
+
emails: me.emails,
|
|
14
|
+
},
|
|
15
|
+
spaces: options.full
|
|
16
|
+
? spaces.map((s) => ({ id: s.id, title: s.title, type: s.type, lastActivity: s.lastActivity }))
|
|
17
|
+
: spaces.map((s) => ({ id: s.id, title: s.title })),
|
|
18
|
+
};
|
|
19
|
+
if (!options.full) {
|
|
20
|
+
result.hint = "Use 'message list <space>' for messages, 'space info <space>' for details.";
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
return { error: error.message };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export const snapshotCommand = new Command('snapshot')
|
|
29
|
+
.description('Workspace overview for AI agents (brief by default, --full for details)')
|
|
30
|
+
.option('--full', 'Include full space details')
|
|
31
|
+
.option('--max <n>', 'Number of spaces to retrieve', '100')
|
|
32
|
+
.option('--bot <id>', 'Use specific bot')
|
|
33
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
34
|
+
.action(async (opts) => {
|
|
35
|
+
cliOutput(await snapshotAction(opts), opts.pretty);
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"snapshot.js","sourceRoot":"","sources":["../../../../../src/platforms/webexbot/commands/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAGrD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAkBpC,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAAqD;IACxF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,CAAA;QACvC,MAAM,GAAG,GAAG,OAAO,CAA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,WAAW,CAAC,yEAAyE,CAAC;KACtF,MAAM,CAAC,QAAQ,EAAE,4BAA4B,CAAC;KAC9C,MAAM,CAAC,WAAW,EAAE,8BAA8B,EAAE,KAAK,CAAC;KAC1D,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC;KACxC,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,KAAK,EAAE,IAAkD,EAAE,EAAE;IACnE,SAAS,CAAC,MAAM,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;AACpD,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import type { BotOption } from './shared.js';
|
|
3
|
+
interface UserResult {
|
|
4
|
+
id?: string;
|
|
5
|
+
emails?: string[];
|
|
6
|
+
displayName?: string;
|
|
7
|
+
nickName?: string;
|
|
8
|
+
firstName?: string;
|
|
9
|
+
lastName?: string;
|
|
10
|
+
avatar?: string;
|
|
11
|
+
orgId?: string;
|
|
12
|
+
type?: 'person' | 'bot';
|
|
13
|
+
created?: string;
|
|
14
|
+
users?: Array<{
|
|
15
|
+
id: string;
|
|
16
|
+
emails: string[];
|
|
17
|
+
displayName: string;
|
|
18
|
+
type: 'person' | 'bot';
|
|
19
|
+
}>;
|
|
20
|
+
error?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function listAction(options: BotOption & {
|
|
23
|
+
email?: string;
|
|
24
|
+
displayName?: string;
|
|
25
|
+
max?: string;
|
|
26
|
+
}): Promise<UserResult>;
|
|
27
|
+
export declare function infoAction(personId: string, options: BotOption): Promise<UserResult>;
|
|
28
|
+
export declare const userCommand: Command;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../../../src/platforms/webexbot/commands/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAKnC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGzC,UAAU,UAAU;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,KAAK,CAAC;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,MAAM,EAAE,MAAM,EAAE,CAAA;QAChB,WAAW,EAAE,MAAM,CAAA;QACnB,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAA;KACvB,CAAC,CAAA;IACF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAiBD,wBAAsB,UAAU,CAC9B,OAAO,EAAE,SAAS,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1E,OAAO,CAAC,UAAU,CAAC,CAiBrB;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAQ1F;AAED,eAAO,MAAM,WAAW,SAuBrB,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { cliOutput } from '../../../shared/utils/cli-output.js';
|
|
3
|
+
import { getClient } from './shared.js';
|
|
4
|
+
function formatPerson(person) {
|
|
5
|
+
return {
|
|
6
|
+
id: person.id,
|
|
7
|
+
emails: person.emails,
|
|
8
|
+
displayName: person.displayName,
|
|
9
|
+
nickName: person.nickName,
|
|
10
|
+
firstName: person.firstName,
|
|
11
|
+
lastName: person.lastName,
|
|
12
|
+
avatar: person.avatar,
|
|
13
|
+
orgId: person.orgId,
|
|
14
|
+
type: person.type,
|
|
15
|
+
created: person.created,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export async function listAction(options) {
|
|
19
|
+
try {
|
|
20
|
+
const client = await getClient(options);
|
|
21
|
+
const max = options.max ? parseInt(options.max, 10) : undefined;
|
|
22
|
+
const people = await client.listPeople({ email: options.email, displayName: options.displayName, max });
|
|
23
|
+
return {
|
|
24
|
+
users: people.map((p) => ({
|
|
25
|
+
id: p.id,
|
|
26
|
+
emails: p.emails,
|
|
27
|
+
displayName: p.displayName,
|
|
28
|
+
type: p.type,
|
|
29
|
+
})),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
return { error: error.message };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export async function infoAction(personId, options) {
|
|
37
|
+
try {
|
|
38
|
+
const client = await getClient(options);
|
|
39
|
+
const person = await client.getPerson(personId);
|
|
40
|
+
return formatPerson(person);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
return { error: error.message };
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export const userCommand = new Command('user')
|
|
47
|
+
.description('User commands')
|
|
48
|
+
.addCommand(new Command('list')
|
|
49
|
+
.description('Search people by email or display name')
|
|
50
|
+
.option('--email <email>', 'Filter by exact email')
|
|
51
|
+
.option('--display-name <name>', 'Filter by display name prefix')
|
|
52
|
+
.option('--max <n>', 'Number of users to retrieve')
|
|
53
|
+
.option('--bot <id>', 'Use specific bot')
|
|
54
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
55
|
+
.action(async (opts) => {
|
|
56
|
+
cliOutput(await listAction(opts), opts.pretty);
|
|
57
|
+
}))
|
|
58
|
+
.addCommand(new Command('info')
|
|
59
|
+
.description('Get details for a person')
|
|
60
|
+
.argument('<id>', 'Person ID')
|
|
61
|
+
.option('--bot <id>', 'Use specific bot')
|
|
62
|
+
.option('--pretty', 'Pretty print JSON output')
|
|
63
|
+
.action(async (personId, opts) => {
|
|
64
|
+
cliOutput(await infoAction(personId, opts), opts.pretty);
|
|
65
|
+
}));
|
|
66
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../../../src/platforms/webexbot/commands/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAIrD,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAsBpC,SAAS,YAAY,CAAC,MAAmB;IACvC,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,EAAE;QACb,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAA;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,OAA2E;IAE3E,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,CAAA;QACvC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CA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BAAuB,EAAE,+BAA+B,CAAC;KAChE,MAAM,CAAC,WAAW,EAAE,6BAA6B,CAAC;KAClD,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC;KACxC,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,KAAK,EAAE,IAAwE,EAAE,EAAE;IACzF,SAAS,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;AAChD,CAAC,CAAC,CACL;KACA,UAAU,CACT,IAAI,OAAO,CAAC,MAAM,CAAC;KAChB,WAAW,CAAC,0BAA0B,CAAC;KACvC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;KAC7B,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAAC;KACxC,MAAM,CAAC,UAAU,EAAE,0BAA0B,CAAC;KAC9C,MAAM,CAAC,KAAK,EAAE,QAAgB,EAAE,IAAe,EAAE,EAAE;IAClD,SAAS,CAAC,MAAM,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;AAC1D,CAAC,CAAC,CACL,CAAA"}
|
|
@@ -109,6 +109,8 @@ agent-webexbot message dm alice@example.com "Hey, quick question"
|
|
|
109
109
|
agent-webexbot message dm alice@example.com "**Build failed**" --markdown
|
|
110
110
|
|
|
111
111
|
# List messages in a space
|
|
112
|
+
# In group spaces, Webex only returns messages that mention the bot.
|
|
113
|
+
# Direct-space history is returned normally.
|
|
112
114
|
agent-webexbot message list <space-id>
|
|
113
115
|
agent-webexbot message list <space-id> --max 50
|
|
114
116
|
|
|
@@ -65,6 +65,8 @@ const dm = await client.sendDirectMessage('alice@example.com', 'Hey!')
|
|
|
65
65
|
await client.sendDirectMessage('alice@example.com', '**Important**', { markdown: true })
|
|
66
66
|
|
|
67
67
|
// List messages in a space (default limit: 50)
|
|
68
|
+
// In group spaces, Webex only returns messages that mention the bot.
|
|
69
|
+
// Direct-space history is returned normally.
|
|
68
70
|
const messages = await client.listMessages(roomId)
|
|
69
71
|
const limited = await client.listMessages(roomId, { max: 25 })
|
|
70
72
|
// → WebexMessage[]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-messenger",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"description": "Multi-platform messaging CLI for AI agents (Slack, Discord, Teams, Webex, Telegram, Telegram Bot, WhatsApp, LINE, Instagram, KakaoTalk, Channel Talk)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-channeltalk
|
|
3
3
|
description: Interact with Channel Talk using extracted desktop app or browser credentials - read chats, send messages, search messages, manage groups
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.22.0
|
|
5
5
|
allowed-tools: Bash(agent-channeltalk:*)
|
|
6
6
|
metadata:
|
|
7
7
|
openclaw:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-webexbot
|
|
3
|
-
description: Interact with Cisco Webex using bot tokens - send messages, read spaces, manage memberships, stream real-time events
|
|
4
|
-
version: 2.
|
|
3
|
+
description: Interact with Cisco Webex using bot tokens - send messages, reply in threads, upload and download files, look up people, read spaces, manage memberships, stream real-time events
|
|
4
|
+
version: 2.22.0
|
|
5
5
|
allowed-tools: Bash(agent-webexbot:*)
|
|
6
6
|
metadata:
|
|
7
7
|
openclaw:
|
|
@@ -172,11 +172,21 @@ agent-webexbot message send <space-id> "Hello world"
|
|
|
172
172
|
# Send a markdown message
|
|
173
173
|
agent-webexbot message send <space-id> "**Bold** and _italic_" --markdown
|
|
174
174
|
|
|
175
|
+
# Reply within a thread (parent message ID)
|
|
176
|
+
agent-webexbot message send <space-id> "Threaded reply" --parent <message-id>
|
|
177
|
+
agent-webexbot message reply <space-id> <parent-message-id> "Threaded reply"
|
|
178
|
+
|
|
179
|
+
# List replies in a thread
|
|
180
|
+
agent-webexbot message replies <space-id> <parent-message-id>
|
|
181
|
+
agent-webexbot message replies <space-id> <parent-message-id> --max 20
|
|
182
|
+
|
|
175
183
|
# Send a direct message by email
|
|
176
184
|
agent-webexbot message dm alice@example.com "Hey, quick question"
|
|
177
185
|
agent-webexbot message dm alice@example.com "**Build failed**" --markdown
|
|
178
186
|
|
|
179
187
|
# List messages in a space
|
|
188
|
+
# In group spaces, Webex only returns messages that mention the bot.
|
|
189
|
+
# Direct-space history is returned normally.
|
|
180
190
|
agent-webexbot message list <space-id>
|
|
181
191
|
agent-webexbot message list <space-id> --max 50
|
|
182
192
|
|
|
@@ -199,6 +209,51 @@ agent-webexbot member list <space-id>
|
|
|
199
209
|
agent-webexbot member list <space-id> --max 100
|
|
200
210
|
```
|
|
201
211
|
|
|
212
|
+
### User Commands
|
|
213
|
+
|
|
214
|
+
Search the Webex people directory and look up person details.
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Search people by email (exact) or display name (prefix)
|
|
218
|
+
agent-webexbot user list --email alice@example.com
|
|
219
|
+
agent-webexbot user list --display-name "Alice"
|
|
220
|
+
agent-webexbot user list --display-name "Al" --max 20
|
|
221
|
+
|
|
222
|
+
# Get details for a specific person
|
|
223
|
+
agent-webexbot user info <person-id>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### File Commands
|
|
227
|
+
|
|
228
|
+
Upload local files to a space and download attachments. Max file size is 100 MB; one file per message.
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Upload a local file
|
|
232
|
+
agent-webexbot file upload <space-id> ./report.pdf
|
|
233
|
+
agent-webexbot file upload <space-id> ./report.pdf --text "Latest report"
|
|
234
|
+
agent-webexbot file upload <space-id> ./report.pdf --text "**Done**" --markdown
|
|
235
|
+
|
|
236
|
+
# Upload a file as a threaded reply
|
|
237
|
+
agent-webexbot file upload <space-id> ./report.pdf --parent <message-id>
|
|
238
|
+
|
|
239
|
+
# Download an attachment (content URL comes from a message's "files" array)
|
|
240
|
+
agent-webexbot file download <content-url-or-id>
|
|
241
|
+
agent-webexbot file download <content-url-or-id> ./downloaded-report.pdf
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Snapshot Command
|
|
245
|
+
|
|
246
|
+
Get a workspace overview for AI agents.
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# Brief snapshot (bot identity + space IDs/titles)
|
|
250
|
+
agent-webexbot snapshot
|
|
251
|
+
|
|
252
|
+
# Full snapshot (includes space type and last activity)
|
|
253
|
+
agent-webexbot snapshot --full
|
|
254
|
+
agent-webexbot snapshot --full --max 50
|
|
255
|
+
```
|
|
256
|
+
|
|
202
257
|
### Listen Command
|
|
203
258
|
|
|
204
259
|
Stream real-time Webex events over the Mercury WebSocket. No public URL required.
|
|
@@ -312,9 +367,7 @@ Credentials stored in `~/.config/agent-messenger/webexbot-credentials.json` (060
|
|
|
312
367
|
|
|
313
368
|
- Bot can only interact with spaces it has been added to
|
|
314
369
|
- Bot can only edit/delete its own messages
|
|
315
|
-
- No
|
|
316
|
-
- No reactions / emoji support
|
|
317
|
-
- No thread support
|
|
370
|
+
- No reactions / emoji support — the Webex public REST API does not expose a reactions endpoint, and reaction events are not delivered to bot webhooks
|
|
318
371
|
- No message search
|
|
319
372
|
- No voice/video or meeting support
|
|
320
373
|
- No space management (create/delete spaces, roles)
|