Skip to content

0.1.8: place every path where its command runs, and say when the install drifted

Choose a tag to compare

@tomw1808 tomw1808 released this 22 Oct 18:08
· 8 commits to main since this release
4b21310

Acts on the second field report in #5 (0.1.7 on Linux, and a Windows night on 0.1.5).

Update, with one more step this time: /plugin marketplace update flash-agents, update the plugin, then run node install.mjs in the plugin folder and restart Claude Code (or /mcp reconnect plugin:flash-agents:flash). A clone: git pull, then node install.mjs. A plugin update replaces the server but not the worker profile, and the guard lives in that profile. From 0.1.8 on, the server warns when the two differ.

Fixed

  • The guard places every path where its own command runs. It used to check redirects, write targets and secret reads against the folder a command line started in. So cd server && … > ../log was refused, and cd .. && echo x > ../elsewhere was not caught by the guard at all. It now follows cd, pushd, popd and cd -. It also understands:

    • newlines and here-docs
    • ( … ), { …; }, $( … ) and backticks
    • if/for/case blocks
    • >|, <> and redirects written without a space (echo hi>../f)
    • prefixes: NAME=value, env, exec, timeout, nice, bash -lc, eval
    • more programs that write: mkdir, chmod, truncate, tar -C, unzip -d, patch

    rm -rf <copy>/ with a trailing slash is now refused like rm -rf <copy>. A guard error, or commands nested more than 32 levels deep, denies the call with GUARD_ERROR instead of letting it through.

  • flash_apply no longer loses an edit silently. A patch that deletes or renames away a file you changed since the worker's copy was made is refused. threeWay: true merges it and keeps your edit (marking any conflicts); force: true discards the edit.

  • Node's MODULE_TYPELESS_PACKAGE_JSON warning at every runtime start is gone.

New

  • Installation drift is named. install.mjs stamps both worker profiles with the release that installed them. If a profile is from another release or missing, the server warns at start and in every task result, and doctor has a profile-version row.
  • A missing dsh is reported at start. The message names a launcher it finds under another nvm, nvm-windows or volta Node version.
  • An edited .flash-agents.json is reported. If it changed after the server started, every task result warns until a reconnect.
  • Windows path length. The plugin option state_base (FLASH_STATE_BASE, --state-base) moves the folder the copies live under; the path must be absolute. On Windows, a copy whose path is longer than 64 characters gives a warning and a slot-path-length doctor row, because MSVC cl.exe fails past 260 characters.
  • flash_status shows backgrounded commands. While a worker waits on a background command, current names that command (background: <job id>). A failing background command counts toward the repeated-failure warning.
  • drift on flash_apply and flash_patch. commitsBehind counts the commits on your HEAD since the copy was made; filesChangedSince lists the patch's own files you changed since. The apply warns when that list is not empty.
  • Three more worker guidance lines:
    • run commands bare, so their exit code shows
    • list anything removed or left out
    • name files changed outside the task's files

Verification

660 unit tests (560 in 0.1.7) pass, and so do all 116 live checks with the new guard installed. Three independent review rounds went over the change; everything they confirmed is fixed, each with a test that fails without the fix.