/** * Lisa Plugin for OpenCode * * This is a thin adapter that delegates to shared handlers via mediator. * It translates OpenCode's event system to Lisa's requests. */ /** * OpenCode Session type (subset of fields we care about) */ interface IOpenCodeSession { readonly id: string; readonly plan?: boolean; } /** * OpenCode Plugin interface (based on @opencode-ai/plugin types) * * Note: We define this locally to avoid a direct dependency on OpenCode. * The actual types come from OpenCode's plugin API at runtime. */ interface IOpenCodePluginContext { readonly project: string; readonly directory: string; readonly worktree?: string; readonly client: IOpenCodeClient; } interface IOpenCodeClient { readonly app: { log(params: { service: string; level: 'info' | 'warn' | 'error'; message: string; }): Promise; }; readonly session?: { list(): Promise<{ data?: IOpenCodeSession[]; }>; get(params: { path: { id: string; }; }): Promise<{ data?: IOpenCodeSession; }>; }; } interface ICompactionOutput { context: string[]; prompt?: string; } type EventHandler = (input?: unknown, output?: ICompactionOutput) => Promise; /** * Plugin factory function called by OpenCode on load. */ export declare function LisaPlugin(ctx: IOpenCodePluginContext): Promise>; /** * Default export for OpenCode plugin loading */ export default LisaPlugin; //# sourceMappingURL=plugin.d.ts.map