{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "AgentConfig",
  "description": "Defines *user* configuration for the SSH agent, and allows the user to configure which accounts, vaults, and items should be considered for use by the SSH agent.",
  "type": "object",
  "required": ["ssh-keys"],
  "properties": {
    "ssh-keys": {
      "description": "The list of rules to decide which accounts, vaults, and items to add to the SSH agent.",
      "type": "array",
      "items": {
        "$ref": "#/definitions/AgentConfigRule"
      }
    }
  },
  "definitions": {
    "AgentConfigRule": {
      "description": "A single rule defined in the SSH agent config for which keys to include in the SSH agent. Each field may be the UUID or another identifier, which varies per field.",
      "type": "object",
      "anyOf": [
        { "required": ["account"] },
        { "required": ["item"] },
        { "required": ["vault"] }
      ],
      "properties": {
        "account": {
          "description": "Can be either an account UUID or signin address or account name",
          "type": "string"
        },
        "item": {
          "description": "Can be either an item UUID or name",
          "type": "string"
        },
        "vault": {
          "description": "Can be either a vault UUID or name",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}