Плагин «dsh-turn-cleanup» для DeepSeek Harness: Blocks the end of a turn while temporary files from that turn are still lying around: it registers a listener on the serial agent/turn-stopping hook and, if anything is left, steers the model with the file list and two ways out — delete them, or justify each one and move it somewhere deliberate. Candidates come from two narrow temp-file sources, plus a backup-retention channel that is on by default and flags excess .bak copies of files touched this turn. The first is the .agent-tmp/ convention directory under the session cwd: whatever is left in it is reported outright, because that directory exists only for throwaway files. The second is the paths this turn actually wrote, captured through the fs/write-intent hook; those are reported only when they sit under that cwd, fall outside .git, node_modules, .tmp-sessions and out, match a temp-file pattern, and the file is still present — which is what keeps junk already sitting in the workspace from being resurrected as a complaint about this turn. One steer per turn, subagent sessions skipped, nothing deleted by the plugin in the default steer mode (only the opt-in mode: prune deletes backups), and the check is readdir plus stat only.
★ 1 звёзд GitHub↓ 784 загрузок за 30 дней7 ноября 2026 г. добавлен📦 npm verified
БЫСТРАЯ УСТАНОВКА
Команды для терминала DSH
dsh plugin --profile web add "https://github.com/Leonlee114514/dsh-turn-cleanup/releases/latest/download/dsh-turn-cleanup.tgz"
Запустите команду в терминале, где работает DeepSeek Harness. Перезапуск применит плагин автоматически.
ОПИСАНИЕ И ВОЗМОЖНОСТИ
Что делает dsh-turn-cleanup
Плагин «dsh-turn-cleanup» для DeepSeek Harness: Blocks the end of a turn while temporary files from that turn are still lying around: it registers a listener on the serial agent/turn-stopping hook and, if anything is left, steers the model with the file list and two ways out — delete them, or justify each one and move it somewhere deliberate. Candidates come from two narrow temp-file sources, plus a backup-retention channel that is on by default and flags excess .bak copies of files touched this turn. The first is the .agent-tmp/ convention directory under the session cwd: whatever is left in it is reported outright, because that directory exists only for throwaway files. The second is the paths this turn actually wrote, captured through the fs/write-intent hook; those are reported only when they sit under that cwd, fall outside .git, node_modules, .tmp-sessions and out, match a temp-file pattern, and the file is still present — which is what keeps junk already sitting in the workspace from being resurrected as a complaint about this turn. One steer per turn, subagent sessions skipped, nothing deleted by the plugin in the default steer mode (only the opt-in mode: prune deletes backups), and the check is readdir plus stat only.
Показать оригинальное описание (EN/ZH)
Blocks the end of a turn while temporary files from that turn are still lying around: it registers a listener on the serial agent/turn-stopping hook and, if anything is left, steers the model with the file list and two ways out — delete them, or justify each one and move it somewhere deliberate. Candidates come from two narrow temp-file sources, plus a backup-retention channel that is on by default and flags excess .bak copies of files touched this turn. The first is the .agent-tmp/ convention directory under the session cwd: whatever is left in it is reported outright, because that directory exists only for throwaway files. The second is the paths this turn actually wrote, captured through the fs/write-intent hook; those are reported only when they sit under that cwd, fall outside .git, node_modules, .tmp-sessions and out, match a temp-file pattern, and the file is still present — which is what keeps junk already sitting in the workspace from being resurrected as a complaint about this turn. One steer per turn, subagent sessions skipped, nothing deleted by the plugin in the default steer mode (only the opt-in mode: prune deletes backups), and the check is readdir plus stat only.
УДАЛЕНИЕ ПЛАГИНА
Как удалить при необходимости
dsh plugin --profile web remove dsh-turn-cleanup
🛡️
Безопасность и аудит
Плагины выполняются в окружении пользователя DSH. Рекомендуется проверять исходный код, зависимости и запрашиваемые разрешения в репозитории автора перед установкой.
Заменяет файловую систему и поставщиков bash на виртуальное рабочее пространство миража: файловые инструменты и команды оболочки запускаются над смонтированными ресурсами (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) вместо хост-диска, с режимами чтения/записи/исполнения для каждого монтирования, маршрутизацией в песочнице для каждой команды (monty, pyodide, QuickJs в процессе; Docker, e2b, Daytona Remote) и установленным CLI (git, gh, slack, linear, ntn, gws или тот, который вы зарегистрируете) в качестве заголовков виртуального терминала.
Плагин «oh-my-agent#dsh» для DeepSeek Harness: Runs project OMA checks before and after tool execution and when a turn tries to finish. Installs its OMA CLI dependency and initializes unconfigured projects on first use. Requires Node.js 22+; initial setup needs network access and project write access.