/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { StreamEvent, TaskOutput } from "@workglow/task-graph"; /** * Callback the dispatch layer hands to a run-fn so the run-fn can emit * in-flight stream events without ever returning them as a materialized value. * Output for one-shot capabilities rides on a single `finish` event; output for * streaming capabilities rides on the preceding `text-delta` / `object-delta` * / `snapshot` events with a trailing empty `finish`. The accumulator that * materializes a single `O` lives only at terminal consumer sites * ({@link AiTask.execute}, {@link StreamProcessor}'s `ctx.shouldAccumulate` * branch). */ export type AiEmit = (event: StreamEvent) => void; /** * Discards every event. Used by callers that don't need mid-stream events but * still want to drive a run-fn to completion. */ export declare const noopEmit: AiEmit; //# sourceMappingURL=AiEmit.d.ts.map