{
  "$comment": "MPLP Protocol v1.0.0 — Frozen Specification\nFreeze Date: 2025-12-03\nStatus: FROZEN (no breaking changes permitted)\nGovernance: MPLP Protocol Governance Committee (MPGC)\nCopyright: © 2026 Jearon Wong\nLicense: Apache-2.0\nAny normative change requires a new protocol version.",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.mplp.dev/v1.0/mplp-extension.schema.json",
  "title": "MPLP Extension Module – Core Protocol v1.0",
  "description": "Extension Module Core Protocol: Describes the minimal required semantics (Core Profile) for the MPLP plugin system, capability injection, and protocol enhancement points.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "meta": {
      "$ref": "common/metadata.schema.json",
      "description": "[PROTOCOL-CORE] MPLP protocol and schema metadata."
    },
    "governance": {
      "type": "object",
      "description": "[PROTOCOL-CORE] Governance metadata for lifecycle management, truth domain authority, and locking status.",
      "properties": {
        "lifecyclePhase": {
          "type": "string",
          "description": "Current phase in the lifecycle fence (e.g., 'design', 'implementation', 'review')."
        },
        "truthDomain": {
          "type": "string",
          "description": "The truth domain this object belongs to (e.g., 'requirements', 'architecture')."
        },
        "locked": {
          "type": "boolean",
          "description": "If true, this object cannot be modified except by specific governance overrides."
        },
        "lastConfirmRef": {
          "$ref": "common/common-types.schema.json#/definitions/Ref",
          "description": "Reference to the last Confirm decision that validated this state."
        }
      },
      "additionalProperties": false
    },
    "extension_id": {
      "$ref": "common/identifiers.schema.json",
      "description": "[PROTOCOL-CORE] Global unique identifier for the Extension."
    },
    "context_id": {
      "$ref": "common/identifiers.schema.json",
      "description": "[PROTOCOL-CORE] Identifier of the Context this Extension belongs to."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "[PROTOCOL-CORE] Extension name (human-readable)."
    },
    "extension_type": {
      "type": "string",
      "description": "[PROTOCOL-CORE] Extension type classification.",
      "enum": [
        "capability",
        "policy",
        "integration",
        "transformation",
        "validation",
        "other"
      ]
    },
    "version": {
      "type": "string",
      "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
      "description": "[PROTOCOL-CORE] Extension version (SemVer format)."
    },
    "status": {
      "type": "string",
      "description": "[PROTOCOL-CORE] Extension status.",
      "enum": [
        "registered",
        "active",
        "inactive",
        "deprecated"
      ]
    },
    "config": {
      "type": "object",
      "description": "[PROTOCOL-CORE] Extension configuration object (L2 safe, implementation details excluded).",
      "additionalProperties": true
    },
    "trace": {
      "$ref": "common/trace-base.schema.json",
      "description": "[PROTOCOL-CORE] Trace reference bound to this Extension."
    },
    "events": {
      "type": "array",
      "description": "[PROTOCOL-CORE] List of key events directly related to this Extension.",
      "items": {
        "$ref": "common/events.schema.json"
      }
    }
  },
  "required": [
    "meta",
    "extension_id",
    "context_id",
    "name",
    "extension_type",
    "version",
    "status"
  ],
  "$defs": {
    "extension_core_properties": {
      "type": "object",
      "properties": {
        "meta": {
          "$ref": "common/metadata.schema.json",
          "description": "[PROTOCOL-CORE] MPLP protocol and schema metadata."
        },
        "extension_id": {
          "$ref": "common/identifiers.schema.json",
          "description": "[PROTOCOL-CORE] Global unique identifier for the Extension."
        },
        "context_id": {
          "$ref": "common/identifiers.schema.json",
          "description": "[PROTOCOL-CORE] Identifier of the Context this Extension belongs to."
        },
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "[PROTOCOL-CORE] Extension name (human-readable)."
        },
        "extension_type": {
          "type": "string",
          "description": "[PROTOCOL-CORE] Extension type classification.",
          "enum": [
            "capability",
            "policy",
            "integration",
            "transformation",
            "validation",
            "other"
          ]
        },
        "version": {
          "type": "string",
          "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
          "description": "[PROTOCOL-CORE] Extension version (SemVer format)."
        },
        "status": {
          "type": "string",
          "description": "[PROTOCOL-CORE] Extension status.",
          "enum": [
            "registered",
            "active",
            "inactive",
            "deprecated"
          ]
        },
        "config": {
          "type": "object",
          "description": "[PROTOCOL-CORE] Extension configuration object (L2 safe, implementation details excluded).",
          "additionalProperties": true
        },
        "trace": {
          "$ref": "common/trace-base.schema.json",
          "description": "[PROTOCOL-CORE] Trace reference bound to this Extension."
        },
        "events": {
          "type": "array",
          "description": "[PROTOCOL-CORE] List of key events directly related to this Extension.",
          "items": {
            "$ref": "common/events.schema.json"
          }
        }
      },
      "required": [
        "meta",
        "extension_id",
        "context_id",
        "name",
        "extension_type",
        "version",
        "status"
      ]
    }
  }
}
