UNPKG

eve

Version:

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

23 lines (22 loc) 804 B
import { z } from "#compiled/zod/index.js"; /** * Provider-reported token usage totals. * * The single usage shape across eve: harness accumulation * (`turn-tag-state`), delegated subagent results, remote session * callbacks, and usage spans all carry this type. */ export type TokenUsage = z.infer<typeof tokenUsageSchema>; /** * Zod schema for {@link TokenUsage}. * * Validates the `usage` field of remote session callbacks, which may come * from a callee on a different eve version — unknown keys are stripped * rather than rejected so a newer sender never voids the whole payload. */ export declare const tokenUsageSchema: z.ZodObject<{ cacheReadTokens: z.ZodNumber; cacheWriteTokens: z.ZodNumber; inputTokens: z.ZodNumber; outputTokens: z.ZodNumber; }, z.core.$strip>;