Skip to content

Drive input automation from standard input - #499

Merged
stanoddly merged 1 commit into
mainfrom
stdin-input-automation
Sep 12, 2026
Merged

stanoddly merged 1 commit into
mainfrom
stdin-input-automation

Conversation

@botoddly

Copy link
Copy Markdown
Collaborator

Lets an external process, such as an LLM agent running one shell command at a time, drive a Pixely app through IInputAutomation with a text protocol on standard input.

  • InputAutomationCommandInterpreter runs one line (mouse move 320 180, key press LeftCtrl, text hello, ...) against IInputAutomation and answers ok, or error: <reason> for a malformed line. Handler exceptions propagate like real input.
  • InputAutomationConsole reads lines on a background thread and runs those queued before the frame on the frame loop at the new UpdateOrders.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.
  • Docs: command table and a tail -f commands.txt | app > replies.txt recipe in docs/input-automation.md, new row in docs/frame-order.md.
  • Tests for the interpreter (dispatch, malformed lines, propagation) and the console (order, calling thread, replies). Registration through PixelyAppBuilder is not unit tested because Build() creates the GPU device; verified with a manual run of the Hotbar tutorial.

@stanoddly
stanoddly enabled auto-merge (squash) September 12, 2026 07:18
@stanoddly
stanoddly merged commit c9784a7 into main Sep 12, 2026
1 check passed
@stanoddly
stanoddly deleted the stdin-input-automation branch September 12, 2026 07:20
@github-actions

Copy link
Copy Markdown

✅ Development package Pixely 0.0.48 published successfully.

Workflow run (attempt 1)

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