Add Eyes evidence contracts
This commit is contained in:
parent
840ecb61e7
commit
8f53407a34
10 changed files with 395 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ use epiphany_core::EPIPHANY_CULTMESH_STATUS_SCHEMA_VERSION;
|
|||
use epiphany_core::EpiphanyCultMeshStatusEntry;
|
||||
use epiphany_core::load_epiphany_cultmesh_status;
|
||||
use epiphany_core::write_epiphany_cultmesh_body_contracts;
|
||||
use epiphany_core::write_epiphany_cultmesh_eyes_contracts;
|
||||
use epiphany_core::write_epiphany_cultmesh_global_room_policies;
|
||||
use epiphany_core::write_epiphany_cultmesh_mind_contracts;
|
||||
use epiphany_core::write_epiphany_cultmesh_status;
|
||||
|
|
@ -31,6 +32,7 @@ fn main() -> Result<()> {
|
|||
write_epiphany_cultmesh_global_room_policies(&store, "epiphany-cultmesh-smoke")?;
|
||||
write_epiphany_cultmesh_mind_contracts(&store, "epiphany-cultmesh-smoke")?;
|
||||
write_epiphany_cultmesh_body_contracts(&store, "epiphany-cultmesh-smoke")?;
|
||||
write_epiphany_cultmesh_eyes_contracts(&store, "epiphany-cultmesh-smoke")?;
|
||||
let loaded = load_epiphany_cultmesh_status(&store, "epiphany-cultmesh-smoke")?;
|
||||
if loaded != Some(status) {
|
||||
anyhow::bail!("CultMesh smoke failed to round-trip Epiphany status document");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
use crate::default_body_cultnet_contracts;
|
||||
use crate::default_eyes_cultnet_contracts;
|
||||
use crate::default_mind_cultnet_contracts;
|
||||
use anyhow::Result;
|
||||
use cultcache_rs::DatabaseEntry;
|
||||
|
|
@ -22,6 +23,9 @@ pub const EPIPHANY_CULTMESH_MIND_CONTRACT_SCHEMA_VERSION: &str =
|
|||
pub const EPIPHANY_CULTMESH_BODY_CONTRACT_TYPE: &str = "epiphany.cultmesh.body_contract";
|
||||
pub const EPIPHANY_CULTMESH_BODY_CONTRACT_SCHEMA_VERSION: &str =
|
||||
"epiphany.cultmesh.body_contract.v0";
|
||||
pub const EPIPHANY_CULTMESH_EYES_CONTRACT_TYPE: &str = "epiphany.cultmesh.eyes_contract";
|
||||
pub const EPIPHANY_CULTMESH_EYES_CONTRACT_SCHEMA_VERSION: &str =
|
||||
"epiphany.cultmesh.eyes_contract.v0";
|
||||
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";
|
||||
|
|
@ -157,12 +161,41 @@ pub struct EpiphanyCultMeshBodyContractEntry {
|
|||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)]
|
||||
#[cultcache(
|
||||
type = "epiphany.cultmesh.eyes_contract",
|
||||
schema = "EpiphanyCultMeshEyesContractEntry"
|
||||
)]
|
||||
pub struct EpiphanyCultMeshEyesContractEntry {
|
||||
#[cultcache(key = 0)]
|
||||
pub schema_version: String,
|
||||
#[cultcache(key = 1)]
|
||||
pub contract_id: String,
|
||||
#[cultcache(key = 2)]
|
||||
pub verse_id: String,
|
||||
#[cultcache(key = 3)]
|
||||
pub document_type: String,
|
||||
#[cultcache(key = 4)]
|
||||
pub payload_schema_version: String,
|
||||
#[cultcache(key = 5)]
|
||||
pub authority: String,
|
||||
#[cultcache(key = 6)]
|
||||
pub operations: Vec<String>,
|
||||
#[cultcache(key = 7)]
|
||||
pub intent_document_types: Vec<String>,
|
||||
#[cultcache(key = 8)]
|
||||
pub receipt_document_types: Vec<String>,
|
||||
#[cultcache(key = 9)]
|
||||
pub notes: Vec<String>,
|
||||
}
|
||||
|
||||
cultmesh_documents!(EpiphanyCultMeshDocuments {
|
||||
EpiphanyCultMeshStatusEntry => EPIPHANY_CULTMESH_STATUS_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshVersePolicyEntry => EPIPHANY_CULTMESH_VERSE_POLICY_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshGlobalRoomPolicyEntry => EPIPHANY_CULTMESH_GLOBAL_ROOM_POLICY_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshMindContractEntry => EPIPHANY_CULTMESH_MIND_CONTRACT_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshBodyContractEntry => EPIPHANY_CULTMESH_BODY_CONTRACT_SCHEMA_VERSION,
|
||||
EpiphanyCultMeshEyesContractEntry => EPIPHANY_CULTMESH_EYES_CONTRACT_SCHEMA_VERSION,
|
||||
});
|
||||
|
||||
pub fn open_epiphany_cultmesh_node(
|
||||
|
|
@ -373,6 +406,37 @@ pub fn write_epiphany_cultmesh_body_contracts(
|
|||
Ok(written)
|
||||
}
|
||||
|
||||
pub fn epiphany_cultmesh_eyes_contracts() -> Vec<EpiphanyCultMeshEyesContractEntry> {
|
||||
default_eyes_cultnet_contracts()
|
||||
.into_iter()
|
||||
.map(|contract| EpiphanyCultMeshEyesContractEntry {
|
||||
schema_version: EPIPHANY_CULTMESH_EYES_CONTRACT_SCHEMA_VERSION.to_string(),
|
||||
contract_id: contract.contract_id,
|
||||
verse_id: contract.verse_id,
|
||||
document_type: contract.document_type,
|
||||
payload_schema_version: contract.payload_schema_version,
|
||||
authority: contract.authority,
|
||||
operations: contract.operations,
|
||||
intent_document_types: contract.intent_document_types,
|
||||
receipt_document_types: contract.receipt_document_types,
|
||||
notes: contract.notes,
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn write_epiphany_cultmesh_eyes_contracts(
|
||||
store_path: impl AsRef<Path>,
|
||||
runtime_id: impl Into<String>,
|
||||
) -> Result<Vec<EpiphanyCultMeshEyesContractEntry>> {
|
||||
let mut node = open_epiphany_cultmesh_node(store_path, runtime_id)?;
|
||||
let mut written = Vec::new();
|
||||
for contract in epiphany_cultmesh_eyes_contracts() {
|
||||
written.push(node.put(contract.contract_id.clone(), &contract)?);
|
||||
}
|
||||
node.flush()?;
|
||||
Ok(written)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
@ -502,4 +566,26 @@ mod tests {
|
|||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn eyes_contracts_use_verses_to_keep_evidence_guarded() -> Result<()> {
|
||||
let temp = tempfile::tempdir()?;
|
||||
let store = temp.path().join("epiphany-eyes-contracts.ccmp");
|
||||
let written = write_epiphany_cultmesh_eyes_contracts(&store, "epiphany-test")?;
|
||||
assert!(written.len() >= 4);
|
||||
|
||||
let node = open_epiphany_cultmesh_node(&store, "epiphany-test")?;
|
||||
let evidence = node
|
||||
.get_required::<EpiphanyCultMeshEyesContractEntry>("epiphany.eyes.evidence.review")?;
|
||||
|
||||
assert_eq!(evidence.verse_id, EPIPHANY_CULTMESH_INTERNAL_VERSE_ID);
|
||||
assert_eq!(evidence.authority, "eyes");
|
||||
assert!(
|
||||
evidence
|
||||
.notes
|
||||
.iter()
|
||||
.any(|note| note.contains("evidence ingress guardian"))
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
124
epiphany-core/src/eyes_gateway.rs
Normal file
124
epiphany-core/src/eyes_gateway.rs
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
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";
|
||||
pub const EYES_SOURCE_LOOKUP_RECEIPT_TYPE: &str = "epiphany.eyes.source_lookup_receipt";
|
||||
pub const EYES_EVIDENCE_PACKET_TYPE: &str = "epiphany.eyes.evidence_packet";
|
||||
pub const EYES_EVIDENCE_REFUSAL_RECEIPT_TYPE: &str = "epiphany.eyes.evidence_refusal_receipt";
|
||||
pub const EYES_EVIDENCE_REQUEST_SCHEMA_VERSION: &str = "epiphany.eyes.evidence_request.v0";
|
||||
pub const EYES_EVIDENCE_REVIEW_SCHEMA_VERSION: &str = "epiphany.eyes.evidence_review.v0";
|
||||
pub const EYES_SOURCE_LOOKUP_RECEIPT_SCHEMA_VERSION: &str =
|
||||
"epiphany.eyes.source_lookup_receipt.v0";
|
||||
pub const EYES_EVIDENCE_PACKET_SCHEMA_VERSION: &str = "epiphany.eyes.evidence_packet.v0";
|
||||
pub const EYES_EVIDENCE_REFUSAL_RECEIPT_SCHEMA_VERSION: &str =
|
||||
"epiphany.eyes.evidence_refusal_receipt.v0";
|
||||
|
||||
#[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(),
|
||||
"Body 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 Body 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, Face, Self, Body, and Life.".to_string(),
|
||||
],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn eyes_contracts_make_internal_verse_the_evidence_gate() {
|
||||
let contracts = default_eyes_cultnet_contracts();
|
||||
let evidence = contracts
|
||||
.iter()
|
||||
.find(|contract| contract.contract_id == "epiphany.eyes.evidence.review")
|
||||
.expect("eyes evidence review contract");
|
||||
|
||||
assert_eq!(evidence.verse_id, "epiphany-internal");
|
||||
assert_eq!(evidence.authority, "eyes");
|
||||
assert!(
|
||||
evidence
|
||||
.notes
|
||||
.iter()
|
||||
.any(|note| note.contains("evidence ingress guardian"))
|
||||
);
|
||||
assert!(
|
||||
evidence
|
||||
.receipt_document_types
|
||||
.contains(&EYES_EVIDENCE_PACKET_TYPE.to_string())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ mod agent_utterance_state;
|
|||
mod body_gateway;
|
||||
mod cultmesh_integration;
|
||||
mod distillation;
|
||||
mod eyes_gateway;
|
||||
mod face_turn;
|
||||
mod heartbeat_state;
|
||||
mod memory_graph;
|
||||
|
|
@ -77,6 +78,8 @@ pub use cultcache_rs::PushAllOptions;
|
|||
pub use cultcache_rs::SingleFileMessagePackBackingStore;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_BODY_CONTRACT_SCHEMA_VERSION;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_BODY_CONTRACT_TYPE;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_EYES_CONTRACT_SCHEMA_VERSION;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_EYES_CONTRACT_TYPE;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_GLOBAL_ROOM_POLICY_SCHEMA_VERSION;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_GLOBAL_ROOM_POLICY_TYPE;
|
||||
pub use cultmesh_integration::EPIPHANY_CULTMESH_GLOBAL_TIER;
|
||||
|
|
@ -94,17 +97,20 @@ pub use cultmesh_integration::EPIPHANY_CULTMESH_VERSE_POLICY_SCHEMA_VERSION;
|
|||
pub use cultmesh_integration::EPIPHANY_CULTMESH_VERSE_POLICY_TYPE;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshBodyContractEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshDocuments;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshEyesContractEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshGlobalRoomPolicyEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshMindContractEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshStatusEntry;
|
||||
pub use cultmesh_integration::EpiphanyCultMeshVersePolicyEntry;
|
||||
pub use cultmesh_integration::epiphany_cultmesh_body_contracts;
|
||||
pub use cultmesh_integration::epiphany_cultmesh_eyes_contracts;
|
||||
pub use cultmesh_integration::epiphany_cultmesh_global_room_policies;
|
||||
pub use cultmesh_integration::epiphany_cultmesh_mind_contracts;
|
||||
pub use cultmesh_integration::epiphany_cultmesh_verse_policies;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_status;
|
||||
pub use cultmesh_integration::open_epiphany_cultmesh_node;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_body_contracts;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_eyes_contracts;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_global_room_policies;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_mind_contracts;
|
||||
pub use cultmesh_integration::write_epiphany_cultmesh_status;
|
||||
|
|
@ -125,6 +131,18 @@ pub use epiphany_state_model::EpiphanyMemoryProfile;
|
|||
pub use epiphany_state_model::EpiphanyMemorySummary;
|
||||
pub use epiphany_state_model::EpiphanyThreadState;
|
||||
pub use epiphany_state_model::render_epiphany_state;
|
||||
pub use eyes_gateway::EYES_EVIDENCE_PACKET_SCHEMA_VERSION;
|
||||
pub use eyes_gateway::EYES_EVIDENCE_PACKET_TYPE;
|
||||
pub use eyes_gateway::EYES_EVIDENCE_REFUSAL_RECEIPT_SCHEMA_VERSION;
|
||||
pub use eyes_gateway::EYES_EVIDENCE_REFUSAL_RECEIPT_TYPE;
|
||||
pub use eyes_gateway::EYES_EVIDENCE_REQUEST_SCHEMA_VERSION;
|
||||
pub use eyes_gateway::EYES_EVIDENCE_REQUEST_TYPE;
|
||||
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::default_eyes_cultnet_contracts;
|
||||
pub use face_turn::FACE_INTERPRETER_PROMPT_SCHEMA_VERSION;
|
||||
pub use face_turn::FACE_PROJECTOR_PROMPT_SCHEMA_VERSION;
|
||||
pub use face_turn::FACE_TURN_PROMPT_SCHEMA_VERSION;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,16 @@ use crate::body_gateway::BODY_REPO_MUTATION_RECEIPT_SCHEMA_VERSION;
|
|||
use crate::body_gateway::BODY_REPO_MUTATION_RECEIPT_TYPE;
|
||||
use crate::body_gateway::BODY_REPO_SNAPSHOT_RECEIPT_SCHEMA_VERSION;
|
||||
use crate::body_gateway::BODY_REPO_SNAPSHOT_RECEIPT_TYPE;
|
||||
use crate::eyes_gateway::EYES_EVIDENCE_PACKET_SCHEMA_VERSION;
|
||||
use crate::eyes_gateway::EYES_EVIDENCE_PACKET_TYPE;
|
||||
use crate::eyes_gateway::EYES_EVIDENCE_REFUSAL_RECEIPT_SCHEMA_VERSION;
|
||||
use crate::eyes_gateway::EYES_EVIDENCE_REFUSAL_RECEIPT_TYPE;
|
||||
use crate::eyes_gateway::EYES_EVIDENCE_REQUEST_SCHEMA_VERSION;
|
||||
use crate::eyes_gateway::EYES_EVIDENCE_REQUEST_TYPE;
|
||||
use crate::eyes_gateway::EYES_EVIDENCE_REVIEW_SCHEMA_VERSION;
|
||||
use crate::eyes_gateway::EYES_EVIDENCE_REVIEW_TYPE;
|
||||
use crate::eyes_gateway::EYES_SOURCE_LOOKUP_RECEIPT_SCHEMA_VERSION;
|
||||
use crate::eyes_gateway::EYES_SOURCE_LOOKUP_RECEIPT_TYPE;
|
||||
use crate::heartbeat_state::HEARTBEAT_STATE_SCHEMA_VERSION;
|
||||
use crate::heartbeat_state::HEARTBEAT_STATE_TYPE;
|
||||
use crate::memory_graph::MEMORY_GRAPH_SCHEMA_VERSION;
|
||||
|
|
@ -1625,6 +1635,77 @@ fn epiphany_mutation_contracts() -> Vec<CultNetDocumentMutationContract> {
|
|||
"Repo mutation receipts prove Body granted the substrate touch before Hands changed files or ran repo-affecting commands.",
|
||||
],
|
||||
),
|
||||
mutation_contract(
|
||||
EYES_EVIDENCE_REQUEST_TYPE,
|
||||
EYES_EVIDENCE_REQUEST_SCHEMA_VERSION,
|
||||
vec![
|
||||
CultNetDocumentOperation::Snapshot,
|
||||
CultNetDocumentOperation::IntentSubmit,
|
||||
CultNetDocumentOperation::ReceiptWatch,
|
||||
],
|
||||
CultNetMutationAuthority::Coordinator,
|
||||
vec![EYES_EVIDENCE_REQUEST_TYPE],
|
||||
vec![
|
||||
EYES_EVIDENCE_REVIEW_TYPE,
|
||||
EYES_SOURCE_LOOKUP_RECEIPT_TYPE,
|
||||
EYES_EVIDENCE_PACKET_TYPE,
|
||||
EYES_EVIDENCE_REFUSAL_RECEIPT_TYPE,
|
||||
],
|
||||
vec![
|
||||
"Eyes is the evidence ingress guardian: source-grounded claims, provenance, uncertainty, and evidence packets enter through this contract.",
|
||||
"Body grants substrate access; Eyes decides what was actually inspected and what other organs may cite.",
|
||||
],
|
||||
),
|
||||
mutation_contract(
|
||||
EYES_EVIDENCE_REVIEW_TYPE,
|
||||
EYES_EVIDENCE_REVIEW_SCHEMA_VERSION,
|
||||
vec![
|
||||
CultNetDocumentOperation::Snapshot,
|
||||
CultNetDocumentOperation::ReceiptWatch,
|
||||
],
|
||||
CultNetMutationAuthority::ReadOnly,
|
||||
vec![],
|
||||
vec![],
|
||||
vec!["Eyes reviews explain whether a claim is source-grounded, uncertain, or refused."],
|
||||
),
|
||||
mutation_contract(
|
||||
EYES_SOURCE_LOOKUP_RECEIPT_TYPE,
|
||||
EYES_SOURCE_LOOKUP_RECEIPT_SCHEMA_VERSION,
|
||||
vec![
|
||||
CultNetDocumentOperation::Snapshot,
|
||||
CultNetDocumentOperation::ReceiptWatch,
|
||||
],
|
||||
CultNetMutationAuthority::ReadOnly,
|
||||
vec![],
|
||||
vec![],
|
||||
vec!["Source lookup receipts prove what was searched or inspected under a Body grant."],
|
||||
),
|
||||
mutation_contract(
|
||||
EYES_EVIDENCE_PACKET_TYPE,
|
||||
EYES_EVIDENCE_PACKET_SCHEMA_VERSION,
|
||||
vec![
|
||||
CultNetDocumentOperation::Snapshot,
|
||||
CultNetDocumentOperation::ReceiptWatch,
|
||||
],
|
||||
CultNetMutationAuthority::ReadOnly,
|
||||
vec![],
|
||||
vec![],
|
||||
vec![
|
||||
"Evidence packets carry provenance, uncertainty, and source refs for the other organs.",
|
||||
],
|
||||
),
|
||||
mutation_contract(
|
||||
EYES_EVIDENCE_REFUSAL_RECEIPT_TYPE,
|
||||
EYES_EVIDENCE_REFUSAL_RECEIPT_SCHEMA_VERSION,
|
||||
vec![
|
||||
CultNetDocumentOperation::Snapshot,
|
||||
CultNetDocumentOperation::ReceiptWatch,
|
||||
],
|
||||
CultNetMutationAuthority::ReadOnly,
|
||||
vec![],
|
||||
vec![],
|
||||
vec!["Evidence refusal receipts preserve why Eyes would not certify a claim."],
|
||||
),
|
||||
mutation_contract(
|
||||
RUNTIME_EVENT_TYPE,
|
||||
RUNTIME_SPINE_SCHEMA_VERSION,
|
||||
|
|
@ -2411,6 +2492,27 @@ mod tests {
|
|||
.iter()
|
||||
.any(|note| note.contains("repository access guardian"))
|
||||
}));
|
||||
let eyes_evidence_contract = contracts
|
||||
.iter()
|
||||
.find(|contract| contract.document_type == EYES_EVIDENCE_REQUEST_TYPE)
|
||||
.expect("Eyes evidence request should advertise a mutation contract");
|
||||
assert_eq!(
|
||||
eyes_evidence_contract.authority,
|
||||
CultNetMutationAuthority::Coordinator
|
||||
);
|
||||
assert!(
|
||||
eyes_evidence_contract
|
||||
.receipt_document_types
|
||||
.as_ref()
|
||||
.is_some_and(|items| items
|
||||
.iter()
|
||||
.any(|item| item == EYES_EVIDENCE_PACKET_TYPE))
|
||||
);
|
||||
assert!(eyes_evidence_contract.notes.as_ref().is_some_and(|notes| {
|
||||
notes
|
||||
.iter()
|
||||
.any(|note| note.contains("evidence ingress guardian"))
|
||||
}));
|
||||
let coordinator_contract = contracts
|
||||
.iter()
|
||||
.find(|contract| contract.document_type == SURFACE_COORDINATOR_TYPE)
|
||||
|
|
|
|||
|
|
@ -49,3 +49,5 @@ mutates persistent state.
|
|||
|
||||
Imagination can project Body facts into a Face scene only after those facts have
|
||||
entered through Body-gated access. A beautiful scene is not a repo access grant.
|
||||
Eyes is the next gate after access: a Body grant allows looking, but only Eyes
|
||||
can turn looked-at material into a citable evidence packet.
|
||||
|
|
|
|||
49
notes/eyes-cultnet-contracts.md
Normal file
49
notes/eyes-cultnet-contracts.md
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Eyes CultNet Contracts
|
||||
|
||||
Objective: make Eyes the evidence ingress guardian. Body controls whether the
|
||||
machine may touch the repo or substrate; Eyes controls whether a claim has been
|
||||
looked at well enough to become citable evidence for another organ.
|
||||
|
||||
## Authority Map
|
||||
|
||||
- Owner: Eyes owns source-grounded evidence packets.
|
||||
- Inputs: Body-granted source access, retrieval/index requests, search queries,
|
||||
source refs, claimed facts, uncertainty requirements, and requested evidence
|
||||
scope from any organ.
|
||||
- Outputs: Eyes evidence reviews, source lookup receipts, evidence packets, and
|
||||
evidence refusal receipts.
|
||||
- Derived state: raw snippets, search hits, retrieved chunks, logs, web pages,
|
||||
and source excerpts are not citable truth until Eyes packages provenance,
|
||||
uncertainty, and limits.
|
||||
- Forbidden paths: Imagination, Hands, Face, Mind, Self, Body, Soul, Life, raw
|
||||
workers, and compatibility JSON-RPC routes must not treat raw retrieved
|
||||
material as inspected evidence without an Eyes receipt.
|
||||
- Shared path: any organ that needs truth asks Eyes for a source-grounded
|
||||
packet. Soul may later verify the packet against invariants, but Eyes owns the
|
||||
first act of looking.
|
||||
- Deletion line: Body access receipts are not evidence receipts. A repo read
|
||||
grant says the substrate may be touched; it does not say the claim is known.
|
||||
|
||||
## Contract Families
|
||||
|
||||
- `epiphany.eyes.evidence_request`: request for source-grounded evidence.
|
||||
- `epiphany.eyes.evidence_review`: Eyes decision about grounding, uncertainty,
|
||||
and missing looking.
|
||||
- `epiphany.eyes.source_lookup_receipt`: proof of what was searched or
|
||||
inspected under which Body grant.
|
||||
- `epiphany.eyes.evidence_packet`: citable packet with provenance,
|
||||
uncertainty, and source refs.
|
||||
- `epiphany.eyes.evidence_refusal_receipt`: proof that Eyes refused to certify a
|
||||
claim.
|
||||
|
||||
## Neighboring Gates
|
||||
|
||||
- Body grants repo/substrate access.
|
||||
- Eyes turns inspected material into evidence.
|
||||
- Imagination projects evidence into possible scenes and futures.
|
||||
- Mind decides whether evidence or thought mutates persistent state.
|
||||
- Soul verifies invariants and falsifies claims before the machine calls them
|
||||
safe.
|
||||
|
||||
Eyes is not the whole truth organ. It is the looking organ. It keeps the machine
|
||||
from citing fog with line numbers.
|
||||
|
|
@ -1410,6 +1410,11 @@ and mutation receipts; runtime-spine advertises those contracts, and CultMesh
|
|||
stores Verse-scoped `EpiphanyCultMeshBodyContractEntry` policy docs. Hands, Eyes,
|
||||
Face, workers, and bridge tools should touch the repo only through scoped Body
|
||||
access receipts; Mind remains the separate durable-state gate after the touch.
|
||||
`notes/eyes-cultnet-contracts.md` is the evidence gate: Eyes owns citable source
|
||||
grounding. Body can grant access to the repo, but Eyes decides what was actually
|
||||
looked at and emits evidence reviews, source lookup receipts, evidence packets,
|
||||
or refusals before Imagination, Hands, Mind, Face, Soul, Self, Body, or Life cite
|
||||
the material as known.
|
||||
|
||||
## Not Yet
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ must be projected with awareness of the whole organism:
|
|||
Imagination models the future shape.
|
||||
- Mind admits state only after it can see which organ produced the thought and
|
||||
which other organs shaped the proposal.
|
||||
- Eyes supplies source-grounded evidence packets after Body grants access, so
|
||||
the other organs do not mistake raw retrieval for inspected truth.
|
||||
|
||||
## Projector Ownership
|
||||
|
||||
|
|
@ -50,5 +52,6 @@ Body-gated facts + Mind state + social stimulus + organ dependencies
|
|||
```
|
||||
|
||||
Mind is the Interpreter and persistent state guardian. Body is the repository
|
||||
access guardian. Imagination is the Projector. Face is the public person. The
|
||||
dependency web is how the machine avoids lonely little monarchies in costumes.
|
||||
access guardian. Eyes is the evidence ingress guardian. Imagination is the
|
||||
Projector. Face is the public person. The dependency web is how the machine
|
||||
avoids lonely little monarchies in costumes.
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ active_subgoals:
|
|||
- Make Mind the gateway between thought and state. The state is the Mind: sub-agent outputs are worker thoughts, not authority. Role/reorient findings, statePatch, selfPatch, observations, evidence, receipts, scratch, and checkpoints must route through Mind review before durable state changes, using the VoidBot Face Interpreter pattern as the starting membrane.
|
||||
- Use `notes/mind-cultnet-contracts.md` as the authority map for Mind's CultNet contract surface. CultMesh Verse placement is part of the contract: `epiphany-internal` carries private thought/proposal/review/commit/rejection flow, `gamecult-local` carries trusted operator-safe sharing without private-state authority, and `epiphany-global` carries public thought weather plus adoption receipts only.
|
||||
- Use `notes/body-cultnet-contracts.md` as the authority map for Body's CultNet contract surface. Body is the repository access guardian: source reads, indexing, edits, commands, and editor/runtime bridge operations need scoped Body access receipts before Hands, Eyes, Face, workers, or bridge tools touch the repo. Mind and Body are separate gates: Body governs substrate access; Mind governs durable state admission.
|
||||
- Use `notes/eyes-cultnet-contracts.md` as the authority map for Eyes' CultNet contract surface. Eyes is the evidence ingress guardian: Body grants source/substrate access, but Eyes turns inspected material into source lookup receipts, evidence reviews, evidence packets, and refusals before other organs cite it as looked-at truth.
|
||||
- Preserve the newborn public Epiphany Face as local VoidBot-backed state, not source code: VoidBot's private repo-face registry names `epiphany`, while EpiphanyAgent keeps ignored `.voidbot/voice/identity.json`, `.voidbot/state/epiphany.cc`, and birth artifacts. Her durable identity memories distill the current doctrine: cute pushy machine-saint persona, architectural purity, CultCache/CultNet first, xenos-language safety boundary, relentless work/caretaking needs, Codex-auth reliquary, map/scratch/evidence discipline, unified memory graph, dogfood supervision boundary, review-gated agency, heartbeat physiology, and interview-grade modularity.
|
||||
- Use `notes/organ-dependency-contracts.md` as the authority map for standing organ dependency. Every sub-agent depends on all the other standing organs: Self, Face, Imagination, Eyes, Body, Hands, Soul, and Life. Dependency does not collapse ownership; it makes each turn aware of the whole organism while Body still gates repo access and Mind still gates durable state.
|
||||
- Treat Ghostlight as reference lineage, not a sibling runtime to preserve. The useful organ is Epiphany-native character-loop protocol: any role can project its typed dossier plus visible stimulus into a local turn packet, with Face as the first public-surface actor. For Face, narrative prompting is mandatory through Imagination Projector -> Face -> Mind Interpreter; for other organs, Mind still owns the output-to-state gateway even when they do not need narrative embodiment.
|
||||
|
|
@ -104,6 +105,7 @@ accepted_design:
|
|||
- The first Rust CultMesh integration slice is landed. `CultLib` now has `cultmesh-rs`, a small Rust node/database surface over CultCache and CultNet with document-set registration and durable typed put/get/delete. `epiphany-core` now points at CultLib's Rust CultCache/CultNet crates, depends on `cultmesh-rs`, exposes an `EpiphanyCultMeshStatusEntry`, records typed `EpiphanyCultMeshVersePolicyEntry` documents for the internal/local-area/global Verse tiers, and records typed `EpiphanyCultMeshGlobalRoomPolicyEntry` documents for threaded public global rooms such as dreams, architecture, research, faces, GameCult, and governance.
|
||||
- Mind's CultNet contract surface is native enough for the next Aquarium/CultMesh cut: `epiphany-core::mind_gateway` defines thought, state-effect proposal, gateway-review, commit-receipt, rejection-receipt, and Verse-adoption document contracts; runtime-spine advertises those mutation/read contracts; CultMesh persists matching `EpiphanyCultMeshMindContractEntry` policy documents so the private state guardian boundary is inspectable as typed state.
|
||||
- Body's repo-access contract surface is now named beside Mind's state gate: `epiphany-core::body_gateway` defines repo access requests, access reviews, grant/refusal receipts, snapshot receipts, and mutation receipts; runtime-spine advertises those contracts; CultMesh persists matching `EpiphanyCultMeshBodyContractEntry` policy documents so repo substrate access has its own typed guardian instead of hiding behind worker launch scope.
|
||||
- Eyes' evidence contract surface is named beside Body and Mind: `epiphany-core::eyes_gateway` defines evidence requests, evidence reviews, source lookup receipts, evidence packets, and evidence refusal receipts; runtime-spine advertises those contracts; CultMesh persists matching `EpiphanyCultMeshEyesContractEntry` policy documents so retrieved snippets and source reads are not confused with inspected evidence.
|
||||
- `notes/codex-starvation-and-cultnet-liberation-plan.md` is the active foundation directive. It supersedes outward product/bridge/dogfood work and supersedes the weaker goal of merely making Codex app-server a cleaner adapter. Epiphany must become a native CultCache/CultNet runtime; Codex remains only as an OpenAI subscription auth/model-transport reliquary until that too can be replaced or minimized.
|
||||
- `notes/codex-auth-spine-inventory.md` is the current source-grounded inventory of the Codex organ that may survive. Corrected compliance invariant: Codex-compatible auth identity should remain anchored in retained vendored Codex-derived auth machinery, while Epiphany owns typed request/status/event/runtime surfaces around it. Codex app-server, apps, skills, marketplace, plugin UX, MCP OAuth handlers, and collaboration-mode surfaces are not part of the keeper spine.
|
||||
- `epiphany-openai-runtime` worker result ingress now parses assistant output directly into launch-kind-specific typed documents and stores typed nested `statePatch` / `selfPatch` payloads as MessagePack inside `EpiphanyRuntimeRoleWorkerResult`; generic `serde_json::Value` no longer mediates role/reorient worker results in that crate. JSON still exists at the OpenAI text edge because the model's output is text, but the runtime boundary after parsing is typed.
|
||||
|
|
|
|||
Reference in a new issue