@copilotkit/channels-discord 0.3.0 → 0.4.1-canary.1785344645

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
@@ -63,8 +63,8 @@ bot.onMention(({ thread }) => thread.runAgent());
63
63
  // The runtime owns the channel's lifecycle — there is no `bot.start()`.
64
64
  const runtime = new CopilotRuntime({
65
65
  intelligence: new CopilotKitIntelligence({
66
- apiUrl: "https://api.copilotkit.ai",
67
- wsUrl: "wss://api.copilotkit.ai",
66
+ // apiUrl and wsUrl default to the managed Intelligence platform — override
67
+ // both together only for a self-hosted deployment.
68
68
  apiKey: process.env.COPILOTKIT_INTELLIGENCE_API_KEY!, // free tier available
69
69
  }),
70
70
  identifyUser: async () => ({ id: "support-bot", name: "Support Bot" }),
@@ -19,6 +19,7 @@ export interface DiscordHistoryMessage {
19
19
  */
20
20
  export declare class DiscordConversationStore implements ConversationStore {
21
21
  private deps;
22
+ readonly seedsInboundTurn = true;
22
23
  constructor(deps: {
23
24
  /** Channel history, OLDEST→NEWEST. */
24
25
  fetchHistory: (channelId: string) => Promise<DiscordHistoryMessage[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-store.d.ts","sourceRoot":"","sources":["../src/conversation-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,WAAW,IAAI,cAAc,EAC9B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAEV,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,uEAAuE;AACvE,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,oBAA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AE,MAAM,KAAK,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;QACtE,6DAA6D;QAC7D,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,iEAAiE;QACjE,WAAW,CAAC,EAAE,kBAAkB,CAAC;KAClC;IAGH;;;;OAIG;IACG,WAAW,CACf,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,cAAc,EAC5B,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,aAAa,GAC7C,OAAO,CAAC,YAAY,CAAC;IAOxB;;;;;;OAMG;YACW,WAAW;CA+C1B"}
@@ -10,6 +10,7 @@ import { STREAM_PLACEHOLDERS } from "./chunked-message-stream.js";
10
10
  */
11
11
  export class DiscordConversationStore {
12
12
  deps;
13
+ seedsInboundTurn = true;
13
14
  constructor(deps) {
14
15
  this.deps = deps;
15
16
  }
@@ -5,6 +5,13 @@ function fakeAgent() {
5
5
  return { threadId: "", messages: undefined };
6
6
  }
7
7
  describe("DiscordConversationStore", () => {
8
+ it("declares that it seeds the inbound turn", () => {
9
+ const store = new DiscordConversationStore({
10
+ fetchHistory: async () => [],
11
+ botUserId: () => "bot-1",
12
+ });
13
+ expect(store.seedsInboundTurn).toBe(true);
14
+ });
8
15
  it("reconstructs channel history into AG-UI messages each turn", async () => {
9
16
  const pngBytes = new Uint8Array([0x89, 0x50, 0x4e, 0x47]);
10
17
  // A stubbed fetch for buildFileContentParts so no real network happens.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@copilotkit/channels-discord",
3
- "version": "0.3.0",
3
+ "version": "0.4.1-canary.1785344645",
4
4
  "description": "Discord PlatformAdapter for @copilotkit/channels.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,8 +36,8 @@
36
36
  "@ag-ui/client": "0.0.57",
37
37
  "discord.js": "^14.16.0",
38
38
  "zod": "^3.25.76",
39
- "@copilotkit/channels-ui": "^0.3.0",
40
- "@copilotkit/channels-core": "^0.3.0"
39
+ "@copilotkit/channels-core": "^0.4.1-canary.1785344645",
40
+ "@copilotkit/channels-ui": "^0.4.1-canary.1785344645"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^22.10.0",