Skip to content

0.1.9: keep a patch's base parent, apply a patch in parts, and settle settings per machine

Choose a tag to compare

@tomw1808 tomw1808 released this 23 Oct 11:46
· 7 commits to main since this release
9272597

Acts on the third field report in #5 (0.1.8 on Linux and Windows 11), and on the report from a night of reviews on 0.1.8.

Update: /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. From 0.1.9 on, a runtime that boots after the install re-reads the profile's stamp, so the version warning clears without a reconnect.

Fixed

  • drift.commitsBehind after a restart. The patch record did not keep the base's parent, so commitsBehind was null for every patch read from disk: after a restart, for a salvaged patch, and for a patch from another session. The record now keeps it.
  • The profile-version warning clears by itself. The stamp is re-read whenever a runtime boots, and a result carries the verdict of the runtime that served it. A runtime that booted before the install keeps its warning until it is replaced.
  • A background call with bad arguments fails at once, with the same error a foreground call gives, instead of becoming a job that fails seconds later.

New

  • flash_apply with files. Apply only some files of a stored patch, named as change.filesChanged names them (a rename by either path). Applied files are recorded one by one (appliedFiles, also on flash_patch's first page), so the rest can follow later. A whole apply after a partial one is refused with the count; force: true lifts it.

    This makes a review's proof tests reusable: run the review as a writing call with apply: "none", read its tests with flash_patch, then flash_apply with files naming only the test files. They become the fix round's failing-first tests.

  • Settings per platform and per machine. .flash-agents.json may hold a platform object keyed by Node's platform names (win32, linux, darwin, …), and a git-ignored .flash-agents.local.json holds one machine's paths, in the same shape. Layers apply in this order: shared file, its platform section, local file, its platform section, server options.

    • slotEnv merges by name (case-insensitively on Windows); null removes an earlier entry.
    • copyExclude and slotSetup add up; the last copyExcludeDefaults wins.
    • The start log names the layers it applied. It warns once when the local file is tracked or not ignored by git, and per call when either file changed after start.
  • A start line in the log. Every launch logs start pid …; flash-agents <version>; node …; <platform>; root … first, and answered initialize <n> ms after the process started once the handshake is answered. A client that never launches the server leaves no start line; a slow start shows in the number.

  • Windows: state_base permissions. A folder made directly under C:\ gives you "modify" but not the right to change permissions, and every shell command in a slot then fails with SetNamedSecurityInfoW failed (Win32 5). doctor has a new state-base-permissions row that tries the sandbox's grant on a test folder and names the fix: icacls "C:\fm" /grant "%USERNAME%:(OI)(CI)F". The README says so next to the C:\fm example.

  • node install.mjs also marks the interactive profile's plugins folder as ES modules, but only when every plugin there is one. It says why when it leaves the folder alone, and never touches a package.json it did not write.

  • The description of source now says "head" applies to writing calls only.

Verification

716 unit tests (660 in 0.1.8) pass, and so do all 116 live checks with 0.1.9 installed in a throwaway profile. Two independent review rounds went over the change. They found defects in file names a patch record or a diff header cannot spell plainly (a tab, a newline, a leading quote, a path containing b/), in the ESM check, and in the order of background refusals. Every defect they confirmed is fixed, each with a test that fails without the fix.