Mercurial
diff mrjunejune/conversation_api.h @ 264:04fee26ecce0
add authenticated JRPG conversation platform
Add reusable auth/session storage, owned conversation recovery, guest quotas, admin workflows, URL-routed conversation UI, mobile frame support, and parallel browser acceptance.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 07 Aug 2026 07:34:12 -0700 |
| parents | 1f9877b637e9 |
| children |
line wrap: on
line diff
--- a/mrjunejune/conversation_api.h Thu Aug 06 11:31:30 2026 -0700 +++ b/mrjunejune/conversation_api.h Fri Aug 07 07:34:12 2026 -0700 @@ -3,7 +3,25 @@ #include "dowa/dowa.h" -boolean Conversation_API_Init(const char *database_path); +/* + * Guest quota policy passed from the config loader into Conversation_API_Init. + * All fields must be validated (positive integers within supported ranges) + * before passing; Init returns FALSE if any field is out of range. + * Set guest_inference_enabled = FALSE to block all guest inference; TRUE to + * allow it subject to quota. + * request_output_tokens: per-request reservation cap; must be <= daily_output_tokens. + */ +typedef struct { + boolean guest_inference_enabled; + int64 daily_turns; + int64 daily_output_tokens; + int64 request_output_tokens; +} Conversation_API_Guest_Policy; + +boolean Conversation_API_Init( + const char *database_path, + const Conversation_API_Guest_Policy *p_policy); + boolean Conversation_API_Enable_Inference( const char *sidecar_path, const char *copilot_cli_path);