/** * MCP app runner: feed raw event lines to the tenx `@apps/mcp-file` app * and return parsed templates + encoded events + aggregated rows. * * Wraps `runDevCliFileOutput` from dev-cli.ts with: * - automatic unique `runtimeName` generation * - output file parsing via cli-output-parser * - temp-dir cleanup on success or error * - configurable timeout * * Used by `log10x_measure_compaction` to feed SIEM-fetched events through * the engine and measure real compaction ratios from the resulting * `encoded.log` byte counts. */ import { type Template, type EncodedEvent, type AggregatedRow } from './cli-output-parser.js'; export interface McpAppRunnerResult { templates: Map; encodedLines: EncodedEvent[]; aggregatedRows: AggregatedRow[]; wallTimeMs: number; runtimeName: string; } export interface McpAppRunnerOptions { /** Wall-clock timeout in milliseconds. Default 300,000ms (5 minutes). */ timeoutMs?: number; /** * Unique name for the /tmp/log10x-mcp-pull/ output directory. * Defaults to `measure--`. */ runtimeName?: string; } /** * Pipe `events` (newline-separated raw log lines) through tenx * `@apps/mcp-file`, then parse and return the three artifact files. * * Cleans up the temp dir before returning (both on success and error). * The caller does not need to manage the `/tmp/log10x-mcp-pull//` * directory. */ export declare function runMcpAppOnEvents(events: string[], opts?: McpAppRunnerOptions): Promise;