Implement Commands and Acknowledgments
mainAny command sent by the desktop containing a cmd field requires a matching acknowledgment.
Ack Format:
{"ack": "<original_cmd_name>", "ok": true, "n": 0}
If a command fails, set "ok": false and optionally include an "error": "..." string. The field n is a generic counter (e.g., bytes written for chunk acks, otherwise 0).
{
"ack": "<same as cmd>",
"ok": true,
"n": 0
}