{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agentweb.us/.well-known/action-map.schema.json",
  "title": "AgentWeb Action Map",
  "type": "object",
  "required": ["workflow_id", "runtime", "actions", "verification"],
  "properties": {
    "workflow_id": {
      "type": "string",
      "description": "Stable workflow identifier used by SDK and agent integrations."
    },
    "customer": {
      "type": "string",
      "description": "Customer or design partner namespace."
    },
    "description": {
      "type": "string"
    },
    "runtime": {
      "type": "string",
      "enum": ["protocol_native", "map_gap", "unsupported"]
    },
    "auth_model": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "scope": {
          "type": "string"
        }
      }
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["name", "type"],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "description": {
            "type": "string"
          }
        }
      }
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "description"],
        "properties": {
          "id": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "endpoint_hint": {
            "type": "string"
          }
        }
      }
    },
    "verification": {
      "type": "object",
      "required": ["success_signals"],
      "properties": {
        "success_signals": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "failure_signals": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "retention": {
      "type": "object",
      "properties": {
        "store_payloads": {
          "type": "boolean"
        },
        "redaction": {
          "type": "string"
        }
      }
    },
    "sdk_targets": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}
