@copilotkit/channels 0.2.0 → 0.2.1-canary.1784916581
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 +25 -0
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
`@copilotkit/channels` is the batteries-included CopilotKit Channels package. One install
|
|
4
4
|
provides the engine, JSX vocabulary, UI primitives, testing API, and every supported adapter.
|
|
5
5
|
|
|
6
|
+
**Channels require a CopilotKit Intelligence connection** (an API key — a free tier
|
|
7
|
+
is available, so this is "connect your Intelligence account," not "pay for it").
|
|
8
|
+
There is no standalone / DIY way to run a Channel: the `CopilotRuntime` starts and
|
|
9
|
+
owns each Channel's lifecycle once Intelligence is configured.
|
|
10
|
+
|
|
6
11
|
## Install
|
|
7
12
|
|
|
8
13
|
```sh
|
|
@@ -23,8 +28,14 @@ Configure TypeScript to use the Channels JSX runtime:
|
|
|
23
28
|
```tsx
|
|
24
29
|
import { createChannel, Message, Section } from "@copilotkit/channels";
|
|
25
30
|
import { slack } from "@copilotkit/channels/slack";
|
|
31
|
+
import {
|
|
32
|
+
CopilotRuntime,
|
|
33
|
+
CopilotKitIntelligence,
|
|
34
|
+
createCopilotRuntimeHandler,
|
|
35
|
+
} from "@copilotkit/runtime/v2";
|
|
26
36
|
|
|
27
37
|
const channel = createChannel({
|
|
38
|
+
name: "support-bot", // project-unique Intelligence Channel name
|
|
28
39
|
adapters: [
|
|
29
40
|
slack({
|
|
30
41
|
botToken: process.env.SLACK_BOT_TOKEN!,
|
|
@@ -40,6 +51,20 @@ channel.onMessage(({ thread, message }) =>
|
|
|
40
51
|
</Message>,
|
|
41
52
|
),
|
|
42
53
|
);
|
|
54
|
+
|
|
55
|
+
// The runtime owns the Channel's lifecycle — there is no `channel.start()`.
|
|
56
|
+
const runtime = new CopilotRuntime({
|
|
57
|
+
intelligence: new CopilotKitIntelligence({
|
|
58
|
+
apiUrl: "https://api.copilotkit.ai",
|
|
59
|
+
wsUrl: "wss://api.copilotkit.ai",
|
|
60
|
+
apiKey: process.env.COPILOTKIT_INTELLIGENCE_API_KEY!, // free tier available
|
|
61
|
+
}),
|
|
62
|
+
identifyUser: async () => ({ id: "support-bot", name: "Support Bot" }),
|
|
63
|
+
channels: [channel],
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const handler = createCopilotRuntimeHandler({ runtime });
|
|
67
|
+
await handler.channels.ready(); // starts the channel; handler.channels.stop() tears it down
|
|
43
68
|
```
|
|
44
69
|
|
|
45
70
|
## Adapter entry points
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/channels",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1-canary.1784916581",
|
|
4
4
|
"description": "Batteries-included CopilotKit Channels package with the core engine, JSX UI, and every supported platform adapter.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -93,14 +93,14 @@
|
|
|
93
93
|
"dist"
|
|
94
94
|
],
|
|
95
95
|
"dependencies": {
|
|
96
|
-
"@copilotkit/channels-core": "0.2.
|
|
97
|
-
"@copilotkit/channels-ui": "0.2.
|
|
98
|
-
"@copilotkit/channels-
|
|
99
|
-
"@copilotkit/channels-
|
|
100
|
-
"@copilotkit/channels-
|
|
101
|
-
"@copilotkit/channels-
|
|
102
|
-
"@copilotkit/channels-telegram": "0.2.
|
|
103
|
-
"@copilotkit/channels-whatsapp": "0.2.
|
|
96
|
+
"@copilotkit/channels-core": "0.2.1-canary.1784916581",
|
|
97
|
+
"@copilotkit/channels-ui": "0.2.1-canary.1784916581",
|
|
98
|
+
"@copilotkit/channels-teams": "0.2.1-canary.1784916581",
|
|
99
|
+
"@copilotkit/channels-discord": "0.2.1-canary.1784916581",
|
|
100
|
+
"@copilotkit/channels-intelligence": "0.2.1-canary.1784916581",
|
|
101
|
+
"@copilotkit/channels-slack": "0.2.1-canary.1784916581",
|
|
102
|
+
"@copilotkit/channels-telegram": "0.2.1-canary.1784916581",
|
|
103
|
+
"@copilotkit/channels-whatsapp": "0.2.1-canary.1784916581"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
106
|
"@types/node": "^22.10.0",
|