import type { ToolPayloadTransformPhase } from '../tools/types.js';
import type { TokenUsage } from './types.js';
/**
 * Pure transforms shared by the run engine for folding raw agent-stream chunk
 * payloads into the `MastraDBMessage` shape a Session renders, plus
 * server-side-fallback diagnostics. They hold no
 * AgentController or Session state, so they live in their own module.
 */
export declare function getDisplayTransform(metadata: unknown, phase: ToolPayloadTransformPhase, fallback: unknown): unknown;
/**
 * Build a user-facing notice when a turn was served by an Anthropic server-side
 * fallback model instead of the primary model. Without a notice the user has no
 * way to tell the response did not come from the model they selected.
 */
export declare function describeServerSideFallback(providerMetadata: unknown): string | undefined;
/** Coerce a usage field to a finite number, accepting numeric strings. */
export declare function getUsageNumber(usage: Record<string, unknown>, key: string): number | undefined;
/**
 * Normalize a step's usage payload. Returns undefined when no primary count is
 * present so an absent measurement is never reported as a measured zero.
 */
export declare function toStepTokenUsage(usage: unknown): TokenUsage | undefined;
/** Return a new tally with one step's usage folded in. */
export declare function addTokenUsage(total: TokenUsage, step: TokenUsage): TokenUsage;
/** Fold an optional usage field into a tally when present. */
export declare function addOptionalUsageField(usage: TokenUsage, key: keyof Pick<TokenUsage, 'reasoningTokens' | 'cachedInputTokens' | 'cacheCreationInputTokens' | 'cacheCreationInputTokens5m' | 'cacheCreationInputTokens1h'>, value: number | undefined): void;
//# sourceMappingURL=stream-content.d.ts.map