import { Context, Effect, Option } from "effect"; import { Tool } from "effect/unstable/ai"; import type { Builder, CompletedModelResponse } from "./model-response-builder.js"; /** @experimental Identity of the authoritative provider attempt for one model operation. */ export interface AttemptIdentity { readonly operationKey?: string; readonly turn: number; readonly modelCallId: string; readonly modelAttemptId: string; readonly attempt: number; readonly sessionParentId?: string | null; } /** @experimental A normalized response that was interrupted after producing semantic content. */ export interface Snapshot extends AttemptIdentity { readonly response: CompletedModelResponse>; } declare const HandleTypeId: unique symbol; /** @experimental Read-only access to the active model response owned by one Run. */ export interface Interface { readonly [HandleTypeId]: typeof HandleTypeId; readonly snapshot: Effect.Effect>; } declare const ActiveModelResponse_base: Context.ServiceClass; /** @experimental Run-owned access to the currently authoritative partial model response. */ export declare class ActiveModelResponse extends ActiveModelResponse_base { } interface Authority { readonly generation: number; readonly identity: AttemptIdentity; } /** @internal Core-only mutation authority hidden from the retained Runtime handle. */ export interface Controller { readonly begin: (identity: AttemptIdentity) => Authority; readonly install: (authority: Authority, builder: Builder>) => void; readonly discard: (authority: Authority) => void; readonly clearCommitted: (authority: Authority) => void; } /** @experimental Make one opaque accumulator handle for a single Run. */ export declare const make: () => Interface; /** @internal Access Core's mutation side without widening the public retained handle. */ export declare const controller: (service: Interface) => Controller; export {};