/** * Batch-prettify raw snake_case pattern identities into 3-5-word * human-readable names via **MCP sampling**. * * The MCP sampling API (`server.createMessage`) asks the host — the same * chat app the user is already in (Claude Desktop, Cursor, etc.) — to * run the prompt through *its* LLM using the user's existing * credentials. No Log10x-side endpoint, no egress to Log10x, * no extra API key. The user's host does whatever privacy + compliance * enforcement they already trust. * * When the host doesn't support sampling (capability probe fails or the * `createMessage` call throws), fail-soft back to raw identities plus a * one-line appendix note. The report still renders — just less pretty. * * What is sent: pattern identities (variable values already stripped by * the 10x engine) along with severity + service. No raw log content. */ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; export interface PrettifyInput { identity: string; service?: string; severity?: string; count: number; bytes: number; } export interface PrettifyOptions { /** * The MCP server instance. Sampling is a server-side capability. * When undefined (e.g., server not yet bound to a transport), the * call fails-soft to "not available." */ server?: McpServer; /** Timeout in ms for the sampling round-trip. Default 30s. */ timeoutMs?: number; /** Max tokens the host is allowed to generate. Default scales with input. */ maxTokens?: number; } export interface PrettifyResult { /** identity → pretty name. Missing entries mean the model didn't return one. */ names: Record; /** Short reason string when the call failed or returned nothing. */ errorNote?: string; } /** * Ask the MCP host's LLM to generate pretty names for a batch of pattern * identities. Always returns; never throws. */ export declare function prettifyPatterns(patterns: PrettifyInput[], opts: PrettifyOptions): Promise;