{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://localendpoints.com/schemas/localendpoint.agent-ability.schema.json",
  "title": "LocalEndpoint Agent Ability Profile",
  "description": "Declares local agent capabilities with resource cost, safety gate, review trigger, and evidence artifact requirements.",
  "type": "object",
  "required": [
    "profileVersion",
    "agentName",
    "ownerWorkspaceLabel",
    "capabilities",
    "createdUtc",
    "updatedUtc"
  ],
  "properties": {
    "profileVersion": {
      "type": "string",
      "const": "1.0"
    },
    "agentName": {
      "type": "string",
      "minLength": 1
    },
    "ownerWorkspaceLabel": {
      "type": "string",
      "minLength": 1
    },
    "capabilities": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "capabilityName",
          "allowedInputs",
          "outputShape",
          "maintenanceResourceCostEstimate",
          "safetyGate",
          "humanReviewTrigger",
          "evidenceArtifactProduced"
        ],
        "properties": {
          "capabilityName": {
            "type": "string",
            "minLength": 1
          },
          "allowedInputs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "outputShape": {
            "type": "string"
          },
          "maintenanceResourceCostEstimate": {
            "type": "object",
            "required": [
              "cpu",
              "memoryMb",
              "maintenanceNotes"
            ],
            "properties": {
              "cpu": {
                "type": "string"
              },
              "memoryMb": {
                "type": "integer",
                "minimum": 0
              },
              "maintenanceNotes": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "safetyGate": {
            "type": "string"
          },
          "humanReviewTrigger": {
            "type": "string"
          },
          "evidenceArtifactProduced": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "createdUtc": {
      "type": "string",
      "format": "date-time"
    },
    "updatedUtc": {
      "type": "string",
      "format": "date-time"
    },
    "nonClaims": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false
}
