diff --git a/epiphany-core/src/bin/epiphany-cluster-daemon.rs b/epiphany-core/src/bin/epiphany-cluster-daemon.rs index 9ed10b36..482b5441 100644 --- a/epiphany-core/src/bin/epiphany-cluster-daemon.rs +++ b/epiphany-core/src/bin/epiphany-cluster-daemon.rs @@ -6,7 +6,6 @@ use epiphany_core::EPIPHANY_CULTMESH_DAEMON_STATUS_SCHEMA_VERSION; use epiphany_core::EpiphanyCultMeshDaemonHeartbeatEventEntry; use epiphany_core::EpiphanyCultMeshDaemonStatusEntry; use epiphany_core::load_epiphany_cultmesh_cluster_topology; -use epiphany_core::publish_epiphany_cultmesh_provider_state; use epiphany_core::write_epiphany_cultmesh_daemon_heartbeat_event; use epiphany_core::write_epiphany_cultmesh_daemon_status; use serde_json::json; @@ -56,11 +55,6 @@ fn write_heartbeat( args.daemon_id ) })?; - publish_epiphany_cultmesh_provider_state( - &args.store, - args.runtime_id.clone(), - &args.daemon_id, - )?; let heartbeat_at = Utc::now().to_rfc3339(); let heartbeat = new_heartbeat_event( args, @@ -237,6 +231,8 @@ impl Args { #[cfg(test)] mod tests { use super::*; + use epiphany_core::query_epiphany_local_verse_context; + use epiphany_core::seed_epiphany_local_verse_context; #[test] fn process_heartbeat_events_keep_one_incarnation_and_increment_sequence() { @@ -270,4 +266,29 @@ mod tests { assert_ne!(first.heartbeat_id, second.heartbeat_id); assert_eq!(first.startup_lifecycle_receipt_id, "receipt-test"); } + + #[test] + fn heartbeat_writes_liveness_without_minting_provider_truth() -> Result<()> { + let temp = tempfile::tempdir()?; + let store = temp.path().join("heartbeat-only.ccmp"); + seed_epiphany_local_verse_context(&store, "runtime-test", "2026-07-15T12:00:00Z")?; + let args = Args { + command: "heartbeat".to_string(), + store: store.clone(), + runtime_id: "runtime-test".to_string(), + daemon_id: "epiphany-daemon-hands".to_string(), + interval_seconds: 1, + max_iterations: 1, + provider_incarnation: "incarnation-test".to_string(), + startup_lifecycle_receipt_id: "receipt-test".to_string(), + }; + + write_heartbeat(&args, 0)?; + let context = query_epiphany_local_verse_context(&store, "runtime-test")?; + assert_eq!(context.daemon_statuses.len(), 1); + assert!(context.odin_advertisements.is_empty()); + assert!(context.eve_surface_states.is_empty()); + assert!(context.daemon_tool_capabilities.is_empty()); + Ok(()) + } } diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index bc945f25..cdfd0638 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -83,7 +83,6 @@ use epiphany_core::load_latest_epiphany_cultmesh_repo_work_readiness; use epiphany_core::native_process_executable_path; use epiphany_core::observe_native_process; use epiphany_core::open_epiphany_cultmesh_node; -use epiphany_core::publish_epiphany_cultmesh_provider_state; use epiphany_core::query_epiphany_local_verse_context; use epiphany_core::seed_epiphany_local_verse_context; use epiphany_core::write_epiphany_cultmesh_agent_state_soa_summary; @@ -111,12 +110,6 @@ const DIRECT_MANAGED_SERVICE_SIGHT_COMMAND: &str = "epiphany-verse-query managed const WRAPPER_SWARM_ONLINE_RUNBOOK_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode swarm-online-runbook"; const WRAPPER_POKE_NON_READY_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode swarm-poke-down"; -const DIRECT_INVOKE_TOOL_COMMAND: &str = - "epiphany-verse-query invoke-tool --capability-id "; -const WRAPPER_INVOKE_TOOL_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId -ToolRequestingAgentId -ToolRequestingClusterId "; -const WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode tool-invoke -ToolCapabilityId epiphany.cluster.self.tool.swarm-online-runbook -ToolRequestingAgentId -ToolRequestingClusterId "; -const WRAPPER_CONNECT_EVE_COMMAND: &str = - "tools/epiphany_local_run.ps1 -Mode eve-connect -EveTargetClusterId "; const WRAPPER_COLLABORATION_FEEDBACK_COMMAND: &str = "tools/epiphany_local_run.ps1 -Mode collaboration-feedback"; const WRAPPER_BIFROST_PUBLICATION_COMMAND: &str = @@ -437,8 +430,9 @@ fn run_cli() -> Result<()> { "toolCount": report.rows.len(), "hostReadyCount": report.host_ready_count, "hostAttentionCount": report.host_attention_count, - "invocationCommand": DIRECT_INVOKE_TOOL_COMMAND, - "wrapperInvocationCommand": WRAPPER_INVOKE_TOOL_COMMAND, + "invocationCommand": null, + "wrapperInvocationCommand": null, + "availabilityReason": "no provenance-bearing provider capability contract", "wrapperMode": "tools/epiphany_local_run.ps1 -Mode tool-directory", "privateStateExposed": false, "invariants": { @@ -811,7 +805,8 @@ fn run_cli() -> Result<()> { "repoWorkQueueCount": report.repo_work_queue_count, "repoWorkQueueRows": report.repo_work_queue_rows, "repoWorkQueueTuiRows": report.repo_work_queue_tui_rows, - "connectionCommand": "epiphany-verse-query connect-eve --target-cluster-id ", + "connectionCommand": null, + "availabilityReason": "no provenance-bearing provider advertisement contract", "privateStateExposed": false, "rows": report.rows, "tuiRows": report.tui_rows, @@ -837,13 +832,8 @@ fn run_cli() -> Result<()> { "wrapperReceipts": WRAPPER_RECEIPT_DIRECTORY_COMMAND, "wrapperRestartPolicies": WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND, "wrapperPokeNonReady": WRAPPER_POKE_NON_READY_COMMAND, - "connectEve": "epiphany-verse-query connect-eve --target-cluster-id ", - "wrapperConnectEve": WRAPPER_CONNECT_EVE_COMMAND, "bifrostLedger": "epiphany-verse-query bifrost-ledger", "wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, - "invokeTool": DIRECT_INVOKE_TOOL_COMMAND, - "wrapperInvokeTool": WRAPPER_INVOKE_TOOL_COMMAND, - "wrapperInvokeSwarmOnlineRunbookTool": WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND }); println!( "{}", @@ -1202,7 +1192,6 @@ fn run_cli() -> Result<()> { "adoptionGate": null, "responseOwner": "Imagination", "commands": { - "connectEve": WRAPPER_CONNECT_EVE_COMMAND, "bifrostPublication": DIRECT_BIFROST_PUBLICATION_COMMAND, "wrapperBifrostPublication": WRAPPER_BIFROST_PUBLICATION_COMMAND, "wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, @@ -1236,7 +1225,7 @@ fn run_cli() -> Result<()> { advertisement.advertisement_id == advertisement_id }) .with_context(|| { - format!("local Verse has no Odin advertisement {advertisement_id:?}") + format!("connect-eve unavailable: no provenance-bearing Odin advertisement {advertisement_id:?}") })? } else { let target_cluster_id = args @@ -1250,7 +1239,7 @@ fn run_cli() -> Result<()> { }) .with_context(|| { format!( - "local Verse has no Odin advertisement for cluster {target_cluster_id:?}" + "connect-eve unavailable: no provenance-bearing Odin advertisement for cluster {target_cluster_id:?}" ) })? }; @@ -1327,15 +1316,6 @@ fn run_cli() -> Result<()> { args.runtime_id.clone(), "2026-06-02T00:00:00Z", )?; - for cluster in - load_epiphany_cultmesh_cluster_topology(&args.store, args.runtime_id.clone())? - { - publish_epiphany_cultmesh_provider_state( - &args.store, - args.runtime_id.clone(), - &cluster.daemon_id, - )?; - } seed_quarantined_smoke_daemon_statuses(&args)?; let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?; let ready_liveness = @@ -1369,19 +1349,8 @@ fn run_cli() -> Result<()> { let (_latest_repo_work_overview, repo_work_overviews) = load_repo_work_overview_queue(&args)?; let eve_report = eve_surface_report(&eve_directory, &repo_work_overviews); - if eve_report.rows.len() != 7 || eve_report.public_discussion_count != 1 { - anyhow::bail!( - "local Verse query smoke expected seven Eve surfaces and one public discussion surface" - ); - } - if !eve_report.tui_rows.iter().any(|row| { - row.contains("PUBLIC") - && row.contains("Persona") - && row.contains("eve://epiphany/persona") - }) { - anyhow::bail!( - "local Verse query smoke lost compact PUBLIC Persona Eve surface row" - ); + if !eve_report.rows.is_empty() || eve_report.public_discussion_count != 0 { + anyhow::bail!("local Verse query smoke accepted ownerless Eve provider state"); } if context.verse_policies.len() != 3 { anyhow::bail!("local Verse query smoke expected three Verse policies"); @@ -1425,136 +1394,16 @@ fn run_cli() -> Result<()> { }) { anyhow::bail!("local Verse query smoke lost Persona Eve topology"); } - if context.odin_advertisements.len() != 7 { - anyhow::bail!("local Verse query smoke expected seven Odin advertisements"); - } - if !context.odin_advertisements.iter().any(|advertisement| { - advertisement.cluster_id == "epiphany.cluster.persona" - && advertisement.eve_surface_id == "eve://epiphany/persona" - && !advertisement.private_state_exposed - }) { - anyhow::bail!("local Verse query smoke lost safe Persona Odin advertisement"); - } - let persona_advertisement = context - .odin_advertisements - .iter() - .find(|advertisement| advertisement.cluster_id == "epiphany.cluster.persona") - .context("missing Persona Odin advertisement")?; - let intent = epiphany_cultmesh_eve_connection_intent_from_advertisement( - "eve-intent-smoke", - "epiphany.cluster.self", - persona_advertisement, - "Smoke-test compact Eve collaboration discovery.", - "requestDiscussion", - ); - write_epiphany_cultmesh_eve_connection_intent( - &args.store, - args.runtime_id.clone(), - intent.clone(), - )?; - let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?; - if context.latest_eve_connection_intent.is_none() - || context.latest_eve_connection_receipt.is_some() + if !context.odin_advertisements.is_empty() + || !context.daemon_tool_capabilities.is_empty() { - anyhow::bail!( - "local Verse query smoke lost Eve intent or manufactured a provider receipt" - ); - } - if context.daemon_tool_capabilities.len() < 19 { - anyhow::bail!("local Verse query smoke expected daemon tool capabilities"); - } - if !context.daemon_tool_capabilities.iter().all(|capability| { - capability.available_to_all_agents - && capability.requires_receipt - && !capability.private_state_exposed - }) { - anyhow::bail!( - "local Verse query smoke found a daemon tool that is not globally available, receipt-gated, and private-state sealed" - ); + anyhow::bail!("local Verse query smoke accepted ownerless provider claims"); } let tool_directory = load_epiphany_cultmesh_daemon_tool_directory(&args.store, args.runtime_id.clone())?; let tool_report = daemon_tool_directory_report(&tool_directory); - if tool_report.rows.len() < 19 || tool_report.host_attention_count != 0 { - anyhow::bail!( - "local Verse query smoke expected globally visible tools hosted by ready daemons" - ); - } - if !tool_report.tui_rows.iter().any(|row| { - row.contains("READY") - && row.contains("Hands") - && row.contains("repo-action") - && row.contains("epiphany.cluster.hands.tool.repo-action") - && row.contains("authority=hands") - && row.contains("input=epiphany.hands.action_intent") - && row.contains("receiptType=epiphany.hands.action_review") - && row.contains("allAgents=true") - && row.contains("receipt=true") - && row.contains("private=false") - }) { - anyhow::bail!( - "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 !tool_report.tui_rows.iter().any(|row| { - row.contains("READY") - && row.contains("Self") - && row.contains("service-policy-directory") - && row.contains("epiphany.cluster.self.tool.service-policy-directory") - && row.contains("authority=daemon.service_lifecycle") - && row.contains("input=epiphany.cultmesh.daemon_restart_policy_directory_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-policy-directory tool contract row" - ); - } - if !tool_report.tui_rows.iter().any(|row| { - row.contains("READY") - && row.contains("Self") - && row.contains("swarm-online-runbook") - && row.contains("epiphany.cluster.self.tool.swarm-online-runbook") - && row.contains("authority=daemon.service_lifecycle") - && row.contains("input=epiphany.cultmesh.daemon_service_online_runbook_request") - && 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 swarm-online-runbook tool contract row" - ); - } - if DIRECT_INVOKE_TOOL_COMMAND - != "epiphany-verse-query invoke-tool --capability-id " - || !WRAPPER_INVOKE_TOOL_COMMAND.contains("-Mode tool-invoke") - || !WRAPPER_INVOKE_TOOL_COMMAND.contains("-ToolCapabilityId ") - { - anyhow::bail!( - "local Verse query smoke lost compact tool-directory invocation command hints" - ); + if !tool_report.rows.is_empty() || tool_report.host_attention_count != 0 { + anyhow::bail!("local Verse query smoke accepted ownerless tool capabilities"); } let overview_liveness = load_epiphany_cultmesh_daemon_liveness(&args.store, args.runtime_id.clone())?; @@ -1573,29 +1422,13 @@ fn run_cli() -> Result<()> { || topology_report.rows.len() != 7 || topology_report.private_verse_count != 7 || topology_report.daemon_count != 7 - || overview_surface_report.rows.len() != 7 - || overview_surface_report.public_discussion_count != 1 - || overview_tool_report.rows.len() < 18 + || !overview_surface_report.rows.is_empty() + || overview_surface_report.public_discussion_count != 0 + || !overview_tool_report.rows.is_empty() || overview_tool_report.host_attention_count != 0 { anyhow::bail!("local Verse query smoke lost compact swarm overview invariants"); } - if !overview_surface_report.tui_rows.iter().any(|row| { - row.contains("PUBLIC") - && row.contains("Persona") - && row.contains("cluster=epiphany.cluster.persona") - && row.contains("surface=eve://epiphany/persona") - && row.contains("daemon=epiphany-daemon-persona") - && row.contains("privateVerse=epiphany.cluster.persona.private") - && row.contains("publicDiscussion=true") - && row.contains("actions=inspectCompactSurface,submitEveConnectionIntent,watchTypedReceipts") - && row.contains("gamecult.bifrost.collaboration_feedback") - && row.contains("private=false") - }) { - anyhow::bail!( - "local Verse query smoke lost compact Persona Eve surface routing row" - ); - } let ready_overview = load_swarm_overview_report(&args)?; if ready_overview.liveness_status != "ready" || ready_overview.recovery_status != "attention" @@ -1638,17 +1471,9 @@ fn run_cli() -> Result<()> { }) { anyhow::bail!("local Verse query smoke lost swarm overview topology row"); } - if !WRAPPER_INVOKE_TOOL_COMMAND.contains("-Mode tool-invoke") - || !WRAPPER_INVOKE_TOOL_COMMAND.contains("-ToolCapabilityId ") - || DIRECT_INVOKE_TOOL_COMMAND - != "epiphany-verse-query invoke-tool --capability-id " - || !WRAPPER_CONNECT_EVE_COMMAND.contains("-Mode eve-connect") - || !WRAPPER_BIFROST_LEDGER_COMMAND.contains("-Mode bifrost-ledger") + if !WRAPPER_BIFROST_LEDGER_COMMAND.contains("-Mode bifrost-ledger") || !WRAPPER_RECEIPT_DIRECTORY_COMMAND.contains("-Mode receipt-directory") || !WRAPPER_SWARM_ONLINE_RUNBOOK_COMMAND.contains("-Mode swarm-online-runbook") - || !WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND.contains("-Mode tool-invoke") - || !WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND - .contains("-ToolCapabilityId epiphany.cluster.self.tool.swarm-online-runbook") || !WRAPPER_SERVICE_TICK_COMMAND.contains("-Mode service-tick") || !WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND .contains("-Mode service-policy-directory") @@ -1735,387 +1560,6 @@ fn run_cli() -> Result<()> { "local Verse query smoke let a disabled daemon restart policy masquerade as recovery readiness" ); } - let hands_repo_action = context - .daemon_tool_capabilities - .iter() - .find(|capability| { - capability.capability_id == "epiphany.cluster.hands.tool.repo-action" - }) - .context("missing Hands repo-action daemon tool capability")?; - let tool_intent = epiphany_cultmesh_daemon_tool_invocation_intent_from_capability( - "daemon-tool-intent-smoke", - "epiphany.Persona", - "epiphany.cluster.persona", - hands_repo_action, - "cultmesh://epiphany-local/hands-action-intent/smoke", - "Persona requests Hands repo-action review through the globally advertised daemon tool directory.", - ); - write_epiphany_cultmesh_daemon_tool_invocation_intent( - &args.store, - args.runtime_id.clone(), - tool_intent.clone(), - )?; - let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?; - if context.latest_daemon_tool_invocation_intent.is_none() - || context.latest_daemon_tool_invocation_receipt.is_some() - { - anyhow::bail!( - "local Verse query smoke lost daemon tool intent or manufactured a host receipt" - ); - } - let persona_cluster = cluster_topology_for_id(&context, "epiphany.cluster.persona")?; - let hands_cluster = cluster_topology_for_id(&context, "epiphany.cluster.hands")?; - let tool_invocation_tui_row = - daemon_tool_invocation_tui_row(DaemonToolInvocationTuiFields { - requester: &persona_cluster.display_name, - requesting_agent_id: "epiphany.Persona", - requesting_private_verse: &persona_cluster.private_verse_id, - requesting_surface: &persona_cluster.eve_surface_id, - host: &hands_cluster.display_name, - host_daemon_id: &hands_repo_action.host_daemon_id, - host_private_verse: &hands_cluster.private_verse_id, - host_surface: &hands_cluster.eve_surface_id, - capability_id: &hands_repo_action.capability_id, - tool_name: &hands_repo_action.tool_name, - operation: &hands_repo_action.operation, - intent_id: "daemon-tool-intent-smoke", - receipt_id: "daemon-tool-receipt-smoke", - receipt_status: "accepted-for-hands-review", - receipt_contract_type: &hands_repo_action.receipt_contract_type, - result_ref: "cultmesh://epiphany-local/hands-action-review/smoke", - authority_gate: &hands_repo_action.authority_gate, - all_agents: hands_repo_action.available_to_all_agents, - requires_receipt: hands_repo_action.requires_receipt, - private_state_exposed: false, - }); - if !tool_invocation_tui_row.contains("INVOKE") - || !tool_invocation_tui_row.contains("Persona") - || !tool_invocation_tui_row.contains("host=Hands") - || !tool_invocation_tui_row.contains("hostDaemon=epiphany-daemon-hands") - || !tool_invocation_tui_row - .contains("requestPrivateVerse=epiphany.cluster.persona.private") - || !tool_invocation_tui_row - .contains("hostPrivateVerse=epiphany.cluster.hands.private") - || !tool_invocation_tui_row - .contains("capability=epiphany.cluster.hands.tool.repo-action") - || !tool_invocation_tui_row.contains("receipt=daemon-tool-receipt-smoke") - || !tool_invocation_tui_row.contains("allAgents=true") - || !tool_invocation_tui_row.contains("receiptRequired=true") - || !tool_invocation_tui_row.contains("private=false") - { - anyhow::bail!( - "local Verse query smoke lost compact daemon tool invocation routing row" - ); - } - let (hands_authority_readback, hands_authority_private_state_exposed) = - authority_tool_readback_from_capability(hands_cluster, hands_repo_action); - if hands_authority_readback["authorityGate"].as_str() != Some("hands") - || hands_authority_readback["hostClusterId"].as_str() - != Some("epiphany.cluster.hands") - || hands_authority_readback["toolName"].as_str() != Some("repo-action") - || hands_authority_readback["inputContractType"].as_str() - != Some("epiphany.hands.action_intent") - || hands_authority_readback["receiptContractType"].as_str() - != Some("epiphany.hands.action_review") - || hands_authority_readback["intentRoute"].as_str() - != Some( - "cultmesh://epiphany-local/authority/hands/epiphany.cluster.hands.tool.repo-action/intent", - ) - || hands_authority_readback["receiptRoute"].as_str() - != Some( - "cultmesh://epiphany-local/authority/hands/epiphany.cluster.hands.tool.repo-action/receipt", - ) - || hands_authority_readback["privateStateExposed"].as_bool() != Some(false) - || hands_authority_private_state_exposed - { - anyhow::bail!( - "local Verse query smoke lost Hands authority-tool readback contract" - ); - } - let soul_verify = context - .daemon_tool_capabilities - .iter() - .find(|capability| capability.capability_id == "epiphany.cluster.soul.tool.verify") - .context("missing Soul verify daemon tool capability")?; - let soul_cluster = cluster_topology_for_id(&context, "epiphany.cluster.soul")?; - let (soul_authority_readback, soul_authority_private_state_exposed) = - authority_tool_readback_from_capability(soul_cluster, soul_verify); - if soul_authority_readback["authorityGate"].as_str() != Some("soul") - || soul_authority_readback["hostClusterId"].as_str() - != Some("epiphany.cluster.soul") - || soul_authority_readback["toolName"].as_str() != Some("verify") - || soul_authority_readback["inputContractType"].as_str() - != Some("epiphany.soul.verification_request") - || soul_authority_readback["receiptContractType"].as_str() - != Some("epiphany.soul.verdict_receipt") - || soul_authority_readback["privateStateExposed"].as_bool() != Some(false) - || soul_authority_private_state_exposed - { - anyhow::bail!("local Verse query smoke lost Soul authority-tool readback contract"); - } - let service_health = context - .daemon_tool_capabilities - .iter() - .find(|capability| { - capability.capability_id == "epiphany.cluster.self.tool.service-health" - }) - .context("missing Self service-health daemon tool capability")?; - let service_health_receipt_status = default_daemon_tool_receipt_status(service_health); - let service_health_result_ref = default_daemon_tool_result_ref( - service_health, - "daemon-tool-receipt-service-health-smoke", - ); - let service_health_row = - daemon_tool_invocation_tui_row(DaemonToolInvocationTuiFields { - requester: "Persona", - requesting_agent_id: "epiphany.Persona", - requesting_private_verse: "epiphany.cluster.persona.private", - requesting_surface: "eve://epiphany/persona", - host: "Self", - host_daemon_id: &service_health.host_daemon_id, - host_private_verse: "epiphany.cluster.self.private", - host_surface: "eve://epiphany/self", - capability_id: &service_health.capability_id, - tool_name: &service_health.tool_name, - operation: &service_health.operation, - intent_id: "daemon-tool-intent-service-health-smoke", - receipt_id: "daemon-tool-receipt-service-health-smoke", - receipt_status: &service_health_receipt_status, - receipt_contract_type: &service_health.receipt_contract_type, - result_ref: &service_health_result_ref, - authority_gate: &service_health.authority_gate, - all_agents: service_health.available_to_all_agents, - requires_receipt: service_health.requires_receipt, - private_state_exposed: false, - }); - if !service_health_row.contains("tool=service-health") - || !service_health_row.contains("host=Self") - || !service_health_row.contains("operation=readServiceLifecycleStatus") - || !service_health_row - .contains("receiptStatus=accepted-for-service-lifecycle-readback") - || !service_health_row - .contains("receiptType=epiphany.cultmesh.daemon_service_lifecycle_receipt") - || !service_health_row.contains( - "resultRef=cultmesh://epiphany-local/daemon-service-lifecycle/receipt-directory", - ) - || !service_health_row.contains("authority=daemon.service_lifecycle") - || !service_health_row.contains("allAgents=true") - || !service_health_row.contains("receiptRequired=true") - || !service_health_row.contains("private=false") - { - anyhow::bail!( - "local Verse query smoke lost service-health daemon tool readback route" - ); - } - let service_policy_directory = context - .daemon_tool_capabilities - .iter() - .find(|capability| { - capability.capability_id - == "epiphany.cluster.self.tool.service-policy-directory" - }) - .context("missing Self service-policy-directory daemon tool capability")?; - let service_policy_directory_receipt_status = - default_daemon_tool_receipt_status(service_policy_directory); - let service_policy_directory_result_ref = default_daemon_tool_result_ref( - service_policy_directory, - "daemon-tool-receipt-service-policy-directory-smoke", - ); - let service_policy_directory_row = - daemon_tool_invocation_tui_row(DaemonToolInvocationTuiFields { - requester: "Persona", - requesting_agent_id: "epiphany.Persona", - requesting_private_verse: "epiphany.cluster.persona.private", - requesting_surface: "eve://epiphany/persona", - host: "Self", - host_daemon_id: &service_policy_directory.host_daemon_id, - host_private_verse: "epiphany.cluster.self.private", - host_surface: "eve://epiphany/self", - capability_id: &service_policy_directory.capability_id, - tool_name: &service_policy_directory.tool_name, - operation: &service_policy_directory.operation, - intent_id: "daemon-tool-intent-service-policy-directory-smoke", - receipt_id: "daemon-tool-receipt-service-policy-directory-smoke", - receipt_status: &service_policy_directory_receipt_status, - receipt_contract_type: &service_policy_directory.receipt_contract_type, - result_ref: &service_policy_directory_result_ref, - authority_gate: &service_policy_directory.authority_gate, - all_agents: service_policy_directory.available_to_all_agents, - requires_receipt: service_policy_directory.requires_receipt, - private_state_exposed: false, - }); - if !service_policy_directory_row.contains("tool=service-policy-directory") - || !service_policy_directory_row.contains("host=Self") - || !service_policy_directory_row.contains("operation=readServicePolicyDirectory") - || !service_policy_directory_row - .contains("receiptStatus=accepted-for-service-policy-directory-readback") - || !service_policy_directory_row - .contains("receiptType=epiphany.cultmesh.daemon_service_lifecycle_receipt") - || !service_policy_directory_row.contains( - "resultRef=cultmesh://epiphany-local/daemon-service-lifecycle/service-policy-directory", - ) - || !service_policy_directory_row.contains("authority=daemon.service_lifecycle") - || !service_policy_directory_row.contains("allAgents=true") - || !service_policy_directory_row.contains("receiptRequired=true") - || !service_policy_directory_row.contains("private=false") - { - anyhow::bail!( - "local Verse query smoke lost service-policy-directory daemon tool readback route" - ); - } - let swarm_online_runbook = context - .daemon_tool_capabilities - .iter() - .find(|capability| { - capability.capability_id == "epiphany.cluster.self.tool.swarm-online-runbook" - }) - .context("missing Self swarm-online-runbook daemon tool capability")?; - let swarm_online_runbook_receipt_status = - default_daemon_tool_receipt_status(swarm_online_runbook); - let swarm_online_runbook_result_ref = default_daemon_tool_result_ref( - swarm_online_runbook, - "daemon-tool-receipt-swarm-online-runbook-smoke", - ); - let swarm_online_runbook_row = - daemon_tool_invocation_tui_row(DaemonToolInvocationTuiFields { - requester: "Persona", - requesting_agent_id: "epiphany.Persona", - requesting_private_verse: "epiphany.cluster.persona.private", - requesting_surface: "eve://epiphany/persona", - host: "Self", - host_daemon_id: &swarm_online_runbook.host_daemon_id, - host_private_verse: "epiphany.cluster.self.private", - host_surface: "eve://epiphany/self", - capability_id: &swarm_online_runbook.capability_id, - tool_name: &swarm_online_runbook.tool_name, - operation: &swarm_online_runbook.operation, - intent_id: "daemon-tool-intent-swarm-online-runbook-smoke", - receipt_id: "daemon-tool-receipt-swarm-online-runbook-smoke", - receipt_status: &swarm_online_runbook_receipt_status, - receipt_contract_type: &swarm_online_runbook.receipt_contract_type, - result_ref: &swarm_online_runbook_result_ref, - authority_gate: &swarm_online_runbook.authority_gate, - all_agents: swarm_online_runbook.available_to_all_agents, - requires_receipt: swarm_online_runbook.requires_receipt, - private_state_exposed: false, - }); - if !swarm_online_runbook_row.contains("tool=swarm-online-runbook") - || !swarm_online_runbook_row.contains("host=Self") - || !swarm_online_runbook_row.contains("operation=prepareSwarmOnlineRunbook") - || !swarm_online_runbook_row - .contains("receiptStatus=accepted-for-swarm-online-runbook-readback") - || !swarm_online_runbook_row - .contains("receiptType=epiphany.cultmesh.daemon_service_lifecycle_receipt") - || !swarm_online_runbook_row.contains( - "resultRef=cultmesh://epiphany-local/daemon-service-lifecycle/swarm-online-runbook", - ) - || !swarm_online_runbook_row.contains("authority=daemon.service_lifecycle") - || !swarm_online_runbook_row.contains("allAgents=true") - || !swarm_online_runbook_row.contains("receiptRequired=true") - || !swarm_online_runbook_row.contains("private=false") - { - anyhow::bail!( - "local Verse query smoke lost swarm-online-runbook daemon tool readback route" - ); - } - let self_status = context - .daemon_tool_capabilities - .iter() - .find(|capability| capability.capability_id == "epiphany.cluster.self.tool.status") - .context("missing Self status daemon tool capability")?; - let self_cluster = cluster_topology_for_id(&context, "epiphany.cluster.self")?; - let self_daemon_status = context - .daemon_statuses - .iter() - .find(|status| status.daemon_id == self_status.host_daemon_id) - .context("missing Self daemon status for status tool readback")?; - let (daemon_status_readback, daemon_status_private_state_exposed) = - daemon_status_readback_from_host( - self_cluster, - self_daemon_status, - &context.daemon_tool_capabilities, - ); - let hosted_tool_ids = daemon_status_readback["hostedToolCapabilityIds"] - .as_array() - .context("status readback lost hosted tool capability ids")?; - if daemon_status_readback["status"].as_str() != Some("ready") - || daemon_status_readback["clusterId"].as_str() != Some("epiphany.cluster.self") - || daemon_status_readback["displayName"].as_str() != Some("Self") - || daemon_status_readback["daemonId"].as_str() != Some("epiphany-daemon-self") - || daemon_status_readback["privateVerseId"].as_str() - != Some("epiphany.cluster.self.private") - || daemon_status_readback["eveSurfaceId"].as_str() != Some("eve://epiphany/self") - || daemon_status_readback["availableToAllAgents"].as_bool() != Some(true) - || daemon_status_readback["hostedToolCount"].as_u64() != Some(5) - || !hosted_tool_ids - .iter() - .any(|id| id.as_str() == Some("epiphany.cluster.self.tool.service-health")) - || !hosted_tool_ids.iter().any(|id| { - id.as_str() == Some("epiphany.cluster.self.tool.service-policy-directory") - }) - || !hosted_tool_ids.iter().any(|id| { - id.as_str() == Some("epiphany.cluster.self.tool.swarm-online-runbook") - }) - || daemon_status_private_state_exposed - || daemon_status_readback["privateStateExposed"].as_bool() != Some(false) - { - anyhow::bail!( - "local Verse query smoke lost daemon status readback for globally invokable status tools" - ); - } - let persona_eve_connect = context - .daemon_tool_capabilities - .iter() - .find(|capability| { - capability.capability_id == "epiphany.cluster.persona.tool.eve-connect" - }) - .context("missing Persona eve-connect daemon tool capability")?; - let persona_surface_directory = - load_epiphany_cultmesh_eve_surface_directory(&args.store, args.runtime_id.clone())?; - let (persona_cluster, persona_advertisement, persona_surface) = - persona_surface_directory - .iter() - .find(|(cluster, _advertisement, _surface)| { - cluster.cluster_id == persona_eve_connect.host_cluster_id - }) - .context("missing Persona Eve surface for eve-connect readback")?; - let (eve_connection_readback, eve_connection_private_state_exposed) = - eve_connection_readback_from_host( - persona_cluster, - persona_advertisement, - persona_surface, - persona_eve_connect, - &[], - ); - let supported_actions = eve_connection_readback["supportedActions"] - .as_array() - .context("eve-connect readback lost supported actions")?; - if eve_connection_readback["targetClusterId"].as_str() - != Some("epiphany.cluster.persona") - || eve_connection_readback["targetDisplayName"].as_str() != Some("Persona") - || eve_connection_readback["targetEveSurfaceId"].as_str() - != Some("eve://epiphany/persona") - || eve_connection_readback["targetPrivateVerseId"].as_str() - != Some("epiphany.cluster.persona.private") - || eve_connection_readback["connectionCommand"].as_str() - != Some( - "epiphany-verse-query connect-eve --target-cluster-id epiphany.cluster.persona", - ) - || eve_connection_readback["wrapperConnectionCommand"].as_str() - != Some( - "tools/epiphany_local_run.ps1 -Mode eve-connect -EveTargetClusterId epiphany.cluster.persona", - ) - || eve_connection_readback["publicPersonaDiscussionAllowed"].as_bool() != Some(true) - || !supported_actions - .iter() - .any(|action| action.as_str() == Some("submitEveConnectionIntent")) - || eve_connection_private_state_exposed - || eve_connection_readback["privateStateExposed"].as_bool() != Some(false) - { - anyhow::bail!( - "local Verse query smoke lost Eve surface readback for globally invokable eve-connect tools" - ); - } let no_op_pokes = write_poke_intents_for_non_ready_daemons(&args, &context)?; if !no_op_pokes.is_empty() { anyhow::bail!("local Verse query smoke poked ready daemons during no-op sweep"); @@ -2179,26 +1623,10 @@ fn run_cli() -> Result<()> { let degraded_tool_directory = load_epiphany_cultmesh_daemon_tool_directory(&args.store, args.runtime_id.clone())?; let degraded_tool_report = daemon_tool_directory_report(°raded_tool_directory); - let degraded_hands_status = context - .daemon_statuses - .iter() - .find(|status| status.daemon_id == "epiphany-daemon-hands") - .context("missing degraded Hands daemon status")?; - let degraded_tool_refusal = - assert_daemon_ready_for_tool_invocation(degraded_hands_status, hands_repo_action) - .expect_err("degraded Hands tool invocation should fail closed") - .to_string(); - if !degraded_tool_refusal.contains("owner=Idunn") - || !degraded_tool_refusal.contains("hostedBody=Epiphany") - || !degraded_tool_refusal.contains("sight=epiphany-verse-query swarm-status") - || !degraded_tool_refusal.contains(WRAPPER_POKE_NON_READY_COMMAND) - || !degraded_tool_refusal.contains( - "singlePoke=epiphany-verse-query poke-daemon --daemon-id epiphany-daemon-hands", - ) + if !degraded_tool_report.rows.is_empty() + || degraded_tool_report.host_attention_count != 0 { - anyhow::bail!( - "local Verse query smoke degraded tool refusal lost Idunn poke/readback routing" - ); + anyhow::bail!("degraded liveness manufactured provider tool attention"); } let degraded_overview_status = if degraded_report.non_ready_count == 0 && degraded_tool_report.host_attention_count == 0 @@ -2208,11 +1636,7 @@ fn run_cli() -> Result<()> { "attention" }; if degraded_overview_status != "attention" - || degraded_tool_report.host_attention_count == 0 - || !degraded_tool_report - .tui_rows - .iter() - .any(|row| row.contains("POKE") && row.contains("Hands")) + || degraded_tool_report.host_attention_count != 0 { anyhow::bail!( "local Verse query smoke degraded overview did not recommend daemon attention" @@ -2233,8 +1657,7 @@ fn run_cli() -> Result<()> { degraded_attention_tool_host_daemon_ids.sort(); degraded_attention_tool_host_daemon_ids.dedup(); if degraded_attention_daemon_ids != vec!["epiphany-daemon-hands".to_string()] - || degraded_attention_tool_host_daemon_ids - != vec!["epiphany-daemon-hands".to_string()] + || !degraded_attention_tool_host_daemon_ids.is_empty() { anyhow::bail!( "local Verse query smoke degraded overview lost structured attention daemon ids" @@ -2314,26 +1737,8 @@ fn run_cli() -> Result<()> { && !row.requires_elevated_authority && !row.private_state_exposed }) - || !triage_overview.swarm_action_rows.iter().any(|row| { - row.priority == 20 - && row.family == "daemon-tool-host" - && row.wrapper_mode == "tool-directory" - && row.effect_class == "read-only" - && row.lifecycle_owner == "none" - && row.hosted_body == "none" - && !row.mutates_state - && !row.requires_elevated_authority - && !row.private_state_exposed - }) - || triage_overview.tool_host_attention_rows.is_empty() - || !triage_overview - .tool_host_attention_rows - .iter() - .all(|row| row.host_daemon_id == "epiphany-daemon-hands") - || !triage_overview - .tool_host_attention_tui_rows - .iter() - .any(|row| row.contains("POKE") && row.contains("repo-action")) + || !triage_overview.tool_host_attention_rows.is_empty() + || !triage_overview.tool_host_attention_tui_rows.is_empty() || triage_pokes.len() != 1 || triage_pokes[0]["targetDaemonId"] != "epiphany-daemon-hands" || triage_pokes[0]["privateVerseId"] != "epiphany.cluster.hands.private" @@ -2626,7 +2031,13 @@ fn run_cli() -> Result<()> { row.family == "daemon-tool" && !row.present && row.latest_id == "missing" - && row.follow_up_command == WRAPPER_INVOKE_TOOL_COMMAND + && row.follow_up_command == "none" + }) + || !receipt_directory.rows.iter().any(|row| { + row.family == "eve-connection" + && !row.present + && row.latest_id == "missing" + && row.follow_up_command == "none" }) || !receipt_directory.rows.iter().any(|row| { row.family == "bifrost-publication" @@ -2693,11 +2104,9 @@ fn run_cli() -> Result<()> { ); if readiness_follow_up_row.follow_up_command != WRAPPER_CLUSTER_SERVICE_EXECUTION_READINESS_COMMAND - || service_lifecycle_wrapper_mode_for_row(&readiness_follow_up_row) - != "cluster-service-execution-readiness" { anyhow::bail!( - "local Verse query smoke did not route cluster readiness lifecycle receipts to the readiness wrapper" + "local Verse query smoke did not demote cluster readiness receipts to overview" ); } let missing_runbook_row = ReceiptDirectoryRow { @@ -2874,7 +2283,7 @@ fn run_cli() -> Result<()> { ); } other => anyhow::bail!( - "unknown command {other:?}; use seed, query, semantic-health, tools, tool-directory, invoke-tool, restart-policy-directory, swarm-brake, swarm-status, swarm-overview, swarm-triage, managed-services, cluster-topology, eve-surfaces, agent-state, agent-state-report, poke-daemon, poke-down-daemons, bifrost-publication, bifrost-public-proof, bifrost-artifact-acceptance, bifrost-metrics, bifrost-ledger, collaboration-feedback, connect-eve, or smoke" + "unknown command {other:?}; use seed, query, semantic-health, tools, tool-directory, restart-policy-directory, swarm-brake, swarm-status, swarm-overview, swarm-triage, managed-services, cluster-topology, eve-surfaces, agent-state, agent-state-report, poke-daemon, poke-down-daemons, bifrost-publication, bifrost-public-proof, bifrost-artifact-acceptance, bifrost-metrics, bifrost-ledger, collaboration-feedback, or smoke; provider invoke/connect commands remain unavailable until a provenance-bearing provider contract exists" ), } Ok(()) @@ -3015,7 +2424,6 @@ struct ClusterTopologyRow { daemon_id: String, daemon_surface_id: String, eve_surface_id: String, - odin_advertised: bool, public_persona_discussion_allowed: bool, private_state_exposed: bool, } @@ -3064,7 +2472,6 @@ fn cluster_topology_report( daemon_id: cluster.daemon_id.clone(), daemon_surface_id: cluster.daemon_surface_id.clone(), eve_surface_id: cluster.eve_surface_id.clone(), - odin_advertised: cluster.odin_advertised, public_persona_discussion_allowed: cluster.public_persona_discussion_allowed, private_state_exposed: false, }); @@ -4219,9 +3626,6 @@ impl SwarmTriageOutput { "wrapperRestartPolicies": WRAPPER_SERVICE_POLICY_DIRECTORY_COMMAND, "bifrostLedger": "epiphany-verse-query bifrost-ledger", "wrapperBifrostLedger": WRAPPER_BIFROST_LEDGER_COMMAND, - "invokeTool": DIRECT_INVOKE_TOOL_COMMAND, - "wrapperInvokeTool": WRAPPER_INVOKE_TOOL_COMMAND, - "wrapperInvokeSwarmOnlineRunbookTool": WRAPPER_INVOKE_SWARM_ONLINE_RUNBOOK_TOOL_COMMAND }), topology_tui_rows: report.topology_report.tui_rows, daemon_tui_rows: report.daemon_report.tui_rows, @@ -5889,7 +5293,6 @@ fn daemon_restart_policy_directory_report( daemon_surface_id: status.daemon_surface_id.clone(), eve_surface_id: status.eve_surface_id.clone(), public_persona_discussion_allowed: false, - odin_advertised: false, notes: Vec::new(), }); let policy = context @@ -6759,7 +6162,7 @@ fn receipt_directory_report( .unwrap_or_else(|| "none".to_string()), service_id: "none".to_string(), service_route: "none".to_string(), - follow_up_command: WRAPPER_INVOKE_TOOL_COMMAND.to_string(), + follow_up_command: "none".to_string(), artifact_ref: "none".to_string(), artifact_status: "none".to_string(), artifact_sha256: "none".to_string(), @@ -6799,7 +6202,7 @@ fn receipt_directory_report( .unwrap_or_else(|| "none".to_string()), service_id: "none".to_string(), service_route: "none".to_string(), - follow_up_command: WRAPPER_CONNECT_EVE_COMMAND.to_string(), + follow_up_command: "none".to_string(), artifact_ref: "none".to_string(), artifact_status: "none".to_string(), artifact_sha256: "none".to_string(), @@ -7490,8 +6893,10 @@ fn service_execution_audit_check_tui_row(check: &EpiphanyServiceExecutionAuditCh fn service_execution_check_follow_up_command(action: &str) -> &'static str { match action { + "cluster-windows-service-execution-readiness" => { + WRAPPER_CLUSTER_SERVICE_EXECUTION_READINESS_COMMAND + } "cluster-windows-service-execution-runbook" - | "cluster-windows-service-execution-readiness" | "cluster-windows-service-install" | "cluster-windows-service-start" | "cluster-windows-service-execution-audit" @@ -8546,7 +7951,11 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> { let (host_cluster_from_directory, daemon_status, capability) = tool_directory .iter() .find(|(_cluster, _status, capability)| capability.capability_id == capability_id) - .with_context(|| format!("local Verse has no daemon tool capability {capability_id:?}"))?; + .with_context(|| { + format!( + "invoke-tool unavailable: no provenance-bearing daemon tool capability {capability_id:?}" + ) + })?; let swarm_brake = load_epiphany_cultmesh_swarm_brake(&args.store, args.runtime_id.clone())?; assert_swarm_brake_allows_surface_entry( swarm_brake.as_ref(), @@ -8644,238 +8053,6 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> { Ok(()) } -fn default_daemon_tool_receipt_status( - capability: &EpiphanyCultMeshDaemonToolCapabilityEntry, -) -> String { - if is_service_health_capability(capability) { - "accepted-for-service-lifecycle-readback".to_string() - } else if is_swarm_online_runbook_capability(capability) { - "accepted-for-swarm-online-runbook-readback".to_string() - } else if is_service_policy_directory_capability(capability) { - "accepted-for-service-policy-directory-readback".to_string() - } else if is_daemon_status_capability(capability) { - "accepted-for-daemon-status-readback".to_string() - } else if is_eve_connect_capability(capability) { - "accepted-for-eve-surface-readback".to_string() - } else if is_authority_tool_capability(capability) { - "accepted-for-authority-contract-readback".to_string() - } else { - "accepted-for-daemon-routing".to_string() - } -} - -fn daemon_status_readback_from_host( - host_cluster: &EpiphanyCultMeshClusterTopologyEntry, - daemon_status: &EpiphanyCultMeshDaemonStatusEntry, - capabilities: &[EpiphanyCultMeshDaemonToolCapabilityEntry], -) -> (serde_json::Value, bool) { - let hosted_tool_capability_ids = capabilities - .iter() - .filter(|capability| capability.host_cluster_id == host_cluster.cluster_id) - .map(|capability| capability.capability_id.clone()) - .collect::>(); - let private_state_exposed = daemon_status.private_state_exposed - || capabilities - .iter() - .filter(|capability| capability.host_cluster_id == host_cluster.cluster_id) - .any(|capability| capability.private_state_exposed); - ( - json!({ - "status": daemon_status.status, - "clusterId": host_cluster.cluster_id, - "roleId": host_cluster.role_id, - "displayName": host_cluster.display_name, - "bodyDomain": host_cluster.body_domain, - "bodyKind": host_cluster.body_kind, - "privateVerseId": host_cluster.private_verse_id, - "daemonId": daemon_status.daemon_id, - "daemonSurfaceId": daemon_status.daemon_surface_id, - "eveSurfaceId": host_cluster.eve_surface_id, - "odinAdvertised": host_cluster.odin_advertised, - "publicPersonaDiscussionAllowed": host_cluster.public_persona_discussion_allowed, - "availableToAllAgents": true, - "hostedToolCount": hosted_tool_capability_ids.len(), - "hostedToolCapabilityIds": hosted_tool_capability_ids, - "privateStateExposed": private_state_exposed, - }), - private_state_exposed, - ) -} - -fn eve_connection_readback_from_host( - target_cluster: &EpiphanyCultMeshClusterTopologyEntry, - target_advertisement: &EpiphanyCultMeshOdinAdvertisementEntry, - target_surface: &EpiphanyCultMeshEveSurfaceStateEntry, - capability: &EpiphanyCultMeshDaemonToolCapabilityEntry, - repo_work_overviews: &[EpiphanyCultMeshRepoWorkOverviewEntry], -) -> (serde_json::Value, bool) { - let private_state_exposed = target_advertisement.private_state_exposed - || target_surface.private_state_exposed - || capability.private_state_exposed; - let (repo_work_queue_rows, _) = repo_work_overview_rows(repo_work_overviews); - let repo_work_queue_tui_rows = if target_cluster.public_persona_discussion_allowed { - repo_work_peer_tui_rows(&repo_work_queue_rows) - } else { - Vec::new() - }; - let repo_work_queue_rows = if target_cluster.public_persona_discussion_allowed { - repo_work_queue_rows - } else { - Vec::new() - }; - ( - json!({ - "targetAdvertisementId": target_advertisement.advertisement_id, - "targetClusterId": target_cluster.cluster_id, - "targetDisplayName": target_cluster.display_name, - "targetBodyDomain": target_cluster.body_domain, - "targetPrivateVerseId": target_cluster.private_verse_id, - "targetDaemonId": target_cluster.daemon_id, - "targetEveSurfaceId": target_surface.surface_id, - "targetTuiTitle": target_surface.tui_title, - "publicPersonaDiscussionAllowed": target_cluster.public_persona_discussion_allowed, - "supportedActions": target_surface.supported_actions, - "exposedDocumentTypes": target_surface.exposed_document_types, - "repoWorkQueueCount": repo_work_queue_tui_rows.len(), - "repoWorkQueueRows": repo_work_queue_rows, - "repoWorkQueueTuiRows": repo_work_queue_tui_rows, - "connectionCommand": format!( - "epiphany-verse-query connect-eve --target-cluster-id {}", - target_cluster.cluster_id - ), - "wrapperConnectionCommand": format!( - "tools/epiphany_local_run.ps1 -Mode eve-connect -EveTargetClusterId {}", - target_cluster.cluster_id - ), - "feedbackRoute": format!( - "cultmesh://epiphany-local/eve/{}/feedback", - target_cluster.cluster_id - ), - "privateStateExposed": private_state_exposed, - }), - private_state_exposed, - ) -} - -fn authority_tool_readback_from_capability( - host_cluster: &EpiphanyCultMeshClusterTopologyEntry, - capability: &EpiphanyCultMeshDaemonToolCapabilityEntry, -) -> (serde_json::Value, bool) { - let intent_route = format!( - "cultmesh://epiphany-local/authority/{}/{}/intent", - capability.authority_gate, capability.capability_id - ); - let receipt_route = format!( - "cultmesh://epiphany-local/authority/{}/{}/receipt", - capability.authority_gate, capability.capability_id - ); - let review_command = match capability.authority_gate.as_str() { - "hands" => "epiphany-hands-action record-pass --gate-from ", - "soul" => { - "tools/epiphany_local_run.ps1 -Mode mvp # route verification through Soul lane receipts" - } - _ => "none", - }; - ( - json!({ - "authorityGate": capability.authority_gate, - "capabilityId": capability.capability_id, - "toolName": capability.tool_name, - "operation": capability.operation, - "hostClusterId": host_cluster.cluster_id, - "hostDisplayName": host_cluster.display_name, - "hostDaemonId": capability.host_daemon_id, - "hostBodyDomain": host_cluster.body_domain, - "hostPrivateVerseId": host_cluster.private_verse_id, - "hostEveSurfaceId": host_cluster.eve_surface_id, - "inputContractType": capability.input_contract_type, - "receiptContractType": capability.receipt_contract_type, - "intentRoute": intent_route, - "receiptRoute": receipt_route, - "reviewCommand": review_command, - "availableToAllAgents": capability.available_to_all_agents, - "requiresReceipt": capability.requires_receipt, - "privateStateExposed": capability.private_state_exposed, - }), - capability.private_state_exposed, - ) -} - -fn default_daemon_tool_result_ref( - capability: &EpiphanyCultMeshDaemonToolCapabilityEntry, - receipt_id: &str, -) -> String { - if is_service_health_capability(capability) { - "cultmesh://epiphany-local/daemon-service-lifecycle/receipt-directory".to_string() - } else if is_swarm_online_runbook_capability(capability) { - "cultmesh://epiphany-local/daemon-service-lifecycle/swarm-online-runbook".to_string() - } else if is_service_policy_directory_capability(capability) { - "cultmesh://epiphany-local/daemon-service-lifecycle/service-policy-directory".to_string() - } else if is_daemon_status_capability(capability) { - format!( - "cultmesh://epiphany-local/daemon-status/{}", - capability.host_daemon_id - ) - } else if is_eve_connect_capability(capability) { - format!( - "cultmesh://epiphany-local/eve-surface/{}", - capability.host_cluster_id - ) - } else if is_authority_tool_capability(capability) { - format!( - "cultmesh://epiphany-local/authority/{}/{}/receipt", - capability.authority_gate, capability.capability_id - ) - } else { - format!("cultmesh://epiphany-local/tool-receipt/{receipt_id}") - } -} - -fn is_service_health_capability(capability: &EpiphanyCultMeshDaemonToolCapabilityEntry) -> bool { - capability.capability_id == "epiphany.cluster.self.tool.service-health" - && capability.tool_name == "service-health" - && capability.operation == "readServiceLifecycleStatus" - && capability.receipt_contract_type == "epiphany.cultmesh.daemon_service_lifecycle_receipt" -} - -fn is_swarm_online_runbook_capability( - capability: &EpiphanyCultMeshDaemonToolCapabilityEntry, -) -> bool { - capability.capability_id == "epiphany.cluster.self.tool.swarm-online-runbook" - && capability.tool_name == "swarm-online-runbook" - && capability.operation == "prepareSwarmOnlineRunbook" - && capability.receipt_contract_type == "epiphany.cultmesh.daemon_service_lifecycle_receipt" -} - -fn is_service_policy_directory_capability( - capability: &EpiphanyCultMeshDaemonToolCapabilityEntry, -) -> bool { - capability.capability_id == "epiphany.cluster.self.tool.service-policy-directory" - && capability.tool_name == "service-policy-directory" - && capability.operation == "readServicePolicyDirectory" - && capability.receipt_contract_type == "epiphany.cultmesh.daemon_service_lifecycle_receipt" -} - -fn is_daemon_status_capability(capability: &EpiphanyCultMeshDaemonToolCapabilityEntry) -> bool { - capability.tool_name == "status" - && capability.operation == "readStatus" - && capability.input_contract_type == "epiphany.cultmesh.odin_advertisement" - && capability.receipt_contract_type == "epiphany.cultmesh.tool_status_receipt" -} - -fn is_eve_connect_capability(capability: &EpiphanyCultMeshDaemonToolCapabilityEntry) -> bool { - capability.tool_name == "eve-connect" - && capability.operation == "submitEveConnectionIntent" - && capability.input_contract_type == "epiphany.cultmesh.eve_connection_intent" - && capability.receipt_contract_type == "epiphany.cultmesh.eve_connection_receipt" -} - -fn is_authority_tool_capability(capability: &EpiphanyCultMeshDaemonToolCapabilityEntry) -> bool { - matches!(capability.authority_gate.as_str(), "hands" | "soul") - && !capability.input_contract_type.is_empty() - && !capability.receipt_contract_type.is_empty() -} - fn poke_result_tui_row(row: &serde_json::Value) -> String { let target_display_name = row["targetDisplayName"].as_str().unwrap_or("unknown"); let target_daemon_id = row["targetDaemonId"].as_str().unwrap_or("unknown"); @@ -8893,55 +8070,6 @@ fn poke_result_tui_row(row: &serde_json::Value) -> String { ) } -struct DaemonToolInvocationTuiFields<'a> { - requester: &'a str, - requesting_agent_id: &'a str, - requesting_private_verse: &'a str, - requesting_surface: &'a str, - host: &'a str, - host_daemon_id: &'a str, - host_private_verse: &'a str, - host_surface: &'a str, - capability_id: &'a str, - tool_name: &'a str, - operation: &'a str, - intent_id: &'a str, - receipt_id: &'a str, - receipt_status: &'a str, - receipt_contract_type: &'a str, - result_ref: &'a str, - authority_gate: &'a str, - all_agents: bool, - requires_receipt: bool, - private_state_exposed: bool, -} - -fn daemon_tool_invocation_tui_row(fields: DaemonToolInvocationTuiFields<'_>) -> String { - let requester = fields.requester; - let requesting_agent_id = fields.requesting_agent_id; - let requesting_private_verse = fields.requesting_private_verse; - let requesting_surface = fields.requesting_surface; - let host = fields.host; - let host_daemon_id = fields.host_daemon_id; - let host_private_verse = fields.host_private_verse; - let host_surface = fields.host_surface; - let capability_id = fields.capability_id; - let tool_name = fields.tool_name; - let operation = fields.operation; - let intent_id = fields.intent_id; - let receipt_id = fields.receipt_id; - let receipt_status = fields.receipt_status; - let receipt_contract_type = fields.receipt_contract_type; - let result_ref = fields.result_ref; - let authority_gate = fields.authority_gate; - let all_agents = fields.all_agents; - let requires_receipt = fields.requires_receipt; - let private_state_exposed = fields.private_state_exposed; - format!( - "INVOKE | {requester} | agent={requesting_agent_id} | requestPrivateVerse={requesting_private_verse} | requestSurface={requesting_surface} | host={host} | hostDaemon={host_daemon_id} | hostPrivateVerse={host_private_verse} | hostSurface={host_surface} | tool={tool_name} | operation={operation} | capability={capability_id} | intent={intent_id} | receipt={receipt_id} | receiptStatus={receipt_status} | receiptType={receipt_contract_type} | resultRef={result_ref} | authority={authority_gate} | allAgents={all_agents} | receiptRequired={requires_receipt} | private={private_state_exposed}" - ) -} - fn sanitize_id(value: &str) -> String { value .chars() @@ -9018,43 +8146,6 @@ fn cluster_topology_entry_for_id<'a>( .with_context(|| format!("local Verse has no cluster topology row for {cluster_id:?}")) } -fn assert_daemon_ready_for_tool_invocation( - status: &EpiphanyCultMeshDaemonStatusEntry, - capability: &EpiphanyCultMeshDaemonToolCapabilityEntry, -) -> Result<()> { - if status.status != "ready" { - anyhow::bail!( - "host daemon {} is not ready for tool invocation {}; daemonStatus={}; operatorAction={}; owner={}; hostedBody={}; sight=epiphany-verse-query swarm-status; poke={}; singlePoke=epiphany-verse-query poke-daemon --daemon-id {}", - status.daemon_id, - capability.capability_id, - status.status, - status.operator_action, - SERVICE_LIFECYCLE_OWNER, - SERVICE_LIFECYCLE_HOSTED_BODY, - WRAPPER_POKE_NON_READY_COMMAND, - status.daemon_id - ); - } - if !status - .supported_actions - .iter() - .any(|action| action == "submitTypedToolIntent") - { - anyhow::bail!( - "host daemon {} does not advertise submitTypedToolIntent for capability {}; daemonStatus={}; operatorAction={}; owner={}; hostedBody={}; sight=epiphany-verse-query swarm-status; poke={}; singlePoke=epiphany-verse-query poke-daemon --daemon-id {}", - status.daemon_id, - capability.capability_id, - status.status, - status.operator_action, - SERVICE_LIFECYCLE_OWNER, - SERVICE_LIFECYCLE_HOSTED_BODY, - WRAPPER_POKE_NON_READY_COMMAND, - status.daemon_id - ); - } - Ok(()) -} - struct Args { command: String, store: PathBuf, diff --git a/epiphany-core/src/cultmesh_integration.rs b/epiphany-core/src/cultmesh_integration.rs index 78461f0b..1592d495 100644 --- a/epiphany-core/src/cultmesh_integration.rs +++ b/epiphany-core/src/cultmesh_integration.rs @@ -1065,7 +1065,6 @@ pub struct EpiphanyCultMeshClusterTopologyEntry { #[cultcache(key = 10)] pub public_persona_discussion_allowed: bool, #[cultcache(key = 11)] - pub odin_advertised: bool, #[cultcache(key = 12)] pub notes: Vec, } @@ -2695,6 +2694,29 @@ pub fn retire_epiphany_cultmesh_operator_status_documents( Ok(retired.into_iter().map(|entry| entry.key).collect()) } +/// Removes centrally forged provider documents from the pre-provider-contract +/// era. Their v0 payloads carry no provider provenance, so retaining them as +/// live discovery state would let a dead coordinator impersonate providers. +pub fn retire_epiphany_cultmesh_legacy_provider_documents( + store_path: impl AsRef, +) -> Result> { + const RETIRED_TYPES: [&str; 3] = [ + EPIPHANY_CULTMESH_ODIN_ADVERTISEMENT_TYPE, + EPIPHANY_CULTMESH_EVE_SURFACE_STATE_TYPE, + EPIPHANY_CULTMESH_DAEMON_TOOL_CAPABILITY_TYPE, + ]; + let mut backing = SingleFileMessagePackBackingStore::new(store_path.as_ref()); + let retired = backing + .pull_all()? + .into_iter() + .filter(|entry| RETIRED_TYPES.contains(&entry.r#type.as_str())) + .collect::>(); + for entry in &retired { + backing.delete(entry)?; + } + Ok(retired.into_iter().map(|entry| entry.key).collect()) +} + fn semantic_projection_health_scope_key(swarm_id: &str, partition: &str) -> String { use sha2::{Digest, Sha256}; format!( @@ -6388,6 +6410,7 @@ pub fn seed_epiphany_local_verse_context( generated_at_utc: impl Into, ) -> Result<()> { let store_path = store_path.as_ref(); + retire_epiphany_cultmesh_legacy_provider_documents(store_path)?; let runtime_id = runtime_id.into(); let generated_at_utc = generated_at_utc.into(); let status = EpiphanyCultMeshStatusEntry { @@ -6461,22 +6484,10 @@ pub fn query_epiphany_local_verse_context( } } - let mut odin_advertisements = Vec::new(); - for advertisement in epiphany_cultmesh_odin_advertisement_templates() { - if let Some(loaded) = - node.get::(&advertisement.advertisement_id)? - { - odin_advertisements.push(loaded); - } - } - let mut eve_surface_states = Vec::new(); - for surface in epiphany_cultmesh_eve_surface_templates() { - if let Some(loaded) = - node.get::(&surface.surface_id)? - { - eve_surface_states.push(loaded); - } - } + // v0 provider documents have no provider provenance. They are sealed + // legacy decoder vocabulary and never enter live context. + let odin_advertisements = Vec::new(); + let eve_surface_states = Vec::new(); let mut daemon_statuses = Vec::new(); for cluster in epiphany_cultmesh_cluster_topology() { if let Some(loaded) = node.get::(&cluster.daemon_id)? { @@ -6491,14 +6502,7 @@ pub fn query_epiphany_local_verse_context( } } - let mut daemon_tool_capabilities = Vec::new(); - for capability in epiphany_cultmesh_daemon_tool_capability_templates() { - if let Some(loaded) = - node.get::(&capability.capability_id)? - { - daemon_tool_capabilities.push(loaded); - } - } + let daemon_tool_capabilities = Vec::new(); let mut contract_summaries = Vec::new(); collect_contract_summaries( @@ -6669,25 +6673,10 @@ pub fn load_epiphany_cultmesh_eve_surface_directory( EpiphanyCultMeshEveSurfaceStateEntry, )>, > { - let store_path = store_path.as_ref(); - let runtime_id = runtime_id.into(); - let node = open_epiphany_cultmesh_node(store_path, runtime_id.clone())?; - let mut rows = Vec::new(); - for cluster in load_epiphany_cultmesh_cluster_topology(store_path, runtime_id.clone())? { - let Some(advertisement) = epiphany_cultmesh_odin_advertisement_templates() - .into_iter() - .find(|advertisement| advertisement.cluster_id == cluster.cluster_id) - else { - continue; - }; - let advertisement = - node.get::(&advertisement.advertisement_id)?; - let surface = node.get::(&cluster.eve_surface_id)?; - if let (Some(advertisement), Some(surface)) = (advertisement, surface) { - rows.push((cluster, advertisement, surface)); - } - } - Ok(rows) + let _ = open_epiphany_cultmesh_node(store_path, runtime_id)?; + // No provenance-bearing provider advertisement contract exists yet. + // Topology supplies addresses, never availability. + Ok(Vec::new()) } fn unknown_daemon_status( @@ -6725,27 +6714,9 @@ pub fn load_epiphany_cultmesh_daemon_tool_directory( EpiphanyCultMeshDaemonToolCapabilityEntry, )>, > { - let store_path = store_path.as_ref(); - let runtime_id = runtime_id.into(); - let node = open_epiphany_cultmesh_node(store_path, runtime_id)?; - let mut rows = Vec::new(); - let capabilities = node - .get_all_with_keys::()? - .into_iter() - .map(|(_, capability)| capability) - .collect::>(); - for capability in capabilities { - let Some(cluster) = - node.get::(&capability.host_cluster_id)? - else { - continue; - }; - let status = node - .get::(&capability.host_daemon_id)? - .unwrap_or_else(|| unknown_daemon_status(&cluster)); - rows.push((cluster, status, capability)); - } - Ok(rows) + let _ = open_epiphany_cultmesh_node(store_path, runtime_id)?; + // v0 capabilities have no authenticated provider owner and are ignored. + Ok(Vec::new()) } pub trait EpiphanyCultMeshContractSummarySource: DatabaseEntry { @@ -7130,7 +7101,6 @@ pub fn epiphany_cultmesh_cluster_topology() -> Vec Vec { epiphany_cultmesh_cluster_topology() .into_iter() - .filter(|cluster| cluster.odin_advertised) .map(|cluster| EpiphanyCultMeshOdinAdvertisementEntry { schema_version: EPIPHANY_CULTMESH_ODIN_ADVERTISEMENT_SCHEMA_VERSION.to_string(), advertisement_id: format!("odin.advertisement.{}", cluster.cluster_id), @@ -7210,6 +7180,7 @@ fn epiphany_cultmesh_odin_advertisement_templates() -> Vec Vec { epiphany_cultmesh_cluster_topology() .into_iter() @@ -7268,6 +7239,7 @@ fn epiphany_cultmesh_eve_surface_templates() -> Vec Result<()> { if surface.private_state_exposed { return Err(anyhow!("Eve surface states must not expose private state")); @@ -7622,6 +7594,7 @@ fn validate_daemon_status(status: &EpiphanyCultMeshDaemonStatusEntry) -> Result< Ok(()) } +#[cfg(test)] fn epiphany_cultmesh_daemon_tool_capability_templates() -> Vec { let mut capabilities = Vec::new(); @@ -7701,6 +7674,7 @@ fn epiphany_cultmesh_daemon_tool_capability_templates() capabilities } +#[cfg(test)] fn epiphany_cultmesh_daemon_tool_capability( cluster: &EpiphanyCultMeshClusterTopologyEntry, tool_slug: &str, @@ -7734,7 +7708,10 @@ fn epiphany_cultmesh_daemon_tool_capability( } } -pub fn publish_epiphany_cultmesh_provider_state( +/// Test-only decoder fixture for proving retirement and legacy consumer +/// behavior. This is deliberately absent from production builds. +#[cfg(test)] +pub(crate) fn write_legacy_provider_fixture( store_path: impl AsRef, runtime_id: impl Into, daemon_id: &str, @@ -7742,23 +7719,21 @@ pub fn publish_epiphany_cultmesh_provider_state( let cluster = epiphany_cultmesh_cluster_topology() .into_iter() .find(|cluster| cluster.daemon_id == daemon_id) - .with_context(|| format!("no declared provider topology for daemon {daemon_id:?}"))?; + .context("legacy fixture daemon has no topology")?; let advertisement = epiphany_cultmesh_odin_advertisement_templates() .into_iter() - .find(|advertisement| advertisement.cluster_id == cluster.cluster_id) - .with_context(|| format!("daemon {daemon_id:?} has no Odin advertisement contract"))?; + .find(|row| row.cluster_id == cluster.cluster_id) + .context("legacy fixture has no advertisement")?; let surface = epiphany_cultmesh_eve_surface_templates() .into_iter() - .find(|surface| surface.cluster_id == cluster.cluster_id) - .with_context(|| format!("daemon {daemon_id:?} has no Eve surface contract"))?; - validate_eve_surface_state(&surface)?; - + .find(|row| row.cluster_id == cluster.cluster_id) + .context("legacy fixture has no surface")?; let mut node = open_epiphany_cultmesh_node(store_path, runtime_id)?; node.put(advertisement.advertisement_id.clone(), &advertisement)?; node.put(surface.surface_id.clone(), &surface)?; for capability in epiphany_cultmesh_daemon_tool_capability_templates() .into_iter() - .filter(|capability| capability.host_daemon_id == daemon_id) + .filter(|row| row.host_daemon_id == daemon_id) { node.put(capability.capability_id.clone(), &capability)?; } @@ -8631,7 +8606,7 @@ mod tests { fn publish_all_test_provider_state(store: &Path) -> Result<()> { for cluster in epiphany_cultmesh_cluster_topology() { - publish_epiphany_cultmesh_provider_state(store, "epiphany-test", &cluster.daemon_id)?; + write_legacy_provider_fixture(store, "epiphany-test", &cluster.daemon_id)?; } Ok(()) } @@ -9804,7 +9779,6 @@ mod tests { assert_eq!(persona.daemon_id, "epiphany-daemon-persona"); assert_eq!(persona.eve_surface_id, "eve://epiphany/persona"); assert!(persona.public_persona_discussion_allowed); - assert!(persona.odin_advertised); assert!(!hands.public_persona_discussion_allowed); assert!( hands @@ -9849,43 +9823,17 @@ mod tests { } #[test] - fn eve_surface_states_back_every_odin_advertised_surface() -> Result<()> { + fn legacy_provider_rows_are_not_live_discovery_state() -> Result<()> { let temp = tempfile::tempdir()?; let store = temp.path().join("epiphany-eve-surface-states.ccmp"); write_epiphany_cultmesh_cluster_topology(&store, "epiphany-test")?; publish_all_test_provider_state(&store)?; - let advertisements = epiphany_cultmesh_odin_advertisement_templates(); - let surfaces = epiphany_cultmesh_eve_surface_templates(); - - assert_eq!(surfaces.len(), advertisements.len()); - for advertisement in advertisements { - let surface = surfaces - .iter() - .find(|surface| surface.surface_id == advertisement.eve_surface_id) - .expect("advertised Eve surface has surface state"); - assert_eq!(surface.cluster_id, advertisement.cluster_id); - assert!(surface.surface_id.starts_with("eve://")); - assert!(!surface.private_state_exposed); - assert!(!surface.tui_rows.is_empty()); - assert!( - surface - .supported_actions - .iter() - .any(|action| { action == "submitEveConnectionIntent" }) - ); - } - let context = query_epiphany_local_verse_context(&store, "epiphany-test")?; - assert_eq!( - context.eve_surface_states.len(), - context.odin_advertisements.len() - ); - assert!(context.eve_surface_states.iter().any(|surface| { - surface.surface_id == "eve://epiphany/persona" - && surface - .exposed_document_types - .contains(&EPIPHANY_CULTMESH_BIFROST_COLLABORATION_FEEDBACK_TYPE.to_string()) - })); + assert!(context.odin_advertisements.is_empty()); + assert!(context.eve_surface_states.is_empty()); + assert!(context.daemon_tool_capabilities.is_empty()); + assert!(load_epiphany_cultmesh_eve_surface_directory(&store, "epiphany-test")?.is_empty()); + assert!(load_epiphany_cultmesh_daemon_tool_directory(&store, "epiphany-test")?.is_empty()); Ok(()) } @@ -10348,11 +10296,7 @@ mod tests { fn eve_connection_intent_and_receipt_route_feedback_without_private_state() -> Result<()> { let temp = tempfile::tempdir()?; let store = temp.path().join("epiphany-eve-connection.ccmp"); - publish_epiphany_cultmesh_provider_state( - &store, - "epiphany-test", - "epiphany-daemon-persona", - )?; + write_legacy_provider_fixture(&store, "epiphany-test", "epiphany-daemon-persona")?; let node = open_epiphany_cultmesh_node(&store, "epiphany-test")?; let persona = node.get_required::( @@ -10518,7 +10462,7 @@ mod tests { fn daemon_tool_invocation_intent_and_receipt_round_trip_for_any_agent() -> Result<()> { let temp = tempfile::tempdir()?; let store = temp.path().join("epiphany-daemon-tool-invocation.ccmp"); - publish_epiphany_cultmesh_provider_state(&store, "epiphany-test", "epiphany-daemon-hands")?; + write_legacy_provider_fixture(&store, "epiphany-test", "epiphany-daemon-hands")?; let node = open_epiphany_cultmesh_node(&store, "epiphany-test")?; let hands_action = node.get_required::( @@ -11186,46 +11130,52 @@ mod tests { } #[test] - fn provider_publication_is_bounded_to_the_owning_daemon() -> Result<()> { + fn explicit_bootstrap_retires_legacy_provider_forgery() -> Result<()> { let temp = tempfile::tempdir()?; let store = temp.path().join("epiphany-provider-boundary.ccmp"); seed_epiphany_local_verse_context(&store, "epiphany-test", "2026-07-12T00:00:00Z")?; + let sentinel_before = + open_epiphany_cultmesh_node(&store, "epiphany-test")? + .get_required::(EPIPHANY_CULTMESH_STATUS_KEY)?; - publish_epiphany_cultmesh_provider_state(&store, "epiphany-test", "epiphany-daemon-hands")?; - let context = query_epiphany_local_verse_context(&store, "epiphany-test")?; - assert_eq!(context.odin_advertisements.len(), 1); - assert_eq!(context.eve_surface_states.len(), 1); - assert_eq!(context.daemon_tool_capabilities.len(), 3); + write_legacy_provider_fixture(&store, "epiphany-test", "epiphany-daemon-hands")?; assert!( - context + query_epiphany_local_verse_context(&store, "epiphany-test")? .odin_advertisements - .iter() - .all(|entry| entry.cluster_id == "epiphany.cluster.hands") + .is_empty() ); - assert!( - context - .eve_surface_states - .iter() - .all(|entry| entry.cluster_id == "epiphany.cluster.hands") + let mut retired = retire_epiphany_cultmesh_legacy_provider_documents(&store)?; + retired.sort(); + assert_eq!( + retired, + vec![ + "epiphany.cluster.hands.tool.eve-connect".to_string(), + "epiphany.cluster.hands.tool.repo-action".to_string(), + "epiphany.cluster.hands.tool.status".to_string(), + "eve://epiphany/hands".to_string(), + "odin.advertisement.epiphany.cluster.hands".to_string(), + ] ); - assert!( - context - .daemon_tool_capabilities - .iter() - .all(|entry| entry.host_daemon_id == "epiphany-daemon-hands") + assert_eq!( + open_epiphany_cultmesh_node(&store, "epiphany-test")? + .get_required::(EPIPHANY_CULTMESH_STATUS_KEY)?, + sentinel_before ); + seed_epiphany_local_verse_context(&store, "epiphany-test", "2026-07-12T00:01:00Z")?; + assert!(retire_epiphany_cultmesh_legacy_provider_documents(&store)?.is_empty()); - let error = publish_epiphany_cultmesh_provider_state( - &store, - "epiphany-test", - "epiphany-daemon-counterfeit", - ) - .expect_err("unknown daemons must not publish provider state"); - assert!(error.to_string().contains("no declared provider topology")); + let error = + write_legacy_provider_fixture(&store, "epiphany-test", "epiphany-daemon-counterfeit") + .expect_err("unknown daemons must not create even a legacy fixture"); + assert!( + error + .to_string() + .contains("legacy fixture daemon has no topology") + ); let unchanged = query_epiphany_local_verse_context(&store, "epiphany-test")?; - assert_eq!(unchanged.odin_advertisements.len(), 1); - assert_eq!(unchanged.eve_surface_states.len(), 1); - assert_eq!(unchanged.daemon_tool_capabilities.len(), 3); + assert!(unchanged.odin_advertisements.is_empty()); + assert!(unchanged.eve_surface_states.is_empty()); + assert!(unchanged.daemon_tool_capabilities.is_empty()); Ok(()) } diff --git a/epiphany-core/src/lib.rs b/epiphany-core/src/lib.rs index 9f361c56..da35111e 100644 --- a/epiphany-core/src/lib.rs +++ b/epiphany-core/src/lib.rs @@ -493,9 +493,9 @@ pub use cultmesh_integration::load_latest_epiphany_cultmesh_role_review_event; pub use cultmesh_integration::load_latest_epiphany_cultmesh_weksa_lowering_receipt; pub use cultmesh_integration::load_latest_epiphany_cultmesh_work_loop_telemetry; pub use cultmesh_integration::open_epiphany_cultmesh_node; -pub use cultmesh_integration::publish_epiphany_cultmesh_provider_state; pub use cultmesh_integration::publish_epiphany_cultmesh_semantic_projection_health; pub use cultmesh_integration::query_epiphany_local_verse_context; +pub use cultmesh_integration::retire_epiphany_cultmesh_legacy_provider_documents; pub use cultmesh_integration::retire_epiphany_cultmesh_operator_status_documents; pub use cultmesh_integration::seed_epiphany_local_verse_context; pub use cultmesh_integration::write_epiphany_cultmesh_agent_state_soa_summary; diff --git a/epiphany-core/src/prompt_context.rs b/epiphany-core/src/prompt_context.rs index b9d9474c..28908b9a 100644 --- a/epiphany-core/src/prompt_context.rs +++ b/epiphany-core/src/prompt_context.rs @@ -434,22 +434,12 @@ mod tests { use crate::epiphany_cultmesh_bifrost_body_change_publication_intent; use crate::epiphany_cultmesh_bifrost_body_change_publication_receipt_for_intent; use crate::epiphany_cultmesh_bifrost_github_publication_receipt_for_publication; - use crate::epiphany_cultmesh_daemon_tool_invocation_intent_from_capability; - use crate::epiphany_cultmesh_daemon_tool_invocation_receipt_for_intent; - use crate::epiphany_cultmesh_eve_connection_intent_from_advertisement; - use crate::epiphany_cultmesh_eve_connection_receipt_for_intent; - use crate::load_epiphany_cultmesh_cluster_topology; - use crate::publish_epiphany_cultmesh_provider_state; use crate::query_epiphany_local_verse_context; use crate::seed_epiphany_local_verse_context; use crate::write_epiphany_cultmesh_agent_state_soa_summary; use crate::write_epiphany_cultmesh_bifrost_body_change_publication_intent; use crate::write_epiphany_cultmesh_bifrost_body_change_publication_receipt; use crate::write_epiphany_cultmesh_bifrost_github_publication_receipt; - use crate::write_epiphany_cultmesh_daemon_tool_invocation_intent; - use crate::write_epiphany_cultmesh_daemon_tool_invocation_receipt; - use crate::write_epiphany_cultmesh_eve_connection_intent; - use crate::write_epiphany_cultmesh_eve_connection_receipt; use crate::write_epiphany_cultmesh_work_loop_telemetry; use epiphany_state_model::EpiphanyMemoryContextPacket; use epiphany_state_model::EpiphanyMemoryFreshnessStatus; @@ -460,61 +450,7 @@ mod tests { let temp = tempfile::tempdir()?; let store = temp.path().join("epiphany-local-verse.ccmp"); seed_epiphany_local_verse_context(&store, "epiphany-test", "2026-06-02T00:00:00Z")?; - for cluster in load_epiphany_cultmesh_cluster_topology(&store, "epiphany-test")? { - publish_epiphany_cultmesh_provider_state(&store, "epiphany-test", &cluster.daemon_id)?; - } - let seeded_verse = query_epiphany_local_verse_context(&store, "epiphany-test")?; - let hands_action = seeded_verse - .daemon_tool_capabilities - .iter() - .find(|capability| { - capability.capability_id == "epiphany.cluster.hands.tool.repo-action" - }) - .expect("Hands repo-action capability exists"); - let advertisement = seeded_verse - .odin_advertisements - .first() - .expect("seeded Verse advertises at least one cluster"); - let eve_intent = epiphany_cultmesh_eve_connection_intent_from_advertisement( - "eve-intent-prompt-test", - "epiphany.cluster.persona", - advertisement, - "prompt context identity proof", - "requestFeedback", - ); - write_epiphany_cultmesh_eve_connection_intent(&store, "epiphany-test", eve_intent.clone())?; - let eve_receipt = epiphany_cultmesh_eve_connection_receipt_for_intent( - "eve-receipt-prompt-test", - &eve_intent, - "accepted", - ); - write_epiphany_cultmesh_eve_connection_receipt(&store, "epiphany-test", eve_receipt)?; - let tool_intent = epiphany_cultmesh_daemon_tool_invocation_intent_from_capability( - "daemon-tool-intent-prompt-test", - "epiphany.Persona", - "epiphany.cluster.persona", - hands_action, - "cultmesh://epiphany-local/hands-action-intent/prompt-test", - "Persona requests Hands review through the daemon tool directory.", - ); - write_epiphany_cultmesh_daemon_tool_invocation_intent( - &store, - "epiphany-test", - tool_intent.clone(), - )?; - let tool_receipt = epiphany_cultmesh_daemon_tool_invocation_receipt_for_intent( - "daemon-tool-receipt-prompt-test", - &tool_intent, - "accepted-for-hands-review", - hands_action.receipt_contract_type.clone(), - "cultmesh://epiphany-local/hands-action-review/prompt-test", - "Hands accepted the invocation.", - ); - write_epiphany_cultmesh_daemon_tool_invocation_receipt( - &store, - "epiphany-test", - tool_receipt, - )?; + let _seeded_verse = query_epiphany_local_verse_context(&store, "epiphany-test")?; let bifrost_intent = epiphany_cultmesh_bifrost_body_change_publication_intent( "bifrost-publication-intent-prompt-test", "epiphany.cluster.hands", @@ -675,16 +611,10 @@ mod tests { assert!(rendered.contains("Yggdrasil")); assert!(rendered.contains("Bifrost")); assert!(rendered.contains("Cluster Topology")); - assert!(rendered.contains("Odin Discovery")); assert!(rendered.contains("eve://epiphany/persona")); assert!(rendered.contains("private_state_exposed=false")); - assert!(rendered.contains("Daemon Tool Directory")); - assert!(rendered.contains("available_to_all_agents=true")); - assert!(rendered.contains("Daemon Tool Invocation")); - assert!(rendered.contains("eve-intent-prompt-test")); - assert!(rendered.contains("eve-receipt-prompt-test")); - assert!(rendered.contains("daemon-tool-intent-prompt-test")); - assert!(rendered.contains("receipt_contract=epiphany.hands.action_review")); + assert!(!rendered.contains("inspectCompactSurface")); + assert!(!rendered.contains("watchTypedReceipts")); assert!(rendered.contains("Agent State SoA")); assert!(rendered.contains("agent-state-soa-summary-prompt-test")); assert!(rendered.contains("gamecult.persona_state.v0")); @@ -708,18 +638,6 @@ mod tests { assert!(rendered.contains("Mind reviews durable state effects")); assert!(!rendered.contains("raw worker transcript")); - prompt_input - .local_verse - .latest_daemon_tool_invocation_receipt - .as_mut() - .expect("tool receipt remains available for mismatch probe") - .intent_id = "another-tool-intent".to_string(); - prompt_input - .local_verse - .latest_eve_connection_receipt - .as_mut() - .expect("Eve receipt remains available for mismatch probe") - .intent_id = "another-eve-intent".to_string(); prompt_input .local_verse .arrival_latest_bifrost_body_change_publication_receipt @@ -727,10 +645,6 @@ mod tests { .expect("Bifrost receipt remains available for mismatch probe") .intent_id = "another-bifrost-intent".to_string(); let mismatched = render_epiphany_prompt_context(&prompt_input); - assert!(mismatched.contains("daemon-tool-intent-prompt-test")); - assert!(!mismatched.contains("receipt_contract=epiphany.hands.action_review")); - assert!(mismatched.contains("eve-intent-prompt-test")); - assert!(!mismatched.contains("eve-receipt-prompt-test")); assert!(mismatched.contains("bifrost-publication-intent-prompt-test")); assert!(!mismatched.contains("bifrost-publication-receipt-prompt-test")); assert!(!mismatched.contains("github-publication-receipt-prompt-test")); diff --git a/notes/conceptual-substitution-audit-2026-07-12.md b/notes/conceptual-substitution-audit-2026-07-12.md index 58f33f55..4b72e323 100644 --- a/notes/conceptual-substitution-audit-2026-07-12.md +++ b/notes/conceptual-substitution-audit-2026-07-12.md @@ -117,13 +117,13 @@ exported three bulk writers able to stamp every Odin advertisement, Eve surface, and daemon-hosted tool in one call. Those all-provider writers are deleted. -`publish_epiphany_cultmesh_provider_state` accepts one persisted daemon ID, -validates that it names a declared cluster, and writes exactly that cluster's -advertisement, Eve surface, and hosted capabilities. `epiphany-cluster-daemon` -calls this primitive on the shared heartbeat/serve path before writing its own -liveness. An unknown daemon is refused before any provider document is written. -The quarantined aggregate smoke iterates the same one-daemon primitive rather -than using a privileged fixture shortcut. +That daemon-bounded transfer was still false authority: the primitive accepted +only a daemon ID and centrally manufactured composition content and tool claims. +It had no provider-authored payload or provenance. The primitive and its +heartbeat call are now deleted. `epiphany-cluster-daemon` writes liveness only. +Legacy v0 provider templates remain test-only vocabulary; live consumers ignore +their provenance-free rows, and explicit bootstrap retires stale rows of the +three exact Odin/Eve/tool families. ## Heartbeat/bootstrap split @@ -133,8 +133,8 @@ repaint Self-owned policy, topology, contracts, brake initialization, and operator status merely by emitting liveness. Heartbeat and serve no longer bootstrap or query the full Verse context. They -require persisted topology, load only narrow liveness rows, publish only the -owning daemon's provider state, and write only its heartbeat. An unbootstrapped +require persisted topology, load only narrow liveness rows, and write only the +owning daemon's heartbeat. An unbootstrapped daemon fails before creating the CultCache store and tells the operator to run explicit bootstrap. The wrapper already performs that bootstrap at the operator boundary. @@ -1710,9 +1710,11 @@ runtime constants are now cut. Surface schemas may remain discoverable vocabulary and local projection validators, but cannot claim executable wire support. -The next adjacent surface frontier is the generic central Eve template builder, -which synthesizes cluster surface rows and actions while claiming the cluster -daemon owns their contents. A surface earns readmission only through an owning -provider publishing a typed CultMesh document that survives Snapshot, schema +The adjacent generic central Eve substitution is now cut. The publisher and +heartbeat call that lowered daemon IDs into seven plausible surfaces and hosted +tools are deleted. Live consumers ignore provenance-free v0 Odin/Eve/tool rows; +explicit bootstrap retires them. Topology `eve_surface_id` remains address +metadata only. A surface earns readmission only through an owning provider's +provenance-bearing typed CultMesh contract that survives Snapshot, schema validation, and Eve lowering; advertised actions additionally require a real typed dispatcher and receipt path. diff --git a/notes/epiphany-current-algorithmic-map.md b/notes/epiphany-current-algorithmic-map.md index 59e46374..b24be3a3 100644 --- a/notes/epiphany-current-algorithmic-map.md +++ b/notes/epiphany-current-algorithmic-map.md @@ -3,9 +3,9 @@ ## Observation and bootstrap authority correction (2026-07-12) - Owner: diagnostics only project persisted CultMesh state; they never initialize it. -- Bootstrap owns static policy, topology, schema, advertisement, surface, and capability declarations. It does not own daemon liveness. +- Bootstrap owns static policy, topology, schema, brake, and organ-contract declarations. It does not own daemon liveness or provider availability. - Daemons own heartbeat/status documents. Missing status is represented as `unknown`, never promoted to `ready` by a reader or seeder. -- Provider directories contain only persisted provider advertisements, Eve surfaces, and tool capabilities. Missing provider state produces no synthetic row. +- The provenance-free v0 Odin advertisement, Eve surface, and daemon-tool families are quarantined legacy vocabulary. Live provider directories return no rows from them; missing provider state produces no synthetic row. - Forbidden writers removed in this pass: read-command calls to `seed_epiphany_local_verse_context`, loader fallback constructors, and bootstrap's default-ready daemon-status loop. - Next authority cut: requester commands may author intents, but Bifrost, GitHub, tool providers, Eve providers, and daemon lifecycle owners must author their own response receipts. @@ -48,6 +48,16 @@ - Cut line: the supervisor's provider-status writer and synthetic heartbeat advancement are removed. Generated attempts use unique identities; exact retry is idempotent, identity collision is refused, and delayed replay cannot rewind `latest`. - Verification: the survival rehearsal preserves the provider envelope across two successful restart commands, observes two distinct awaiting receipts, then publishes a real provider heartbeat and proves receipt resolution plus failure-count reset. +## Provider discovery and heartbeat authority (updated 2026-07-15) + +- Owner: `epiphany-cluster-daemon` owns only its liveness heartbeat/status envelope. No central process currently owns provider advertisement, Eve composition, or hosted-tool availability. +- Inputs: heartbeat accepts persisted topology identity and daemon-local liveness evidence. Topology `eve_surface_id` is routing/address metadata only; it is not proof that a surface exists. +- Outputs: heartbeat writes liveness only. Live Odin, Eve, and tool directories remain empty until a future provider-authored contract is admitted. +- Derived state: topology, labels, expected routes, and test-only templates may describe stable addresses and legacy shape. They cannot become provider presence, composition content, supported actions, or executable capability. +- Forbidden writers: generic bootstrap, heartbeat, query CLI, and central template builders cannot publish the provenance-free v0 Odin advertisement, Eve surface, or daemon-tool families. Live consumers ignore those families, and explicit bootstrap retires any stale rows of exactly those types. +- Cut line: `publish_epiphany_cultmesh_provider_state` and the heartbeat call to it are deleted. The seven centrally synthesized surfaces and their tool claims are no longer live state. +- Re-admission invariant: provider discovery returns only after an owning provider emits a provenance-bearing typed contract whose origin can be verified; actions additionally require a real dispatcher and receipt path. + ## Persona feedback and Imagination consensus boundary (2026-07-12) - Eve connection requests remain pending until a real target provider daemon or authenticated ingest boundary supplies the typed response. The former generic `epiphany-eve-provider` CLI is deleted because caller-supplied provider identity and status did not constitute provider participation; local response construction/writing is test-only. @@ -109,13 +119,12 @@ publication command. Provider bodies must publish their own discovery state; central declared topology cannot be lowered into `active`/`daemon-live` compatibility presence. -- `epiphany-cluster-daemon` owns provider presence beside heartbeat liveness. - Each heartbeat/serve lane publishes only its daemon's Odin advertisement, - Eve surface, and hosted tools through a daemon-ID-bounded primitive. There is - no all-provider writer; an unknown daemon publishes nothing. +- `epiphany-cluster-daemon` owns heartbeat liveness only. Heartbeat/serve does + not publish Odin advertisements, Eve surfaces, or hosted tools. The former + daemon-ID-bounded central publisher is deleted. - Cluster daemons never bootstrap the local Verse and never load its full context. They require persisted topology, read narrow liveness, then write - only their bounded provider state and heartbeat. Explicit operator bootstrap + only their bounded heartbeat. Explicit operator bootstrap owns policy/topology/contract initialization. - `epiphany-daemon-supervisor` also requires explicit persisted bootstrap for every production lifecycle, policy, scheduler, runbook, audit, status, and @@ -138,9 +147,9 @@ single-daemon heartbeat/observation writers remain. Aggregate synthetic readiness exists solely inside the fixed Verse smoke body. - Topology-derived Odin advertisement, Eve surface, and tool-capability builders - are private contract templates, not public state APIs. External consumers see - persisted loaders; only the daemon-ID-bounded publisher may lower templates - into provider-owned documents. + survive only as test fixtures for legacy v0 document shapes. Live consumers + ignore provenance-free v0 rows, and explicit bootstrap retires them. Topology + `eve_surface_id` remains address metadata, not availability evidence. - Generic bootstrap owns declarations and initial control state, not operator observation. The template-based operator-status writer and its writerless schema/context/prompt/reader family are deleted. Operator snapshots remain diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 853a66b3..eb124cf7 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -346,9 +346,9 @@ The confirmed conceptual substitutions have been cut: Eve surfaces, or hosted tools; provider absence survives bootstrap. - the central `provider-advertisements` / `publish-odin` compatibility mouth is deleted; only provider-owned bodies may publish presence to Odin. -- bulk provider-state writers are deleted. Each `epiphany-cluster-daemon` - heartbeat publishes only its own advertisement, Eve surface, and hosted - tools; unknown daemon identities are refused before writes. +- bulk and daemon-bounded central provider-state writers are deleted. Each + `epiphany-cluster-daemon` heartbeat publishes liveness only; it cannot turn + topology into an advertisement, Eve composition, or hosted-tool claim. - cluster daemons do not bootstrap or query the full Verse. Missing persisted topology is a pre-write refusal; explicit operator bootstrap owns shared policy, topology, contracts, and brake initialization. @@ -367,9 +367,10 @@ The confirmed conceptual substitutions have been cut: - bulk seven-daemon readiness construction/writing is test-only. Production loaders enumerate topology; the aggregate smoke owns a fixed-store local fixture helper, while real liveness remains single-daemon authored. -- topology-derived provider builders are private, explicitly named templates. - Consumers can load persisted provider documents but cannot request seven - plausible advertisements/surfaces/tools from topology. +- topology-derived provider builders survive only as test fixtures for legacy + v0 shapes. Live consumers ignore provenance-free v0 Odin/Eve/tool rows; + explicit bootstrap deletes stale rows of exactly those families. Topology + `eve_surface_id` is address metadata only, not surface availability. - bootstrap no longer writes default operator status. The dedicated writer was a dead `ready` template, so the writer and its now-ownerless schema/context/ prompt/reader family are deleted. Source-derived operator snapshots remain. @@ -1468,10 +1469,15 @@ Re-admission is deliberately expensive: an owning organ must prove dispatcher and receipt path. Schema registration alone proves vocabulary, not runtime support. -The adjacent Modeling frontier is the generic central Eve template builder. -It currently synthesizes cluster rows and supported actions while its own prose -claims the cluster daemon owns surface contents. That is the next conceptual -substitution to map and cut or rebuild around provider publication. It does not -replace the current deployment next action: first complete the real Windows -reboot/logon proof for Task Scheduler, the Yggdrasil tunnel, Idunn, and the -launch-correlated semantic projector heartbeat. +The adjacent central Eve substitution is cut. The generic provider publisher +and its heartbeat call are deleted; a cluster heartbeat now owns liveness only. +Live Odin, Eve, and daemon-tool directories expose no provenance-free v0 rows, +and explicit bootstrap retires stale rows of those exact families. The stable +topology `eve_surface_id` remains routing/address metadata and proves neither +presence nor composition. Provider availability can return only through an +owning provider's provenance-bearing typed contract; advertised actions also +need a real dispatcher and receipt path. + +This does not replace the current deployment next action: complete the real +Windows reboot/logon proof for Task Scheduler, the Yggdrasil tunnel, Idunn, and +the launch-correlated semantic projector heartbeat. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index b71e12b5..a8a9cc17 100644 Binary files a/state/ledgers.msgpack and b/state/ledgers.msgpack differ diff --git a/state/map.yaml b/state/map.yaml index 927d4e05..d73944a5 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -71,7 +71,7 @@ data_flow: active_subgoals: - Use `notes/conceptual-substitution-audit-2026-07-12.md` plus `notes/receipt-writer-provenance-audit-2026-07-12.md` as the current authority-corrosion maps. Snapshot promotion, synthetic smoke escape, unbound operator completion, hidden service execution flags, provider/bootstrap collapse, central/all-provider publication, production-side implicit bootstrap, orphaned external response authority, bulk readiness authority, public topology-derived provider builders, bootstrap/template-authored operator observation, writerless operator-status schema authority, SoA projection body creation, path-selection-as-body-creation, executable-name-as-provider-participation, and orphaned daemon-tool response authority are cut. Provider responses and readiness without observers are test-only; the ownerless operator-status family and counterfeit Eve provider CLI are deleted; templates are private; query mutations require the body. CultCache's backing store owns missing-read purity by returning before lock acquisition. Next audit remaining projections, caches, schedulers, adapters, and non-receipt smokes for borrowed authority or path escape. - - `swarm-overview` is an Epiphany-local, renderer-neutral diagnostic projection over provider-owned typed state. It owns no lifecycle, discovery, composition, or mutation authority. Epiphany publishes clean provider-owned Eve surfaces; Odin may discover them; downstream lowerers and compositors remain outside Epiphany's concern. + - `swarm-overview` is an Epiphany-local, renderer-neutral diagnostic projection. It owns no lifecycle, discovery, composition, or mutation authority. No live provider-owned Eve surface contract currently exists: provenance-free v0 Odin/Eve/tool rows are ignored by live consumers and retired by explicit bootstrap. Downstream lowerers and compositors remain outside Epiphany's concern. - Idunn owns managed-service reconciliation and projector child lifecycle. On this workstation, Task Scheduler owns only current-user after-login presence of the Idunn reconciler; `gamecult-ops` owns only current-user after-login presence and configuration of the foreground Yggdrasil tunnel. Self, wrappers, diagnostic projections, lifecycle receipts, Task Scheduler, and the service manager are forbidden from becoming alternate projector, semantic-readiness, or recovery owners. Historical `swarm-online-runbook` and SCM service-control routes are rejected-path evidence, not current operator actions. - Use `notes/epiphany-cultmesh-dreaming-roadmap.md` as the design authority for distributed Epiphany dreaming. Public dreams are separately authored typed documents distributed through CultMesh/CultNet; private state remains local and cannot be shared by flipping a visibility flag. Foreign dreams are external thought weather until a reviewed local adoption receipt digests them into memory, planning, doctrine, or governance. - CultMesh is now the preferred ergonomic Rust abstraction over CultCache and CultNet for Epiphany-owned local database surfaces. The Rust substrate is repo-contained under `vendor/cultcache-rs`, `vendor/cultnet-rs`, and `vendor/cultmesh-rs`; the old `E:\Projects\CultLib\crates\*` path is dead in this checkout and must not be reintroduced as a compile-time dependency. Future local Verse/dream/status work should start at CultMesh unless it is explicitly polishing CultMesh internals. `CultMeshNode::get_all_with_keys()` now exposes typed document enumeration through the mesh organ, and `CultMeshNode::soa()` exposes CultCache's typed SoA table projection without bypassing the mesh organ. Compact audits can scan local Verse receipt families, and agent-state summary documents now prove SoA readback through CultMesh columns. `epiphany-verse-query agent-state` explicitly mirrors the persisted seven-row agent-state SoA into an existing bootstrapped local Verse; `agent-state-report` reads it without mutation; wrapper `-Mode agent-state-soa` visibly composes sync then report. Compact SoA rows now include each standing faculty's role id, agent id, profile kind, portable contract, memory/goal/value counts, and `private=false`; wrapper proof `local-20260618-175913-074-b22ff01c` printed all seven faculties in one sealed line. Preserve the three-Verse boundary: `epiphany-internal` for private sub-agent typed state, `gamecult-local` for trusted LAN/Yggdrasil-tunnel GameCult project sharing, and `epiphany-global` for untrusted public dreams plus topic-specific threaded public rooms for Persona posts. @@ -717,6 +717,7 @@ current_status: - Windows host survival authority is Task Scheduler, not SCM. Tasks `Epiphany-Idunn-Managed-Service-Reconciler` and `GameCult-Yggdrasil-Tunnel` run as current user Meta with `InteractiveToken`/Limited privilege, `AtLogOn` plus a one-minute recurring recovery trigger, `IgnoreNew`, zero execution limit, and restart-on-failure at one-minute intervals (999 attempts). Each task owns only after-login process presence through one exact direct foreground action. Idunn remains sole owner of managed-service reconciliation and projector child lifecycle; Task Scheduler cannot mint projector readiness, claims, grants, recovery, or terminal evidence. `gamecult-ops` owns the Yggdrasil tunnel profile and foreground SSH process; Epiphany only consumes pinned local Qdrant ports. This is explicitly after-login physiology, not pre-login, boot-time, machine-wide, or Windows-service survival. - Live recurrence proof killed reconciler PID 24152 and observed Task Scheduler start exactly one replacement PID 25428. Killing projector PID 29868 then caused Idunn to launch PID 19888 with launch receipt `4d406060-6582-473a-9322-9f4ccc8b322f`; ready heartbeat `79fe3143-28a8-40fe-9547-0287159082e6` names provider incarnation `projector-59217a66-e3e2-44c3-b000-36af3d43b043` and the exact startup correlation. Tunnel recurrence killed SSH PID 22652 and observed PID 30444 start at 11:37:44 with Qdrant REST healthy. - Native feature-gated `epiphany-semantic-recovery-smoke` now proves abandoned-claim recovery through production process and authority boundaries without touching canonical state. In GUID-scoped Mind, Modeling, and Verse stores, a real projector acquires epoch 1, stalls against a fixture-local endpoint, and is killed; the supervisor consumes an exact current policy/lifecycle/heartbeat chain to recover epoch 2; a replacement projector consumes that authorization through the common execution path. Typed read-only inspection proves the old attempt failed, the authorization was consumed, epoch 2 is running, and the old owner is fenced; readiness and query eligibility are real. GUID Qdrant collection names are preflighted absent, deleted, and verified absent by exact 404. The fixture has no live/default Mind, Modeling, Verse, or mutation-fixture mouth. Proof `C:\Users\Meta\AppData\Local\Temp\epiphany-semantic-recovery-1152736f-b8a2-4cf0-ab24-c8a3993a0eb7\proof.json` passed. - - The `epiphany.surface.*` Hello fiction is cut. Commit `65445623` remains the completed local Persona projection repair: `epiphany.persona_surface.v0` is a strict, content-free MVP-status projection over typed Persona artifact references, and its schemas remain useful discoverable vocabulary for local projection validation. It is not a CultNet runtime capability. All seventeen unbacked `epiphany.surface.*` mutation contracts and their dead runtime constants are removed; no surface type may appear in Hello until an owning provider can prove `provider publish -> typed CultMesh document -> Snapshot -> schema validation -> Eve lowering`, with a real typed dispatcher and receipt path for every advertised action. Runtime Hello and runtime status derive the current executable contract list. They ignore stale `supported_document_types` persisted in runtime identity, so the live canonical store's historical field cannot decide present wire authority or status. A canonical real hello-frame proved zero `epiphany.surface.*` capabilities. The generic centrally authored Eve templates are the next adjacent conceptual-substitution frontier: they currently synthesize cluster surface rows while claiming daemon ownership. Map and cut that authority before treating them as live provider surfaces, but do not displace the reboot/logon deployment proof as the current next action. + - Historical June proof bullets in this map that report seven Eve surfaces, eighteen/nineteen daemon tools, or provider-backed `connect-eve`/tool/swarm-overview rows describe the now-retired provenance-free v0 projection. They are evidence of the substitution, not current availability. Live Eve and tool directories now return zero from those v0 families, `connect-eve` fails unavailable, and heartbeat cannot recreate them. + - The `epiphany.surface.*` Hello fiction is cut. Commit `65445623` remains the completed local Persona projection repair: `epiphany.persona_surface.v0` is a strict, content-free MVP-status projection over typed Persona artifact references, and its schemas remain useful discoverable vocabulary for local projection validation. It is not a CultNet runtime capability. All seventeen unbacked `epiphany.surface.*` mutation contracts and their dead runtime constants are removed; no surface type may appear in Hello until an owning provider can prove `provider publish -> typed CultMesh document -> Snapshot -> schema validation -> Eve lowering`, with a real typed dispatcher and receipt path for every advertised action. Runtime Hello and runtime status derive the current executable contract list. They ignore stale `supported_document_types` persisted in runtime identity, so the live canonical store's historical field cannot decide present wire authority or status. A canonical real hello-frame proved zero `epiphany.surface.*` capabilities. The adjacent generic central Eve substitution is also cut: `epiphany-cluster-daemon` owns liveness only; the central provider publisher and heartbeat call are deleted. Live Odin, Eve, and daemon-tool directories ignore provenance-free v0 rows, and explicit bootstrap retires stale rows of exactly those three families. Topology `eve_surface_id` is stable address/routing metadata only, not availability or composition proof. Provider discovery may return only after an owning provider emits a provenance-bearing typed contract; advertised actions additionally require a real dispatcher and receipt path. This does not displace the reboot/logon deployment proof as the current next action. - Historical Windows SCM material in this map is rejected-path evidence, not live authority. Arbitrary console `sc.exe` installation, elevated service execution runbooks/audits, cluster-service install/start/stop/control, `swarm-online-runbook`, service-manager action queues, and their wrapper routes no longer describe deployable physiology or actionable next work. Their receipts may remain sealed historical evidence, but they cannot decide liveness, readiness, recovery, or operator action. The console binaries never implemented the Windows service-control dispatcher and therefore could not honestly own SCM service state. next_action: Prove this Task Scheduler boundary across a real reboot and user logon: both tasks must return to Running, the gamecult-ops foreground tunnel must restore `127.0.0.1:16333`/`:16334`, Idunn must reconcile exactly one projector child, and that child must publish a fresh launch-correlated ready heartbeat without operator-shell custody. Record that this proves after-login recovery only; the isolated abandoned-claim recovery proof is complete but does not establish global deployability. Do not resume SCM hardening or resurrect cluster-service/elevated-runbook wrappers.