Files
openclaw/extensions/zalouser/index.ts
2026-06-04 21:33:54 -04:00

36 lines
992 B
TypeScript

// Zalouser plugin entrypoint registers its OpenClaw integration.
import {
type AnyAgentTool,
defineBundledChannelEntry,
loadBundledEntryExportSync,
} from "openclaw/plugin-sdk/channel-entry-contract";
function createZalouserTool(context?: unknown): AnyAgentTool {
const createTool = loadBundledEntryExportSync<(context?: unknown) => AnyAgentTool>(
import.meta.url,
{
specifier: "./api.js",
exportName: "createZalouserTool",
},
);
return createTool(context);
}
export default defineBundledChannelEntry({
id: "zalouser",
name: "Zalo Personal",
description: "Zalo personal account messaging via native zca-js integration",
importMetaUrl: import.meta.url,
plugin: {
specifier: "./channel-plugin-api.js",
exportName: "zalouserPlugin",
},
runtime: {
specifier: "./runtime-api.js",
exportName: "setZalouserRuntime",
},
registerFull(api) {
api.registerTool((ctx) => createZalouserTool(ctx), { name: "zalouser" });
},
});