import type { YoloMode } from "./state"; type HookEvent = { event: { type: string; properties?: { info?: { id?: string; sessionID?: string; role?: string; time?: { completed?: number; }; }; name?: string; sessionID?: string; arguments?: string; messageID?: string; status?: { type?: string; }; }; }; }; type ChatMessageHook = { sessionID?: string; }; type ChatMessageOutput = { message?: { id?: string; sessionID?: string; role?: string; }; parts?: Array<{ type?: string; text?: string; }>; }; export interface QuestionInfo { question: string; header: string; options: Array<{ label: string; description: string; }>; multiple?: boolean; custom?: boolean; } export interface QuestionRequest { id: string; sessionID: string; questions: QuestionInfo[]; } export interface RuntimeDeps { readMode: () => Promise; writeMode: (mode: YoloMode) => Promise; loadMessageText: (sessionID: string, messageID: string) => Promise; sendUserMessage: (sessionID: string, text: string) => Promise; answerQuestion: (requestID: string, answers: string[][]) => Promise; } export declare function textFromParts(parts?: Array<{ type?: string; text?: string; }>): string; export declare const IDLE_DELAY_MS = 350; export declare const WATCHDOG_STALE_MS = 1000; export declare const HUMAN_TURN_TIMEOUT_MS = 10000; export declare function createOpencodeYoloHooks(deps: RuntimeDeps): Promise<{ "command.execute.before": (input: { command: string; sessionID: string; arguments: string; }, output: { parts: Array<{ type: string; text?: string; }>; }) => Promise; "permission.ask": (input: { type: string; pattern?: string | string[]; sessionID: string; }, output: { status: "ask" | "deny" | "allow"; }) => Promise; "tool.execute.before": (input: { tool: string; sessionID: string; callID: string; }, output: { args: any; }) => Promise; "chat.message": (_input: ChatMessageHook, output: ChatMessageOutput) => Promise; event: ({ event }: HookEvent) => Promise; }>; export {}; //# sourceMappingURL=opencodeCore.d.ts.map