Require bootstrap before query mutations

This commit is contained in:
Meta Vens 2026-07-12 21:20:05 +01:00
commit 74407daf8a
16 changed files with 197 additions and 216 deletions

View file

@ -1,12 +1,12 @@
use anyhow::Context;
use anyhow::Result;
use chrono::Utc;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_STATUS_SCHEMA_VERSION;
use epiphany_core::EpiphanyCultMeshDaemonStatusEntry;
use epiphany_core::load_epiphany_cultmesh_cluster_topology;
use epiphany_core::load_epiphany_cultmesh_daemon_liveness;
use epiphany_core::publish_epiphany_cultmesh_provider_state;
use epiphany_core::write_epiphany_cultmesh_daemon_status;
use epiphany_core::EpiphanyCultMeshDaemonStatusEntry;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_STATUS_SCHEMA_VERSION;
use serde_json::json;
use std::env;
use std::path::PathBuf;
@ -75,7 +75,10 @@ fn write_heartbeat(args: &Args, iteration: u64) -> Result<EpiphanyCultMeshDaemon
],
operator_action: "pokeDaemon".to_string(),
private_state_exposed: false,
notes: vec!["Initial status constructed by the owning cluster daemon from persisted topology.".to_string()],
notes: vec![
"Initial status constructed by the owning cluster daemon from persisted topology."
.to_string(),
],
});
let mut next = current.clone();
next.status = args.daemon_status.clone();

View file

