Repository navigation
Releases
v0.3.1 — Fix closed-writer cleanup
Fixed
- Fix
/nixstarting a new session but failing to delete the previous one when its persistence writer is closing. The exact target session'sSessionHandleClosedErroris recovered through Harness's durability barrier; ordinary flush errors and failed barriers still refuse deletion and preserve session accounting. - Exclude transient atomic-publication files from live-test log hashes.
CI reliability
- Run macOS jobs on self-hosted macOS runners, using pre-provisioned Python rather than installing into
/Users/runner. - Isolate npm cache and pnpm installation paths per job to avoid personal-cache downloads and cross-job installation conflicts.
- Skip fork PRs in the normal workflow; all external-contributor approval remains a separate repository security control.
Verification
CI run 42270528944 passed all eight jobs on runtime commit 4c1ccd8. Release preparation changes documentation only.
- Package checks: 73 TypeScript and 41 Python tests on Ubuntu and macOS, Node 22.23.4 and 24.22.1.
- Real upstream PTY tests: 32/32 on Ubuntu and 33/33 on macOS for each pinned
validatedandmerged-022pair; zero failures or skips. - Confirms adoption before deletion, macOS Trash, control-session preservation,
/nix quit, and restart persistence.
The separate published TUI v0.19.0 opt-in pair was not rerun. See TESTING.md for exact upstream pins and historical evidence.
Upgrade
dsh plugin --profile dsh-tui add dsh-session-cleanup@0.3.1Restart the dsh-tui profile after upgrading. This plugin requires ccch1mneyyy/dsh-TUI with its DSH backend.
v0.3.0 — Safer session cleanup
DSH-only session cleanup for dsh-TUI. This release includes the previously unreleased startup-order fix and the reviewed safety hardening.
Fixed
- Wait for
commandsandtuiScenestogether so/nixregisters and opens its scene under the same Cordis activation, including delayed TUI startup. - Keep live session attachments, projection cache, workspace membership, pins and archive references until session-file removal is verified. Report incomplete/partial cleanup accurately.
- Fail closed on storage scan/access, agent stop/idle and session flush errors, with consistent error results.
- Bound Trash-provider termination with TERM/KILL escalation; stop fallback and outer retries if termination cannot be confirmed. A zero exit alone is not proof of removal.
- Apply the switch deadline to the whole operation; handle abort, scene unmount and plugin disposal, isolate jobs by activation, serialize nix commands and prevent late results from authorizing deletion.
- Require explicit confirmation; absence of the questions service no longer grants consent.
- Preserve legacy picker selections across time-label boundaries.
- Terminate failed forked PTY children with status 127 without unwinding the parent's copied Python stack.
Validation
- Node 22.23.4 and 26.13.0: 71 TypeScript tests + 40 Python tests passed on each, zero failures/skips.
- Real cached DSH
SessionStorechecks confirmed attachment/flush preservation on failed removal, fail-closed unreadable storage, and detach after successful removal. - Cached upstream TUI lifecycle checks passed early/late startup, ownership, foreign refusal, service reload and disposal.
- Final CodeRabbit deep review of the safety changes completed with 0 findings; package inventory, build and whitespace checks passed.
Compatibility limits
Requires @deepseek-harness-tui/dsh-tui with its DSH backend in the same profile. Official Harness alone, pi-tui, web, and the Claude/Codex backends are unsupported.
The previously recorded TUI v0.19.0 + Harness 0.2.2-rc.1 Linux live PTY pass predates this safety hardening. The complete live PTY suite for that pair was not rerun for 0.3.0, and no new hosted/live compatibility pass or macOS v0.19.0 Trash verification is claimed. Harness 0.2.2-rc.1 requires Node >=24.9.0. See TESTING.md for provenance and limitations.
Install / upgrade
dsh plugin --profile dsh-tui add @deepseek-harness-tui/dsh-tui
dsh plugin --profile dsh-tui add dsh-session-cleanup@0.3.0Restart the profile after installation. Published plugin 0.2.2 does not contain these fixes.
v0.2.2
DSH-only session cleanup for dsh-TUI.
Fixed
- Session deletion completes even when the event loop has no other pending work.
- Upstream CI discovers packed tarballs dynamically and validates installed versions against source manifests.
- Deleting a session removes its id from workspace
pinnedSessionIdsas well asarchivedSessionIds. Other pinned and archived ids stay.
Compatibility
- Verified on Linux with dsh-TUI
v0.18.0(1d0d946f459da5149aba64cc6cc0ef7da304053c) and the Harness line that commit names,0.2.1-rc.5(b830ec950faba0a46dda564be3e2d854afed94f1).UPSTREAM_VALIDATED_VERSIONis0.2.1-rc.5. Live/nixand/nix quitchecks passed. Harnessdsh-v0.2.2-alpha.2is outside that TUI's supported set and was not tested. See TESTING.md. - Verified on Linux with dsh-TUI
v0.17.0(103834cb1000a84569a71646fec7162f18a058c8) and the Harness line that commit names,0.2.1-rc.3(1f81c047fc48fa190a683e469daa699857e9afe8). Live/nixand/nix quitchecks passed. See TESTING.md. - DeepSeek Harness
dsh-v0.2.2-alpha.2(f3803c96974ad4a94195fb97e5c637e9c2a3afe3) with that dsh-TUIv0.17.0commit is not supported. The host rejects the TUI checkout before anything is installed. macOS Trash behavior was not tested.
Added
- Linux and macOS package checks and source-built live upstream PTY checks in GitHub Actions.
Removed
- Legacy Pi/agent code, configuration, and npm runtime dependencies. The package exposes only the native DSH entry and requires dsh-TUI with its DSH backend.
Install:
dsh plugin --profile dsh-tui add dsh-session-cleanup@0.2.2v0.2.1
Session deletion no longer looks for a ~/.dsh/pi2dsh sidecar. The session is the directory under ~/.dsh/sessions.
Install:
dsh plugin --profile dsh-tui add dsh-session-cleanupRemoved
- Stopped looking for a
~/.dsh/pi2dshsidecar. This plugin is not based on pi2dsh. Deletion is the session directory under~/.dsh/sessions.
Changed
- Docs and fixtures name the current log
session.vN.jsonl.zstd(this host writessession.v4.jsonl.zstd), notsession.jsonl.zstd.
v0.1.1
Documented support for both pi-tui and dsh-tui.
Install:
dsh plugin --profile pi-tui add dsh-session-cleanup
dsh plugin --profile dsh-tui add dsh-session-cleanupChanged
- Document support for both the
pi-tuianddsh-tuiprofiles.
v0.2.0
dsh-tui only. /nix now live-switches to the new session before deleting the previous one.
Install:
dsh plugin --profile dsh-tui add dsh-session-cleanupChanged
- Dropped the
pi-package,pi-extension, andpinpm keywords so this DSH plugin is not scraped as a Pi package on pi.dev. - Narrowed the DSH plugin to
/nixand/nix quit./session-cleanupand/nix agentare no longer registered. /nixnow starts the new session through dsh-tui's live switch (channel.newSession()), then deletes the previous session. The live view follows the new session.- Session deletion no longer calls
sessionPersistence.listSnapshots()/locate(), which 0.1.5 removed from the public persistence API.
Removed
- Interactive
/session-cleanuplisting and/nix agentfrom the native DSH command surface. pi-tuiprofile support. This plugin targetsdsh-tuionly, and no longer ships a Piextensionsentry.
v0.1.0
First DSH release. This is a port of pi-session-cleanup, not a continuation of that package's 1.x line.
Install:
dsh plugin --profile pi-tui add dsh-session-cleanupAdded
- Native DSH plugin that lists sessions through
sessionPersistence.listSnapshots()+locate()and deletes them with the host cleanup chain: stop/flush/detach, remove the session directory and sidecar (Trash on macOS,rm -rfelsewhere), then clear projection cache and workspace accounting. - Compiled
lib/dsh-entry.jsso DSH can load the plugin fromnode_modules. /session-cleanup delete <id...>plus a user-questions multi-select flow when that service is mounted.- Native DSH
/nix,/nix agent [preset], and/nix quit.
Fixed
- Default
/session-cleanuplists only orphaned sessions, and accepts an explicitorphanedscope. - Fall back to the basic selector when
ctx.ui.custom()is a no-op. - Refuse Pi trash/unlink against DSH
session.jsonl.zstdartifacts.
Changed
- Deletion is the whole session directory and sidecar, not a single
session.jsonl.zstdfile.