/**
 * The side-effects the pure loop requests.
 *
 * The reducer performs no I/O. Instead it returns a list of {@link Effect}s
 * describing what the outside world should do next: invoke the model, run a
 * tool, persist a snapshot, condense history, or publish an event. A thin
 * driver interprets each effect and feeds the results back in as
 * {@link import("./signal").Signal}s, closing the loop.
 */
import type { Conversation, StreamOptions, Turn } from "../../llmgateway/contract";
import type { RunSnapshot } from "./run-state";
import type { ToolCall } from "./tools";
import type { RunEvent } from "./events";
/** Ask the driver to start a streaming model invocation for this conversation. */
export interface InvokeModelEffect {
    readonly kind: "invoke_model";
    readonly conversation: Conversation;
    readonly options: StreamOptions;
}
/** Ask the driver to execute one tool the model requested. */
export interface RunToolEffect {
    readonly kind: "run_tool";
    readonly call: ToolCall;
}
/** Ask the driver to durably record the given snapshot. */
export interface PersistEffect {
    readonly kind: "persist";
    readonly snapshot: RunSnapshot;
}
/** Ask the driver to condense the given history into a summary turn. */
export interface CompactEffect {
    readonly kind: "compact";
    readonly messages: readonly Turn[];
}
/** Ask the driver to broadcast an event to subscribers. */
export interface PublishEffect {
    readonly kind: "publish";
    readonly event: RunEvent;
}
/** The tagged union of every side-effect the pure loop can request. */
export type Effect = InvokeModelEffect | RunToolEffect | PersistEffect | CompactEffect | PublishEffect;
