Skip to content

Make socket protocol/API public #1513

@nikitabobko

Description

@nikitabobko

The way AeroSpace CLI communicates with the server is an implementation detail right now (unix socket + jsons). Nevertheless, some third-party applications already rely on it. Hopefully, the apps understand that the protocol is subject to breaking changes.

This issue is about making the protocol public and documented. For inspiration: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#contentPart

TODO

  • Migrate off the BlueSocket library dependency. I've used BlueSocket dependency in the early days of the project to speed up the development. There should be nothing hard about implementing unix socket communication by hand
  • Prepend the message with how many bytes the message is going to be (Content-Length header). Right now, we just write json + EOF.
  • Write an official Swift and Kotlin (languages I'm fluent in) libraries to communicate with AeroSpace socket. AeroSpace CLI itself could be migrated to the Swift library for uniformity
  • Document the protocol

Known third-party apps that communicate with aerospace socket directly

Future directions

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThe issue is about docs improvementfeatureFeature proposal

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions