import { i as loadOrCreateProcessDeviceIdentity } from "./device-identity-BP5V9Wxb.js";
import { createHmac } from "node:crypto";
//#region src/gateway/server-methods/session-goal-request.ts
/** Stable, keyed receipts do not retain another copy or an offline digest of prompt material. */
function fingerprintSessionGoalRequest(value) {
	const identity = loadOrCreateProcessDeviceIdentity();
	const canonical = JSON.stringify(value, (_key, item) => item && typeof item === "object" && !Array.isArray(item) ? Object.fromEntries(Object.entries(item).toSorted(([a], [b]) => a < b ? -1 : a > b ? 1 : 0)) : item);
	return createHmac("sha256", identity.privateKeyPem).update("openclaw.session-goal.v1\0").update(canonical).digest("hex");
}
//#endregion
export { fingerprintSessionGoalRequest as t };
