{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spec":{"type":"string","const":"orsel.recipe/1"},"siteDomain":{"type":"string","pattern":"^(?=.{1,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63}$"},"actionId":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,63}$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tiers":{"minItems":1,"maxItems":5,"type":"array","items":{"oneOf":[{"type":"object","properties":{"tier":{"type":"string","const":"api"},"request":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"url":{"type":"string","maxLength":4096},"headers":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4096}},"body":{"type":"string","maxLength":4096},"expectStatus":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["method","url","headers"],"additionalProperties":false},"extract":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"from":{"type":"string","enum":["json","text","html","header"]},"path":{"type":"string","minLength":1,"maxLength":512},"attr":{"type":"string","maxLength":64},"capture":{"type":"string","maxLength":256},"format":{"type":"string","enum":["markdown"]},"unique":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":1000},"filter":{"type":"string","maxLength":256},"type":{"default":"string","type":"string","enum":["string","number","boolean","json"]},"required":{"default":true,"type":"boolean"}},"required":["name","from","path","type","required"],"additionalProperties":false}},"timeoutMs":{"default":10000,"type":"integer","exclusiveMinimum":0,"maximum":120000}},"required":["tier","request","extract","timeoutMs"],"additionalProperties":false},{"type":"object","properties":{"tier":{"type":"string","const":"webmcp"},"tool":{"type":"string","minLength":1,"maxLength":128},"args":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4096}},"timeoutMs":{"default":10000,"type":"integer","exclusiveMinimum":0,"maximum":120000}},"required":["tier","tool","args","timeoutMs"],"additionalProperties":false},{"type":"object","properties":{"tier":{"type":"string","const":"replay"},"requests":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"]},"url":{"type":"string","maxLength":4096},"headers":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":4096}},"body":{"type":"string","maxLength":4096},"expectStatus":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["method","url","headers"],"additionalProperties":false}},"extract":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"from":{"type":"string","enum":["json","text","html","header"]},"path":{"type":"string","minLength":1,"maxLength":512},"attr":{"type":"string","maxLength":64},"capture":{"type":"string","maxLength":256},"format":{"type":"string","enum":["markdown"]},"unique":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":1000},"filter":{"type":"string","maxLength":256},"type":{"default":"string","type":"string","enum":["string","number","boolean","json"]},"required":{"default":true,"type":"boolean"}},"required":["name","from","path","type","required"],"additionalProperties":false}},"timeoutMs":{"default":15000,"type":"integer","exclusiveMinimum":0,"maximum":120000}},"required":["tier","requests","extract","timeoutMs"],"additionalProperties":false},{"type":"object","properties":{"tier":{"type":"string","const":"dom"},"steps":{"minItems":1,"maxItems":64,"type":"array","items":{"oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"goto"},"url":{"type":"string","maxLength":4096}},"required":["op","url"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"click"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["op","selector"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"type"},"selector":{"type":"string","minLength":1,"maxLength":512},"text":{"type":"string","maxLength":4096}},"required":["op","selector","text"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"select"},"selector":{"type":"string","minLength":1,"maxLength":512},"value":{"type":"string","maxLength":4096}},"required":["op","selector","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"wait"},"selector":{"type":"string","minLength":1,"maxLength":512},"timeoutMs":{"default":5000,"type":"integer","minimum":-9007199254740991,"maximum":30000}},"required":["op","selector","timeoutMs"],"additionalProperties":false}]}},"extract":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"from":{"type":"string","enum":["json","text","html","header"]},"path":{"type":"string","minLength":1,"maxLength":512},"attr":{"type":"string","maxLength":64},"capture":{"type":"string","maxLength":256},"format":{"type":"string","enum":["markdown"]},"unique":{"type":"boolean"},"limit":{"type":"integer","minimum":1,"maximum":1000},"filter":{"type":"string","maxLength":256},"type":{"default":"string","type":"string","enum":["string","number","boolean","json"]},"required":{"default":true,"type":"boolean"}},"required":["name","from","path","type","required"],"additionalProperties":false}},"timeoutMs":{"default":30000,"type":"integer","exclusiveMinimum":0,"maximum":120000}},"required":["tier","steps","extract","timeoutMs"],"additionalProperties":false},{"type":"object","properties":{"tier":{"type":"string","const":"agent"},"instructions":{"type":"string","minLength":1,"maxLength":4000},"maxSteps":{"default":20,"type":"integer","exclusiveMinimum":0,"maximum":50},"timeoutMs":{"default":120000,"type":"integer","exclusiveMinimum":0,"maximum":300000}},"required":["tier","instructions","maxSteps","timeoutMs"],"additionalProperties":false}]}},"canaries":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"expect":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}},"required":["name","input"],"additionalProperties":false}},"allowedOrigins":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string","format":"uri"}},"publisher":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":120},"keyId":{"type":"string","minLength":1,"maxLength":128}},"required":["id","name","keyId"],"additionalProperties":false},"provenance":{"type":"object","properties":{"method":{"type":"string","enum":["official_api","webmcp","har","recorded","agent_explore","repair","import","manual"]},"compiledBy":{"type":"string","maxLength":128},"runId":{"type":"string","maxLength":128},"model":{"type":"string","maxLength":128},"derivedFrom":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["method","compiledBy"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"contentHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"signature":{"type":"object","properties":{"alg":{"type":"string","const":"ed25519"},"keyId":{"type":"string","minLength":1,"maxLength":128},"value":{"type":"string","minLength":80,"maxLength":100}},"required":["alg","keyId","value"],"additionalProperties":false},"status":{"type":"string","enum":["candidate","verified","degraded","quarantined","revoked"]},"postconditions":{"default":[],"maxItems":16,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"status_in"},"statuses":{"minItems":1,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["kind","statuses"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_present"},"path":{"type":"string","minLength":1,"maxLength":256}},"required":["kind","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_equals"},"path":{"type":"string","minLength":1,"maxLength":256},"value":{"$ref":"#/$defs/__schema2"}},"required":["kind","path","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"field_matches"},"path":{"type":"string","minLength":1,"maxLength":256},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","path","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text_contains"},"text":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"url_matches"},"pattern":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","pattern"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"element_exists"},"selector":{"type":"string","minLength":1,"maxLength":512}},"required":["kind","selector"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"signed_in"}},"required":["kind"],"additionalProperties":false}]}}},"required":["spec","siteDomain","actionId","version","tiers","canaries","allowedOrigins","publisher","provenance","createdAt","contentHash","signature","status","postconditions"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema1"}}]},"__schema2":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema2"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema2"}}]}}}