Skip to content

fix: safer Windows agent start, longer stdio relay wait, single instance on Windows and Linux, cloud session import, .aup aliased audio on Windows - #28

Merged
nodemode-ai merged 7 commits into
mainfrom
fix/review-2026-11-28
Nov 29, 2026
Merged

nodemode-ai merged 7 commits into
mainfrom
fix/review-2026-11-28

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • On Windows, an npm .cmd shim for an agent program now starts the node script or program it names directly, with no command interpreter in between, so every word (prompt, context, flags) reaches the program unchanged.
  • Any other .cmd or .bat still runs through the command interpreter, but only with words it passes on as they are. It refuses control characters including line breaks, % and double quotes, and allows the interpreter's special characters only inside quoted words. A path counts as a batch file in any letter case, and also with trailing dots, trailing spaces or a ::$DATA stream name. A refused start shows a clear message in Chat, returns 422 from the terminal routes, and closes the Windows terminal socket. The shared finder is now version 1.0.2.
  • The stdio MCP relay now waits 780 s, longer than the consent wait and the bridge wait together. If it still times out, it says the call may still be running instead of saying formwav is closed.
  • On Windows and Linux, launching formwav again (for example by opening a .fmw) hands the file to the running window or brings that window forward, through tauri-plugin-single-instance (MIT or Apache-2.0, listed in LICENSES.md). macOS is unchanged.
  • A .fmw imported from Google Drive or Dropbox is now checked and named like an uploaded one. A file that is not a session gets 415, odd names are cleaned instead of causing a 500, and a name already taken becomes 'name (2)'.
  • Audio that an .aup reads in place is now written to a closed temporary file before ffprobe and ffmpeg read it, so these imports work on Windows.
  • On Windows, a .cmd or .bat that still starts through the command interpreter now refuses any word with a control character or any of & | < > ^ ( ) ! % ", quoted or not. The message suggests passing long text through standard input or a file.
  • When the program path holds a space, no other word may need quotes, so the interpreter keeps the path's quotes.
  • npm-style .cmd shims keep starting their node script or program directly, with no command interpreter.
  • Shared agent finder 1.0.2: recorded hash updated, and the Windows start tests are expanded to 20.

Tests

  • Each fix has a test that fails on the previous code where practical.
  • The repo CI commands were run locally on macOS. Every failure seen locally also fails on main in the same environment (missing local tools or platform-specific tests); none is introduced here.
  • Please rely on this PR's CI run for Linux and Windows.

For the owner

  • A few related items need an owner decision; they are listed separately, not here.

How to ship

  • Independent of other repos; merge in any order. No version bump; release as usual.

A package manager's .cmd shim is started as the node script or program it
names, so every word reaches it unchanged. Any other .cmd or .bat still runs
through the command interpreter, but only with words it passes on as they
are: no control characters, % or double quotes, and its special characters
only inside quoted words. The shared finder moves to 1.0.2.
The relay gave up after 180 seconds while a call can wait for consent and
then run for up to 600 seconds, and it reported the timeout as formwav not
running. It now waits longer than both together and says the call may still
be running when it does time out.
A .fmw from Google Drive or Dropbox now goes through the same check and
naming as an upload: a file that is not a session is refused with its
reason, and a name with characters a session name cannot hold is cleaned
rather than failing the import.
The file was held open as a delete-on-close temporary file while ffprobe and
ffmpeg read it, which Windows does not allow. It is now written to a
temporary folder and closed first.
Opening a .fmw while formwav runs started a second copy whose engine found
the data folder in use and showed an error. A second launch now hands its
file to the running window, or brings that window forward, through the
single-instance plugin. macOS already did this and is unchanged.
… batch file

On Windows a .cmd or .bat path followed by dots, spaces or ::$DATA still
starts as a batch file, so it now gets the same checked start as any other
batch file. The 1.0.2 finder's recorded hash follows.
A batch file reads its words again through %*, so quotes do not keep the
command interpreter from acting on its own characters. When a .cmd or .bat
still starts through it, a word holding a control character or any of
& | < > ^ ( ) ! % " is now refused whether it is quoted or not, and a program
path with a space allows no other word that needs quotes. The message points
long text to standard input or a file. The 1.0.2 finder's recorded hash
follows.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 18:20
@nodemode-ai
nodemode-ai merged commit 5ec7fcc into main Nov 29, 2026
9 checks passed
@nodemode-ai
nodemode-ai deleted the fix/review-2026-11-28 branch November 29, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants