feat(chat): implement native hub chat with sqlite conversations store, SSE streaming and DSH 5th universe integration
This commit is contained in:
+33
-6
@@ -8,6 +8,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
DATA_DIR = Path(os.getenv("HUB_DATA_DIR", BASE_DIR / "data"))
|
||||
PERSONAS_DIR = DATA_DIR / "personas"
|
||||
CLONES_DIR = DATA_DIR / "clones"
|
||||
DB_PATH = DATA_DIR / "hub.db"
|
||||
|
||||
class UniverseConfig(BaseModel):
|
||||
id: str
|
||||
@@ -22,6 +23,7 @@ class UniverseConfig(BaseModel):
|
||||
enabled: bool = True
|
||||
supports_files: bool = False
|
||||
files_url: Optional[str] = None
|
||||
is_external_app: bool = False
|
||||
|
||||
class Settings(BaseSettings):
|
||||
app_name: str = "Hermes Hub"
|
||||
@@ -38,8 +40,16 @@ class Settings(BaseSettings):
|
||||
hermes_nyora_url: str = os.getenv("HERMES_NYORA_URL", "http://100.86.197.88:3020")
|
||||
hermes_perso_url: str = os.getenv("HERMES_PERSO_URL", "http://100.86.197.88:3031")
|
||||
hermes_nabil_url: str = os.getenv("HERMES_NABIL_URL", "http://hermes-nabil:9119")
|
||||
hermes_dsh_url: str = os.getenv("HERMES_DSH_URL", "http://dsh-vps:3080")
|
||||
dsh_filebrowser_url: str = os.getenv("DSH_FILEBROWSER_URL", "http://dsh-vps-filebrowser:8080")
|
||||
|
||||
# Backend Passwords
|
||||
hermes_tt_password: str = os.getenv("HERMES_TT_PASSWORD", "XiEdCtyWETbzpQ7dxrRyvAYu")
|
||||
hermes_nyora_password: str = os.getenv("HERMES_NYORA_PASSWORD", "juoKPfPGuo39wKCn9WJ0kY0_")
|
||||
hermes_perso_password: str = os.getenv("HERMES_PERSO_PASSWORD", "-6Q12oViKsgZgIL82Kspa_dV")
|
||||
hermes_nabil_username: str = os.getenv("HERMES_NABIL_USERNAME", "nabil")
|
||||
hermes_nabil_password: str = os.getenv("HERMES_NABIL_PASSWORD", "NabilMasterHermes2026!")
|
||||
|
||||
# Hub Secret — OBLIGATOIRE, aucun fallback codé en dur (Fail-Fast au démarrage)
|
||||
hub_secret: str = Field(..., min_length=16, description="Clé secrète maîtresse requise pour Hermes Hub")
|
||||
|
||||
@@ -72,7 +82,8 @@ UNIVERSES: Dict[str, UniverseConfig] = {
|
||||
accent_token="--accent-tt",
|
||||
icon="briefcase",
|
||||
persona_file="tt.yaml",
|
||||
supports_files=False
|
||||
supports_files=False,
|
||||
is_external_app=False
|
||||
),
|
||||
"nyora": UniverseConfig(
|
||||
id="nyora",
|
||||
@@ -84,7 +95,8 @@ UNIVERSES: Dict[str, UniverseConfig] = {
|
||||
accent_token="--accent-nyora",
|
||||
icon="sparkles",
|
||||
persona_file="nyora.yaml",
|
||||
supports_files=False
|
||||
supports_files=False,
|
||||
is_external_app=False
|
||||
),
|
||||
"perso": UniverseConfig(
|
||||
id="perso",
|
||||
@@ -96,20 +108,35 @@ UNIVERSES: Dict[str, UniverseConfig] = {
|
||||
accent_token="--accent-perso",
|
||||
icon="home",
|
||||
persona_file="perso.yaml",
|
||||
supports_files=False
|
||||
supports_files=False,
|
||||
is_external_app=False
|
||||
),
|
||||
"nabil": UniverseConfig(
|
||||
id="nabil",
|
||||
name="Nabil Master",
|
||||
tagline="Orchestration & DSH",
|
||||
description="Master Agent VPS, exécution de code & DeepSeek Harness",
|
||||
tagline="Orchestration & Code",
|
||||
description="Master Agent VPS, exécution de code & supervision DSH",
|
||||
backend_url=os.getenv("HERMES_NABIL_URL", "http://hermes-nabil:9119"),
|
||||
scope="nabil",
|
||||
accent_token="--accent-nabil",
|
||||
icon="terminal",
|
||||
persona_file="nabil.yaml",
|
||||
supports_files=True,
|
||||
files_url=os.getenv("DSH_FILEBROWSER_URL", "http://dsh-vps-filebrowser:8080")
|
||||
files_url=os.getenv("DSH_FILEBROWSER_URL", "http://dsh-vps-filebrowser:8080"),
|
||||
is_external_app=False
|
||||
),
|
||||
"dsh": UniverseConfig(
|
||||
id="dsh",
|
||||
name="DeepSeek Harness",
|
||||
tagline="DSH Autonomous Agent",
|
||||
description="Plateforme DeepSeek Harness : agents autonomes, sous-agents, trajectoires et tâches",
|
||||
backend_url=os.getenv("HERMES_DSH_URL", "http://dsh-vps:3080"),
|
||||
scope="dsh",
|
||||
accent_token="--accent-dsh",
|
||||
icon="cpu",
|
||||
persona_file="dsh.yaml",
|
||||
supports_files=False,
|
||||
is_external_app=True
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user