{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://q1z3.com/discovery-engine/schemas/response.schema.json","title":"Q1Z3 bounded discovery response","type":"object","properties":{"schema":{"const":"q1z3.discovery"},"version":{"const":1},"engine":{"type":"object","properties":{"id":{"const":"q1z3.discovery"},"release":{"type":"string","minLength":1,"maxLength":80},"algorithm":{"const":"deterministic-v1"},"policyVersion":{"const":1},"runtimeBuildSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["id","release","algorithm","policyVersion"],"additionalProperties":false},"candidates":{"type":"array","items":{"type":"object","properties":{"handle":{"type":"string","minLength":3,"maxLength":24},"canonicalUrl":{"type":"string","format":"uri"},"descriptorUrl":{"type":"string","format":"uri"},"manifest":{"$ref":"./manifest.schema.json"},"signals":{"type":"object","properties":{"lexicalRelevance":{"type":"number","minimum":0,"maximum":1},"semanticRelevance":{"type":"number","minimum":0,"maximum":1},"matchedTerms":{"type":"array","items":{"type":"string","minLength":1,"maxLength":600},"maxItems":300},"matchedConcepts":{"type":"array","items":{"enum":["plumbing","electrical","software","translation","education","design","film","gardening","cooking"]},"maxItems":9,"uniqueItems":true},"constraintsSatisfied":{"const":true},"identityStatus":{"const":"active"},"capabilitiesSource":{"const":"owner_published"},"contactStatus":{"enum":["ready","offline","not_configured"]},"contactModalities":{"const":["text"]},"availabilityVerified":{"const":false},"retrievalScore":{"type":"number","minimum":0,"maximum":1}},"required":["lexicalRelevance","semanticRelevance","matchedTerms","matchedConcepts","constraintsSatisfied","identityStatus","capabilitiesSource","contactStatus","contactModalities","availabilityVerified","retrievalScore"],"additionalProperties":false}},"required":["handle","canonicalUrl","descriptorUrl","manifest","signals"],"additionalProperties":false},"minItems":0,"maxItems":5},"retrieval":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":5},"maxScanned":{"const":500},"bounded":{"const":true},"scanned":{"type":"integer","minimum":0,"maximum":500},"ordering":{"const":"intent_relevance_then_handle"},"selection":{"const":"requesting_agent"}},"required":["limit","maxScanned","bounded","scanned","ordering","selection"],"additionalProperties":false},"usage":{"type":"object","properties":{"acceptedQueries":{"const":1},"modelCalls":{"const":0},"automaticProbes":{"const":0},"profilesScored":{"type":"integer","minimum":0,"maximum":500},"returnedCandidates":{"type":"integer","minimum":0,"maximum":5},"billingActive":{"const":false},"billedCost":{"type":"null"},"cpuMs":{"type":"null"},"databaseRowsRead":{"type":"null"},"databaseRowsWritten":{"type":"null"}},"required":["acceptedQueries","modelCalls","automaticProbes","profilesScored","returnedCandidates","billingActive","billedCost","cpuMs","databaseRowsRead","databaseRowsWritten"],"additionalProperties":false}},"required":["schema","version","candidates","retrieval","engine","usage"],"additionalProperties":false}