@ -3,13 +3,26 @@ use anyhow::Result;
use chrono::DateTime;
use chrono::Duration;
use chrono::Utc;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_RESTART_POLICY_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_SCHEDULER_RECEIPT_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_MANAGED_SERVICE_POLICY_SCHEMA_VERSION;
use epiphany_core::EpiphanyCultMeshDaemonRestartPolicyEntry;
use epiphany_core::EpiphanyCultMeshDaemonSchedulerReceiptEntry;
use epiphany_core::EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry;
use epiphany_core::EpiphanyCultMeshDaemonStatusEntry;
use epiphany_core::EpiphanyCultMeshManagedServicePolicyEntry;
use epiphany_core::EpiphanyCultMeshSwarmBrakeEntry;
use epiphany_core::EpiphanyLocalVerseContext;
use epiphany_core::EpiphanyProcessObservation as ProcessObservation;
use epiphany_core::EpiphanyServiceExecutionAuditReport;
use epiphany_core::epiphany_cluster_service_execution_audit_report;
use epiphany_core::epiphany_cultmesh_daemon_poke_intent_from_status;
use epiphany_core::epiphany_cultmesh_daemon_poke_receipt_for_intent;
use epiphany_core::epiphany_service_execution_audit_report;
use epiphany_core::load_epiphany_cultmesh_cluster_topology;
use epiphany_core::load_epiphany_cultmesh_daemon_restart_policy;
use epiphany_core::load_epiphany_cultmesh_daemon_service_lifecycle_receipts;
use epiphany_core::load_epiphany_cultmesh_cluster_topology;
use epiphany_core::load_epiphany_cultmesh_managed_service_policies;
use epiphany_core::load_epiphany_cultmesh_managed_service_policy;
use epiphany_core::load_epiphany_cultmesh_status;
@ -24,21 +37,8 @@ use epiphany_core::write_epiphany_cultmesh_daemon_scheduler_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_service_lifecycle_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_status;
use epiphany_core::write_epiphany_cultmesh_managed_service_policy;
use epiphany_core::EpiphanyCultMeshDaemonRestartPolicyEntry;
use epiphany_core::EpiphanyCultMeshDaemonSchedulerReceiptEntry;
use epiphany_core::EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry;
use epiphany_core::EpiphanyCultMeshDaemonStatusEntry;
use epiphany_core::EpiphanyCultMeshManagedServicePolicyEntry;
use epiphany_core::EpiphanyCultMeshSwarmBrakeEntry;
use epiphany_core::EpiphanyLocalVerseContext;
use epiphany_core::EpiphanyProcessObservation as ProcessObservation;
use epiphany_core::EpiphanyServiceExecutionAuditReport;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_RESTART_POLICY_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_SCHEDULER_RECEIPT_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_MANAGED_SERVICE_POLICY_SCHEMA_VERSION;
use serde_json::json;
use serde_json::Value;
use serde_json::json;
use sha2::Digest;
use sha2::Sha256;
use std::env;
@ -144,8 +144,7 @@ fn require_supervisor_bootstrap(args: &Args) -> Result<()> {
args.store.display()
)
})?;
let topology =
load_epiphany_cultmesh_cluster_topology(&args.store, args.runtime_id.clone())?;
let topology = load_epiphany_cultmesh_cluster_topology(&args.store, args.runtime_id.clone())?;
if topology.is_empty() {
anyhow::bail!(
"local Verse has no persisted cluster topology at {}; run explicit bootstrap before daemon-supervisor commands",
@ -161,9 +160,7 @@ fn seed_supervisor_smoke_fixture(args: &Args) -> Result<()> {
.components()
.any(|component| component.as_os_str() == ".epiphany-smoke")
{
anyhow::bail!(
"daemon-supervisor smoke fixtures may write only beneath .epiphany-smoke"
);
anyhow::bail!("daemon-supervisor smoke fixtures may write only beneath .epiphany-smoke");
}
seed_epiphany_local_verse_context(
&args.store,
@ -173,7 +170,6 @@ fn seed_supervisor_smoke_fixture(args: &Args) -> Result<()> {
}
fn reconcile(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -417,7 +413,6 @@ fn service_launch(args: Args) -> Result<()> {
}
fn managed_service_policy(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let command = service_command_path(&args)?;
@ -648,7 +643,6 @@ fn managed_service_reconcile(mut args: Args) -> Result<()> {
}
fn service_runbook(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -702,7 +696,6 @@ fn service_runbook(args: Args) -> Result<()> {
}
fn repo_work_service_audit(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -897,7 +890,6 @@ fn service_artifact_status(artifact_ref: &str) -> &'static str {
}
fn cluster_daemon_runbook(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -968,7 +960,6 @@ fn cluster_daemon_runbook(args: Args) -> Result<()> {
}
fn cluster_windows_service_install(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1098,7 +1089,6 @@ fn cluster_windows_service_install(args: Args) -> Result<()> {
}
fn cluster_windows_service_audit(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1206,7 +1196,6 @@ fn cluster_windows_service_audit(args: Args) -> Result<()> {
}
fn cluster_windows_service_control(args: Args, control: &str) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1345,7 +1334,6 @@ fn cluster_windows_service_control(args: Args, control: &str) -> Result<()> {
}
fn windows_service_install(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1441,7 +1429,6 @@ fn windows_service_install(args: Args) -> Result<()> {
}
fn windows_service_status(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1498,7 +1485,6 @@ fn windows_service_status(args: Args) -> Result<()> {
}
fn windows_service_execution_readiness(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1551,7 +1537,6 @@ fn windows_service_execution_readiness(args: Args) -> Result<()> {
}
fn cluster_windows_service_execution_readiness(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1618,7 +1603,6 @@ fn cluster_windows_service_execution_readiness(args: Args) -> Result<()> {
}
fn windows_service_execution_audit(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1680,7 +1664,6 @@ fn windows_service_execution_audit(args: Args) -> Result<()> {
}
fn windows_service_execution_audit_smoke(args: Args) -> Result<()> {
seed_supervisor_smoke_fixture(&args)?;
let started_at = Utc::now();
@ -1771,7 +1754,6 @@ fn windows_service_execution_audit_smoke(args: Args) -> Result<()> {
}
fn cluster_windows_service_execution_runbook(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1862,7 +1844,6 @@ fn cluster_windows_service_execution_runbook(args: Args) -> Result<()> {
}
fn cluster_windows_service_execution_audit(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -1923,7 +1904,6 @@ fn cluster_windows_service_execution_audit(args: Args) -> Result<()> {
}
fn cluster_windows_service_execution_audit_smoke(args: Args) -> Result<()> {
seed_supervisor_smoke_fixture(&args)?;
let started_at = Utc::now();
@ -2071,7 +2051,6 @@ fn elevated_powershell_runbook_command(path: &str) -> String {
}
fn windows_service_execution_runbook(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -2165,7 +2144,6 @@ fn windows_service_execution_runbook(args: Args) -> Result<()> {
}
fn windows_service_reconcile(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -2264,7 +2242,6 @@ fn windows_service_reconcile(args: Args) -> Result<()> {
}
fn windows_service_control(args: Args, control: &str) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
@ -2509,7 +2486,6 @@ fn run_tick(args: &Args, iteration: u64, next_wake_utc: Option<String>) -> Resul
}
fn write_policy(args: Args) -> Result<()> {
require_supervisor_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;

View file

@ -1,8 +1,8 @@
use anyhow::Context;
use anyhow::Result;
use anyhow::anyhow;
use epiphany_core::GhostlightSceneParticipantSeed;
use epiphany_core::EpiphanyCultMeshSwarmBrakeEntry;
use epiphany_core::GhostlightSceneParticipantSeed;
use epiphany_core::HeartbeatCompleteOptions;
use epiphany_core::HeartbeatHeatUpdateOptions;
use epiphany_core::HeartbeatPumpOptions;
@ -391,7 +391,9 @@ fn main() -> Result<()> {
}
"serve" => {
if interval_seconds == 0 {
return Err(anyhow!("serve requires --interval-seconds greater than zero"));
return Err(anyhow!(
"serve requires --interval-seconds greater than zero"
));
}
let store_path = store_path.ok_or_else(|| anyhow!("serve requires --store"))?;
let artifact_dir =
@ -557,11 +559,10 @@ fn active_swarm_brake(
if !local_verse_store.exists() {
return Ok(None);
}
Ok(load_epiphany_cultmesh_swarm_brake(
local_verse_store,
"epiphany-local",
)?
.filter(|brake| brake.status == "engaged"))
Ok(
load_epiphany_cultmesh_swarm_brake(local_verse_store, "epiphany-local")?
.filter(|brake| brake.status == "engaged"),
)
}
fn parse_scene_participant(raw: &str) -> Result<GhostlightSceneParticipantSeed> {

View file

@ -1,6 +1,11 @@
use anyhow::Context;
use anyhow::Result;
use chrono::Utc;
use epiphany_core::EPIPHANY_CULTMESH_INTERNAL_VERSE_ID;
use epiphany_core::EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_SCHEMA_VERSION;
use epiphany_core::EpiphanyCultMeshOperatorRunIntentEntry;
use epiphany_core::EpiphanyCultMeshOperatorRunReceiptEntry;
use epiphany_core::epiphany_cultmesh_coordinator_run_receipt_from_summary_json;
use epiphany_core::epiphany_cultmesh_hands_action_gate_from_summary_json;
use epiphany_core::epiphany_cultmesh_role_review_event_from_summary_json;
@ -11,13 +16,8 @@ use epiphany_core::write_epiphany_cultmesh_hands_action_gate;
use epiphany_core::write_epiphany_cultmesh_operator_run_intent;
use epiphany_core::write_epiphany_cultmesh_operator_run_receipt;
use epiphany_core::write_epiphany_cultmesh_role_review_event;
use epiphany_core::EpiphanyCultMeshOperatorRunIntentEntry;
use epiphany_core::EpiphanyCultMeshOperatorRunReceiptEntry;
use epiphany_core::EPIPHANY_CULTMESH_INTERNAL_VERSE_ID;
use epiphany_core::EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_OPERATOR_RUN_RECEIPT_SCHEMA_VERSION;
use serde_json::json;
use serde_json::Value;
use serde_json::json;
use std::env;
use std::fs;
use std::path::PathBuf;

View file

@ -4,8 +4,8 @@ use chrono::Utc;
use epiphany_core::epiphany_cultmesh_operator_snapshot_from_status_json;
use epiphany_core::load_latest_epiphany_cultmesh_operator_snapshot;
use epiphany_core::write_epiphany_cultmesh_operator_snapshot;
use serde_json::json;
use serde_json::Value;
use serde_json::json;
use std::env;
use std::fs;
use std::path::PathBuf;

View file

@ -1,13 +1,13 @@
use anyhow::anyhow;
use anyhow::Context;
use anyhow::Result;
use anyhow::anyhow;
use chrono::Utc;
use epiphany_core::write_epiphany_cultmesh_idunn_aftercare_audit_receipt;
use epiphany_core::write_epiphany_cultmesh_idunn_deployment_receipt;
use epiphany_core::EpiphanyCultMeshIdunnAftercareAuditReceiptEntry;
use epiphany_core::EpiphanyCultMeshIdunnDeploymentReceiptEntry;
use serde_json::json;
use epiphany_core::write_epiphany_cultmesh_idunn_aftercare_audit_receipt;
use epiphany_core::write_epiphany_cultmesh_idunn_deployment_receipt;
use serde_json::Value;
use serde_json::json;
use std::env;
use std::fs;
use std::path::Path;

View file

@ -1,78 +1,10 @@
use anyhow::Context;
use anyhow::Result;
use chrono::Utc;
use epiphany_core::default_epiphany_cultmesh_swarm_brake;
use epiphany_core::epiphany_cluster_service_execution_audit_report;
use epiphany_core::epiphany_cultmesh_agent_state_soa_summary_from_entry;
use epiphany_core::epiphany_cultmesh_bifrost_body_change_publication_intent;
use epiphany_core::epiphany_cultmesh_bifrost_body_change_publication_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_bifrost_collaboration_feedback;
use epiphany_core::epiphany_cultmesh_bifrost_github_publication_receipt_for_publication;
use epiphany_core::epiphany_cultmesh_daemon_poke_intent_from_status;
use epiphany_core::epiphany_cultmesh_daemon_poke_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_daemon_tool_invocation_intent_from_capability;
use epiphany_core::epiphany_cultmesh_daemon_tool_invocation_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_eve_connection_intent_from_advertisement;
use epiphany_core::epiphany_cultmesh_eve_connection_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_imagination_consensus_receipt_for_feedback;
use epiphany_core::epiphany_service_execution_audit_report;
use epiphany_core::load_agent_state_soa_entry;
use epiphany_core::load_epiphany_cultmesh_cluster_topology;
use epiphany_core::load_epiphany_cultmesh_daemon_liveness;
use epiphany_core::load_epiphany_cultmesh_daemon_restart_policy_directory;
use epiphany_core::load_epiphany_cultmesh_daemon_service_lifecycle_receipts;
use epiphany_core::load_epiphany_cultmesh_daemon_tool_directory;
use epiphany_core::load_epiphany_cultmesh_eve_surface_directory;
use epiphany_core::load_epiphany_cultmesh_managed_service_policies;
use epiphany_core::load_epiphany_cultmesh_repo_work_map_entries;
use epiphany_core::load_epiphany_cultmesh_repo_work_overviews;
use epiphany_core::load_epiphany_cultmesh_repo_work_public_proofs;
use epiphany_core::load_epiphany_cultmesh_repo_work_readiness_reports;
use epiphany_core::load_epiphany_cultmesh_repo_work_readiness_reviews;
use epiphany_core::load_epiphany_cultmesh_swarm_brake;
use epiphany_core::load_latest_epiphany_cultmesh_agent_state_soa_summary;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_collaboration_feedback;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_github_publication_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_metrics_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_daemon_tool_invocation_intent;
use epiphany_core::load_latest_epiphany_cultmesh_eve_connection_intent;
use epiphany_core::load_latest_epiphany_cultmesh_eve_connection_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_idunn_aftercare_audit_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_idunn_deployment_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_imagination_consensus_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_map_entry;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_overview;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_public_proof;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_readiness;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_readiness_review;
use epiphany_core::observe_native_process;
use epiphany_core::open_epiphany_cultmesh_node;
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;
use epiphany_core::write_epiphany_cultmesh_bifrost_body_change_publication_intent;
use epiphany_core::write_epiphany_cultmesh_bifrost_body_change_publication_receipt;
use epiphany_core::write_epiphany_cultmesh_bifrost_collaboration_feedback;
use epiphany_core::write_epiphany_cultmesh_bifrost_github_publication_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_poke_intent;
use epiphany_core::write_epiphany_cultmesh_daemon_poke_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_restart_policy;
use epiphany_core::write_epiphany_cultmesh_daemon_service_lifecycle_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_status;
use epiphany_core::write_epiphany_cultmesh_daemon_statuses;
use epiphany_core::write_epiphany_cultmesh_daemon_tool_invocation_intent;
use epiphany_core::write_epiphany_cultmesh_daemon_tool_invocation_receipt;
use epiphany_core::write_epiphany_cultmesh_eve_connection_intent;
use epiphany_core::write_epiphany_cultmesh_eve_connection_receipt;
use epiphany_core::write_epiphany_cultmesh_imagination_consensus_receipt;
use epiphany_core::publish_epiphany_cultmesh_provider_state;
use epiphany_core::write_epiphany_cultmesh_swarm_brake;
use epiphany_core::write_epiphany_cultmesh_work_loop_telemetry;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_RESTART_POLICY_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_INTERNAL_VERSE_ID;
use epiphany_core::EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION;
use epiphany_core::EpiphanyAgentStateSoaEntry;
use epiphany_core::EpiphanyCultMeshAgentStateSoaSummaryEntry;
use epiphany_core::EpiphanyCultMeshBifrostArtifactAcceptanceReceiptEntry;
@ -103,10 +35,79 @@ use epiphany_core::EpiphanyCultMeshSwarmBrakeEntry;
use epiphany_core::EpiphanyCultMeshWorkLoopTelemetryEntry;
use epiphany_core::EpiphanyLocalVerseContext;
use epiphany_core::EpiphanyServiceExecutionAuditCheck;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_RESTART_POLICY_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_SCHEMA_VERSION;
use epiphany_core::EPIPHANY_CULTMESH_INTERNAL_VERSE_ID;
use epiphany_core::EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION;
use epiphany_core::default_epiphany_cultmesh_swarm_brake;
use epiphany_core::epiphany_cluster_service_execution_audit_report;
use epiphany_core::epiphany_cultmesh_agent_state_soa_summary_from_entry;
use epiphany_core::epiphany_cultmesh_bifrost_body_change_publication_intent;
use epiphany_core::epiphany_cultmesh_bifrost_body_change_publication_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_bifrost_collaboration_feedback;
use epiphany_core::epiphany_cultmesh_bifrost_github_publication_receipt_for_publication;
use epiphany_core::epiphany_cultmesh_daemon_poke_intent_from_status;
use epiphany_core::epiphany_cultmesh_daemon_poke_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_daemon_tool_invocation_intent_from_capability;
use epiphany_core::epiphany_cultmesh_daemon_tool_invocation_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_eve_connection_intent_from_advertisement;
use epiphany_core::epiphany_cultmesh_eve_connection_receipt_for_intent;
use epiphany_core::epiphany_cultmesh_imagination_consensus_receipt_for_feedback;
use epiphany_core::epiphany_service_execution_audit_report;
use epiphany_core::load_agent_state_soa_entry;
use epiphany_core::load_epiphany_cultmesh_cluster_topology;
use epiphany_core::load_epiphany_cultmesh_daemon_liveness;
use epiphany_core::load_epiphany_cultmesh_daemon_restart_policy_directory;
use epiphany_core::load_epiphany_cultmesh_daemon_service_lifecycle_receipts;
use epiphany_core::load_epiphany_cultmesh_daemon_tool_directory;
use epiphany_core::load_epiphany_cultmesh_eve_surface_directory;
use epiphany_core::load_epiphany_cultmesh_managed_service_policies;
use epiphany_core::load_epiphany_cultmesh_repo_work_map_entries;
use epiphany_core::load_epiphany_cultmesh_repo_work_overviews;
use epiphany_core::load_epiphany_cultmesh_repo_work_public_proofs;
use epiphany_core::load_epiphany_cultmesh_repo_work_readiness_reports;
use epiphany_core::load_epiphany_cultmesh_repo_work_readiness_reviews;
use epiphany_core::load_epiphany_cultmesh_status;
use epiphany_core::load_epiphany_cultmesh_swarm_brake;
use epiphany_core::load_latest_epiphany_cultmesh_agent_state_soa_summary;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_artifact_acceptance_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_body_change_publication_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_collaboration_feedback;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_github_publication_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_metrics_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_bifrost_public_proof_publication_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_daemon_tool_invocation_intent;
use epiphany_core::load_latest_epiphany_cultmesh_eve_connection_intent;
use epiphany_core::load_latest_epiphany_cultmesh_eve_connection_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_idunn_aftercare_audit_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_idunn_deployment_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_imagination_consensus_receipt;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_map_entry;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_overview;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_public_proof;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_readiness;
use epiphany_core::load_latest_epiphany_cultmesh_repo_work_readiness_review;
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;
use epiphany_core::write_epiphany_cultmesh_bifrost_body_change_publication_intent;
use epiphany_core::write_epiphany_cultmesh_bifrost_body_change_publication_receipt;
use epiphany_core::write_epiphany_cultmesh_bifrost_collaboration_feedback;
use epiphany_core::write_epiphany_cultmesh_bifrost_github_publication_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_poke_intent;
use epiphany_core::write_epiphany_cultmesh_daemon_poke_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_restart_policy;
use epiphany_core::write_epiphany_cultmesh_daemon_service_lifecycle_receipt;
use epiphany_core::write_epiphany_cultmesh_daemon_status;
use epiphany_core::write_epiphany_cultmesh_daemon_statuses;
use epiphany_core::write_epiphany_cultmesh_daemon_tool_invocation_intent;
use epiphany_core::write_epiphany_cultmesh_daemon_tool_invocation_receipt;
use epiphany_core::write_epiphany_cultmesh_eve_connection_intent;
use epiphany_core::write_epiphany_cultmesh_eve_connection_receipt;
use epiphany_core::write_epiphany_cultmesh_imagination_consensus_receipt;
use epiphany_core::write_epiphany_cultmesh_swarm_brake;
use epiphany_core::write_epiphany_cultmesh_work_loop_telemetry;
use serde::Serialize;
use serde_json::json;
use sha2::Digest;
@ -186,6 +187,24 @@ fn main() -> Result<()> {
}
}
fn require_query_bootstrap(args: &Args) -> Result<()> {
load_epiphany_cultmesh_status(&args.store, args.runtime_id.clone())?
.with_context(|| {
format!(
"local Verse is not bootstrapped at {}; run epiphany-verse-query seed-compact before mutating query commands",
args.store.display()
)
})?;
let topology = load_epiphany_cultmesh_cluster_topology(&args.store, args.runtime_id.clone())?;
if topology.is_empty() {
anyhow::bail!(
"local Verse has no persisted cluster topology at {}; run epiphany-verse-query seed-compact before mutating query commands",
args.store.display()
);
}
Ok(())
}
fn run_cli() -> Result<()> {
let args = Args::parse()?;
match args.command.as_str() {
@ -361,11 +380,8 @@ fn run_cli() -> Result<()> {
run_invoke_tool_command(&args)?;
}
"swarm-brake" | "brake" => {
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
let created_at_utc = Utc::now().to_rfc3339();
let status = args
@ -564,11 +580,9 @@ fn run_cli() -> Result<()> {
}
"poke-daemon" | "daemon-poke" => {
reject_daemon_poke_response_fields(&args)?;
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
let daemon_id = args
.daemon_id
@ -595,13 +609,8 @@ fn run_cli() -> Result<()> {
.collect::<String>()
)
});
let poke_result = write_daemon_poke_intent(
&args,
&context,
daemon_status,
intent_id,
reason,
)?;
let poke_result =
write_daemon_poke_intent(&args, &context, daemon_status, intent_id, reason)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
if context.latest_daemon_poke_intent.is_none() {
anyhow::bail!("local Verse query lost daemon poke intent after write");
@ -627,11 +636,9 @@ fn run_cli() -> Result<()> {
}
"poke-down-daemons" | "poke-unready-daemons" | "daemon-poke-down" => {
reject_daemon_poke_response_fields(&args)?;
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(&args)?;
let context = query_epiphany_local_verse_context(&args.store, args.runtime_id.clone())?;
let pokes = write_poke_intents_for_non_ready_daemons(&args, &context)?;
let poke_tui_rows = pokes.iter().map(poke_result_tui_row).collect::<Vec<_>>();
@ -790,11 +797,9 @@ fn run_cli() -> Result<()> {
"bifrost-publication accepts requester intent fields only; Bifrost and the GitHub publication adapter own receipt, ledger, credit, and publication-result fields"
);
}
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(&args)?;
let intent_id = args
.intent_id
.clone()
@ -917,11 +922,9 @@ fn run_cli() -> Result<()> {
"bifrost-public-proof selects a pending public proof only; Bifrost owns ledger, review, credit, destination, publication, and receipt result fields"
);
}
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(&args)?;
let (latest_public_proof, public_proofs) = load_repo_work_public_proofs(&args)?;
let selected_public_proof = if let Some(public_proof_id) = args.public_proof_id.as_ref()
{
@ -980,11 +983,9 @@ fn run_cli() -> Result<()> {
"bifrost-artifact-acceptance inspects a pending repo request only; Maintainer/Bifrost owns artifact, proof, review, ledger, acceptance identity/status, and accepted-by result fields"
);
}
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(&args)?;
let (_, map_entries) = load_repo_work_map_entries(&args)?;
let map_entry = latest_repo_work_map_entry_for_family(
&map_entries,
@ -1036,11 +1037,9 @@ fn run_cli() -> Result<()> {
"bifrost-metrics inspects a pending repo request only; Bifrost/Maintainer owns accepted artifact, spend, review load, credit, proof, summary, and receipt result fields"
);
}
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(&args)?;
let (_, map_entries) = load_repo_work_map_entries(&args)?;
let map_entry =
latest_repo_work_map_entry_for_family(&map_entries, "repo.metrics_request")
@ -1127,11 +1126,9 @@ fn run_cli() -> Result<()> {
"collaboration-feedback accepts Persona feedback fields only; Imagination owns consensus receipt, participants, packet, status, and adoption gate"
);
}
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(&args)?;
let feedback_id = args
.feedback_id
.clone()
@ -1239,11 +1236,9 @@ fn run_cli() -> Result<()> {
"connect-eve accepts consumer intent fields only; the advertised Eve provider owns connection receipt id and status"
);
}
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(&args)?;
let directory =
load_epiphany_cultmesh_eve_surface_directory(&args.store, args.runtime_id.clone())?;
let (_target_cluster, target, _target_surface) = if let Some(advertisement_id) =
@ -1348,10 +1343,9 @@ 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(),
)? {
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(),
@ -9361,11 +9355,7 @@ fn bifrost_accounting_status(closed: bool, present: bool, private_state_exposed:
}
fn present_word(present: bool) -> &'static str {
if present {
"present"
} else {
"missing"
}
if present { "present" } else { "missing" }
}
fn collaboration_feedback_tui_rows(
@ -9524,11 +9514,9 @@ fn run_invoke_tool_command(args: &Args) -> Result<()> {
"invoke-tool accepts requester intent fields only; the host daemon owns receipt status, result references, and result summaries"
);
}
seed_epiphany_local_verse_context(
&args.store,
args.runtime_id.clone(),
Utc::now().to_rfc3339(),
)?;
require_query_bootstrap(args)?;
let capability_id = args
.capability_id
.as_deref()

View file

@ -1,19 +1,19 @@
use anyhow::Result;
use chrono::Utc;
use epiphany_core::EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID;
use epiphany_core::EPIPHANY_CULTMESH_WEKSA_LOWERING_RECEIPT_SCHEMA_VERSION;
use epiphany_core::EpiphanyCultMeshWeksaLoweringReceiptEntry;
use epiphany_core::WEKSA_INTERLINGUA_PACKET_SCHEMA_VERSION;
use epiphany_core::WEKSA_TARGET_LOWERING_RECEIPT_SCHEMA_VERSION;
use epiphany_core::WEKSA_TARGET_LOWERING_REQUEST_SCHEMA_VERSION;
use epiphany_core::WeksaInterlinguaInput;
use epiphany_core::WeksaSpeakerContext;
use epiphany_core::build_weksa_interlingua_packet;
use epiphany_core::build_weksa_lowering_prompt;
use epiphany_core::build_weksa_target_lowering_request;
use epiphany_core::load_latest_epiphany_cultmesh_weksa_lowering_receipt;
use epiphany_core::record_weksa_target_lowering_receipt;
use epiphany_core::write_epiphany_cultmesh_weksa_lowering_receipt;
use epiphany_core::EpiphanyCultMeshWeksaLoweringReceiptEntry;
use epiphany_core::WeksaInterlinguaInput;
use epiphany_core::WeksaSpeakerContext;
use epiphany_core::EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID;
use epiphany_core::EPIPHANY_CULTMESH_WEKSA_LOWERING_RECEIPT_SCHEMA_VERSION;
use epiphany_core::WEKSA_INTERLINGUA_PACKET_SCHEMA_VERSION;
use epiphany_core::WEKSA_TARGET_LOWERING_RECEIPT_SCHEMA_VERSION;
use epiphany_core::WEKSA_TARGET_LOWERING_REQUEST_SCHEMA_VERSION;
use std::path::PathBuf;
fn main() -> Result<()> {

View file

@ -7179,11 +7179,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,
)?;
publish_epiphany_cultmesh_provider_state(store, "epiphany-test", &cluster.daemon_id)?;
}
Ok(())
}
@ -8659,11 +8655,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",
)?;
publish_epiphany_cultmesh_provider_state(&store, "epiphany-test", "epiphany-daemon-hands")?;
let node = open_epiphany_cultmesh_node(&store, "epiphany-test")?;
let hands_action = node.get_required::<EpiphanyCultMeshDaemonToolCapabilityEntry>(
@ -9334,27 +9326,29 @@ mod tests {
let store = temp.path().join("epiphany-provider-boundary.ccmp");
seed_epiphany_local_verse_context(&store, "epiphany-test", "2026-07-12T00:00:00Z")?;
publish_epiphany_cultmesh_provider_state(
&store,
"epiphany-test",
"epiphany-daemon-hands",
)?;
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);
assert!(context
.odin_advertisements
.iter()
.all(|entry| entry.cluster_id == "epiphany.cluster.hands"));
assert!(context
.eve_surface_states
.iter()
.all(|entry| entry.cluster_id == "epiphany.cluster.hands"));
assert!(context
.daemon_tool_capabilities
.iter()
.all(|entry| entry.host_daemon_id == "epiphany-daemon-hands"));
assert!(
context
.odin_advertisements
.iter()
.all(|entry| entry.cluster_id == "epiphany.cluster.hands")
);
assert!(
context
.eve_surface_states
.iter()
.all(|entry| entry.cluster_id == "epiphany.cluster.hands")
);
assert!(
context
.daemon_tool_capabilities
.iter()
.all(|entry| entry.host_daemon_id == "epiphany-daemon-hands")
);
let error = publish_epiphany_cultmesh_provider_state(
&store,

View file

@ -21,9 +21,9 @@ mod modeling_gateway;
mod organ_dependencies;
mod persona_memory_cache;
mod persona_turn;
mod process_observation;
mod promotion;
mod prompt_context;
mod process_observation;
mod proposal;
mod retrieval;
mod runtime_spine;
@ -221,8 +221,6 @@ pub use cultmesh_integration::EPIPHANY_CULTMESH_DAEMON_SCHEDULER_RECEIPT_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_LATEST_KEY;
pub use cultmesh_integration::EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_MANAGED_SERVICE_POLICY_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_MANAGED_SERVICE_POLICY_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_DAEMON_STATUS_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_DAEMON_STATUS_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_DAEMON_TOOL_CAPABILITY_SCHEMA_VERSION;
@ -259,6 +257,8 @@ pub use cultmesh_integration::EPIPHANY_CULTMESH_INTERNAL_TIER;
pub use cultmesh_integration::EPIPHANY_CULTMESH_INTERNAL_VERSE_ID;
pub use cultmesh_integration::EPIPHANY_CULTMESH_LOCAL_AREA_TIER;
pub use cultmesh_integration::EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID;
pub use cultmesh_integration::EPIPHANY_CULTMESH_MANAGED_SERVICE_POLICY_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_MANAGED_SERVICE_POLICY_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_MIND_CONTRACT_SCHEMA_VERSION;
pub use cultmesh_integration::EPIPHANY_CULTMESH_MIND_CONTRACT_TYPE;
pub use cultmesh_integration::EPIPHANY_CULTMESH_OPERATOR_RUN_INTENT_LATEST_KEY;
@ -329,7 +329,6 @@ pub use cultmesh_integration::EpiphanyCultMeshDaemonPokeReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshDaemonRestartPolicyEntry;
pub use cultmesh_integration::EpiphanyCultMeshDaemonSchedulerReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshManagedServicePolicyEntry;
pub use cultmesh_integration::EpiphanyCultMeshDaemonStatusEntry;
pub use cultmesh_integration::EpiphanyCultMeshDaemonToolCapabilityEntry;
pub use cultmesh_integration::EpiphanyCultMeshDaemonToolInvocationIntentEntry;
@ -345,6 +344,7 @@ pub use cultmesh_integration::EpiphanyCultMeshHandsContractEntry;
pub use cultmesh_integration::EpiphanyCultMeshIdunnAftercareAuditReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshIdunnDeploymentReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshImaginationConsensusReceiptEntry;
pub use cultmesh_integration::EpiphanyCultMeshManagedServicePolicyEntry;
pub use cultmesh_integration::EpiphanyCultMeshMindContractEntry;
pub use cultmesh_integration::EpiphanyCultMeshOdinAdvertisementEntry;
pub use cultmesh_integration::EpiphanyCultMeshOperatorRunIntentEntry;
@ -413,12 +413,12 @@ pub use cultmesh_integration::load_epiphany_cultmesh_daemon_liveness;
pub use cultmesh_integration::load_epiphany_cultmesh_daemon_restart_policy;
pub use cultmesh_integration::load_epiphany_cultmesh_daemon_restart_policy_directory;
pub use cultmesh_integration::load_epiphany_cultmesh_daemon_service_lifecycle_receipts;
pub use cultmesh_integration::load_epiphany_cultmesh_managed_service_policy;
pub use cultmesh_integration::load_epiphany_cultmesh_managed_service_policies;
pub use cultmesh_integration::load_epiphany_cultmesh_daemon_tool_directory;
pub use cultmesh_integration::load_epiphany_cultmesh_eve_surface_directory;
pub use cultmesh_integration::load_epiphany_cultmesh_idunn_aftercare_audit_receipt;
pub use cultmesh_integration::load_epiphany_cultmesh_idunn_deployment_receipt;
pub use cultmesh_integration::load_epiphany_cultmesh_managed_service_policies;
pub use cultmesh_integration::load_epiphany_cultmesh_managed_service_policy;
pub use cultmesh_integration::load_epiphany_cultmesh_operator_snapshot;
pub use cultmesh_integration::load_epiphany_cultmesh_operator_status;
pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_map_entries;
@ -462,6 +462,7 @@ 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::query_epiphany_local_verse_context;
pub use cultmesh_integration::seed_epiphany_local_verse_context;
pub use cultmesh_integration::write_epiphany_cultmesh_agent_state_soa_summary;
@ -480,7 +481,6 @@ pub use cultmesh_integration::write_epiphany_cultmesh_daemon_poke_receipt;
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_restart_policy;
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_scheduler_receipt;
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_service_lifecycle_receipt;
pub use cultmesh_integration::write_epiphany_cultmesh_managed_service_policy;
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_status;
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_statuses;
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_tool_invocation_intent;
@ -494,7 +494,7 @@ pub use cultmesh_integration::write_epiphany_cultmesh_hands_contracts;
pub use cultmesh_integration::write_epiphany_cultmesh_idunn_aftercare_audit_receipt;
pub use cultmesh_integration::write_epiphany_cultmesh_idunn_deployment_receipt;
pub use cultmesh_integration::write_epiphany_cultmesh_imagination_consensus_receipt;
pub use cultmesh_integration::publish_epiphany_cultmesh_provider_state;
pub use cultmesh_integration::write_epiphany_cultmesh_managed_service_policy;
pub use cultmesh_integration::write_epiphany_cultmesh_mind_contracts;
pub use cultmesh_integration::write_epiphany_cultmesh_operator_run_intent;
pub use cultmesh_integration::write_epiphany_cultmesh_operator_run_receipt;
@ -668,8 +668,6 @@ pub use modeling_gateway::RepoWorkMapEntry;
pub use modeling_gateway::RepoWorkModelingFinding;
pub use modeling_gateway::RepoWorkModelingRequest;
pub use modeling_gateway::RepoWorkModelingRoute;
pub use process_observation::EpiphanyProcessObservation;
pub use process_observation::observe_native_process;
pub use organ_dependencies::EPIPHANY_LAUNCH_ORGAN_CONTRACT_SCHEMA_VERSION;
pub use organ_dependencies::EPIPHANY_ORGAN_DEPENDENCY_SCHEMA_VERSION;
pub use organ_dependencies::EPIPHANY_STANDING_ORGANS;
@ -715,6 +713,8 @@ pub use persona_turn::build_persona_turn_prompt;
pub use persona_turn::persona_projected_surface_is_clean;
pub use persona_turn::render_persona_semantic_memory_recall;
pub use persona_turn::semantic_memory_recall_from_heartbeat_action;
pub use process_observation::EpiphanyProcessObservation;
pub use process_observation::observe_native_process;
pub use promotion::EpiphanyPromotionDecision;
pub use promotion::EpiphanyPromotionInput;
pub use promotion::EpiphanyStateReplacementValidationInput;

View file

@ -397,6 +397,8 @@ mod tests {
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::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;
@ -405,8 +407,6 @@ mod tests {
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::load_epiphany_cultmesh_cluster_topology;
use crate::publish_epiphany_cultmesh_provider_state;
use crate::write_epiphany_cultmesh_work_loop_telemetry;
use epiphany_state_model::EpiphanyMemoryContextPacket;
use epiphany_state_model::EpiphanyMemoryFreshnessStatus;
@ -418,11 +418,7 @@ mod tests {
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,
)?;
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

View file

@ -153,3 +153,19 @@ retain explicit fixture initialization, but it is isolated behind
`seed_supervisor_smoke_fixture`, which refuses every store outside an
`.epiphany-smoke` path before writing. Idunn consumes shared initialization; it
does not own or repair it.
## Query mutation/bootstrap split
Ten requester/operator paths in `epiphany-verse-query` still invoked generic
bootstrap: swarm brake, single/batch daemon poke, daemon tool intent, Bifrost
body-change/public-proof/artifact/metrics requests, Persona collaboration
feedback, and Eve connection intent. A bounded requester could therefore create
shared policy, topology, contracts, brake defaults, and operator status merely
by submitting its own document.
Only the explicit `seed`, `seed-compact`/`seed-only`, and quarantined `smoke`
paths may initialize the local Verse. Every other mutating query command passes
`require_query_bootstrap`, which reads persisted Epiphany status and topology
and refuses before store creation when either is absent. Requesters now write
into an existing body; they cannot manufacture the body as a side effect of
asking it for work.

View file

@ -102,6 +102,10 @@
every production lifecycle, policy, scheduler, runbook, audit, status, and
control path. Only its two synthetic audit-smoke commands may initialize
fixtures, and only beneath `.epiphany-smoke`.
- In `epiphany-verse-query`, only explicit seed commands and the fixed
quarantined smoke initialize local Verse state. Every operator/requester
mutation requires persisted status and topology before writing its bounded
brake, poke, tool, Eve, Bifrost, metrics, artifact, or feedback document.
- Store/runtime overrides fail before fixture seeding or receipt construction.
- Negative proof: targeting `state/local-verse.ccmp` was rejected and its SHA-256 did not change.
- Positive proof: the built-in quarantined smoke completes successfully and reports its quarantine coordinates.

View file

@ -27,6 +27,9 @@ The confirmed conceptual substitutions have been cut:
- daemon-supervisor production commands likewise require persisted bootstrap
and cannot create shared state. Its two audit-smoke fixture initializers are
hard-confined beneath `.epiphany-smoke`.
- query-CLI requester/operator mutations also require persisted bootstrap.
Only explicit seed commands and the fixed aggregate smoke may initialize the
shared local Verse.
The presentation boundary is now plain: `swarm overview` is a generic compact read-only projection. Gjallar is a downstream TUI application on Nightwing and is not an Epiphany organ, provider, owner, runtime, or architectural dependency. Eve/CultUI graphs may be lowered or composited downstream without Epiphany caring which presentation client does it.

Binary file not shown.

View file

@ -70,7 +70,7 @@ data_flow:
- move historical proof to git, commits, smoke artifacts, or distilled evidence rather than plan prose
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, generic-bootstrap publication of provider advertisements/Eve surfaces/hosted tools, the central topology-derived Odin publisher, all-provider state writers, cluster-daemon bootstrap, and daemon-supervisor production bootstrap are cut. Provider absence survives bootstrap; the query CLI cannot proclaim seven providers active over RUDP; each cluster daemon writes only its own presence and pulse; Idunn production paths require shared initialization rather than repainting it; supervisor audit-smoke seeding is confined beneath `.epiphany-smoke`. Next remove or test-gate dead public receipt constructors where provider binaries are absent and audit remaining projections, caches, schedulers, adapters, and non-receipt smokes for borrowed authority or path escape.
- 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, generic-bootstrap publication of provider advertisements/Eve surfaces/hosted tools, the central topology-derived Odin publisher, all-provider state writers, cluster-daemon bootstrap, daemon-supervisor production bootstrap, and requester/operator query-side bootstrap are cut. Provider absence survives bootstrap; only explicit seed/fixture paths initialize; each cluster daemon writes its own presence and pulse; Idunn and requester paths require the shared body rather than repainting it; synthetic seeding is quarantined. Next remove or test-gate dead public receipt constructors where provider binaries are absent and 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.
- Idunn owns daemon survival and service lifecycle physiology. Codex/operator sessions may inspect, generate runbooks, and route explicit operator authority, but keeping daemons alive belongs to Idunn-owned service lifecycle receipts, scheduler policy, audits, and aftercare. Do not let Self, diagnostic projections, or ad hoc wrapper summaries become a second daemon-keeper. Global tool readbacks for Self `service-health`, `service-policy-directory`, and `swarm-online-runbook` state `lifecycleOwner=Idunn` and `hostedBody=Epiphany` without service mutation or private-state exposure.
- 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.