Skip to main content

eros_engine_core/
persona.rs

1// SPDX-License-Identifier: AGPL-3.0-only
2use serde::{Deserialize, Serialize};
3use serde_json::Value;
4use uuid::Uuid;
5
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct PersonaGenome {
8    pub id: Uuid,
9    pub name: String,
10    pub system_prompt: String,
11    pub tip_personality: Option<String>,
12    pub avatar_url: Option<String>,
13    pub art_metadata: Value, // JSONB: gender/age/mbti/backstory/speech_style/quirks/topics/model
14    pub is_active: bool,
15}
16
17#[derive(Debug, Clone, Serialize, Deserialize)]
18pub struct PersonaInstance {
19    pub id: Uuid,
20    pub genome_id: Uuid,
21    pub owner_uid: Uuid,
22    pub status: String,
23}
24
25/// Joined view used by the engine pipeline.
26#[derive(Debug, Clone, Serialize, Deserialize)]
27pub struct CompanionPersona {
28    pub instance_id: Uuid,
29    pub genome: PersonaGenome,
30    pub instance: PersonaInstance,
31}