UNPKG

eve

Version:

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

32 lines (31 loc) 1.65 kB
import type { DeliverHookPayload, HookPayload, SessionCapabilities } from "#channel/types.js"; import type { InitialTurnStep } from "#execution/durable-session-migrations/turn-workflow.js"; import type { DurableSessionState } from "#execution/durable-session-store.js"; import type { NextDriverAction } from "#execution/next-driver-action.js"; import type { SessionCommandInbox } from "#execution/session-command-inbox.js"; import { SessionStateCursor } from "#execution/session-state-cursor.js"; import type { TurnCancelPayload } from "#execution/turn-cancellation-token.js"; import type { RunMode } from "#shared/run-mode.js"; export type InlineTurnOutcome = { readonly initialCancellation?: TurnCancelPayload; readonly initialStep?: InitialTurnStep; readonly kind: "child" | "continue"; } | { readonly action: NextDriverAction; readonly kind: "result"; }; /** Runs same-deployment steps directly until they need the shared turn runner. */ export declare function runInlineTurn(input: { readonly bufferedDeliveries: DeliverHookPayload[]; readonly bufferedSessionControls: Array<"clear" | "compact" | "expired" | "reset">; readonly cancelledTaskIds?: Set<string>; readonly capabilities?: SessionCapabilities; readonly commandInbox: SessionCommandInbox; readonly delivery: HookPayload; readonly mode: RunMode; readonly parentWritable: WritableStream<Uint8Array>; readonly seenTaskDeliveries?: Set<string>; readonly serializedContext: Record<string, unknown>; readonly sessionState: DurableSessionState; readonly stateCursor?: SessionStateCursor; }): Promise<InlineTurnOutcome>;