UNPKG

eve

Version:

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

41 lines (40 loc) 1.86 kB
import type { SpanProcessor } from "#compiled/@vercel/otel/index.js"; import { type SpanExportPolicy } from "#tracing/span-export-policy.js"; /** * The local spool, as a span processor. * * Session liveness and retention live in here rather than in the runtime that * installs it, so nothing an author puts in the same `spanProcessors` list can * see them — and eve's accept filter never reaches an author's exporters. */ export interface LocalTracesProcessor extends SpanProcessor { /** * Settles pending writes and releases this conversation's active traces. */ releaseConversation(conversationId: string): Promise<boolean>; } /** * Reports whether a processor tracks which conversation owns which trace, so * eve can tell it when that conversation is done. * * Anything standing between eve and the spool has to answer for the spool, so * this is the check a wrapper uses to decide whether it must forward the call. * * @internal */ export declare function hasConversationRelease(processor: SpanProcessor): processor is LocalTracesProcessor; /** * Writes the OTLP/JSON spool under `.eve/traces/v1`. * * `EVE_TRACES=off` removes the writer but keeps the processor: eve still has * to observe spans to track which session owns which trace. * * Internal because of `releaseConversation`, which eve's runtime drives off session * lifecycle. The authored surface is `localTraces()`, which wraps this in an * `OtelIntegration`. */ export declare function createLocalTracesProcessor(input?: { readonly appRoot?: string; }): LocalTracesProcessor; /** Applies the local content environment override before authored policies. @internal */ export declare function resolveLocalTracesExportPolicy(exportPolicy?: SpanExportPolicy | readonly SpanExportPolicy[]): SpanExportPolicy | readonly SpanExportPolicy[] | undefined;