import type { JournalEntry } from './types.js';
export interface RecordOptions {
    tenantId: string;
    kind: string;
    action: string;
    target?: string | null;
    outcome?: JournalEntry['outcome'];
    reason?: string;
    metadata?: Record<string, unknown>;
    relatedGoalId?: string | null;
    costUsd?: number;
    actor?: string;
}
export declare function record(opts: RecordOptions): Promise<JournalEntry>;
/**
 * Walk the chain from genesis and verify every hash. Returns the first
 * mismatch (if any) or null if intact. Used by the integrity audit endpoint.
 */
export declare function verifyChain(tenantId: string): Promise<{
    ok: boolean;
    totalEntries: number;
    brokenAt: string | null;
}>;
export interface ListOptions {
    tenantId: string;
    since?: string;
    kind?: string;
    outcome?: JournalEntry['outcome'];
    limit?: number;
}
export declare function list(opts: ListOptions): Promise<JournalEntry[]>;
export interface JournalRollup {
    total: number;
    byOutcome: Record<JournalEntry['outcome'], number>;
    byKind: Record<string, number>;
    costUsd: number;
    topActions: Array<{
        action: string;
        count: number;
    }>;
}
export declare function rollup(tenantId: string, since: string): Promise<JournalRollup>;
export declare function rollupSince(tenantId: string, hours: number): Promise<JournalRollup>;
export declare function todayRollup(tenantId: string): Promise<JournalRollup>;
export declare function weekRollup(tenantId: string): Promise<JournalRollup>;
//# sourceMappingURL=journal.d.ts.map