Files
opencode-plugin-ralph-loop/dist/ralph-loop/ralph-loop-hook.d.ts
2026-04-19 19:16:31 -04:00

20 lines
707 B
TypeScript

import type { PluginInput } from "@opencode-ai/plugin";
import type { RalphLoopOptions, RalphLoopState } from "./types";
export interface RalphLoopHook {
event: (input: {
event: {
type: string;
properties?: unknown;
};
}) => Promise<void>;
startLoop: (sessionID: string, prompt: string, options?: {
maxIterations?: number;
completionPromise?: string;
ultrawork?: boolean;
strategy?: "reset" | "continue";
}) => boolean;
cancelLoop: (sessionID: string) => boolean;
getState: () => RalphLoopState | null;
}
export declare function createRalphLoopHook(ctx: PluginInput, options?: RalphLoopOptions): RalphLoopHook;