/** * Shared RRD (round-robin database) helpers for the *_rrddata tools. * * PVE returns one JSON object per sample (60 rows for `hour`, ~1400 for * `day`), repeating every key and constant fields like `maxmem` in each row. * By default we compact that into a column/row table, hoist constant fields, * and average rows into a bounded number of time buckets so the output stays * small enough for an LLM. `format: "raw"` returns the exact PVE response. */ import { z } from "zod"; import type { PveClient } from "./client.js"; export declare const DEFAULT_RRD_BUCKETS = 60; type RrdRow = Record; export interface RrdTableOptions { timeframe: string; cf?: "AVERAGE" | "MAX"; fields?: string[]; buckets?: number; } export interface RrdTable { timeframe: string; cf: "AVERAGE" | "MAX"; source_rows: number; bucket_seconds?: number; note?: string; unknown_fields?: string[]; constant: Record; columns: string[]; rows: (number | null)[][]; } /** Tool description shared by the rrddata tools, e.g. `rrdDescription("a QEMU VM")`. */ export declare function rrdDescription(subject: string, stats?: string): string; /** Zod input schema shared by all rrddata tools (merge with node/vmid). */ export declare const rrdInputSchema: { timeframe: z.ZodEnum<{ day: "day"; hour: "hour"; month: "month"; week: "week"; year: "year"; }>; cf: z.ZodOptional>; fields: z.ZodOptional>; buckets: z.ZodOptional; format: z.ZodOptional>; }; /** Turn PVE rrddata rows into a compact, optionally bucketed table. */ export declare function formatRrdTable(data: RrdRow[], options: RrdTableOptions): RrdTable; /** * Fetch `/rrddata` and render it per the shared rrd input schema. * `basePath` is e.g. `/nodes/pve1` or `/nodes/pve1/qemu/100`. */ export declare function getRrdData(client: PveClient, basePath: string, args: Record): Promise; export {};