feat(terra): stored Hermes sessions for luna's voice
- Each daemon run creates a Hermes session (source "desktop") on its first turn, so voice chats show in the dashboard's default Chats view. Hermes only allows a fixed set of sources; unknown ones become the hidden api_server. - Turns carry X-Hermes-Session-Id (Hermes keeps the transcript) and X-Hermes-Session-Key: voice (one Honcho memory session for voice). - With a stored session only the base prompt and what's new since her last reply are sent; falls back to full client-side history if the session can't be created. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,10 @@ pub struct Config {
|
||||
/// system prompt is this client's opinion, while the marker survives into
|
||||
/// whatever history Hermes keeps and still identifies the channel later.
|
||||
pub voice_marker: Option<String>,
|
||||
/// Dashboard label for her stored voice session; empty = no stored session.
|
||||
pub session_source: String,
|
||||
/// Memory scope (one Honcho session for all of voice); empty = none.
|
||||
pub session_key: Option<String>,
|
||||
|
||||
pub eleven_key: String,
|
||||
pub voice_id: String,
|
||||
@@ -66,6 +70,13 @@ impl Config {
|
||||
m if m.is_empty() => None,
|
||||
m => Some(m),
|
||||
},
|
||||
// desktop, not a "voice" source: Hermes only allows a fixed set, and
|
||||
// its default dashboard view hides api_server.
|
||||
session_source: env_or("LUNA_SESSION_SOURCE", "desktop"),
|
||||
session_key: match env_or("LUNA_SESSION_KEY", "voice") {
|
||||
k if k.is_empty() => None,
|
||||
k => Some(k),
|
||||
},
|
||||
|
||||
eleven_key: secret("LUNA_ELEVENLABS_KEY_FILE")?,
|
||||
voice_id: env("LUNA_VOICE_ID")?,
|
||||
|
||||
Reference in New Issue
Block a user