Mercurial
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 263:ee04e4e69fed | 264:04fee26ecce0 |
|---|---|
| 1 #ifndef MRJUNEJUNE_CONVERSATION_API_H | 1 #ifndef MRJUNEJUNE_CONVERSATION_API_H |
| 2 #define MRJUNEJUNE_CONVERSATION_API_H | 2 #define MRJUNEJUNE_CONVERSATION_API_H |
| 3 | 3 |
| 4 #include "dowa/dowa.h" | 4 #include "dowa/dowa.h" |
| 5 | 5 |
| 6 boolean Conversation_API_Init(const char *database_path); | 6 /* |
| 7 * Guest quota policy passed from the config loader into Conversation_API_Init. | |
| 8 * All fields must be validated (positive integers within supported ranges) | |
| 9 * before passing; Init returns FALSE if any field is out of range. | |
| 10 * Set guest_inference_enabled = FALSE to block all guest inference; TRUE to | |
| 11 * allow it subject to quota. | |
| 12 * request_output_tokens: per-request reservation cap; must be <= daily_output_tokens. | |
| 13 */ | |
| 14 typedef struct { | |
| 15 boolean guest_inference_enabled; | |
| 16 int64 daily_turns; | |
| 17 int64 daily_output_tokens; | |
| 18 int64 request_output_tokens; | |
| 19 } Conversation_API_Guest_Policy; | |
| 20 | |
| 21 boolean Conversation_API_Init( | |
| 22 const char *database_path, | |
| 23 const Conversation_API_Guest_Policy *p_policy); | |
| 24 | |
| 7 boolean Conversation_API_Enable_Inference( | 25 boolean Conversation_API_Enable_Inference( |
| 8 const char *sidecar_path, | 26 const char *sidecar_path, |
| 9 const char *copilot_cli_path); | 27 const char *copilot_cli_path); |
| 10 void Conversation_API_Register_Routes(void); | 28 void Conversation_API_Register_Routes(void); |
| 11 void Conversation_API_Destroy(void); | 29 void Conversation_API_Destroy(void); |