On Linux a switched-off screen (a closed laptop lid) no longer counts as the one the GPU drives, and PCI ids pick a card only when no other card shares them (follow-up to #659).
On Linux the window is drawn on the GPU that drives the screen (the built-in panel's, or the only one with displays), so laptops with two GPUs open fast and don't lag; WGPU_ADAPTER_NAME and WGPU_POWER_PREF still decide (fixes#571). Replays #578.
Co-authored-by: Thân Minh Nghĩa <thanminhnghia3@gmail.com>
Replays #616, #617, #619, #620 and #621. Aider isn't offered until it has an adapter, Antigravity is found under a redirected LOCALAPPDATA, servers with only specialised models aren't set up for chat, an SSE event's data is capped, and a retry keeps the original request when the agent's session can't be restored. Program lookup adds lower-case extensions on Windows.
Co-authored-by: Afloat <132809511+Afloat16@users.noreply.github.com>
A program that is on disk but can't start (an npm script whose node is missing) says where it is and what to check, instead of "isn't installed"; on Windows an .exe is started by the path it was found at (refs #152, #95).
Fixes a flaky platform test: on macOS an accepted socket inherits the listener's non-blocking mode, so the keep-awake stand-in helper dropped a stop that arrived after accept.
Replays #597, #598, #600 and #601. The preview server answers only requests addressed to this computer, streams files, sends no body for HEAD on a missing file, caps open connections and gives a request head one deadline.
Co-authored-by: Afloat <132809511+Afloat16@users.noreply.github.com>
The rebuild releases its keep-awake helper before reporting Finished, and dropping the guard waits up to five seconds for the helper to stop (logging if it doesn't), so a CLI that exits right away no longer leaves it running.
The engine had its own `write_atomic` (used for `craft.json`, the inbox, reports and session files). Its temp file was named by process only, so two threads saving the same file at once wrote into one temp file. One rename then found it gone ("craft.json: No such file or directory"), and the file could end up with two versions mixed ("trailing characters").
The engine now uses the platform crate's `write_atomic`, which already gave each write its own temp file and kept the file's permissions. It also gains the engine's short retry when Windows briefly can't replace a file another program holds open. There is one atomic writer now; docs/pitfalls.md says so.
**Verified:**
- A new engine test: four threads each save one file 50 times and read it back. Every save succeeds, every read is one whole version, and no temp files are left. It fails against the old engine writer (checked) and passes now.
- The existing "file held open for a moment" test still passes.
- `cargo test -p craft-anything-engine` (397), the platform fs tests, clippy on both crates and fmt.
**Not covered:** two saves that overlap can still each start from what was on disk, so the later one wins for fields that aren't the person's (the person's fields are kept, as before). That's separate from the write itself.
Fixes#273
On a timeout with a grace period, a capture sent SIGTERM to the group, then waited only for the leader. When the leader exited, it skipped the SIGKILL, so a helper in the group that ignores SIGTERM kept running after the capture returned (reported as `still_running` / `incomplete`).
Now the grace period waits for the whole group to be gone, reaping the leader as it goes so a zombie doesn't count. Whatever is left afterwards gets SIGKILL. `settle` uses the same group check.
**Verified:**
- A new Linux/macOS test with the reporter's helper (ignores TERM and HUP, outlives the leader): the capture must settle, verify cleanup and report SIGKILL.
- `cargo clippy -p craft-anything-platform --all-targets --target x86_64-unknown-linux-gnu -D warnings`, fmt.
**Not verified locally:** this machine is Windows without WSL, so the new test first runs in CI (Ubuntu). macOS isn't run; it uses the same code.
Fixes#230
A runtime capture compared a file's size, type and hash. When the file was over the hashing budget (or couldn't be read), neither snapshot had a hash, so a rewrite at the same size was reported as `unchanged`. Now:
- such a file is `unknown`;
- a file is `modified` only when its size or type changed, or both hashes exist and differ;
- a symlink pointed somewhere else with a target of the same length is `modified` (only the target's length was compared before).
**Verified:** a new unit test of `effects` (unhashed on either side, equal and different hashes, a size change, symlink retargets); `cargo test -p craft-anything-platform` (47 passed), clippy, fmt. The test runs on every OS, unlike the shell-based capture tests.
**Not verified:** a live run of the issue's capture probe on macOS.
Fixes#229
project_play's help says that on Windows a started program inherits the caller's output pipe (#207), and the reproducing test is kept in platform as an ignored test.
npm's global prefix, from NPM_CONFIG_PREFIX or prefix= in ~/.npmrc (its bin folder outside Windows), is searched after PATH with the other usual folders, without running npm. Fixes#132.
The engine test no longer connects to the stopped stand-in's port, which another parallel test could be handed; platform::standin_server tests that dropping a server frees its port, trying it for a moment.
console_text waits for the program's output to arrive and settle before closing the console, waits up to 15 s for it, and says so instead of returning an empty screen.
~/.opencode/bin, ~/bin and the bin folders of nvm's Node versions (newest first) are searched after PATH with the other usual folders, so a desktop-started app finds OpenCode from its own installer and agents npm installed under nvm.
frida_devices_find runs frida-ls-devices in a pseudo console on Windows, where it crashed on pipes and hung; frida_targets_list falls back to plain processes; device columns split on two spaces. Fixes#58.
WinGet's Links folders, per user and machine-wide, join the folders searched after PATH, so an app started before a WinGet install of Claude Code still finds it.
When a coding agent or tool crashed with a stack trace, the error's headline was the trace's last
frame ("OpenCode stopped with exit code 1: at <anonymous> (/$bunfs/root/chunk-….js:96:6417)"),
which says nothing about what went wrong. The headline is now the line above the trace (searched
in all of stderr, since a trace can outrun the excerpt), with Java's "Caused by" and Node's
version footer handled; output without a trace keeps its last line.
Refs #15
npm installs Gemini CLI, Codex and often Claude Code on Windows as .cmd shims. They were found,
but Rust starts only .exe files by bare name, so every build stopped with "gemini isn't installed
or isn't on your PATH". An npm (or pnpm) shim's script now runs with Node directly, so a prompt
with line breaks or over cmd.exe's 8191 characters arrives whole; any other batch file starts by
its full path. The usual Windows install folders (~\.local\bin, npm, bun, cargo) are searched
after PATH.
Fixes#18
* Stop deadlocks as they form and watch every lock for one that never lets go
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Give the stuck-lock banner's test a program of its own
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Explain failed agent runs, keep a log to open, and stop offering git servers as computers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix a lock-up: the build's agent setup took the session lock twice in one statement
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
SSH hosts that point at a git server (named after one, or with its HostName or User git) are left out of the AIs found on the computer and the remote-machine picker. Programs are looked up and started with PATH plus the usual install folders (~/.local/bin, Homebrew, npm, bun, volta, cargo), which a Mac app opened from the Dock doesn't get.
A native, pure-Rust app that shows anyone how a piece of software works, with
evidence-backed answers, then helps them rebuild it. It ships a desktop app, a
CLI and an MCP server, all driven by one engine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>