feat: add onboarding plugin install flow
This commit is contained in:
43
src/channels/plugins/catalog.ts
Normal file
43
src/channels/plugins/catalog.ts
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user