UNPKG

eve

Version:

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

17 lines (16 loc) 1.09 kB
import type { RuntimeTraceContext } from "#protocol/message.js"; import type { InstrumentationSessionStartedEvent, InstrumentationTraceSeed, InstrumentationTurnStartedEvent } from "#instrumentation/lifecycle.js"; /** Prepares native session/turn tracing before their durable stream events. */ export interface PrepareTurnTraceContextInput { readonly instrumentation?: { readonly prepareSessionTrace?: (event: InstrumentationSessionStartedEvent) => Promise<InstrumentationTraceSeed>; readonly prepareTurnTrace?: (event: InstrumentationTurnStartedEvent) => Promise<InstrumentationTraceSeed>; }; readonly session: Omit<InstrumentationSessionStartedEvent, "idempotencyKey" | "type">; readonly principals?: Pick<InstrumentationTurnStartedEvent, "currentPrincipal" | "initiatorPrincipal">; readonly sequence: number; readonly sessionStarted: boolean; readonly traceContext?: RuntimeTraceContext; readonly turnId: string; } export declare function prepareTurnTraceContext(input: PrepareTurnTraceContextInput): Promise<RuntimeTraceContext | undefined>;