You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Computer-use action and recording events for the desktop overlay and monitor #1404
The desktop app reverse-engineers computer-use activity from tool payloads. The overlay parses Computer tool arguments and scales them from a fixed 1024x768 space. The recording frame comes from parsing the RecordStart tool result (data.path, data.region.{X,Y,Width,Height}, data.frame_width, data.frame_height). Put that information on the event stream instead, so every client reads it the same way, and tool payloads can change without breaking the overlay.
Both fit standard AG-UI, so no CUSTOM event is added. An action is structured progress that a client renders as its own widget, which is what ACTIVITY_SNAPSHOT is for. A recording is state, and #1419 moves screen_recording to the state key screenRecording.
The events are written inside the run, on worker stdout, so they reach one-shot headless and the daemon binding alike. This ticket does not depend on the daemon.
Acceptance Criteria
ACTIVITY_SNAPSHOT with activityType: "computer_use" is written before each pointer or keyboard action. Its content is {toolCallId, action, x, y, screenWidth, screenHeight} in screen coordinates, and keyboard actions carry no x and y
The state key screenRecording carries active, and while a recording runs also path, region{x, y, width, height}, frameWidth and frameHeight. region is in frame space
Field names are camelCase, as on the rest of the AG-UI wire
The computer context owns the mapping of its chat events, as it does today in internal/computer/published_events.go
docs/ag-ui-output.md documents the activity and the state key with their shapes
Tests in internal/computer and in the headless run encoder cover both
PR: #1441 (ready for review, fix/issue-1404 -> commit 0025256)
What I changed
The desktop app no longer needs to reverse-engineer computer-use activity from tool payloads. Both signals now ride standard AG-UI events on the run's stdout, so one-shot headless and the daemon's serve worker behave identically:
Computer-use activity: new agentdomain.ComputerUseActionEvent, notified by the Executor just before each pointer (move, click, double_click, triple_click) or keyboard (type, key) action. computer.PublishedEvent maps it to ACTIVITY_SNAPSHOT with activityType: "computer_use" keyed computer_use:<toolCallId>. content is {toolCallId, action, x, y, screenWidth, screenHeight} with the coordinates already scaled to the real screen; keyboard actions carry no x/y (the mapper derives that from the action kinds), and all field names are camelCase.
Recording state: agentdomain.ScreenRecordingStatusEvent now carries path, the frame-space region (RegionX/Y/Width/Height) and frameWidth/frameHeight; the recorder fills them at start, and PublishedEvent folds them into the screenRecording state value ({"active": true, path, region: {x, y, width, height}, frameWidth, frameHeight}). A stop stays bare {"active": false}, so clients still clear the indicator on RUN_FINISHED/RUN_ERROR.
Wiring: the Computer tool and computer.NewTools take the shared UINotifier (the container's swap-safe holder), and the headless uiBridge forwards the new event into the rendered event stream. The mapping stays owned by the computer context in internal/computer/published_events.go, as today.
Docs: docs/ag-ui-output.md documents the computer_use activity row in the mapping and Activity tables with the shape, and the extended screenRecording state key; internal/computer/README.md describes the new publishing.
Acceptance criteria
All six met: activity written before each pointer/keyboard action with screen coordinates (keyboard without x/y), screenRecording state with active plus path/region/frameWidth/frameHeight in frame space, camelCase names, the computer context owns its event mapping, docs document both shapes, and tests cover both in internal/computer (mapping table, recorder start payload) and the headless run encoder (TestRender_ComputerUseActionsSurfaceAsActivity, TestRender_ScreenRecordingStateCarriesTheFrame, plus a uiBridge forwarding test).
Validation
task precommit:run passes (mod tidy, mocks, golangci-lint 0 issues, markdownlint clean) and the full task test suite is green. Downstream: the desktop overlay/monitor work under the #1396 epic can subscribe to these events instead of parsing tool payloads, tracked there; a docs ticket is filed at inference-gateway/docs#878, and the issue is on the Roadmap board at QA. No merge was performed - a human reviews and merges.
Activity
edenreich commentedon Sep 30, 2026
@infer can you work on this? use /ponytail:ponytail /clean-architecture /domain-driven-design /go /go-concurrency
inference-gateway-maintainer commentedon Sep 30, 2026
Model:
ollama_cloud/glm-5.3-flash· View JobTodos
Pull Request
#1441
✅ Infer Result: Success
All done. The work is complete and shipped:
PR: #1441 (ready for review,
fix/issue-1404-> commit0025256)What I changed
The desktop app no longer needs to reverse-engineer computer-use activity from tool payloads. Both signals now ride standard AG-UI events on the run's stdout, so one-shot headless and the daemon's serve worker behave identically:
agentdomain.ComputerUseActionEvent, notified by theExecutorjust before each pointer (move,click,double_click,triple_click) or keyboard (type,key) action.computer.PublishedEventmaps it toACTIVITY_SNAPSHOTwithactivityType: "computer_use"keyedcomputer_use:<toolCallId>.contentis{toolCallId, action, x, y, screenWidth, screenHeight}with the coordinates already scaled to the real screen; keyboard actions carry nox/y(the mapper derives that from the action kinds), and all field names are camelCase.agentdomain.ScreenRecordingStatusEventnow carriespath, the frame-space region (RegionX/Y/Width/Height) andframeWidth/frameHeight; the recorder fills them at start, andPublishedEventfolds them into thescreenRecordingstate value ({"active": true, path, region: {x, y, width, height}, frameWidth, frameHeight}). A stop stays bare{"active": false}, so clients still clear the indicator onRUN_FINISHED/RUN_ERROR.Computertool andcomputer.NewToolstake the sharedUINotifier(the container's swap-safe holder), and the headlessuiBridgeforwards the new event into the rendered event stream. The mapping stays owned by the computer context ininternal/computer/published_events.go, as today.docs/ag-ui-output.mddocuments thecomputer_useactivity row in the mapping and Activity tables with the shape, and the extendedscreenRecordingstate key;internal/computer/README.mddescribes the new publishing.Acceptance criteria
All six met: activity written before each pointer/keyboard action with screen coordinates (keyboard without x/y),
screenRecordingstate withactiveplus path/region/frameWidth/frameHeight in frame space, camelCase names, the computer context owns its event mapping, docs document both shapes, and tests cover both ininternal/computer(mapping table, recorder start payload) and the headless run encoder (TestRender_ComputerUseActionsSurfaceAsActivity,TestRender_ScreenRecordingStateCarriesTheFrame, plus auiBridgeforwarding test).Validation
task precommit:runpasses (mod tidy, mocks, golangci-lint 0 issues, markdownlint clean) and the fulltask testsuite is green. Downstream: the desktop overlay/monitor work under the #1396 epic can subscribe to these events instead of parsing tool payloads, tracked there; a docs ticket is filed at inference-gateway/docs#878, and the issue is on the Roadmap board at QA. No merge was performed - a human reviews and merges.Model:
ollama_cloud/glm-5.3-flash· Exit Code:0· Duration: 17m 2sTokens: 14,805,262 in · 75,247 out · 14,880,509 total (69 requests)
Tool calls: 129 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Oct 1, 2026
🎉 This issue has been resolved in version 0.221.0 🎉
The release is available on:
Your semantic-release bot 📦🚀