feat: multi-instance support — agent_name and user_name configurable
All hardcoded "Inara"/"Scott" strings replaced with settings.agent_name and settings.user_name, read from .env at startup: - config.py: AGENT_NAME and USER_NAME settings (defaults: Inara / Scott) - llm_client.py: conversation labels in prompt builder - session_logger.py: **Name:** labels in session log markdown - memory_distiller.py: distillation system prompts (mid + long) - routers/nextcloud_talk.py: @mention prefix strip - routers/google_chat.py: greeting message Second instance scaffolding: - holly/: identity directory with placeholder files (USER_NAME=Holly, AGENT_NAME to be chosen by Holly) - cortex/.env.holly: config for Holly's instance on port 8001 - cortex-holly.service: systemd unit for the second instance No behavioural change to the Inara/Scott instance — defaults unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,9 +18,9 @@ async def receive(request: Request):
|
||||
|
||||
if event_type == "ADDED_TO_SPACE":
|
||||
space_type = body.get("space", {}).get("type", "")
|
||||
greeting = "✨ Hello! I'm Inara. Send me a message and I'll do my best to help."
|
||||
greeting = f"✨ Hello! I'm {settings.agent_name}. Send me a message and I'll do my best to help."
|
||||
if space_type == "DM":
|
||||
greeting = "✨ Hello! I'm Inara. What can I help you with?"
|
||||
greeting = f"✨ Hello! I'm {settings.agent_name}. What can I help you with?"
|
||||
return {"text": greeting}
|
||||
|
||||
if event_type == "REMOVED_FROM_SPACE":
|
||||
|
||||
@@ -158,8 +158,9 @@ async def nextcloud_talk_webhook(request: Request, background_tasks: BackgroundT
|
||||
except (json.JSONDecodeError, AttributeError):
|
||||
user_text = (obj.get("name") or obj.get("content", "")).strip()
|
||||
|
||||
if user_text.lower().startswith("@inara"):
|
||||
user_text = user_text[6:].strip()
|
||||
mention_prefix = f"@{settings.agent_name.lower()}"
|
||||
if user_text.lower().startswith(mention_prefix):
|
||||
user_text = user_text[len(mention_prefix):].strip()
|
||||
|
||||
if not user_text:
|
||||
return Response(status_code=200)
|
||||
|
||||
Reference in New Issue
Block a user