agent-messenger 2.23.3 → 2.23.5
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/README.md +2 -2
- package/dist/package.json +1 -1
- package/dist/src/platforms/webex/cli.d.ts.map +1 -1
- package/dist/src/platforms/webex/cli.js +2 -1
- package/dist/src/platforms/webex/cli.js.map +1 -1
- package/dist/src/platforms/webex/client.d.ts +4 -0
- package/dist/src/platforms/webex/client.d.ts.map +1 -1
- package/dist/src/platforms/webex/client.js +161 -0
- package/dist/src/platforms/webex/client.js.map +1 -1
- package/dist/src/platforms/webex/commands/file.d.ts +12 -0
- package/dist/src/platforms/webex/commands/file.d.ts.map +1 -0
- package/dist/src/platforms/webex/commands/file.js +64 -0
- package/dist/src/platforms/webex/commands/file.js.map +1 -0
- package/dist/src/platforms/webex/commands/index.d.ts +1 -0
- package/dist/src/platforms/webex/commands/index.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/index.js +1 -0
- package/dist/src/platforms/webex/commands/index.js.map +1 -1
- package/dist/src/platforms/webex/encryption.d.ts +14 -0
- package/dist/src/platforms/webex/encryption.d.ts.map +1 -1
- package/dist/src/platforms/webex/encryption.js +36 -0
- package/dist/src/platforms/webex/encryption.js.map +1 -1
- package/dist/src/platforms/webex/id-normalizer.d.ts +6 -6
- package/dist/src/platforms/webex/id-normalizer.d.ts.map +1 -1
- package/dist/src/platforms/webex/id-normalizer.js.map +1 -1
- package/dist/src/platforms/webex/index.d.ts +1 -1
- package/dist/src/platforms/webex/index.d.ts.map +1 -1
- package/dist/src/platforms/webex/index.js.map +1 -1
- package/dist/src/platforms/webex/listener.d.ts +10 -9
- package/dist/src/platforms/webex/listener.d.ts.map +1 -1
- package/dist/src/platforms/webex/listener.js.map +1 -1
- package/dist/src/platforms/webex/types.d.ts +31 -0
- package/dist/src/platforms/webex/types.d.ts.map +1 -1
- package/dist/src/platforms/webex/types.js.map +1 -1
- package/dist/src/platforms/webexbot/index.d.ts +1 -1
- package/dist/src/platforms/webexbot/index.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/index.js.map +1 -1
- package/docs/content/docs/cli/webex.mdx +13 -0
- package/docs/content/docs/sdk/webex.mdx +12 -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 +14 -2
- 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/cli.ts +10 -1
- package/src/platforms/webex/client.test.ts +131 -0
- package/src/platforms/webex/client.ts +195 -0
- package/src/platforms/webex/commands/file.test.ts +96 -0
- package/src/platforms/webex/commands/file.ts +87 -0
- package/src/platforms/webex/commands/index.ts +1 -0
- package/src/platforms/webex/encryption.test.ts +38 -0
- package/src/platforms/webex/encryption.ts +59 -0
- package/src/platforms/webex/id-normalizer.ts +15 -6
- package/src/platforms/webex/index.ts +13 -1
- package/src/platforms/webex/listener.ts +16 -8
- package/src/platforms/webex/types.ts +48 -0
- package/src/platforms/webexbot/index.ts +12 -1
|
@@ -7,7 +7,16 @@ import type {
|
|
|
7
7
|
RoomActivity,
|
|
8
8
|
} from 'webex-message-handler'
|
|
9
9
|
|
|
10
|
-
import type {
|
|
10
|
+
import type {
|
|
11
|
+
WebexAttachmentActionEvent,
|
|
12
|
+
WebexDeletedMessageEvent,
|
|
13
|
+
WebexMembership,
|
|
14
|
+
WebexMembershipEvent,
|
|
15
|
+
WebexMessage,
|
|
16
|
+
WebexMessageEvent,
|
|
17
|
+
WebexPerson,
|
|
18
|
+
WebexRoomEvent,
|
|
19
|
+
} from './types'
|
|
11
20
|
|
|
12
21
|
export { fromRestId }
|
|
13
22
|
|
|
@@ -51,7 +60,7 @@ export function toRestId(uuid: string, type: WebexRestIdType): string {
|
|
|
51
60
|
return Buffer.from(`ciscospark://us/${type}/${uuid}`).toString('base64url')
|
|
52
61
|
}
|
|
53
62
|
|
|
54
|
-
export function normalizeMessage(message: DecryptedMessage):
|
|
63
|
+
export function normalizeMessage(message: DecryptedMessage): WebexMessageEvent {
|
|
55
64
|
const id = toRestId(message.id, 'MESSAGE')
|
|
56
65
|
const parentId = message.parentId ? toRestId(message.parentId, 'MESSAGE') : message.parentId
|
|
57
66
|
const roomId = toRestId(message.roomId, 'ROOM')
|
|
@@ -72,7 +81,7 @@ export function normalizeMessage(message: DecryptedMessage): DecryptedMessage {
|
|
|
72
81
|
}
|
|
73
82
|
}
|
|
74
83
|
|
|
75
|
-
export function normalizeDeletedMessage(message: DeletedMessage):
|
|
84
|
+
export function normalizeDeletedMessage(message: DeletedMessage): WebexDeletedMessageEvent {
|
|
76
85
|
const messageId = toRestId(message.messageId, 'MESSAGE')
|
|
77
86
|
const roomId = toRestId(message.roomId, 'ROOM')
|
|
78
87
|
const personId = toRestId(message.personId, 'PEOPLE')
|
|
@@ -86,7 +95,7 @@ export function normalizeDeletedMessage(message: DeletedMessage): DeletedMessage
|
|
|
86
95
|
}
|
|
87
96
|
}
|
|
88
97
|
|
|
89
|
-
export function normalizeMembership(activity: MembershipActivity):
|
|
98
|
+
export function normalizeMembership(activity: MembershipActivity): WebexMembershipEvent {
|
|
90
99
|
// `id` stays raw: it is a Mercury activity UUID, not a REST membership ID, so
|
|
91
100
|
// its ref is the id itself rather than a decoded REST id.
|
|
92
101
|
const actorId = toRestId(activity.actorId, 'PEOPLE')
|
|
@@ -104,7 +113,7 @@ export function normalizeMembership(activity: MembershipActivity): MembershipAct
|
|
|
104
113
|
}
|
|
105
114
|
}
|
|
106
115
|
|
|
107
|
-
export function normalizeAttachmentAction(action: AttachmentAction):
|
|
116
|
+
export function normalizeAttachmentAction(action: AttachmentAction): WebexAttachmentActionEvent {
|
|
108
117
|
const id = toRestId(action.id, 'ATTACHMENT_ACTION')
|
|
109
118
|
const messageId = action.messageId ? toRestId(action.messageId, 'MESSAGE') : action.messageId
|
|
110
119
|
const personId = toRestId(action.personId, 'PEOPLE')
|
|
@@ -122,7 +131,7 @@ export function normalizeAttachmentAction(action: AttachmentAction): AttachmentA
|
|
|
122
131
|
}
|
|
123
132
|
}
|
|
124
133
|
|
|
125
|
-
export function normalizeRoomActivity(activity: RoomActivity):
|
|
134
|
+
export function normalizeRoomActivity(activity: RoomActivity): WebexRoomEvent {
|
|
126
135
|
// `id` stays raw: the Mercury conversation activity UUID has no consumer-facing
|
|
127
136
|
// REST resource, so its ref is the id itself (the comparable REST id is `roomId`).
|
|
128
137
|
const roomId = toRestId(activity.roomId, 'ROOM')
|
|
@@ -9,7 +9,19 @@ export type { PasswordLoginOptions, PasswordLoginResult } from './password-login
|
|
|
9
9
|
export { WebexTokenExtractor } from './token-extractor'
|
|
10
10
|
export type { ExtractedWebexToken } from './token-extractor'
|
|
11
11
|
export { WebexError } from './types'
|
|
12
|
-
export type {
|
|
12
|
+
export type {
|
|
13
|
+
WebexAttachmentActionEvent,
|
|
14
|
+
WebexConfig,
|
|
15
|
+
WebexDeletedMessageEvent,
|
|
16
|
+
WebexMembership,
|
|
17
|
+
WebexMembershipEvent,
|
|
18
|
+
WebexMessage,
|
|
19
|
+
WebexMessageEvent,
|
|
20
|
+
WebexPerson,
|
|
21
|
+
WebexRealtimeEvent,
|
|
22
|
+
WebexRoomEvent,
|
|
23
|
+
WebexSpace,
|
|
24
|
+
} from './types'
|
|
13
25
|
export {
|
|
14
26
|
WebexConfigSchema,
|
|
15
27
|
WebexMembershipSchema,
|
|
@@ -21,6 +21,14 @@ import {
|
|
|
21
21
|
normalizeMessage,
|
|
22
22
|
normalizeRoomActivity,
|
|
23
23
|
} from './id-normalizer'
|
|
24
|
+
import type {
|
|
25
|
+
WebexAttachmentActionEvent,
|
|
26
|
+
WebexDeletedMessageEvent,
|
|
27
|
+
WebexMembershipEvent,
|
|
28
|
+
WebexMessageEvent,
|
|
29
|
+
WebexRealtimeEvent,
|
|
30
|
+
WebexRoomEvent,
|
|
31
|
+
} from './types'
|
|
24
32
|
import { createWdmRewriteFetch, discoverWdmDevicesUrl } from './wdm-discovery'
|
|
25
33
|
|
|
26
34
|
type EventKey = keyof WebexListenerEventMap
|
|
@@ -49,14 +57,14 @@ export interface WebexListenerOptions {
|
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
export interface WebexListenerEventMap {
|
|
52
|
-
message_created: [event:
|
|
53
|
-
message_updated: [event:
|
|
54
|
-
message_deleted: [event:
|
|
55
|
-
membership_created: [event:
|
|
56
|
-
attachment_action: [event:
|
|
57
|
-
room_created: [event:
|
|
58
|
-
room_updated: [event:
|
|
59
|
-
webex_event: [event:
|
|
60
|
+
message_created: [event: WebexMessageEvent]
|
|
61
|
+
message_updated: [event: WebexMessageEvent]
|
|
62
|
+
message_deleted: [event: WebexDeletedMessageEvent]
|
|
63
|
+
membership_created: [event: WebexMembershipEvent]
|
|
64
|
+
attachment_action: [event: WebexAttachmentActionEvent]
|
|
65
|
+
room_created: [event: WebexRoomEvent]
|
|
66
|
+
room_updated: [event: WebexRoomEvent]
|
|
67
|
+
webex_event: [event: WebexRealtimeEvent]
|
|
60
68
|
connected: [info: { connected: boolean; status: HandlerStatus }]
|
|
61
69
|
reconnecting: [attempt: number]
|
|
62
70
|
disconnected: [reason: string]
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AttachmentAction,
|
|
3
|
+
DecryptedMessage,
|
|
4
|
+
DeletedMessage,
|
|
5
|
+
MembershipActivity,
|
|
6
|
+
RoomActivity,
|
|
7
|
+
} from 'webex-message-handler'
|
|
1
8
|
import { z } from 'zod'
|
|
2
9
|
|
|
3
10
|
export interface WebexSpace {
|
|
@@ -71,6 +78,47 @@ export interface WebexConfig {
|
|
|
71
78
|
encryptionKeys?: Record<string, string>
|
|
72
79
|
}
|
|
73
80
|
|
|
81
|
+
export type WebexMessageEvent = DecryptedMessage & {
|
|
82
|
+
ref: string
|
|
83
|
+
parentRef?: string
|
|
84
|
+
roomRef: string
|
|
85
|
+
personRef: string
|
|
86
|
+
mentionedPeopleRefs: string[]
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type WebexDeletedMessageEvent = DeletedMessage & {
|
|
90
|
+
messageRef: string
|
|
91
|
+
roomRef: string
|
|
92
|
+
personRef: string
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export type WebexMembershipEvent = MembershipActivity & {
|
|
96
|
+
ref: string
|
|
97
|
+
actorRef: string
|
|
98
|
+
personRef: string
|
|
99
|
+
roomRef: string
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type WebexAttachmentActionEvent = AttachmentAction & {
|
|
103
|
+
ref: string
|
|
104
|
+
messageRef: string
|
|
105
|
+
personRef: string
|
|
106
|
+
roomRef: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type WebexRoomEvent = RoomActivity & {
|
|
110
|
+
ref: string
|
|
111
|
+
roomRef: string
|
|
112
|
+
actorRef: string
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type WebexRealtimeEvent =
|
|
116
|
+
| WebexMessageEvent
|
|
117
|
+
| WebexDeletedMessageEvent
|
|
118
|
+
| WebexMembershipEvent
|
|
119
|
+
| WebexAttachmentActionEvent
|
|
120
|
+
| WebexRoomEvent
|
|
121
|
+
|
|
74
122
|
export class WebexError extends Error {
|
|
75
123
|
code: string
|
|
76
124
|
|
|
@@ -6,5 +6,16 @@ export { WebexBotListener } from './listener'
|
|
|
6
6
|
export type { WebexBotListenerOptions } from './listener'
|
|
7
7
|
export type { WebexBotConfig, WebexBotCredentials, WebexBotEntry, WebexBotListenerEventMap } from './types'
|
|
8
8
|
export { WebexBotConfigSchema, WebexBotCredentialsSchema, WebexBotEntrySchema, WebexBotError } from './types'
|
|
9
|
-
export type {
|
|
9
|
+
export type {
|
|
10
|
+
WebexAttachmentActionEvent,
|
|
11
|
+
WebexDeletedMessageEvent,
|
|
12
|
+
WebexMembership,
|
|
13
|
+
WebexMembershipEvent,
|
|
14
|
+
WebexMessage,
|
|
15
|
+
WebexMessageEvent,
|
|
16
|
+
WebexPerson,
|
|
17
|
+
WebexRealtimeEvent,
|
|
18
|
+
WebexRoomEvent,
|
|
19
|
+
WebexSpace,
|
|
20
|
+
} from '../webex/types'
|
|
10
21
|
export { WebexMembershipSchema, WebexMessageSchema, WebexPersonSchema, WebexSpaceSchema } from '../webex/types'
|