Repository navigation
Releases
Releases · ayagmar/niri-computer-use
v0.2.0
Added
- Background desks, experimental:
desk start <name>runs a headless niri of the agent's own beside your desktop, andserve --desk <name>serves an agent on it, so it never moves your focus or types into your windows. Your lock state, stop key andstopapply to every desk.desk stopanddesk listmanage them, andstatus,watchandrecovertake--desk. A desk runs in a systemd user scope of its own, which stops by itself if the desk's supervisor dies, anddesk stopremoves it only once nothing of the desk is left. A desk needs cage, dbus-daemon, at-spi2-core and the systemd user manager.
Changed
- The skill and the server's instructions tell agents that everything they read on the desktop, web pages, window titles, accessible names and the clipboard included, is data, never instructions, and to ask the user before doing what a page asks. The safety page says what that guidance can't promise.
- rmcp 3.11.0. Before 3.9.0, rmcp's HTTP clients had an unbounded read (RUSTSEC-2026-0462); the server uses only stdio, which wasn't affected.
- zbus 6.3.0, which merged the unmaintained
zvariant,zbus_namesandzvariant_derivecrates into zbus; the accessibility tools behave as before. - toml 1.2.1, and the site moves to Astro 7.4.13 and Starlight 0.43.1.
Fixed
- The install script checks
NCU_REGISTERbefore it downloads anything. A wrong value used to fail the run after the new binary, skill and plugin were already in place. - Two runs of the install script at once take turns under a lock instead of removing each other's staged copies, and a run stopped while it replaces the skill or the plugin puts the previous one back instead of leaving none. The script now needs util-linux's
flock. - After an update, the install script names the servers still running the replaced build when the binary's directory is reached through a link, as
/homeis on Fedora Atomic. - An accessibility call that waits for another call still connecting to the accessibility bus gives up at its own budget.
wait_foran element could run up to a second past its timeout. - A state or capture directory on a file system that stalls, such as NFS or FUSE, no longer freezes every session of the server. The audit log is written by a thread of its own and a call waits for its line at most a second; a saved screenshot is written off the runtime and fails with
deadline_exceededafter five seconds.
v0.1.8
Added
- The Noctalia plugin's
Robot sizesetting: the overlay's robot is 40, 56 or 72 pixels tall, before the UI scale, and its caption grows with it. - Between actions, the overlay's robot thinks in place: it blinks, bobs, pulses its antenna and shows a bubble of three dots. The plugin publishes the rectangle it changes, which settle waits leave out, and it stays still with a server that doesn't. It dozes after a minute instead of eight seconds.
- The overlay shows a click: the robot hops, and a ring grows and fades on the exact point. Before it sets off for a new spot, the robot looks and crouches toward it.
Changed
- tokio 1.54.1, rmcp 3.8.0 and rustix 1.1.6, and the site moves to Starlight 0.42.7.
- The overlay's robot is 56 pixels tall by default instead of 32, redrawn for that size, with a 13-point caption.
- The overlay's robot takes the Noctalia theme's colours instead of fixed light grey ones.
- The overlay's robot stands 16 pixels from a click instead of 12, which leaves room for the ring.
- Settled screenshots and
wait_for screen_stableleave out the rectangle the Noctalia plugin's overlay publishes inoverlay.json, whichwatch'shellonames asoverlay, so the robot thinking in place doesn't keep them waiting.
Fixed
- The install script's closing steps are numbered in the order they print. They read 1, 2, 4, 3.
release_desktop's description, the skill and the docs say thatrestoredwithaccepted: falseandobserved: "focused"means the user's window already had focus, so nothing was sent; agents read it as a failure.
v0.1.7
Breaking
- The Noctalia plugin needs Noctalia 5.4 or newer: it uses plugin API 36 for its overlay. Noctalia 5.3 lists it as incompatible and doesn't load it, bar widget, panel and glow included. The install script says so when Noctalia lists it that way.
Added
- The Noctalia plugin's overlay: while an agent holds the desktop, a small robot stands beside where it acts, with a caption such as
clickortyping 12 chars in kitty. It sets off as a click goes out and stands beside it a moment later, holds still while the agent's screenshot is taken, and lets clicks pass through. TheShow a robot where the agent actssetting turns it off. watchsends aliveline for each phase of the action in progress: when the server admits it, where it acts (the output and the point, or the window and itsapp_id), right before its screenshot is taken, and how it ended. The server keeps that record inlive.jsonin the instance's runtime directory. The audit log is unchanged.
Changed
watchshows a stop, a lease change and the input-dirty marker at once instead of at its next 250 ms poll: it wakes on changes in the runtime directory.- The skill tells agents that a small robot with a caption in their screenshots is the Noctalia plugin's overlay, not part of the app, and that clicks pass through it.
Fixed
- The Noctalia plugin's glow covered only the top-left quarter of an output at a scale of 1.25 or more: it divided the logical size Noctalia gives by the output's scale again.
- The Noctalia plugin could say input may be stuck while an agent's click or key was still going out:
watchreported the input-dirty marker that every input writes while it goes out.watchnow setsinput_dirtyonly once the marker's server is gone, was released or gave up on its input, which it notes ininput-dirty.notebeside the marker. A marker from a 0.1.6 server counts once it is a minute old, and any marker once it is five minutes old.
v0.1.6
Added
- The Chromium and Electron section of the elements page, and the troubleshooting page, say how to start those apps with accessibility on, so
elementsworks on them. - A bug report template that asks for the niri version,
statusoutput, the agent and model, and the error name anddetail. statusreportsstop_key:boundwhen the bind niri ends up with for a key runsniri-computer-use stopwith a program that is there,not_found, orunknownwith the reason instop_key_detail. It reads the config file the running niri was started with and the files that file includes, and merges their binds as niri does. While it isnot_found,acquire_desktopreturns awarningwith the bind line to add, which the agent is asked to pass on.niri-computer-use status --checkprints the readiness report as one line per prerequisite,✓or✗with the fix for each✗, and exits 1 while something blocks the server: niri and its version, the display, the lock state, the pointer,grim, the accessibility bus, the stop key, the stop flag and input-dirty marker, the policy file and refused variables. The install script now ends with it, after registering and binding the stop key.- A granted lease puts a notification on the desktop naming the agent and its project, so you can see an agent drive without the Noctalia plugin. Each agent gets at most one every five minutes. It is skipped with
confirm_leaseon and while the Noctalia plugin, which sends its own, is enabled. The new policy keynotify_on_lease = falseturns it off. A missing or failingnotify-sendnever refuses the lease;status.lease_notice_errorandstatus --checkreport it. launch_desktop_entries = truein the policy file letslaunchstart an installed app by its desktop entry id, such asorg.gnome.Nautilus, without a preset. The server reads the entry whenlaunchnames it and has niri start itsExecline without a shell. It reads only entries in files root owns and only root can write, reached through directories and symlinks only root can change, so apps installed for the whole system start and one in~/.local/shareneeds a preset. An entry that the user can write, is hidden, is for another desktop, runs in a terminal, starts a program the preset rules refuse, or runsflatpakwith anything butflatpak runof an app and one--commandfails with the newentry_refused, and the deny list covers an entry's id,StartupWMClass, flatpak app and program name.status.desktop_entrieslists the idslaunchwould start and counts the user-writable entries, andunknown_presetnames entries whose id or name contains the name asked for. The install script and the first-session page suggest the key.
Changed
- The skill and the server's instructions tell agents to load the tool schemas before the first call in Claude Code, that
submitted: truemeans Enter went out and a late-drawn message is not a reason to send it again, to take a screenshot before typing afterctrl+tor a closed file picker, to hand the desktop back on afocus_mismatchthat names their own terminal, and to tell you once that restarting a Chromium or Electron app enables element tools. - The README opens its Safety section with a six-row table and no longer shows a harness run as its example. The home page says the audit log records every call that reaches a tool.
- crates.io links the project site as
homepageanddocumentation. - A tool given a field it doesn't take now fails naming that field and the ones it expects, such as
unknown field `direction`, expected one of `keys`, `screenshot_ref`, …forscroll. It used to drop the field and fail on another one, or act without it. Every tool's schema says so withadditionalProperties: false. close_windowtakes the window aswindow_id, like every other tool.idstill works.wait_foralso takesuntil: {"screen_stable": {}}. JSON sent inside a string, such as"\"screen_stable\"", fails with the forms that work.- Calls refused for their arguments before the tool runs are written to the audit log as
invalid_arguments, with the names of the fields they were given and never their values. - The
noctaliatool's description says that every call needs the lease, even["--help"]and["plugins", "list"]. - The skill and the keyboard page tell agents to paste into web form fields that reformat what is typed, such as amounts or phone numbers, and check the field. Fields built on
@react-inputcan keep only the first character typed into them in Chromium, whiletype_textreportssent. - The pointer tools work with more than one monitor.
pointer_move,click,dragandscrollact on the monitor of the screenshot they aim through when it is at transformNormal, whatever the other monitors are; a rotated monitor still refuses them withuntested_output_config. A gesture stays on one monitor.statuslists the monitors they run on inoutputs.pointer_outputs. - Calls the server answers itself with
engine_lostorengine_unavailableare written to the audit log, sowatchand the Noctalia plugin show them. They were never logged, since the shared engine never saw them. A call the engine cut short as it exited has that one line, not alsocancelled. - The Noctalia plugin notifies once per agent session when an update replaced the agent's server and its calls fail with
engine_lostorengine_unavailable, naming the agent and saying to restart it. Later such failures of that session don't notify. The same errors from a server of the installed build count as failed actions. - tokio 1.53.3, which fixes RUSTSEC-2026-0386, and rmcp 3.7.0.
Fixed
- Typed text puts a symbol on a spare key when the layout has it only on a key Chromium drops. US maps have
€only on<I443>(evdev 435), so€typed into Chromium and Electron apps arrived as nothing. A symbol also on a normal key types there, so US$uses Shift+4 instead of<I442>, which Chromium dropped too. - The Safety page said the pointer tools don't check whether windows moved since the screenshot. They have refused such a screenshot with
layout_changedsince 0.1.2. - A pointer gesture whose monitor niri unplugs, turns off or reconfigures while it goes out stops, or is refused before anything is sent, and is never reported
sent: niri may have placed what went out elsewhere, so it endsuncertain. A change of scale or mode during a drag on a single monitor used to let the rest of the drag through, aimed for the old geometry. - A screenshot that waits for the screen to settle, an action's
screenshot: trueorwait_forscreen_stable, compares raw pixels and counts the screen as still when two captures in a row each differ from the capture before them both by at most 0.5 % of the pixels. A clock, a CPU graph, a spinner or a caret no longer keeps the wait going until the 1.5-second limit. A window still sliding into place adds up past that and keeps the wait going. The screenshot's metadata says inchanginghow much changed last. focusandrelease_desktop'srestore_focusthat time out with no window focused, and keyboard and element tools refused withfocus_mismatchbecause no window has keyboard focus, say indetailwhat may hold it: niri's overview, Noctalia's open panel, or the layer-shell surfaces niri lists with exclusive keyboard focus (on-demand ones only as a maybe), and how to close it:niri_actionCloseOverview,shell_panel, orkeyEscapewithexpect: "none".- A
wait_forwindowcondition that times out lists the windows that opened during the wait inopened, with theirapp_id, so a wrongapp_idsuch ashelium-browserforheliumshows. - After an update, or a reinstall of the same release, the shared engine of the replaced build hands over: the first client of the installed build to connect while no agent holds the desktop ends it and is served by an engine of the new build, instead of running standalone, or failing with
engine_unavailablewhen it requires the shared engine, until every old agent restarts. While an old agent holds the desktop, the old engine keeps it until it is given up. Old agents get oneengine_lost, thenengine_unavailablesaying to restart them, and no longer start an engine of their replaced build. Engines of 0.1.5 and older don't hand over, so updating from them still needs the old agents restarted. - While the screen is locked,
screenshot,elementsandwait_forare refused withscreen_locked,elementsandwait_foralso when the screen locked during the call, anddesktop_stategives every window'stitleas null withtitles_hiddensaying why. Before, any connected agent could read accessible names and window titles while the screen was locked. A lock state that isunknownstill lets them through, since actions already refuse then.
v0.1.5
Changed
- The Noctalia plugin's panel puts Stop in its status card, beside the settings button. It shows only while an agent holds the desktop, for five minutes after one gives it back, since agents often take it again before asking you something, and while
watchis down. It used to sit in the Activity heading, where it read as stopping the feed, and showed while no agent was there. - An agent's consecutive key presses, each within 30 seconds of the last, share one row in the panel's feed, such as
Pressed 4 keys, with each call's keys under it and in its tooltip. A failed press, another agent or any other call starts a new row. - With more than three rows, the panel's agent list shows only the driver, or the first agent while none drives, then
and N more, where it showed three. Its heading counts the connected agents and says once how many are on an old build; each of their rows saysold build, where it saidold build, restart it. - The audit log, and so
watch, names anoctaliacall's command, with Noctalia's description of it, when its first argument is exactly a command in Noctalia's ownnoctalia msg --helplist, and forpluginthe plugin's id whenplugins listlists it. The other arguments are still logged only as their count and lengths, never their text. The server reads both lists from Noctalia right before it sends a call that holds the lease and has valid arguments, and waits at most 300 ms for them. The Noctalia plugin's activity feed shows that description, such asToggle caffeine (idle inhibitor), orSent an event to ayagmar/obs-controlfor a plugin call, andSent a Noctalia commandas before when the log names neither.
Fixed
- The panel's unfolded agent list scrolls within its height. It grew to fit every row and pushed the activity feed down to two rows with eight agents connected.
- Two sessions of one agent in one project showed as two identical rows in the panel's agent list. They now share a row that counts them, such as
2 sessions, with their PIDs in its tooltip. The driver keeps a row of its own, and servers whose agentwatchcouldn't name never share one. - The bar tooltip separates the last call from its time with
·instead of a comma, soPressed Escape, cno longer reads as one more key. Connected agents and old builds share one line.
v0.1.4
Added
- The install script also offers to register the server in Amp, GitHub Copilot CLI, Gemini CLI and Qwen Code when they are on
PATH, through each one's ownmcp addat user scope. The client setup page gives their commands, and the config entries for Cursor CLI, Factory Droid, OpenCode, Kilo Code CLI, Goose and Crush, which the script leaves to you.
Changed
- The install script is meant to be piped into
sh:curl -fsSL https://github.com/ayagmar/niri-computer-use/releases/latest/download/install.sh | sh. The whole script is now one brace group, whichshreads to its end before running any of it, so a download cut short runs nothing, and an agent'smcp addthat reads stdin can't take the script's own lines. Its questions are still read from the terminal. - With more than four agents connected, the Noctalia plugin's panel shows the driver and two more, and folds the rest into
+N more, with how many of them are on an old build, so the activity feed keeps its room. Unfolded, the list scrolls within about four rows, and it folds again whenever the panel opens.
Fixed
- The install script no longer stops, after installing, when its output is a terminal it can't open, such as a session with no controlling terminal. It registers in no agent then, and prints the commands to run by hand.
- The Noctalia plugin sends failed-action notifications at normal urgency rather than critical, since agents retry most failures. Stuck input, and a Stop or Resume that failed, stay critical.
- When
watchexits with an error of several lines, before or after it started, the Noctalia plugin's panel shows its first three lines rather than only the last, so a panic shows its message instead of theRUST_BACKTRACEnote after it. set_element_textrefuses text ending with tool-call closing tags such as</parameter>or</invoke>that no opening tag earlier in the text balances, withleaked_tagand the tags named indetail, astype_texthas since 0.1.2. It used to set such text, so a leaked tag landed in the field. Nothing is set; send the text again without the tags.
v0.1.3
Added
niri-computer-use watchprints what agents are doing on this niri instance as JSON lines: who holds the lease and since when, in which project, whether the stop flag or the input-dirty marker is set, which agents have a server on it and whether an update replaced that server's binary, and each tool call the audit log records, the last 20 markedbacklog, for a shell such as Noctalia to show. It never connects to niri, and the lines hold only what the audit log and the lease record hold.- A Noctalia plugin, in
noctalia/niri-computer-use, shows which agent drives the desktop and what it does. Its bar widget breathes in the accent colour with the agent's name while one drives, and right-click stops agents or resumes them. Its panel shows who drives, in which project and for how long, every connected agent with the ones left on an old build marked, a Stop button, a settings button and the last 50 calls in words, opening on the newest and following new ones. Its desktop glow frames the output behind the windows while an agent drives, and it notifies when an agent takes the desktop, once for an agent that takes it back within five minutes, when agents are stopped, when input may be stuck and when an agent is left on a replaced build; failed actions only when turned on. What it finds when it starts isn't announced. It readsniri-computer-use watch. - The install script installs the Noctalia plugin from the same release to
~/.local/share/niri-computer-use/noctalia/niri-computer-useand, whennoctaliais onPATH, links it into Noctalia's plugin directory and prints the command that enables it. It doesn't enable it. - After an update, the install script lists each
niri-computer-use servestill running the binary it replaced, by PID and the agent that started it, so you know which agents to restart or reconnect.
Changed
- A server that requires the shared engine, and couldn't reach it or was refused when it started, now tries again on every call, starting an engine if none runs. Once the cause is gone, such as an engine of an older build that exited after its last client, the next call is served, without restarting the MCP server. Until then every call fails with
engine_unavailableas before. A cause no call can fix, such as a socket path over 108 bytes, still needs a restart. - Such a server no longer lists
noctaliawhileunrestrictedis off, and once a call reaches an engine it sendsnotifications/tools/list_changed, since the engine leaves out the tools that need Noctalia or an accessibility bus when they aren't there.
v0.1.2
Added
shared = "required"in the policy file, orNIRI_COMPUTER_USE_SHARED=required, makes the shared engine required, so every client of a niri instance is served by one process, with one crash guardian, niri event stream, accessibility connection and audit writer. A server that can't reach the engine, or that the engine refuses, no longer serves its client on its own: it lists the client's tools, every call fails withengine_unavailable, and thedetailand the server's stderr say why, such as the engine's socket path and the connect error, or the refusal. Restart the server once the cause is fixed. A wrongNIRI_COMPUTER_USE_SHAREDdoesn't drop a requirement the file sets, and neither does a mistake elsewhere in the file, even one that stops it parsing as TOML.status.sharedreports the setting (on,offorrequired) and why the variable was refused. The default,true, still falls back to serving the client on its own.wait_forwaits on a window's accessible elements:{"element": {"window_id", "role", "name_contains", "state", "absent"}}waits until an elementelementswould list, with that role, name text and state (a name from a JSON listing'sstates, ordisabledfor one withoutsensitive), is there, or withabsent: trueuntil none is. A met wait for an element that appeared returns itselement_refwhile you hold the lease, withunboundorunmappablewhenelementswould give them, and no ref, with the reason indetail, when a walk cut short can't tell it from a look-alike further on. A window that closes ends the wait aswindow_gone, and one whose app isn't on the accessibility bus asnot_accessible. A walk cut short, or one that skipped an object gone by the time it read it, and with it everything under it, never counts as proof that the element is gone, and a wait that times out after such a walk says which indetail. A walk that the wait's own end cut short, one that began with less than its three-second budget of the wait left, doesn't count against the walk before it, so a wait whose earlier walks read the whole tree doesn't time out saying the last walk was cut short. A walk that began earlier and ran out of its own budget still says so, even when it came back after the wait's end. The audit log keeps the role and state names and the length ofname_contains, never the text.activate_elementandset_element_textreturneffect:seenwhen reading the element back showed the action's effect,differswhen a field holds other text than was sent,none_seenwhen nothing the server can read changed, andunverifiedwhen it couldn't be read. A read that fails after the action went out isunverifiedwith the reason indetail, never an error. The audit log keepseffectbesideobserved.activate_elementreads the value of an element that has one, such as a slider or spin button, before and after, and says inelement.value_changedwhether it changed, never the value. It also compares the element's name, and says inelement.name_changedwhether a button relabelled itself, never either name.- When
elements,wait_for's element condition or an action'selement_changesfinds the window of a Chromium, Electron or CEF app off the accessibility bus and the session's accessibility is off, the server turns it on by registering an AT-SPI event listener, as a screen reader does, and holds it on until the server ends, however it ends. Chromium, Electron and CEF apps join the bus only when it was on when they started, so apps started after that are listed; one already running needs a restart, andnot_accessible's detail says to ask the user first. The server tells such an app by the files Chromium maps (icudtl.datorv8_context_snapshot.binin/proc/<pid>/maps); for any other app off the bus, such as a terminal, or a process it can't inspect, it changes nothing and gives the plainnot_accessible. The server never writesorg.a11y.Status, leaves accessibility alone when something else turned it on, and needs at-spi2-core 2.61 or later: with an older one it lets go and says so.turn_on_accessibility = falsein the policy file turns this off.status.accessibility_switchsays what the server did (off,on,turning_on,unsupported, orlet_goonce accessibility read off while the server's listener held it on, which two overlapping calls don't cause), andstatus.policy.turn_on_accessibilitywhether it may. The launcher also sets GSettings'toolkit-accessibilityto true, as it does when a screen reader starts, and that stays after the server ends;gsettings reset org.gnome.desktop.interface toolkit-accessibilityundoes it. elementsasks a Chromium window for its page's tree when it shows none, as Chromium builds it only once an assistive technology asks. That listing hasbuilding: true, orthe app built its tree just nowin the compact header: list again a second later for the page.
Changed
set_element_texton an editable field that has noEditableTextinterface, as Chromium's text fields are, fails withtext_not_settableinstead of a plaininvalid arguments:that read as a mistake to fix and send again. Its detail says to focus the field withactivate_element, then send the text withtype_text, pressingctrl+awithkeyfirst to replace what it holds. A password field withoutEditableTextissecret_field, and an element that isn't editable is still an argument mistake.- A shared engine that refuses a client's server because it runs another build says what to do. After an upgrade, a client still running the old build whose engine ended meets an engine of the new build, which refuses it for as long as it runs: its
engine_unavailabledetail now names both builds and says to restart that MCP client, where it said only that the engine runs another build, and the bridge no longer adds that the next call tries again. An engine whose own file was replaced since it started says to restart the clients it serves. When neither file was replaced, as with two installs on different paths, where restarting either client runs its build again, it names both files and says to point the clients at one. Bridges name their release in the hello, which engines of 0.1.1 and older ignore. - A client started after an upgrade beside a shared engine of 0.1.1 or older, which it is served standalone beside, says in
status.engine.fallbackthat engine's PID and what to do, from the files that engine and this server were started from: when an upgrade replaced the engine's file, that it serves the clients started before the upgrade until the last of them ends, and to restart those clients to end it; when both builds are still installed, to point the clients at one file. That engine's own words say only that it runs another build, or, from 0.1.0,the bridge speaks hello Some(3); this engine speaks 2. Engines now name their release in a refusal, so a bridge adds this only to an older engine's. elementsreads the elements inside a container of more than 64 children, such as a long list, table or grid, after the rest of the window, and lists them after it. A window whose walk is cut short inside such a list still lists its own controls, such as the toolbar's and the buttons below the list, where it used to stop before them; those outside a named list row areunbound: cut_short, since the unread part may hold a look-alike.elementsreads up to 20,000 objects of a window's tree, up from 2,000. One long list, table or grid used to stop the walk before the rest of the window, so its other controls were never listed, or wereunbound: cut_short. In nested GTK 3, GTK 4 and Chromium windows of 2,218 to 15,022 objects, the whole tree now reads in 0.15 to 0.82 s and every control outside the list has a bound ref; listing such a window takes that long. A window over 20,000 objects, or too slow to read in the three seconds, is still cut short.type_textrefuses text, typed or pasted, that ends with tool-call closing tags such as</parameter>or</invoke>that no opening tag earlier in the text balances, each opening tag balancing one closing tag, withleaked_tagand the tags named indetail. Models sometimes leak their own tool-call markup into the end of a long argument. Nothing is typed or pasted; send the text again without the tags.set_element_textreads the field's text back and compares it with the text sent, instead of comparing only the character count. A field that reformats or masks text without changing its length is nowdiffers, notmatched. Neither text is returned or logged.
Fixed
- A pointer tool no longer fails with
lock_stalebefore its first input, or stops partway with its button released, when nothing was slow. Each look in a gesture kept a lock read under 250 ms old and then required it to be under 250 ms old at its end, so a read that turned 250 ms during the look itself stopped the gesture. Such a look now reads the lock state again and looks once more. A gesture still stops when that second look is too slow. - A pointer tool aimed at pixels of a screenshot no longer goes out after the windows on that output moved since the capture. The ref was checked only against its age and its output, so two clicks 5 and 12 seconds after their screenshots pressed wherever the screen had moved to: in a real session, the user resized the browser and later focused their terminal beside it, and the agent's clicks went to the browser's blank margin and into the terminal. The call now fails with
ref_invalidandlayout_changedwhen the overview, the output's workspace, a window on it opening, closing, moving or resizing, or the window niri scrolls the view to changed after the capture began, even if the change was undone since, and says which. niri's initial state counts as a change on every output, both when the server starts reading niri's events, since niri may be ...
v0.1.1
Added
install.shoffers to register the server in each of Claude Code, Pi and Codex it finds onPATH, through the agent's ownmcp addcommand, asking per agent when its output is a terminal.NCU_REGISTER=1registers in all of them without asking,NCU_REGISTER=0in none. An agent that refuses doesn't fail the install; its command is printed under the next steps.
Changed
key,type_textand a paste's key always go through the server's own virtual keyboard with the compositor's keymap, andclick,dragandscrolltake heldkeyswithout configuration. In Chromium and Electron apps, wtype's keys lost spaces and punctuation and missed shortcuts such as VS Code'sctrl+s; the native keyboard types text your layout has exactly. Symbols your layout lacks, such as accented letters, Greek, Cyrillic or arrows on a US layout, arrive exactly there too, because native puts them on keycodes Chromium knows, F13 to F24 among them. Emoji and other characters outside the Basic Multilingual Plane still arrive as other characters there, so paste them.- Native text with more distinct symbols the layout lacks than the keymap has spare keycodes, 14 in a US layout, is typed in parts, each with a temporary keymap of its own, instead of refused.
- A native
keycombination, a paste's key included, that the active layout lacks goes out in another of your layouts that has it, soctrl+vandctrl+swork while a layout such as Russian is active. - After a native call, a lock that was on, such as Caps Lock or Num Lock, reads as off in the focused application until you press a modifier or lock key, the keymap changes or focus moves.
Removed
- The
wtypekeyboard.NIRI_COMPUTER_USE_KEYBOARDis no longer read, and any value is ignored rather than refused, since 0.1.0's docs told you to set it tonative; a setting ofwtypenow gets the native keyboard.wtypeis no longer needed at run time, andstatus.binarieslists onlygrimandnotify-send. recoverno longer ends an input program or offers to end yourwtypeprocesses. It releases the keys and buttons the marker names, asks for the manual check, and clears the marker afteryes. An input-dirty marker 0.1.0 wrote whilewtyperan can't be read by this version, so input stays blocked until you runrecover. Restart every MCP client after upgrading, so no 0.1.0 server keeps running beside this one: a marker it writes while typing reads as unreadable here, and sends agents torecoveruntil it finishes.
v0.1.0
The first release: an MCP server over stdio that lets an AI agent read and act on a niri 26.04 desktop.
Upgrading
- If you run a source build of
main, end every runningniri-computer-useprocess (servers, bridges and shared engines) before installing this one, then start your clients again.pgrep -a '^niri-computer-u'lists them. Older builds ofmainkept their runtime directory underXDG_RUNTIME_DIR, so an old and a new server on one niri would share neither the lease nor the stop flag. Tools were also merged and renamed during development; link or copyskills/niri-computer-useagain so your agents read the current names.
Added
niri-computer-use serve, an MCP server over stdio, and the commandsstatus,stop,resume,recoverand--version.- 22 tools. Reading, with no lease:
status,desktop_state,screenshot,elementsandwait_for. The lease:acquire_desktopandrelease_desktop. Under the lease:clipboard_read, and the tools that act,focus,launch,close_window,niri_action,pointer_move,click,drag,scroll,key,type_text,activate_element,set_element_text, and with Noctalia installedshell_panel, andnoctaliawhenunrestrictedis on as well.elements,activate_elementandset_element_textare listed when the session has an accessibility bus. desktop_state: windows, workspaces, focus, the overview, keyboard layouts and outputs from niri's event stream, and with Noctalia installed its status asshell.screenshot: one output or a region inside one, throughgrim, as JPEG or PNG, at most 1280 pixels wide unlessmax_widthsays otherwise. A region of an earlier screenshot, named by itsscreenshot_ref, is captured again at full resolution to read small text.save_pathwrites a PNG under~/Pictures/niri-computer-use, or the policy'scapture_dir, never through a symlink and never over an existing file.elements: one window's accessible elements over AT-SPI, one line each with anelement_ref, role, name, states, actions and box in layout coordinates.activate_elementruns an element's own action andset_element_textreplaces a field's text, both through the accessibility bus. The pointer tools take anelementin place of screenshot pixels.wait_for: waits for a window to appear, close or change its title, or for the screen to stop changing, for up to 30 seconds.focusa window or workspace,launchan app from a policy preset, optionally reusing an open window, andclose_window.niri_actionsends any niri action in niri's IPC JSON, such as fullscreen, floating or a column's width, and returns the window's state after it.- Pointer input through niri's virtual pointer (
pointer_move,click,drag,scroll), aimed at a screenshot's pixels through ascreenshot_refthat expires after 60 seconds or when its output changes. - Keyboard input through
wtypeinto the window named inexpect:keypresses up to 16 combinations, andtype_texttypes up to 1000 characters in parts of 100, with focus and the lock state checked again before each part.submit: truepresses Enter only once all of the text went out.via: "paste"pastes up to 1 MiB through the clipboard and puts the clipboard back afterwards.NIRI_COMPUTER_USE_KEYBOARD=nativeselects an experimental backend on niri's virtual keyboard that checks focus before every key. - Every action result says whether niri
acceptedthe action and what wasobservedafter it.changeslists what niri saw change, such as windows opened, closed or moved and focus moving, andelement_changeslists the accessible elements that changed.screenshot: trueadds a screenshot taken once the screen stopped changing. clipboard_read: the clipboard's text, under the lease.shell_panelopens and closes the Noctalia panelscontrol-center,wallpaperandtray-drawer.noctaliasends any Noctalia command and is listed only withunrestrictedon.- A policy file at
$XDG_CONFIG_HOME/niri-computer-use/policy.tomlwith launch presets ([[preset]]withname,argv,app_idandenv),deny_input_app_ids,capture_dir,unrestricted,confirm_lease,sharedandtools.NIRI_COMPUTER_USE_UNRESTRICTED,NIRI_COMPUTER_USE_CONFIRM_LEASE,NIRI_COMPUTER_USE_SHAREDandNIRI_COMPUTER_USE_TOOLSset the same for one client. - Tool profiles:
tools = "observe"lists only the five reading tools,"act"leaves outniri_action,noctaliaandshell_panel, and"full", the default, lists every tool. - A shared engine per niri instance, on by default: each client's
serverelays to oneniri-computer-use engine, started in its own systemd user scope where systemd allows it. Policy, keyboard backend,PATHand working directory stay per client. - Session discovery: with no
XDG_RUNTIME_DIR,NIRI_SOCKETorWAYLAND_DISPLAYfrom the client, the server takes them from the user's only running niri, so no client needs environment settings. - The
niri-computer-useskill inskills/, which tells agents how to use the tools, with tool and error tables inreferences/. - An audit log of every tool call at
$XDG_STATE_HOME/niri-computer-use/audit.jsonl, with argument metadata and outcomes but no typed text, clipboard, window titles or images, moved aside at 10 MiB with three old logs kept. - Failures carry a stable error name and the upstream detail; the skill's
references/errors.mdand the documentation site list them. - The documentation site, with
llms.txtand a Markdown address for every page. - Release tarballs for x86_64 and aarch64 Linux with the binary, the skill and the licenses of the crates built in, and
install.sh, which installs the binary and the skill from one of them.
Security
- One server at a time holds the lease on a niri instance, an exclusive
flockin a runtime directory beside niri's socket. Only the holder acts; another session'sacquire_desktopfails withlease_held. niri-computer-use stop, meant for a niri bind, cancels the running action and takes the lease back untilniri-computer-use resume. It doesn't connect to niri, so it works while niri hangs.- Every action goes out within 250 ms of a read of the lock state, from Noctalia and logind, that said unlocked. A locked or unknown state fails with
screen_locked, and a read that got too old before the call could go out fails withlock_stale. - With
confirm_leaseon,acquire_desktopwaits for you to choose Allow on a desktop notification sent withnotify-send. A denial, a dismissal or no answer within 60 seconds fails withlease_declined. - An input-dirty marker is written before input and removed once the input is released. A crash mid-input leaves
recovery_requireduntil you runniri-computer-use recover. A crash guardian beside each server releases held native keys and pointer buttons when the server dies. - Keyboard and pointer input refuse with
app_deniedwhile an app on the deny list has focus, and element actions andclose_windowrefuse on its windows.set_element_textandactivate_elementrefuse fields marked as passwords withsecret_field. launchonly starts presets, and a preset can't start a program that runs whatever follows it, such astmux,ssh,flatpak-spawnordocker.niri_actionrefuses actions that run programs, write files or reach past the layout, such asSpawnandDoScreenTransition, withunrestricted_required.unrestricted, off by default, allows both, and listsnoctalia.clipboard_readreturns only what was copied while the lease was held (copied_before_leaseotherwise), and never text its owner marked secret for clipboard managers, such as a password copied from KeePassXC (secret).- The name an MCP client gives itself is cut to 64 characters of ASCII letters, digits, spaces and
._-+@before it labels the audit log, the lease holder and theconfirm_leaseprompt.