import { z } from "zod"; /** * Wrappers around the macOS unified logging CLI (`log(1)`): * - `logShow`: one-shot historical query, returns parsed entries. * - `logStream`: bounded live stream, returns parsed entries collected over a * time window (we explicitly bound this since MCP requests are request/response). * * Output of `log show --style compact` looks like: * 2026-05-01 00:48:14.521 Df rapportd[697:531b42] [com.apple.rapport:cat] message... * * Where Ty is one of: Df (default), Er (error), In (info), Fa (fault), Ac (activity). */ export declare const logShowSchema: z.ZodObject<{ last: z.ZodDefault; predicate: z.ZodOptional; process: z.ZodOptional; subsystem: z.ZodOptional; level: z.ZodDefault>; maxEntries: z.ZodDefault; }, "strip", z.ZodTypeAny, { last: string; level: "default" | "info" | "debug"; maxEntries: number; process?: string | undefined; predicate?: string | undefined; subsystem?: string | undefined; }, { process?: string | undefined; last?: string | undefined; predicate?: string | undefined; subsystem?: string | undefined; level?: "default" | "info" | "debug" | undefined; maxEntries?: number | undefined; }>; export type LogShowInput = z.infer; export declare const logStreamSchema: z.ZodObject<{ durationSec: z.ZodDefault; predicate: z.ZodOptional; process: z.ZodOptional; subsystem: z.ZodOptional; level: z.ZodDefault>; maxEntries: z.ZodDefault; }, "strip", z.ZodTypeAny, { durationSec: number; level: "default" | "info" | "debug"; maxEntries: number; process?: string | undefined; predicate?: string | undefined; subsystem?: string | undefined; }, { process?: string | undefined; durationSec?: number | undefined; predicate?: string | undefined; subsystem?: string | undefined; level?: "default" | "info" | "debug" | undefined; maxEntries?: number | undefined; }>; export type LogStreamInput = z.infer; export interface LogEntry { timestamp: string; type: "default" | "info" | "debug" | "error" | "fault" | "activity" | "unknown"; process: string; pid: number; tid?: string; subsystem?: string; category?: string; message: string; } /** Pure: parse `log show` output (one entry per line) into structured records. */ export declare function parseLogOutput(text: string, max: number): LogEntry[]; export interface LogShowResult { ok: boolean; command: string; totalParsed: number; byType: Record; entries: LogEntry[]; truncated: boolean; } export declare function logShow(input: LogShowInput): Promise; export declare function logStream(input: LogStreamInput): Promise;