agent-messenger 2.23.2 → 2.23.3
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.map +1 -1
- package/dist/src/platforms/webex/client.js +28 -16
- package/dist/src/platforms/webex/client.js.map +1 -1
- package/dist/src/platforms/webex/commands/auth.js +1 -2
- 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 +2 -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 +2 -3
- package/dist/src/platforms/webex/commands/message.js.map +1 -1
- package/dist/src/platforms/webex/commands/whoami.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/whoami.js +2 -3
- package/dist/src/platforms/webex/commands/whoami.js.map +1 -1
- package/dist/src/platforms/webex/id-normalizer.d.ts +4 -0
- package/dist/src/platforms/webex/id-normalizer.d.ts.map +1 -1
- package/dist/src/platforms/webex/id-normalizer.js +87 -21
- package/dist/src/platforms/webex/id-normalizer.js.map +1 -1
- package/dist/src/platforms/webex/types.d.ts +20 -0
- package/dist/src/platforms/webex/types.d.ts.map +1 -1
- package/dist/src/platforms/webex/types.js +10 -0
- package/dist/src/platforms/webex/types.js.map +1 -1
- package/dist/src/platforms/webexbot/commands/file.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/commands/file.js +2 -3
- package/dist/src/platforms/webexbot/commands/file.js.map +1 -1
- package/dist/src/platforms/webexbot/commands/member.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/commands/member.js +2 -3
- package/dist/src/platforms/webexbot/commands/member.js.map +1 -1
- package/dist/src/platforms/webexbot/commands/message.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/commands/message.js +6 -7
- package/dist/src/platforms/webexbot/commands/message.js.map +1 -1
- package/dist/src/platforms/webexbot/commands/snapshot.js +1 -1
- package/dist/src/platforms/webexbot/commands/snapshot.js.map +1 -1
- package/dist/src/platforms/webexbot/commands/user.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/commands/user.js +3 -4
- package/dist/src/platforms/webexbot/commands/user.js.map +1 -1
- package/dist/src/platforms/webexbot/commands/whoami.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/commands/whoami.js +2 -3
- package/dist/src/platforms/webexbot/commands/whoami.js.map +1 -1
- package/dist/src/tui/adapters/webex-adapter.js +2 -2
- package/dist/src/tui/adapters/webex-adapter.js.map +1 -1
- 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 +1 -1
- package/skills/agent-wechatbot/SKILL.md +1 -1
- package/skills/agent-whatsapp/SKILL.md +1 -1
- package/skills/agent-whatsappbot/SKILL.md +1 -1
- package/src/platforms/webex/client.ts +36 -16
- package/src/platforms/webex/commands/auth.ts +3 -3
- package/src/platforms/webex/commands/member.test.ts +6 -0
- package/src/platforms/webex/commands/member.ts +2 -3
- package/src/platforms/webex/commands/message.test.ts +6 -0
- package/src/platforms/webex/commands/message.ts +2 -3
- package/src/platforms/webex/commands/whoami.test.ts +2 -0
- package/src/platforms/webex/commands/whoami.ts +2 -3
- package/src/platforms/webex/id-normalizer.test.ts +245 -2
- package/src/platforms/webex/id-normalizer.ts +92 -21
- package/src/platforms/webex/listener.test.ts +3 -0
- package/src/platforms/webex/types.test.ts +20 -0
- package/src/platforms/webex/types.ts +20 -0
- package/src/platforms/webex/typings/webex-message-handler.d.ts +40 -2
- package/src/platforms/webexbot/commands/file.ts +2 -3
- package/src/platforms/webexbot/commands/member.ts +2 -3
- package/src/platforms/webexbot/commands/message.ts +6 -7
- package/src/platforms/webexbot/commands/snapshot.ts +1 -1
- package/src/platforms/webexbot/commands/user.test.ts +4 -0
- package/src/platforms/webexbot/commands/user.ts +3 -4
- package/src/platforms/webexbot/commands/whoami.ts +2 -3
- package/src/tui/adapters/webex-adapter.ts +2 -2
|
@@ -155,6 +155,8 @@ declare module 'webex-message-handler' {
|
|
|
155
155
|
export interface DecryptedMessage {
|
|
156
156
|
/** Mercury activity UUID. Works as parentId for threaded replies. */
|
|
157
157
|
id: string
|
|
158
|
+
/** Raw UUID ref for `id`. */
|
|
159
|
+
ref: string
|
|
158
160
|
/**
|
|
159
161
|
* Full Conversation-service activity URL, when present on the raw Mercury
|
|
160
162
|
* activity (e.g. for an outbound "acknowledge" read-receipt). Undefined if
|
|
@@ -163,8 +165,14 @@ declare module 'webex-message-handler' {
|
|
|
163
165
|
url?: string
|
|
164
166
|
/** Parent activity UUID for threaded replies. Undefined if not a thread reply. */
|
|
165
167
|
parentId?: string
|
|
168
|
+
/** Raw UUID ref for `parentId`. Undefined when `parentId` is absent. */
|
|
169
|
+
parentRef?: string
|
|
166
170
|
roomId: string
|
|
171
|
+
/** Raw UUID ref for `roomId`. */
|
|
172
|
+
roomRef: string
|
|
167
173
|
personId: string
|
|
174
|
+
/** Raw UUID ref for `personId`. */
|
|
175
|
+
personRef: string
|
|
168
176
|
personEmail: string
|
|
169
177
|
text: string
|
|
170
178
|
html?: string
|
|
@@ -172,6 +180,8 @@ declare module 'webex-message-handler' {
|
|
|
172
180
|
roomType?: string
|
|
173
181
|
/** Person UUIDs mentioned via @mention in the message. */
|
|
174
182
|
mentionedPeople: string[]
|
|
183
|
+
/** Raw UUID refs for `mentionedPeople`, index-aligned. */
|
|
184
|
+
mentionedPeopleRefs: string[]
|
|
175
185
|
/** Group mention types (e.g. "all") in the message. */
|
|
176
186
|
mentionedGroups: string[]
|
|
177
187
|
/** File URLs attached to the message. Empty if no files. */
|
|
@@ -181,19 +191,33 @@ declare module 'webex-message-handler' {
|
|
|
181
191
|
|
|
182
192
|
export interface DeletedMessage {
|
|
183
193
|
messageId: string
|
|
194
|
+
/** Raw UUID ref for `messageId`. */
|
|
195
|
+
messageRef: string
|
|
184
196
|
roomId: string
|
|
197
|
+
/** Raw UUID ref for `roomId`. */
|
|
198
|
+
roomRef: string
|
|
185
199
|
personId: string
|
|
200
|
+
/** Raw UUID ref for `personId`. */
|
|
201
|
+
personRef: string
|
|
186
202
|
}
|
|
187
203
|
|
|
188
204
|
export interface MembershipActivity {
|
|
189
|
-
/** Activity ID. */
|
|
205
|
+
/** Activity ID (raw Mercury activity UUID). */
|
|
190
206
|
id: string
|
|
207
|
+
/** Raw UUID ref for `id`. Equal to `id` since the activity id is already raw. */
|
|
208
|
+
ref: string
|
|
191
209
|
/** ID of the person who performed the action. */
|
|
192
210
|
actorId: string
|
|
211
|
+
/** Raw UUID ref for `actorId`. */
|
|
212
|
+
actorRef: string
|
|
193
213
|
/** ID of the member affected. */
|
|
194
214
|
personId: string
|
|
215
|
+
/** Raw UUID ref for `personId`. */
|
|
216
|
+
personRef: string
|
|
195
217
|
/** Conversation/space ID. */
|
|
196
218
|
roomId: string
|
|
219
|
+
/** Raw UUID ref for `roomId`. */
|
|
220
|
+
roomRef: string
|
|
197
221
|
/** Membership action: "add", "leave", "assignModerator", or "unassignModerator". */
|
|
198
222
|
action: string
|
|
199
223
|
/** ISO 8601 timestamp. */
|
|
@@ -207,14 +231,22 @@ declare module 'webex-message-handler' {
|
|
|
207
231
|
export interface AttachmentAction {
|
|
208
232
|
/** Activity ID. */
|
|
209
233
|
id: string
|
|
234
|
+
/** Raw UUID ref for `id`. */
|
|
235
|
+
ref: string
|
|
210
236
|
/** ID of the message the card was attached to. */
|
|
211
237
|
messageId: string
|
|
238
|
+
/** Raw UUID ref for `messageId`. Empty when `messageId` is empty. */
|
|
239
|
+
messageRef: string
|
|
212
240
|
/** ID of the person who submitted the card. */
|
|
213
241
|
personId: string
|
|
242
|
+
/** Raw UUID ref for `personId`. */
|
|
243
|
+
personRef: string
|
|
214
244
|
/** Email of the person who submitted the card. */
|
|
215
245
|
personEmail: string
|
|
216
246
|
/** Conversation/space ID. */
|
|
217
247
|
roomId: string
|
|
248
|
+
/** Raw UUID ref for `roomId`. */
|
|
249
|
+
roomRef: string
|
|
218
250
|
/** Card form input values. */
|
|
219
251
|
inputs: Record<string, unknown>
|
|
220
252
|
/** ISO 8601 timestamp. */
|
|
@@ -224,12 +256,18 @@ declare module 'webex-message-handler' {
|
|
|
224
256
|
}
|
|
225
257
|
|
|
226
258
|
export interface RoomActivity {
|
|
227
|
-
/** Activity ID. */
|
|
259
|
+
/** Activity ID (raw Mercury activity UUID). */
|
|
228
260
|
id: string
|
|
261
|
+
/** Raw UUID ref for `id`. Equal to `id` since the activity id is already raw. */
|
|
262
|
+
ref: string
|
|
229
263
|
/** Conversation/space ID. */
|
|
230
264
|
roomId: string
|
|
265
|
+
/** Raw UUID ref for `roomId`. */
|
|
266
|
+
roomRef: string
|
|
231
267
|
/** ID of the person who performed the action. */
|
|
232
268
|
actorId: string
|
|
269
|
+
/** Raw UUID ref for `actorId`. */
|
|
270
|
+
actorRef: string
|
|
233
271
|
/** Room action: "created" or "updated". */
|
|
234
272
|
action: string
|
|
235
273
|
/** ISO 8601 timestamp. */
|
|
@@ -5,7 +5,6 @@ import { Command } from 'commander'
|
|
|
5
5
|
|
|
6
6
|
import { cliOutput } from '@/shared/utils/cli-output'
|
|
7
7
|
|
|
8
|
-
import { toRef } from '../../webex/id-normalizer'
|
|
9
8
|
import type { BotOption } from './shared'
|
|
10
9
|
import { getClient } from './shared'
|
|
11
10
|
|
|
@@ -40,9 +39,9 @@ export async function uploadAction(
|
|
|
40
39
|
|
|
41
40
|
return {
|
|
42
41
|
id: message.id,
|
|
43
|
-
ref:
|
|
42
|
+
ref: message.ref,
|
|
44
43
|
roomId: message.roomId,
|
|
45
|
-
roomRef:
|
|
44
|
+
roomRef: message.roomRef,
|
|
46
45
|
files: message.files,
|
|
47
46
|
created: message.created,
|
|
48
47
|
}
|
|
@@ -2,7 +2,6 @@ import { Command } from 'commander'
|
|
|
2
2
|
|
|
3
3
|
import { cliOutput } from '@/shared/utils/cli-output'
|
|
4
4
|
|
|
5
|
-
import { toRef } from '../../webex/id-normalizer'
|
|
6
5
|
import type { BotOption } from './shared'
|
|
7
6
|
import { getClient } from './shared'
|
|
8
7
|
|
|
@@ -29,9 +28,9 @@ export async function listAction(space: string, options: BotOption & { max?: str
|
|
|
29
28
|
return {
|
|
30
29
|
members: members.map((m) => ({
|
|
31
30
|
id: m.id,
|
|
32
|
-
ref:
|
|
31
|
+
ref: m.ref,
|
|
33
32
|
personId: m.personId,
|
|
34
|
-
personRef:
|
|
33
|
+
personRef: m.personRef,
|
|
35
34
|
personEmail: m.personEmail,
|
|
36
35
|
personDisplayName: m.personDisplayName,
|
|
37
36
|
isModerator: m.isModerator,
|
|
@@ -2,7 +2,6 @@ import { Command } from 'commander'
|
|
|
2
2
|
|
|
3
3
|
import { cliOutput } from '@/shared/utils/cli-output'
|
|
4
4
|
|
|
5
|
-
import { toRef } from '../../webex/id-normalizer'
|
|
6
5
|
import type { WebexMessage } from '../../webex/types'
|
|
7
6
|
import type { BotOption } from './shared'
|
|
8
7
|
import { getClient } from './shared'
|
|
@@ -33,9 +32,9 @@ interface MessageResult {
|
|
|
33
32
|
function formatMessage(message: WebexMessage): MessageResult {
|
|
34
33
|
return {
|
|
35
34
|
id: message.id,
|
|
36
|
-
ref:
|
|
35
|
+
ref: message.ref,
|
|
37
36
|
roomId: message.roomId,
|
|
38
|
-
roomRef:
|
|
37
|
+
roomRef: message.roomRef,
|
|
39
38
|
text: message.text,
|
|
40
39
|
markdown: message.markdown,
|
|
41
40
|
html: message.html,
|
|
@@ -88,9 +87,9 @@ export async function repliesAction(
|
|
|
88
87
|
return {
|
|
89
88
|
messages: messages.map((msg) => ({
|
|
90
89
|
id: msg.id,
|
|
91
|
-
ref:
|
|
90
|
+
ref: msg.ref,
|
|
92
91
|
roomId: msg.roomId,
|
|
93
|
-
roomRef:
|
|
92
|
+
roomRef: msg.roomRef,
|
|
94
93
|
text: msg.text,
|
|
95
94
|
personEmail: msg.personEmail,
|
|
96
95
|
created: msg.created,
|
|
@@ -125,9 +124,9 @@ export async function listAction(space: string, options: BotOption & { max?: str
|
|
|
125
124
|
return {
|
|
126
125
|
messages: messages.map((msg) => ({
|
|
127
126
|
id: msg.id,
|
|
128
|
-
ref:
|
|
127
|
+
ref: msg.ref,
|
|
129
128
|
roomId: msg.roomId,
|
|
130
|
-
roomRef:
|
|
129
|
+
roomRef: msg.roomRef,
|
|
131
130
|
text: msg.text,
|
|
132
131
|
personEmail: msg.personEmail,
|
|
133
132
|
created: msg.created,
|
|
@@ -12,9 +12,11 @@ const mockListPeople = mock(() =>
|
|
|
12
12
|
Promise.resolve([
|
|
13
13
|
{
|
|
14
14
|
id: personId,
|
|
15
|
+
ref: 'p1',
|
|
15
16
|
emails: ['alice@example.com'],
|
|
16
17
|
displayName: 'Alice',
|
|
17
18
|
orgId,
|
|
19
|
+
orgRef: 'o1',
|
|
18
20
|
type: 'person' as const,
|
|
19
21
|
created: '',
|
|
20
22
|
},
|
|
@@ -24,9 +26,11 @@ const mockListPeople = mock(() =>
|
|
|
24
26
|
const mockGetPerson = mock(() =>
|
|
25
27
|
Promise.resolve({
|
|
26
28
|
id: personId,
|
|
29
|
+
ref: 'p1',
|
|
27
30
|
emails: ['alice@example.com'],
|
|
28
31
|
displayName: 'Alice',
|
|
29
32
|
orgId,
|
|
33
|
+
orgRef: 'o1',
|
|
30
34
|
type: 'person' as const,
|
|
31
35
|
created: '2024-01-01T00:00:00Z',
|
|
32
36
|
}),
|
|
@@ -2,7 +2,6 @@ import { Command } from 'commander'
|
|
|
2
2
|
|
|
3
3
|
import { cliOutput } from '@/shared/utils/cli-output'
|
|
4
4
|
|
|
5
|
-
import { toRef } from '../../webex/id-normalizer'
|
|
6
5
|
import type { WebexPerson } from '../../webex/types'
|
|
7
6
|
import type { BotOption } from './shared'
|
|
8
7
|
import { getClient } from './shared'
|
|
@@ -33,7 +32,7 @@ interface UserResult {
|
|
|
33
32
|
function formatPerson(person: WebexPerson): UserResult {
|
|
34
33
|
return {
|
|
35
34
|
id: person.id,
|
|
36
|
-
ref:
|
|
35
|
+
ref: person.ref,
|
|
37
36
|
emails: person.emails,
|
|
38
37
|
displayName: person.displayName,
|
|
39
38
|
nickName: person.nickName,
|
|
@@ -41,7 +40,7 @@ function formatPerson(person: WebexPerson): UserResult {
|
|
|
41
40
|
lastName: person.lastName,
|
|
42
41
|
avatar: person.avatar,
|
|
43
42
|
orgId: person.orgId,
|
|
44
|
-
orgRef:
|
|
43
|
+
orgRef: person.orgRef,
|
|
45
44
|
type: person.type,
|
|
46
45
|
created: person.created,
|
|
47
46
|
}
|
|
@@ -58,7 +57,7 @@ export async function listAction(
|
|
|
58
57
|
return {
|
|
59
58
|
users: people.map((p) => ({
|
|
60
59
|
id: p.id,
|
|
61
|
-
ref:
|
|
60
|
+
ref: p.ref,
|
|
62
61
|
emails: p.emails,
|
|
63
62
|
displayName: p.displayName,
|
|
64
63
|
type: p.type,
|
|
@@ -2,7 +2,6 @@ import { Command } from 'commander'
|
|
|
2
2
|
|
|
3
3
|
import { cliOutput } from '@/shared/utils/cli-output'
|
|
4
4
|
|
|
5
|
-
import { toRef } from '../../webex/id-normalizer'
|
|
6
5
|
import type { BotOption } from './shared'
|
|
7
6
|
import { getClient } from './shared'
|
|
8
7
|
|
|
@@ -25,12 +24,12 @@ export async function whoamiAction(options: BotOption): Promise<WhoamiResult> {
|
|
|
25
24
|
const info = await client.testAuth()
|
|
26
25
|
return {
|
|
27
26
|
id: info.id,
|
|
28
|
-
ref:
|
|
27
|
+
ref: info.ref,
|
|
29
28
|
emails: info.emails,
|
|
30
29
|
displayName: info.displayName,
|
|
31
30
|
avatar: info.avatar,
|
|
32
31
|
orgId: info.orgId,
|
|
33
|
-
orgRef:
|
|
32
|
+
orgRef: info.orgRef,
|
|
34
33
|
type: info.type,
|
|
35
34
|
created: info.created,
|
|
36
35
|
}
|
|
@@ -37,9 +37,9 @@ export class WebexAdapter implements PlatformAdapter {
|
|
|
37
37
|
return messages
|
|
38
38
|
.map((msg) => ({
|
|
39
39
|
id: msg.id,
|
|
40
|
-
ref:
|
|
40
|
+
ref: msg.ref,
|
|
41
41
|
channelId: msg.roomId,
|
|
42
|
-
channelRef:
|
|
42
|
+
channelRef: msg.roomRef,
|
|
43
43
|
author: msg.personEmail,
|
|
44
44
|
content: msg.text ?? '',
|
|
45
45
|
timestamp: msg.created,
|