Skip to content

v0.5.3

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Nov 23:23
· 13 commits to main since this release
520bd8e

Patch Changes

  • 648de44: Write .sweeprc exclusively with mode 0644 in sweep init (with atomic sibling replacement for --force, clear refusal without suggesting --force for non-regular or other-owner targets, and POSIX fsync on publication), tighten updated .sweeprc permissions to 0644 (preserving stricter modes such as 0600) when saving pattern changes, allow group-writable configs and config directories only when the group matches the user's primary group (supporting umask 002 while still refusing other-group, world-writable, and other-user entries), and align sweep doctor with the same config-file and config_dir trust checks.

  • a5a1c41: Projects view: when a removal fails (a root-owned node_modules from Docker or sudo npm, say), the reason now stays on that item's row ("✗ EACCES: permission denied") after the notice is gone, instead of only the first reason flashing in a notice. The item stays queued, and the receipt line says how many were not attempted when a run stops early.

  • 36037df: Worktrees read as part of their repository. Plans carry two optional fields for an artifact in a linked git worktree: worktreeOf (the canonical repository path it belongs to) and worktreeState (upstream_gone when its remote tracking branch is missing, or merged when the worktree is clean and its own commits are proven merged into a verified default branch). In the projects view a worktree row says app · merged, app · branch missing, or app · worktree instead of app/.worktrees, and the details margin shows the full state (Tracking branch missing · check git for upstream_gone). Only proven merged, clean worktrees nobody has touched for a day are listed first under "Finished worktrees"; a missing tracking branch is evaluated first and is never treated as finished. It is a hint about which build output you are done with; sweep still removes only build output.

  • ed10a51: Harden scan target guardrails and tool-home classification across both the JS and Rust engines:

    • Prefix-block deep OS subtrees (/etc, /sys, /proc, /dev except /dev/shm, /boot, /bin, /sbin, /lib, /lib64, macOS /private/etc, and Windows <Drive>:\Windows) as scan targets while keeping /run, /usr, and /var exact-match so /run/media/..., /run/user/<uid>/gvfs, /var/www, and /usr/local/src stay usable; normalize Windows \\?\ verbatim prefixes before lexical checks; add Windows to SYSTEM_TOOL_DIRS and scope Unix OS roots to non-drive/non-UNC paths so C:\dev\... stays cleanable.
    • Expand HOME_TOOL_DIRS and SYSTEM_TOOL_DIRS to protect additional toolchain, version-manager, conda, editor, agent, package-manager, and app homes (such as ~/.npm-global, ~/.asdf, ~/.mise, ~/go/pkg, ~/scoop, ~/.var/app, ~/snap, ~/miniconda3, ~/anaconda3, ~/.conda, ~/.vscode-insiders, ~/.vscode-oss, ~/.windsurf, ~/.claude, ~/.codex with ~/.codex/worktrees carved out, ~/.t3/userdata, ~/Applications, and /home/linuxbrew/.linuxbrew).
    • Surface a non-blocking cloud-sync reason and scan notice for candidates under cloud-synced folders (~/Dropbox, ~/OneDrive, ~/OneDrive - <Org>, ~/Google Drive, ~/My Drive, and macOS ~/Library/CloudStorage/*) without changing their risk tier or default selection.
    • Restrict .app bundle detection to macOS folders containing Contents/Info.plist so ordinary project directories named *.app are no longer misclassified as tool homes.
  • 40f2bb2: Projects view: the bar under the total now shows where the reclaimable space is, split by what it costs to get back (cache, install, build), at every terminal width and with a key under it. Once something is queued, its share of each part stays solid and the rest recedes, so one bar shows what is there and what is chosen; it follows the keyboard with no easing. The review dialog says how the queue comes back ("install 5.0 GiB (bun install) · build 3.0 GiB (cargo build)"), and the size bars hold 3:1 contrast in both themes.

  • d73ff3f: Projects view: one definition of "reclaimable" everywhere. Rows, section headers and the top line all count safe and caution items; dangerous and blocked bytes are named beside the total ("+8.8 KiB guarded") and never added to it. While a scan runs the total says "X so far", an incomplete scan says so and offers r, and projects sort by what you can reclaim. After a removal the receipt shows the estimate with a "" next to what the disk actually gained, and says when far less came back (hardlinked installs, another volume).

  • 862f3ce: The project panel describes opt-in kinds (.venv, __pycache__, .gradle...) with the catalog's own note ("virtualenv - slow to recreate") instead of "your pattern", which is now said only for a pattern you wrote yourself.

  • f228a2b: Projects view: keys now act only on what is on screen. Tab no longer sends focus to the hidden folder sidebar (it used to make Space queue a row you could not see), Esc closes an opened project before anything else, and a risk tier or folder scope carried over from the full view is named beside the total ("dangerous only · esc clears"). After a trash apply the notice says the bytes are still on disk instead of "freed".

  • dcbcd55: Projects view: ? shows its own short key list (the full-view list listed i twice with two meanings), narrow terminals drop whole parts instead of cutting a size or a word, and an empty scan says which patterns are opt-in.

  • 5da011b: Make npm installs, Node 22.12+ scans, and UI startup safer across Node, Bun, and Windows:

    • Drop end-of-life Node.js 20 and require engines.node >= 22.12.0 for @kitsunekode/sweep (verified with installed-tarball headless smoke across Node 22.12.x, 22.x, 24.x, and 26.x with optional dependencies omitted and raw non-UTF-8 filenames).
    • Move @opentui/core to optionalDependencies. Bun (bun add -g @kitsunekode/sweep, bunx @kitsunekode/sweep ui, including bun install --production) and Yarn 4 install it automatically. pnpm and Yarn 1 skip linking it on Node older than 26.4 (Yarn 1 prints an engine warning), and npm on Node older than 26.4 leaves @opentui/core unmet and may still extract @opentui/core-<platform> unless --omit=optional is passed. In all of these cases, sweep installs and runs CLI commands on Node.js 22.12+.
    • Verify the resolved @opentui/core version (following npm prerelease semver rules) and required exports before sweep ui loads, reporting the offending path, version, and recovery options (reinstall, bunx, or cross-platform standalone binaries) instead of a raw SyntaxError when a shared global tree holds an incompatible copy. sweep doctor runs the static version and export inspection under Node (and full live-export verification under Bun) and no longer warns about OpenTUI in standalone binaries.
    • Make git authoritative for tracked-file protection across both engines: verify each enclosing repository with git rev-parse --show-toplevel, list tracked paths once with sanitized git ls-files -z --cached --full-name (dropping inherited GIT_* overrides and disabling core.fsmonitor), and match candidates locally using the repository's core.ignorecase and core.precomposeunicode (or macOS NFC/NFD) rules while preserving literal backslashes on POSIX. Committed symlinks matching an artifact name are now blocked as git-tracked, and candidates containing a .git entry at or below them are flagged at least dangerous with contains-git-repository (never pre-selected, and refused at apply unless explicitly selected one at a time). When git is unavailable, the native fallback validates regular files without blocking, enforces extensions.objectFormat, and marks unverified or empty-index repository items dangerous (tracked-status-unknown). Apply refuses with exit code 2 and structured refusal codes git_tracked, tracked_status_unknown, and contains_git_repository.
    • Build the published CLI, UI, and standalone binaries with NODE_ENV="production" and the production JSX transform for @opentui/react (smaller sweep-ui.js, working outer ErrorBoundary in standalone builds, no React development mode), and strip workspace devDependencies and monorepo scripts from the published manifest.
    • Search only absolute PATH directories when resolving the Rust engine and helper binaries (node, git, bun, sync), skipping empty, whitespace-only, ., and relative PATH segments on every platform and never spawning a bare executable name on lookup miss. Lookup still preserves literal spaces in absolute directory names, skips non-executable POSIX files and Windows .CMD/.BAT shims ahead of a real .exe, applies shell-free PATHEXT suffixes to extensionless Windows paths, and reports missing explicitly configured paths instead of silent not_installed.
    • Keep the Rust engine probe's failure reason in sweep doctor and emit both a stable enumerated reasonKind and a human-readable reason sentence for warning checks in sweep doctor --json. --engine auto prints a single stderr note when falling back to JS for any reason other than not_installed. When Bun's JS directory reader cannot start node, report a missing-runtime error rather than a scan resource limit.
    • Projects view search now hints older:30d instead of the nonexistent idle:30d key and shows filter advice for malformed queries.
    • Shell completions now scope --allow-dangerous to clean/apply and complete --view and --theme values in bash, zsh, and fish.
  • e114243: In the projects view, resting on an item lights its share of the size bar and
    lets the other shares recede, and the matching entry under the bar turns bold.
    It follows the cursor at once (no easing: it moves with every key). Terminals
    without pixel graphics show the receded shares as a lighter line.

  • 7d1f51e: sweep status [path] says what you could free right now: the total, which
    kinds hold it, the idle projects holding the most, and how many items are
    protected. --json emits that as a small summary (a few hundred bytes, not a
    whole plan), for status lines and widgets. Only safe and caution items count
    as space; dangerous and blocked ones are reported separately and never added
    to a size. It is read-only.