Skip to content

computer-use responses do not match the OpenAPI spec #5005

Description

@mu-hashmi

The daemon's computer-use responses differ from the OpenAPI spec and the generated SDKs in several places. There is no test that compares them.

  • ProcessStatus in apps/daemon/pkg/toolbox/computeruse/interface.go has no json tags. The daemon sends {"Running": true, "Pid": 4312}; the spec declares running and pid. Typed clients deserialize zero values, so a running process reads as running: false. This affects the start()/stop() status maps and GET /process-status on both platforms, including current Linux.
  • The SDK docs reference fields the daemon never sends: width/height on screenshots, count on window lists, primary_display/total_displays on display info. They exist only in SDK docstrings and the deprecated dashboard DTO.
  • The Go SDK (libs/sdk-go) computes width/height locally instead of returning an error, which masks their absence from the wire.
  • There is no CI check that serializes the daemon's response structs and validates them against the generated spec.

These should be fixed in one PR: they all touch the same chain (interface.go structs, swagger regen, generated clients, SDK wrappers, both platform plugins), and the spec-vs-wire CI check belongs in the same change to prevent regression.

The casing fix is a breaking change for consumers that parse raw JSON and rely on the current casing.

Found during review of #4788. Out of scope for that PR and its follow-up; both intentionally leave JSON keys unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions