@cogitator-ai/channels 0.17.0 → 0.18.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.
Files changed (62) hide show
  1. package/README.md +37 -14
  2. package/dist/approvals.d.ts +3 -0
  3. package/dist/approvals.d.ts.map +1 -1
  4. package/dist/approvals.js +1 -0
  5. package/dist/approvals.js.map +1 -1
  6. package/dist/assistant-config.d.ts +20 -0
  7. package/dist/assistant-config.d.ts.map +1 -1
  8. package/dist/assistant-config.js +36 -0
  9. package/dist/assistant-config.js.map +1 -1
  10. package/dist/channels/teams/activity.d.ts +108 -0
  11. package/dist/channels/teams/activity.d.ts.map +1 -0
  12. package/dist/channels/teams/activity.js +206 -0
  13. package/dist/channels/teams/activity.js.map +1 -0
  14. package/dist/channels/teams/auth.d.ts +65 -0
  15. package/dist/channels/teams/auth.d.ts.map +1 -0
  16. package/dist/channels/teams/auth.js +213 -0
  17. package/dist/channels/teams/auth.js.map +1 -0
  18. package/dist/channels/teams/cards.d.ts +23 -0
  19. package/dist/channels/teams/cards.d.ts.map +1 -0
  20. package/dist/channels/teams/cards.js +97 -0
  21. package/dist/channels/teams/cards.js.map +1 -0
  22. package/dist/channels/teams/channel.d.ts +303 -0
  23. package/dist/channels/teams/channel.d.ts.map +1 -0
  24. package/dist/channels/teams/channel.js +1071 -0
  25. package/dist/channels/teams/channel.js.map +1 -0
  26. package/dist/channels/teams/client.d.ts +72 -0
  27. package/dist/channels/teams/client.d.ts.map +1 -0
  28. package/dist/channels/teams/client.js +161 -0
  29. package/dist/channels/teams/client.js.map +1 -0
  30. package/dist/channels/teams/index.d.ts +7 -0
  31. package/dist/channels/teams/index.d.ts.map +1 -0
  32. package/dist/channels/teams/index.js +6 -0
  33. package/dist/channels/teams/index.js.map +1 -0
  34. package/dist/channels/teams/pacer.d.ts +47 -0
  35. package/dist/channels/teams/pacer.d.ts.map +1 -0
  36. package/dist/channels/teams/pacer.js +174 -0
  37. package/dist/channels/teams/pacer.js.map +1 -0
  38. package/dist/channels/teams/token.d.ts +47 -0
  39. package/dist/channels/teams/token.d.ts.map +1 -0
  40. package/dist/channels/teams/token.js +107 -0
  41. package/dist/channels/teams/token.js.map +1 -0
  42. package/dist/channels/telegram.d.ts.map +1 -1
  43. package/dist/channels/telegram.js +3 -0
  44. package/dist/channels/telegram.js.map +1 -1
  45. package/dist/formatters/markdown-images.d.ts +8 -0
  46. package/dist/formatters/markdown-images.d.ts.map +1 -0
  47. package/dist/formatters/markdown-images.js +181 -0
  48. package/dist/formatters/markdown-images.js.map +1 -0
  49. package/dist/formatters/markdown.d.ts.map +1 -1
  50. package/dist/formatters/markdown.js +21 -3
  51. package/dist/formatters/markdown.js.map +1 -1
  52. package/dist/gateway.d.ts.map +1 -1
  53. package/dist/gateway.js +9 -2
  54. package/dist/gateway.js.map +1 -1
  55. package/dist/index.d.ts +2 -1
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +2 -1
  58. package/dist/index.js.map +1 -1
  59. package/dist/runtime-builder.d.ts.map +1 -1
  60. package/dist/runtime-builder.js +35 -1
  61. package/dist/runtime-builder.js.map +1 -1
  62. package/package.json +7 -7
