/** 프로필·CLI·환경·폴더가 달라진 실행에 이전 PTY를 재사용하지 않는다. 원문 비밀은 저장하지 않는다. */ const crypto = require('crypto'); function executionFingerprint({ command, args, cwd, env, profile }) { const environment = Object.keys(env || {}).sort().map(key => [key, env[key]]); return crypto.createHash('sha256').update(JSON.stringify({ command, args, cwd, environment, profile })).digest('hex'); } module.exports = { executionFingerprint };