/** Structured prompt summary emitted in telemetry events (default: redacted). */ export interface PromptSummary { /** Byte length of the raw content. */ length: number; /** SHA-256 hex digest of the raw content (for deduplication without exposure). */ sha256: string; /** First 100 chars of the raw content (safe preview). */ first100chars: string; } /** * Summarize prompt/response content for telemetry emission. * When includeRawPrompts is true, returns the raw string. * Default (false): returns a PromptSummary with length, sha256, first100chars. */ export declare function summarizePromptContent(content: string, includeRaw: boolean): PromptSummary | string; /** * Result from an instrumented LLM call. * Adds durationMs and retries tracking to the provider response. */ export interface InstrumentedLlmResult { result: T; durationMs: number; retries: number; } export declare function instrumentedLlmCall(fn: () => Promise, opts?: { maxRetries?: number | undefined; retryDelayMs?: number | undefined; /** Provider name for metric labels (e.g. 'anthropic'). */ provider?: string | undefined; /** Model name for metric labels (e.g. 'claude-opus-4-5'). */ model?: string | undefined; /** Extract token usage from a successful result to record histogram instruments. */ extractTokens?: (result: T) => { inputTokens?: number; outputTokens?: number; } | undefined; /** * Optional callback invoked on entry before the first attempt. * Callers that have bus/ctx access can wire emitLlmRequestStarted here. */ onStarted?: (() => void) | undefined; }): Promise>; //# sourceMappingURL=llm-observability.d.ts.map