/** * One-call completion over pi-ai's StreamFunction — the primitive every * fusion role, the synthesiser, and the gate validator share. * * The stream function is injectable: production passes an OpenRouter-backed * `models.streamSimple`, tests pass a `createFauxCore` scripted stream. No * provider logic lives here. */ import type { Api, Model, StreamFunction, Usage } from "@earendil-works/pi-ai"; export interface CompletionResult { text: string; usage: Usage | undefined; latencyMs: number; } export interface CompletionRequest { system: string; prompt: string; } /** * Run one completion and settle it. Every caller builds a FRESH Context per * call — this helper never accepts, stores, or reuses message history, which * is the mechanical root of the "never replay one model's turns as another's * history" invariant. */ export declare function complete(streamFn: StreamFunction, model: Model, request: CompletionRequest): Promise; //# sourceMappingURL=complete.d.ts.map