/** Increment when audit-log retention sweep fails. Exposed as a Prometheus * counter; ops should alert on any non-zero rate. */ export declare function recordAuditPruneFailure(): void; /** Increment when an agent's per-spawn cleanup hook throws. Exposed as a * Prometheus counter so leaked tmpdirs (mcp-config etc.) become visible * on /api/metrics rather than only in warn-level pino output. */ export declare function recordAgentCleanupFailure(): void; /** L1 tool-result clearing applied once (normal or emergency keep≤2). */ export declare function recordContextClear(opts: { emergency: boolean; }): void; /** L2 transcript compaction attempt finished (success or fail). */ export declare function recordContextCompact(opts: { result: 'success' | 'fail'; tokensBefore?: number; }): void; /** Web/portal thumbs up/down (durable sidecar writes). */ export declare function recordMessageFeedback(vote: 'up' | 'down'): void; /** Type for the optional approval-bus metrics snapshot pulled in at scrape * time. Kept structural to avoid importing approval-bus at module load * (would risk a circular). */ export interface ApprovalBusMetricsLike { pending: number; totalRequests: number; totalResolved: number; totalAllowed: number; totalDenied: number; totalTimedOut: number; } export declare function setApprovalBusSnapshotProvider(fn: (() => ApprovalBusMetricsLike) | null): void; export interface RecordedInvocation { agent: string; intent: string; platform: string; durationMs: number; cost: number; success: boolean; } export declare function recordInvocation(rec: RecordedInvocation): void; export interface MetricsSnapshot { uptimeSec: number; agents: Array<{ agent: string; total: number; success: number; failure: number; successRate: number; costSum: number; sampleCount: number; p50Ms: number; p95Ms: number; p99Ms: number; }>; intentTotals: Record; platformTotals: Record; } export declare function snapshot(): MetricsSnapshot; /** * Render the snapshot in Prometheus text exposition format. Keeps line * count low and uses bare metric names without a HELP/TYPE preamble per * line family (we emit one preamble each). */ export declare function toPrometheus(): string; /** Reset all counters. Test-only. */ export declare function reset(): void; //# sourceMappingURL=metrics.d.ts.map