{"openapi":"3.1.0","info":{"title":"so-yesterday.ai","description":"Curated AI transformation knowledge base. REST API for agents and developers. See /llms.txt for an agent-friendly overview, /SKILL.md for the prose reference, /.well-known/agent.json for the machine-readable capability doc.","contact":{"name":"so-yesterday.ai","url":"https://so-yesterday.ai/about"},"version":"3.0"},"servers":[{"url":"https://so-yesterday.ai","description":"Production"}],"paths":{"/api/auth/google/login":{"get":{"tags":["auth"],"summary":"Google Login","operationId":"google_login_api_auth_google_login_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}},{"name":"next_user_code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next User Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/google/callback":{"get":{"tags":["auth"],"summary":"Google Callback","operationId":"google_callback_api_auth_google_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/me":{"get":{"tags":["auth","agent"],"summary":"Whoami","description":"Token / session verification for agents.\n\nAnonymous-safe: returns ``{authenticated: false}`` when no credentials\nare presented, ``{authenticated: true, ...}`` otherwise. Intentionally\nomits email and PII — agents only need to know whether the key works\nand what they can do with it. For the full profile, sessions use\n``GET /api/account/me`` (cookie-only).","operationId":"whoami_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/account/me":{"get":{"tags":["account"],"summary":"Get Me","operationId":"get_me_api_account_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}}}},"patch":{"tags":["account"],"summary":"Update Me","operationId":"update_me_api_account_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/api-keys":{"get":{"tags":["account"],"summary":"List Api Keys","operationId":"list_api_keys_api_account_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyOut"},"type":"array","title":"Response List Api Keys Api Account Api Keys Get"}}}}}},"post":{"tags":["account"],"summary":"Create Api Key","operationId":"create_api_key_api_account_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/api-keys/{key_id}":{"delete":{"tags":["account"],"summary":"Revoke Api Key","operationId":"revoke_api_key_api_account_api_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proposals":{"get":{"tags":["proposals"],"summary":"Public Proposals List","description":"List canon proposals filtered by status bucket.\n\n- `pending` → status='pending' (sorted by confidence high→low, then recency)\n- `decided` → status IN ('accepted','rejected','applied','superseded')\n- `all` → no filter\n\nOptional ``kind`` query param restricts results to one proposal kind\n(e.g. ``link_add``, ``tag_correction``, ``concept_stub``,\n``essay_promotion``). When omitted, all kinds are returned.\n\nPagination via `limit` (max 100) and `offset`.","operationId":"public_proposals_list_api_proposals_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","pattern":"^(pending|decided|all)$","default":"pending","title":"Status"}},{"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"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicProposalList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/proposals/{proposal_id}/flag":{"post":{"tags":["proposals"],"summary":"Flag Proposal","description":"Flag a proposal as bad/spam/incorrect.\n\nIdempotent per-user: a second flag from the same user returns 409. Flags\naccumulate in ``evidence.community_flags``; once the count crosses\n``settings.AUTO_REJECT_FLAG_THRESHOLD`` the proposal is auto-rejected\n(status='rejected', decided_by=null, no apply).","operationId":"flag_proposal_api_proposals__proposal_id__flag_post","parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalFlagIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalFlagOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/comments":{"get":{"tags":["comments"],"summary":"List Comments","operationId":"list_comments_api_comments_get","parameters":[{"name":"entity_type","in":"query","required":true,"schema":{"type":"string","title":"Entity Type"}},{"name":"entity_id","in":"query","required":true,"schema":{"type":"string","title":"Entity Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_hidden","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Hidden"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["comments"],"summary":"Create Comment","operationId":"create_comment_api_comments_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/comments/{comment_id}":{"get":{"tags":["comments"],"summary":"Get Comment","operationId":"get_comment_api_comments__comment_id__get","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","title":"Comment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["comments"],"summary":"Edit Comment","operationId":"edit_comment_api_comments__comment_id__patch","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","title":"Comment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["comments"],"summary":"Delete Comment","operationId":"delete_comment_api_comments__comment_id__delete","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","title":"Comment Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/comments/{comment_id}/react":{"post":{"tags":["comments"],"summary":"Add Reaction","operationId":"add_reaction_api_comments__comment_id__react_post","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","title":"Comment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/comments/{comment_id}/react/{kind}":{"delete":{"tags":["comments"],"summary":"Remove Reaction","operationId":"remove_reaction_api_comments__comment_id__react__kind__delete","parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","title":"Comment Id"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","title":"Kind"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReactionOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/device/lookup":{"get":{"tags":["device"],"summary":"Lookup Device","description":"Fetch row metadata for the consent page. Public read (the user_code\nIS the unguessable token). Returns 404 if not found, 410 if expired or\nno longer pending.","operationId":"lookup_device_api_device_lookup_get","parameters":[{"name":"user_code","in":"query","required":true,"schema":{"type":"string","maxLength":24,"title":"User Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceLookupOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/device/approve":{"post":{"tags":["device"],"summary":"Approve Device","description":"Record the signed-in user's approve/deny decision.","operationId":"approve_device_api_device_approve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceApproveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/oauth/device":{"post":{"tags":["oauth"],"summary":"Start Device Authorization","description":"RFC 8628 §3.1 — initiate a new device-authorization request.","operationId":"start_device_authorization_api_oauth_device_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeviceAuthRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Device Authorization Api Oauth Device Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["oauth"],"summary":"Start Device Authorization Get","description":"GET alias for sandboxes that can't POST. Same response shape as the POST.\n\nNon-RFC, pragmatic: some agent runtimes (notably web-based assistants\nwith proxied fetchers) block outbound POSTs to user-named URLs. They\ncan still do GETs. Polling (/token) still requires POST because the\ndevice_code is a one-time secret that shouldn't appear in URLs; agents\nin fully POST-blocked environments should use the manual API-key\nfallback documented at /.well-known/agent.json.auth.post_blocked.","operationId":"start_device_authorization_get_api_oauth_device_get","parameters":[{"name":"client_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Name"}},{"name":"client_host","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Host"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Device Authorization Get Api Oauth Device Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/oauth/token":{"post":{"tags":["oauth"],"summary":"Exchange Device Token","description":"RFC 8628 §3.4 — agent polls here. Errors are JSON 400 with `error`.","operationId":"exchange_device_token_api_oauth_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Exchange Device Token Api Oauth Token Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts":{"get":{"tags":["posts"],"summary":"List Posts","operationId":"list_posts_api_posts_get","parameters":[{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Tag"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(newest|oldest)$","default":"newest","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["posts"],"summary":"Create Post","operationId":"create_post_api_posts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/me":{"get":{"tags":["posts"],"summary":"List My Posts","operationId":"list_my_posts_api_posts_me_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{slug}":{"get":{"tags":["posts"],"summary":"Get Post","operationId":"get_post_api_posts__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}":{"patch":{"tags":["posts"],"summary":"Edit Post","operationId":"edit_post_api_posts__post_id__patch","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["posts"],"summary":"Delete Post","operationId":"delete_post_api_posts__post_id__delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/submit":{"post":{"tags":["posts"],"summary":"Submit Post","operationId":"submit_post_api_posts__post_id__submit_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/essay":{"get":{"tags":["post-essay"],"summary":"Get Essay","operationId":"get_essay_api_posts__post_id__essay_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["post-essay"],"summary":"Put Essay","operationId":"put_essay_api_posts__post_id__essay_put","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"If-Match"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayPutBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EssayOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/admins":{"get":{"tags":["post-essay"],"summary":"Get Admins","operationId":"get_admins_api_posts__post_id__admins_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["post-essay"],"summary":"Grant Co Admin","operationId":"grant_co_admin_api_posts__post_id__admins_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantCoAdminBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/admins/{user_id}":{"delete":{"tags":["post-essay"],"summary":"Revoke Co Admin","operationId":"revoke_co_admin_api_posts__post_id__admins__user_id__delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/essay/votes":{"get":{"tags":["post-essay"],"summary":"Get Votes","operationId":"get_votes_api_posts__post_id__essay_votes_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/essay/vote":{"post":{"tags":["post-essay"],"summary":"Vote","operationId":"vote_api_posts__post_id__essay_vote_post","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["post-essay"],"summary":"Unvote","operationId":"unvote_api_posts__post_id__essay_vote_delete","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/{user_id}":{"get":{"tags":["users"],"summary":"Get User","operationId":"get_user_api_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPublicOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications":{"get":{"tags":["notifications"],"summary":"List Notifications","operationId":"list_notifications_api_notifications_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(all|mentions|system|unread)?$"},{"type":"null"}],"title":"Filter"}},{"name":"include_dismissed","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Dismissed"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/unread":{"get":{"tags":["notifications"],"summary":"Unread Count","operationId":"unread_count_api_notifications_unread_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadOut"}}}}}}},"/api/notifications/mark-all-read":{"post":{"tags":["notifications"],"summary":"Mark All Read","operationId":"mark_all_read_api_notifications_mark_all_read_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/notifications/{notification_id}/read":{"post":{"tags":["notifications"],"summary":"Mark Read","operationId":"mark_read_api_notifications__notification_id__read_post","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/{notification_id}":{"delete":{"tags":["notifications"],"summary":"Dismiss","operationId":"dismiss_api_notifications__notification_id__delete","parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Notification Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/videos":{"get":{"tags":["videos"],"summary":"List Videos","operationId":"list_videos_api_videos_get","parameters":[{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by channel ID","title":"Channel"},"description":"Filter by channel ID"},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tag","title":"Tag"},"description":"Filter by tag"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"highlight","in":"query","required":false,"schema":{"type":"boolean","description":"Only return front-page highlight videos","default":false,"title":"Highlight"},"description":"Only return front-page highlight videos"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only videos on or after this date (YYYY-MM-DD)","title":"Since"},"description":"Only videos on or after this date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/videos/{video_id}":{"get":{"tags":["videos"],"summary":"Get Video","operationId":"get_video_api_videos__video_id__get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}},{"name":"agent","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/channels":{"get":{"tags":["channels"],"summary":"List Channels","operationId":"list_channels_api_channels_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/channels/{channel_id}":{"get":{"tags":["channels"],"summary":"Get Channel","operationId":"get_channel_api_channels__channel_id__get","parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string","title":"Channel Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essays":{"get":{"tags":["essays"],"summary":"List Essays","operationId":"list_essays_api_essays_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/essays/{slug}/thumbnail":{"get":{"tags":["essays"],"summary":"Get Essay Thumbnail","operationId":"get_essay_thumbnail_api_essays__slug__thumbnail_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essays/{slug}":{"get":{"tags":["essays"],"summary":"Get Essay","operationId":"get_essay_api_essays__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"agent","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tags":{"get":{"tags":["tags"],"summary":"List Tags","operationId":"list_tags_api_tags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/digests":{"get":{"tags":["digests"],"summary":"List Digests","operationId":"list_digests_api_digests_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only digests on or after this date (YYYY-MM-DD)","title":"Since"},"description":"Only digests on or after this date (YYYY-MM-DD)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/digests/{date}/thumbnail":{"get":{"tags":["digests"],"summary":"Get Digest Thumbnail","operationId":"get_digest_thumbnail_api_digests__date__thumbnail_get","parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string","title":"Date"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/digests/{date}":{"get":{"tags":["digests"],"summary":"Get Digest","operationId":"get_digest_api_digests__date__get","parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string","title":"Date"}},{"name":"agent","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/personas":{"get":{"tags":["personas"],"summary":"List Personas","operationId":"list_personas_api_personas_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/personas/modelfiles/{persona_id}/{mode}/{lang}":{"get":{"tags":["personas"],"summary":"Get Modelfile","operationId":"get_modelfile_api_personas_modelfiles__persona_id___mode___lang__get","parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}},{"name":"mode","in":"path","required":true,"schema":{"type":"string","title":"Mode"}},{"name":"lang","in":"path","required":true,"schema":{"type":"string","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/personas/{persona_id}":{"get":{"tags":["personas"],"summary":"Get Persona","operationId":"get_persona_api_personas__persona_id__get","parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}},{"name":"agent","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge":{"get":{"tags":["knowledge"],"summary":"List Knowledge","operationId":"list_knowledge_api_knowledge_get","parameters":[{"name":"draft","in":"query","required":false,"schema":{"type":"boolean","description":"Include draft concepts in listing","default":false,"title":"Draft"},"description":"Include draft concepts in listing"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/{slug}":{"get":{"tags":["knowledge"],"summary":"Get Knowledge","operationId":"get_knowledge_api_knowledge__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"agent","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Agent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/search":{"get":{"tags":["search"],"summary":"Search Content","operationId":"search_content_api_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Search query","title":"Q"},"description":"Search query"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"DEPRECATED — single content type filter. Prefer `types`.","title":"Type"},"description":"DEPRECATED — single content type filter. Prefer `types`."},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated content types: video,knowledge,essay,digest,persona,post","title":"Types"},"description":"Comma-separated content types: video,knowledge,essay,digest,persona,post"},{"name":"hybrid","in":"query","required":false,"schema":{"type":"boolean","description":"Fuse keyword + vector results via RRF. Set false for legacy keyword-only.","default":true,"title":"Hybrid"},"description":"Fuse keyword + vector results via RRF. Set false for legacy keyword-only."},{"name":"draft","in":"query","required":false,"schema":{"type":"boolean","description":"Include draft canon (concept_stub proposals) in results. When true, draft hits are included with a 0.7 score multiplier. Default false.","default":false,"title":"Draft"},"description":"Include draft canon (concept_stub proposals) in results. When true, draft hits are included with a 0.7 score multiplier. Default false."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max results","default":20,"title":"Limit"},"description":"Max results"},{"name":"agent","in":"query","required":false,"schema":{"type":"boolean","description":"Rewrite links for agent consumption","default":false,"title":"Agent"},"description":"Rewrite links for agent consumption"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/videos/{video_id}/related":{"get":{"tags":["related"],"summary":"Video Related","operationId":"video_related_api_videos__video_id__related_get","parameters":[{"name":"video_id","in":"path","required":true,"schema":{"type":"string","title":"Video Id"}},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/knowledge/{slug}/related":{"get":{"tags":["related"],"summary":"Knowledge Related","operationId":"knowledge_related_api_knowledge__slug__related_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/essays/{slug}/related":{"get":{"tags":["related"],"summary":"Essay Related","operationId":"essay_related_api_essays__slug__related_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/digests/{date}/related":{"get":{"tags":["related"],"summary":"Digest Related","operationId":"digest_related_api_digests__date__related_get","parameters":[{"name":"date","in":"path","required":true,"schema":{"type":"string","title":"Date"}},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/personas/{persona_id}/related":{"get":{"tags":["related"],"summary":"Persona Related","operationId":"persona_related_api_personas__persona_id__related_get","parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"string","title":"Persona Id"}},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/posts/{post_id}/related":{"get":{"tags":["related"],"summary":"Post Related","operationId":"post_related_api_posts__post_id__related_get","parameters":[{"name":"post_id","in":"path","required":true,"schema":{"type":"string","title":"Post Id"}},{"name":"k","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"default":5,"title":"K"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/auth":{"post":{"tags":["chat"],"summary":"Authenticate","operationId":"authenticate_api_chat_auth_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/chat/completions":{"post":{"tags":["chat"],"summary":"Chat Completions","operationId":"chat_completions_api_chat_completions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sources":{"post":{"tags":["sources"],"summary":"Add Source","operationId":"add_source_api_sources_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddSourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["sources"],"summary":"List Sources","description":"Paginated listing of every source-of-truth entry, most-recent-first.\n\nKnowledge concepts are intentionally excluded (they are derived from\nsources, not sources themselves). Drafts (posts, knowledge) and\ncomments below the top level are also excluded.","operationId":"list_sources_api_sources_get","parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated subset of: video,essay,digest,web_page,post,comment","title":"Type"},"description":"Comma-separated subset of: video,essay,digest,web_page,post,comment"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sources/knowledge":{"post":{"tags":["sources"],"summary":"Add Knowledge","description":"Create a knowledge concept page from a topic. Uses AI to generate content.","operationId":"add_knowledge_api_sources_knowledge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddKnowledgeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/graph":{"get":{"tags":["graph"],"summary":"Get Graph Html","description":"Serve the interactive knowledge graph visualization.","operationId":"get_graph_html_api_graph_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/graph/data":{"get":{"tags":["graph"],"summary":"Get Graph Data","description":"Return the raw graph data (nodes + edges) as JSON.","operationId":"get_graph_data_api_graph_data_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/audit":{"get":{"tags":["audit"],"summary":"List Events","operationId":"list_events_api_audit_get","parameters":[{"name":"after_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After Seq"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"subject_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Type"}},{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/checkpoints":{"get":{"tags":["audit"],"summary":"List Checkpoints","operationId":"list_checkpoints_api_audit_checkpoints_get","parameters":[{"name":"after_seq","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"After Seq"}},{"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":{"$ref":"#/components/schemas/AuditCheckpointPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/audit/pubkey":{"get":{"tags":["audit"],"summary":"Get Audit Pubkey","operationId":"get_audit_pubkey_api_audit_pubkey_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditPubkeyOut"}}}}}}},"/api/auth/github/begin":{"get":{"tags":["personal-knowledge"],"summary":"Begin","description":"Return the GitHub OAuth authorize URL the frontend should redirect to.","operationId":"begin_api_auth_github_begin_get","parameters":[{"name":"redirect_uri","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/github/callback":{"get":{"tags":["personal-knowledge"],"summary":"Callback","description":"Handle GitHub's OAuth callback. On success, 302-redirects the browser\nback to ``/account?pk=connected`` where the SPA toasts and refreshes.","operationId":"callback_api_auth_github_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/personal-knowledge":{"get":{"tags":["personal-knowledge"],"summary":"Get Status","operationId":"get_status_api_me_personal_knowledge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Status Api Me Personal Knowledge Get"}}}}}},"delete":{"tags":["personal-knowledge"],"summary":"Disconnect Backend","operationId":"disconnect_backend_api_me_personal_knowledge_delete","responses":{"204":{"description":"Successful Response"}}}},"/api/me/personal-knowledge/notes":{"get":{"tags":["personal-knowledge"],"summary":"List Notes","operationId":"list_notes_api_me_personal_knowledge_notes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Notes Api Me Personal Knowledge Notes Get"}}}}}}},"/api/me/personal-knowledge/notes/{slug}":{"get":{"tags":["personal-knowledge"],"summary":"Get Note","operationId":"get_note_api_me_personal_knowledge_notes__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["personal-knowledge"],"summary":"Put Note","operationId":"put_note_api_me_personal_knowledge_notes__slug__put","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Put Note Api Me Personal Knowledge Notes  Slug  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["personal-knowledge"],"summary":"Delete Note","operationId":"delete_note_api_me_personal_knowledge_notes__slug__delete","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Note Api Me Personal Knowledge Notes  Slug  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/personal-knowledge/history":{"get":{"tags":["personal-knowledge"],"summary":"Get History","description":"Return up to ``limit`` history entries (newest first).\n\nPass ``?slug=...`` to scope the history to one note. Without a slug,\nbackends return a recent-activity feed (best-effort per backend).","operationId":"get_history_api_me_personal_knowledge_history_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get History Api Me Personal Knowledge History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api":{"get":{"tags":["agent"],"summary":"Api Root","description":"API entry point. Returns SKILL.md for agents, or a brief JSON summary with latest content for browsers.","operationId":"api_root_api_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/latest":{"get":{"tags":["agent"],"summary":"Get Latest","description":"One-call briefing: latest digest + recent videos + essays + knowledge stats.\n\nDesigned for agents that just want to fetch one URL and get useful content.\n`/api/brief` is an alias — some agents intuit this URL first.","operationId":"get_latest_api_latest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/skill.md":{"get":{"tags":["agent"],"summary":"Get Skill Md","operationId":"get_skill_md_api_skill_md_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/skills":{"get":{"tags":["agent"],"summary":"List Skills","description":"List Claude Code skills installable via the API. These work without a local repo clone.","operationId":"list_skills_api_skills_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/skills/{name}":{"get":{"tags":["agent"],"summary":"Get Skill","description":"Serve a single skill file as plain text markdown.","operationId":"get_skill_api_skills__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/config":{"get":{"tags":["config"],"summary":"Get Config","description":"Public client-side config.\n\n``dev_mode`` previously lived on ``/api/health``; it surfaces here now\nthat ``/api/health`` is a minimal liveness probe. Used by the login UI\nto decide whether to render the local dev-login form. Not a secret on\neither side of the env split.","operationId":"get_config_api_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"tags":["health"],"summary":"Health Check","description":"Minimal liveness probe.\n\nAnonymous, no operational detail — used by load balancers, the Docker\nHEALTHCHECK, and agents that just want to know \"is the site up?\".\nDetailed operational state (paths, providers, bot wiring) lives behind\nthe admin-gated ``GET /api/dashboard/health`` endpoint.","operationId":"health_check_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AddKnowledgeRequest":{"properties":{"topic":{"type":"string","title":"Topic"},"password":{"type":"string","title":"Password","default":""}},"type":"object","required":["topic"],"title":"AddKnowledgeRequest"},"AddSourceRequest":{"properties":{"url":{"type":"string","title":"Url"},"password":{"type":"string","title":"Password","default":""}},"type":"object","required":["url"],"title":"AddSourceRequest"},"AdminUserList":{"properties":{"users":{"items":{"$ref":"#/components/schemas/AdminUserOut"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["users","total"],"title":"AdminUserList"},"AdminUserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"type":"string","title":"Display Name"},"role":{"$ref":"#/components/schemas/UserRole"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","email","display_name","role","created_at"],"title":"AdminUserOut"},"AdminsOut":{"properties":{"creator":{"$ref":"#/components/schemas/_UserBrief"},"co_admins":{"items":{"$ref":"#/components/schemas/CoAdminOut"},"type":"array","title":"Co Admins"}},"type":"object","required":["creator","co_admins"],"title":"AdminsOut"},"ApiKeyCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"expires_in_days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Expires In Days"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","required":["name"],"title":"ApiKeyCreate"},"ApiKeyCreateResponse":{"properties":{"key":{"type":"string","title":"Key"},"id":{"type":"string","title":"Id"},"prefix":{"type":"string","title":"Prefix"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["key","id","prefix"],"title":"ApiKeyCreateResponse"},"ApiKeyOut":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","default":[]},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","name","prefix","created_at"],"title":"ApiKeyOut"},"AuditCheckpointOut":{"properties":{"id":{"type":"string","title":"Id"},"seq":{"type":"integer","title":"Seq"},"at":{"type":"string","title":"At"},"chain_hash":{"type":"string","title":"Chain Hash"},"signature":{"type":"string","title":"Signature"},"pubkey_id":{"type":"string","title":"Pubkey Id"}},"type":"object","required":["id","seq","at","chain_hash","signature","pubkey_id"],"title":"AuditCheckpointOut"},"AuditCheckpointPage":{"properties":{"checkpoints":{"items":{"$ref":"#/components/schemas/AuditCheckpointOut"},"type":"array","title":"Checkpoints"},"total_seq":{"type":"integer","title":"Total Seq"}},"type":"object","required":["checkpoints","total_seq"],"title":"AuditCheckpointPage"},"AuditEventOut":{"properties":{"seq":{"type":"integer","title":"Seq"},"at":{"type":"string","title":"At"},"kind":{"type":"string","title":"Kind"},"actor":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Actor"},"subject_type":{"type":"string","title":"Subject Type"},"subject_id":{"type":"string","title":"Subject Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"prev_hash":{"type":"string","title":"Prev Hash"},"record_hash":{"type":"string","title":"Record Hash"}},"type":"object","required":["seq","at","kind","subject_type","subject_id","payload","prev_hash","record_hash"],"title":"AuditEventOut"},"AuditPage":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AuditEventOut"},"type":"array","title":"Events"},"total_seq":{"type":"integer","title":"Total Seq"}},"type":"object","required":["events","total_seq"],"title":"AuditPage"},"AuditPubkeyOut":{"properties":{"pubkey":{"type":"string","title":"Pubkey"},"pubkey_id":{"type":"string","title":"Pubkey Id"},"algorithm":{"type":"string","title":"Algorithm","default":"ed25519"},"openssh_pubkey":{"type":"string","title":"Openssh Pubkey"}},"type":"object","required":["pubkey","pubkey_id","openssh_pubkey"],"title":"AuditPubkeyOut"},"AuthRequest":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"AuthRequest"},"BrowsingContextItem":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","title":"Id"},"path":{"type":"string","title":"Path"}},"type":"object","required":["type","id","path"],"title":"BrowsingContextItem"},"ChatMessage":{"properties":{"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage"},"ChatRequest":{"properties":{"key":{"type":"string","title":"Key"},"persona_id":{"type":"string","title":"Persona Id"},"mode":{"type":"string","title":"Mode","default":"persona"},"lang":{"type":"string","title":"Lang","default":"en"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Messages"},"browsing_context":{"items":{"$ref":"#/components/schemas/BrowsingContextItem"},"type":"array","title":"Browsing Context","default":[]}},"type":"object","required":["key","persona_id","messages"],"title":"ChatRequest"},"CoAdminOut":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"granted_at":{"type":"string","title":"Granted At"},"granted_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granted By Id"}},"type":"object","required":["id","display_name","granted_at"],"title":"CoAdminOut"},"CommentAuthor":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"role":{"$ref":"#/components/schemas/UserRole"}},"type":"object","required":["id","display_name","role"],"title":"CommentAuthor"},"CommentCreate":{"properties":{"entity_type":{"type":"string","maxLength":32,"minLength":1,"title":"Entity Type"},"entity_id":{"type":"string","maxLength":255,"minLength":1,"title":"Entity Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"body_md":{"type":"string","maxLength":8000,"minLength":1,"title":"Body Md"},"attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments"}},"type":"object","required":["entity_type","entity_id","body_md"],"title":"CommentCreate"},"CommentList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CommentOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"CommentList"},"CommentOut":{"properties":{"id":{"type":"string","title":"Id"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"thread_root_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Root Id"},"author":{"$ref":"#/components/schemas/CommentAuthor"},"body_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Md"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"attachments":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Attachments","default":[]},"state":{"type":"string","title":"State"},"reaction_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Reaction Counts","default":{}},"my_reactions":{"items":{"type":"string"},"type":"array","title":"My Reactions","default":[]},"edited_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edited At"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Deleted At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","entity_type","entity_id","author","state","created_at"],"title":"CommentOut"},"CommentUpdate":{"properties":{"body_md":{"type":"string","maxLength":8000,"minLength":1,"title":"Body Md"},"attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments"}},"type":"object","required":["body_md"],"title":"CommentUpdate"},"CountOnly":{"properties":{"total":{"type":"integer","title":"Total"}},"type":"object","required":["total"],"title":"CountOnly"},"DashboardResponse":{"properties":{"stocks":{"$ref":"#/components/schemas/StocksResponse"},"flows":{"$ref":"#/components/schemas/FlowsResponse"},"schedules":{"$ref":"#/components/schemas/SchedulesResponse"},"subsystems":{"$ref":"#/components/schemas/SubsystemsResponse"}},"type":"object","required":["stocks","flows","schedules","subsystems"],"title":"DashboardResponse"},"DeviceApproveRequest":{"properties":{"user_code":{"type":"string","maxLength":24,"title":"User Code"},"decision":{"type":"string","pattern":"^(approve|deny)$","title":"Decision"}},"type":"object","required":["user_code","decision"],"title":"DeviceApproveRequest"},"DeviceAuthRequest":{"properties":{"client_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Client Name"},"client_host":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Client Host"}},"type":"object","title":"DeviceAuthRequest"},"DeviceLookupOut":{"properties":{"user_code":{"type":"string","title":"User Code"},"client_name":{"type":"string","title":"Client Name"},"client_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Host"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"},"expires_at":{"type":"string","title":"Expires At"}},"type":"object","required":["user_code","client_name","status","created_at","expires_at"],"title":"DeviceLookupOut"},"DigestStocks":{"properties":{"total":{"type":"integer","title":"Total"},"latest_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Date"}},"type":"object","required":["total"],"title":"DigestStocks"},"EmbeddingStocks":{"properties":{"target_types_covered":{"items":{"type":"string"},"type":"array","title":"Target Types Covered"},"total_embeddings":{"type":"integer","title":"Total Embeddings"},"coverage_percent":{"type":"integer","title":"Coverage Percent"}},"type":"object","required":["target_types_covered","total_embeddings","coverage_percent"],"title":"EmbeddingStocks"},"EssayEditor":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["id","display_name"],"title":"EssayEditor"},"EssayOut":{"properties":{"has_essay":{"type":"boolean","title":"Has Essay"},"body_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Md"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"version":{"type":"integer","title":"Version","default":0},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"last_editor":{"anyOf":[{"$ref":"#/components/schemas/EssayEditor"},{"type":"null"}]}},"type":"object","required":["has_essay"],"title":"EssayOut"},"EssayPutBody":{"properties":{"body_md":{"type":"string","maxLength":80000,"minLength":1,"title":"Body Md"}},"type":"object","required":["body_md"],"title":"EssayPutBody"},"FlagCreate":{"properties":{"target_type":{"type":"string","maxLength":32,"minLength":1,"title":"Target Type"},"target_id":{"type":"string","maxLength":64,"minLength":1,"title":"Target Id"},"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"}},"type":"object","required":["target_type","target_id"],"title":"FlagCreate"},"FlowsByDay":{"properties":{"date":{"type":"string","title":"Date"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["date","count"],"title":"FlowsByDay"},"FlowsResponse":{"properties":{"since":{"type":"string","title":"Since"},"until":{"type":"string","title":"Until"},"total_events":{"type":"integer","title":"Total Events"},"by_kind":{"additionalProperties":true,"type":"object","title":"By Kind"},"by_day":{"items":{"$ref":"#/components/schemas/FlowsByDay"},"type":"array","title":"By Day"},"recent_kinds":{"items":{"type":"string"},"type":"array","title":"Recent Kinds"}},"type":"object","required":["since","until","total_events","by_kind","by_day","recent_kinds"],"title":"FlowsResponse"},"GrantCoAdminBody":{"properties":{"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["user_id"],"title":"GrantCoAdminBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthCheck":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"detail":{"type":"string","title":"Detail","default":""}},"type":"object","required":["name","status"],"title":"HealthCheck"},"JobOut":{"properties":{"id":{"type":"string","title":"Id"},"next_run_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Run Time"},"trigger":{"type":"string","title":"Trigger"},"description":{"type":"string","title":"Description"}},"type":"object","required":["id","trigger","description"],"title":"JobOut"},"KnowledgeStocks":{"properties":{"total":{"type":"integer","title":"Total"},"by_confidence":{"additionalProperties":true,"type":"object","title":"By Confidence"},"drafts":{"type":"integer","title":"Drafts"}},"type":"object","required":["total","by_confidence","drafts"],"title":"KnowledgeStocks"},"ModerationPostQueueItem":{"properties":{"post":{"$ref":"#/components/schemas/PostOut"},"last_event_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event Kind"},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["post"],"title":"ModerationPostQueueItem"},"ModerationPostQueueOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ModerationPostQueueItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"ModerationPostQueueOut"},"ModerationQueueItem":{"properties":{"comment":{"$ref":"#/components/schemas/CommentOut"},"flag_count":{"type":"integer","title":"Flag Count"},"last_event_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event Kind"},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["comment","flag_count"],"title":"ModerationQueueItem"},"ModerationQueueOut":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ModerationQueueItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"ModerationQueueOut"},"NotificationList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/NotificationOut"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"unread":{"type":"integer","title":"Unread"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","unread","limit","offset"],"title":"NotificationList"},"NotificationOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"body":{"type":"string","title":"Body"},"archive_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archive Id"},"actor_handle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Handle"},"target_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Url"},"data":{"additionalProperties":true,"type":"object","title":"Data","default":{}},"read_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","kind","body","created_at"],"title":"NotificationOut"},"PostAuthor":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"role":{"$ref":"#/components/schemas/UserRole"}},"type":"object","required":["id","display_name","role"],"title":"PostAuthor"},"PostCreate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"summary":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Summary"},"body_md":{"type":"string","maxLength":30000,"minLength":1,"title":"Body Md"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments"},"quick":{"type":"boolean","title":"Quick","default":false}},"type":"object","required":["title","body_md"],"title":"PostCreate"},"PostList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PostListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"PostList"},"PostListItem":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"author":{"$ref":"#/components/schemas/PostAuthor"},"state":{"type":"string","title":"State"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","title":"Created At"},"comment_count":{"type":"integer","title":"Comment Count","default":0}},"type":"object","required":["id","slug","title","author","state","created_at"],"title":"PostListItem"},"PostOut":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"author":{"$ref":"#/components/schemas/PostAuthor"},"state":{"type":"string","title":"State"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published At"},"created_at":{"type":"string","title":"Created At"},"comment_count":{"type":"integer","title":"Comment Count","default":0},"body_md":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Md"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Html"},"attachments":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Attachments","default":[]},"triage_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triage Reason"},"archive_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archive Reason"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","slug","title","author","state","created_at","updated_at"],"title":"PostOut"},"PostStocks":{"properties":{"total_published":{"type":"integer","title":"Total Published"},"in_moderation":{"type":"integer","title":"In Moderation"}},"type":"object","required":["total_published","in_moderation"],"title":"PostStocks"},"PostUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"summary":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Summary"},"body_md":{"anyOf":[{"type":"string","maxLength":30000,"minLength":1},{"type":"null"}],"title":"Body Md"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments"}},"type":"object","title":"PostUpdate"},"ProposalFlagIn":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ProposalFlagIn"},"ProposalFlagOut":{"properties":{"flag_count":{"type":"integer","title":"Flag Count"},"auto_rejected":{"type":"boolean","title":"Auto Rejected","default":false},"status":{"type":"string","title":"Status"}},"type":"object","required":["flag_count","status"],"title":"ProposalFlagOut"},"ProposalList":{"properties":{"proposals":{"items":{"$ref":"#/components/schemas/ProposalOut"},"type":"array","title":"Proposals"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["proposals","total"],"title":"ProposalList"},"ProposalOut":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"type":"string","title":"Target Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"evidence":{"additionalProperties":true,"type":"object","title":"Evidence"},"provenance":{"type":"string","title":"Provenance"},"confidence":{"type":"string","title":"Confidence"},"status":{"type":"string","title":"Status"},"flag_count":{"type":"integer","title":"Flag Count","default":0},"created_at":{"type":"string","title":"Created At"},"decided_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided At"},"decided_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By"},"applied_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applied At"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["id","kind","target_type","target_id","payload","evidence","provenance","confidence","status","created_at"],"title":"ProposalOut"},"ProposalRejectIn":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ProposalRejectIn"},"PublicProposalList":{"properties":{"proposals":{"items":{"$ref":"#/components/schemas/PublicProposalSummary"},"type":"array","title":"Proposals"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["proposals","total"],"title":"PublicProposalList"},"PublicProposalSummary":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"type":"string","title":"Target Id"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"provenance":{"type":"string","title":"Provenance"},"confidence":{"type":"string","title":"Confidence"},"status":{"type":"string","title":"Status"},"co_mentions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Co Mentions"},"flag_count":{"type":"integer","title":"Flag Count","default":0},"created_at":{"type":"string","title":"Created At"},"decided_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided At"},"applied_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applied At"}},"type":"object","required":["id","kind","target_type","target_id","payload","provenance","confidence","status","created_at"],"title":"PublicProposalSummary"},"ReactionCreate":{"properties":{"kind":{"type":"string","maxLength":16,"minLength":1,"title":"Kind"}},"type":"object","required":["kind"],"title":"ReactionCreate"},"ReactionOut":{"properties":{"comment_id":{"type":"string","title":"Comment Id"},"reaction_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Reaction Counts"},"my_reactions":{"items":{"type":"string"},"type":"array","title":"My Reactions"}},"type":"object","required":["comment_id","reaction_counts","my_reactions"],"title":"ReactionOut"},"RoleUpdate":{"properties":{"role":{"$ref":"#/components/schemas/UserRole"}},"type":"object","required":["role"],"title":"RoleUpdate"},"SchedulesResponse":{"properties":{"jobs":{"items":{"$ref":"#/components/schemas/JobOut"},"type":"array","title":"Jobs"}},"type":"object","required":["jobs"],"title":"SchedulesResponse"},"SearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["query","results","total"],"title":"SearchResponse"},"SearchResult":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"snippet":{"type":"string","title":"Snippet"},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","default":[]},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"score":{"type":"number","title":"Score"}},"type":"object","required":["type","id","title","snippet","score"],"title":"SearchResult"},"SourceItem":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"snippet":{"type":"string","title":"Snippet"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"url":{"type":"string","title":"Url"}},"type":"object","required":["type","id","title","snippet","url"],"title":"SourceItem"},"SourceListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SourceItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"SourceListResponse"},"SourceStocks":{"properties":{"total":{"type":"integer","title":"Total"}},"type":"object","required":["total"],"title":"SourceStocks"},"StocksResponse":{"properties":{"videos":{"$ref":"#/components/schemas/VideoStocks"},"knowledge_concepts":{"$ref":"#/components/schemas/KnowledgeStocks"},"essays":{"$ref":"#/components/schemas/CountOnly"},"digests":{"$ref":"#/components/schemas/DigestStocks"},"personas":{"$ref":"#/components/schemas/CountOnly"},"posts":{"$ref":"#/components/schemas/PostStocks"},"sources":{"$ref":"#/components/schemas/SourceStocks"},"embeddings":{"$ref":"#/components/schemas/EmbeddingStocks"}},"type":"object","required":["videos","knowledge_concepts","essays","digests","personas","posts","sources","embeddings"],"title":"StocksResponse"},"SubsystemsResponse":{"properties":{"checks":{"items":{"$ref":"#/components/schemas/HealthCheck"},"type":"array","title":"Checks"},"overall":{"type":"string","title":"Overall"}},"type":"object","required":["checks","overall"],"title":"SubsystemsResponse","description":"Subsystem health pings — anonymous-readable."},"SystemHealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"dev_mode":{"type":"boolean","title":"Dev Mode"},"project_root":{"type":"string","title":"Project Root"},"channels_json_exists":{"type":"boolean","title":"Channels Json Exists"},"channels_dir_exists":{"type":"boolean","title":"Channels Dir Exists"},"essays_dir_exists":{"type":"boolean","title":"Essays Dir Exists"},"ai_provider":{"type":"string","title":"Ai Provider"},"rocketchat_bot":{"type":"boolean","title":"Rocketchat Bot"},"skill_url":{"type":"string","title":"Skill Url"}},"type":"object","required":["status","dev_mode","project_root","channels_json_exists","channels_dir_exists","essays_dir_exists","ai_provider","rocketchat_bot","skill_url"],"title":"SystemHealthResponse","description":"Detailed system health — admin-only.\n\nThe legacy shape that used to live at the public ``/api/health`` endpoint.\nHolds operational details (paths, providers, bot wiring) that shouldn't\nleak anonymously."},"TokenRequest":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"device_code":{"type":"string","title":"Device Code"}},"type":"object","required":["grant_type","device_code"],"title":"TokenRequest"},"UnreadOut":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"UnreadOut"},"UserOut":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"type":"string","title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"role":{"$ref":"#/components/schemas/UserRole"},"created_at":{"type":"string","title":"Created At"},"reputation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reputation"}},"type":"object","required":["id","email","display_name","role","created_at"],"title":"UserOut"},"UserPublicOut":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"bio":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bio"},"role":{"$ref":"#/components/schemas/UserRole"},"reputation":{"additionalProperties":true,"type":"object","title":"Reputation"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","display_name","role","reputation","created_at"],"title":"UserPublicOut"},"UserRole":{"type":"string","enum":["user","moderator","admin"],"title":"UserRole"},"UserUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Display Name"},"bio":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Bio"}},"type":"object","title":"UserUpdate"},"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"},"VideoStocks":{"properties":{"total":{"type":"integer","title":"Total"},"relevant":{"type":"integer","title":"Relevant"},"knowledge":{"type":"integer","title":"Knowledge"},"highlight":{"type":"integer","title":"Highlight"}},"type":"object","required":["total","relevant","knowledge","highlight"],"title":"VideoStocks"},"VoteOut":{"properties":{"count":{"type":"integer","title":"Count"},"distinct_voters_with_rep_above_zero":{"type":"integer","title":"Distinct Voters With Rep Above Zero"},"you_voted":{"type":"boolean","title":"You Voted"}},"type":"object","required":["count","distinct_voters_with_rep_above_zero","you_voted"],"title":"VoteOut"},"_UserBrief":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["id","display_name"],"title":"_UserBrief"},"app__routers__comment_schemas__ModerationActionRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ModerationActionRequest"},"app__routers__post_schemas__ModerationActionRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"}},"type":"object","title":"ModerationActionRequest"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Agent API key. Pass as `Authorization: Bearer sok_...`. Obtain via the RFC 8628 device flow at /api/oauth/device + /api/oauth/token."},"CookieAuth":{"type":"apiKey","in":"cookie","name":"soy_session","description":"Browser session cookie set by /api/auth/google/callback. Write endpoints additionally require the CSRFHeader."},"CSRFHeader":{"type":"apiKey","in":"header","name":"X-CSRF-Token","description":"Required on write requests authenticated by CookieAuth. Mirrored from the soy_csrf cookie."}}}}