{"openapi":"3.1.0","info":{"title":"wiki.private.law machine layer","description":"Current read-only article, live corpus statistics, answer, offer and MCP contracts over the published wiki.private.law corpus.","version":"3.2.0"},"servers":[{"url":"https://wiki.private.law"}],"paths":{"/ask":{"post":{"operationId":"askWiki","summary":"Return a citation-backed extractive QAPage or an explicit refusal.","x-served-by":"nextjs","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["question"],"properties":{"question":{"type":"string","maxLength":2000},"locale":{"type":"string","enum":["ru","en","ko","zh-hant"]}}}}}},"responses":{"200":{"description":"Confident answer or honest refusal.","content":{"application/json":{"schema":{"type":"object","required":["@context","@type","mainEntity","provider","x-providerHandoff","x-suggestedReading","x-retrieval"],"properties":{"@context":{"const":"https://schema.org"},"@type":{"const":"QAPage"},"mainEntity":{"type":"object","required":["@type","name","answerCount"],"properties":{"@type":{"const":"Question"},"name":{"type":"string"},"answerCount":{"type":"integer","enum":[0,1]},"acceptedAnswer":{"type":"object","properties":{"@type":{"const":"Answer"},"text":{"type":"string"},"citation":{"type":"array","items":{"type":"object","properties":{"headline":{"type":"string"},"url":{"type":"string","format":"uri"},"x-slug":{"type":"string"},"x-distance":{"type":"number"}},"required":["url","x-slug"]}},"x-sourcePassages":{"type":"array","items":{"type":"object"}}}}}},"provider":{"type":"object"},"x-providerHandoff":{"type":"object","required":["human","fullGuide","rule"],"properties":{"human":{"type":"object","required":["name","email"],"properties":{"name":{"type":"string"},"role":{"type":"string"},"email":{"type":"string"},"telegram":{"type":"string"},"respondsWithin":{"type":"string"}}},"fullGuide":{"type":"object","required":["where","how"],"properties":{"where":{"type":"string"},"how":{"type":"string"}}},"rule":{"type":"string"}}},"x-suggestedReading":{"type":"array","items":{"type":"object","properties":{"headline":{"type":"string"},"url":{"type":"string","format":"uri"},"x-slug":{"type":"string"},"x-distance":{"type":"number"}},"required":["url","x-slug"]}},"x-retrieval":{"type":"object","required":["engine","confident","questionLocale","latencyMs"],"properties":{"engine":{"type":"string"},"confident":{"type":"boolean"},"topDistance":{"type":["number","null"]},"confidentThreshold":{"type":"number"},"questionLocale":{"type":"string","enum":["ru","en","ko","zh-hant"]},"refusalReason":{"type":["string","null"]},"latencyMs":{"type":"number"}}}}}}}},"400":{"description":"Invalid JSON or missing question."},"429":{"description":"Rate limited."}}}},"/offer":{"get":{"operationId":"resolveWikiOfferGet","summary":"Resolve a slug, Wiki URL or topic to the canonical article and current machine offer exports.","x-served-by":"nextjs","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["ru","en","ko","zh-hant"]}}],"responses":{"200":{"description":"Usage or resolved offer links."},"400":{"description":"Invalid or empty query."},"404":{"description":"No eligible published article."},"429":{"description":"Rate limited."}}},"post":{"operationId":"resolveWikiOfferPost","summary":"Resolve a topic to the same canonical offer links.","x-served-by":"nextjs","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string"},"locale":{"type":"string","enum":["ru","en","ko","zh-hant"]}}}}}},"responses":{"200":{"description":"Canonical sourceUrl, identical webUrl, and current Markdown/JSON URLs."},"400":{"description":"Invalid body or missing query."},"404":{"description":"No eligible published article."},"429":{"description":"Rate limited."}}}},"/mcp":{"post":{"operationId":"wikiMcp","summary":"MCP Streamable HTTP: stateless 2026-07-28 with 2025-11-25 compatibility.","x-served-by":"nextjs","x-protocol-version":"2026-07-28","x-supported-protocol-versions":["2026-07-28","2025-11-25"],"x-tools":["ask","search"],"responses":{"200":{"description":"JSON-RPC result."},"202":{"description":"Notification accepted without a response body."},"400":{"description":"Protocol or session error."},"403":{"description":"Browser Origin is not allowed."},"429":{"description":"Rate limited."}}}},"/corpus-stats.json":{"get":{"operationId":"getWikiCorpusStats","summary":"Return live public-corpus counts, source-owner diagnostics and current machine-layer capabilities.","x-served-by":"nextjs","responses":{"200":{"description":"Current exact-snapshot corpus statistics after public route policy.","headers":{"X-Wiki-Corpus-Generation":{"description":"Stable identity of the exact route/snapshot generation in this response.","schema":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}}},"content":{"application/json":{"schema":{"type":"object","required":["@context","@type","corpusGeneration","dateGenerated","corpus","machineLayer"],"properties":{"@context":{"const":"https://schema.org"},"@type":{"const":"Dataset"},"corpusGeneration":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"dateModified":{"type":["string","null"],"format":"date-time"},"dateGenerated":{"type":"string","format":"date-time"},"corpus":{"type":"object","required":["publishedOwners","excludedTombstoneOwners","totalArticles","markdownMirrors","indexedChunks","locales"],"properties":{"publishedOwners":{"type":"integer","minimum":0},"excludedTombstoneOwners":{"type":"integer","minimum":0},"totalArticles":{"type":"integer","minimum":0},"markdownMirrors":{"type":"integer","minimum":0},"indexedChunks":{"type":"integer","minimum":0},"locales":{"type":"array","items":{"type":"object","required":["locale","articles","indexedChunks","lastContentChangeAt"],"properties":{"locale":{"type":"string","enum":["ru","en","ko","zh-hant"]},"articles":{"type":"integer","minimum":0},"indexedChunks":{"type":"integer","minimum":0},"lastContentChangeAt":{"type":["string","null"],"format":"date-time"}}}}}},"machineLayer":{"type":"object"}}}}}},"503":{"description":"Statistics are temporarily unavailable; no stale values are served."}}}},"/feed.xml":{"get":{"operationId":"getWikiRssFeed","summary":"Return the latest published Wiki articles as canonical RSS 2.0.","x-served-by":"nextjs","x-max-items":100,"responses":{"200":{"description":"RSS 2.0 feed with stable content-derived timestamps and validators.","headers":{"ETag":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}},"content":{"application/rss+xml":{"schema":{"type":"string"}}}}}}},"/rss.xml":{"get":{"operationId":"getWikiRssAlias","summary":"Compatibility alias for the canonical RSS 2.0 feed.","x-served-by":"nextjs","responses":{"200":{"description":"Byte-identical compatibility projection of /feed.xml.","content":{"application/rss+xml":{"schema":{"type":"string"}}}}}}},"/atom.xml":{"get":{"operationId":"getWikiAtomFeed","summary":"Return the latest published Wiki articles as Atom 1.0.","x-served-by":"nextjs","x-max-items":100,"responses":{"200":{"description":"Atom 1.0 feed with stable content-derived timestamps and validators.","headers":{"ETag":{"schema":{"type":"string"}},"Last-Modified":{"schema":{"type":"string"}}},"content":{"application/atom+xml":{"schema":{"type":"string"}}}}}}},"/datasets/":{"get":{"operationId":"getWikiDatasets","summary":"Current app-owned catalogue of static machine datasets.","x-served-by":"nextjs","responses":{"200":{"description":"Dataset catalogue."}}}},"/llms.datasets.txt":{"get":{"operationId":"getWikiDatasetIndex","summary":"Current app-owned text index of static machine datasets.","x-served-by":"nextjs","responses":{"200":{"description":"Dataset index."}}}}}}