UNPKG

eve

Version:

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

11 lines (10 loc) 880 B
import type { Span } from "#compiled/@opentelemetry/api/index.js"; import type { InstrumentationUsage } from "#instrumentation/lifecycle.js"; import type { AgentTurnTraceState } from "#tracing/agent-trace-state.js"; /** Applies eve's structural token usage attributes to an agent span. */ export declare function setAgentUsage(span: Span, usage: InstrumentationUsage): void; /** Applies standard GenAI token usage while retaining eve's compatibility attributes. */ export declare function setGenAiUsage(span: Span, usage: InstrumentationUsage): void; export declare function setAgentInvocationUsage(span: Span, modelUsage: AgentTurnTraceState["modelUsage"]): void; /** Projects Vercel AI Gateway cost metadata onto GenAI span attributes. */ export declare function readGatewayCost(providerMetadata: Readonly<Record<string, unknown>>): Record<string, string | number> | undefined;