agent-messenger 2.21.0 → 2.23.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/README.md +21 -0
- package/dist/package.json +1 -1
- package/dist/src/platforms/webex/client.d.ts +25 -0
- package/dist/src/platforms/webex/client.d.ts.map +1 -1
- package/dist/src/platforms/webex/client.js +115 -5
- package/dist/src/platforms/webex/client.js.map +1 -1
- package/dist/src/platforms/webex/commands/auth.d.ts +9 -1
- package/dist/src/platforms/webex/commands/auth.d.ts.map +1 -1
- package/dist/src/platforms/webex/commands/auth.js +141 -25
- package/dist/src/platforms/webex/commands/auth.js.map +1 -1
- package/dist/src/platforms/webex/credential-manager.d.ts.map +1 -1
- package/dist/src/platforms/webex/credential-manager.js +8 -4
- package/dist/src/platforms/webex/credential-manager.js.map +1 -1
- package/dist/src/platforms/webex/id-normalizer.d.ts +19 -0
- package/dist/src/platforms/webex/id-normalizer.d.ts.map +1 -0
- package/dist/src/platforms/webex/id-normalizer.js +60 -0
- package/dist/src/platforms/webex/id-normalizer.js.map +1 -0
- package/dist/src/platforms/webex/index.d.ts +4 -0
- package/dist/src/platforms/webex/index.d.ts.map +1 -1
- package/dist/src/platforms/webex/index.js +2 -0
- package/dist/src/platforms/webex/index.js.map +1 -1
- package/dist/src/platforms/webex/listener.d.ts +61 -0
- package/dist/src/platforms/webex/listener.d.ts.map +1 -0
- package/dist/src/platforms/webex/listener.js +222 -0
- package/dist/src/platforms/webex/listener.js.map +1 -0
- package/dist/src/platforms/webex/password-login.d.ts +18 -0
- package/dist/src/platforms/webex/password-login.d.ts.map +1 -0
- package/dist/src/platforms/webex/password-login.js +259 -0
- package/dist/src/platforms/webex/password-login.js.map +1 -0
- package/dist/src/platforms/webex/types.d.ts +2 -1
- package/dist/src/platforms/webex/types.d.ts.map +1 -1
- package/dist/src/platforms/webex/types.js +1 -1
- package/dist/src/platforms/webex/types.js.map +1 -1
- package/dist/src/platforms/webex/wdm-discovery.d.ts.map +1 -0
- package/dist/src/platforms/{webexbot → webex}/wdm-discovery.js +3 -3
- package/dist/src/platforms/webex/wdm-discovery.js.map +1 -0
- 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 +24 -0
- package/dist/src/platforms/webexbot/client.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/client.js +81 -5
- 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/dist/src/platforms/webexbot/index.d.ts +2 -0
- package/dist/src/platforms/webexbot/index.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/index.js +1 -0
- package/dist/src/platforms/webexbot/index.js.map +1 -1
- package/dist/src/platforms/webexbot/listener.d.ts +3 -41
- package/dist/src/platforms/webexbot/listener.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/listener.js +13 -208
- package/dist/src/platforms/webexbot/listener.js.map +1 -1
- package/dist/src/platforms/webexbot/types.d.ts +1 -18
- package/dist/src/platforms/webexbot/types.d.ts.map +1 -1
- package/dist/src/platforms/webexbot/types.js.map +1 -1
- package/docs/content/docs/cli/webex.mdx +38 -12
- package/docs/content/docs/cli/webexbot.mdx +2 -0
- package/docs/content/docs/sdk/webexbot.mdx +18 -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 +76 -22
- package/skills/agent-webex/references/authentication.md +55 -14
- package/skills/agent-webex/references/common-patterns.md +5 -2
- package/skills/agent-webexbot/SKILL.md +60 -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/cli.test.ts +31 -1
- package/src/platforms/webex/client.test.ts +67 -0
- package/src/platforms/webex/client.ts +136 -7
- package/src/platforms/webex/commands/auth.test.ts +189 -28
- package/src/platforms/webex/commands/auth.ts +194 -35
- package/src/platforms/webex/credential-manager.test.ts +40 -0
- package/src/platforms/webex/credential-manager.ts +7 -4
- package/src/platforms/webex/id-normalizer.test.ts +207 -0
- package/src/platforms/webex/id-normalizer.ts +76 -0
- package/src/platforms/webex/index.test.ts +6 -0
- package/src/platforms/webex/index.ts +4 -0
- package/src/platforms/webex/listener.test.ts +243 -0
- package/src/platforms/webex/listener.ts +285 -0
- package/src/platforms/webex/password-login.test.ts +193 -0
- package/src/platforms/webex/password-login.ts +332 -0
- package/src/platforms/webex/types.test.ts +16 -0
- package/src/platforms/webex/types.ts +2 -2
- package/src/platforms/{webexbot → webex}/wdm-discovery.ts +3 -3
- package/src/platforms/webexbot/cli.ts +6 -0
- package/src/platforms/webexbot/client.test.ts +322 -0
- package/src/platforms/webexbot/client.ts +104 -7
- 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
- package/src/platforms/webexbot/index.ts +2 -0
- package/src/platforms/webexbot/listener.test.ts +37 -224
- package/src/platforms/webexbot/listener.ts +18 -250
- package/src/platforms/webexbot/types.ts +2 -23
- package/dist/src/platforms/webexbot/wdm-discovery.d.ts.map +0 -1
- package/dist/src/platforms/webexbot/wdm-discovery.js.map +0 -1
- /package/dist/src/platforms/{webexbot → webex}/wdm-discovery.d.ts +0 -0
- /package/src/platforms/{webexbot → webex}/wdm-discovery.test.ts +0 -0
|
@@ -1,255 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
WebexMessageHandlerEvents,
|
|
14
|
-
} from 'webex-message-handler'
|
|
15
|
-
import WebSocket from 'ws'
|
|
16
|
-
|
|
17
|
-
import type { WebexBotClient } from './client'
|
|
18
|
-
import type { WebexBotListenerEventMap } from './types'
|
|
19
|
-
import { createWdmRewriteFetch, discoverWdmDevicesUrl } from './wdm-discovery'
|
|
20
|
-
|
|
21
|
-
type EventKey = keyof WebexBotListenerEventMap
|
|
22
|
-
type WebexBotClientLike = Pick<WebexBotClient, 'getToken'>
|
|
23
|
-
|
|
24
|
-
interface WebexMessageHandlerLike {
|
|
25
|
-
connect(): Promise<void>
|
|
26
|
-
disconnect(): Promise<void>
|
|
27
|
-
status(): HandlerStatus
|
|
28
|
-
get connected(): boolean
|
|
29
|
-
on<K extends keyof WebexMessageHandlerEvents>(event: K, listener: WebexMessageHandlerEvents[K]): this
|
|
30
|
-
off<K extends keyof WebexMessageHandlerEvents>(event: K, listener: WebexMessageHandlerEvents[K]): this
|
|
31
|
-
once<K extends keyof WebexMessageHandlerEvents>(event: K, listener: WebexMessageHandlerEvents[K]): this
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export interface WebexBotListenerOptions {
|
|
35
|
-
ignoreSelfMessages?: boolean
|
|
36
|
-
pingInterval?: number
|
|
37
|
-
pongTimeout?: number
|
|
38
|
-
reconnectBackoffMax?: number
|
|
39
|
-
maxReconnectAttempts?: number
|
|
40
|
-
_handlerFactory?: (config: WebexMessageHandlerConfig) => WebexMessageHandlerLike
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export class WebexBotListener {
|
|
44
|
-
private client: WebexBotClientLike
|
|
45
|
-
private options: WebexBotListenerOptions
|
|
46
|
-
private running = false
|
|
47
|
-
private emitter = new EventEmitter()
|
|
48
|
-
private handler: WebexMessageHandlerLike | null = null
|
|
49
|
-
private generation = 0
|
|
50
|
-
private detachHandler: (() => void) | null = null
|
|
51
|
-
private startPromise: Promise<void> | null = null
|
|
52
|
-
|
|
53
|
-
constructor(client: WebexBotClientLike, options: WebexBotListenerOptions = {}) {
|
|
54
|
-
this.client = client
|
|
55
|
-
this.options = options
|
|
56
|
-
}
|
|
57
|
-
|
|
1
|
+
import { WebexListener } from '../webex/listener'
|
|
2
|
+
import { WebexError } from '../webex/types'
|
|
3
|
+
import { WebexBotError } from './types'
|
|
4
|
+
|
|
5
|
+
export type {
|
|
6
|
+
WebexListenerClient as WebexBotListenerClient,
|
|
7
|
+
WebexListenerOptions as WebexBotListenerOptions,
|
|
8
|
+
} from '../webex/listener'
|
|
9
|
+
|
|
10
|
+
export class WebexBotListener extends WebexListener {
|
|
11
|
+
// Preserve the bot error contract: WDM discovery (shared with the user platform)
|
|
12
|
+
// throws WebexError, but existing bot callers catch WebexBotError.
|
|
58
13
|
async start(): Promise<void> {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
let startPromise!: Promise<void>
|
|
66
|
-
startPromise = (async () => {
|
|
67
|
-
let handler: WebexMessageHandlerLike | null = null
|
|
68
|
-
try {
|
|
69
|
-
handler = await this.createHandler()
|
|
70
|
-
|
|
71
|
-
if (!this.running || this.generation !== generation) {
|
|
72
|
-
await handler.disconnect().catch(() => undefined)
|
|
73
|
-
return
|
|
74
|
-
}
|
|
75
|
-
this.handler = handler
|
|
76
|
-
this.detachHandler = this.wireHandler(handler, generation)
|
|
77
|
-
|
|
78
|
-
await handler.connect()
|
|
79
|
-
|
|
80
|
-
if (!this.running || this.handler !== handler || this.generation !== generation) {
|
|
81
|
-
await handler.disconnect().catch(() => undefined)
|
|
82
|
-
return
|
|
83
|
-
}
|
|
84
|
-
} catch (error) {
|
|
85
|
-
if (this.handler === handler && this.generation === generation) {
|
|
86
|
-
this.detachHandler?.()
|
|
87
|
-
this.detachHandler = null
|
|
88
|
-
this.handler = null
|
|
89
|
-
}
|
|
90
|
-
if (this.generation === generation) {
|
|
91
|
-
this.running = false
|
|
92
|
-
}
|
|
93
|
-
await handler?.disconnect().catch(() => undefined)
|
|
94
|
-
throw error
|
|
95
|
-
} finally {
|
|
96
|
-
if (this.startPromise === startPromise) {
|
|
97
|
-
this.startPromise = null
|
|
98
|
-
}
|
|
14
|
+
try {
|
|
15
|
+
await super.start()
|
|
16
|
+
} catch (error) {
|
|
17
|
+
if (error instanceof WebexError) {
|
|
18
|
+
throw new WebexBotError(error.message, error.code)
|
|
99
19
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
this.startPromise = startPromise
|
|
103
|
-
return startPromise
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
async stop(): Promise<void> {
|
|
107
|
-
const pendingStart = this.startPromise
|
|
108
|
-
this.startPromise = null
|
|
109
|
-
|
|
110
|
-
this.running = false
|
|
111
|
-
this.generation++
|
|
112
|
-
|
|
113
|
-
const detach = this.detachHandler
|
|
114
|
-
this.detachHandler = null
|
|
115
|
-
detach?.()
|
|
116
|
-
|
|
117
|
-
const handler = this.handler
|
|
118
|
-
this.handler = null
|
|
119
|
-
if (handler) {
|
|
120
|
-
await handler.disconnect().catch(() => undefined)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (pendingStart) {
|
|
124
|
-
await pendingStart.catch(() => undefined)
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
on<K extends EventKey>(event: K, listener: (...args: WebexBotListenerEventMap[K]) => void): this {
|
|
129
|
-
this.emitter.on(event, listener as (...args: any[]) => void)
|
|
130
|
-
return this
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
off<K extends EventKey>(event: K, listener: (...args: WebexBotListenerEventMap[K]) => void): this {
|
|
134
|
-
this.emitter.off(event, listener as (...args: any[]) => void)
|
|
135
|
-
return this
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
once<K extends EventKey>(event: K, listener: (...args: WebexBotListenerEventMap[K]) => void): this {
|
|
139
|
-
this.emitter.once(event, listener as (...args: any[]) => void)
|
|
140
|
-
return this
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
private isCurrent(handler: WebexMessageHandlerLike, generation: number): boolean {
|
|
144
|
-
return this.running && this.handler === handler && this.generation === generation
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Node's EventEmitter throws synchronously if an 'error' event is emitted with
|
|
148
|
-
// no registered listener. Guard it so SDK consumers that only subscribe to
|
|
149
|
-
// message events are never crashed by a transient connection error.
|
|
150
|
-
private emitError(error: Error): void {
|
|
151
|
-
if (this.emitter.listenerCount('error') > 0) {
|
|
152
|
-
this.emitter.emit('error', error)
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
private async createHandler(): Promise<WebexMessageHandlerLike> {
|
|
157
|
-
const token = this.client.getToken()
|
|
158
|
-
const config: WebexMessageHandlerConfig = { token }
|
|
159
|
-
if (this.options.ignoreSelfMessages !== undefined) config.ignoreSelfMessages = this.options.ignoreSelfMessages
|
|
160
|
-
if (this.options.pingInterval !== undefined) config.pingInterval = this.options.pingInterval
|
|
161
|
-
if (this.options.pongTimeout !== undefined) config.pongTimeout = this.options.pongTimeout
|
|
162
|
-
if (this.options.reconnectBackoffMax !== undefined) config.reconnectBackoffMax = this.options.reconnectBackoffMax
|
|
163
|
-
if (this.options.maxReconnectAttempts !== undefined) config.maxReconnectAttempts = this.options.maxReconnectAttempts
|
|
164
|
-
|
|
165
|
-
if (this.options._handlerFactory) {
|
|
166
|
-
return this.options._handlerFactory(config)
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const wdmDevicesUrl = await discoverWdmDevicesUrl(token)
|
|
170
|
-
config.mode = 'injected'
|
|
171
|
-
config.fetch = createWdmRewriteFetch(wdmDevicesUrl)
|
|
172
|
-
config.webSocketFactory = (url: string) => new WebSocket(url) as unknown as InjectedWebSocket
|
|
173
|
-
return new WebexMessageHandler(config)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
private wireHandler(handler: WebexMessageHandlerLike, generation: number): () => void {
|
|
177
|
-
const onMessageCreated = (event: DecryptedMessage) => {
|
|
178
|
-
if (!this.isCurrent(handler, generation)) return
|
|
179
|
-
this.emitter.emit('message_created', event)
|
|
180
|
-
this.emitter.emit('webex_event', event)
|
|
181
|
-
}
|
|
182
|
-
const onMessageUpdated = (event: DecryptedMessage) => {
|
|
183
|
-
if (!this.isCurrent(handler, generation)) return
|
|
184
|
-
this.emitter.emit('message_updated', event)
|
|
185
|
-
this.emitter.emit('webex_event', event)
|
|
186
|
-
}
|
|
187
|
-
const onMessageDeleted = (event: DeletedMessage) => {
|
|
188
|
-
if (!this.isCurrent(handler, generation)) return
|
|
189
|
-
this.emitter.emit('message_deleted', event)
|
|
190
|
-
this.emitter.emit('webex_event', event)
|
|
191
|
-
}
|
|
192
|
-
const onMembershipCreated = (event: MembershipActivity) => {
|
|
193
|
-
if (!this.isCurrent(handler, generation)) return
|
|
194
|
-
this.emitter.emit('membership_created', event)
|
|
195
|
-
this.emitter.emit('webex_event', event)
|
|
196
|
-
}
|
|
197
|
-
const onAttachmentAction = (event: AttachmentAction) => {
|
|
198
|
-
if (!this.isCurrent(handler, generation)) return
|
|
199
|
-
this.emitter.emit('attachment_action', event)
|
|
200
|
-
this.emitter.emit('webex_event', event)
|
|
201
|
-
}
|
|
202
|
-
const onRoomCreated = (event: RoomActivity) => {
|
|
203
|
-
if (!this.isCurrent(handler, generation)) return
|
|
204
|
-
this.emitter.emit('room_created', event)
|
|
205
|
-
this.emitter.emit('webex_event', event)
|
|
206
|
-
}
|
|
207
|
-
const onRoomUpdated = (event: RoomActivity) => {
|
|
208
|
-
if (!this.isCurrent(handler, generation)) return
|
|
209
|
-
this.emitter.emit('room_updated', event)
|
|
210
|
-
this.emitter.emit('webex_event', event)
|
|
211
|
-
}
|
|
212
|
-
const onConnected = () => {
|
|
213
|
-
if (!this.isCurrent(handler, generation)) return
|
|
214
|
-
this.emitter.emit('connected', { connected: handler.connected, status: handler.status() })
|
|
215
|
-
}
|
|
216
|
-
const onReconnecting = (attempt: number) => {
|
|
217
|
-
if (!this.isCurrent(handler, generation)) return
|
|
218
|
-
this.emitter.emit('reconnecting', attempt)
|
|
219
|
-
}
|
|
220
|
-
const onDisconnected = (reason: string) => {
|
|
221
|
-
if (!this.isCurrent(handler, generation)) return
|
|
222
|
-
this.emitter.emit('disconnected', reason)
|
|
223
|
-
}
|
|
224
|
-
const onError = (error: Error) => {
|
|
225
|
-
if (!this.isCurrent(handler, generation)) return
|
|
226
|
-
this.emitError(error)
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
handler.on('message:created', onMessageCreated)
|
|
230
|
-
handler.on('message:updated', onMessageUpdated)
|
|
231
|
-
handler.on('message:deleted', onMessageDeleted)
|
|
232
|
-
handler.on('membership:created', onMembershipCreated)
|
|
233
|
-
handler.on('attachmentAction:created', onAttachmentAction)
|
|
234
|
-
handler.on('room:created', onRoomCreated)
|
|
235
|
-
handler.on('room:updated', onRoomUpdated)
|
|
236
|
-
handler.on('connected', onConnected)
|
|
237
|
-
handler.on('reconnecting', onReconnecting)
|
|
238
|
-
handler.on('disconnected', onDisconnected)
|
|
239
|
-
handler.on('error', onError)
|
|
240
|
-
|
|
241
|
-
return () => {
|
|
242
|
-
handler.off('message:created', onMessageCreated)
|
|
243
|
-
handler.off('message:updated', onMessageUpdated)
|
|
244
|
-
handler.off('message:deleted', onMessageDeleted)
|
|
245
|
-
handler.off('membership:created', onMembershipCreated)
|
|
246
|
-
handler.off('attachmentAction:created', onAttachmentAction)
|
|
247
|
-
handler.off('room:created', onRoomCreated)
|
|
248
|
-
handler.off('room:updated', onRoomUpdated)
|
|
249
|
-
handler.off('connected', onConnected)
|
|
250
|
-
handler.off('reconnecting', onReconnecting)
|
|
251
|
-
handler.off('disconnected', onDisconnected)
|
|
252
|
-
handler.off('error', onError)
|
|
20
|
+
throw error
|
|
253
21
|
}
|
|
254
22
|
}
|
|
255
23
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AttachmentAction,
|
|
3
|
-
DecryptedMessage,
|
|
4
|
-
DeletedMessage,
|
|
5
|
-
HandlerStatus,
|
|
6
|
-
MembershipActivity,
|
|
7
|
-
RoomActivity,
|
|
8
|
-
} from 'webex-message-handler'
|
|
9
1
|
import { z } from 'zod'
|
|
10
2
|
|
|
3
|
+
export type { WebexListenerEventMap as WebexBotListenerEventMap } from '../webex/listener'
|
|
4
|
+
|
|
11
5
|
export interface WebexBotEntry {
|
|
12
6
|
bot_id: string
|
|
13
7
|
bot_name: string
|
|
@@ -55,18 +49,3 @@ export const WebexBotCredentialsSchema = z.object({
|
|
|
55
49
|
bot_id: z.string(),
|
|
56
50
|
bot_name: z.string(),
|
|
57
51
|
})
|
|
58
|
-
|
|
59
|
-
export interface WebexBotListenerEventMap {
|
|
60
|
-
message_created: [event: DecryptedMessage]
|
|
61
|
-
message_updated: [event: DecryptedMessage]
|
|
62
|
-
message_deleted: [event: DeletedMessage]
|
|
63
|
-
membership_created: [event: MembershipActivity]
|
|
64
|
-
attachment_action: [event: AttachmentAction]
|
|
65
|
-
room_created: [event: RoomActivity]
|
|
66
|
-
room_updated: [event: RoomActivity]
|
|
67
|
-
webex_event: [event: DecryptedMessage | DeletedMessage | MembershipActivity | AttachmentAction | RoomActivity]
|
|
68
|
-
connected: [info: { connected: boolean; status: HandlerStatus }]
|
|
69
|
-
reconnecting: [attempt: number]
|
|
70
|
-
disconnected: [reason: string]
|
|
71
|
-
error: [error: Error]
|
|
72
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wdm-discovery.d.ts","sourceRoot":"","sources":["../../../../src/platforms/webexbot/wdm-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAA+B,MAAM,uBAAuB,CAAA;AAavF,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAa1E;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,CAc1E"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wdm-discovery.js","sourceRoot":"","sources":["../../../../src/platforms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