@@ -0,0 +1,303 @@
1
+ import { type RequestListener } from 'node:http';
2
+ import type { Attachment, Channel, ChannelAction, ChannelButton, ChannelMessage, SendOptions } from '@cogitator-ai/types';
3
+ import { type TeamsRetryOptions } from './client.js';
4
+ import { type TeamsTokenProvider } from './token.js';
5
+ /** The largest message Teams is advised to take, in bytes of the activity JSON. */
6
+ export declare const TEAMS_MAX_MESSAGE_BYTES: number;
7
+ /**
8
+ * The longest text sent as one message, in characters: JSON takes at most six bytes for one
9
+ * character (`\u0001`), so this many stay under {@link TEAMS_MAX_MESSAGE_BYTES} whatever they are.
10
+ */
11
+ export declare const TEAMS_MESSAGE_CHARS: number;
12
+ /** The port of the channel's own server by default, the port Bot Framework samples use. */
13
+ export declare const TEAMS_DEFAULT_PORT = 3978;
14
+ /** The path of the channel's own server by default, the messaging endpoint of Azure Bot Service. */
15
+ export declare const TEAMS_DEFAULT_PATH = "/api/messages";
16
+ /** The Bot Connector of the commercial cloud, for conversations no activity came from yet. */
17
+ export declare const TEAMS_GLOBAL_SERVICE_URL = "https://smba.trafficmanager.net/teams/";
18
+ /** The largest webhook body the channel's own server takes by default, in bytes. */
19
+ export declare const TEAMS_DEFAULT_MAX_BODY: number;
20
+ /**
21
+ * The shortest time between two updates of one message, in ms, so a streamed answer takes at
22
+ * most one of the 60 requests a conversation may have in 30 seconds every second, and new
23
+ * messages always find room.
24
+ */
25
+ export declare const TEAMS_MIN_EDIT_INTERVAL = 1000;
26
+ /**
27
+ * The kind of the app registration, as Azure Bot Service names it. New bots are single-tenant
28
+ * or use a user-assigned managed identity: multi-tenant bots cannot be created since July 2025.
29
+ */
30
+ export type TeamsAppType = 'SingleTenant' | 'MultiTenant' | 'UserAssignedMSI';
31
+ export interface TeamsWebhookConfig {
32
+ /**
33
+ * Run an HTTP server of the channel's own on this port. Without it, mount `handleWebhook` or
34
+ * `webhookListener()` in a server of yours.
35
+ */
36
+ port?: number;
37
+ /** The path of the channel's own server (default `/api/messages`) */
38
+ path?: string;
39
+ host?: string;
40
+ /** The largest body taken, in bytes (default 1 MB), larger ones get `413` */
41
+ maxBody?: number;
42
+ /**
43
+ * Plain HTTP routes served on the same port, by path, such as the webhook of another channel:
44
+ * `{ '/github/webhook': github.webhookListener() }`. Other paths answer `404`.
45
+ */
46
+ routes?: Record<string, RequestListener>;
47
+ }
48
+ export interface TeamsChannelConfig {
49
+ /** The Microsoft App ID of the bot's app registration */
50
+ appId: string;
51
+ /** A client secret of the app registration, which outbound tokens are requested with */
52
+ appPassword?: string;
53
+ /** The tenant of the app registration: required for a single-tenant bot */
54
+ tenantId?: string;
55
+ /** Default `SingleTenant` */
56
+ appType?: TeamsAppType;
57
+ /**
58
+ * A function that returns a Bot Connector token, in place of `appPassword`: required for
59
+ * `UserAssignedMSI`, such as a token of the managed identity from `@azure/identity`.
60
+ */
61
+ tokenProvider?: TeamsTokenProvider;
62
+ /** The server Bot Framework posts activities to. Without `port` mount `handleWebhook` */
63
+ webhook?: TeamsWebhookConfig;
64
+ /**
65
+ * The tenants whose users the bot answers, or `'*'` for every tenant the app is installed in.
66
+ * Default: the bot's own `tenantId`, so an app installed elsewhere answers nobody there.
67
+ */
68
+ tenants?: string[] | '*';
69
+ /** Answer only these users, by Entra object id (`aadObjectId`) or Teams user id */
70
+ users?: string[];
71
+ /**
72
+ * Which messages of group chats and channels the bot answers: `mention` (default) only those
73
+ * that @mention it, `all` every message it receives. Teams delivers messages without a mention
74
+ * only when the app has the resource-specific consent `ChannelMessage.Read.Group` or
75
+ * `ChatMessage.Read.Chat`. Personal chats are always answered.
76
+ */
77
+ trigger?: 'mention' | 'all';
78
+ /**
79
+ * The Bot Connector of conversations no activity came from since the start, such as a reminder
80
+ * after a restart (default the commercial cloud, {@link TEAMS_GLOBAL_SERVICE_URL}).
81
+ */
82
+ serviceUrl?: string;
83
+ /**
84
+ * The hosts a service URL may have, such as `smba.trafficmanager.net`. Activities naming
85
+ * another are refused. Default: any service URL a verified token was issued for.
86
+ */
87
+ serviceUrlHosts?: string[];
88
+ /** How requests Teams throttles or fails for a moment are tried again */
89
+ retry?: TeamsRetryOptions;
90
+ /** How long one Bot Connector request may take, in ms (default 30 000) */
91
+ requestTimeout?: number;
92
+ /** The OpenID metadata of inbound tokens (default Bot Framework's), for tests */
93
+ openIdMetadataUrl?: string;
94
+ /** Where outbound tokens come from (default `https://login.microsoftonline.com`), for tests and national clouds */
95
+ loginUrl?: string;
96
+ fetch?: typeof fetch;
97
+ }
98
+ /** A webhook request, as any HTTP server hands it over. */
99
+ export interface TeamsWebhookRequest {
100
+ method: string;
101
+ headers: Record<string, string | string[] | undefined>;
102
+ /** The body as received */
103
+ rawBody?: string | Uint8Array;
104
+ }
105
+ export interface TeamsWebhookResponse {
106
+ status: number;
107
+ body: string;
108
+ /** `application/json` for the answer to an invoke, `text/plain` otherwise */
109
+ contentType: string;
110
+ }
111
+ /**
112
+ * Markdown with its images turned into links (`![alt](url)` becomes `[alt](url)`) and raw
113
+ * `<img>` tags into text, outside code: Teams loads an image as soon as it shows the message,
114
+ * so an answer steered by injected text could send what it read to any address in an image URL.
115
+ */
116
+ export declare function withoutImages(text: string): string;
117
+ /** Splits text into the messages Teams takes: at most {@link TEAMS_MESSAGE_CHARS} characters each. */
118
+ export declare function splitTeamsText(text: string): string[];
119
+ /**
120
+ * A Microsoft Teams channel on the Bot Framework protocol, with no SDK: Bot Framework posts
121
+ * activities to a webhook, each checked against its signed JWT, and answers go back through the
122
+ * Bot Connector REST API with a client credentials token of the app registration.
123
+ *
124
+ * Each chat is a conversation: `channelId` is the Teams conversation id of a personal or group
125
+ * chat, or of a team channel, whose threads are topics (`topicId` is the thread's root message
126
+ * id), so each channel thread is a conversation of its own. In group chats and channels the bot
127
+ * answers @mentions, without the mention in the text. Buttons are Adaptive Cards, answers are
128
+ * Markdown and can be edited, so they stream.
129
+ */
130
+ export declare class TeamsChannel implements Channel {
131
+ readonly type = "teams";
132
+ readonly editable = true;
133
+ readonly nativeMarkdown = true;
134
+ readonly maxMessageChars: number;
135
+ private readonly config;
136
+ private readonly tenantId?;
137
+ private readonly verifier;
138
+ private readonly credentials;
139
+ private readonly client;
140
+ private readonly fetchImpl;
141
+ private handler;
142
+ private actionHandler;
143
+ /** Activities taken, by `conversation|id`, so one sent again is handled once */
144
+ private readonly delivered;
145
+ /** Messages handed to the gateway whose handler has not resolved yet, by delivery key */
146
+ private readonly inFlight;
147
+ /** Messages of `inFlight` the gateway handed back while they were being taken */
148
+ private readonly refused;
149
+ /** The delivery key of each message handed over, by message id */
150
+ private readonly deliveryKeys;
151
+ private readonly conversations;
152
+ private readonly sent;
153
+ private readonly updates;
154
+ private readonly pacer;
155
+ /** Conversations whose messages Teams blocks (`MessageWritesBlocked`), by pacing key */
156
+ private readonly blocked;
157
+ /** Messages whose webhook request was answered before the gateway took them, by delivery key */
158
+ private readonly answeredEarly;
159
+ private readonly activeRequests;
160
+ /** Waits that end at once when the channel stops */
161
+ private readonly onHalt;
162
+ /** Aborts every request and wait under way when the channel stops */
163
+ private halt;
164
+ private readonly answers;
165
+ /** The conversation of each button press, to answer it with a message once its request is over */
166
+ private readonly actionConversations;
167
+ private readonly uploads;
168
+ private server?;
169
+ private running;
170
+ private stopped;
171
+ constructor(config: TeamsChannelConfig);
172
+ onMessage(handler: (msg: ChannelMessage) => Promise<void>): void;
173
+ onAction(handler: (action: ChannelAction) => Promise<void>): void;
174
+ start(): Promise<void>;
175
+ stop(): Promise<void>;
176
+ /**
177
+ * Takes back a message the gateway does not answer because it stops. One it refuses while it
178
+ * is being handed over gets its webhook request answered `503`. One it dropped after its
179
+ * request was answered cannot come again, since Bot Framework does not send an activity twice
180
+ * once it was taken, so it is logged.
181
+ */
182
+ redeliver(msg: ChannelMessage): Promise<void>;
183
+ /**
184
+ * Answers a request Bot Framework posts: checks its token, answers at once and hands the
185
+ * activity to the agent after. A button press of an Adaptive Card (`Action.Execute`) is
186
+ * answered with the press's answer in the response, within a few seconds. Mount it in any HTTP
187
+ * server with the raw body. It works before `start()` too, answers a message `503` while no
188
+ * `onMessage` handler is set, so Bot Framework sends it again, and answers `503` once stopped.
189
+ */
190
+ handleWebhook(request: TeamsWebhookRequest): Promise<TeamsWebhookResponse>;
191
+ /**
192
+ * A Node request listener that answers Bot Framework's requests on any path it is mounted at.
193
+ * Bodies over `webhook.maxBody` (1 MB by default) are refused with `413`.
194
+ */
195
+ webhookListener(): RequestListener;
196
+ /**
197
+ * Sends `text` to the conversation `channelId`, in the channel thread of `topicId`, as several
198
+ * messages when it is longer than one holds. With `replyTo` the first one replies to that
199
+ * message, and `buttons` go under the last as an Adaptive Card. Resolves with the id of the
200
+ * first message.
201
+ */
202
+ sendText(channelId: string, text: string, options?: SendOptions): Promise<string>;
203
+ /**
204
+ * Replaces the text of a message the bot sent, keeping its buttons as they are now, also when
205
+ * a change of them is still on its way, unless `buttons` are given. Updates of one message go
206
+ * out one at a time, at least {@link TEAMS_MIN_EDIT_INTERVAL} apart and behind new messages
207
+ * when the conversation nears its limits, and those made meanwhile are folded into the next,
208
+ * the latest text winning, so a streamed answer never queues more than Teams takes.
209
+ */
210
+ editText(channelId: string, messageId: string, text: string, options?: SendOptions): Promise<void>;
211
+ /** Replaces the buttons of a message the bot sent, or removes them with `null`. */
212
+ editButtons(channelId: string, messageId: string, buttons: ChannelButton[][] | null): Promise<void>;
213
+ /** Deletes a message the bot sent. */
214
+ deleteMessage(channelId: string, messageId: string): Promise<void>;
215
+ /**
216
+ * Shows the typing indicator. It is skipped when the conversation has no room for it now, or
217
+ * Teams blocks the bot's messages there, since a late indicator says nothing.
218
+ */
219
+ sendTyping(channelId: string, options?: Pick<SendOptions, 'topicId'>): Promise<void>;
220
+ /**
221
+ * Sends a file. A `buffer` goes out in personal chats only: Teams asks the user to accept it
222
+ * with a file consent card and the file is uploaded to their OneDrive once they do, which needs
223
+ * `supportsFiles` in the app manifest. Bots cannot upload files to group chats and channels
224
+ * without Microsoft Graph, so there a file needs a public `url`: an image is shown inline,
225
+ * another file is sent as a link. Resolves with the id of the message sent.
226
+ */
227
+ sendFile(channelId: string, file: Attachment, options?: SendOptions): Promise<string>;
228
+ /**
229
+ * Answers a button press. An `Action.Execute` press still waiting for its answer gets it in
230
+ * the response, shown to the user who pressed. Otherwise a `text` is sent to the conversation
231
+ * as a message, since Teams has no other way to answer a press. An `alert`, meant for the one
232
+ * who pressed only (such as "this prompt expired"), is not posted where everyone reads it.
233
+ */
234
+ answerAction(actionId: string, options?: {
235
+ text?: string;
236
+ alert?: boolean;
237
+ }): Promise<void>;
238
+ private allowedTenants;
239
+ /** Whether the sender of an activity may talk to the bot: by their tenant and the user list. */
240
+ private admits;
241
+ private allowsServiceUrl;
242
+ /** Remembers the Bot Connector and kind of the conversation of a verified activity. */
243
+ private rememberConversation;
244
+ private serviceUrlOf;
245
+ private typeOf;
246
+ /**
247
+ * Calls the Bot Connector for a conversation, paced by its limits. A conversation where Teams
248
+ * blocks the bot's messages is not called again until an activity comes from it, and nothing
249
+ * is called once the channel stopped: its waits and requests under way are aborted.
250
+ */
251
+ private call;
252
+ /** Where a message of an activity goes: the chat, and the channel thread it is in. */
253
+ private placeOf;
254
+ /**
255
+ * Hands a message to the gateway and answers its request once the gateway took it, or after
256
+ * a few seconds. One the gateway refuses because it stops is answered `503`, and one it gives
257
+ * back after its request was answered is logged by `redeliver`.
258
+ */
259
+ private handOver;
260
+ private receive;
261
+ /**
262
+ * The files of a message the agent can read: files sent in a personal chat, by their download
263
+ * URL, and inline images, downloaded with the bot's token from the Bot Connector the activity
264
+ * came through (and from nowhere else, so the token never leaves it).
265
+ */
266
+ private inboundAttachments;
267
+ private download;
268
+ /** The action of a button press, from an `Action.Submit` message or an `Action.Execute` invoke. */
269
+ private actionOf;
270
+ private press;
271
+ private invoke;
272
+ /**
273
+ * Answers an `Action.Execute` press within the time Teams waits: with the text the press is
274
+ * answered with, or else the message's card once the press is handled (so it shows what the
275
+ * press changed, such as an approval's decision), or as it is when time runs out.
276
+ */
277
+ private execute;
278
+ /**
279
+ * Uploads a file the user accepted, in the conversation the consent card was sent to. A card
280
+ * the bot no longer knows (it restarted, or the file expired) and a declined one are answered
281
+ * with a short message.
282
+ */
283
+ private consented;
284
+ private upload;
285
+ private expireUploads;
286
+ /** Posts a message activity, as a reply to `replyTo` when given, and remembers what it holds. */
287
+ private post;
288
+ /**
289
+ * Updates a message the bot sent (`PUT`), one update of it at a time: changes made while one
290
+ * is under way are folded into the next, which sends the latest state.
291
+ */
292
+ private update;
293
+ /**
294
+ * Sends the updates of a message one at a time. When one fails while a newer state waits,
295
+ * the newer one is still sent, so a streamed answer ends with its final text, and only a
296
+ * failure of the latest state reaches the callers.
297
+ */
298
+ private drainUpdates;
299
+ private listen;
300
+ }
301
+ /** A Microsoft Teams channel on the Bot Framework protocol. */
302
+ export declare function teamsChannel(config: TeamsChannelConfig): TeamsChannel;
303
+ //# sourceMappingURL=channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/channels/teams/channel.ts"],"names":[],"mappings":"AACA,OAAO,EAAsC,KAAK,eAAe,EAAe,MAAM,WAAW,CAAC;AAElG,OAAO,KAAK,EACV,UAAU,EACV,OAAO,EACP,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAgC7B,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,UAAU,CAAC;AAElB,OAAO,EAA0C,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE1F,mFAAmF;AACnF,eAAO,MAAM,uBAAuB,QAAY,CAAC;AACjD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAA0C,CAAC;AAC3E,2FAA2F;AAC3F,eAAO,MAAM,kBAAkB,OAAO,CAAC;AACvC,oGAAoG;AACpG,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAClD,8FAA8F;AAC9F,eAAO,MAAM,wBAAwB,2CAA2C,CAAC;AACjF,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,QAAc,CAAC;AAClD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAC;AA2B5C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG,aAAa,GAAG,iBAAiB,CAAC;AAE9E,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,kBAAkB;IACjC,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;I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