Get mouse position, GPU mode browsers#115
Conversation
…nd add new commands Add hypeman-go SDK dependency and implement CLI commands for all SDK methods: - kernel hypeman instance create/list/get/delete/start/stop/restore/standby/logs/stat - kernel hypeman instance volume attach/detach - kernel hypeman image create/list/get/delete - kernel hypeman volume create/list/get/delete/create-from-archive - kernel hypeman device create/list/get/delete/list-available - kernel hypeman ingress create/list/get/delete - kernel hypeman resource get - kernel hypeman build create/list/get/cancel/events Triggered by: kernel/hypeman-go@a897d4c Co-authored-by: Cursor <cursoragent@cursor.com>
Update kernel-go-sdk to v0.34.0 which includes new Browsers.Computer methods. Add CLI support for: - `kernel browsers computer get-mouse-position <id>` - Get current mouse position - `kernel browsers computer batch <id>` - Execute batch of computer actions from JSON Co-authored-by: Cursor <cursoragent@cursor.com>
- Remove cmd/hypeman directory with all hypeman subcommands - Remove hypeman import and command registration from root.go - Remove hypeman from auth exemption list - Remove github.com/kernel/hypeman-go dependency from go.mod Co-authored-by: Mason Williams <masnwilliams@users.noreply.github.com>
Bump github.com/kernel/kernel-go-sdk from v0.34.0 to v0.35.0. Triggered by: kernel/kernel-go-sdk@f817833 Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| if in.Output == "json" { | ||
| enc := json.NewEncoder(os.Stdout) | ||
| enc.SetIndent("", " ") | ||
| return enc.Encode(res) |
There was a problem hiding this comment.
JSON output re-marshals struct instead of using raw API response
Low Severity
ComputerGetMousePosition uses json.NewEncoder/enc.Encode(res) for its --output json path, while every other command in the file consistently uses util.PrintPrettyJSON. That utility explicitly calls RawJSON() on the SDK response to preserve the original API response and avoid zero-value fields that appear when re-marshaling the Go struct (as noted in its own doc comment). Re-marshaling via enc.Encode may produce different output — extra zero-value fields, missing unmapped fields — breaking consistency with all other --output json commands.
masnwilliams
left a comment
There was a problem hiding this comment.
lgtm — reviewed all changes, tested live. gpu flag, get-mouse-position, and batch all work end-to-end. fixed the --actions flag help text (was showing bare array format but unmarshal expects the full struct).


Note
Medium Risk
Moderate risk due to upgrading
kernel-go-sdkand wiring new request fields/CLI commands that call newly added browser computer APIs and JSON parsing.Overview
Adds a new
--gpuflag tobrowsers create, passes it through to the Kernel API, and surfaces the GPU setting inbrowsers getoutput.Extends
browsers computerwithget-mouse-position(supports--output json) andbatch(executes a JSON-described action list), including new SDK interface methods and test fakes to cover these calls.Bumps dependencies, notably
github.com/kernel/kernel-go-sdktov0.35.0(plus minortestifyupdate).Written by Cursor Bugbot for commit b9dd123. This will update automatically on new commits. Configure here.