feat: integrate DSH Filebrowser (pinned v2.32.0, dark mode, toggle selector UI from Claude Design, /u/nabil/files/ proxy)

This commit is contained in:
bolbol
2026-08-19 23:29:25 +01:00
parent 4923aa380e
commit 098e377d27
7 changed files with 218 additions and 17 deletions
+13 -6
View File
@@ -1,6 +1,6 @@
import os
from pathlib import Path
from typing import Dict, Any, List
from typing import Dict, Any, List, Optional
from pydantic import BaseModel, Field, field_validator
from pydantic_settings import BaseSettings
@@ -20,6 +20,8 @@ class UniverseConfig(BaseModel):
icon: str
persona_file: str
enabled: bool = True
supports_files: bool = False
files_url: Optional[str] = None
class Settings(BaseSettings):
app_name: str = "Hermes Hub"
@@ -36,6 +38,7 @@ 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://127.0.0.1:8642")
dsh_filebrowser_url: str = os.getenv("DSH_FILEBROWSER_URL", "http://127.0.0.1:8901")
# 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")
@@ -58,7 +61,6 @@ except Exception as e:
# but runtime will fail fast if HUB_SECRET is absent
if "HUB_SECRET" in os.environ:
raise e
# Fallback only if running build/compile check with dummy env
settings = None
UNIVERSES: Dict[str, UniverseConfig] = {
@@ -71,7 +73,8 @@ UNIVERSES: Dict[str, UniverseConfig] = {
scope="tt",
accent_token="--accent-tt",
icon="briefcase",
persona_file="tt.yaml"
persona_file="tt.yaml",
supports_files=False
),
"nyora": UniverseConfig(
id="nyora",
@@ -82,7 +85,8 @@ UNIVERSES: Dict[str, UniverseConfig] = {
scope="nyora",
accent_token="--accent-nyora",
icon="sparkles",
persona_file="nyora.yaml"
persona_file="nyora.yaml",
supports_files=False
),
"perso": UniverseConfig(
id="perso",
@@ -93,7 +97,8 @@ UNIVERSES: Dict[str, UniverseConfig] = {
scope="perso",
accent_token="--accent-perso",
icon="home",
persona_file="perso.yaml"
persona_file="perso.yaml",
supports_files=False
),
"nabil": UniverseConfig(
id="nabil",
@@ -104,7 +109,9 @@ UNIVERSES: Dict[str, UniverseConfig] = {
scope="nabil",
accent_token="--accent-nabil",
icon="terminal",
persona_file="nabil.yaml"
persona_file="nabil.yaml",
supports_files=True,
files_url=os.getenv("DSH_FILEBROWSER_URL", "http://127.0.0.1:8901")
)
}