{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://quantumsoftware.tech/schemas/nm-product-handoff-0.1.schema.json","title":"N/M Product Handoff 0.1","type":"object","additionalProperties":false,"required":["format","version","from","to","source","resourceBudget","targetProfile","oraclePackageDraft","calibration","returnPath","integrity"],"properties":{"format":{"const":"nm-product-handoff"},"version":{"const":"0.1"},"from":{"enum":["experiment-studio","oracle-builder","circuit-analysis","test-explorer","package-registry","backend-lab"]},"to":{"enum":["experiment-studio","oracle-builder","circuit-analysis","test-explorer","package-registry","backend-lab"]},"source":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["text","hash","label","project","successStates","features"],"properties":{"text":{"type":"string","minLength":1,"maxLength":131072,"pattern":"^(?![\\s\\S]*\\r)[\\s\\S]+$"},"hash":{"type":"string","pattern":"^[0-9a-f]{16}$"},"label":{"type":"string","minLength":1,"maxLength":120,"pattern":"^(?!\\s)(?![\\s\\S]*\\s$)[^\\u0000-\\u001f\\u007f]+$"},"project":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["id","revision","activePath"],"properties":{"id":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{2,79}$"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"activePath":{"type":"string","maxLength":512,"pattern":"^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))[A-Za-z0-9._/-]+\\.nm$"}}}]},"successStates":{"type":"array","uniqueItems":true,"maxItems":32,"items":{"type":"string","pattern":"^[01]{1,100}$"}},"features":{"type":"object","additionalProperties":false,"required":["genericOracles","propertyAssertions"],"properties":{"genericOracles":{"type":"boolean"},"propertyAssertions":{"type":"boolean"}}}}}]},"resourceBudget":{"anyOf":[{"type":"null"},{"$ref":"https://quantumsoftware.tech/schemas/nm-resource-budget-0.1.schema.json"}]},"targetProfile":{"anyOf":[{"type":"null"},{"$ref":"https://quantumsoftware.tech/schemas/nm-target-profile-0.1.schema.json"}]},"oraclePackageDraft":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["format","version","publishable","reason","package","source","sourceHash"],"properties":{"format":{"const":"nm-package-draft"},"version":{"const":"0.1"},"publishable":{"const":false},"reason":{"const":"local-review-required"},"package":{"type":"object","additionalProperties":false,"required":["id","version","exportName","oracleType"],"properties":{"id":{"type":"string","pattern":"^local\\.oracle\\.[a-z0-9][a-z0-9._-]{0,79}$"},"version":{"const":"0.0.0-local"},"exportName":{"const":"visual_constraint"},"oracleType":{"type":"string","pattern":"^(?:XorOracle<[1-9]\\d?,[1-9]\\d?>|PhaseOracle<[1-5]>)$"}}},"source":{"type":"string","minLength":1,"maxLength":128000},"sourceHash":{"type":"string","pattern":"^[0-9a-f]{16}$"}}}]},"calibration":{"anyOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["comparisonId","inputHash","profileId","snapshots","boundary"],"properties":{"comparisonId":{"type":"string","pattern":"^nmcalcmp-[0-9a-f]{16}$"},"inputHash":{"type":"string","pattern":"^[0-9a-f]{16}$"},"profileId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"snapshots":{"type":"object","additionalProperties":false,"required":["left","right"],"properties":{"left":{"type":"object","additionalProperties":false,"required":["calibrationId","capturedAt"],"properties":{"calibrationId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"capturedAt":{"anyOf":[{"type":"null"},{"type":"string","format":"date-time"}]}}},"right":{"type":"object","additionalProperties":false,"required":["calibrationId","capturedAt"],"properties":{"calibrationId":{"type":"string","minLength":1,"maxLength":160,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"capturedAt":{"anyOf":[{"type":"null"},{"type":"string","format":"date-time"}]}}}}},"boundary":{"const":"provenance-only-not-runtime-calibration"}}}]},"returnPath":{"anyOf":[{"type":"null"},{"type":"string","maxLength":2048,"pattern":"^/[a-z0-9][a-z0-9/_-]*(?:\\?[a-zA-Z0-9_.~%=&-]+)?$"}]},"integrity":{"type":"object","additionalProperties":false,"required":["algorithm","handoffHash"],"properties":{"algorithm":{"const":"fnv1a-64"},"handoffHash":{"type":"string","pattern":"^[0-9a-f]{16}$"}}}}}