feat: implement service management API for VLM control

- Add /api/v1/mbe/health endpoint for status checks
- Add /api/v2/service/start to start llama-server
- Add /api/v2/service/stop to stop llama-server
- Use TCP connection test for port detection (more reliable than lsof)
- Add ps aux fallback for PID detection
- Implement structured bilingual VLM tags
- Add VLM integration documentation for Studio team

Endpoints tested and working with Momentry Studio AdminView UI.
This commit is contained in:
Accusys
2026-10-24 02:37:53 +08:00
parent d14cd9f3de
commit c151b49334
33 changed files with 3175 additions and 229 deletions
+30 -1
View File
@@ -785,6 +785,35 @@ pub struct SceneConfig {
pub samples_per_interval: usize,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct VlmTag {
pub en: String,
pub local: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(untagged)]
pub enum VlmTagValue {
Structured(VlmTag),
String(String),
}
impl VlmTagValue {
pub fn en(&self) -> &str {
match self {
Self::Structured(t) => &t.en,
Self::String(s) => s,
}
}
pub fn local(&self) -> &str {
match self {
Self::Structured(t) => &t.local,
Self::String(_) => "",
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SceneFrame {
pub index: usize,
@@ -834,7 +863,7 @@ pub struct SceneFrame {
pub vlm_attributes: Option<SceneAttributes>,
#[serde(default)]
pub vlm_tags: Vec<String>,
pub vlm_tags: Vec<VlmTagValue>,
pub embedding_status: EmbeddingStatus,
}