export declare const METRICS_NAMESPACE = "ApparelHub/MCP"; /** Bucket an HTTP status into a coarse outcome dimension (bounded cardinality). */ export declare function outcomeForStatus(status: number): string; /** Extract the JSON-RPC method and (for `tools/call`) the tool name from a request body. * Best-effort + safe: any parse failure returns {} so metrics never break a request. */ export declare function parseRpc(body: string | undefined, isBase64: boolean): { rpcMethod?: string; toolName?: string; }; export interface ConnectorMetric { outcome: string; latencyMs: number; toolName?: string; /** Injectable for tests (defaults to Date.now()). */ now?: number; /** Injectable for tests (defaults to console.log). */ emit?: (line: string) => void; } /** Build the EMF payload for a request: `Requests` (Count) + `LatencyMs` (Milliseconds), * emitted per `Outcome` and (for tool calls) per `ToolName`. Exposed for tests. */ export declare function buildEmf(m: ConnectorMetric): Record; /** Emit one EMF metric line (fire-and-forget; never throws into the request path). */ export declare function emitConnectorMetric(m: ConnectorMetric): void;