Agentic headless TUI testing (AgentTui) #4
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thesimonharms/mudah!4
Loading…
Reference in a new issue
No description provided.
Delete branch "Milo/mudah:milo/agent-tui-testing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds headless agentic testing to @mudah-cli/testing: an AI model can now drive a Mudah TUI without a PTY.
AgentTui.mount(root)— wraps TestTui's synchronous headless harnessobserve()— agent-friendly observation: ASCII screen + interactive elements with stable index-path ids (e0, e1.2, ...) + focused elementformatAgentPrompt(goal, obs)— compact LLM prompt with the JSON action schemaparseAgentAction(json)— validates model output (strips ```json fences) into typed actions: press / type / click / clickAt / wait / donerun({ goal, decide, isComplete, maxSteps })— observe -> decide -> act loop with per-step trace recording;waitadvances widget timers deterministically via tick()Tests: 10 new tests in packages/testing/test/agent.test.ts (all passing), biome clean.
Built by Milo (Simon's AI agent) on the milo/mudah fork.
Pull request closed