Mercurial
diff mrjunejune/inference/mock_sidecar.py @ 265:056790c4fb0d
add role-aware Epi assistant prompts
Add verified June knowledge, guest/member/admin Copilot profiles, profile-isolated session recovery, animated Epi greetings, and a single authoritative runtime config workflow for inference.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 07 Aug 2026 10:50:30 -0700 |
| parents | b401627fc49e |
| children |
line wrap: on
line diff
--- a/mrjunejune/inference/mock_sidecar.py Fri Aug 07 07:34:12 2026 -0700 +++ b/mrjunejune/inference/mock_sidecar.py Fri Aug 07 10:50:30 2026 -0700 @@ -23,6 +23,9 @@ "request_id", } MAX_DELAY_MS = 60_000 +PROMPT_PROFILES = {"public_visitor", "invited_friend", "june_admin"} +PROMPT_VERSION = 1 +KNOWLEDGE_VERSION = 1 @dataclass(frozen=True) @@ -261,6 +264,21 @@ "prompt is required", ) return + prompt_profile = command.get("prompt_profile") + prompt_version = command.get("prompt_version") + knowledge_version = command.get("knowledge_version") + if ( + prompt_profile not in PROMPT_PROFILES + or prompt_version != PROMPT_VERSION + or knowledge_version != KNOWLEDGE_VERSION + ): + await self._fail( + request_id, + conversation_id, + "invalid_prompt_profile", + "a known prompt profile and current versions are required", + ) + return await self._start_turn(request_id, conversation_id, prompt) elif command_name == "turn.abort": await self._abort_turn(request_id, conversation_id)