{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"urn:nova-forge:schemas:universal-mod-manifest:v1","title":"Nova Forge Universal Mod Manifest","type":"object","additionalProperties":false,"required":["schemaVersion","content","target","creator","compatibility","rights","provenance","files","distribution"],"properties":{"schemaVersion":{"const":1},"content":{"type":"object","additionalProperties":false,"required":["id","name","version","kind"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{1,127}$"},"name":{"type":"string","minLength":1,"maxLength":160},"version":{"type":"string","minLength":1,"maxLength":80},"kind":{"enum":["mod","pack","experience","tool","resource"]},"summary":{"type":"string","maxLength":1200}}},"target":{"type":"object","additionalProperties":false,"required":["gameId","gameName"],"properties":{"gameId":{"type":"string","minLength":1,"maxLength":120},"gameName":{"type":"string","minLength":1,"maxLength":160},"versions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"uniqueItems":true},"loaders":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"uniqueItems":true}}},"creator":{"type":"object","additionalProperties":false,"required":["id","displayName"],"properties":{"id":{"type":"string","minLength":1,"maxLength":160},"displayName":{"type":"string","minLength":1,"maxLength":160}}},"compatibility":{"type":"object","additionalProperties":false,"required":["evidence"],"properties":{"evidence":{"enum":["measured","estimated","unknown"]},"evidenceReceipt":{"type":"string","pattern":"^receipt:[a-z0-9][a-z0-9._:-]{1,191}$"},"notes":{"type":"string","maxLength":2000},"dependencies":{"type":"array","items":{"$ref":"#/$defs/relation"},"uniqueItems":true},"conflicts":{"type":"array","items":{"$ref":"#/$defs/relation"},"uniqueItems":true}},"allOf":[{"if":{"properties":{"evidence":{"const":"measured"}},"required":["evidence"]},"then":{"required":["evidenceReceipt"]}}]},"rights":{"type":"object","additionalProperties":false,"required":["license","redistribution"],"properties":{"license":{"type":"string","minLength":1,"maxLength":160},"redistribution":{"enum":["allowed","restricted","not-authorized","unknown"]},"notice":{"type":"string","maxLength":3000}}},"provenance":{"type":"object","additionalProperties":false,"required":["state"],"properties":{"state":{"enum":["verified","declared-unattested","unknown"]},"sourceUri":{"type":"string","format":"uri","maxLength":2048},"receiptId":{"type":"string","pattern":"^receipt:[a-z0-9][a-z0-9._:-]{1,191}$"},"notes":{"type":"string","maxLength":2000}},"allOf":[{"if":{"properties":{"state":{"const":"verified"}},"required":["state"]},"then":{"required":["receiptId"]}}]},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","size","hashes"],"properties":{"path":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"},"size":{"type":"integer","minimum":0},"hashes":{"type":"object","additionalProperties":false,"required":["sha256"],"properties":{"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}}},"mediaType":{"type":"string","maxLength":160},"executable":{"type":"boolean","default":false}}}},"distribution":{"type":"object","additionalProperties":false,"required":["state","downloadable"],"properties":{"state":{"enum":["locked","published","withdrawn","revoked"]},"downloadable":{"type":"boolean"},"resolverId":{"type":"string","maxLength":160},"expectedContentId":{"type":"string","maxLength":200}},"allOf":[{"if":{"properties":{"state":{"enum":["withdrawn","revoked"]}},"required":["state"]},"then":{"properties":{"downloadable":{"const":false}}}}]},"releaseReceipt":{"type":["object","null"],"additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^receipt:[a-z0-9][a-z0-9._:-]{1,191}$"},"createdAt":{"type":"string","format":"date-time"},"manifestSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"signature":{"type":["string","null"],"maxLength":8192}}}},"$defs":{"relation":{"type":"object","additionalProperties":false,"required":["id"],"properties":{"id":{"type":"string","minLength":1,"maxLength":160},"versionRange":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[0-9A-Za-z*.+<>=~^| _-]+$"},"optional":{"type":"boolean","default":false}}}}}
