import { type AgentSession, type ToolDefinition } from "@earendil-works/pi-coding-agent"; export type DreamWrite = { tool: "write" | "edit"; path: string; }; export type DreamResult = { report: string; writes: DreamWrite[]; error?: string; }; export type DreamerSession = Pick; export type DreamerSessionFactory = (options: { cwd: string; modelPattern?: string; tools: string[]; }) => Promise; export declare const DREAMER_TOOLS: string[]; /** The only custom definitions in the dream session replace the two built-ins with jailed versions. */ export declare function dreamerWriteToolDefinitions(notesHome: string): ToolDefinition[]; export declare const defaultDreamerSessionFactory: DreamerSessionFactory; /** * Run one dream turn. A dreamer failure is returned as `error` together with the partial * writes observed so far, so the caller can record partial state instead of losing it; * only a failure to even start the session throws. */ export declare function runDreamer(playbook: string, cwd: string, options?: { modelPattern?: string; sessionFactory?: DreamerSessionFactory; }): Promise; export declare function loadPlaybook(path: string): string;