{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://open-agent-harness.dev/schemas/action.schema.json",
  "title": "Open Agent Harness Action Definition",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "name",
    "description",
    "entry"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9._-]+$"
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "expose": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "to_llm": {
          "type": "boolean"
        },
        "callable_by_user": {
          "type": "boolean"
        },
        "callable_by_api": {
          "type": "boolean"
        }
      }
    },
    "recovery": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "retry_policy": {
          "type": "string",
          "enum": [
            "manual",
            "safe"
          ]
        }
      }
    },
    "input_schema": {
      "type": "object"
    },
    "entry": {
      "$ref": "#/$defs/entry"
    }
  },
  "$defs": {
    "entry": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "command"
      ],
      "properties": {
        "command": {
          "type": "string",
          "minLength": 1
        },
        "environment": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "cwd": {
          "type": "string"
        },
        "timeout_seconds": {
          "type": "integer",
          "minimum": 1
        }
      }
    }
  }
}
