import { createHash } from 'node:crypto';
export function hashToolResult(toolName, input, output) {
    const data = JSON.stringify({ toolName, input, output });
    return createHash('sha256').update(data).digest('hex').slice(0, 16);
}
export function buildToolResultHashes(toolResults) {
    const hashes = {};
    for (const result of toolResults) {
        hashes[result.toolCallId] = hashToolResult(result.toolName, result.input, result.output);
    }
    return hashes;
}
//# sourceMappingURL=hash.js.map