UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

23 lines (22 loc) • 1.06 kB
import { EveAgentProjection } from "#client/eve-agent-projection.js"; import type { MessageStreamEvent } from "#protocol/message.js"; import type { SendTurnPayload } from "#client/types.js"; interface ReconciledSubmissions { readonly alreadyProjected: boolean; readonly event: Extract<MessageStreamEvent, { readonly type: "message.received"; }>; readonly ids: readonly string[]; } /** Owns optimistic message projection and server-delivery reconciliation. */ export declare class OptimisticMessageSubmissions<TData> { #private; constructor(projection: EveAgentProjection<TData>, optimistic: boolean); reset(): void; submit(input: SendTurnPayload, eventStartIndex: number): string | undefined; apply(event: MessageStreamEvent): ReconciledSubmissions | undefined; correlate(submissionId: string | undefined, deliveryId: string | undefined, events: readonly MessageStreamEvent[]): ReconciledSubmissions | undefined; fail(error: Error, submissionId?: string): void; failAll(error: Error): void; } export {};