Drive input automation from standard input - #499
Merged
Merged
Conversation
|
✅ Development package |
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.
Lets an external process, such as an LLM agent running one shell command at a time, drive a Pixely app through
IInputAutomationwith a text protocol on standard input.InputAutomationCommandInterpreterruns one line (mouse move 320 180,key press LeftCtrl,text hello, ...) againstIInputAutomationand answersok, orerror: <reason>for a malformed line. Handler exceptions propagate like real input.InputAutomationConsolereads lines on a background thread and runs those queued before the frame on the frame loop at the newUpdateOrders.Input(-10 000), one reply line per command on standard output. The per-frame drain is bounded to what was queued at frame start.AddInputAutomation()registers the console; it reads raw standard input so terminal mode is never changed.tail -f commands.txt | app > replies.txtrecipe indocs/input-automation.md, new row indocs/frame-order.md.PixelyAppBuilderis not unit tested becauseBuild()creates the GPU device; verified with a manual run of the Hotbar tutorial.