comparison 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
comparison
equal deleted inserted replaced
264:04fee26ecce0 265:056790c4fb0d
21 "mock", 21 "mock",
22 "mock_command", 22 "mock_command",
23 "request_id", 23 "request_id",
24 } 24 }
25 MAX_DELAY_MS = 60_000 25 MAX_DELAY_MS = 60_000
26 PROMPT_PROFILES = {"public_visitor", "invited_friend", "june_admin"}
27 PROMPT_VERSION = 1
28 KNOWLEDGE_VERSION = 1
26 29
27 30
28 @dataclass(frozen=True) 31 @dataclass(frozen=True)
29 class MockEvent: 32 class MockEvent:
30 event_type: str 33 event_type: str
259 conversation_id, 262 conversation_id,
260 "invalid_request", 263 "invalid_request",
261 "prompt is required", 264 "prompt is required",
262 ) 265 )
263 return 266 return
267 prompt_profile = command.get("prompt_profile")
268 prompt_version = command.get("prompt_version")
269 knowledge_version = command.get("knowledge_version")
270 if (
271 prompt_profile not in PROMPT_PROFILES
272 or prompt_version != PROMPT_VERSION
273 or knowledge_version != KNOWLEDGE_VERSION
274 ):
275 await self._fail(
276 request_id,
277 conversation_id,
278 "invalid_prompt_profile",
279 "a known prompt profile and current versions are required",
280 )
281 return
264 await self._start_turn(request_id, conversation_id, prompt) 282 await self._start_turn(request_id, conversation_id, prompt)
265 elif command_name == "turn.abort": 283 elif command_name == "turn.abort":
266 await self._abort_turn(request_id, conversation_id) 284 await self._abort_turn(request_id, conversation_id)
267 elif command_name == "conversation.delete": 285 elif command_name == "conversation.delete":
268 await self._delete_conversation(request_id, conversation_id) 286 await self._delete_conversation(request_id, conversation_id)