5941d797ba
Extract applyDirenvPreflight() so the ACP client terminal and PTY backends get the same direnv/devenv overlay as executeBash (previously only the one-shot path did). The helper is a pure (command, env) transform — merge direnv's set under the caller's overlay, prepend a regex-gated unset -v for removed vars — so interactive backends keep their own env shape (live TERM) while executeBash still layers its non-interactive defaults on top. The three dispatch branches are mutually exclusive, so no command is preflighted twice. Also drop the content-hash export cache in loadDirenvEnv: always run direnv export json and let direnv's own watch/mtime invalidation decide freshness, so a changed watched file re-exports even when .envrc is unchanged. Co-Authored-By: seal <noreply@sealedsecurity.com>