mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 03:31:10 +00:00
35 lines
911 B
TypeScript
35 lines
911 B
TypeScript
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: "./api.js",
|
|
exportName: "zalouserPlugin",
|
|
},
|
|
runtime: {
|
|
specifier: "./runtime-api.js",
|
|
exportName: "setZalouserRuntime",
|
|
},
|
|
registerFull(api) {
|
|
api.registerTool((ctx) => createZalouserTool(ctx), { name: "zalouser" });
|
|
},
|
|
});
|