/** * OpenClaw plugin entry point. * This is the ONLY file in src/ that knows about OpenClaw SDK types. */ import { type SagaStartDeps } from './tool-registrar.js'; import type { AdvanceDeps } from '../coordinator/state.js'; interface SubagentApi { run(req: { sessionKey: string; message: string; model?: string; deliver?: boolean; }): Promise<{ runId: string; }>; waitForRun(req: { runId: string; timeoutMs: number; }): Promise<{ status: string; error?: string; }>; getSessionMessages(req: { sessionKey: string; limit?: number; }): Promise<{ messages: unknown[]; }>; deleteSession(req: { sessionKey: string; }): Promise; } export interface OpenClawPluginApi { id: string; name: string; source: string; config: Record; pluginConfig: Record; version?: string; rootDir?: string; registrationMode?: string; logger: { debug(msg: string): void; info(msg: string): void; warn(msg: string): void; error(msg: string): void; }; registerTool(tool: unknown, opts?: { optional?: boolean; names?: string[]; }): void; registerCli(registrar: (ctx: { program: unknown; }) => void, opts?: { commands?: string[]; descriptors?: unknown[]; }): void; on(hookName: string, handler: (event: any, ctx: any) => any, opts?: { priority?: number; }): void; resolvePath(input: string): string; enqueueNextTurnInjection?: (injection: { sessionKey: string; text: string; idempotencyKey?: string; placement?: string; ttlMs?: number; }) => Promise<{ enqueued: boolean; id: string; }>; registerSessionExtension?: (ext: { namespace: string; description: string; project?: (ctx: { sessionKey: string; state: unknown; }) => unknown; cleanup?: (ctx: { reason: string; sessionKey?: string; }) => void | Promise; }) => void; runtime?: { system?: { enqueueSystemEvent?: (text: string, opts: { sessionKey: string; }) => void; }; subagent?: SubagentApi; agent?: { runEmbeddedPiAgent?: (req: unknown) => Promise; }; [key: string]: unknown; }; } export declare function createSagaPlugin(deps?: Partial, opts?: { stateRoot?: string; }): { stateRoot: string; /** Build deps using real storage + optional overrides */ buildDeps(api: OpenClawPluginApi): SagaStartDeps; }; declare const _default: { id: string; name: string; description: string; register(api: OpenClawPluginApi): void; }; export default _default; //# sourceMappingURL=openclaw-plugin.d.ts.map