{"openapi":"3.0.3","info":{"title":"Kettle Logic API","version":"0.1.0","description":"Kettle Logic services tier — Fastify + TypeScript, schema-first with Zod. This spec is generated from the same schemas that validate and serialize every route."},"components":{"schemas":{}},"paths":{"/healthz":{"get":{"summary":"Liveness probe","tags":["health"],"responses":{"200":{"description":"Health/readiness status","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"string"}},"required":["ok","status"],"additionalProperties":false,"description":"Health/readiness status"}}}}}}},"/readyz":{"get":{"summary":"Readiness probe","tags":["health"],"responses":{"200":{"description":"Health/readiness status","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"status":{"type":"string"}},"required":["ok","status"],"additionalProperties":false,"description":"Health/readiness status"}}}}}}},"/api/demo/ping":{"get":{"summary":"Liveness + build identity","tags":["demo"],"responses":{"200":{"description":"Liveness + build identity","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{"type":"string"},"version":{"type":"string"},"uptime_sec":{"type":"integer","minimum":0},"ts_utc":{"type":"string"}},"required":["ok","data","version","uptime_sec","ts_utc"],"additionalProperties":false,"description":"Liveness + build identity"}}}}}}},"/api/echo":{"get":{"summary":"Echo query parameters","tags":["demo"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":280,"default":"hello"},"in":"query","name":"msg","required":false}],"responses":{"200":{"description":"Echoes the provided query back","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"echo":{"type":"object","properties":{"msg":{"type":"string"}},"required":["msg"],"additionalProperties":false},"method":{"type":"string"},"ts_utc":{"type":"string"}},"required":["ok","echo","method","ts_utc"],"additionalProperties":false,"description":"Echoes the provided query back"}}}}}}},"/api/ai/ask":{"post":{"summary":"Ask the governed agent","tags":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":2000,"description":"The user's question"}},"required":["prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Governed agent answer with confidence + audit trail","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"blocked":{"type":"boolean","description":"true when the high-stakes guard refused"},"intent":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"answer":{"type":"string"},"reason":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"review":{"type":"boolean","description":"flagged for human-in-the-loop review"},"audit_id":{"type":"string"},"model":{"type":"string","nullable":true,"description":"which model answered, e.g. ollama:qwen2.5:7b-instruct"}},"required":["ok","blocked","intent","confidence","answer","reason","category","review","audit_id","model"],"additionalProperties":false,"description":"Governed agent answer with confidence + audit trail"}}}}}}},"/api/metrics/summary":{"get":{"summary":"Live operational figures from the in-cluster Prometheus","tags":["metrics"],"responses":{"200":{"description":"Live operational figures sourced from the in-cluster Prometheus","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"metrics":{"type":"object","properties":{"uptime_pct":{"type":"number","nullable":true},"p95_ms":{"type":"number","nullable":true},"req_per_min":{"type":"number","nullable":true},"error_rate_pct":{"type":"number","nullable":true},"mcp_ops_total":{"type":"number","nullable":true},"requests_24h":{"type":"number","nullable":true}},"required":["uptime_pct","p95_ms","req_per_min","error_rate_pct","mcp_ops_total","requests_24h"],"additionalProperties":false},"ts_utc":{"type":"string"}},"required":["ok","metrics","ts_utc"],"additionalProperties":false,"description":"Live operational figures sourced from the in-cluster Prometheus"}}}}}}},"/api/mcp/discover":{"get":{"summary":"Check a business's MCP / AI discoverability","tags":["mcp"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"q","required":true,"description":"Business name or URL to check for MCP discoverability"}],"responses":{"200":{"description":"MCP discoverability check result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"query":{"type":"string"},"domain":{"type":"string","nullable":true},"found":{"type":"boolean","description":"true if registered in the MCP registry or a claimed MCP namespace"},"registry":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"remote":{"type":"string","nullable":true}},"required":["name","description","remote"],"additionalProperties":false}},"signals":{"type":"object","properties":{"llmsTxt":{"type":"boolean"},"wellKnownAuth":{"type":"boolean"}},"required":["llmsTxt","wellKnownAuth"],"additionalProperties":false}},"required":["ok","query","domain","found","registry","signals"],"additionalProperties":false,"description":"MCP discoverability check result"}}}}}}},"/api/contact/config":{"get":{"summary":"Public contact-form config (Turnstile site key)","tags":["contact"],"responses":{"200":{"description":"Public client config for the contact form","content":{"application/json":{"schema":{"type":"object","properties":{"turnstileSiteKey":{"type":"string","nullable":true,"description":"Cloudflare Turnstile site key (public)"}},"required":["turnstileSiteKey"],"additionalProperties":false,"description":"Public client config for the contact form"}}}}}}},"/api/contact":{"post":{"summary":"Submit a contact / platform-assessment request","tags":["contact"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001F]+$","description":"Sender's name"},"email":{"type":"string","format":"email","maxLength":160,"description":"Reply-to email"},"company":{"type":"string","maxLength":120,"pattern":"^[^\\u0000-\\u001F]+$","description":"Company / organization"},"phone":{"type":"string","maxLength":40,"description":"Phone (optional — for a callback)"},"message":{"type":"string","minLength":10,"maxLength":4000,"description":"What they're trying to do"},"token":{"type":"string","maxLength":4096,"description":"Cloudflare Turnstile token"},"website":{"type":"string","maxLength":200,"description":"Anti-spam honeypot — leave blank"}},"required":["name","email","message"],"additionalProperties":false,"description":"Contact / platform-assessment request"}}},"description":"Contact / platform-assessment request"},"responses":{"200":{"description":"Contact submission result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false,"description":"Contact submission result"}}}},"400":{"description":"Contact submission result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false,"description":"Contact submission result"}}}},"502":{"description":"Contact submission result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false,"description":"Contact submission result"}}}},"503":{"description":"Contact submission result","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"message":{"type":"string"}},"required":["ok","message"],"additionalProperties":false,"description":"Contact submission result"}}}}}}}},"tags":[{"name":"health","description":"Liveness/readiness probes"},{"name":"demo","description":"Showcase endpoints driven by the site's API explorer"},{"name":"ai","description":"Governed AI agent (high-stakes guard, confidence, audit)"},{"name":"contact","description":"Lead capture (Turnstile-guarded, emails the team)"}]}