/** * OrgX Clawdbot Plugin — Main Entry Point * * This is the canonical entry point for the OrgX plugin. * It exports the plugin interface for Clawdbot consumption. * * Registers: * - Background sync service ("orgx-sync") * - MCP Tools (orgx_status, orgx_sync, orgx_spawn_check, etc.) * - CLI command ("orgx" with status/sync subcommands) * - HTTP handler for dashboard + API proxy */ import type { OrgXConfig } from "./types.js"; export type { OrgXConfig, OrgSnapshot } from "./types.js"; export { OrgXClient } from "./api.js"; export interface PluginAPI { config?: { plugins?: { entries?: { orgx?: { config?: Partial; }; "openclaw-plugin"?: { config?: Partial; }; }; }; }; log?: { info?: (msg: string, meta?: Record) => void; warn?: (msg: string, meta?: Record) => void; debug?: (msg: string, meta?: Record) => void; }; registerService: (service: { id: string; start: () => Promise; stop: () => Promise; }) => void; registerTool: (tool: { name: string; description: string; parameters: Record; execute: (callId: string, params?: any) => Promise; }, options?: { optional?: boolean; }) => void; registerCli: (fn: (ctx: { program: any; }) => void, options?: { commands?: string[]; }) => void; registerHttpRoute?: (route: { path: string; auth: "gateway" | "plugin"; match?: "exact" | "prefix"; handler: unknown; replaceExisting?: boolean; }) => void; registerHttpHandler?: (handler: unknown) => void; } export interface ToolResult { content: Array<{ type: "text"; text: string; }>; } /** * Plugin registration function. * Called by Clawdbot when the plugin is loaded. * * @param api - The Clawdbot plugin API */ export default function register(api: PluginAPI): void; export { register };