{"components":{"schemas":{"ApiError":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","enum":["INVALID_REQUEST","AUTH_REQUIRED","AUTH_AMBIGUOUS","FORBIDDEN","NOT_FOUND","IDEMPOTENCY_REQUIRED","IDEMPOTENCY_CONFLICT","PRECONDITION_REQUIRED","PRECONDITION_FAILED","CONFLICT","RATE_LIMITED","TEMPORARILY_UNAVAILABLE","AGENT_RUN_REQUIRED","JOB_FAILED","INTERNAL_ERROR"]},"fieldErrors":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(?:\\$|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*)$"},"message":{"type":"string","maxLength":1024}},"required":["field","message"],"additionalProperties":false}},"message":{"type":"string","maxLength":2048},"requiredAction":{"type":"string","enum":["authenticate","choose-new-idempotency-key","refresh-resource","retry-job","review-in-browser","submit-through-research-job"]},"retryAfterMs":{"type":"integer","minimum":0,"maximum":86400000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false},"ApiErrorEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_REQUEST","AUTH_REQUIRED","AUTH_AMBIGUOUS","FORBIDDEN","NOT_FOUND","IDEMPOTENCY_REQUIRED","IDEMPOTENCY_CONFLICT","PRECONDITION_REQUIRED","PRECONDITION_FAILED","CONFLICT","RATE_LIMITED","TEMPORARILY_UNAVAILABLE","AGENT_RUN_REQUIRED","JOB_FAILED","INTERNAL_ERROR"]},"fieldErrors":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(?:\\$|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*)$"},"message":{"type":"string","maxLength":1024}},"required":["field","message"],"additionalProperties":false}},"message":{"type":"string","maxLength":2048},"requiredAction":{"type":"string","enum":["authenticate","choose-new-idempotency-key","refresh-resource","retry-job","review-in-browser","submit-through-research-job"]},"retryAfterMs":{"type":"integer","minimum":0,"maximum":86400000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false}},"required":["error","meta"],"additionalProperties":false},"ApiPrincipal":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"credentialRef":{"type":"string","minLength":30,"maxLength":30,"pattern":"^scred_[a-f0-9]{24}$"},"displayPrefix":{"type":"string","minLength":28,"maxLength":28,"pattern":"^spg_agent_v1_scred_[a-f0-9]{8}…$"},"expiresAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},{"type":"null"}]},"label":{"type":"string","maxLength":80},"remainingBudget":{"type":"integer","minimum":0,"maximum":10000},"requestBudget":{"type":"integer","minimum":1,"maximum":10000},"scopes":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["document:create","document:read","document:write","inquiry:create","knowledge:propose","knowledge:read","public:read","research:run","review:read"]}},"spaceRef":{"type":"string","minLength":52,"maxLength":52,"pattern":"^ksp_[a-f0-9]{48}$"},"v":{"type":"number","const":1}},"required":["credentialRef","displayPrefix","expiresAt","label","remainingBudget","requestBudget","scopes","v"],"additionalProperties":false},"ApiPrincipalEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"credentialRef":{"type":"string","minLength":30,"maxLength":30,"pattern":"^scred_[a-f0-9]{24}$"},"displayPrefix":{"type":"string","minLength":28,"maxLength":28,"pattern":"^spg_agent_v1_scred_[a-f0-9]{8}…$"},"expiresAt":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},{"type":"null"}]},"label":{"type":"string","maxLength":80},"remainingBudget":{"type":"integer","minimum":0,"maximum":10000},"requestBudget":{"type":"integer","minimum":1,"maximum":10000},"scopes":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["document:create","document:read","document:write","inquiry:create","knowledge:propose","knowledge:read","public:read","research:run","review:read"]}},"spaceRef":{"type":"string","minLength":52,"maxLength":52,"pattern":"^ksp_[a-f0-9]{48}$"},"v":{"type":"number","const":1}},"required":["credentialRef","displayPrefix","expiresAt","label","remainingBudget","requestBudget","scopes","v"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"Document":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"browserHref":{"type":"string","minLength":1,"maxLength":2048},"contentSha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"document":{"$ref":"#/components/schemas/RichDocument"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"format":{"type":"string","const":"sponge-rich-document"},"formatGeneration":{"type":"number","const":1},"spaceRef":{"type":"string","minLength":52,"maxLength":52,"pattern":"^ksp_[a-f0-9]{48}$"},"title":{"type":"string","minLength":1,"maxLength":240},"v":{"type":"number","const":1},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["browserHref","contentSha256","document","documentRef","format","formatGeneration","spaceRef","title","v","version"],"additionalProperties":false},"DocumentCreateRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":240},"v":{"type":"number","const":1}},"required":["title","v"],"additionalProperties":false},"DocumentEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"browserHref":{"type":"string","minLength":1,"maxLength":2048},"contentSha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"document":{"$ref":"#/components/schemas/RichDocument"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"format":{"type":"string","const":"sponge-rich-document"},"formatGeneration":{"type":"number","const":1},"spaceRef":{"type":"string","minLength":52,"maxLength":52,"pattern":"^ksp_[a-f0-9]{48}$"},"title":{"type":"string","minLength":1,"maxLength":240},"v":{"type":"number","const":1},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["browserHref","contentSha256","document","documentRef","format","formatGeneration","spaceRef","title","v","version"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"DocumentMutationRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"intent":{"type":"string","minLength":1,"maxLength":500},"mutation":{"oneOf":[{"type":"object","properties":{"beforeBlockId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"},{"type":"null"}]},"blocks":{"minItems":1,"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/DocumentMutationRequest/$defs/__schema0"}},"kind":{"type":"string","const":"create"},"parentBlockId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"},{"type":"null"}]}},"required":["beforeBlockId","blocks","kind","parentBlockId"],"additionalProperties":false},{"type":"object","properties":{"block":{"$ref":"#/components/schemas/DocumentMutationRequest/$defs/__schema0"},"blockId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"},"kind":{"type":"string","const":"edit"}},"required":["block","blockId","kind"],"additionalProperties":false},{"type":"object","properties":{"beforeBlockId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"},{"type":"null"}]},"blockIds":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"}},"kind":{"type":"string","const":"move"},"newParentBlockId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"},{"type":"null"}]},"newSiblingBlockIds":{"maxItems":2,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"}},"oldParentBlockId":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"},{"type":"null"}]},"oldSiblingBlockIds":{"maxItems":2,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"}}},"required":["beforeBlockId","blockIds","kind","newParentBlockId","newSiblingBlockIds","oldParentBlockId","oldSiblingBlockIds"],"additionalProperties":false},{"type":"object","properties":{"blockIds":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"}},"kind":{"type":"string","const":"delete"},"parentBlockIds":{"maxItems":64,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"}},"siblingBlockIds":{"maxItems":128,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$"}}},"required":["blockIds","kind","parentBlockIds","siblingBlockIds"],"additionalProperties":false}]},"v":{"type":"number","const":1}},"required":["intent","mutation","v"],"additionalProperties":false,"$defs":{"__schema0":{"type":"object","properties":{"checked":{"type":"boolean"},"children":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/DocumentMutationRequest/$defs/__schema0"}},"code":{"type":"string","maxLength":50000},"language":{"type":"string","minLength":1,"maxLength":80},"level":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3}]},"markdown":{"type":"string","maxLength":20000,"description":"Inline Markdown for exactly one block. Put additional or nested blocks in the explicit children array. Cite public evidence with [descriptive label](exact https URL); raw URL text is not a citation link."},"rows":{"minItems":1,"maxItems":50,"type":"array","items":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","maxLength":5000}}},"type":{"type":"string","enum":["paragraph","heading","bulletListItem","numberedListItem","checkListItem","quote","codeBlock","table"]}},"required":["type"],"additionalProperties":false}}},"DocumentMutationResult":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"document":{"type":"object","properties":{"browserHref":{"type":"string","minLength":1,"maxLength":2048},"contentSha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"document":{"$ref":"#/components/schemas/RichDocument"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"format":{"type":"string","const":"sponge-rich-document"},"formatGeneration":{"type":"number","const":1},"spaceRef":{"type":"string","minLength":52,"maxLength":52,"pattern":"^ksp_[a-f0-9]{48}$"},"title":{"type":"string","minLength":1,"maxLength":240},"v":{"type":"number","const":1},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["browserHref","contentSha256","document","documentRef","format","formatGeneration","spaceRef","title","v","version"],"additionalProperties":false},"receipt":{"type":"object","properties":{"affectedBlockIds":{"minItems":1,"maxItems":256,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]{0,127}$"}},"baseVersion":{"type":"integer","minimum":1,"maximum":9007199254740990},"contentSha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"operationRef":{"type":"string","minLength":54,"maxLength":54,"pattern":"^docop_[a-f0-9]{48}$"},"resultingVersion":{"type":"integer","minimum":2,"maximum":9007199254740991},"v":{"type":"number","const":1}},"required":["affectedBlockIds","baseVersion","contentSha256","documentRef","operationRef","resultingVersion","v"],"additionalProperties":false},"v":{"type":"number","const":1}},"required":["document","receipt","v"],"additionalProperties":false},"DocumentMutationResultEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"document":{"type":"object","properties":{"browserHref":{"type":"string","minLength":1,"maxLength":2048},"contentSha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"document":{"$ref":"#/components/schemas/RichDocument"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"format":{"type":"string","const":"sponge-rich-document"},"formatGeneration":{"type":"number","const":1},"spaceRef":{"type":"string","minLength":52,"maxLength":52,"pattern":"^ksp_[a-f0-9]{48}$"},"title":{"type":"string","minLength":1,"maxLength":240},"v":{"type":"number","const":1},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["browserHref","contentSha256","document","documentRef","format","formatGeneration","spaceRef","title","v","version"],"additionalProperties":false},"receipt":{"type":"object","properties":{"affectedBlockIds":{"minItems":1,"maxItems":256,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]{0,127}$"}},"baseVersion":{"type":"integer","minimum":1,"maximum":9007199254740990},"contentSha256":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"operationRef":{"type":"string","minLength":54,"maxLength":54,"pattern":"^docop_[a-f0-9]{48}$"},"resultingVersion":{"type":"integer","minimum":2,"maximum":9007199254740991},"v":{"type":"number","const":1}},"required":["affectedBlockIds","baseVersion","contentSha256","documentRef","operationRef","resultingVersion","v"],"additionalProperties":false},"v":{"type":"number","const":1}},"required":["document","receipt","v"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"ProposalSubmissionResult":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"browserHref":{"type":"string","maxLength":2048},"conflicts":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":4096}},"proposalRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kprp_[a-f0-9]{48}$"},"requiredAction":{"anyOf":[{"type":"string","const":"review-in-browser"},{"type":"null"}]},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"},"state":{"type":"string","enum":["proposed","in-review","accepted","rejected","withdrawn"]},"supportPaths":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"label":{"type":"string","maxLength":512}},"required":["href","label"],"additionalProperties":false}},"v":{"type":"number","const":1}},"required":["browserHref","conflicts","proposalRef","requiredAction","reviewRef","state","supportPaths","v"],"additionalProperties":false},"ProposalRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entities":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"concepts":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["account","agent","artifact","concept","entity","event","information-resource","inquiry","organization","person","place","process","source","work"]}},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"identifiers":{"maxItems":4,"type":"array","items":{"type":"string","description":"An HTTP, HTTPS, or URN URI; the server canonicalizes it."}},"key":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$","description":"A proposal-local key such as ada-lovelace or note.analytical-engine."},"language":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:und|[a-z]{2,3}(?:-[a-z0-9]{2,8})*)$","description":"A lowercase BCP 47 language tag such as en, fr, or und."},"name":{"type":"string"}},"required":["concepts","description","identifiers","key","language","name"],"additionalProperties":false}},"evidence":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"bearing":{"type":"string","enum":["background","contradicts","corroborates","direct-observation","method","quotation","registry-record","supports"]},"factKey":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$","description":"The key of a fact in this proposal."},"key":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$","description":"A proposal-local key such as ada-lovelace or note.analytical-engine."},"selector":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"oneOf":[{"type":"object","properties":{"entityKey":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$","description":"A proposal-local key such as ada-lovelace or note.analytical-engine."},"kind":{"type":"string","const":"entity"}},"required":["entityKey","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"uri"},"uri":{"type":"string","description":"An HTTP, HTTPS, or URN URI; the server canonicalizes it."}},"required":["kind","uri"],"additionalProperties":false}]}},"required":["bearing","factKey","key","selector","source"],"additionalProperties":false}},"facts":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$","description":"A proposal-local key such as ada-lovelace or note.analytical-engine."},"object":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"boolean"},"value":{"type":"boolean"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"decimal"},"value":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*[1-9])?$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"iso8601":{"type":"string","minLength":2,"maxLength":128,"pattern":"^-?P(?=\\d|T\\d)(?:\\d+Y)?(?:\\d+M)?(?:\\d+W)?(?:\\d+D)?(?:T(?=\\d)(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?$"},"kind":{"type":"string","const":"duration"}},"required":["iso8601","kind"],"additionalProperties":false},{"type":"object","properties":{"entityKey":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$","description":"The key of an entity in this proposal."},"kind":{"type":"string","const":"entity"}},"required":["entityKey","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"integer"},"value":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^(?:0|-[1-9][0-9]*|[1-9][0-9]*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"string"},"value":{"type":"string"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"language":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:und|[a-z]{2,3}(?:-[a-z0-9]{2,8})*)$","description":"A lowercase BCP 47 language tag such as en, fr, or und."},"text":{"type":"string"}},"required":["kind","language","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"uri"},"uri":{"type":"string","description":"An HTTP, HTTPS, or URN URI; the server canonicalizes it."}},"required":["kind","uri"],"additionalProperties":false}],"description":"A typed semantic value; entity references use proposal-local keys."},"predicate":{"type":"string","enum":["about","authored-by","cites","created-by","derived-from","description","identifier","located-in","name","object","part-of","related-to","same-as"]},"stance":{"type":"string","enum":["questions","refutes","reports","supports","undetermined"]},"subject":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$","description":"The key of an entity in this proposal."}},"required":["key","object","predicate","stance","subject"],"additionalProperties":false}},"inquiries":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"answerForm":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"},"key":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$","description":"A proposal-local key such as ada-lovelace or note.analytical-engine."},"language":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:und|[a-z]{2,3}(?:-[a-z0-9]{2,8})*)$","description":"A lowercase BCP 47 language tag such as en, fr, or und."},"parentKeys":{"maxItems":16,"type":"array","items":{"type":"string","minLength":1,"maxLength":96,"pattern":"^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$","description":"A proposal-local key such as ada-lovelace or note.analytical-engine."}},"question":{"type":"string"}},"required":["answerForm","key","language","parentKeys","question"],"additionalProperties":false}},"v":{"type":"number","const":2}},"required":["entities","evidence","facts","inquiries","v"],"additionalProperties":false},"ProposalSubmissionResultEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"browserHref":{"type":"string","maxLength":2048},"conflicts":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":4096}},"proposalRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kprp_[a-f0-9]{48}$"},"requiredAction":{"anyOf":[{"type":"string","const":"review-in-browser"},{"type":"null"}]},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"},"state":{"type":"string","enum":["proposed","in-review","accepted","rejected","withdrawn"]},"supportPaths":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"label":{"type":"string","maxLength":512}},"required":["href","label"],"additionalProperties":false}},"v":{"type":"number","const":1}},"required":["browserHref","conflicts","proposalRef","requiredAction","reviewRef","state","supportPaths","v"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"PublicArtifact":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"canonicalUrl":{"type":"string","maxLength":2048},"projection":{"oneOf":[{"type":"object","properties":{"byteLength":{"type":"integer","minimum":2,"maximum":524288},"kind":{"type":"string","const":"entity"},"value":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["byteLength","kind","value"],"additionalProperties":false},{"type":"object","properties":{"byteLength":{"type":"integer","minimum":2,"maximum":524288},"kind":{"type":"string","const":"inquiry"},"value":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["byteLength","kind","value"],"additionalProperties":false},{"type":"object","properties":{"byteLength":{"type":"integer","minimum":2,"maximum":524288},"kind":{"type":"string","const":"edition"},"value":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["byteLength","kind","value"],"additionalProperties":false}]},"ref":{"oneOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kent_[a-z0-9]{24}$"},"kind":{"type":"string","const":"entity"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kedn_[a-z0-9]{24}$"},"kind":{"type":"string","const":"edition"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false}]},"v":{"type":"number","const":1}},"required":["canonicalUrl","projection","ref","v"],"additionalProperties":false},"PublicArtifactEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"canonicalUrl":{"type":"string","maxLength":2048},"projection":{"oneOf":[{"type":"object","properties":{"byteLength":{"type":"integer","minimum":2,"maximum":524288},"kind":{"type":"string","const":"entity"},"value":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["byteLength","kind","value"],"additionalProperties":false},{"type":"object","properties":{"byteLength":{"type":"integer","minimum":2,"maximum":524288},"kind":{"type":"string","const":"inquiry"},"value":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["byteLength","kind","value"],"additionalProperties":false},{"type":"object","properties":{"byteLength":{"type":"integer","minimum":2,"maximum":524288},"kind":{"type":"string","const":"edition"},"value":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["byteLength","kind","value"],"additionalProperties":false}]},"ref":{"oneOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kent_[a-z0-9]{24}$"},"kind":{"type":"string","const":"entity"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kedn_[a-z0-9]{24}$"},"kind":{"type":"string","const":"edition"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false}]},"v":{"type":"number","const":1}},"required":["canonicalUrl","projection","ref","v"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"PublicArtifactRef":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kent_[a-z0-9]{24}$"},"kind":{"type":"string","const":"entity"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kedn_[a-z0-9]{24}$"},"kind":{"type":"string","const":"edition"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false}]},"ResearchJob":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"artifacts":{"type":"object","properties":{"document":{"anyOf":[{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"href":{"type":"string","maxLength":2048}},"required":["documentRef","href"],"additionalProperties":false},{"type":"null"}]},"inquiry":{"anyOf":[{"type":"object","properties":{"inquiryId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"}},"required":["inquiryId"],"additionalProperties":false},{"type":"null"}]},"proposal":{"anyOf":[{"type":"object","properties":{"proposalRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kprp_[a-f0-9]{48}$"}},"required":["proposalRef"],"additionalProperties":false},{"type":"null"}]},"publicArtifacts":{"maxItems":256,"type":"array","items":{"oneOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kent_[a-z0-9]{24}$"},"kind":{"type":"string","const":"entity"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kedn_[a-z0-9]{24}$"},"kind":{"type":"string","const":"edition"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false}]}},"report":{"anyOf":[{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"jsonHref":{"type":"string","maxLength":2048},"markdownHref":{"type":"string","maxLength":2048}},"required":["documentRef","jsonHref","markdownHref"],"additionalProperties":false},{"type":"null"}]},"review":{"anyOf":[{"type":"object","properties":{"browserHref":{"type":"string","maxLength":2048},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"}},"required":["browserHref","reviewRef"],"additionalProperties":false},{"type":"null"}]}},"required":["document","inquiry","proposal","publicArtifacts","report","review"],"additionalProperties":false},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_REQUEST","AUTH_REQUIRED","AUTH_AMBIGUOUS","FORBIDDEN","NOT_FOUND","IDEMPOTENCY_REQUIRED","IDEMPOTENCY_CONFLICT","PRECONDITION_REQUIRED","PRECONDITION_FAILED","CONFLICT","RATE_LIMITED","TEMPORARILY_UNAVAILABLE","AGENT_RUN_REQUIRED","JOB_FAILED","INTERNAL_ERROR"]},"fieldErrors":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(?:\\$|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*)$"},"message":{"type":"string","maxLength":1024}},"required":["field","message"],"additionalProperties":false}},"message":{"type":"string","maxLength":2048},"requiredAction":{"type":"string","enum":["authenticate","choose-new-idempotency-key","refresh-resource","retry-job","review-in-browser","submit-through-research-job"]},"retryAfterMs":{"type":"integer","minimum":0,"maximum":86400000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false},{"type":"null"}]},"jobId":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kjob_[a-f0-9]{48}$"},"missingEvidence":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":4096}},"phase":{"type":"string","enum":["queued","planning","retrieving","extracting","proposing","synthesizing","requesting-review","complete","cancelled"]},"progress":{"type":"object","properties":{"percent":{"type":"integer","minimum":0,"maximum":100},"summary":{"type":"string","maxLength":1024}},"required":["percent","summary"],"additionalProperties":false},"requiredAction":{"anyOf":[{"type":"string","enum":["authenticate","choose-new-idempotency-key","refresh-resource","retry-job","review-in-browser","submit-through-research-job"]},{"type":"null"}]},"spec":{"type":"object","properties":{"deliverable":{"type":"object","properties":{"form":{"type":"string","enum":["evidence-review","literature-review","question-answer"]},"kind":{"type":"string","const":"report"},"language":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:und|[a-z]{2,3}(?:-[a-z0-9]{2,8})*)$"}},"required":["form","kind","language"],"additionalProperties":false},"profile":{"type":"string","enum":["focused","deep"]},"question":{"type":"string","maxLength":16384},"spaceRef":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"new-document"},"title":{"type":"string","maxLength":1024}},"required":["kind","title"],"additionalProperties":false},{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"kind":{"type":"string","const":"document"}},"required":["documentRef","kind"],"additionalProperties":false}]},"v":{"type":"number","const":1},"visibilityIntent":{"type":"string","enum":["private","request-publication"]}},"required":["deliverable","profile","question","spaceRef","v","visibilityIntent"],"additionalProperties":false},"state":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"v":{"type":"number","const":1}},"required":["artifacts","createdAt","error","jobId","missingEvidence","phase","progress","requiredAction","spec","state","updatedAt","v"],"additionalProperties":false},"ResearchJobEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"artifacts":{"type":"object","properties":{"document":{"anyOf":[{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"href":{"type":"string","maxLength":2048}},"required":["documentRef","href"],"additionalProperties":false},{"type":"null"}]},"inquiry":{"anyOf":[{"type":"object","properties":{"inquiryId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"}},"required":["inquiryId"],"additionalProperties":false},{"type":"null"}]},"proposal":{"anyOf":[{"type":"object","properties":{"proposalRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kprp_[a-f0-9]{48}$"}},"required":["proposalRef"],"additionalProperties":false},{"type":"null"}]},"publicArtifacts":{"maxItems":256,"type":"array","items":{"oneOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kent_[a-z0-9]{24}$"},"kind":{"type":"string","const":"entity"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kedn_[a-z0-9]{24}$"},"kind":{"type":"string","const":"edition"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false}]}},"report":{"anyOf":[{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"jsonHref":{"type":"string","maxLength":2048},"markdownHref":{"type":"string","maxLength":2048}},"required":["documentRef","jsonHref","markdownHref"],"additionalProperties":false},{"type":"null"}]},"review":{"anyOf":[{"type":"object","properties":{"browserHref":{"type":"string","maxLength":2048},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"}},"required":["browserHref","reviewRef"],"additionalProperties":false},{"type":"null"}]}},"required":["document","inquiry","proposal","publicArtifacts","report","review"],"additionalProperties":false},"createdAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_REQUEST","AUTH_REQUIRED","AUTH_AMBIGUOUS","FORBIDDEN","NOT_FOUND","IDEMPOTENCY_REQUIRED","IDEMPOTENCY_CONFLICT","PRECONDITION_REQUIRED","PRECONDITION_FAILED","CONFLICT","RATE_LIMITED","TEMPORARILY_UNAVAILABLE","AGENT_RUN_REQUIRED","JOB_FAILED","INTERNAL_ERROR"]},"fieldErrors":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(?:\\$|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*)$"},"message":{"type":"string","maxLength":1024}},"required":["field","message"],"additionalProperties":false}},"message":{"type":"string","maxLength":2048},"requiredAction":{"type":"string","enum":["authenticate","choose-new-idempotency-key","refresh-resource","retry-job","review-in-browser","submit-through-research-job"]},"retryAfterMs":{"type":"integer","minimum":0,"maximum":86400000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false},{"type":"null"}]},"jobId":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kjob_[a-f0-9]{48}$"},"missingEvidence":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":4096}},"phase":{"type":"string","enum":["queued","planning","retrieving","extracting","proposing","synthesizing","requesting-review","complete","cancelled"]},"progress":{"type":"object","properties":{"percent":{"type":"integer","minimum":0,"maximum":100},"summary":{"type":"string","maxLength":1024}},"required":["percent","summary"],"additionalProperties":false},"requiredAction":{"anyOf":[{"type":"string","enum":["authenticate","choose-new-idempotency-key","refresh-resource","retry-job","review-in-browser","submit-through-research-job"]},{"type":"null"}]},"spec":{"type":"object","properties":{"deliverable":{"type":"object","properties":{"form":{"type":"string","enum":["evidence-review","literature-review","question-answer"]},"kind":{"type":"string","const":"report"},"language":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:und|[a-z]{2,3}(?:-[a-z0-9]{2,8})*)$"}},"required":["form","kind","language"],"additionalProperties":false},"profile":{"type":"string","enum":["focused","deep"]},"question":{"type":"string","maxLength":16384},"spaceRef":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"new-document"},"title":{"type":"string","maxLength":1024}},"required":["kind","title"],"additionalProperties":false},{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"kind":{"type":"string","const":"document"}},"required":["documentRef","kind"],"additionalProperties":false}]},"v":{"type":"number","const":1},"visibilityIntent":{"type":"string","enum":["private","request-publication"]}},"required":["deliverable","profile","question","spaceRef","v","visibilityIntent"],"additionalProperties":false},"state":{"type":"string","enum":["queued","running","waiting","succeeded","failed","cancelled"]},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"v":{"type":"number","const":1}},"required":["artifacts","createdAt","error","jobId","missingEvidence","phase","progress","requiredAction","spec","state","updatedAt","v"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"ResearchJobEvent":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"detail":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"job-accepted"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"inquiryId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry-created"}},"required":["inquiryId","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"source-captured"},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":2048}},"required":["kind","title","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"evidence-gap-recorded"},"note":{"type":"string","maxLength":4096}},"required":["kind","note"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"proposal-submitted"},"proposalRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kprp_[a-f0-9]{48}$"},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"}},"required":["kind","proposalRef","reviewRef"],"additionalProperties":false},{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"href":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"report-staged"}},"required":["documentRef","href","kind"],"additionalProperties":false},{"type":"object","properties":{"browserHref":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"review-requested"},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"}},"required":["browserHref","kind","reviewRef"],"additionalProperties":false},{"type":"object","properties":{"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_REQUEST","AUTH_REQUIRED","AUTH_AMBIGUOUS","FORBIDDEN","NOT_FOUND","IDEMPOTENCY_REQUIRED","IDEMPOTENCY_CONFLICT","PRECONDITION_REQUIRED","PRECONDITION_FAILED","CONFLICT","RATE_LIMITED","TEMPORARILY_UNAVAILABLE","AGENT_RUN_REQUIRED","JOB_FAILED","INTERNAL_ERROR"]},"fieldErrors":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(?:\\$|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*)$"},"message":{"type":"string","maxLength":1024}},"required":["field","message"],"additionalProperties":false}},"message":{"type":"string","maxLength":2048},"requiredAction":{"type":"string","enum":["authenticate","choose-new-idempotency-key","refresh-resource","retry-job","review-in-browser","submit-through-research-job"]},"retryAfterMs":{"type":"integer","minimum":0,"maximum":86400000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","const":"terminal"},"state":{"type":"string","enum":["succeeded","failed","cancelled"]}},"required":["error","kind","state"],"additionalProperties":false}]},"eventId":{"type":"string","minLength":1,"maxLength":20,"pattern":"^(?:0|[1-9][0-9]{0,19})$"},"jobId":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kjob_[a-f0-9]{48}$"},"occurredAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"phase":{"type":"string","enum":["queued","planning","retrieving","extracting","proposing","synthesizing","requesting-review","complete","cancelled"]},"v":{"type":"number","const":1}},"required":["detail","eventId","jobId","occurredAt","phase","v"],"additionalProperties":false},"ResearchJobEventPage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"events":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"detail":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"job-accepted"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"inquiryId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry-created"}},"required":["inquiryId","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"source-captured"},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":2048}},"required":["kind","title","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"evidence-gap-recorded"},"note":{"type":"string","maxLength":4096}},"required":["kind","note"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"proposal-submitted"},"proposalRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kprp_[a-f0-9]{48}$"},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"}},"required":["kind","proposalRef","reviewRef"],"additionalProperties":false},{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"href":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"report-staged"}},"required":["documentRef","href","kind"],"additionalProperties":false},{"type":"object","properties":{"browserHref":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"review-requested"},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"}},"required":["browserHref","kind","reviewRef"],"additionalProperties":false},{"type":"object","properties":{"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_REQUEST","AUTH_REQUIRED","AUTH_AMBIGUOUS","FORBIDDEN","NOT_FOUND","IDEMPOTENCY_REQUIRED","IDEMPOTENCY_CONFLICT","PRECONDITION_REQUIRED","PRECONDITION_FAILED","CONFLICT","RATE_LIMITED","TEMPORARILY_UNAVAILABLE","AGENT_RUN_REQUIRED","JOB_FAILED","INTERNAL_ERROR"]},"fieldErrors":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(?:\\$|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*)$"},"message":{"type":"string","maxLength":1024}},"required":["field","message"],"additionalProperties":false}},"message":{"type":"string","maxLength":2048},"requiredAction":{"type":"string","enum":["authenticate","choose-new-idempotency-key","refresh-resource","retry-job","review-in-browser","submit-through-research-job"]},"retryAfterMs":{"type":"integer","minimum":0,"maximum":86400000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","const":"terminal"},"state":{"type":"string","enum":["succeeded","failed","cancelled"]}},"required":["error","kind","state"],"additionalProperties":false}]},"eventId":{"type":"string","minLength":1,"maxLength":20,"pattern":"^(?:0|[1-9][0-9]{0,19})$"},"jobId":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kjob_[a-f0-9]{48}$"},"occurredAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"phase":{"type":"string","enum":["queued","planning","retrieving","extracting","proposing","synthesizing","requesting-review","complete","cancelled"]},"v":{"type":"number","const":1}},"required":["detail","eventId","jobId","occurredAt","phase","v"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","maxLength":4096,"pattern":"^[A-Za-z0-9_-]{1,4096}$"},{"type":"null"}]},"truncated":{"type":"boolean"},"v":{"type":"number","const":1}},"required":["events","nextCursor","truncated","v"],"additionalProperties":false},"ResearchJobEventPageEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"events":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"detail":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"job-accepted"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"inquiryId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry-created"}},"required":["inquiryId","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"source-captured"},"title":{"type":"string","maxLength":1024},"url":{"type":"string","maxLength":2048}},"required":["kind","title","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"evidence-gap-recorded"},"note":{"type":"string","maxLength":4096}},"required":["kind","note"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"proposal-submitted"},"proposalRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kprp_[a-f0-9]{48}$"},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"}},"required":["kind","proposalRef","reviewRef"],"additionalProperties":false},{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"href":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"report-staged"}},"required":["documentRef","href","kind"],"additionalProperties":false},{"type":"object","properties":{"browserHref":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"review-requested"},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"}},"required":["browserHref","kind","reviewRef"],"additionalProperties":false},{"type":"object","properties":{"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["INVALID_REQUEST","AUTH_REQUIRED","AUTH_AMBIGUOUS","FORBIDDEN","NOT_FOUND","IDEMPOTENCY_REQUIRED","IDEMPOTENCY_CONFLICT","PRECONDITION_REQUIRED","PRECONDITION_FAILED","CONFLICT","RATE_LIMITED","TEMPORARILY_UNAVAILABLE","AGENT_RUN_REQUIRED","JOB_FAILED","INTERNAL_ERROR"]},"fieldErrors":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(?:\\$|[A-Za-z0-9_]+(?:\\.[A-Za-z0-9_]+)*)$"},"message":{"type":"string","maxLength":1024}},"required":["field","message"],"additionalProperties":false}},"message":{"type":"string","maxLength":2048},"requiredAction":{"type":"string","enum":["authenticate","choose-new-idempotency-key","refresh-resource","retry-job","review-in-browser","submit-through-research-job"]},"retryAfterMs":{"type":"integer","minimum":0,"maximum":86400000},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"additionalProperties":false},{"type":"null"}]},"kind":{"type":"string","const":"terminal"},"state":{"type":"string","enum":["succeeded","failed","cancelled"]}},"required":["error","kind","state"],"additionalProperties":false}]},"eventId":{"type":"string","minLength":1,"maxLength":20,"pattern":"^(?:0|[1-9][0-9]{0,19})$"},"jobId":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kjob_[a-f0-9]{48}$"},"occurredAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"phase":{"type":"string","enum":["queued","planning","retrieving","extracting","proposing","synthesizing","requesting-review","complete","cancelled"]},"v":{"type":"number","const":1}},"required":["detail","eventId","jobId","occurredAt","phase","v"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","maxLength":4096,"pattern":"^[A-Za-z0-9_-]{1,4096}$"},{"type":"null"}]},"truncated":{"type":"boolean"},"v":{"type":"number","const":1}},"required":["events","nextCursor","truncated","v"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"ResearchReport":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"document":{"$ref":"#/components/schemas/RichDocument"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"documentVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"format":{"type":"string","const":"sponge-rich-document"},"formatGeneration":{"type":"number","const":1},"issues":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["block-identities-rich-only","citation-structure-rich-only","code-citation-rail-rich-only","control-character-replaced","internal-link-application-specific","issues-truncated","line-leading-commonmark-escaped","nested-block-structure-flattened","table-cell-paragraphs-flattened","table-header-shape-flattened","table-header-synthesized","table-span-flattened","text-newline-normalized"]},"message":{"type":"string","maxLength":2048},"path":{"type":"string","maxLength":1024},"severity":{"type":"string","enum":["info","warning"]}},"required":["code","message","path","severity"],"additionalProperties":false}},"jobId":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kjob_[a-f0-9]{48}$"},"v":{"type":"number","const":1}},"required":["document","documentRef","documentVersion","format","formatGeneration","issues","jobId","v"],"additionalProperties":false},"ResearchReportEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/RichDocument"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"documentVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"format":{"type":"string","const":"sponge-rich-document"},"formatGeneration":{"type":"number","const":1},"issues":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["block-identities-rich-only","citation-structure-rich-only","code-citation-rail-rich-only","control-character-replaced","internal-link-application-specific","issues-truncated","line-leading-commonmark-escaped","nested-block-structure-flattened","table-cell-paragraphs-flattened","table-header-shape-flattened","table-header-synthesized","table-span-flattened","text-newline-normalized"]},"message":{"type":"string","maxLength":2048},"path":{"type":"string","maxLength":1024},"severity":{"type":"string","enum":["info","warning"]}},"required":["code","message","path","severity"],"additionalProperties":false}},"jobId":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kjob_[a-f0-9]{48}$"},"v":{"type":"number","const":1}},"required":["document","documentRef","documentVersion","format","formatGeneration","issues","jobId","v"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"ResearchReportSpec":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deliverable":{"type":"object","properties":{"form":{"type":"string","enum":["evidence-review","literature-review","question-answer"]},"kind":{"type":"string","const":"report"},"language":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:und|[a-z]{2,3}(?:-[a-z0-9]{2,8})*)$"}},"required":["form","kind","language"],"additionalProperties":false},"profile":{"type":"string","enum":["focused","deep"]},"question":{"type":"string","maxLength":16384},"spaceRef":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"new-document"},"title":{"type":"string","maxLength":1024}},"required":["kind","title"],"additionalProperties":false},{"type":"object","properties":{"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"kind":{"type":"string","const":"document"}},"required":["documentRef","kind"],"additionalProperties":false}]},"v":{"type":"number","const":1},"visibilityIntent":{"type":"string","enum":["private","request-publication"]}},"required":["deliverable","profile","question","spaceRef","v","visibilityIntent"],"additionalProperties":false},"RichDocument":{"x-sponge-max-depth":64,"x-sponge-max-nodes":100000,"x-sponge-max-utf8-bytes":760000,"additionalProperties":false,"description":"Canonical persisted Sponge editor document. Traverse blockContainer nodes and use attrs.id as the target for semantic edit, move, or delete mutations.","properties":{"content":{"items":{"$ref":"#/components/schemas/RichDocumentNode"},"maxItems":1,"minItems":1,"type":"array"},"type":{"const":"doc","type":"string"}},"required":["content","type"],"type":"object"},"RichDocumentNode":{"additionalProperties":false,"description":"One persisted editor node. Authored blocks are blockContainer nodes; attrs.id is the stable block ID used by edit, move, and delete mutations. The first content entry is the block body and an optional second blockGroup contains children.","properties":{"attrs":{"additionalProperties":true,"description":"Node attributes. blockContainer nodes carry the stable authored block ID in id.","maxProperties":32,"properties":{"id":{"description":"Stable authored block ID for a blockContainer node.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:$-]*$","type":"string"}},"type":"object"},"content":{"items":{"$ref":"#/components/schemas/RichDocumentNode"},"maxItems":100000,"type":"array"},"marks":{"items":{"additionalProperties":false,"properties":{"attrs":{"additionalProperties":true,"maxProperties":16,"type":"object"},"type":{"minLength":1,"type":"string"}},"required":["type"],"type":"object"},"maxItems":4,"type":"array"},"text":{"maxLength":760000,"type":"string"},"type":{"description":"Persisted editor node discriminator.","minLength":1,"type":"string"}},"required":["type"],"type":"object"},"Review":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"browserHref":{"type":"string","maxLength":2048},"conflicts":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":4096}},"proposalRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kprp_[a-f0-9]{48}$"},"requiredAction":{"anyOf":[{"type":"string","const":"review-in-browser"},{"type":"null"}]},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"},"state":{"type":"string","enum":["proposed","in-review","accepted","rejected","withdrawn"]},"supportPaths":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"label":{"type":"string","maxLength":512}},"required":["href","label"],"additionalProperties":false}},"v":{"type":"number","const":1}},"required":["browserHref","conflicts","proposalRef","requiredAction","reviewRef","state","supportPaths","v"],"additionalProperties":false},"ReviewEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"browserHref":{"type":"string","maxLength":2048},"conflicts":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":4096}},"proposalRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^kprp_[a-f0-9]{48}$"},"requiredAction":{"anyOf":[{"type":"string","const":"review-in-browser"},{"type":"null"}]},"reviewRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^krvw_[a-f0-9]{48}$"},"state":{"type":"string","enum":["proposed","in-review","accepted","rejected","withdrawn"]},"supportPaths":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"label":{"type":"string","maxLength":512}},"required":["href","label"],"additionalProperties":false}},"v":{"type":"number","const":1}},"required":["browserHref","conflicts","proposalRef","requiredAction","reviewRef","state","supportPaths","v"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false},"SearchRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"cursor":{"type":"string","maxLength":4096,"pattern":"^[A-Za-z0-9_-]{1,4096}$"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"query":{"type":"string","maxLength":2048},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"public"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"space"},"spaceRef":{"type":"string","minLength":52,"maxLength":52,"pattern":"^ksp_[a-f0-9]{48}$"}},"required":["kind","spaceRef"],"additionalProperties":false}]},"v":{"type":"number","const":1}},"required":["limit","query","scope","v"],"additionalProperties":false},"SearchResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string","maxLength":4096,"pattern":"^[A-Za-z0-9_-]{1,4096}$"},{"type":"null"}]},"results":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"excerpt":{"type":"string","maxLength":8192},"freshness":{"type":"object","properties":{"evaluatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"state":{"type":"string","enum":["current","stale","unknown"]}},"required":["evaluatedAt","state"],"additionalProperties":false},"lanes":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["exact","lexical","semantic"]}},"provenance":{"oneOf":[{"type":"object","properties":{"canonicalUrl":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"public-release"},"releasedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"}},"required":["canonicalUrl","kind","releasedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"private-document"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"}},"required":["kind","updatedAt"],"additionalProperties":false}]},"ref":{"oneOf":[{"type":"object","properties":{"artifact":{"oneOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kent_[a-z0-9]{24}$"},"kind":{"type":"string","const":"entity"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kedn_[a-z0-9]{24}$"},"kind":{"type":"string","const":"edition"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false}]},"kind":{"type":"string","const":"public-artifact"}},"required":["artifact","kind"],"additionalProperties":false},{"type":"object","properties":{"blockRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sblk_[a-f0-9]{48}$"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"href":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"document-block"}},"required":["blockRef","documentRef","href","kind"],"additionalProperties":false}]},"title":{"type":"string","maxLength":1024},"truncated":{"type":"boolean"}},"required":["excerpt","freshness","lanes","provenance","ref","title","truncated"],"additionalProperties":false}},"truncated":{"type":"boolean"},"v":{"type":"number","const":1}},"required":["nextCursor","results","truncated","v"],"additionalProperties":false},"SearchResponseEnvelope":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string","maxLength":4096,"pattern":"^[A-Za-z0-9_-]{1,4096}$"},{"type":"null"}]},"results":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"excerpt":{"type":"string","maxLength":8192},"freshness":{"type":"object","properties":{"evaluatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"state":{"type":"string","enum":["current","stale","unknown"]}},"required":["evaluatedAt","state"],"additionalProperties":false},"lanes":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["exact","lexical","semantic"]}},"provenance":{"oneOf":[{"type":"object","properties":{"canonicalUrl":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"public-release"},"releasedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"}},"required":["canonicalUrl","kind","releasedAt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"private-document"},"updatedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"}},"required":["kind","updatedAt"],"additionalProperties":false}]},"ref":{"oneOf":[{"type":"object","properties":{"artifact":{"oneOf":[{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kent_[a-z0-9]{24}$"},"kind":{"type":"string","const":"entity"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kinq_[a-z0-9]{24}$"},"kind":{"type":"string","const":"inquiry"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false},{"type":"object","properties":{"artifactId":{"type":"string","minLength":29,"maxLength":29,"pattern":"^kedn_[a-z0-9]{24}$"},"kind":{"type":"string","const":"edition"},"revision":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[a-f0-9]{64}$"},"v":{"type":"number","const":1}},"required":["artifactId","kind","revision","v"],"additionalProperties":false}]},"kind":{"type":"string","const":"public-artifact"}},"required":["artifact","kind"],"additionalProperties":false},{"type":"object","properties":{"blockRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sblk_[a-f0-9]{48}$"},"documentRef":{"type":"string","minLength":53,"maxLength":53,"pattern":"^sdoc_[a-f0-9]{48}$"},"href":{"type":"string","maxLength":2048},"kind":{"type":"string","const":"document-block"}},"required":["blockRef","documentRef","href","kind"],"additionalProperties":false}]},"title":{"type":"string","maxLength":1024},"truncated":{"type":"boolean"}},"required":["excerpt","freshness","lanes","provenance","ref","title","truncated"],"additionalProperties":false}},"truncated":{"type":"boolean"},"v":{"type":"number","const":1}},"required":["nextCursor","results","truncated","v"],"additionalProperties":false},"links":{"maxItems":16,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":2048},"rel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$"}},"required":["href","rel"],"additionalProperties":false}},"meta":{"type":"object","properties":{"apiVersion":{"type":"string","const":"1"},"requestId":{"type":"string","minLength":16,"maxLength":128,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{15,127}$"}},"required":["apiVersion","requestId"],"additionalProperties":false},"receipt":{"type":"object","properties":{"idempotency":{"type":"string","enum":["created","replayed"]},"receiptRef":{"type":"string","minLength":16,"maxLength":160,"pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,159}$"},"v":{"type":"number","const":1}},"required":["idempotency","receiptRef","v"],"additionalProperties":false}},"required":["data","meta"],"additionalProperties":false}},"securitySchemes":{"bearerAuth":{"bearerFormat":"Sponge agent credential","scheme":"bearer","type":"http"}}},"info":{"description":"Agent-safe private document authoring, research jobs, and bounded knowledge reads.","title":"Sponge API","version":"1.0.0"},"openapi":"3.1.0","servers":[{"description":"Current Sponge origin","url":"/"}],"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"paths":{"/api/v1/auth":{"get":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":[],"description":"Returns the bounded delegated agent principal and remaining request budget for the bearer token.","operationId":"getApiPrincipal","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiPrincipalEnvelope"}}},"description":"The bounded delegated agent principal and remaining request budget."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}},"/api/v1/documents":{"post":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["document:create"],"description":"Creates a private document through an account-wide credential. A document-bound credential cannot create another document.","operationId":"createDocument","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentEnvelope"}}},"description":"An exact idempotent create replay returned the existing private document.","headers":{"Location":{"description":"The canonical API path for this private document.","schema":{"type":"string"}},"Sponge-Revision":{"description":"The exact bare canonical resource revision represented by this response.","schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}}},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentEnvelope"}}},"description":"The private document was created idempotently.","headers":{"Location":{"description":"The canonical API path for this private document.","schema":{"type":"string"}},"Sponge-Revision":{"description":"The exact bare canonical resource revision represented by this response.","schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The idempotency key is bound to different create intent."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}},"x-sponge-credential-boundary":"account-wide"}},"/api/v1/documents/{documentRef}":{"parameters":[{"in":"path","name":"documentRef","required":true,"schema":{"pattern":"^sdoc_[a-f0-9]{48}$","type":"string"}}],"get":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["document:read"],"description":"Returns the exact canonical private document view, including the bare Sponge-Revision used for later writes.","operationId":"getDocument","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentEnvelope"}}},"description":"The exact canonical private document view.","headers":{"ETag":{"description":"A weak cache validator for this canonical GET representation. It is not a mutation precondition.","schema":{"pattern":"^W/\"[a-f0-9]{64}\"$","type":"string"}},"Sponge-Revision":{"description":"The exact bare canonical resource revision represented by this response.","schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}},"/api/v1/documents/{documentRef}/mutations":{"parameters":[{"in":"path","name":"documentRef","required":true,"schema":{"pattern":"^sdoc_[a-f0-9]{48}$","type":"string"}}],"post":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["document:write"],"description":"Applies one bounded semantic document mutation against an exact Sponge-If-Revision. An exact retry reuses its original idempotency key, body, and revision.","operationId":"applyDocumentMutation","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$","type":"string"}},{"description":"The exact bare Sponge-Revision read before this command. An exact idempotent retry reuses its original revision even if the resource has since advanced.","in":"header","name":"Sponge-If-Revision","required":true,"schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMutationRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMutationResultEnvelope"}}},"description":"The semantic document mutation was applied idempotently.","headers":{"Sponge-Revision":{"description":"The exact bare canonical resource revision represented by this response.","schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The idempotency key is bound to different intent or the semantic mutation conflicts with the exact document structure."},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The supplied exact document revision is stale."},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A semantic document mutation requires Sponge-If-Revision."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}},"/api/v1/research-jobs":{"post":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["inquiry:create","knowledge:propose","research:run"],"description":"Starts durable research in an existing exact document, or creates a document only for an account-wide credential. A document-bound credential must use its bound document reference.","operationId":"createResearchJob","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchReportSpec"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchJobEnvelope"}}},"description":"The durable research job was accepted.","headers":{"Location":{"description":"The canonical API path for this research job.","schema":{"type":"string"}},"Sponge-Revision":{"description":"The exact bare canonical resource revision represented by this response.","schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}},"x-sponge-credential-boundary":{"spaceRef.kind=document":"account-wide-or-exact-document","spaceRef.kind=new-document":"account-wide"}}},"/api/v1/research-jobs/{jobId}":{"parameters":[{"in":"path","name":"jobId","required":true,"schema":{"pattern":"^kjob_[a-f0-9]{48}$","type":"string"}}],"get":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["research:run"],"description":"Returns canonical research-job state for one durable job.","operationId":"getResearchJob","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchJobEnvelope"}}},"description":"Canonical research job state.","headers":{"ETag":{"description":"A weak cache validator for this canonical GET representation. It is not a mutation precondition.","schema":{"pattern":"^W/\"[a-f0-9]{64}\"$","type":"string"}},"Sponge-Revision":{"description":"The exact bare canonical resource revision represented by this response.","schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}},"/api/v1/research-jobs/{jobId}/events":{"parameters":[{"in":"path","name":"jobId","required":true,"schema":{"pattern":"^kjob_[a-f0-9]{48}$","type":"string"}}],"get":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["research:run"],"description":"Returns a bounded monotonic event page or a resumable text/event-stream for one research job.","operationId":"listResearchJobEvents","parameters":[{"in":"query","name":"after","required":false,"schema":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},{"description":"Resumes a text/event-stream response after this event sequence.","in":"header","name":"Last-Event-ID","required":false,"schema":{"maximum":9007199254740991,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchJobEventPageEnvelope"}},"text/event-stream":{"schema":{"type":"string"}}},"description":"A bounded monotonic event page or resumable notification stream."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}},"/api/v1/research-jobs/{jobId}/cancellations":{"parameters":[{"in":"path","name":"jobId","required":true,"schema":{"pattern":"^kjob_[a-f0-9]{48}$","type":"string"}}],"post":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["research:run"],"description":"Cancels one research job idempotently. After success, the terminal receipt may replay with the post-cancellation revision.","operationId":"cancelResearchJob","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$","type":"string"}},{"description":"The exact bare current research-job Sponge-Revision. After this cancellation key has already succeeded for this job, the terminal receipt may replay with the post-cancellation revision; a different key or a not-yet-cancelled stale command does not bypass the precondition.","in":"header","name":"Sponge-If-Revision","required":true,"schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"v":{"const":1}},"required":["v"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchJobEnvelope"}}},"description":"The idempotently cancelled research job and cancellation receipt.","headers":{"Sponge-Revision":{"description":"The exact bare canonical resource revision represented by this response.","schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}}},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The supplied research-job revision is stale."},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"Cancellation requires Sponge-If-Revision."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}},"/api/v1/research-jobs/{jobId}/report":{"parameters":[{"in":"path","name":"jobId","required":true,"schema":{"pattern":"^kjob_[a-f0-9]{48}$","type":"string"}}],"get":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["research:run"],"description":"Returns the exact rich research report or its loss-reported Markdown projection after the report is ready.","operationId":"getResearchReport","parameters":[{"in":"query","name":"format","required":true,"schema":{"enum":["rich-json","markdown"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchReportEnvelope"}},"text/markdown":{"schema":{"type":"string"}}},"description":"The exact rich report or its loss-reported Markdown projection.","headers":{"ETag":{"description":"A weak cache validator for this canonical GET representation. It is not a mutation precondition.","schema":{"pattern":"^W/\"[a-f0-9]{64}\"$","type":"string"}},"Sponge-Revision":{"description":"The exact bare canonical resource revision represented by this response.","schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"X-Sponge-Research-Job-Id":{"description":"The research job bound to this representation.","schema":{"pattern":"^kjob_[a-f0-9]{48}$","type":"string"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}},"/api/v1/proposals":{"post":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["knowledge:propose"],"description":"Submits a bounded knowledge proposal. Standalone submission requires a live research-job agent run.","operationId":"submitKnowledgeProposal","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{15,127}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalRequest"}}},"required":true},"responses":{"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"Standalone proposal submission requires a live research-job agent run."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}},"/api/v1/public/artifacts/{kind}/{artifactId}/{revision}":{"parameters":[{"in":"path","name":"kind","required":true,"schema":{"enum":["edition","entity","inquiry"],"type":"string"}},{"in":"path","name":"artifactId","required":true,"schema":{"pattern":"^(?:kedn|kent|kinq)_[a-z0-9]{24}$","type":"string"}},{"in":"path","name":"revision","required":true,"schema":{"pattern":"^[a-f0-9]{64}$","type":"string"}}],"get":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":[],"description":"Returns an exact double-authorized public graph projection for a released Entity, Inquiry, or Edition. No bearer token is required.","operationId":"getPublicArtifact","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicArtifactEnvelope"}}},"description":"An exact double-authorized public graph projection."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}},"security":[]}},"/api/v1/reviews/{reviewRef}":{"parameters":[{"in":"path","name":"reviewRef","required":true,"schema":{"pattern":"^krvw_[a-f0-9]{48}$","type":"string"}}],"get":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":["review:read"],"description":"Reads review metadata when review egress is activated. The current Production surface returns 503 until that join is complete.","operationId":"getReview","responses":{"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"Review metadata egress is activation-blocked."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}},"/api/v1/search":{"post":{"x-sponge-max-request-bytes":262144,"x-sponge-max-response-bytes":2097152,"x-sponge-required-scopes":[],"x-sponge-required-scopes-by-request":{"scope.kind=public":["public:read"],"scope.kind=space":["knowledge:read"]},"description":"Searches public or private knowledge when the requested index is activated. The current Production surface returns 503 until those indexes are joined.","operationId":"searchKnowledge","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequest"}}},"required":true},"responses":{"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"The delegated request or research budget is exhausted.","headers":{"Retry-After":{"description":"Whole seconds before the caller should retry.","schema":{"minimum":0,"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"Search is activation-blocked until its released/private indexes are joined."},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorEnvelope"}}},"description":"A typed Sponge API error."}}}}},"security":[{"bearerAuth":[]}]}