/** * Startup-triggered memory-maintenance nudge: detect when memory-audit is overdue * and inject a context note suggesting the agent run it. * * The hook does NOT run the audit itself — memory-audit is a skill executed * by an LLM agent, not a sync TS function. The hook just signals overdue * status; the agent decides when to honor the suggestion (typically before * substantive work in the current session). * * State lives in a single marker file so the check is fast and atomic: * $PI_MIND_DIR/raw/maintenance-log/last-audit.json * { "lastRun": , "summary": "" } * * Mark-as-done is exposed as a tool the memory-audit skill calls at the end * of its workflow; that's the one and only writer of this file. The tool is * named `mark_memory_audit_complete` to match the skill's current name. */ export declare const AUDIT_INTERVAL_HOURS = 24; export interface TokenSummary { totalTokens: number; costUsd: number; callCount: number; /** Earliest entry counted (ms epoch). Useful for "since when" framing. */ sinceMs: number; } /** * Aggregate token usage from maintenance-log/*.jsonl entries whose `action` * ends in `-tokens` (e.g. B-tokens, F-tokens) since `sinceMs`. * * Only scans files for dates that could contain matching entries — typically * today + yesterday for a 24h audit window. If sinceMs spans further back, * passes a wider date range. */ export declare function summarizeTokensSince(piMindDir: string, sinceMs: number, now?: number): TokenSummary; interface AuditMarker { lastRun: number; summary?: string; } export declare function readMarker(piMindDir: string): AuditMarker | null; export interface AuditStatus { overdue: boolean; hoursSinceLast: number | null; lastSummary?: string; } export declare function getAuditStatus(piMindDir: string, now?: number): AuditStatus; export declare function markAuditDone(piMindDir: string, summary?: string): void; /** Build a context-injection block to surface audit-overdue status to the agent. */ export declare function renderAuditNotice(status: AuditStatus, tokenSummary?: TokenSummary): string | null; export {}; //# sourceMappingURL=auto-audit.d.ts.map