{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://kiwe.dev/contracts/seam.package-integrity.v1.schema.json",
  "title": "Seam compiler package byte inventory v1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "sourceHash", "algorithm", "profile", "templates", "nativeMembers", "files", "mutatesWordPress"],
  "properties": {
    "schema": {"const": "seam.package-integrity.v1"},
    "sourceHash": {"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},
    "algorithm": {"const":"sha256"},
    "profile": {"type":"string","minLength":1,"maxLength":240},
    "templates": {"type":"array","minItems":1,"maxItems":150,"uniqueItems":true,"items":{"type":"string","minLength":1,"maxLength":240}},
    "nativeMembers": {"type":"array","minItems":2,"maxItems":151,"items":{"type":"object","additionalProperties":false,"required":["path","sha256","bytes"],"properties":{"path":{"type":"string","minLength":1,"maxLength":240},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"bytes":{"type":"integer","minimum":1,"maximum":67108864}}}},
    "files": {"type":"array","minItems":5,"maxItems":600,"items":{"type":"object","additionalProperties":false,"required":["path","sha256","bytes"],"properties":{"path":{"type":"string","minLength":1,"maxLength":240},"sha256":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"bytes":{"type":"integer","minimum":0,"maximum":67108864}}}},
    "mutatesWordPress": {"const":false}
  },
  "$comment": "Sorted UTF-8 path + NUL + sha256:hex + LF nativeMember rows produce sourceHash. Hashes identify bytes, not a trusted compiler signer. Target revalidation, permission and current-state guards remain mandatory. Only listed members are inputs; a single optional portable framework manifest may accompany this inventory without execution authority."
}
