{
  "$ref": "#/definitions/CommandMessage",
  "definitions": {
    "CommandMessage": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "const": "command"
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "sessionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "args": {
          "type": "object",
          "additionalProperties": {},
          "default": {}
        },
        "by": {
          "type": "string",
          "enum": [
            "harness"
          ]
        },
        "outward": {
          "type": "object",
          "properties": {
            "allowed": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "invite",
                  "send",
                  "share",
                  "delete",
                  "pay",
                  "publish",
                  "revoke",
                  "transfer",
                  "sign out",
                  "change role",
                  "create key",
                  "change state"
                ]
              },
              "maxItems": 16
            }
          },
          "required": [
            "allowed"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "kind",
        "id",
        "name"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
