Repository navigation
fix: keep the engine to this computer, show local paths in agent requests, and start Windows launchers safely - #18
Merged
Merged
Conversation
A checkout given to submit from the command line or the MCP server is now used for that submit only, passed in the request body, and is not saved. Only the window can change registry.checkout, as with agent_access.
…pkg files The request the window shows for an outside tool call now names the local file or folder the call reads or writes. package out is a folder or a file name ending in .formpkg, written through a temporary file. run_op decides once whether a call goes to the running engine, so a call is never run in this process after that answer.
At most eight outside requests wait for an answer at once; another is refused at once with a sentence. The answer, request list and health routes run on the event loop, so waiting requests cannot hold them up.
Every HTTP request and WebSocket whose Host is not localhost, 127.0.0.1, ::1 or tauri.localhost is refused, and the live event socket now checks Origin and Host as the terminal sockets do. The loopback check moves to services/local_host.py and the terminal routes use it. Test clients address the engine at 127.0.0.1.
… TOML string agents install and the Studio's own agent tabs now name formext.bat as the MCP launcher on Windows, and the Codex block escapes the command path, so a Windows path keeps config.toml readable.
…s to cmd.exe services/agent_start.py follows an npm .cmd launcher to the node script or program it runs and starts that directly. Any other .cmd or .bat goes through the command interpreter only when no word has a control character, %, a double quote, or one of & | < > ^ ( ) ! outside a word that will be quoted. The shared finder is left unchanged.
…r not cmd /c can drop the outer quotes of a command line that holds more than two quote characters, for example when the launcher folder has a space, so a quoted word is no protection there. Any word with one of & | < > ^ ( ) ! is now refused for a .cmd or .bat that is not an npm launcher.
…requests The request text now names the path a tool will really touch, with control and direction characters written as escapes. package out keeps a trailing separator so a new folder is made, and writes through an exclusive temporary file. Claiming the window key checks Origin and Host.
A word that cannot be passed safely to a .cmd or .bat launcher through cmd.exe is refused with a message that now suggests stdin or a file for long or special text. Tests cover the message, a capitalised .BAT with COMSPEC from the environment, and an npm launcher with no node to run it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests
For the owner
How to ship