Skip to content

fix: agent consent for chosen-path exports, safer Windows agent starts, guest sockets, media headers and whole-file saves - #27

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

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

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • export_deck with a path the agent chose now goes through the consent check, and is refused when the person has blocked agents. The agent manifest is regenerated to match.
  • A share-link connection counts as a guest from the moment it opens, so agent questions and tool calls never go to it.
  • Library media and unpacked files are served with nosniff and a sandboxed content policy.
  • Saves and exports write a temporary file and then move it into place, keeping the file's mode and following a symbolic link to the file it points to. A failed write no longer cuts the original file short.
  • Agent programs started through the Windows command interpreter now refuse any argument that holds a control character or one of & | < > ^ ( ) ! % ", quoted or not, and the message points to standard input or a file for long text. npm shims are still run directly as their exe or node script with no interpreter.
  • Shared finder 1.0.2 recorded hash updated; new unit tests cover the direct shim path and the strict interpreter checks on any OS.

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.

export_deck with a path writes a file outside the Exports folder, so it now
goes through the same consent check as other changing tools, and is refused
when the person has blocked agents. Exports with no path still write into the
Exports folder without asking.
A shared window was counted as a formdeck window until it sent hello, so
agent questions and tool calls could be routed to it. The connection is now a
guest as soon as it opens.
Library media and unpacked files now carry nosniff and a sandboxed content
policy, so a stored file opened directly in a browser cannot run script on
the engine's origin. Pictures, video, audio and fonts load as before.
The agent manifest is generated from the consent gate; regenerate it now that
export_deck to a chosen path asks the person.
On Windows a Claude Code install that is a .cmd shim is started through the
command interpreter, which reads the command line with its own quoting rules
and stops at the first line break. The Chat and layout ideas prompt now goes
on standard input, and a tab started that way gets its first message typed
in after it opens.
Saves and exports wrote straight into the chosen file, so a write that failed
partway left it cut short. They now write a temporary file beside it and move
it into place, keeping the file's permissions, and a failed outline, GIF or
composed export answers with a clear error.
…nterpreter

On Windows a .cmd or .bat agent program was started through cmd.exe /c
with its arguments as they were. The shared finder (1.0.2) now follows an
npm shim to the exe or node script it starts and runs that directly. Any
other .cmd or .bat still goes through the interpreter, and a word with a
control character, a percent sign or a double quote, or with one of the
interpreter's special characters outside a quoted word, is refused with a
clear message.
The command interpreter keeps the quotes of a /c line only when there are
exactly two with nothing special between them; otherwise it drops the
first and last quote, which shifts every quote in between. The shared
finder (1.0.2) now refuses a program path that holds & | < > ^ ( ) ! @,
and a quoted program path followed by another quoted word. A name such as
claude.cmd. counts as a .cmd, and an npm shim is not followed to a node on
PATH that is itself a .cmd or .bat. The recorded hash of 1.0.2 is updated.
Saving over a file that is a symbolic link replaced the link with a plain
file. The whole-file write now follows the link and replaces the file it
points to, as the direct write did before.
A .cmd file passes its words on with %*, which the command interpreter
reads again, and quotes do not hold against its expansion, so a quoted
word is no protection. When the interpreter is still used (a .cmd or .bat
that is not an npm shim the finder can follow), any word holding a control
character or one of & | < > ^ ( ) ! % " is now refused, with or without a
space, and the message points to standard input or a file for long text.
An npm shim is still run directly as its exe or node and script. The
recorded hash of the shared finder 1.0.2 is updated.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 18:18
@nodemode-ai
nodemode-ai merged commit ea15b44 into main Nov 29, 2026
5 checks passed
@nodemode-ai
nodemode-ai deleted the fix/review-2026-11-28 branch November 29, 2026 18:57
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