mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
* TypeScript: add extensions to tsconfig and fix type errors - Add extensions/**/* to tsconfig.json includes - Export ProviderAuthResult, AnyAgentTool from plugin-sdk - Fix optional chaining for messageActions across channels - Add missing type imports (MSTeamsConfig, GroupPolicy, etc.) - Add type annotations for provider auth handlers - Fix undici/fetch type compatibility in zalo proxy - Correct ChannelAccountSnapshot property usage - Add type casts for tool registrations - Extract usage view styles and types to separate files * TypeScript: fix optional debug calls and handleAction guards
32 lines
1.2 KiB
TypeScript
32 lines
1.2 KiB
TypeScript
import type { AnyAgentTool, OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
|
|
import { zalouserDock, zalouserPlugin } from "./src/channel.js";
|
|
import { setZalouserRuntime } from "./src/runtime.js";
|
|
import { ZalouserToolSchema, executeZalouserTool } from "./src/tool.js";
|
|
|
|
const plugin = {
|
|
id: "zalouser",
|
|
name: "Zalo Personal",
|
|
description: "Zalo personal account messaging via zca-cli",
|
|
configSchema: emptyPluginConfigSchema(),
|
|
register(api: OpenClawPluginApi) {
|
|
setZalouserRuntime(api.runtime);
|
|
// Register channel plugin (for onboarding & gateway)
|
|
api.registerChannel({ plugin: zalouserPlugin, dock: zalouserDock });
|
|
|
|
// Register agent tool
|
|
api.registerTool({
|
|
name: "zalouser",
|
|
label: "Zalo Personal",
|
|
description:
|
|
"Send messages and access data via Zalo personal account. " +
|
|
"Actions: send (text message), image (send image URL), link (send link), " +
|
|
"friends (list/search friends), groups (list groups), me (profile info), status (auth check).",
|
|
parameters: ZalouserToolSchema,
|
|
execute: executeZalouserTool,
|
|
} as AnyAgentTool);
|
|
},
|
|
};
|
|
|
|
export default plugin;
|