import type { FetchFunction } from './types.js'; interface ToolResult { readonly content: ReadonlyArray<{ readonly text: string; readonly type: string; }>; readonly isError?: true; } interface CommandContext { readonly args?: string; readonly commandBody?: string; readonly senderId?: string; } interface BeforeToolCallEvent { readonly params?: unknown; readonly toolName?: string; } interface ToolApprovalRequest { readonly allowedDecisions?: readonly ['allow-once', 'deny']; readonly description: string; readonly pluginId?: string; readonly severity?: 'critical' | 'info' | 'warning'; readonly timeoutBehavior?: 'allow' | 'deny'; readonly timeoutMs?: number; readonly title: string; } interface BeforeToolCallResult { readonly requireApproval?: ToolApprovalRequest; } type BeforeToolCallHandler = (event: BeforeToolCallEvent) => BeforeToolCallResult | Promise | undefined; interface OpenClawApi { readonly logger: { readonly debug?: (message: string) => void; readonly error: (message: string) => void; readonly info: (message: string) => void; readonly warn: (message: string) => void; }; readonly pluginConfig?: Readonly>; readonly registerCommand: (options: { readonly acceptsArgs?: boolean; readonly description: string; readonly handler: (context: CommandContext) => Promise<{ readonly text: string; }>; readonly name: string; }) => void; readonly registerService: (options: { readonly id: string; readonly start: (context?: unknown) => void; readonly stop?: (context?: unknown) => void; }) => void; readonly registerTool: (tool: { readonly description: string; readonly execute: (toolCallId: string, params: unknown) => Promise; readonly name: string; readonly parameters: unknown; }, options?: { readonly name?: string; readonly optional?: boolean; }) => void; readonly on?: (name: 'before_tool_call', handler: BeforeToolCallHandler, options?: { readonly priority?: number; }) => void; readonly registerHook?: (name: 'before_tool_call', handler: BeforeToolCallHandler, options?: { readonly priority?: number; }) => void; } declare function register(api: OpenClawApi, fetchFunction?: FetchFunction): void; declare const plugin: { configSchema: { additionalProperties: boolean; properties: { apiKey: { description: string; minLength: number; type: string; "x-sensitive": boolean; }; baseUrl: { default: string; description: string; pattern: string; type: string; }; pollingEnabled: { default: boolean; type: string; }; pollingInterval: { default: number; description: string; minimum: number; type: string; }; tempoSigningKey: { description: string; pattern: string; type: string; "x-sensitive": boolean; }; }; type: string; }; description: string; id: string; name: string; register: typeof register; }; export { register }; export default plugin;