import type { AgentMessage } from "@mariozechner/pi-agent-core"; export interface HashedLogEntry { timestamp: string | number; data: T; hash: string; previousHash?: string; } export type AgentMessageWithHash = AgentMessage & { hash?: string; }; /** * Compute SHA-256 hash of JSON.stringify(data) + timestamp */ export declare function computeHash(data: any, timestamp: string | number): string; /** * Create a SHA-256 hash of the log entry data and timestamp */ export declare function hashLogEntry(data: T, timestamp?: string | number): HashedLogEntry; /** * Verify the integrity of a hashed log entry */ export declare function verifyLogIntegrity(entry: HashedLogEntry): boolean; /** * Hash a message object (AgentMessage) for log integrity */ export declare function hashMessage(message: Record): string; /** * Add integrity hash to an AgentMessage, returning a new message with hash property. * If the message already has a hash, it is returned unchanged. */ export declare function addHashToMessage(message: AgentMessage): AgentMessageWithHash;