chat 4.30.0 → 4.31.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/README.md CHANGED
@@ -1,9 +1,13 @@
1
- # chat
1
+ # Chat SDK
2
+
3
+ > npm package: [`chat`](https://www.npmjs.com/package/chat)
2
4
 
3
5
  [![npm version](https://img.shields.io/npm/v/chat)](https://www.npmjs.com/package/chat)
4
6
  [![npm downloads](https://img.shields.io/npm/dm/chat)](https://www.npmjs.com/package/chat)
5
7
 
6
- Core SDK for building multi-platform chat bots. Provides the `Chat` class, event handlers, JSX card runtime, emoji helpers, and type-safe message formatting.
8
+ Universal TypeScript SDK for building multi-platform chat bots and AI agents on Slack, Teams, Google Chat, Discord, WhatsApp, and more. Provides the `Chat` class, event handlers, JSX cards, emoji helpers, and type-safe message formatting.
9
+
10
+ Documentation: [chat-sdk.dev/docs](https://chat-sdk.dev/docs) · Guides: [vercel.com/kb/chat-sdk](https://vercel.com/kb/chat-sdk)
7
11
 
8
12
  ## Installation
9
13
 
@@ -11,6 +15,16 @@ Core SDK for building multi-platform chat bots. Provides the `Chat` class, event
11
15
  npm install chat
12
16
  ```
13
17
 
18
+ ## CLI
19
+
20
+ Scaffold a minimal Next.js bot app with `create-chat-sdk`:
21
+
22
+ ```bash
23
+ npx create-chat-sdk@latest my-bot
24
+ ```
25
+
26
+ The CLI generates your `Chat` configuration, webhook route, `.env.example` file, dependencies, and optional Web adapter route from the adapter catalog. See the [CLI docs](https://chat-sdk.dev/docs/create-chat-sdk) for options and non-interactive usage.
27
+
14
28
  ## Usage
15
29
 
16
30
  ```typescript
@@ -40,7 +54,7 @@ bot.onSubscribedMessage(async (thread, message) => {
40
54
  });
41
55
  ```
42
56
 
43
- > **Tip:** PostgreSQL and ioredis adapters are also available for production. See [State Adapters](https://chat-sdk.dev/docs/state) for all options.
57
+ > **Tip:** PostgreSQL and ioredis adapters are also available for production. See [State Adapters](https://chat-sdk.dev/docs/state-adapters) for all options.
44
58
 
45
59
  ## Configuration
46
60
 
@@ -53,14 +67,26 @@ bot.onSubscribedMessage(async (thread, message) => {
53
67
  | `streamingUpdateIntervalMs` | `number` | `500` | Update interval for fallback streaming (post + edit) in ms |
54
68
  | `dedupeTtlMs` | `number` | `300000` | TTL for message deduplication entries in ms. Increase if webhook cold starts cause platform retries (e.g., Slack's `http_timeout` retry) that arrive after the default window |
55
69
 
56
- ## AI coding agent support
70
+ ## AI Coding Agents
57
71
 
58
- If you use an AI coding agent like [Claude Code](https://docs.anthropic.com/en/docs/claude-code), you can teach it about Chat SDK:
72
+ If you use an AI coding agent such as OpenAI Codex, Claude Code, or Cursor, install the Chat SDK skill so it knows the SDK APIs, adapter patterns, and project conventions before writing code.
59
73
 
60
74
  ```bash
61
75
  npx skills add vercel/chat
62
76
  ```
63
77
 
78
+ The skill references bundled documentation in `node_modules/chat/docs`, plus adapter guides and starter templates in the published package.
79
+
80
+ You can also install the [Vercel Plugin](https://vercel.com/docs/agent-resources/vercel-plugin) for a broader agent toolkit — it includes the Chat SDK skill alongside specialist agents, agent slash commands, and more:
81
+
82
+ ```bash
83
+ npx plugins add vercel/vercel-plugin
84
+ ```
85
+
86
+ The plugin is optional; the skill alone is enough to build with Chat SDK.
87
+
88
+ For agent-readable documentation, see [chat-sdk.dev/llms.txt](https://chat-sdk.dev/llms.txt) (page index) or [chat-sdk.dev/llms-full.txt](https://chat-sdk.dev/llms-full.txt) (full text).
89
+
64
90
  ## Documentation
65
91
 
66
92
  Full documentation is available at [chat-sdk.dev/docs](https://chat-sdk.dev/docs).
@@ -0,0 +1,594 @@
1
+ /**
2
+ * Static catalog of official and vendor-official Chat SDK adapters.
3
+ *
4
+ * This module imports no adapter packages and no provider SDKs, so it is safe
5
+ * to use from build scripts, setup screens, and onboarding flows that only need
6
+ * package metadata and environment-variable requirements.
7
+ *
8
+ * @example List every cataloged adapter.
9
+ * ```typescript
10
+ * import { ADAPTER_NAMES, getAdapter } from "chat/adapters";
11
+ *
12
+ * for (const slug of ADAPTER_NAMES) {
13
+ * const adapter = getAdapter(slug);
14
+ * console.log(adapter.name, adapter.packageName);
15
+ * }
16
+ * ```
17
+ *
18
+ * @example Find secrets for one adapter.
19
+ * ```typescript
20
+ * import { getSecretEnvVars } from "chat/adapters";
21
+ *
22
+ * const keys = getSecretEnvVars("slack").map((envVar) => envVar.key);
23
+ * ```
24
+ */
25
+ /**
26
+ * A single environment variable referenced by an adapter.
27
+ */
28
+ interface EnvVar {
29
+ /**
30
+ * Alternative variable names accepted for the same value.
31
+ */
32
+ aliases?: readonly string[];
33
+ /**
34
+ * Short description of what the value configures.
35
+ */
36
+ description: string;
37
+ /**
38
+ * Canonical environment variable name.
39
+ */
40
+ key: string;
41
+ /**
42
+ * Whether the value is a credential, token, secret, or password that should
43
+ * be masked in logs and user interfaces.
44
+ */
45
+ secret: boolean;
46
+ }
47
+ /**
48
+ * One self-contained way to satisfy an adapter's credential requirements.
49
+ *
50
+ * Use {@link AdapterEnvSpec.credentialModes} when an adapter supports multiple
51
+ * mutually exclusive authentication paths.
52
+ */
53
+ interface EnvGroup {
54
+ /**
55
+ * Human-readable name for this credential mode.
56
+ */
57
+ label: string;
58
+ /**
59
+ * Variables that together satisfy this mode.
60
+ */
61
+ vars: readonly EnvVar[];
62
+ }
63
+ /**
64
+ * Environment variables and constructor-only configuration for an adapter.
65
+ */
66
+ interface AdapterEnvSpec {
67
+ /**
68
+ * Constructor options that have no environment-variable equivalent.
69
+ */
70
+ config?: readonly string[];
71
+ /**
72
+ * Mutually exclusive credential modes. A caller usually satisfies exactly
73
+ * one group.
74
+ */
75
+ credentialModes?: readonly EnvGroup[];
76
+ /**
77
+ * Additional caveats that do not fit the structured fields.
78
+ */
79
+ notes?: string;
80
+ /**
81
+ * Optional environment variables that tune behavior but are safe to omit.
82
+ */
83
+ optional?: readonly EnvVar[];
84
+ /**
85
+ * Variables needed regardless of credential mode.
86
+ */
87
+ required?: readonly EnvVar[];
88
+ }
89
+ /**
90
+ * Metadata for one cataloged Chat SDK adapter.
91
+ */
92
+ interface CatalogAdapter {
93
+ /**
94
+ * One-line summary of what the adapter connects to.
95
+ */
96
+ description: string;
97
+ /**
98
+ * Environment variables and constructor-only configuration.
99
+ */
100
+ env: AdapterEnvSpec;
101
+ /**
102
+ * Named factory export from {@link CatalogAdapter.packageName}.
103
+ */
104
+ factoryExport: string;
105
+ /**
106
+ * Catalog group used by the docs adapter listing.
107
+ */
108
+ group: "official" | "vendor-official";
109
+ /**
110
+ * Display name.
111
+ */
112
+ name: string;
113
+ /**
114
+ * NPM package that provides the adapter implementation.
115
+ */
116
+ packageName: string;
117
+ /**
118
+ * Runtime packages the adapter expects the consuming app to provide or
119
+ * install alongside it.
120
+ */
121
+ peerDeps: readonly string[];
122
+ /**
123
+ * Stable catalog slug.
124
+ */
125
+ slug: string;
126
+ /**
127
+ * Whether the adapter connects to a messaging platform or stores Chat SDK
128
+ * state.
129
+ */
130
+ type: "platform" | "state";
131
+ }
132
+ /**
133
+ * Official and vendor-official adapters keyed by slug.
134
+ */
135
+ declare const ADAPTERS: {
136
+ readonly agentphone: {
137
+ readonly description: "Unified SMS, MMS, iMessage, and voice adapter for Chat SDK with HMAC-verified webhooks, iMessage reactions, and voice call transcripts via AgentPhone.";
138
+ readonly env: {
139
+ readonly config: readonly ["apiUrl", "userName"];
140
+ readonly optional: readonly [EnvVar];
141
+ readonly required: readonly [EnvVar, EnvVar];
142
+ };
143
+ readonly factoryExport: "createAgentPhoneAdapter";
144
+ readonly group: "vendor-official";
145
+ readonly name: "AgentPhone";
146
+ readonly packageName: "@agentphone/chat-sdk-adapter";
147
+ readonly peerDeps: readonly [];
148
+ readonly slug: "agentphone";
149
+ readonly type: "platform";
150
+ };
151
+ readonly discord: {
152
+ readonly description: "Create Discord bots with slash commands, threads, and rich embeds.";
153
+ readonly env: {
154
+ readonly optional: readonly [EnvVar, EnvVar];
155
+ readonly required: readonly [EnvVar, EnvVar, EnvVar];
156
+ };
157
+ readonly factoryExport: "createDiscordAdapter";
158
+ readonly group: "official";
159
+ readonly name: "Discord";
160
+ readonly packageName: "@chat-adapter/discord";
161
+ readonly peerDeps: readonly ["discord-api-types", "discord-interactions", "discord.js"];
162
+ readonly slug: "discord";
163
+ readonly type: "platform";
164
+ };
165
+ readonly github: {
166
+ readonly description: "Build bots that respond to pull request and issue comment threads.";
167
+ readonly env: {
168
+ readonly credentialModes: readonly [{
169
+ readonly label: "Personal access token";
170
+ readonly vars: readonly [EnvVar];
171
+ }, {
172
+ readonly label: "GitHub App";
173
+ readonly vars: readonly [EnvVar, EnvVar];
174
+ }];
175
+ readonly optional: readonly [EnvVar, EnvVar, EnvVar];
176
+ readonly required: readonly [EnvVar];
177
+ };
178
+ readonly factoryExport: "createGitHubAdapter";
179
+ readonly group: "official";
180
+ readonly name: "GitHub";
181
+ readonly packageName: "@chat-adapter/github";
182
+ readonly peerDeps: readonly ["@octokit/auth-app", "@octokit/rest"];
183
+ readonly slug: "github";
184
+ readonly type: "platform";
185
+ };
186
+ readonly gchat: {
187
+ readonly description: "Integrate with Google Chat spaces for team collaboration and automated workflows.";
188
+ readonly env: {
189
+ readonly credentialModes: readonly [{
190
+ readonly label: "Service account credentials";
191
+ readonly vars: readonly [EnvVar];
192
+ }, {
193
+ readonly label: "Application Default Credentials";
194
+ readonly vars: readonly [EnvVar];
195
+ }];
196
+ readonly optional: readonly [EnvVar, EnvVar, EnvVar, EnvVar, EnvVar, EnvVar];
197
+ };
198
+ readonly factoryExport: "createGoogleChatAdapter";
199
+ readonly group: "official";
200
+ readonly name: "Google Chat";
201
+ readonly packageName: "@chat-adapter/gchat";
202
+ readonly peerDeps: readonly ["@googleapis/chat", "@googleapis/workspaceevents"];
203
+ readonly slug: "gchat";
204
+ readonly type: "platform";
205
+ };
206
+ readonly ioredis: {
207
+ readonly description: "Redis state adapter using ioredis with cluster and sentinel support.";
208
+ readonly env: {
209
+ readonly config: readonly ["url or client", "keyPrefix"];
210
+ readonly notes: "Either a Redis URL or an existing ioredis client is required.";
211
+ };
212
+ readonly factoryExport: "createIoRedisState";
213
+ readonly group: "official";
214
+ readonly name: "ioredis";
215
+ readonly packageName: "@chat-adapter/state-ioredis";
216
+ readonly peerDeps: readonly ["ioredis"];
217
+ readonly slug: "ioredis";
218
+ readonly type: "state";
219
+ };
220
+ readonly kapso: {
221
+ readonly description: "Kapso-first WhatsApp adapter for Chat SDK with signed Kapso webhooks, WhatsApp replies, buttons, media, reactions, and conversation history.";
222
+ readonly env: {
223
+ readonly config: readonly ["client", "verifyWebhookSignatures", "appSecret", "webhookVerifyToken", "historyFields", "cacheSize", "logger", "debug"];
224
+ readonly optional: readonly [EnvVar, EnvVar, EnvVar, EnvVar];
225
+ readonly required: readonly [EnvVar];
226
+ };
227
+ readonly factoryExport: "createKapsoAdapter";
228
+ readonly group: "vendor-official";
229
+ readonly name: "Kapso";
230
+ readonly packageName: "@kapso/chat-adapter";
231
+ readonly peerDeps: readonly [];
232
+ readonly slug: "kapso";
233
+ readonly type: "platform";
234
+ };
235
+ readonly lark: {
236
+ readonly description: "Lark / Feishu adapter for Chat SDK with native cardkit streaming, interactive cards, and reactions.";
237
+ readonly env: {
238
+ readonly optional: readonly [EnvVar];
239
+ readonly required: readonly [EnvVar, EnvVar];
240
+ };
241
+ readonly factoryExport: "createLarkAdapter";
242
+ readonly group: "vendor-official";
243
+ readonly name: "Lark / Feishu";
244
+ readonly packageName: "@larksuite/vercel-chat-adapter";
245
+ readonly peerDeps: readonly [];
246
+ readonly slug: "lark";
247
+ readonly type: "platform";
248
+ };
249
+ readonly linear: {
250
+ readonly description: "Automate Linear issue comment threads with bot responses and workflows.";
251
+ readonly env: {
252
+ readonly credentialModes: readonly [{
253
+ readonly label: "Personal API key";
254
+ readonly vars: readonly [EnvVar];
255
+ }, {
256
+ readonly label: "Access token";
257
+ readonly vars: readonly [EnvVar];
258
+ }, {
259
+ readonly label: "Client credentials";
260
+ readonly vars: readonly [EnvVar, EnvVar];
261
+ }, {
262
+ readonly label: "OAuth app";
263
+ readonly vars: readonly [EnvVar, EnvVar];
264
+ }];
265
+ readonly optional: readonly [EnvVar, EnvVar, EnvVar, EnvVar];
266
+ readonly required: readonly [EnvVar];
267
+ };
268
+ readonly factoryExport: "createLinearAdapter";
269
+ readonly group: "official";
270
+ readonly name: "Linear";
271
+ readonly packageName: "@chat-adapter/linear";
272
+ readonly peerDeps: readonly ["@linear/sdk"];
273
+ readonly slug: "linear";
274
+ readonly type: "platform";
275
+ };
276
+ readonly liveblocks: {
277
+ readonly description: "Liveblocks Comments adapter for building conversational bots on top of Liveblocks rooms, threads, and comments.";
278
+ readonly env: {
279
+ readonly config: readonly ["botUserId", "botUserName", "resolveUsers", "resolveGroupsInfo"];
280
+ readonly required: readonly [EnvVar, EnvVar];
281
+ };
282
+ readonly factoryExport: "createLiveblocksAdapter";
283
+ readonly group: "vendor-official";
284
+ readonly name: "Liveblocks";
285
+ readonly packageName: "@liveblocks/chat-sdk-adapter";
286
+ readonly peerDeps: readonly [];
287
+ readonly slug: "liveblocks";
288
+ readonly type: "platform";
289
+ };
290
+ readonly matrix: {
291
+ readonly description: "Matrix adapter for Chat SDK, built and maintained by Beeper.";
292
+ readonly env: {
293
+ readonly config: readonly ["recoveryKey", "commandPrefix", "roomAllowlist", "inviteAutoJoin", "e2ee", "persistence"];
294
+ readonly credentialModes: readonly [{
295
+ readonly label: "Access token";
296
+ readonly vars: readonly [EnvVar, EnvVar];
297
+ }, {
298
+ readonly label: "Username and password";
299
+ readonly vars: readonly [EnvVar, EnvVar, EnvVar];
300
+ }];
301
+ readonly optional: readonly [EnvVar, EnvVar, EnvVar, EnvVar, EnvVar, EnvVar, EnvVar, EnvVar];
302
+ };
303
+ readonly factoryExport: "createMatrixAdapter";
304
+ readonly group: "vendor-official";
305
+ readonly name: "Beeper Matrix";
306
+ readonly packageName: "@beeper/chat-adapter-matrix";
307
+ readonly peerDeps: readonly [];
308
+ readonly slug: "matrix";
309
+ readonly type: "platform";
310
+ };
311
+ readonly memory: {
312
+ readonly description: "In-memory state adapter for development and testing environments.";
313
+ readonly env: {
314
+ readonly notes: "No environment variables are required. State is kept in the current process.";
315
+ };
316
+ readonly factoryExport: "createMemoryState";
317
+ readonly group: "official";
318
+ readonly name: "Memory";
319
+ readonly packageName: "@chat-adapter/state-memory";
320
+ readonly peerDeps: readonly [];
321
+ readonly slug: "memory";
322
+ readonly type: "state";
323
+ };
324
+ readonly messenger: {
325
+ readonly description: "Build bots for Facebook Messenger with support for templates, buttons, reactions, and postbacks.";
326
+ readonly env: {
327
+ readonly config: readonly ["apiVersion", "userName"];
328
+ readonly required: readonly [EnvVar, EnvVar, EnvVar];
329
+ };
330
+ readonly factoryExport: "createMessengerAdapter";
331
+ readonly group: "official";
332
+ readonly name: "Messenger";
333
+ readonly packageName: "@chat-adapter/messenger";
334
+ readonly peerDeps: readonly [];
335
+ readonly slug: "messenger";
336
+ readonly type: "platform";
337
+ };
338
+ readonly postgres: {
339
+ readonly description: "Production state adapter using PostgreSQL for persistence and distributed locking.";
340
+ readonly env: {
341
+ readonly config: readonly ["client", "keyPrefix", "schemaName"];
342
+ readonly credentialModes: readonly [{
343
+ readonly label: "Connection URL";
344
+ readonly vars: readonly [EnvVar];
345
+ }, {
346
+ readonly label: "Existing client";
347
+ readonly vars: readonly [];
348
+ }];
349
+ };
350
+ readonly factoryExport: "createPostgresState";
351
+ readonly group: "official";
352
+ readonly name: "PostgreSQL";
353
+ readonly packageName: "@chat-adapter/state-pg";
354
+ readonly peerDeps: readonly ["pg"];
355
+ readonly slug: "postgres";
356
+ readonly type: "state";
357
+ };
358
+ readonly redis: {
359
+ readonly description: "Production-ready state adapter using Redis for persistence and distributed locking.";
360
+ readonly env: {
361
+ readonly config: readonly ["client", "keyPrefix"];
362
+ readonly credentialModes: readonly [{
363
+ readonly label: "Connection URL";
364
+ readonly vars: readonly [EnvVar];
365
+ }, {
366
+ readonly label: "Existing client";
367
+ readonly vars: readonly [];
368
+ }];
369
+ };
370
+ readonly factoryExport: "createRedisState";
371
+ readonly group: "official";
372
+ readonly name: "Redis";
373
+ readonly packageName: "@chat-adapter/state-redis";
374
+ readonly peerDeps: readonly ["redis"];
375
+ readonly slug: "redis";
376
+ readonly type: "state";
377
+ };
378
+ readonly resend: {
379
+ readonly description: "Bidirectional email adapter for Chat SDK with threading, rich HTML emails, and attachment support via Resend.";
380
+ readonly env: {
381
+ readonly config: readonly ["fromAddress", "fromName"];
382
+ readonly required: readonly [EnvVar, EnvVar];
383
+ };
384
+ readonly factoryExport: "createResendAdapter";
385
+ readonly group: "vendor-official";
386
+ readonly name: "Resend";
387
+ readonly packageName: "@resend/chat-sdk-adapter";
388
+ readonly peerDeps: readonly ["@chat-adapter/shared"];
389
+ readonly slug: "resend";
390
+ readonly type: "platform";
391
+ };
392
+ readonly sendblue: {
393
+ readonly description: "iMessage, SMS, and RCS adapter for Chat SDK, built and maintained by Sendblue.";
394
+ readonly env: {
395
+ readonly config: readonly ["webhookSecretHeader", "allowedServices"];
396
+ readonly optional: readonly [EnvVar, EnvVar];
397
+ readonly required: readonly [EnvVar, EnvVar, EnvVar];
398
+ };
399
+ readonly factoryExport: "createSendblueAdapter";
400
+ readonly group: "vendor-official";
401
+ readonly name: "Sendblue";
402
+ readonly packageName: "chat-adapter-sendblue";
403
+ readonly peerDeps: readonly [];
404
+ readonly slug: "sendblue";
405
+ readonly type: "platform";
406
+ };
407
+ readonly slack: {
408
+ readonly description: "Build bots for Slack workspaces with full support for threads, reactions, and interactive messages.";
409
+ readonly env: {
410
+ readonly credentialModes: readonly [{
411
+ readonly label: "Single workspace bot token";
412
+ readonly vars: readonly [EnvVar, EnvVar];
413
+ }, {
414
+ readonly label: "Multi-workspace OAuth";
415
+ readonly vars: readonly [EnvVar, EnvVar, EnvVar];
416
+ }];
417
+ readonly optional: readonly [EnvVar, EnvVar, EnvVar, EnvVar];
418
+ };
419
+ readonly factoryExport: "createSlackAdapter";
420
+ readonly group: "official";
421
+ readonly name: "Slack";
422
+ readonly packageName: "@chat-adapter/slack";
423
+ readonly peerDeps: readonly ["@slack/socket-mode", "@slack/web-api"];
424
+ readonly slug: "slack";
425
+ readonly type: "platform";
426
+ };
427
+ readonly teams: {
428
+ readonly description: "Deploy bots to Microsoft Teams with adaptive cards, mentions, and conversation threading.";
429
+ readonly env: {
430
+ readonly credentialModes: readonly [{
431
+ readonly label: "Bot Framework client secret";
432
+ readonly vars: readonly [EnvVar, EnvVar];
433
+ }];
434
+ readonly optional: readonly [EnvVar, EnvVar];
435
+ };
436
+ readonly factoryExport: "createTeamsAdapter";
437
+ readonly group: "official";
438
+ readonly name: "Microsoft Teams";
439
+ readonly packageName: "@chat-adapter/teams";
440
+ readonly peerDeps: readonly ["@microsoft/teams.api", "@microsoft/teams.apps", "@microsoft/teams.cards", "@microsoft/teams.graph-endpoints"];
441
+ readonly slug: "teams";
442
+ readonly type: "platform";
443
+ };
444
+ readonly telegram: {
445
+ readonly description: "Connect to Telegram with support for groups, channels, and inline keyboards.";
446
+ readonly env: {
447
+ readonly optional: readonly [EnvVar, EnvVar, EnvVar];
448
+ readonly required: readonly [EnvVar];
449
+ };
450
+ readonly factoryExport: "createTelegramAdapter";
451
+ readonly group: "official";
452
+ readonly name: "Telegram";
453
+ readonly packageName: "@chat-adapter/telegram";
454
+ readonly peerDeps: readonly [];
455
+ readonly slug: "telegram";
456
+ readonly type: "platform";
457
+ };
458
+ readonly twilio: {
459
+ readonly description: "Build SMS and MMS bots with Twilio Messaging webhooks and the Messages API.";
460
+ readonly env: {
461
+ readonly config: readonly ["webhookUrl", "webhookVerifier", "statusCallbackUrl", "apiUrl"];
462
+ readonly credentialModes: readonly [{
463
+ readonly label: "Account credentials";
464
+ readonly vars: readonly [EnvVar, EnvVar];
465
+ }];
466
+ readonly optional: readonly [EnvVar, EnvVar];
467
+ };
468
+ readonly factoryExport: "createTwilioAdapter";
469
+ readonly group: "official";
470
+ readonly name: "Twilio";
471
+ readonly packageName: "@chat-adapter/twilio";
472
+ readonly peerDeps: readonly [];
473
+ readonly slug: "twilio";
474
+ readonly type: "platform";
475
+ };
476
+ readonly velt: {
477
+ readonly description: "Velt Comments adapter for building bots that read and respond in Velt comment threads on documents, text editors, and canvases.";
478
+ readonly env: {
479
+ readonly config: readonly ["botUserId", "botUserName", "webhookVersion", "resolveUsers", "selfHostingConfig"];
480
+ readonly optional: readonly [EnvVar, EnvVar];
481
+ readonly required: readonly [EnvVar, EnvVar];
482
+ };
483
+ readonly factoryExport: "createVeltAdapter";
484
+ readonly group: "vendor-official";
485
+ readonly name: "Velt";
486
+ readonly packageName: "@veltdev/chat-sdk-adapter";
487
+ readonly peerDeps: readonly [];
488
+ readonly slug: "velt";
489
+ readonly type: "platform";
490
+ };
491
+ readonly web: {
492
+ readonly description: "Serve a browser chat UI from the same bot using the AI SDK useChat protocol — works out of the box with @ai-sdk/react and ai-elements.";
493
+ readonly env: {
494
+ readonly config: readonly ["userName", "getUser", "persistMessageHistory", "threadIdFor"];
495
+ readonly notes: "The Web adapter delegates browser request authentication to the getUser config function.";
496
+ };
497
+ readonly factoryExport: "createWebAdapter";
498
+ readonly group: "official";
499
+ readonly name: "Web";
500
+ readonly packageName: "@chat-adapter/web";
501
+ readonly peerDeps: readonly [];
502
+ readonly slug: "web";
503
+ readonly type: "platform";
504
+ };
505
+ readonly whatsapp: {
506
+ readonly description: "Connect to WhatsApp Business Cloud for customer messaging and automated conversations.";
507
+ readonly env: {
508
+ readonly optional: readonly [EnvVar, EnvVar];
509
+ readonly required: readonly [EnvVar, EnvVar, EnvVar, EnvVar];
510
+ };
511
+ readonly factoryExport: "createWhatsAppAdapter";
512
+ readonly group: "official";
513
+ readonly name: "WhatsApp Business Cloud";
514
+ readonly packageName: "@chat-adapter/whatsapp";
515
+ readonly peerDeps: readonly [];
516
+ readonly slug: "whatsapp";
517
+ readonly type: "platform";
518
+ };
519
+ readonly zernio: {
520
+ readonly description: "Unified social media DM adapter covering Instagram, Facebook, Telegram, WhatsApp, X/Twitter, Bluesky, and Reddit through a single integration.";
521
+ readonly env: {
522
+ readonly optional: readonly [EnvVar, EnvVar, EnvVar];
523
+ readonly required: readonly [EnvVar];
524
+ };
525
+ readonly factoryExport: "createZernioAdapter";
526
+ readonly group: "vendor-official";
527
+ readonly name: "Zernio";
528
+ readonly packageName: "@zernio/chat-sdk-adapter";
529
+ readonly peerDeps: readonly [];
530
+ readonly slug: "zernio";
531
+ readonly type: "platform";
532
+ };
533
+ };
534
+ /**
535
+ * Slug for any adapter in the catalog.
536
+ */
537
+ type AdapterSlug = keyof typeof ADAPTERS;
538
+ /**
539
+ * All cataloged adapter slugs, sorted alphabetically.
540
+ */
541
+ declare const ADAPTER_NAMES: AdapterSlug[];
542
+ /**
543
+ * Return every cataloged platform adapter sorted by slug.
544
+ *
545
+ * @returns Catalog entries whose {@link CatalogAdapter.type} is `"platform"`.
546
+ */
547
+ declare const listPlatformAdapters: () => readonly CatalogAdapter[];
548
+ /**
549
+ * Return every cataloged state adapter sorted by slug.
550
+ *
551
+ * @returns Catalog entries whose {@link CatalogAdapter.type} is `"state"`.
552
+ */
553
+ declare const listStateAdapters: () => readonly CatalogAdapter[];
554
+ /**
555
+ * Check whether a string is a known adapter slug.
556
+ *
557
+ * @param slug - Candidate adapter slug.
558
+ * @returns Whether the slug exists in {@link ADAPTERS}.
559
+ *
560
+ * @example
561
+ * ```typescript
562
+ * if (isAdapterSlug(input)) {
563
+ * const adapter = getAdapter(input);
564
+ * }
565
+ * ```
566
+ */
567
+ declare const isAdapterSlug: (slug: string) => slug is AdapterSlug;
568
+ /**
569
+ * Look up a catalog entry by slug.
570
+ *
571
+ * @param slug - Adapter slug to look up.
572
+ * @returns The catalog entry for known slugs, otherwise `undefined`.
573
+ */
574
+ declare function getAdapter(slug: AdapterSlug): CatalogAdapter;
575
+ declare function getAdapter(slug: string): CatalogAdapter | undefined;
576
+ /**
577
+ * Flatten every environment variable referenced by an adapter.
578
+ *
579
+ * Variables are returned in declaration order and de-duplicated by canonical
580
+ * key. Unknown slugs return an empty array.
581
+ *
582
+ * @param slug - Adapter slug to inspect.
583
+ * @returns Environment variables declared by the adapter entry.
584
+ */
585
+ declare const listEnvVars: (slug: string) => readonly EnvVar[];
586
+ /**
587
+ * Return only secret environment variables for an adapter.
588
+ *
589
+ * @param slug - Adapter slug to inspect.
590
+ * @returns Secret variables declared by the adapter entry.
591
+ */
592
+ declare const getSecretEnvVars: (slug: string) => readonly EnvVar[];
593
+
594
+ export { ADAPTERS, ADAPTER_NAMES, type AdapterEnvSpec, type AdapterSlug, type CatalogAdapter, type EnvGroup, type EnvVar, getAdapter, getSecretEnvVars, isAdapterSlug, listEnvVars, listPlatformAdapters, listStateAdapters };