Add generic Bifrost Persona bridge mouth

This commit is contained in:
Meta Vens 2026-06-22 16:36:40 +01:00
commit ef729787fd
8 changed files with 1229 additions and 7 deletions

View file

@ -837,7 +837,7 @@ fn collect_coordinator_status(
"8",
],
)?;
let latest_persona = status_cli::native_json(
let latest_discord_persona = status_cli::native_json(
"epiphany-persona-discord",
&[
"latest",
@ -848,6 +848,29 @@ fn collect_coordinator_status(
],
)
.unwrap_or_else(|_| json!({"latestArtifacts": []}));
let latest_other_persona = status_cli::native_json(
"epiphany-persona-other",
&[
"latest",
"--artifact-dir",
&persona_dir.to_string_lossy(),
"--limit",
"8",
],
)
.unwrap_or_else(|_| json!({"latestArtifacts": []}));
let mut latest_artifacts = latest_discord_persona
.get("latestArtifacts")
.and_then(Value::as_array)
.cloned()
.unwrap_or_default();
latest_artifacts.extend(
latest_other_persona
.get("latestArtifacts")
.and_then(Value::as_array)
.cloned()
.unwrap_or_default(),
);
Ok(json!({
"threadId": thread_id,
"read": read,
@ -866,8 +889,8 @@ fn collect_coordinator_status(
"persona": {
"status": "ready",
"artifactDir": persona_dir,
"latestArtifacts": latest_persona.get("latestArtifacts").cloned().unwrap_or_else(|| json!([])),
"availableActions": ["PersonaBubble", "characterTurn"],
"latestArtifacts": latest_artifacts,
"availableActions": ["PersonaBubble", "characterTurn", "discordPersonaPost", "redditPersonaPost", "otherWorldPersonaRequest"],
},
}))
}

View file

@ -316,8 +316,17 @@ fn validate_status(status: &Value, rendered: &str) -> Result<()> {
&& items
.iter()
.any(|item| item.as_str() == Some("characterTurn"))
&& items
.iter()
.any(|item| item.as_str() == Some("discordPersonaPost"))
&& items
.iter()
.any(|item| item.as_str() == Some("redditPersonaPost"))
&& items
.iter()
.any(|item| item.as_str() == Some("otherWorldPersonaRequest"))
}),
"status view should expose Persona bubble and character-turn actions for Aquarium",
"status view should expose Persona bubble, character-turn, and Bifrost-routed public mouth actions for Aquarium",
)?;
require(
rendered.contains("Heartbeat") && rendered.contains("Persona"),

View file

@ -670,7 +670,7 @@ fn native_auxiliary_status(root: &Path) -> Result<NativeAuxiliaryStatus> {
"8",
],
)?;
let latest_persona = native_json(
let latest_discord_persona = native_json(
"epiphany-persona-discord",
&[
"latest",
@ -683,11 +683,36 @@ fn native_auxiliary_status(root: &Path) -> Result<NativeAuxiliaryStatus> {
.unwrap_or_else(
|error| json!({"status": "error", "error": error.to_string(), "latestArtifacts": []}),
);
let latest_other_persona = native_json(
"epiphany-persona-other",
&[
"latest",
"--artifact-dir",
&persona_dir.to_string_lossy(),
"--limit",
"8",
],
)
.unwrap_or_else(
|error| json!({"status": "error", "error": error.to_string(), "latestArtifacts": []}),
);
let mut latest_artifacts = latest_discord_persona
.get("latestArtifacts")
.and_then(Value::as_array)
.cloned()
.unwrap_or_default();
latest_artifacts.extend(
latest_other_persona
.get("latestArtifacts")
.and_then(Value::as_array)
.cloned()
.unwrap_or_default(),
);
let persona = json!({
"status": "ready",
"artifactDir": persona_dir,
"latestArtifacts": latest_persona.get("latestArtifacts").cloned().unwrap_or_else(|| json!([])),
"availableActions": ["personaBubble", "characterTurn", "discordPersonaPost"],
"latestArtifacts": latest_artifacts,
"availableActions": ["personaBubble", "characterTurn", "discordPersonaPost", "redditPersonaPost", "otherWorldPersonaRequest"],
});
let void_memory = native_json(
"epiphany-void-memory",

File diff suppressed because it is too large Load diff