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 +31 -5
- package/dist/adapters/index.d.ts +594 -0
- package/dist/adapters/index.js +751 -0
- package/dist/ai/index.d.ts +3 -3
- package/dist/{chat-BPjXsoIl.d.ts → chat-BjhJs_sP.d.ts} +2 -2
- package/dist/{chunk-V25FKIIL.js → chunk-LNXHNIFE.js} +2 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/{jsx-runtime-CnDs8rPr.d.ts → jsx-runtime-CzthIo1o.d.ts} +5 -0
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/jsx-runtime.js +1 -1
- package/docs/adapters.mdx +140 -127
- package/docs/ai/index.mdx +2 -2
- package/docs/api/cards.mdx +8 -1
- package/docs/api/message.mdx +5 -1
- package/docs/cards.mdx +9 -1
- package/docs/concurrency.mdx +1 -1
- package/docs/contributing/building.mdx +6 -0
- package/docs/conversation-history.mdx +1 -1
- package/docs/create-chat-sdk.mdx +143 -0
- package/docs/error-handling.mdx +1 -1
- package/docs/getting-started.mdx +4 -4
- package/docs/index.mdx +1 -1
- package/docs/meta.json +4 -1
- package/docs/platform-adapters.mdx +148 -0
- package/docs/slash-commands.mdx +6 -1
- package/docs/streaming.mdx +1 -1
- package/docs/teams-primitives.mdx +255 -0
- package/docs/testing.mdx +1 -1
- package/docs/threads-messages-channels.mdx +2 -2
- package/docs/usage.mdx +3 -3
- package/package.json +24 -5
- /package/docs/{state.mdx → state-adapters.mdx} +0 -0
|
@@ -83,7 +83,7 @@ await thread.startTyping();
|
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
<Callout type="info">
|
|
86
|
-
Not all platforms support typing indicators. The call is a no-op on unsupported platforms. See the [adapter feature matrix](/docs/adapters) for details.
|
|
86
|
+
Not all platforms support typing indicators. The call is a no-op on unsupported platforms. See the [adapter feature matrix](/docs/platform-adapters) for details.
|
|
87
87
|
</Callout>
|
|
88
88
|
|
|
89
89
|
### Message history
|
|
@@ -149,7 +149,7 @@ await scheduled.cancel();
|
|
|
149
149
|
```
|
|
150
150
|
|
|
151
151
|
<Callout type="info">
|
|
152
|
-
Scheduled messages are currently only supported by the Slack adapter. Other adapters throw `NotImplementedError`. See the [feature matrix](/docs/adapters) for details.
|
|
152
|
+
Scheduled messages are currently only supported by the Slack adapter. Other adapters throw `NotImplementedError`. See the [feature matrix](/docs/platform-adapters) for details.
|
|
153
153
|
</Callout>
|
|
154
154
|
|
|
155
155
|
## Messages
|
package/docs/usage.mdx
CHANGED
|
@@ -7,7 +7,7 @@ prerequisites:
|
|
|
7
7
|
related:
|
|
8
8
|
- /docs/handling-events
|
|
9
9
|
- /docs/adapters
|
|
10
|
-
- /docs/state
|
|
10
|
+
- /docs/state-adapters
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
The `Chat` class is the main entry point for your bot. It coordinates adapters, routes events to your handlers, and manages thread state.
|
|
@@ -34,10 +34,10 @@ bot.onNewMention(async (thread) => {
|
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
<Callout type="info">
|
|
37
|
-
This example uses Redis. Chat SDK also supports [PostgreSQL](/adapters/official/postgres) and [ioredis](/adapters/official/ioredis) as production state adapters. See [State Adapters](/docs/state) for all options.
|
|
37
|
+
This example uses Redis. Chat SDK also supports [PostgreSQL](/adapters/official/postgres) and [ioredis](/adapters/official/ioredis) as production state adapters. See [State Adapters](/docs/state-adapters) for all options.
|
|
38
38
|
</Callout>
|
|
39
39
|
|
|
40
|
-
Each adapter factory auto-detects credentials from environment variables (`SLACK_BOT_TOKEN`, `SLACK_SIGNING_SECRET`, `REDIS_URL`, etc.), so you can get started with zero config. Pass explicit values to override.
|
|
40
|
+
Each adapter factory auto-detects credentials from environment variables (`SLACK_BOT_TOKEN`, `SLACK_SIGNING_SECRET`, `REDIS_URL`, etc.), so you can get started with zero config. Pass explicit values to override. For setup UIs and build scripts, the [`chat/adapters` catalog](/docs/adapters#adapter-catalog-chatadapters) lists official and vendor-official adapter env specs without importing adapter packages.
|
|
41
41
|
|
|
42
42
|
## Multiple adapters
|
|
43
43
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chat",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.31.0",
|
|
4
|
+
"description": "Chat SDK — universal TypeScript toolkit for building multi-platform chat bots and AI agents on Slack, Teams, Google Chat, Discord, WhatsApp, and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20"
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"types": "./dist/ai/index.d.ts",
|
|
19
19
|
"import": "./dist/ai/index.js"
|
|
20
20
|
},
|
|
21
|
+
"./adapters": {
|
|
22
|
+
"types": "./dist/adapters/index.d.ts",
|
|
23
|
+
"import": "./dist/adapters/index.js"
|
|
24
|
+
},
|
|
21
25
|
"./jsx-runtime": {
|
|
22
26
|
"types": "./dist/jsx-runtime.d.ts",
|
|
23
27
|
"import": "./dist/jsx-runtime.js"
|
|
@@ -65,9 +69,9 @@
|
|
|
65
69
|
"repository": {
|
|
66
70
|
"type": "git",
|
|
67
71
|
"url": "git+https://github.com/vercel/chat.git",
|
|
68
|
-
"directory": "packages/chat
|
|
72
|
+
"directory": "packages/chat"
|
|
69
73
|
},
|
|
70
|
-
"homepage": "https://
|
|
74
|
+
"homepage": "https://chat-sdk.dev/docs",
|
|
71
75
|
"bugs": {
|
|
72
76
|
"url": "https://github.com/vercel/chat/issues"
|
|
73
77
|
},
|
|
@@ -76,11 +80,26 @@
|
|
|
76
80
|
},
|
|
77
81
|
"keywords": [
|
|
78
82
|
"chat",
|
|
83
|
+
"chat-sdk",
|
|
84
|
+
"chatbot",
|
|
85
|
+
"chat-bot",
|
|
86
|
+
"bot",
|
|
87
|
+
"bot-framework",
|
|
88
|
+
"messaging",
|
|
89
|
+
"multi-platform",
|
|
79
90
|
"slack",
|
|
80
91
|
"teams",
|
|
92
|
+
"microsoft-teams",
|
|
81
93
|
"discord",
|
|
82
94
|
"google-chat",
|
|
83
|
-
"
|
|
95
|
+
"telegram",
|
|
96
|
+
"whatsapp",
|
|
97
|
+
"github",
|
|
98
|
+
"webhook",
|
|
99
|
+
"ai-agent",
|
|
100
|
+
"ai-sdk",
|
|
101
|
+
"typescript",
|
|
102
|
+
"vercel"
|
|
84
103
|
],
|
|
85
104
|
"license": "MIT",
|
|
86
105
|
"scripts": {
|
|
File without changes
|