eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
19 lines (18 loc) • 861 B
TypeScript
import { type DurableSessionState } from "#execution/durable-session-store.js";
import type { TokenUsage } from "#shared/token-usage.js";
export interface CancelledTurnSettleResult {
readonly serializedContext: Record<string, unknown>;
readonly sessionState: DurableSessionState;
readonly usage?: TokenUsage;
}
/**
* Settles one cancelled turn: emits `turn.cancelled` → `session.waiting`,
* drops pending coordination state, and persists the between-turns
* session. Runs in the owner, whose wake sources exclude the
* cancel hook, so a queued cancel wake cannot re-dispatch it.
*/
export declare function settleCancelledTurnStep(input: {
readonly sessionWritable: WritableStream<Uint8Array>;
readonly serializedContext: Record<string, unknown>;
readonly sessionState: DurableSessionState;
}): Promise<CancelledTurnSettleResult>;