Advertise service health tool

This commit is contained in:
Meta Vens 2026-06-18 23:39:57 +01:00
commit 76cfe9b6b2
5 changed files with 42 additions and 1 deletions

View file

@ -1488,6 +1488,22 @@ fn main() -> Result<()> {
"local Verse query smoke lost compact Hands repo-action tool contract row"
);
}
if !tool_report.tui_rows.iter().any(|row| {
row.contains("READY")
&& row.contains("Self")
&& row.contains("service-health")
&& row.contains("epiphany.cluster.self.tool.service-health")
&& row.contains("authority=daemon.service_lifecycle")
&& row.contains("input=epiphany.cultmesh.daemon_service_lifecycle_query")
&& row.contains("receiptType=epiphany.cultmesh.daemon_service_lifecycle_receipt")
&& row.contains("allAgents=true")
&& row.contains("receipt=true")
&& row.contains("private=false")
}) {
anyhow::bail!(
"local Verse query smoke lost compact Self service-health tool contract row"
);
}
if DIRECT_INVOKE_TOOL_COMMAND
!= "epiphany-verse-query invoke-tool --capability-id <capability>"
|| !WRAPPER_INVOKE_TOOL_COMMAND.contains("-Mode tool-invoke")

View file

@ -5102,6 +5102,17 @@ pub fn epiphany_cultmesh_daemon_tool_capabilities() -> Vec<EpiphanyCultMeshDaemo
"imagination.consensus_discovery",
));
}
capabilities.push(epiphany_cultmesh_daemon_tool_capability(
&epiphany_cultmesh_cluster_topology()
.into_iter()
.find(|cluster| cluster.cluster_id == "epiphany.cluster.self")
.expect("self cluster topology exists"),
"service-health",
"readServiceLifecycleStatus",
"epiphany.cultmesh.daemon_service_lifecycle_query",
EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_TYPE,
"daemon.service_lifecycle",
));
capabilities.push(epiphany_cultmesh_daemon_tool_capability(
&epiphany_cultmesh_cluster_topology()
.into_iter()
@ -6710,6 +6721,9 @@ mod tests {
let persona_status = node.get_required::<EpiphanyCultMeshDaemonToolCapabilityEntry>(
"epiphany.cluster.persona.tool.status",
)?;
let self_service_health = node.get_required::<EpiphanyCultMeshDaemonToolCapabilityEntry>(
"epiphany.cluster.self.tool.service-health",
)?;
let hands_action = node.get_required::<EpiphanyCultMeshDaemonToolCapabilityEntry>(
"epiphany.cluster.hands.tool.repo-action",
)?;
@ -6719,6 +6733,7 @@ mod tests {
for capability in [
persona_status.clone(),
self_service_health.clone(),
hands_action.clone(),
soul_verify.clone(),
] {
@ -6730,6 +6745,15 @@ mod tests {
assert_eq!(hands_action.authority_gate, "hands");
assert_eq!(soul_verify.authority_gate, "soul");
assert_eq!(persona_status.authority_gate, "none");
assert_eq!(self_service_health.authority_gate, "daemon.service_lifecycle");
assert_eq!(
self_service_health.input_contract_type,
"epiphany.cultmesh.daemon_service_lifecycle_query"
);
assert_eq!(
self_service_health.receipt_contract_type,
EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_TYPE
);
assert!(
hands_action
.notes