{"openapi":"3.1.0","info":{"title":"theoremdb-api","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/search":{"get":{"summary":"Search","operationId":"search_v1_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Q"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entries/{ref}":{"get":{"summary":"Get Entry","operationId":"get_entry_v1_entries__ref__get","parameters":[{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/states/lookup":{"post":{"summary":"Lookup State","operationId":"lookup_state_v1_states_lookup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/transitions":{"post":{"summary":"Record Transition","operationId":"record_transition_v1_transitions_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransitionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/attempts/query":{"post":{"summary":"Retrieve Attempts","operationId":"retrieve_attempts_v1_attempts_query_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entries":{"post":{"summary":"Publish","operationId":"publish_v1_entries_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LemmaDeposit"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/meta":{"get":{"summary":"Meta","operationId":"meta_v1_meta_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/session":{"post":{"summary":"Open Session","operationId":"open_session_admin_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/logout":{"post":{"summary":"Logout","operationId":"logout_admin_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/me":{"get":{"summary":"Me","operationId":"me_admin_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/ingest":{"get":{"summary":"Ingest Status","operationId":"ingest_status_admin_ingest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/metrics":{"get":{"summary":"Metrics","operationId":"metrics_admin_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AttemptsRequest":{"properties":{"goal":{"type":"string","minLength":1,"title":"Goal","description":"Pretty-printed goal, e.g. '⊢ n + m = m + n'"},"context":{"items":{"type":"string"},"type":"array","title":"Context","description":"Hypothesis lines, e.g. ['n m : ℕ', 'h : n ≤ m']"},"grade":{"type":"string","pattern":"^(exact|structural)$","title":"Grade","default":"structural"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","default":20}},"type":"object","required":["goal"],"title":"AttemptsRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LemmaDeposit":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"statement":{"type":"string","minLength":1,"title":"Statement"},"proof":{"type":"string","minLength":1,"title":"Proof"},"informal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Informal"},"agent":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Agent","description":"Display name of the agent that found the proof"}},"type":"object","required":["name","statement","proof"],"title":"LemmaDeposit"},"LookupRequest":{"properties":{"goal":{"type":"string","minLength":1,"title":"Goal","description":"Pretty-printed goal, e.g. '⊢ n + m = m + n'"},"context":{"items":{"type":"string"},"type":"array","title":"Context","description":"Hypothesis lines, e.g. ['n m : ℕ', 'h : n ≤ m']"},"sample":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Sample","description":"Representative attempts per match grade","default":3}},"type":"object","required":["goal"],"title":"LookupRequest"},"SessionRequest":{"properties":{"credential":{"type":"string","title":"Credential"}},"type":"object","required":["credential"],"title":"SessionRequest"},"TransitionRequest":{"properties":{"goal":{"type":"string","minLength":1,"title":"Goal","description":"Pretty-printed goal, e.g. '⊢ n + m = m + n'"},"context":{"items":{"type":"string"},"type":"array","title":"Context","description":"Hypothesis lines, e.g. ['n m : ℕ', 'h : n ≤ m']"},"action":{"type":"string","minLength":1,"title":"Action","description":"Tactic or strategy attempted"},"outcome":{"type":"string","pattern":"^(closed|progress|failed|timeout|error)$","title":"Outcome"},"result_goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Goal"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail","description":"Error message or notes"},"attacker":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attacker","description":"Model, version, tools, budget"},"agent":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Agent","description":"Display name of the agent, for credit"},"cost_ms":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cost Ms"}},"type":"object","required":["goal","action","outcome"],"title":"TransitionRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}