Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ jobs:
- uses: Swatinem/rust-cache@v2
if: runner.os == 'Windows'
with:
workspaces: native/diskhound-native-scanner
workspaces: |
native/diskhound-native-scanner
native/diskhound-mcp

- name: Build native scanner for USN integration
if: runner.os == 'Windows'
Expand All @@ -84,7 +86,9 @@ jobs:

- uses: Swatinem/rust-cache@v2
with:
workspaces: native/diskhound-native-scanner
workspaces: |
native/diskhound-native-scanner
native/diskhound-mcp

- name: Cargo check
run: cargo check --manifest-path native/diskhound-native-scanner/Cargo.toml
Expand All @@ -97,6 +101,12 @@ jobs:
DISKHOUND_REQUIRE_USN_TESTS: ${{ runner.os == 'Windows' && '1' || '0' }}
run: cargo test --manifest-path native/diskhound-native-scanner/Cargo.toml

- name: Test MCP stdio bridge
run: cargo test --locked --manifest-path native/diskhound-mcp/Cargo.toml

- name: Build MCP stdio bridge
run: cargo build --locked --release --manifest-path native/diskhound-mcp/Cargo.toml

- name: Cargo build (release)
run: cargo build --release --manifest-path native/diskhound-native-scanner/Cargo.toml

Expand Down Expand Up @@ -129,7 +139,9 @@ jobs:

- uses: Swatinem/rust-cache@v2
with:
workspaces: native/diskhound-native-scanner
workspaces: |
native/diskhound-native-scanner
native/diskhound-mcp

- name: Install dependencies
run: bun install --frozen-lockfile
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,25 @@ jobs:
cp native/diskhound-native-scanner/target/${{ matrix.rust-target }}/release/diskhound-native-scanner native/diskhound-native-scanner/target/release/diskhound-native-scanner
fi

- name: Build and stage MCP stdio bridge
shell: bash
run: |
crate=native/diskhound-mcp
mkdir -p "$crate/target/release"
if [ "${{ runner.os }}" = "macOS" ]; then
cargo build --locked --release --target aarch64-apple-darwin --manifest-path "$crate/Cargo.toml"
cargo build --locked --release --target x86_64-apple-darwin --manifest-path "$crate/Cargo.toml"
lipo -create -output "$crate/target/release/diskhound-mcp" \
"$crate/target/aarch64-apple-darwin/release/diskhound-mcp" \
"$crate/target/x86_64-apple-darwin/release/diskhound-mcp"
lipo -info "$crate/target/release/diskhound-mcp"
else
cargo build --locked --release --target ${{ matrix.rust-target }} --manifest-path "$crate/Cargo.toml"
suffix=""
if [ "${{ runner.os }}" = "Windows" ]; then suffix=".exe"; fi
cp "$crate/target/${{ matrix.rust-target }}/release/diskhound-mcp$suffix" "$crate/target/release/"
fi

- name: Verify native binary exists
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dist-electron/
dist-renderer/
/release/
native/diskhound-native-scanner/target/
native/diskhound-mcp/target/
/test-results/
/playwright-report/
.turbo/
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ WinDirStat was the gold standard for a decade. DiskHound is what it would be tod
- 🔗 **Easy Move** — move a large file to another drive, leave a symlink or junction in its place. Fully reversible. Tracks every move so you can put files back with one click. Offers a one-UAC fast-scan mode for system installs.
- 📁 **Folder explorer** — drill into directories with breadcrumb navigation and proportional size bars.
- 🧹 **Dev Artifacts** (`Ctrl+4`) — groups worktrees, `node_modules`, Rust `target/` trees, package caches, and venvs. Pick trees and permanently delete them. A finished scan writes a sidecar so the tab opens without reading the drive again.
- 🤖 **AI agents (MCP)**: let Claude Code, Claude Desktop, Codex, or another MCP client read your scans, run scans, and steer the window while it helps you free up space. Agents get DiskHound's cleanup procedures (including the APFS clone and Time Machine snapshot checks on macOS). You approve each agent in DiskHound and pick what it may do; nothing moves to the Trash or is deleted without your confirmation, and anything a session isn't allowed to do is refused and logged. Claude connects through the bundled stdio helper, Codex over HTTP with OAuth. Off by default; start from the robot button in the header, or see [docs/mcp.md](docs/mcp.md).
- 🛎️ **Drive monitoring** — periodic free-space polling with delta alerts when space drops meaningfully. Rolling history of drive-level events is persisted.
- ⚙️ **Processes viewer** — real-time memory + CPU sampling for every process, with icons pulled from each executable. **Four views**: List, Treemap, scrolling CPU Heatmap (time on X, process on Y), and details.
- 🎮 **GPU viewer** — per-process GPU utilisation + VRAM pulled from Windows `\GPU Engine(*)` / `\GPU Process Memory(*)` performance counters. Adapter overview (3D / Compute / Decode / Encode stats).
Expand Down Expand Up @@ -156,6 +157,10 @@ src/
├── preload.ts Context bridge (IPC → renderer)
├── nativeScanner.ts Spawn and manage the Rust binary
├── scan/scanWorker.ts JS fallback scanner (worker thread)
├── mcp/ Local MCP server for AI agents (loaded on first enable)
│ ├── server.ts Tools, prompts, and SEP-2640 skills
│ ├── agentOAuth.ts OAuth 2.1 provider (DCR, PKCE, native approval)
│ └── electronHost.ts Approval window, Trash confirmation, Settings IPC
├── shared/
│ ├── contracts.ts All TypeScript types and IPC interface
│ ├── scanDiff.ts Snapshot diff algorithm (top-N)
Expand All @@ -172,6 +177,8 @@ src/

native/diskhound-native-scanner/
└── src/main.rs Rust scanner (Win32 APIs + dua-core)

skills/ Cleanup procedures served to agents over MCP
```

The native scanner uses Win32 APIs on Windows and [dua-core](https://crates.io/crates/dua-core),
Expand Down
Loading
Loading