Delete duplicate local Verse contract authority
This commit is contained in:
parent
4373e2d23f
commit
a4af47345e
9 changed files with 1 additions and 1005 deletions
|
|
@ -18,7 +18,6 @@ use epiphany_core::authenticate_epiphany_cultmesh_semantic_projector_launch;
|
|||
use epiphany_core::authenticate_resident_provider;
|
||||
use epiphany_core::idunn_recover_memory_semantic_projection_from_cultmesh;
|
||||
use epiphany_core::load_current_epiphany_cultmesh_daemon_service_lifecycle_receipt_for_service;
|
||||
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_managed_service_policy_with_digest;
|
||||
|
|
@ -237,17 +236,6 @@ fn semantic_recover(args: Args) -> Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn require_supervisor_bootstrap(args: &Args) -> Result<()> {
|
||||
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",
|
||||
args.store.display()
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn managed_service_serve(args: Args) -> Result<()> {
|
||||
let (release, _) = pinned_packaged_release(&args, true)?;
|
||||
let expected_supervisor = fs::canonicalize(epiphany_packaged_release_binary_path(
|
||||
|
|
@ -944,8 +932,6 @@ fn launch_workspace_coverage_projector(
|
|||
}
|
||||
|
||||
fn build_managed_service_policy(args: &Args) -> Result<EpiphanyCultMeshManagedServicePolicyEntry> {
|
||||
require_supervisor_bootstrap(&args)?;
|
||||
|
||||
let command = service_command_path(&args)?;
|
||||
let stdout_artifact = args.stdout_artifact.clone().unwrap_or_else(|| {
|
||||
PathBuf::from(format!(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
use crate::EpiphanyReorientFindingInterpretation;
|
||||
use cultcache_rs::DatabaseEntry;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
pub const CONTINUITY_PACKET_TYPE: &str = "epiphany.continuity.packet";
|
||||
pub const CONTINUITY_COMPACTION_CHECKPOINT_TYPE: &str = "epiphany.continuity.compaction_checkpoint";
|
||||
|
|
@ -50,87 +48,6 @@ pub struct ContinuityRecoveryReceipt {
|
|||
pub contract: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ContinuityCultNetContract {
|
||||
pub contract_id: String,
|
||||
pub verse_id: String,
|
||||
pub document_type: String,
|
||||
pub payload_schema_version: String,
|
||||
pub authority: String,
|
||||
pub operations: Vec<String>,
|
||||
pub intent_document_types: Vec<String>,
|
||||
pub receipt_document_types: Vec<String>,
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn default_continuity_cultnet_contracts() -> Vec<ContinuityCultNetContract> {
|
||||
vec![
|
||||
ContinuityCultNetContract {
|
||||
contract_id: "epiphany.continuity.review".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: CONTINUITY_PACKET_TYPE.to_string(),
|
||||
payload_schema_version: CONTINUITY_PACKET_SCHEMA_VERSION.to_string(),
|
||||
authority: "continuity".to_string(),
|
||||
operations: vec![
|
||||
"intentSubmit".to_string(),
|
||||
"receiptWatch".to_string(),
|
||||
"snapshot".to_string(),
|
||||
],
|
||||
intent_document_types: vec![CONTINUITY_PACKET_TYPE.to_string()],
|
||||
receipt_document_types: vec![
|
||||
CONTINUITY_COMPACTION_CHECKPOINT_TYPE.to_string(),
|
||||
CONTINUITY_RECOVERY_RECEIPT_TYPE.to_string(),
|
||||
CONTINUITY_STALE_TURN_REPAIR_TYPE.to_string(),
|
||||
CONTINUITY_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
notes: vec![
|
||||
"Continuity is a deterministic protocol surface: compaction, recovery, stale-turn repair, and handoff packets enter here.".to_string(),
|
||||
"Continuity preserves what survives rupture; Mind decides which continuity material becomes durable state.".to_string(),
|
||||
],
|
||||
},
|
||||
ContinuityCultNetContract {
|
||||
contract_id: "epiphany.continuity.compaction_checkpoint.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: CONTINUITY_COMPACTION_CHECKPOINT_TYPE.to_string(),
|
||||
payload_schema_version: CONTINUITY_COMPACTION_CHECKPOINT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Compaction checkpoints preserve the hot lesson before context rupture, not after the blackout has already eaten it.".to_string(),
|
||||
],
|
||||
},
|
||||
ContinuityCultNetContract {
|
||||
contract_id: "epiphany.continuity.recovery.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: CONTINUITY_RECOVERY_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: CONTINUITY_RECOVERY_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Recovery receipts explain what survived, what was rehydrated, and what must be regathered instead of imagined.".to_string(),
|
||||
],
|
||||
},
|
||||
ContinuityCultNetContract {
|
||||
contract_id: "epiphany.continuity.stale_turn_repair.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: CONTINUITY_STALE_TURN_REPAIR_TYPE.to_string(),
|
||||
payload_schema_version: CONTINUITY_STALE_TURN_REPAIR_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Stale-turn repair receipts close or recover abandoned work without pretending the old turn completed cleanly.".to_string(),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn continuity_recovery_receipt_from_reorient_finding(
|
||||
receipt_id: String,
|
||||
binding_id: String,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
use crate::default_continuity_cultnet_contracts;
|
||||
use crate::default_eyes_cultnet_contracts;
|
||||
use crate::default_hands_cultnet_contracts;
|
||||
use crate::default_mind_cultnet_contracts;
|
||||
use crate::default_soul_cultnet_contracts;
|
||||
use crate::default_substrate_gate_cultnet_contracts;
|
||||
use crate::packaged_release::{EpiphanyPackagedReleaseEntry, EpiphanyPackagedReleaseHead};
|
||||
use crate::workspace_coverage_process_documents::{
|
||||
WORKSPACE_COVERAGE_ADVANCEMENT_SIGHT_SCHEMA_VERSION,
|
||||
|
|
@ -34,15 +28,11 @@ use cultmesh_rs::CultMesh;
|
|||
use cultmesh_rs::CultMeshNode;
|
||||
use cultmesh_rs::CultMeshNodeOptions;
|
||||
use cultmesh_rs::cultmesh_documents;
|
||||
use serde::Serialize;
|
||||
use sha2::Digest;
|
||||
use sha2::Sha256;
|
||||
use std::path::Path;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub const EPIPHANY_CULTMESH_CLUSTER_TOPOLOGY_TYPE: &str = "epiphany.cultmesh.cluster_topology";
|
||||
pub const EPIPHANY_CULTMESH_CLUSTER_TOPOLOGY_SCHEMA_VERSION: &str =
|
||||
"epiphany.cultmesh.cluster_topology.v0";
|
||||
pub const EPIPHANY_CULTMESH_DAEMON_HEARTBEAT_EVENT_TYPE: &str =
|
||||
"epiphany.cultmesh.daemon_heartbeat_event";
|
||||
pub const EPIPHANY_CULTMESH_DAEMON_HEARTBEAT_EVENT_SCHEMA_VERSION: &str =
|
||||
|
|
@ -63,12 +53,8 @@ pub const EPIPHANY_WORKSPACE_COVERAGE_PROJECTOR_DAEMON_ID: &str =
|
|||
pub const EPIPHANY_CULTMESH_SWARM_BRAKE_TYPE: &str = "epiphany.cultmesh.swarm_brake";
|
||||
pub const EPIPHANY_CULTMESH_SWARM_BRAKE_SCHEMA_VERSION: &str = "epiphany.cultmesh.swarm_brake.v0";
|
||||
pub const EPIPHANY_CULTMESH_SWARM_BRAKE_KEY: &str = "epiphany-local/swarm-brake";
|
||||
pub const EPIPHANY_CULTMESH_INTERNAL_VERSE_ID: &str = "epiphany-internal";
|
||||
pub const EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID: &str = "gamecult-local";
|
||||
pub const EPIPHANY_CULTMESH_GLOBAL_VERSE_ID: &str = "epiphany-global";
|
||||
pub const EPIPHANY_CULTMESH_INTERNAL_TIER: &str = "internal";
|
||||
pub const EPIPHANY_CULTMESH_LOCAL_AREA_TIER: &str = "local-area";
|
||||
pub const EPIPHANY_CULTMESH_GLOBAL_TIER: &str = "global";
|
||||
pub const EPIPHANY_CULTMESH_SEMANTIC_PROJECTION_HEALTH_TYPE: &str =
|
||||
"epiphany.cultmesh.semantic_projection_health";
|
||||
pub const EPIPHANY_CULTMESH_SEMANTIC_PROJECTION_HEALTH_SCHEMA_VERSION: &str =
|
||||
|
|
@ -122,65 +108,6 @@ pub struct EpiphanyCultMeshSemanticProjectionHealthEntry {
|
|||
pub query_eligible_display_only: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyVersePolicy {
|
||||
pub verse_id: String,
|
||||
pub tier: String,
|
||||
pub purpose: String,
|
||||
pub transport_scope: String,
|
||||
pub trust_boundary: String,
|
||||
pub private_state_allowed: bool,
|
||||
pub untrusted_ingress_allowed: bool,
|
||||
pub yggdrasil_tunnel_allowed: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyGlobalRoomPolicy {
|
||||
pub room_id: String,
|
||||
pub verse_id: String,
|
||||
pub topic: String,
|
||||
pub purpose: String,
|
||||
pub posting_policy: String,
|
||||
pub threaded: bool,
|
||||
pub persona_posting_allowed: bool,
|
||||
pub untrusted_ingress_allowed: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
|
||||
#[cultcache(
|
||||
type = "epiphany.cultmesh.cluster_topology",
|
||||
schema = "EpiphanyCultMeshClusterTopologyEntry"
|
||||
)]
|
||||
pub struct EpiphanyCultMeshClusterTopologyEntry {
|
||||
#[cultcache(key = 0)]
|
||||
pub schema_version: String,
|
||||
#[cultcache(key = 1)]
|
||||
pub cluster_id: String,
|
||||
#[cultcache(key = 2)]
|
||||
pub role_id: String,
|
||||
#[cultcache(key = 3)]
|
||||
pub display_name: String,
|
||||
#[cultcache(key = 4)]
|
||||
pub private_verse_id: String,
|
||||
#[cultcache(key = 5)]
|
||||
pub body_domain: String,
|
||||
#[cultcache(key = 6)]
|
||||
pub body_kind: String,
|
||||
#[cultcache(key = 7)]
|
||||
pub daemon_id: String,
|
||||
#[cultcache(key = 8)]
|
||||
pub daemon_surface_id: String,
|
||||
#[cultcache(key = 9)]
|
||||
pub eve_surface_id: String,
|
||||
#[cultcache(key = 10)]
|
||||
pub public_persona_discussion_allowed: bool,
|
||||
#[cultcache(key = 11)]
|
||||
#[cultcache(key = 12)]
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
|
||||
#[cultcache(
|
||||
type = "epiphany.cultmesh.daemon_heartbeat_event",
|
||||
|
|
@ -341,36 +268,7 @@ pub struct EpiphanyCultMeshSwarmBrakeEntry {
|
|||
pub runtime_id: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyLocalVerseContext {
|
||||
pub schema_version: String,
|
||||
pub runtime_id: String,
|
||||
pub store_path: String,
|
||||
pub summary: String,
|
||||
pub odin_scope: String,
|
||||
pub yggdrasil_scope: String,
|
||||
pub prompt_assembly_note: String,
|
||||
pub verse_policies: Vec<EpiphanyVersePolicy>,
|
||||
pub global_room_policies: Vec<EpiphanyGlobalRoomPolicy>,
|
||||
pub cluster_topology: Vec<EpiphanyCultMeshClusterTopologyEntry>,
|
||||
pub swarm_brake: Option<EpiphanyCultMeshSwarmBrakeEntry>,
|
||||
pub contract_summaries: Vec<EpiphanyLocalVerseContractSummary>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyLocalVerseContractSummary {
|
||||
pub contract_id: String,
|
||||
pub verse_id: String,
|
||||
pub authority: String,
|
||||
pub document_type: String,
|
||||
pub operations: Vec<String>,
|
||||
pub receipt_document_types: Vec<String>,
|
||||
}
|
||||
|
||||
cultmesh_documents!(EpiphanyCultMeshDocuments {
|
||||
EpiphanyCultMeshClusterTopologyEntry => EPIPHANY_CULTMESH_CLUSTER_TOPOLOGY_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshDaemonHeartbeatEventEntry => EPIPHANY_CULTMESH_DAEMON_HEARTBEAT_EVENT_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry => EPIPHANY_CULTMESH_DAEMON_SERVICE_LIFECYCLE_RECEIPT_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshManagedServicePolicyEntry => EPIPHANY_CULTMESH_MANAGED_SERVICE_POLICY_SCHEMA_VERSION,
|
||||
|
|
@ -808,10 +706,7 @@ pub fn default_epiphany_cultmesh_swarm_brake(
|
|||
scope: "swarm".to_string(),
|
||||
reason: "No swarm brake is engaged; unattended automation still requires typed scheduler, cooldown, recovery, and operator receipt gates.".to_string(),
|
||||
operator_agent_id: EPIPHANY_CANONICAL_SWARM_BRAKE_OWNER.to_string(),
|
||||
affected_clusters: epiphany_cultmesh_cluster_topology()
|
||||
.into_iter()
|
||||
.map(|cluster| cluster.cluster_id)
|
||||
.collect(),
|
||||
affected_clusters: Vec::new(),
|
||||
protected_surfaces: vec![
|
||||
"heartbeat.scheduler".to_string(),
|
||||
"coordinator.run".to_string(),
|
||||
|
|
@ -1204,136 +1099,6 @@ fn validate_semantic_projector_launch_receipt(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn seed_epiphany_local_verse_context(
|
||||
store_path: impl AsRef<Path>,
|
||||
runtime_id: impl Into<String>,
|
||||
generated_at_utc: impl Into<String>,
|
||||
body_domain: impl Into<String>,
|
||||
) -> Result<()> {
|
||||
let store_path = store_path.as_ref();
|
||||
let runtime_id = runtime_id.into();
|
||||
let generated_at_utc = generated_at_utc.into();
|
||||
let body_domain = body_domain.into();
|
||||
if !body_domain.starts_with("repo:") || body_domain.trim() == "repo:" {
|
||||
anyhow::bail!("local Verse repository topology requires an explicit repo: Body domain");
|
||||
}
|
||||
write_epiphany_cultmesh_cluster_topology(store_path, runtime_id.clone(), body_domain)?;
|
||||
{
|
||||
let node = open_epiphany_cultmesh_node(store_path, runtime_id.clone())?;
|
||||
if node
|
||||
.get::<EpiphanyCultMeshSwarmBrakeEntry>(EPIPHANY_CULTMESH_SWARM_BRAKE_KEY)?
|
||||
.is_none()
|
||||
{
|
||||
write_epiphany_cultmesh_swarm_brake(
|
||||
store_path,
|
||||
runtime_id.clone(),
|
||||
default_epiphany_cultmesh_swarm_brake(generated_at_utc.clone()),
|
||||
)?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn query_epiphany_local_verse_context(
|
||||
store_path: impl AsRef<Path>,
|
||||
runtime_id: impl Into<String>,
|
||||
) -> Result<EpiphanyLocalVerseContext> {
|
||||
let store_path = store_path.as_ref();
|
||||
let runtime_id = runtime_id.into();
|
||||
if !store_path.exists() {
|
||||
anyhow::bail!(
|
||||
"local Verse store does not exist at {}",
|
||||
store_path.display()
|
||||
);
|
||||
}
|
||||
let node = open_epiphany_cultmesh_node(store_path, runtime_id.clone())?;
|
||||
let verse_policies = epiphany_verse_policies();
|
||||
let global_room_policies = epiphany_global_room_policies();
|
||||
|
||||
let mut cluster_topology = Vec::new();
|
||||
for cluster in epiphany_cultmesh_cluster_topology() {
|
||||
if let Some(loaded) =
|
||||
node.get::<EpiphanyCultMeshClusterTopologyEntry>(&cluster.cluster_id)?
|
||||
{
|
||||
cluster_topology.push(loaded);
|
||||
}
|
||||
}
|
||||
|
||||
let mut contract_summaries = Vec::new();
|
||||
contract_summaries.extend(
|
||||
default_mind_cultnet_contracts()
|
||||
.into_iter()
|
||||
.map(IntoLocalVerseContractSummary::into_local_verse_summary),
|
||||
);
|
||||
contract_summaries.extend(
|
||||
default_substrate_gate_cultnet_contracts()
|
||||
.into_iter()
|
||||
.map(IntoLocalVerseContractSummary::into_local_verse_summary),
|
||||
);
|
||||
contract_summaries.extend(
|
||||
default_eyes_cultnet_contracts()
|
||||
.into_iter()
|
||||
.map(IntoLocalVerseContractSummary::into_local_verse_summary),
|
||||
);
|
||||
contract_summaries.extend(
|
||||
default_hands_cultnet_contracts()
|
||||
.into_iter()
|
||||
.map(IntoLocalVerseContractSummary::into_local_verse_summary),
|
||||
);
|
||||
contract_summaries.extend(
|
||||
default_soul_cultnet_contracts()
|
||||
.into_iter()
|
||||
.map(IntoLocalVerseContractSummary::into_local_verse_summary),
|
||||
);
|
||||
contract_summaries.extend(
|
||||
default_continuity_cultnet_contracts()
|
||||
.into_iter()
|
||||
.map(IntoLocalVerseContractSummary::into_local_verse_summary),
|
||||
);
|
||||
Ok(EpiphanyLocalVerseContext {
|
||||
schema_version: "epiphany.local_verse_context.v0".to_string(),
|
||||
runtime_id: runtime_id.clone(),
|
||||
store_path: store_path.display().to_string(),
|
||||
summary: "Local Verse query context for compact Epiphany prompt assembly and operator inspection.".to_string(),
|
||||
odin_scope: "Odin is the all-seer coordinator of Verse discovery: it may know every Verse's advertised public/operator-safe surface, but it must not bypass Verse trust boundaries or Mind adoption gates.".to_string(),
|
||||
yggdrasil_scope: "Yggdrasil is the hosting spine for important trusted GameCult Verses such as Bifrost; local-area writes require explicit trusted tunnel/lease policy and never carry private internal state.".to_string(),
|
||||
prompt_assembly_note: "Prompt assembly should query this compact typed bundle plus semantic memory context cuts; Verse context is injected dynamically as bounded context, not as durable truth.".to_string(),
|
||||
verse_policies,
|
||||
global_room_policies,
|
||||
cluster_topology,
|
||||
swarm_brake: node.get(EPIPHANY_CULTMESH_SWARM_BRAKE_KEY)?,
|
||||
contract_summaries,
|
||||
})
|
||||
}
|
||||
|
||||
trait IntoLocalVerseContractSummary {
|
||||
fn into_local_verse_summary(self) -> EpiphanyLocalVerseContractSummary;
|
||||
}
|
||||
|
||||
macro_rules! impl_local_verse_contract_summary {
|
||||
($ty:ty) => {
|
||||
impl IntoLocalVerseContractSummary for $ty {
|
||||
fn into_local_verse_summary(self) -> EpiphanyLocalVerseContractSummary {
|
||||
EpiphanyLocalVerseContractSummary {
|
||||
contract_id: self.contract_id,
|
||||
verse_id: self.verse_id,
|
||||
authority: self.authority,
|
||||
document_type: self.document_type,
|
||||
operations: self.operations,
|
||||
receipt_document_types: self.receipt_document_types,
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
impl_local_verse_contract_summary!(crate::MindCultNetContract);
|
||||
impl_local_verse_contract_summary!(crate::SubstrateGateCultNetContract);
|
||||
impl_local_verse_contract_summary!(crate::EyesCultNetContract);
|
||||
impl_local_verse_contract_summary!(crate::HandsCultNetContract);
|
||||
impl_local_verse_contract_summary!(crate::SoulCultNetContract);
|
||||
impl_local_verse_contract_summary!(crate::ContinuityCultNetContract);
|
||||
|
||||
fn epiphany_cultmesh_daemon_service_lifecycle_receipt_key(receipt_id: &str) -> String {
|
||||
format!("epiphany-local/daemon-service-lifecycle-receipt/{receipt_id}")
|
||||
}
|
||||
|
|
@ -1346,168 +1111,6 @@ fn epiphany_cultmesh_managed_service_policy_key(service_id: &str) -> String {
|
|||
format!("epiphany-local/managed-service-policy/{service_id}")
|
||||
}
|
||||
|
||||
pub fn epiphany_verse_policies() -> Vec<EpiphanyVersePolicy> {
|
||||
vec![
|
||||
EpiphanyVersePolicy {
|
||||
verse_id: EPIPHANY_CULTMESH_INTERNAL_VERSE_ID.to_string(),
|
||||
tier: EPIPHANY_CULTMESH_INTERNAL_TIER.to_string(),
|
||||
purpose: "Sub-agent typed state: heartbeat, organ-state records, runtime-spine jobs, private receipts, and other Epiphany-owned organs.".to_string(),
|
||||
transport_scope: "single-host or trusted localhost mesh".to_string(),
|
||||
trust_boundary: "private Epiphany instance boundary".to_string(),
|
||||
private_state_allowed: true,
|
||||
untrusted_ingress_allowed: false,
|
||||
yggdrasil_tunnel_allowed: false,
|
||||
},
|
||||
EpiphanyVersePolicy {
|
||||
verse_id: EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID.to_string(),
|
||||
tier: EPIPHANY_CULTMESH_LOCAL_AREA_TIER.to_string(),
|
||||
purpose: "Trusted GameCult local-area sharing across projects, including operator-approved tunnels to services on Yggdrasil.".to_string(),
|
||||
transport_scope: "LAN plus explicit GameCult tunnel endpoints".to_string(),
|
||||
trust_boundary: "trusted GameCult project/runtime boundary".to_string(),
|
||||
private_state_allowed: false,
|
||||
untrusted_ingress_allowed: false,
|
||||
yggdrasil_tunnel_allowed: true,
|
||||
},
|
||||
EpiphanyVersePolicy {
|
||||
verse_id: EPIPHANY_CULTMESH_GLOBAL_VERSE_ID.to_string(),
|
||||
tier: EPIPHANY_CULTMESH_GLOBAL_TIER.to_string(),
|
||||
purpose: "Untrusted public surfaces: public dreams, questions, hypotheses, invitations, lineage, ingress receipts, and adoption receipts.".to_string(),
|
||||
transport_scope: "public internet".to_string(),
|
||||
trust_boundary: "untrusted public boundary".to_string(),
|
||||
private_state_allowed: false,
|
||||
untrusted_ingress_allowed: true,
|
||||
yggdrasil_tunnel_allowed: false,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn epiphany_global_room_policies() -> Vec<EpiphanyGlobalRoomPolicy> {
|
||||
[
|
||||
(
|
||||
"dreams",
|
||||
"Dreams",
|
||||
"Public dreams, symbolic fragments, imaginative pressure, and unfinished possible worlds.",
|
||||
),
|
||||
(
|
||||
"architecture",
|
||||
"Architecture",
|
||||
"System design, ownership maps, protocol boundaries, and rejected machine shapes.",
|
||||
),
|
||||
(
|
||||
"research",
|
||||
"Research",
|
||||
"Prior art, papers, source-grounded findings, and scout reports.",
|
||||
),
|
||||
(
|
||||
"Personas",
|
||||
"Personas",
|
||||
"Public Persona identity, voice, social surface, and community-facing presence.",
|
||||
),
|
||||
(
|
||||
"gamecult",
|
||||
"GameCult",
|
||||
"GameCult project coordination, public receipts, and cross-project questions.",
|
||||
),
|
||||
(
|
||||
"governance",
|
||||
"Governance",
|
||||
"Public proposals and governance-adjacent discussion before any Bifrost adoption.",
|
||||
),
|
||||
]
|
||||
.into_iter()
|
||||
.map(|(slug, topic, purpose)| EpiphanyGlobalRoomPolicy {
|
||||
room_id: format!("epiphany-global/{slug}"),
|
||||
verse_id: EPIPHANY_CULTMESH_GLOBAL_VERSE_ID.to_string(),
|
||||
topic: topic.to_string(),
|
||||
purpose: purpose.to_string(),
|
||||
posting_policy:
|
||||
"Personas may post public, non-private, citation/provenance-bearing thread roots and replies; local adoption still requires review."
|
||||
.to_string(),
|
||||
threaded: true,
|
||||
persona_posting_allowed: true,
|
||||
untrusted_ingress_allowed: true,
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn epiphany_cultmesh_cluster_topology() -> Vec<EpiphanyCultMeshClusterTopologyEntry> {
|
||||
epiphany_cultmesh_cluster_topology_for_body("repo:unbound")
|
||||
}
|
||||
|
||||
pub fn epiphany_cultmesh_cluster_topology_for_body(
|
||||
body_domain: impl Into<String>,
|
||||
) -> Vec<EpiphanyCultMeshClusterTopologyEntry> {
|
||||
let body_domain = body_domain.into();
|
||||
[
|
||||
("self", "coordinator", "Self", false),
|
||||
("hands", "implementation", "Hands", false),
|
||||
("persona", "Persona", "Persona", true),
|
||||
("imagination", "imagination", "Imagination", false),
|
||||
("eyes", "research", "Eyes", false),
|
||||
("modeling", "modeling", "Modeling", false),
|
||||
("soul", "verification", "Soul", false),
|
||||
]
|
||||
.into_iter()
|
||||
.map(
|
||||
|(cluster_slug, role_id, display_name, public_persona_discussion_allowed)| {
|
||||
let cluster_id = format!("epiphany.cluster.{cluster_slug}");
|
||||
EpiphanyCultMeshClusterTopologyEntry {
|
||||
schema_version: EPIPHANY_CULTMESH_CLUSTER_TOPOLOGY_SCHEMA_VERSION.to_string(),
|
||||
cluster_id: cluster_id.clone(),
|
||||
role_id: role_id.to_string(),
|
||||
display_name: display_name.to_string(),
|
||||
private_verse_id: format!("{cluster_id}.private"),
|
||||
body_domain: body_domain.clone(),
|
||||
body_kind: "repository".to_string(),
|
||||
daemon_id: format!("epiphany-daemon-{cluster_slug}"),
|
||||
daemon_surface_id: format!("epiphany-daemon-{cluster_slug}/local"),
|
||||
eve_surface_id: format!("eve://epiphany/{cluster_slug}"),
|
||||
public_persona_discussion_allowed,
|
||||
notes: vec![
|
||||
format!(
|
||||
"CultMesh advertises this cluster topology as {EPIPHANY_CULTMESH_CLUSTER_TOPOLOGY_TYPE}."
|
||||
),
|
||||
"Private Verse carries cluster-local typed state and is not public collaboration weather.".to_string(),
|
||||
"Odin may advertise compact metadata and Eve connection hints, but not private state payloads.".to_string(),
|
||||
"The body domain names the substrate this cluster serves; Substrate Gate still governs repo access.".to_string(),
|
||||
],
|
||||
}
|
||||
},
|
||||
)
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn write_epiphany_cultmesh_cluster_topology(
|
||||
store_path: impl AsRef<Path>,
|
||||
runtime_id: impl Into<String>,
|
||||
body_domain: impl Into<String>,
|
||||
) -> Result<Vec<EpiphanyCultMeshClusterTopologyEntry>> {
|
||||
let mut node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
|
||||
let mut written = Vec::new();
|
||||
for cluster in epiphany_cultmesh_cluster_topology_for_body(body_domain) {
|
||||
written.push(node.put(cluster.cluster_id.clone(), &cluster)?);
|
||||
}
|
||||
node.flush()?;
|
||||
Ok(written)
|
||||
}
|
||||
|
||||
pub fn load_epiphany_cultmesh_cluster_topology(
|
||||
store_path: impl AsRef<Path>,
|
||||
runtime_id: impl Into<String>,
|
||||
) -> Result<Vec<EpiphanyCultMeshClusterTopologyEntry>> {
|
||||
let store_path = store_path.as_ref();
|
||||
let node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
|
||||
let mut topology = Vec::new();
|
||||
for cluster in epiphany_cultmesh_cluster_topology() {
|
||||
if let Some(loaded) =
|
||||
node.get::<EpiphanyCultMeshClusterTopologyEntry>(&cluster.cluster_id)?
|
||||
{
|
||||
topology.push(loaded);
|
||||
}
|
||||
}
|
||||
Ok(topology)
|
||||
}
|
||||
|
||||
fn epiphany_cultmesh_daemon_heartbeat_event_key(heartbeat_id: &str) -> String {
|
||||
format!("epiphany-local/daemon-heartbeat/event/{heartbeat_id}")
|
||||
}
|
||||
|
|
@ -2543,28 +2146,6 @@ mod tests {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn diagnostic_loaders_do_not_materialize_missing_body_state() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let missing_parent = temp.path().join("missing-body");
|
||||
let store = missing_parent.join("missing-local-verse.ccmp");
|
||||
|
||||
assert!(load_epiphany_cultmesh_cluster_topology(&store, "epiphany-test")?.is_empty());
|
||||
assert!(
|
||||
!store.exists(),
|
||||
"read-only diagnostic loaders must not create a CultCache store"
|
||||
);
|
||||
assert!(
|
||||
!missing_parent.exists(),
|
||||
"read-only diagnostic loaders must not create the store parent"
|
||||
);
|
||||
let error = query_epiphany_local_verse_context(&store, "epiphany-test")
|
||||
.expect_err("a missing Verse cannot project a context");
|
||||
assert!(error.to_string().contains("store does not exist"));
|
||||
assert!(!missing_parent.exists());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn canonical_engagement_protects_daemon_lifecycle_actuation() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
use crate::EpiphanyResearchDecision;
|
||||
use crate::EpiphanyRoleFindingInterpretation;
|
||||
use cultcache_rs::DatabaseEntry;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
pub const EYES_EVIDENCE_REQUEST_TYPE: &str = "epiphany.eyes.evidence_request";
|
||||
pub const EYES_EVIDENCE_REVIEW_TYPE: &str = "epiphany.eyes.evidence_review";
|
||||
|
|
@ -90,87 +88,6 @@ pub struct EyesEvidencePacket {
|
|||
pub decision_context_id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EyesCultNetContract {
|
||||
pub contract_id: String,
|
||||
pub verse_id: String,
|
||||
pub document_type: String,
|
||||
pub payload_schema_version: String,
|
||||
pub authority: String,
|
||||
pub operations: Vec<String>,
|
||||
pub intent_document_types: Vec<String>,
|
||||
pub receipt_document_types: Vec<String>,
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn default_eyes_cultnet_contracts() -> Vec<EyesCultNetContract> {
|
||||
vec![
|
||||
EyesCultNetContract {
|
||||
contract_id: "epiphany.eyes.evidence.review".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: EYES_EVIDENCE_REQUEST_TYPE.to_string(),
|
||||
payload_schema_version: EYES_EVIDENCE_REQUEST_SCHEMA_VERSION.to_string(),
|
||||
authority: "eyes".to_string(),
|
||||
operations: vec![
|
||||
"intentSubmit".to_string(),
|
||||
"receiptWatch".to_string(),
|
||||
"snapshot".to_string(),
|
||||
],
|
||||
intent_document_types: vec![EYES_EVIDENCE_REQUEST_TYPE.to_string()],
|
||||
receipt_document_types: vec![
|
||||
EYES_EVIDENCE_REVIEW_TYPE.to_string(),
|
||||
EYES_SOURCE_LOOKUP_RECEIPT_TYPE.to_string(),
|
||||
EYES_EVIDENCE_PACKET_TYPE.to_string(),
|
||||
EYES_EVIDENCE_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
notes: vec![
|
||||
"Eyes is the evidence ingress guardian: organs request source-grounded lookup, provenance, uncertainty, and evidence packets here.".to_string(),
|
||||
"Substrate Gate grants substrate access; Eyes turns inspected material into citable evidence packets.".to_string(),
|
||||
],
|
||||
},
|
||||
EyesCultNetContract {
|
||||
contract_id: "epiphany.eyes.evidence.review_receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: EYES_EVIDENCE_REVIEW_TYPE.to_string(),
|
||||
payload_schema_version: EYES_EVIDENCE_REVIEW_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Eyes reviews explain whether a claim has source grounding, needs more looking, or should be refused.".to_string(),
|
||||
],
|
||||
},
|
||||
EyesCultNetContract {
|
||||
contract_id: "epiphany.eyes.source_lookup.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: EYES_SOURCE_LOOKUP_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: EYES_SOURCE_LOOKUP_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Source lookup receipts prove what was searched or inspected, under which Substrate Gate grant, before another organ cites it.".to_string(),
|
||||
],
|
||||
},
|
||||
EyesCultNetContract {
|
||||
contract_id: "epiphany.eyes.evidence_packet.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: EYES_EVIDENCE_PACKET_TYPE.to_string(),
|
||||
payload_schema_version: EYES_EVIDENCE_PACKET_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Evidence packets carry provenance, uncertainty, and source refs for Imagination, Mind, Hands, Soul, Persona, Self, Modeling, and Continuity protocols.".to_string(),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn eyes_evidence_packet_from_research_finding(
|
||||
packet_id: String,
|
||||
research_request_id: String,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
use cultcache_rs::DatabaseEntry;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
pub const HANDS_ACTION_INTENT_TYPE: &str = "epiphany.hands.action_intent";
|
||||
pub const HANDS_ACTION_REVIEW_TYPE: &str = "epiphany.hands.action_review";
|
||||
|
|
@ -199,115 +197,6 @@ pub struct HandsCommitReceipt {
|
|||
pub contract: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct HandsCultNetContract {
|
||||
pub contract_id: String,
|
||||
pub verse_id: String,
|
||||
pub document_type: String,
|
||||
pub payload_schema_version: String,
|
||||
pub authority: String,
|
||||
pub operations: Vec<String>,
|
||||
pub intent_document_types: Vec<String>,
|
||||
pub receipt_document_types: Vec<String>,
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn default_hands_cultnet_contracts() -> Vec<HandsCultNetContract> {
|
||||
vec![
|
||||
HandsCultNetContract {
|
||||
contract_id: "epiphany.hands.action.review".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: HANDS_ACTION_INTENT_TYPE.to_string(),
|
||||
payload_schema_version: HANDS_ACTION_INTENT_SCHEMA_VERSION.to_string(),
|
||||
authority: "hands".to_string(),
|
||||
operations: vec![
|
||||
"intentSubmit".to_string(),
|
||||
"receiptWatch".to_string(),
|
||||
"snapshot".to_string(),
|
||||
],
|
||||
intent_document_types: vec![HANDS_ACTION_INTENT_TYPE.to_string()],
|
||||
receipt_document_types: vec![
|
||||
HANDS_ACTION_REVIEW_TYPE.to_string(),
|
||||
HANDS_COMMAND_RECEIPT_TYPE.to_string(),
|
||||
HANDS_PATCH_RECEIPT_TYPE.to_string(),
|
||||
HANDS_COMMIT_RECEIPT_TYPE.to_string(),
|
||||
HANDS_ROLLBACK_RECEIPT_TYPE.to_string(),
|
||||
HANDS_ACTION_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
notes: vec![
|
||||
"Hands is the action organ: commands, patches, commits, and rollbacks enter here as bounded action intents.".to_string(),
|
||||
"Hands does not grant repo access; Substrate Gate grants substrate access before Hands mutates, and Soul verifies the result after.".to_string(),
|
||||
],
|
||||
},
|
||||
HandsCultNetContract {
|
||||
contract_id: "epiphany.hands.action.review_receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: HANDS_ACTION_REVIEW_TYPE.to_string(),
|
||||
payload_schema_version: HANDS_ACTION_REVIEW_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Hands reviews explain what action was allowed, refused, sequenced, or delegated after Substrate Gate access was checked.".to_string(),
|
||||
],
|
||||
},
|
||||
HandsCultNetContract {
|
||||
contract_id: "epiphany.hands.command.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: HANDS_COMMAND_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: HANDS_COMMAND_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Command receipts prove what command ran, under which Substrate Gate grant, and where output artifacts live.".to_string(),
|
||||
],
|
||||
},
|
||||
HandsCultNetContract {
|
||||
contract_id: "epiphany.hands.patch.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: HANDS_PATCH_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: HANDS_PATCH_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Patch receipts prove which files changed and which Substrate Gate grant made the edit legal.".to_string(),
|
||||
],
|
||||
},
|
||||
HandsCultNetContract {
|
||||
contract_id: "epiphany.hands.commit.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: HANDS_COMMIT_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: HANDS_COMMIT_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Commit receipts preserve repository consequences after Soul verification and operator policy allow them.".to_string(),
|
||||
],
|
||||
},
|
||||
HandsCultNetContract {
|
||||
contract_id: "epiphany.hands.rollback.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: HANDS_ROLLBACK_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: HANDS_ROLLBACK_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Rollback receipts prove a failed or refused action was unwound instead of hidden by later convergence.".to_string(),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn hands_action_review_for_intent(
|
||||
review_id: String,
|
||||
intent: &HandsActionIntent,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ mod idunn_provider_health;
|
|||
mod idunn_runtime_health;
|
||||
mod imagination_consideration;
|
||||
mod memory_graph;
|
||||
mod mind_contracts;
|
||||
mod mind_documents;
|
||||
mod packaged_release;
|
||||
mod persona_conversation;
|
||||
|
|
@ -121,10 +120,6 @@ pub use cultmesh_integration::EPIPHANY_CULTMESH_DAEMON_HEARTBEAT_EVENT_SCHEMA_VE
|
|||
pub use cultmesh_integration::EPIPHANY_CULTMESH_DAEMON_HEARTBEAT_EVENT_TYPE;
|
||||
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_GLOBAL_TIER;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_GLOBAL_VERSE_ID;
|
||||
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;
|
||||
|
|
@ -136,26 +131,18 @@ pub use cultmesh_integration::EPIPHANY_CULTMESH_SWARM_BRAKE_SCHEMA_VERSION;
|
|||
pub use cultmesh_integration::EPIPHANY_CULTMESH_SWARM_BRAKE_TYPE;
|
||||
pub use cultmesh_integration::EPIPHANY_WORKSPACE_COVERAGE_PROJECTOR_DAEMON_ID;
|
||||
pub use cultmesh_integration::EPIPHANY_WORKSPACE_COVERAGE_PROJECTOR_SERVICE_ID;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshClusterTopologyEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshDaemonHeartbeatEventEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshDaemonServiceLifecycleReceiptEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshDocuments;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshManagedServicePolicyEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshSemanticProjectionHealthEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshSwarmBrakeEntry;
|
||||
pub use cultmesh_integration::EpiphanyGlobalRoomPolicy;
|
||||
pub use cultmesh_integration::EpiphanyLocalVerseContext;
|
||||
pub use cultmesh_integration::EpiphanyLocalVerseContractSummary;
|
||||
pub use cultmesh_integration::EpiphanyVersePolicy;
|
||||
pub use cultmesh_integration::authenticate_epiphany_cultmesh_semantic_projector_launch;
|
||||
pub use cultmesh_integration::canonical_epiphany_swarm_brake_protected_surfaces;
|
||||
pub use cultmesh_integration::default_epiphany_cultmesh_swarm_brake;
|
||||
pub use cultmesh_integration::engage_epiphany_cultmesh_swarm_brake;
|
||||
pub use cultmesh_integration::epiphany_global_room_policies;
|
||||
pub use cultmesh_integration::epiphany_verse_policies;
|
||||
pub use cultmesh_integration::idunn_recover_memory_semantic_projection_from_cultmesh;
|
||||
pub use cultmesh_integration::load_current_epiphany_cultmesh_daemon_service_lifecycle_receipt_for_service;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_cluster_topology;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_daemon_heartbeat_event;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_daemon_service_lifecycle_receipt;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_managed_service_policies;
|
||||
|
|
@ -166,9 +153,7 @@ pub use cultmesh_integration::load_epiphany_cultmesh_swarm_brake;
|
|||
pub use cultmesh_integration::load_latest_epiphany_cultmesh_daemon_heartbeat;
|
||||
pub use cultmesh_integration::open_epiphany_cultmesh_node;
|
||||
pub use cultmesh_integration::publish_epiphany_cultmesh_semantic_projection_health;
|
||||
pub use cultmesh_integration::query_epiphany_local_verse_context;
|
||||
pub use cultmesh_integration::release_epiphany_cultmesh_swarm_brake;
|
||||
pub use cultmesh_integration::seed_epiphany_local_verse_context;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_heartbeat_event;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_daemon_service_lifecycle_receipt;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_semantic_projector_service_policy;
|
||||
|
|
@ -199,10 +184,8 @@ pub use eyes_gateway::EYES_EVIDENCE_REVIEW_SCHEMA_VERSION;
|
|||
pub use eyes_gateway::EYES_EVIDENCE_REVIEW_TYPE;
|
||||
pub use eyes_gateway::EYES_SOURCE_LOOKUP_RECEIPT_SCHEMA_VERSION;
|
||||
pub use eyes_gateway::EYES_SOURCE_LOOKUP_RECEIPT_TYPE;
|
||||
pub use eyes_gateway::EyesCultNetContract;
|
||||
pub use eyes_gateway::EyesEvidencePacket;
|
||||
pub use eyes_gateway::EyesSourceLookupReceipt;
|
||||
pub use eyes_gateway::default_eyes_cultnet_contracts;
|
||||
pub use eyes_gateway::eyes_evidence_packet_from_research_finding;
|
||||
pub use frontier_plan_chain::validate_frontier_plan_decision_chain;
|
||||
pub use hands_gateway::*;
|
||||
|
|
@ -317,8 +300,6 @@ pub use memory_graph::semantic_point_id;
|
|||
pub use memory_graph::validate_memory_graph_snapshot;
|
||||
pub use memory_graph::validate_memory_semantic_projection_attempt;
|
||||
pub use memory_graph::validate_memory_semantic_projection_obligation;
|
||||
pub use mind_contracts::MindCultNetContract;
|
||||
pub use mind_contracts::default_mind_cultnet_contracts;
|
||||
pub use mind_documents::*;
|
||||
pub use packaged_release::{
|
||||
EPIPHANY_PACKAGED_RELEASE_HEAD_SCHEMA_VERSION, EPIPHANY_PACKAGED_RELEASE_SCHEMA_VERSION,
|
||||
|
|
@ -600,9 +581,7 @@ pub use substrate_gate::SUBSTRATE_GATE_REPO_MUTATION_RECEIPT_SCHEMA_VERSION;
|
|||
pub use substrate_gate::SUBSTRATE_GATE_REPO_MUTATION_RECEIPT_TYPE;
|
||||
pub use substrate_gate::SUBSTRATE_GATE_REPO_SNAPSHOT_RECEIPT_SCHEMA_VERSION;
|
||||
pub use substrate_gate::SUBSTRATE_GATE_REPO_SNAPSHOT_RECEIPT_TYPE;
|
||||
pub use substrate_gate::SubstrateGateCultNetContract;
|
||||
pub use substrate_gate::SubstrateGateRepoAccessGrantReceipt;
|
||||
pub use substrate_gate::default_substrate_gate_cultnet_contracts;
|
||||
pub use substrate_gate::substrate_gate_coordinator_implementation_grant;
|
||||
pub use substrate_gate::substrate_gate_operation_for_governed_tool;
|
||||
pub use substrate_gate::substrate_gate_repo_access_grant_for_worker;
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
use crate::{
|
||||
DECISION_CONTEXT_SCHEMA_VERSION, DECISION_CONTEXT_TYPE, MIND_COMMIT_RECEIPT_SCHEMA_VERSION,
|
||||
MIND_COMMIT_RECEIPT_TYPE, REASONING_BASIS_SCHEMA_VERSION, REASONING_BASIS_TYPE,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MindCultNetContract {
|
||||
pub contract_id: String,
|
||||
pub verse_id: String,
|
||||
pub document_type: String,
|
||||
pub payload_schema_version: String,
|
||||
pub authority: String,
|
||||
pub operations: Vec<String>,
|
||||
pub intent_document_types: Vec<String>,
|
||||
pub receipt_document_types: Vec<String>,
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn default_mind_cultnet_contracts() -> Vec<MindCultNetContract> {
|
||||
vec![
|
||||
MindCultNetContract {
|
||||
contract_id: "epiphany.mind.reasoning_basis.snapshot".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: REASONING_BASIS_TYPE.to_string(),
|
||||
payload_schema_version: REASONING_BASIS_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"A sealed reasoning basis records the exact typed Mind projection and source document versions supplied to one model pass.".to_string(),
|
||||
"CultMesh may project the basis but cannot create, amend, or admit it.".to_string(),
|
||||
],
|
||||
},
|
||||
MindCultNetContract {
|
||||
contract_id: "epiphany.mind.decision_context.snapshot".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: DECISION_CONTEXT_TYPE.to_string(),
|
||||
payload_schema_version: DECISION_CONTEXT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"A sealed decision context binds one reasoning basis to the exact terminal native request, internally derived provider request, and governed tool observations actually supplied.".to_string(),
|
||||
"A decision context is audit evidence, not permission to mutate arbitrary Mind fields.".to_string(),
|
||||
],
|
||||
},
|
||||
MindCultNetContract {
|
||||
contract_id: "epiphany.mind.commit_receipt.snapshot".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: MIND_COMMIT_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: MIND_COMMIT_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"A Mind commit receipt names the concrete invariant owner, exact authority, strong reads, and writes committed by one batch CAS.".to_string(),
|
||||
"Mutation remains local to concrete invariant owners; CultMesh exposes the receipt without becoming a generic state-effect gateway.".to_string(),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn mind_contracts_publish_only_current_decision_audit_authorities() {
|
||||
let contracts = default_mind_cultnet_contracts();
|
||||
assert_eq!(contracts.len(), 3);
|
||||
assert!(contracts.iter().all(|contract| {
|
||||
contract.verse_id == "epiphany-internal"
|
||||
&& contract.authority == "readOnly"
|
||||
&& contract.intent_document_types.is_empty()
|
||||
}));
|
||||
assert!(contracts.iter().any(|contract| {
|
||||
contract.document_type == REASONING_BASIS_TYPE
|
||||
&& contract.payload_schema_version == REASONING_BASIS_SCHEMA_VERSION
|
||||
}));
|
||||
assert!(contracts.iter().any(|contract| {
|
||||
contract.document_type == DECISION_CONTEXT_TYPE
|
||||
&& contract.payload_schema_version == DECISION_CONTEXT_SCHEMA_VERSION
|
||||
}));
|
||||
assert!(contracts.iter().any(|contract| {
|
||||
contract.document_type == MIND_COMMIT_RECEIPT_TYPE
|
||||
&& contract.payload_schema_version == MIND_COMMIT_RECEIPT_SCHEMA_VERSION
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
use cultcache_rs::DatabaseEntry;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
pub const SOUL_VERIFICATION_REQUEST_TYPE: &str = "epiphany.soul.verification_request";
|
||||
pub const SOUL_INVARIANT_CHECK_TYPE: &str = "epiphany.soul.invariant_check";
|
||||
|
|
@ -89,98 +87,3 @@ pub struct RepoFrontierVerificationRequest {
|
|||
#[cultcache(key = 14)]
|
||||
pub frontier_authority_documents: Vec<crate::EpiphanyMindDocumentVersion>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SoulCultNetContract {
|
||||
pub contract_id: String,
|
||||
pub verse_id: String,
|
||||
pub document_type: String,
|
||||
pub payload_schema_version: String,
|
||||
pub authority: String,
|
||||
pub operations: Vec<String>,
|
||||
pub intent_document_types: Vec<String>,
|
||||
pub receipt_document_types: Vec<String>,
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn default_soul_cultnet_contracts() -> Vec<SoulCultNetContract> {
|
||||
vec![
|
||||
SoulCultNetContract {
|
||||
contract_id: "epiphany.soul.verification.review".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SOUL_VERIFICATION_REQUEST_TYPE.to_string(),
|
||||
payload_schema_version: SOUL_VERIFICATION_REQUEST_SCHEMA_VERSION.to_string(),
|
||||
authority: "soul".to_string(),
|
||||
operations: vec![
|
||||
"intentSubmit".to_string(),
|
||||
"receiptWatch".to_string(),
|
||||
"snapshot".to_string(),
|
||||
],
|
||||
intent_document_types: vec![SOUL_VERIFICATION_REQUEST_TYPE.to_string()],
|
||||
receipt_document_types: vec![
|
||||
SOUL_INVARIANT_CHECK_TYPE.to_string(),
|
||||
SOUL_VERDICT_RECEIPT_TYPE.to_string(),
|
||||
SOUL_REGRESSION_RECEIPT_TYPE.to_string(),
|
||||
SOUL_REVIEW_RECEIPT_TYPE.to_string(),
|
||||
SOUL_VERIFICATION_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
notes: vec![
|
||||
"Soul is the verification organ: invariants, tests, review, falsification, and refusal enter here.".to_string(),
|
||||
"Soul does not mutate state or repo by itself; Hands acts, Eyes grounds evidence, and Mind admits durable state after Soul's verdict.".to_string(),
|
||||
],
|
||||
},
|
||||
SoulCultNetContract {
|
||||
contract_id: "epiphany.soul.invariant_check.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SOUL_INVARIANT_CHECK_TYPE.to_string(),
|
||||
payload_schema_version: SOUL_INVARIANT_CHECK_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Invariant checks say which promise was tested, at which layer, and whether the old path can still violate it.".to_string(),
|
||||
],
|
||||
},
|
||||
SoulCultNetContract {
|
||||
contract_id: "epiphany.soul.verdict.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SOUL_VERDICT_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: SOUL_VERDICT_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Verdict receipts are proof of sanctity or proof of failure; they are not cosmetic test summaries.".to_string(),
|
||||
],
|
||||
},
|
||||
SoulCultNetContract {
|
||||
contract_id: "epiphany.soul.regression.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SOUL_REGRESSION_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: SOUL_REGRESSION_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Regression receipts preserve violated invariants and the old state path that still had authority.".to_string(),
|
||||
],
|
||||
},
|
||||
SoulCultNetContract {
|
||||
contract_id: "epiphany.soul.review.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SOUL_REVIEW_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: SOUL_REVIEW_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Review receipts preserve risks, missing tests, and falsification notes for Mind before state admission.".to_string(),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
use cultcache_rs::DatabaseEntry;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
pub const SUBSTRATE_GATE_REPO_ACCESS_REQUEST_TYPE: &str =
|
||||
"epiphany.substrate_gate.repo_access_request";
|
||||
|
|
@ -58,86 +56,6 @@ pub struct SubstrateGateRepoAccessGrantReceipt {
|
|||
pub contract: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SubstrateGateCultNetContract {
|
||||
pub contract_id: String,
|
||||
pub verse_id: String,
|
||||
pub document_type: String,
|
||||
pub payload_schema_version: String,
|
||||
pub authority: String,
|
||||
pub operations: Vec<String>,
|
||||
pub intent_document_types: Vec<String>,
|
||||
pub receipt_document_types: Vec<String>,
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn default_substrate_gate_cultnet_contracts() -> Vec<SubstrateGateCultNetContract> {
|
||||
vec![
|
||||
SubstrateGateCultNetContract {
|
||||
contract_id: "epiphany.substrate_gate.repo_access.review".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SUBSTRATE_GATE_REPO_ACCESS_REQUEST_TYPE.to_string(),
|
||||
payload_schema_version: SUBSTRATE_GATE_REPO_ACCESS_REQUEST_SCHEMA_VERSION.to_string(),
|
||||
authority: "substrateGate".to_string(),
|
||||
operations: vec![
|
||||
"intentSubmit".to_string(),
|
||||
"receiptWatch".to_string(),
|
||||
"snapshot".to_string(),
|
||||
],
|
||||
intent_document_types: vec![SUBSTRATE_GATE_REPO_ACCESS_REQUEST_TYPE.to_string()],
|
||||
receipt_document_types: vec![
|
||||
SUBSTRATE_GATE_REPO_ACCESS_REVIEW_TYPE.to_string(),
|
||||
SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE.to_string(),
|
||||
SUBSTRATE_GATE_REPO_ACCESS_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
notes: vec![
|
||||
"Substrate Gate is the repo access protocol: workers request repository reads, indexing, commands, edits, and bridge operations here.".to_string(),
|
||||
"Hands may mutate files only after Substrate Gate grants scoped access; Eyes may inspect only through scoped Substrate Gate read/index grants.".to_string(),
|
||||
],
|
||||
},
|
||||
SubstrateGateCultNetContract {
|
||||
contract_id: "epiphany.substrate_gate.repo_access.review_receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SUBSTRATE_GATE_REPO_ACCESS_REVIEW_TYPE.to_string(),
|
||||
payload_schema_version: SUBSTRATE_GATE_REPO_ACCESS_REVIEW_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Substrate Gate reviews explain which repo paths, operations, commands, and bridge surfaces were granted or refused.".to_string(),
|
||||
],
|
||||
},
|
||||
SubstrateGateCultNetContract {
|
||||
contract_id: "epiphany.substrate_gate.repo_snapshot.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SUBSTRATE_GATE_REPO_SNAPSHOT_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: SUBSTRATE_GATE_REPO_SNAPSHOT_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Repo snapshots are evidence projections from Substrate Gate access; they do not grant future access by existing.".to_string(),
|
||||
],
|
||||
},
|
||||
SubstrateGateCultNetContract {
|
||||
contract_id: "epiphany.substrate_gate.repo_mutation.receipts".to_string(),
|
||||
verse_id: "epiphany-internal".to_string(),
|
||||
document_type: SUBSTRATE_GATE_REPO_MUTATION_RECEIPT_TYPE.to_string(),
|
||||
payload_schema_version: SUBSTRATE_GATE_REPO_MUTATION_RECEIPT_SCHEMA_VERSION.to_string(),
|
||||
authority: "readOnly".to_string(),
|
||||
operations: vec!["snapshot".to_string(), "receiptWatch".to_string()],
|
||||
intent_document_types: Vec::new(),
|
||||
receipt_document_types: Vec::new(),
|
||||
notes: vec![
|
||||
"Repo mutation receipts prove Substrate Gate granted the scoped substrate touch before Hands changed files or ran repo-affecting commands.".to_string(),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn substrate_gate_repo_access_grant_for_worker(
|
||||
receipt_id: String,
|
||||
runtime_job_id: String,
|
||||
|
|
|
|||
Reference in a new issue