{
  "source": "system.js",
  "method": "execute",
  "input-schema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "command": {
        "type": "string",
        "description": "Command to execute.",
        "required": true
      },
      "args": {
        "type": "array",
        "title": "arguments",
        "description": "List of arguments to be passed to the command.",
        "items": {
          "type": "string",
          "title": "argument"
        }
      },
      "options": {
        "type": "object",
        "additionalProperties": false,
        "displayOptions" : {
            "showCollapsed": "true"
        },
        "properties": {
            "cwd":{
                "title": "workingDirectory",
                "type": "string"
            },
            "env": {
                "title": "environmentVariables",
                "type": "object",
                "additionalProperties": {
                    "type": "string",
                    "title": "key"
                }
            },
            "encoding": {
              "type": "string"
            },
            "uid": {
              "type": "set the uid of the process"
            },
            "maxBuffer": {
                "type": "integer",
                "description": "Maximum data that should be collected from stdout. Defaults to 200 * 1024."
            },
            "timeout": {
                "title": "timeout",
                "type": "integer",
                "description": "In milliseconds. if the process runs longer that the specified time, it is send the killsignal specified below(Default to 0)"
            },
            "killSignal": {
                "type": "string",
                "description": "if the process runs longer that the specified timeout value above, it is send the killsignal specified here.(Default to SIGTERM)"
            }
        }
      }
    }
  },
  "output-schema": {
    "type": "object",
    "properties": {
        "stdout": {
            "type": "string",
            "description": "data from stdout"
        },
        "stderror": {
            "type": "string",
            "description": "data from stderr"
        },
        "error": {
            "type": "object",
            "properties": {
                "exitCode": {
                    "type": "integer",
                    "description": "exit code of the child process"
                },
                "signal": {
                    "type": "string",
                    "description": "signal, if any that terminated the process. e.g SIGTERM"
                }
            }
        }
    }
  },
  "meta": {
    "name": "execute",
    "description": "Execute a system/shell command."
  }
}