/** * Minimal type declarations for openclaw peer dependency. * Only declares the APIs actually used by this plugin. * * These stubs allow `tsc --noEmit` to pass in environments where * openclaw is not installed (e.g. npm pack / CI). * At runtime, the real openclaw package provides the implementations. */ declare module 'openclaw/plugin-sdk/infra-runtime' { export function resolvePreferredOpenClawTmpDir(): string; } declare module 'openclaw/plugin-sdk/plugin-entry' { export interface OpenClawPluginApi { runtime?: import('openclaw/plugin-sdk/core').PluginRuntime; registerChannel(opts: { plugin: unknown }): void; registerTool(factory: unknown, opts?: { optional?: boolean }): void; registerHook?(hook: unknown): void; registerHttpRoute(params: { path: string; auth: 'gateway' | 'plugin'; match?: 'exact' | 'prefix'; replaceExisting?: boolean; handler: (req: import('node:http').IncomingMessage, res: import('node:http').ServerResponse) => Promise | boolean; }): void; registrationMode?: string; } } declare module 'openclaw/plugin-sdk/channel-config-schema' { export function buildChannelConfigSchema(schema: unknown): unknown; } declare module 'openclaw/plugin-sdk/core' { export interface PluginRuntime { version?: string; channel: { routing: { resolveAgentRoute(params: { cfg: unknown; channel: string; accountId: string; peer: { kind: string; id: string }; }): { agentId?: string; sessionKey?: string; mainSessionKey?: string; }; }; reply: { finalizeInboundContext(ctx: unknown): unknown; createReplyDispatcherWithTyping(opts: { deliver: ( payload: { text?: string; mediaUrl?: string; mediaUrls?: string[] }, meta?: { kind?: string }, ) => Promise; onError?: (err: unknown, info: { kind: string }) => void; }): { dispatcher: unknown; replyOptions: Record; markDispatchIdle: () => void; }; withReplyDispatcher(opts: { dispatcher: unknown; run: () => Promise }): Promise; dispatchReplyFromConfig(opts: { ctx: unknown; cfg: unknown; dispatcher: unknown; replyOptions?: Record; }): Promise; }; session: { resolveStorePath(store: unknown, opts: { agentId: string }): string; recordInboundSession(opts: { storePath: string; sessionKey?: string; ctx: unknown; updateLastRoute?: { sessionKey?: string; channel: string; to: string; accountId: string; }; onRecordError?: (err: unknown) => void; }): Promise; }; }; events: { onAgentEvent(listener: (evt: { sessionKey?: string; stream?: string; data: { phase?: string; partialResult?: unknown; [key: string]: unknown }; [key: string]: unknown; }) => void): () => void; }; } }