import { type DigestAction, type PlanContext, type WriteAction } from "../internals/plan.js"; /** * The time-series tracking layer behind `aih report` trends. `aih track` records * one {@link Snapshot} per commit into `.aih/history.jsonl` (gitignored live data, * NOT a byte-stable artifact); {@link trendsPanel} renders the accumulated series. * Every field comes from local git + repo state — no network, no wall-clock (the * sample time is the commit's own date), so a snapshot is deterministic per commit. */ export declare const HISTORY_PATH: string; export interface Snapshot { /** Latest commit's committer date (ISO) — the sample's time, not wall-clock. */ ts: string; sha: string; branch: string; branches: number; commits7d: number; loc: { added: number; removed: number; net: number; }; adoptionScore: number; contextTokens: number; sourceFiles: number; /** v9 trend metrics — recorded since the trends capability landed (older samples lack them). */ wiringScore?: number; perTurnPct?: number; driftCount?: number; openActions?: number; } /** Collect one metrics snapshot from git + repo state; `undefined` outside a repo. */ export declare function collectSnapshot(ctx: PlanContext): Promise; /** Read the accumulated history (skips malformed lines). */ export declare function readHistory(ctx: PlanContext): Snapshot[]; /** * A write that appends `snapshot` to the history — but only when the latest row is * a different commit, so re-running `aih track` on the same commit is a byte-stable * no-op (one sample per commit). Rewrites the whole JSONL so the `write` action * stays idempotent against disk. */ export declare function historyWrite(ctx: PlanContext, snapshot: Snapshot): WriteAction; /** A unicode sparkline of `values`, scaled across their own min/max. */ export declare function sparkline(values: number[]): string; /** The trends digest for `aih report` (local). Honest stub until 2+ samples exist. */ export declare function trendsPanel(ctx: PlanContext): DigestAction;