mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-26 21:26:39 +00:00
* fix(sandbox): keep document bytes when write_file translates paths LocalSandbox.write_file rewrote container paths inside every file it stored, so a dictated README.md ended up holding a host path while read_file masked the rewrite for agent-written files: the read-back showed the virtual path, and the agent confirmed content the file did not contain (#7461). Translation now applies only to executable content, classified with the shared is_code_file rule from deerflow.skills.package_files that the skill installer, the export guard, and skill_manage_tool already use. Code suffixes and extensionless files that open with a shebang keep the host-path rewrite they need to run under a host interpreter (PR #1935); documents, data files, and configs are stored verbatim and read back as stored. * fix(sandbox): translate paths for interpreter scripts and stop reading pipes The classifier added for #7461 asked only the skill-package rule, which does not list `.awk` (nor `.sed`, `.lua`, `.r`, `.tcl`), so a written AWK program kept container paths that the host awk cannot open when it runs `awk -f`. Those suffixes are now the sandbox's own set: the shared rule also decides what SkillScan and the installer treat as package code, and widening it there is a different call. Classification no longer touches the destination unless the path is extensionless. A suffix answers the question by itself, so an append to `events.py` no longer opens the file first, and the extensionless shebang sniff goes through `os.open(O_NONBLOCK)` plus an `fstat` regular file check, which is what keeps a FIFO append from blocking. * test(sandbox): pin the non-blocking sniff with a suffixless pipe append