feat: add onboarding plugin install flow

This commit is contained in:
Peter Steinberger
2026-01-15 05:03:56 +00:00
parent 5abe3c2145
commit 568cc368ae
7 changed files with 478 additions and 12 deletions

View File

@@ -0,0 +1,43 @@
import type { ChannelMeta } from "./types.js";
export type ChannelPluginCatalogEntry = {
id: string;
meta: ChannelMeta;
install: {
npmSpec: string;
localPath?: string;
};
};
const CATALOG: ChannelPluginCatalogEntry[] = [
{
id: "zalo",
meta: {
id: "zalo",
label: "Zalo",
selectionLabel: "Zalo (Bot API)",
docsPath: "/channels/zalo",
docsLabel: "zalo",
blurb: "Vietnam-focused messaging platform with Bot API.",
aliases: ["zl"],
order: 80,
quickstartAllowFrom: true,
},
install: {
npmSpec: "@clawdbot/zalo",
localPath: "extensions/zalo",
},
},
];
export function listChannelPluginCatalogEntries(): ChannelPluginCatalogEntry[] {
return [...CATALOG];
}
export function getChannelPluginCatalogEntry(
id: string,
): ChannelPluginCatalogEntry | undefined {
const trimmed = id.trim();
if (!trimmed) return undefined;
return CATALOG.find((entry) => entry.id === trimmed);
}