Repository navigation
Computer use lands in the language: computer.observe, typed actions, replay with drift checks #116
NekomyaDev
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This one has been in the works for a while, and it is now merged into main.
Nudge programs can now use the computer as a typed effect.
computer.observe(app)returns anObservation— the accessibility tree as text, the element list, and optionally a screenshot. Thencomputer.click,computer.type,computer.key,computer.scroll,computer.set_value,computer.drag,computer.perform, andcomputer.pastereturnActionResult. Every call goes through the effect system like everything else in the language: inferred, checked, and recorded one NTF trace per step.The division of labor is deliberate: the language owns control and safety, the model owns perception and judgment. App allowlists (
allow: [...]), deadlines, theNUDGE_COMPUTER_KILL=1kill switch, and replay are compiler/runtime guarantees. What the screen means and what to do next — that is the model's job, fedobs.treeorobs.driftthrough a plainllmblock ordecide{}.A few details worth knowing:
NUDGE_COMPUTER_DRIFT=1the runtime re-observes live and attaches a mechanical diff (tree diff + screenshot hash) for the model to interpret.tools/cu_bridge.py) speaks a documented JSONL contract and enforces hardening invariants: one controller at a time, stale element indices are refused instead of blind-clicked, and every action returns a dispatch receipt so retries are provably safe.nudgec testat $0 — and a live X11 backend (AT-SPI + xdotool) behind the same contract.llmblocks can now carry images, so screenshots can go straight to multimodal models.The full RFC is in
docs/computer-use.md. There is a working example underexamples/computer-automation— record, replay, and drift-check it with the fake provider, no API key needed.Feedback and bug reports welcome here or in issues. What would you automate with this?
— The Nudge maintainers
All reactions