Ghost Run
PLUGINDry-run mode for Ulpi.
by tnvolman · v0.2.0
What it does
Dry-run mode for Ulpi. With /ghost on, file writes, patches, deletes and terminal commands are redirected into a throwaway copy of the working folder, and network-touching tools and commands are blocked.
Review the diff in the system browser (ulpi ghost ui; the Desktop pane only opens that page), then optionally run one configured Verify command in the ghost (Pass/Fail banner; Apply stays human), then apply selected paths or discard. Commands: /ghost on|off|status|verify; ulpi ghost diff|apply|discard|ui|verify.
Disclosure — copies the working folder into a temp sandbox (reflink, then copy; never a hard link) and runs the agent's terminal commands on the host with the working directory set to that copy; only literal absolute paths under the real folder are rewritten, so a command naming ~, $HOME or another absolute path still acts on the real disk, and MCP or other plugin tools are not redirected; Ghost Mode is process-wide, so in a gateway it covers every chat in that process; writes session state under the Ulpi home from ulpi_constants.get_ulpi_home (then ULPI_HOME, then ~/.ulpi), in ghost-run/; "apply" writes the chosen changes back to the real folder only after a person presses Apply or runs /ghost apply, and that copy does not pass through Ulpi's file-write denylist; /ghost apply and ulpi ghost apply with no paths apply every current change and can copy a named path that is in the ghost tree even if it is not in the diff; the review page never auto-ticks HIGH-risk files and asks to confirm any it names; ulpi ghost ui binds 127.0.0.1 only, checks Host, requires a per-session token sent in the X-Ghost-Run-Token header (query-string tokens are ignored), sends no CORS headers, and POST /api/apply accepts only a non-empty list of paths that are all in the current diff; Verify runs one command taken from GHOST_RUN_TEST or the project's.ghost-run-test on the host inside the ghost copy, only after you approve that project and exact command
Review notes
What an owner reads and accepts before the install is approved.
- Ulpi has not reviewed this version: it is listed in the public plugin catalog, and the install still fetches it at its pinned commit, checks its shape and scans it before you approve