Repository navigation
feat(computer): publish computer-use activity and the recording frame on the AG-UI stream - #1441
Merged
Merged
Conversation
… on the AG-UI stream The executor notifies a ComputerUseActionEvent before each pointer or keyboard action and PublishedEvent maps it to the computer_use activity, while ScreenRecordingStatusEvent now carries the file and frame space of a running recording into the screenRecording state. Headless bridges both onto stdout for one-shot and serve runs.
3 tasks
inference-gateway-maintainer
Bot
marked this pull request as ready for review
September 30, 2026 22:51
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
September 30, 2026 22:51
6 tasks
… event and name the publisher The headless render tests decode ACTIVITY_SNAPSHOT events through the existing wireEvent and decodeEvents helpers instead of a second decoder. The executor's activity method is renamed publishActivity so its call sites read as what they do.
Contributor
|
🎉 This PR is included in version 0.221.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Resolves #1404
Summary
The desktop overlay and monitor no longer need to reverse-engineer computer-use activity from tool payloads: the computer context now publishes what it is doing on the standard AG-UI stream itself. Each pointer or keyboard action lands as an
ACTIVITY_SNAPSHOTactivity titledcomputer_use(still standard AG-UI, no CUSTOM event), and thescreenRecordingstate key grows the recording's file and frame rectangle while a capture runs, so every client reads one shape. The mapping stays owned by the computer context ininternal/computer/published_events.go, exactly as before.Changes
agentdomain.ComputerUseActionEvent, notified by theExecutorjust before a pointer (move,click,double_click,triple_click) or keyboard (type,key) action runs, carrying the tool call id, the action name and its coordinates already scaled to the real screen, plusscreenWidth/screenHeightcomputer.PublishedEventmaps that event to thecomputer_useactivity keyedcomputer_use:<toolCallId>; keyboard actions carry nox/y, all field names camelCaseagentdomain.ScreenRecordingStatusEventnow carries the recording'spath, its frame-spaceregion(RegionX/Y/Width/Height) andframeWidth/frameHeight; the recorder fills them at start,PublishedEventfolds them into thescreenRecordingstate value (activestays bare on stop)RUN_FINISHED/RUN_ERROR, unchangeduiBridgeforwards the new event into the rendered stream, so one-shot headless and the daemon worker both emit it on stdoutComputertool andcomputer.NewToolstake the shared UI notifier, wired from the containerdocs/ag-ui-output.mddocuments thecomputer_useactivity and the extendedscreenRecordingstate with their shapes;internal/computer/README.mddescribes the new publishinginternal/computercovers the mapping of both events (pointer with coordinates, keyboard without, recording state with the frame) and the recorder's start payload; the headless run encoder tests cover both the activity and the state on the wireDownstream: the desktop app overlay and monitor (the
#1396epic) can now subscribe to these events instead of parsingComputerargs andRecordStartresults. Tracked there; the CLI's own docs page is updated in this PR.Docs: tracked in the docs repo as inference-gateway/docs#878 (the in-repo page
docs/ag-ui-output.mdis updated in this PR).