/** * * Part 4.A: aggregate lease-kind observability events for one session, * render per-kind counts + a 5-event chronological tail. * * Part 5 adds: * - `--rate` : leak-rate computation (spawn - release - gc) * plus lifetime stats (avg / p99) per lease id. * - `--all-sessions` : aggregate across every session under * `.peaks/_runtime//metrics/slices.jsonl` * for the given project root. Useful for * cross-session dashboards. * * Aggregation is pure (operates on already-read ObservabilityEvent[]); * the IO layer is the JSONL read at the call site. The reader filters * on `category === 'lease'`; the schema is the same as every other * observability event (Part 4.A reused the existing schema v1). */ import type { Command } from 'commander'; import { type ProgramIO } from '../cli-helpers.js'; import { type ObservabilityEvent } from '../../services/observability/observability-service.js'; import { readAllSessionLeaseEvents, type RateStats } from './lease-metrics-commands-support.js'; export { readAllSessionLeaseEvents, type RateStats }; export declare function recomputeRate(leaseEvents: ReadonlyArray): RateStats; export declare function registerLeaseMetricsCommand(parent: Command, io: ProgramIO): void;