Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

fix(docs): disable Sendblue streaming edits (#1874)

vercel-gh-bot-5[bot]6e707ccd9329
diff --git a/apps/docs/lib/integrations/data.ts b/apps/docs/lib/integrations/data.ts
index dbe9b43e9..a5bdffdd4 100644
--- a/apps/docs/lib/integrations/data.ts
+++ b/apps/docs/lib/integrations/data.ts
@@ -650,6 +650,7 @@ export const { bot, channel, send } = chatSdkChannel({
sendblue: createSendblueAdapter(),
},
state: createMemoryState(),
+ streaming: false,
});
bot.onNewMention(async (thread: Thread, message: Message) => {
diff --git a/apps/docs/registry/channels/chat-sdk-sendblue.ts b/apps/docs/registry/channels/chat-sdk-sendblue.ts
index 7186547c8..6fb1e8bfe 100644
--- a/apps/docs/registry/channels/chat-sdk-sendblue.ts
+++ b/apps/docs/registry/channels/chat-sdk-sendblue.ts
@@ -9,6 +9,7 @@ export const { bot, channel, send } = chatSdkChannel({
sendblue: createSendblueAdapter(),
},
state: createMemoryState(),
+ streaming: false,
});
bot.onNewMention(async (thread: Thread, message: Message) => {
diff --git a/apps/docs/scripts/validate-channel-registry.ts b/apps/docs/scripts/validate-channel-registry.ts
index 8718b298b..f3f780a4e 100644
--- a/apps/docs/scripts/validate-channel-registry.ts
+++ b/apps/docs/scripts/validate-channel-registry.ts
@@ -1,4 +1,4 @@
-import { access, readFile } from "node:fs/promises";
+import { readFile } from "node:fs/promises";
import { join } from "node:path";
import { channelEntries } from "@eve/catalog";
@@ -87,6 +87,8 @@ const targetSlugsByCatalogSlug: Readonly<Record<string, string>> = {
"chat-sdk-resend": "resend",
};
+const nonStreamingCatalogSlugs = new Set(["chat-sdk-sendblue"]);
+
const docsRoot = join(import.meta.dirname, "..");
const registry = JSON.parse(await readFile(join(docsRoot, "registry.json"), "utf8")) as Registry;
const items = registry.items.filter((item) => item.name.startsWith("channel/"));
@@ -160,7 +162,10 @@ for (const [index, item] of items.entries()) {
`Registry item "${item.name}" must write ${expectedPath} to ${expectedTarget}.`,
);
}
- await access(join(docsRoot, expectedPath));
+ const source = await readFile(join(docsRoot, expectedPath), "utf8");
+ if (nonStreamingCatalogSlugs.has(entry.slug) && !source.includes("streaming: false")) {
+ throw new Error(`Registry item "${item.name}" must disable unsupported streaming edits.`);
+ }
const adapterDependency = adapterDependenciesByCatalogSlug[entry.slug];
if (entry.slug.startsWith("chat-sdk-") && adapterDependency === undefined) {