Delete generic organ dependency cargo
This commit is contained in:
parent
da8ed8401e
commit
2aeab7a92d
10 changed files with 11 additions and 711 deletions
|
|
@ -1196,11 +1196,6 @@ pub fn launch_current_frontier_planning_work(
|
|||
instruction: "Act as Epiphany Imagination. Propose one bounded candidate for only the exact typed frontier and return the dedicated planning candidate contract.".into(),
|
||||
launch_document,
|
||||
output_contract_id: output_contract_id.clone(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
&authority_scope,
|
||||
"role",
|
||||
&output_contract_id,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: Some(request.request_id.clone()),
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -1388,11 +1383,6 @@ pub fn launch_current_frontier_plan_mind_work(
|
|||
instruction: "Act as Epiphany Mind. Adopt, refuse, or hold only the exact typed candidate and return the dedicated plan decision contract.".into(),
|
||||
launch_document,
|
||||
output_contract_id: output_contract_id.clone(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
&authority_scope,
|
||||
"role",
|
||||
&output_contract_id,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: Some(request.request_id.clone()),
|
||||
|
|
@ -1574,11 +1564,6 @@ pub fn launch_current_frontier_verification_work(
|
|||
instruction: "Act as Epiphany Verification. Audit only the exact typed Hands consequence and route carried by this request; return a structured verdict, evidence ids, and risks.".into(),
|
||||
launch_document,
|
||||
output_contract_id: output_contract_id.clone(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
&authority_scope,
|
||||
"role",
|
||||
&output_contract_id,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -1752,11 +1737,6 @@ pub fn launch_current_frontier_research_work(
|
|||
instruction: "Act as Epiphany Research. Gather only the evidence required by the exact frontier request and return keyed evidence and observations for Mind review.".into(),
|
||||
launch_document,
|
||||
output_contract_id: output_contract_id.clone(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
&authority_scope,
|
||||
"role",
|
||||
&output_contract_id,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -2910,11 +2890,6 @@ fn launch_consideration_work(
|
|||
instruction: "Act as Epiphany Imagination for one exact proposal-only typed consideration pass and return only its dedicated terminal contract.".into(),
|
||||
launch_document,
|
||||
output_contract_id: output_contract_id.clone(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
&authority_scope,
|
||||
"role",
|
||||
&output_contract_id,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -3141,11 +3116,6 @@ pub fn launch_current_body_modeling_work(
|
|||
instruction: instruction.clone(),
|
||||
launch_document: launch_document.clone(),
|
||||
output_contract_id: output_contract_id.clone(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
&authority_scope,
|
||||
launch_document.document_kind(),
|
||||
&output_contract_id,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -3321,11 +3291,6 @@ pub fn launch_current_proposal_modeling_work(
|
|||
instruction: "Act as Epiphany Modeling. Evaluate the exact admitted proposal against the sealed keyed Mind projection and return only the proposal Modeling result contract.".into(),
|
||||
launch_document,
|
||||
output_contract_id: output_contract_id.clone(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
&authority_scope,
|
||||
"role",
|
||||
&output_contract_id,
|
||||
),
|
||||
proposal_modeling_request_id: Some(request.request_id.clone()),
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -3495,11 +3460,6 @@ pub fn launch_current_frontier_verdict_modeling_work(
|
|||
instruction: "Act as Epiphany Modeling. Incorporate the exact typed Soul verdict into only its routed frontier item and return the frontier-verdict result contract.".into(),
|
||||
launch_document,
|
||||
output_contract_id: output_contract_id.clone(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
&authority_scope,
|
||||
"role",
|
||||
&output_contract_id,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ mod imagination_consideration;
|
|||
mod memory_graph;
|
||||
mod mind_contracts;
|
||||
mod mind_documents;
|
||||
mod organ_dependencies;
|
||||
mod packaged_release;
|
||||
mod persona_conversation;
|
||||
mod persona_discord_crossing;
|
||||
|
|
@ -190,6 +189,7 @@ pub use cultmesh_integration::epiphany_cultmesh_bifrost_github_publication_recei
|
|||
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;
|
||||
|
|
@ -199,7 +199,6 @@ pub use cultmesh_integration::load_epiphany_cultmesh_managed_service_policy_with
|
|||
pub use cultmesh_integration::load_epiphany_cultmesh_semantic_projection_health;
|
||||
pub use cultmesh_integration::load_epiphany_cultmesh_swarm_brake;
|
||||
pub use cultmesh_integration::load_latest_epiphany_cultmesh_daemon_heartbeat;
|
||||
pub use cultmesh_integration::load_current_epiphany_cultmesh_daemon_service_lifecycle_receipt_for_service;
|
||||
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;
|
||||
|
|
@ -362,23 +361,6 @@ 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 organ_dependencies::EPIPHANY_LAUNCH_ORGAN_CONTRACT_SCHEMA_VERSION;
|
||||
pub use organ_dependencies::EPIPHANY_ORGAN_DEPENDENCY_SCHEMA_VERSION;
|
||||
pub use organ_dependencies::EPIPHANY_STANDING_ORGANS;
|
||||
pub use organ_dependencies::EpiphanyLaunchOrganContract;
|
||||
pub use organ_dependencies::EpiphanyOrganDependency;
|
||||
pub use organ_dependencies::EpiphanyReceiptEffectKind;
|
||||
pub use organ_dependencies::EpiphanyReceiptProofEvaluation;
|
||||
pub use organ_dependencies::EpiphanyReceiptProofProfile;
|
||||
pub use organ_dependencies::default_launch_organ_contract;
|
||||
pub use organ_dependencies::default_launch_required_receipts;
|
||||
pub use organ_dependencies::default_organ_dependencies_for;
|
||||
pub use organ_dependencies::default_organ_dependency_matrix;
|
||||
pub use organ_dependencies::default_receipt_proof_profiles;
|
||||
pub use organ_dependencies::evaluate_receipt_proof_profiles;
|
||||
pub use organ_dependencies::receipt_proof_evaluation_errors;
|
||||
pub use organ_dependencies::render_organ_dependencies;
|
||||
pub use organ_dependencies::render_organ_dependency;
|
||||
pub use packaged_release::{
|
||||
EPIPHANY_PACKAGED_RELEASE_HEAD_SCHEMA_VERSION, EPIPHANY_PACKAGED_RELEASE_SCHEMA_VERSION,
|
||||
EPIPHANY_PACKAGED_RELEASE_WITNESS_FILE, EpiphanyPackagedReleaseBinary,
|
||||
|
|
|
|||
|
|
@ -1,491 +0,0 @@
|
|||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::continuity_gateway::{
|
||||
CONTINUITY_RECOVERY_RECEIPT_TYPE, CONTINUITY_REFUSAL_RECEIPT_TYPE,
|
||||
};
|
||||
use crate::eyes_gateway::{EYES_EVIDENCE_PACKET_TYPE, EYES_EVIDENCE_REFUSAL_RECEIPT_TYPE};
|
||||
use crate::hands_gateway::{
|
||||
HANDS_ACTION_INTENT_TYPE, HANDS_ACTION_REFUSAL_RECEIPT_TYPE, HANDS_ACTION_REVIEW_TYPE,
|
||||
HANDS_COMMIT_RECEIPT_TYPE, HANDS_PATCH_RECEIPT_TYPE, HANDS_ROLLBACK_RECEIPT_TYPE,
|
||||
};
|
||||
use crate::soul_gateway::{
|
||||
SOUL_REGRESSION_RECEIPT_TYPE, SOUL_REVIEW_RECEIPT_TYPE, SOUL_VERDICT_RECEIPT_TYPE,
|
||||
SOUL_VERIFICATION_REFUSAL_RECEIPT_TYPE,
|
||||
};
|
||||
use crate::substrate_gate::{
|
||||
SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE, SUBSTRATE_GATE_REPO_ACCESS_REFUSAL_RECEIPT_TYPE,
|
||||
SUBSTRATE_GATE_REPO_MUTATION_RECEIPT_TYPE, SUBSTRATE_GATE_REPO_SNAPSHOT_RECEIPT_TYPE,
|
||||
};
|
||||
use crate::{DECISION_CONTEXT_TYPE, MIND_COMMIT_RECEIPT_TYPE, REASONING_BASIS_TYPE};
|
||||
|
||||
pub const EPIPHANY_ORGAN_DEPENDENCY_SCHEMA_VERSION: &str = "epiphany.organ_dependency.v0";
|
||||
pub const EPIPHANY_LAUNCH_ORGAN_CONTRACT_SCHEMA_VERSION: &str = "epiphany.launch_organ_contract.v0";
|
||||
|
||||
pub const EPIPHANY_STANDING_ORGANS: [&str; 7] = [
|
||||
"self",
|
||||
"persona",
|
||||
"imagination",
|
||||
"eyes",
|
||||
"modeling",
|
||||
"hands",
|
||||
"soul",
|
||||
];
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyOrganDependency {
|
||||
pub schema_version: String,
|
||||
pub organ_id: String,
|
||||
pub depends_on: Vec<String>,
|
||||
pub contract: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyLaunchOrganContract {
|
||||
pub schema_version: String,
|
||||
pub authority_scope: String,
|
||||
pub document_kind: String,
|
||||
pub output_contract_id: String,
|
||||
pub owner_organ: String,
|
||||
pub dependencies: Vec<EpiphanyOrganDependency>,
|
||||
#[serde(default)]
|
||||
pub receipt_proof_profiles: Vec<EpiphanyReceiptProofProfile>,
|
||||
pub required_receipt_document_types: Vec<String>,
|
||||
pub contract: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum EpiphanyReceiptEffectKind {
|
||||
#[default]
|
||||
StateAdmission,
|
||||
EvidencePromotion,
|
||||
RepoAction,
|
||||
Verification,
|
||||
ContinuityRecovery,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyReceiptProofProfile {
|
||||
pub effect_kind: EpiphanyReceiptEffectKind,
|
||||
pub owner_organ: String,
|
||||
pub required_before_promotion_document_types: Vec<String>,
|
||||
pub terminal_receipt_document_types: Vec<String>,
|
||||
pub contract: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct EpiphanyReceiptProofEvaluation {
|
||||
pub effect_kind: EpiphanyReceiptEffectKind,
|
||||
pub satisfied_document_types: Vec<String>,
|
||||
pub missing_enforced_document_types: Vec<String>,
|
||||
pub missing_deferred_document_types: Vec<String>,
|
||||
}
|
||||
|
||||
pub fn default_organ_dependencies_for(organ_id: &str) -> EpiphanyOrganDependency {
|
||||
let normalized = organ_id.trim().to_ascii_lowercase();
|
||||
EpiphanyOrganDependency {
|
||||
schema_version: EPIPHANY_ORGAN_DEPENDENCY_SCHEMA_VERSION.to_string(),
|
||||
organ_id: normalized.clone(),
|
||||
depends_on: EPIPHANY_STANDING_ORGANS
|
||||
.iter()
|
||||
.filter(|candidate| **candidate != normalized)
|
||||
.map(|candidate| (*candidate).to_string())
|
||||
.collect(),
|
||||
contract: "Every sub-agent depends on the other sub-agents: Self routes, Persona speaks, Imagination projects futures/scenes, Eyes seeks evidence, Modeling models the Body, Hands acts through Substrate Gate grants, and Soul verifies. Continuity is protocol machinery, not a sub-agent identity.".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn default_organ_dependency_matrix() -> Vec<EpiphanyOrganDependency> {
|
||||
EPIPHANY_STANDING_ORGANS
|
||||
.iter()
|
||||
.map(|organ| default_organ_dependencies_for(organ))
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn default_launch_organ_contract(
|
||||
authority_scope: &str,
|
||||
document_kind: &str,
|
||||
output_contract_id: &str,
|
||||
) -> EpiphanyLaunchOrganContract {
|
||||
EpiphanyLaunchOrganContract {
|
||||
schema_version: EPIPHANY_LAUNCH_ORGAN_CONTRACT_SCHEMA_VERSION.to_string(),
|
||||
authority_scope: authority_scope.to_string(),
|
||||
document_kind: document_kind.to_string(),
|
||||
output_contract_id: output_contract_id.to_string(),
|
||||
owner_organ: owner_organ_for_authority_scope(authority_scope).to_string(),
|
||||
dependencies: default_organ_dependency_matrix(),
|
||||
receipt_proof_profiles: default_receipt_proof_profiles(),
|
||||
required_receipt_document_types: default_launch_required_receipts(),
|
||||
contract: "A worker launch is not naked task cargo: it carries the sub-agent dependency matrix, a receipt document catalogue, and effect-specific proof profiles. Sealed reasoning bases and decision contexts bind model-authored decisions; concrete invariant owners commit Mind mutations; Substrate Gate gates repo access; Eyes supplies evidence; Modeling models the Body; Hands records action; Soul verifies; and Continuity preserves recovery across rupture.".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn default_receipt_proof_profiles() -> Vec<EpiphanyReceiptProofProfile> {
|
||||
vec![
|
||||
EpiphanyReceiptProofProfile {
|
||||
effect_kind: EpiphanyReceiptEffectKind::StateAdmission,
|
||||
owner_organ: "mind".to_string(),
|
||||
required_before_promotion_document_types: vec![
|
||||
REASONING_BASIS_TYPE.to_string(),
|
||||
DECISION_CONTEXT_TYPE.to_string(),
|
||||
],
|
||||
terminal_receipt_document_types: vec![MIND_COMMIT_RECEIPT_TYPE.to_string()],
|
||||
contract: "A model-authored durable decision requires its sealed reasoning basis and decision context before a concrete invariant owner may commit it; the exact Mind commit receipt is terminal proof.".to_string(),
|
||||
},
|
||||
EpiphanyReceiptProofProfile {
|
||||
effect_kind: EpiphanyReceiptEffectKind::EvidencePromotion,
|
||||
owner_organ: "eyes".to_string(),
|
||||
required_before_promotion_document_types: vec![
|
||||
SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE.to_string(),
|
||||
EYES_EVIDENCE_PACKET_TYPE.to_string(),
|
||||
DECISION_CONTEXT_TYPE.to_string(),
|
||||
],
|
||||
terminal_receipt_document_types: vec![
|
||||
MIND_COMMIT_RECEIPT_TYPE.to_string(),
|
||||
EYES_EVIDENCE_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
contract: "A source-dependent truth claim needs scoped substrate access, an Eyes evidence packet, and Mind admission before it becomes durable state.".to_string(),
|
||||
},
|
||||
EpiphanyReceiptProofProfile {
|
||||
effect_kind: EpiphanyReceiptEffectKind::RepoAction,
|
||||
owner_organ: "hands".to_string(),
|
||||
required_before_promotion_document_types: vec![
|
||||
SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE.to_string(),
|
||||
HANDS_ACTION_INTENT_TYPE.to_string(),
|
||||
HANDS_ACTION_REVIEW_TYPE.to_string(),
|
||||
HANDS_PATCH_RECEIPT_TYPE.to_string(),
|
||||
SOUL_VERDICT_RECEIPT_TYPE.to_string(),
|
||||
DECISION_CONTEXT_TYPE.to_string(),
|
||||
],
|
||||
terminal_receipt_document_types: vec![
|
||||
SUBSTRATE_GATE_REPO_MUTATION_RECEIPT_TYPE.to_string(),
|
||||
HANDS_COMMIT_RECEIPT_TYPE.to_string(),
|
||||
HANDS_ROLLBACK_RECEIPT_TYPE.to_string(),
|
||||
HANDS_ACTION_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
SOUL_REGRESSION_RECEIPT_TYPE.to_string(),
|
||||
SOUL_VERIFICATION_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
MIND_COMMIT_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
contract: "A repository mutation needs substrate grant, Hands action proof, Soul verification, and Mind state admission before it can be called true.".to_string(),
|
||||
},
|
||||
EpiphanyReceiptProofProfile {
|
||||
effect_kind: EpiphanyReceiptEffectKind::Verification,
|
||||
owner_organ: "soul".to_string(),
|
||||
required_before_promotion_document_types: vec![
|
||||
SOUL_VERDICT_RECEIPT_TYPE.to_string(),
|
||||
DECISION_CONTEXT_TYPE.to_string(),
|
||||
],
|
||||
terminal_receipt_document_types: vec![
|
||||
SOUL_REVIEW_RECEIPT_TYPE.to_string(),
|
||||
SOUL_REGRESSION_RECEIPT_TYPE.to_string(),
|
||||
SOUL_VERIFICATION_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
MIND_COMMIT_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
contract: "Verification claims require Soul verdict proof before Mind admits the claim into durable state.".to_string(),
|
||||
},
|
||||
EpiphanyReceiptProofProfile {
|
||||
effect_kind: EpiphanyReceiptEffectKind::ContinuityRecovery,
|
||||
owner_organ: "continuity".to_string(),
|
||||
required_before_promotion_document_types: vec![
|
||||
CONTINUITY_RECOVERY_RECEIPT_TYPE.to_string(),
|
||||
DECISION_CONTEXT_TYPE.to_string(),
|
||||
],
|
||||
terminal_receipt_document_types: vec![
|
||||
MIND_COMMIT_RECEIPT_TYPE.to_string(),
|
||||
CONTINUITY_REFUSAL_RECEIPT_TYPE.to_string(),
|
||||
],
|
||||
contract: "Recovery and rupture-crossing claims require Continuity proof plus Mind admission; transcript residue is not durable memory.".to_string(),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn default_launch_required_receipts() -> Vec<String> {
|
||||
unique_strings(vec![
|
||||
REASONING_BASIS_TYPE,
|
||||
DECISION_CONTEXT_TYPE,
|
||||
MIND_COMMIT_RECEIPT_TYPE,
|
||||
SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE,
|
||||
SUBSTRATE_GATE_REPO_ACCESS_REFUSAL_RECEIPT_TYPE,
|
||||
SUBSTRATE_GATE_REPO_SNAPSHOT_RECEIPT_TYPE,
|
||||
SUBSTRATE_GATE_REPO_MUTATION_RECEIPT_TYPE,
|
||||
EYES_EVIDENCE_PACKET_TYPE,
|
||||
EYES_EVIDENCE_REFUSAL_RECEIPT_TYPE,
|
||||
HANDS_ACTION_INTENT_TYPE,
|
||||
HANDS_ACTION_REVIEW_TYPE,
|
||||
HANDS_PATCH_RECEIPT_TYPE,
|
||||
HANDS_COMMIT_RECEIPT_TYPE,
|
||||
HANDS_ROLLBACK_RECEIPT_TYPE,
|
||||
HANDS_ACTION_REFUSAL_RECEIPT_TYPE,
|
||||
SOUL_VERDICT_RECEIPT_TYPE,
|
||||
SOUL_REGRESSION_RECEIPT_TYPE,
|
||||
SOUL_REVIEW_RECEIPT_TYPE,
|
||||
SOUL_VERIFICATION_REFUSAL_RECEIPT_TYPE,
|
||||
CONTINUITY_RECOVERY_RECEIPT_TYPE,
|
||||
CONTINUITY_REFUSAL_RECEIPT_TYPE,
|
||||
])
|
||||
}
|
||||
|
||||
pub fn evaluate_receipt_proof_profiles(
|
||||
contract: &EpiphanyLaunchOrganContract,
|
||||
claimed_effects: &[EpiphanyReceiptEffectKind],
|
||||
available_document_types: &[String],
|
||||
enforceable_document_types: &[String],
|
||||
) -> Vec<EpiphanyReceiptProofEvaluation> {
|
||||
let mut evaluations = Vec::new();
|
||||
for effect_kind in claimed_effects {
|
||||
let Some(profile) = contract
|
||||
.receipt_proof_profiles
|
||||
.iter()
|
||||
.find(|profile| profile.effect_kind == *effect_kind)
|
||||
else {
|
||||
evaluations.push(EpiphanyReceiptProofEvaluation {
|
||||
effect_kind: *effect_kind,
|
||||
missing_enforced_document_types: vec!["missing-proof-profile".to_string()],
|
||||
..Default::default()
|
||||
});
|
||||
continue;
|
||||
};
|
||||
let mut satisfied_document_types = Vec::new();
|
||||
let mut missing_enforced_document_types = Vec::new();
|
||||
let mut missing_deferred_document_types = Vec::new();
|
||||
for document_type in &profile.required_before_promotion_document_types {
|
||||
if available_document_types.contains(document_type) {
|
||||
push_unique_string(&mut satisfied_document_types, document_type);
|
||||
} else if enforceable_document_types.contains(document_type) {
|
||||
push_unique_string(&mut missing_enforced_document_types, document_type);
|
||||
} else {
|
||||
push_unique_string(&mut missing_deferred_document_types, document_type);
|
||||
}
|
||||
}
|
||||
evaluations.push(EpiphanyReceiptProofEvaluation {
|
||||
effect_kind: *effect_kind,
|
||||
satisfied_document_types,
|
||||
missing_enforced_document_types,
|
||||
missing_deferred_document_types,
|
||||
});
|
||||
}
|
||||
evaluations
|
||||
}
|
||||
|
||||
pub fn receipt_proof_evaluation_errors(
|
||||
evaluations: &[EpiphanyReceiptProofEvaluation],
|
||||
) -> Vec<String> {
|
||||
evaluations
|
||||
.iter()
|
||||
.filter(|evaluation| !evaluation.missing_enforced_document_types.is_empty())
|
||||
.map(|evaluation| {
|
||||
format!(
|
||||
"{:?} is missing enforced receipt proofs: {}",
|
||||
evaluation.effect_kind,
|
||||
evaluation.missing_enforced_document_types.join(", ")
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn render_organ_dependency(dependency: &EpiphanyOrganDependency) -> String {
|
||||
let depends_on = if dependency.depends_on.is_empty() {
|
||||
"- none".to_string()
|
||||
} else {
|
||||
dependency
|
||||
.depends_on
|
||||
.iter()
|
||||
.map(|organ| format!("- {organ}"))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n")
|
||||
};
|
||||
format!(
|
||||
"Organ: {}\nDepends on:\n{}\nContract: {}",
|
||||
dependency.organ_id, depends_on, dependency.contract
|
||||
)
|
||||
}
|
||||
|
||||
pub fn render_organ_dependencies(dependencies: &[EpiphanyOrganDependency]) -> String {
|
||||
if dependencies.is_empty() {
|
||||
return "- no organ dependency records supplied".to_string();
|
||||
}
|
||||
dependencies
|
||||
.iter()
|
||||
.map(render_organ_dependency)
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n\n")
|
||||
}
|
||||
|
||||
fn owner_organ_for_authority_scope(authority_scope: &str) -> &'static str {
|
||||
let normalized = authority_scope.trim().to_ascii_lowercase();
|
||||
if normalized.contains("Persona") {
|
||||
"Persona"
|
||||
} else if normalized.contains("imagination") {
|
||||
"imagination"
|
||||
} else if normalized.contains("eyes") || normalized.contains("evidence") {
|
||||
"eyes"
|
||||
} else if normalized.contains("modeling") || normalized.contains("Modeling") {
|
||||
"Modeling"
|
||||
} else if normalized.contains("hands") || normalized.contains("implementation") {
|
||||
"hands"
|
||||
} else if normalized.contains("verification") || normalized.contains("soul") {
|
||||
"soul"
|
||||
} else if normalized.contains("reorient") || normalized.contains("continuity") {
|
||||
"continuity"
|
||||
} else {
|
||||
"self"
|
||||
}
|
||||
}
|
||||
|
||||
fn unique_strings(items: Vec<&'static str>) -> Vec<String> {
|
||||
let mut out = Vec::new();
|
||||
for item in items {
|
||||
push_unique_string(&mut out, item);
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
fn push_unique_string(out: &mut Vec<String>, item: &str) {
|
||||
let item = item.to_string();
|
||||
if !out.contains(&item) {
|
||||
out.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn every_standing_organ_depends_on_every_other_standing_organ() {
|
||||
let matrix = default_organ_dependency_matrix();
|
||||
assert_eq!(matrix.len(), EPIPHANY_STANDING_ORGANS.len());
|
||||
for dependency in matrix {
|
||||
assert_eq!(
|
||||
dependency.depends_on.len(),
|
||||
EPIPHANY_STANDING_ORGANS.len() - 1
|
||||
);
|
||||
assert!(!dependency.depends_on.contains(&dependency.organ_id));
|
||||
for organ in EPIPHANY_STANDING_ORGANS {
|
||||
if organ != dependency.organ_id {
|
||||
assert!(dependency.depends_on.contains(&organ.to_string()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn launch_contract_carries_all_organs_and_decision_audit_receipts() {
|
||||
let contract = default_launch_organ_contract(
|
||||
"epiphany.role.verification",
|
||||
"role",
|
||||
"epiphany.worker.role_result.v1",
|
||||
);
|
||||
assert_eq!(contract.owner_organ, "soul");
|
||||
assert_eq!(contract.dependencies.len(), EPIPHANY_STANDING_ORGANS.len());
|
||||
assert!(
|
||||
contract
|
||||
.required_receipt_document_types
|
||||
.contains(&REASONING_BASIS_TYPE.to_string())
|
||||
);
|
||||
assert!(
|
||||
contract
|
||||
.required_receipt_document_types
|
||||
.contains(&DECISION_CONTEXT_TYPE.to_string())
|
||||
);
|
||||
assert!(
|
||||
contract
|
||||
.required_receipt_document_types
|
||||
.contains(&SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE.to_string())
|
||||
);
|
||||
assert!(
|
||||
contract
|
||||
.required_receipt_document_types
|
||||
.contains(&SOUL_VERDICT_RECEIPT_TYPE.to_string())
|
||||
);
|
||||
assert!(
|
||||
contract
|
||||
.required_receipt_document_types
|
||||
.contains(&HANDS_ACTION_INTENT_TYPE.to_string())
|
||||
);
|
||||
assert!(
|
||||
contract
|
||||
.required_receipt_document_types
|
||||
.contains(&HANDS_ACTION_REVIEW_TYPE.to_string())
|
||||
);
|
||||
assert!(contract.receipt_proof_profiles.iter().any(|profile| {
|
||||
profile.effect_kind == EpiphanyReceiptEffectKind::StateAdmission
|
||||
&& profile
|
||||
.required_before_promotion_document_types
|
||||
.contains(&DECISION_CONTEXT_TYPE.to_string())
|
||||
&& profile
|
||||
.terminal_receipt_document_types
|
||||
.contains(&MIND_COMMIT_RECEIPT_TYPE.to_string())
|
||||
}));
|
||||
assert!(contract.receipt_proof_profiles.iter().any(|profile| {
|
||||
profile.effect_kind == EpiphanyReceiptEffectKind::RepoAction
|
||||
&& profile
|
||||
.required_before_promotion_document_types
|
||||
.contains(&HANDS_ACTION_INTENT_TYPE.to_string())
|
||||
&& profile
|
||||
.required_before_promotion_document_types
|
||||
.contains(&HANDS_ACTION_REVIEW_TYPE.to_string())
|
||||
&& profile
|
||||
.required_before_promotion_document_types
|
||||
.contains(&HANDS_PATCH_RECEIPT_TYPE.to_string())
|
||||
&& profile
|
||||
.required_before_promotion_document_types
|
||||
.contains(&SOUL_VERDICT_RECEIPT_TYPE.to_string())
|
||||
}));
|
||||
assert!(contract.contract.contains("not naked task cargo"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn receipt_profile_evaluation_enforces_only_available_producers() {
|
||||
let contract = default_launch_organ_contract(
|
||||
"epiphany.role.research",
|
||||
"role",
|
||||
"epiphany.worker.role_result.v1",
|
||||
);
|
||||
let evaluations = evaluate_receipt_proof_profiles(
|
||||
&contract,
|
||||
&[
|
||||
EpiphanyReceiptEffectKind::StateAdmission,
|
||||
EpiphanyReceiptEffectKind::EvidencePromotion,
|
||||
],
|
||||
&[
|
||||
REASONING_BASIS_TYPE.to_string(),
|
||||
DECISION_CONTEXT_TYPE.to_string(),
|
||||
],
|
||||
&[
|
||||
REASONING_BASIS_TYPE.to_string(),
|
||||
DECISION_CONTEXT_TYPE.to_string(),
|
||||
],
|
||||
);
|
||||
assert!(receipt_proof_evaluation_errors(&evaluations).is_empty());
|
||||
let evidence = evaluations
|
||||
.iter()
|
||||
.find(|evaluation| {
|
||||
evaluation.effect_kind == EpiphanyReceiptEffectKind::EvidencePromotion
|
||||
})
|
||||
.expect("evidence promotion should be evaluated");
|
||||
assert!(
|
||||
evidence
|
||||
.missing_deferred_document_types
|
||||
.contains(&SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_TYPE.to_string())
|
||||
);
|
||||
assert!(
|
||||
evidence
|
||||
.missing_deferred_document_types
|
||||
.contains(&EYES_EVIDENCE_PACKET_TYPE.to_string())
|
||||
);
|
||||
|
||||
let missing_mind = evaluate_receipt_proof_profiles(
|
||||
&contract,
|
||||
&[EpiphanyReceiptEffectKind::StateAdmission],
|
||||
&[],
|
||||
&[DECISION_CONTEXT_TYPE.to_string()],
|
||||
);
|
||||
assert_eq!(receipt_proof_evaluation_errors(&missing_mind).len(), 1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,5 @@
|
|||
use crate::EpiphanyMindPersonaMemoryDocument;
|
||||
use crate::EpiphanyOrganDependency;
|
||||
use crate::PersonaSocialMention;
|
||||
use crate::default_organ_dependencies_for;
|
||||
use crate::render_organ_dependencies;
|
||||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use cultcache_rs::DatabaseEntry;
|
||||
|
|
@ -13,7 +10,7 @@ use serde_json::Value;
|
|||
use std::path::Path;
|
||||
|
||||
pub const PERSONA_PROJECTOR_PROMPT_SCHEMA_VERSION: &str =
|
||||
"epiphany.imagination_persona_projector_prompt.v0";
|
||||
"epiphany.imagination_persona_projector_prompt.v1";
|
||||
pub const PERSONA_TURN_PROMPT_SCHEMA_VERSION: &str = "epiphany.persona_turn_prompt.v0";
|
||||
pub const PERSONA_INTERPRETER_PROMPT_SCHEMA_VERSION: &str =
|
||||
"epiphany.persona_interpreter_prompt.v0";
|
||||
|
|
@ -248,8 +245,6 @@ pub struct PersonaProjectorInput {
|
|||
pub repo_activity: Vec<PersonaRepoActivity>,
|
||||
#[serde(default)]
|
||||
pub social_affordances: Vec<PersonaSocialAffordance>,
|
||||
#[serde(default)]
|
||||
pub organ_dependencies: Vec<EpiphanyOrganDependency>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||
|
|
@ -284,13 +279,8 @@ pub fn build_persona_projector_prompt_with_transcript(
|
|||
transcript: &[PersonaTranscriptMessage],
|
||||
) -> String {
|
||||
let memory = render_memory_packet(&input.memories);
|
||||
let dependencies = if input.organ_dependencies.is_empty() {
|
||||
vec![default_organ_dependencies_for("Persona")]
|
||||
} else {
|
||||
input.organ_dependencies.clone()
|
||||
};
|
||||
let typed_context = format!(
|
||||
"prompt schema: {schema}\nPersona identity:\n{identity}\n\nTyped memory packet:\n{memory}\n\nSemantic memory recall:\n{semantic_recall}\n\nPending addressed pressure:\n{mentions}\n\nRecent home-repo activity:\n{activity}\n\nLive social affordances:\n{affordances}\n\nOrgan dependency contract:\n{dependencies}",
|
||||
"prompt schema: {schema}\nPersona identity:\n{identity}\n\nTyped memory packet:\n{memory}\n\nSemantic memory recall:\n{semantic_recall}\n\nPending addressed pressure:\n{mentions}\n\nRecent home-repo activity:\n{activity}\n\nLive social affordances:\n{affordances}",
|
||||
schema = PERSONA_PROJECTOR_PROMPT_SCHEMA_VERSION,
|
||||
identity = render_identity(&input.identity),
|
||||
memory = memory,
|
||||
|
|
@ -298,7 +288,6 @@ pub fn build_persona_projector_prompt_with_transcript(
|
|||
mentions = render_pending_mentions(&input.pending_mentions),
|
||||
activity = render_repo_activity(&input.repo_activity),
|
||||
affordances = render_social_affordances(&input.social_affordances),
|
||||
dependencies = render_organ_dependencies(&dependencies),
|
||||
);
|
||||
ghostlight_persona_projection::build_projector_prompt(
|
||||
&ghostlight_persona_projection::ProjectorPrompt {
|
||||
|
|
@ -763,8 +752,6 @@ mod tests {
|
|||
assert!(projector.contains("ghostlight.persona_projection_membrane.v1:projector"));
|
||||
assert!(projector.contains("Mind alone admits durable state"));
|
||||
assert!(projector.contains("Substrate Gate alone grants repo access"));
|
||||
assert!(projector.contains("Organ dependency contract"));
|
||||
assert!(projector.contains("Continuity"));
|
||||
assert!(projector.contains("Do not choose actions"));
|
||||
|
||||
let transcript = vec![PersonaTranscriptMessage {
|
||||
|
|
|
|||
|
|
@ -1976,11 +1976,6 @@ mod tests {
|
|||
document_kind: "role".into(),
|
||||
launch_document_msgpack: rmp_serde::to_vec_named(&document)?,
|
||||
metadata: Default::default(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
"epiphany.role.imagination",
|
||||
"role",
|
||||
crate::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
|
|||
|
|
@ -440,11 +440,6 @@ pub fn launch_current_reorientation_work(
|
|||
instruction: "Decide resume or regather from only the sealed typed continuity projection. Return the reorientation result contract; do not invent live state.".into(),
|
||||
launch_document,
|
||||
output_contract_id: output_contract_id.clone(),
|
||||
organ_launch_contract: crate::default_launch_organ_contract(
|
||||
"epiphany.reorient.decision",
|
||||
"reorient",
|
||||
&output_contract_id,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ use crate::eyes_gateway::EYES_SOURCE_LOOKUP_RECEIPT_TYPE;
|
|||
use crate::eyes_gateway::EyesEvidencePacket;
|
||||
use crate::eyes_gateway::EyesSourceLookupReceipt;
|
||||
use crate::hands_gateway::*;
|
||||
use crate::organ_dependencies::EpiphanyLaunchOrganContract;
|
||||
use crate::repo_model_gateway::{
|
||||
REPO_FRONTIER_AUTONOMOUS_PROPOSAL_BINDING_CONTRACT,
|
||||
REPO_FRONTIER_AUTONOMOUS_PROPOSAL_BINDING_SCHEMA_VERSION,
|
||||
|
|
@ -166,7 +165,7 @@ pub const RUNTIME_TOOL_EXECUTION_BINDING_SCHEMA_VERSION: &str =
|
|||
"epiphany.runtime.tool_execution_binding.v0";
|
||||
pub const ARCHIVED_RUNTIME_SESSION_SCHEMA_VERSION: &str = "epiphany.runtime.archived_session.v0";
|
||||
pub const RUNTIME_WORKER_LAUNCH_REQUEST_SCHEMA_VERSION: &str =
|
||||
"epiphany.runtime.worker_launch_request.v1";
|
||||
"epiphany.runtime.worker_launch_request.v2";
|
||||
pub const RUNTIME_WORKER_PROCESS_CLAIM_SCHEMA_VERSION: &str =
|
||||
"epiphany.runtime.worker_process_claim.v0";
|
||||
pub const ARCHIVED_RUNTIME_WORKER_ATTEMPT_SCHEMA_VERSION: &str =
|
||||
|
|
@ -412,8 +411,6 @@ pub struct EpiphanyRuntimeWorkerLaunchRequest {
|
|||
pub launch_document_msgpack: Vec<u8>,
|
||||
#[cultcache(key = 9, default)]
|
||||
pub metadata: BTreeMap<String, String>,
|
||||
#[cultcache(key = 10, default)]
|
||||
pub organ_launch_contract: EpiphanyLaunchOrganContract,
|
||||
#[cultcache(key = 11, default)]
|
||||
pub proposal_modeling_request_id: Option<String>,
|
||||
#[cultcache(key = 12, default)]
|
||||
|
|
@ -1037,7 +1034,6 @@ pub struct RuntimeSpineHeartbeatJobOptions {
|
|||
pub instruction: String,
|
||||
pub launch_document: EpiphanyWorkerLaunchDocument,
|
||||
pub output_contract_id: String,
|
||||
pub organ_launch_contract: EpiphanyLaunchOrganContract,
|
||||
pub proposal_modeling_request_id: Option<String>,
|
||||
pub frontier_planning_request_id: Option<String>,
|
||||
pub frontier_plan_mind_request_id: Option<String>,
|
||||
|
|
@ -3426,12 +3422,6 @@ pub fn open_runtime_spine_heartbeat_job(
|
|||
"worker launch output_contract_id must match the typed launch document"
|
||||
));
|
||||
}
|
||||
validate_launch_organ_contract(
|
||||
&options.organ_launch_contract,
|
||||
&options.authority_scope,
|
||||
options.launch_document.document_kind(),
|
||||
&options.output_contract_id,
|
||||
)?;
|
||||
validate_non_empty(&options.created_at, "created at")?;
|
||||
let store_path = store_path.as_ref();
|
||||
let job_id = options.job_id.clone();
|
||||
|
|
@ -3440,7 +3430,6 @@ pub fn open_runtime_spine_heartbeat_job(
|
|||
let authority_scope = options.authority_scope.clone();
|
||||
let instruction = options.instruction.clone();
|
||||
let output_contract_id = options.output_contract_id.clone();
|
||||
let organ_launch_contract = options.organ_launch_contract.clone();
|
||||
let launch_document = options.launch_document.clone();
|
||||
initialize_runtime_spine(
|
||||
store_path,
|
||||
|
|
@ -3495,7 +3484,6 @@ pub fn open_runtime_spine_heartbeat_job(
|
|||
document_kind: worker_launch_document_kind(&launch_document).to_string(),
|
||||
launch_document_msgpack: encode_worker_launch_document(&launch_document)?,
|
||||
metadata: BTreeMap::new(),
|
||||
organ_launch_contract,
|
||||
proposal_modeling_request_id: options.proposal_modeling_request_id,
|
||||
frontier_planning_request_id: options.frontier_planning_request_id,
|
||||
frontier_plan_mind_request_id: options.frontier_plan_mind_request_id,
|
||||
|
|
@ -3569,12 +3557,6 @@ pub fn prepare_runtime_spine_heartbeat_job(
|
|||
"worker launch output_contract_id must match the typed launch document"
|
||||
));
|
||||
}
|
||||
validate_launch_organ_contract(
|
||||
&options.organ_launch_contract,
|
||||
&options.authority_scope,
|
||||
options.launch_document.document_kind(),
|
||||
&options.output_contract_id,
|
||||
)?;
|
||||
validate_non_empty(&options.created_at, "created at")?;
|
||||
|
||||
let existing_identity = cache.get::<EpiphanyRuntimeIdentity>(RUNTIME_IDENTITY_KEY)?;
|
||||
|
|
@ -3664,7 +3646,6 @@ pub fn prepare_runtime_spine_heartbeat_job(
|
|||
document_kind: worker_launch_document_kind(&options.launch_document).to_string(),
|
||||
launch_document_msgpack: encode_worker_launch_document(&options.launch_document)?,
|
||||
metadata: BTreeMap::new(),
|
||||
organ_launch_contract: options.organ_launch_contract,
|
||||
proposal_modeling_request_id: options.proposal_modeling_request_id,
|
||||
frontier_planning_request_id: options.frontier_planning_request_id,
|
||||
frontier_plan_mind_request_id: options.frontier_plan_mind_request_id,
|
||||
|
|
@ -13970,53 +13951,6 @@ fn encode_worker_launch_document(document: &EpiphanyWorkerLaunchDocument) -> Res
|
|||
rmp_serde::to_vec_named(document).context("failed to encode worker launch document MessagePack")
|
||||
}
|
||||
|
||||
fn validate_launch_organ_contract(
|
||||
contract: &EpiphanyLaunchOrganContract,
|
||||
authority_scope: &str,
|
||||
document_kind: &str,
|
||||
output_contract_id: &str,
|
||||
) -> Result<()> {
|
||||
validate_non_empty(
|
||||
&contract.schema_version,
|
||||
"epiphany launch organ contract schema_version",
|
||||
)?;
|
||||
if contract.authority_scope != authority_scope {
|
||||
return Err(anyhow!(
|
||||
"epiphany launch organ contract authority_scope must match the launch request"
|
||||
));
|
||||
}
|
||||
if contract.document_kind != document_kind {
|
||||
return Err(anyhow!(
|
||||
"epiphany launch organ contract document_kind must match the typed launch document"
|
||||
));
|
||||
}
|
||||
if contract.output_contract_id != output_contract_id {
|
||||
return Err(anyhow!(
|
||||
"epiphany launch organ contract output_contract_id must match the launch request"
|
||||
));
|
||||
}
|
||||
validate_non_empty(
|
||||
&contract.owner_organ,
|
||||
"epiphany launch organ contract owner_organ",
|
||||
)?;
|
||||
if contract.dependencies.is_empty() {
|
||||
return Err(anyhow!(
|
||||
"epiphany launch organ contract must carry organ dependencies"
|
||||
));
|
||||
}
|
||||
if contract.required_receipt_document_types.is_empty() {
|
||||
return Err(anyhow!(
|
||||
"epiphany launch organ contract must carry required receipt document types"
|
||||
));
|
||||
}
|
||||
if contract.receipt_proof_profiles.is_empty() {
|
||||
return Err(anyhow!(
|
||||
"epiphany launch organ contract must carry effect-specific receipt proof profiles"
|
||||
));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn decode_optional_msgpack<T>(payload: Option<&[u8]>, label: &str) -> Result<Option<T>>
|
||||
where
|
||||
T: for<'de> Deserialize<'de>,
|
||||
|
|
|
|||
|
|
@ -1273,7 +1273,6 @@ mod tests {
|
|||
use epiphany_core::EpiphanyRuntimeJobStatus;
|
||||
use epiphany_core::EpiphanyWorkerLaunchDocument;
|
||||
use epiphany_core::RuntimeSpineHeartbeatJobOptions;
|
||||
use epiphany_core::default_launch_organ_contract;
|
||||
use epiphany_core::open_runtime_spine_heartbeat_job;
|
||||
use epiphany_core::runtime_job_snapshot;
|
||||
use epiphany_core::runtime_worker_launch_request;
|
||||
|
|
@ -1660,11 +1659,6 @@ mod tests {
|
|||
},
|
||||
),
|
||||
output_contract_id: epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID.to_string(),
|
||||
organ_launch_contract: default_launch_organ_contract(
|
||||
"epiphany.role.verification",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -1778,11 +1772,6 @@ mod tests {
|
|||
},
|
||||
),
|
||||
output_contract_id: epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID.to_string(),
|
||||
organ_launch_contract: default_launch_organ_contract(
|
||||
"epiphany.role.verification",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -1918,11 +1907,6 @@ mod tests {
|
|||
},
|
||||
),
|
||||
output_contract_id: epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID.to_string(),
|
||||
organ_launch_contract: default_launch_organ_contract(
|
||||
"epiphany.role.verification",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ use epiphany_core::{
|
|||
EpiphanyMindPersonaMemoryDocument, EpiphanyMindPersonaPassInputDocument, PersonaIdentity,
|
||||
PersonaProjectorInput, PersonaRepoActivity, PersonaSocialAffordance, PersonaTranscriptMessage,
|
||||
PersonaTurnRequest, PersonaTurnTerminalOptions, admit_persona_pass_input, assemble_mind_view,
|
||||
complete_persona_social_turn, default_organ_dependencies_for,
|
||||
exchange_persona_discord_delivery_rudp, load_admitted_persona_pass_input,
|
||||
load_epiphany_cultmesh_swarm_brake, load_persona_discord_receipt_anchor,
|
||||
load_persona_discord_service_anchor, open_persona_discord_request_identity,
|
||||
pending_persona_discord_delivery_request_for_turn, persona_delivery_receipt_exists_for_turn,
|
||||
persona_model_terminal_exists, persona_turn_request_source, persona_turn_requests,
|
||||
poll_persona_discord_crossing, pulse_persona_social, reconcile_terminal_persona_conversation,
|
||||
complete_persona_social_turn, exchange_persona_discord_delivery_rudp,
|
||||
load_admitted_persona_pass_input, load_epiphany_cultmesh_swarm_brake,
|
||||
load_persona_discord_receipt_anchor, load_persona_discord_service_anchor,
|
||||
open_persona_discord_request_identity, pending_persona_discord_delivery_request_for_turn,
|
||||
persona_delivery_receipt_exists_for_turn, persona_model_terminal_exists,
|
||||
persona_turn_request_source, persona_turn_requests, poll_persona_discord_crossing,
|
||||
pulse_persona_social, reconcile_terminal_persona_conversation,
|
||||
retain_terminal_persona_conversations, validate_persona_discord_request_anchor,
|
||||
};
|
||||
use epiphany_openai_runtime::{
|
||||
|
|
@ -246,7 +246,6 @@ fn ensure_persona_pass_input_admitted(
|
|||
pending_mentions: request.mentions.clone(),
|
||||
repo_activity,
|
||||
social_affordances,
|
||||
organ_dependencies: vec![default_organ_dependencies_for("Persona")],
|
||||
};
|
||||
let social_source = persona_turn_request_source(&options.social_store, &request.request_id)?;
|
||||
let mut observed_sources = vec![social_source.clone()];
|
||||
|
|
|
|||
|
|
@ -2969,11 +2969,6 @@ mod tests {
|
|||
document_kind: "role".into(),
|
||||
launch_document_msgpack: Vec::new(),
|
||||
metadata: std::collections::BTreeMap::new(),
|
||||
organ_launch_contract: epiphany_core::default_launch_organ_contract(
|
||||
"epiphany.role.modeling",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: Some("proposal-request-1".into()),
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -3118,11 +3113,6 @@ mod tests {
|
|||
document_kind: "role".into(),
|
||||
launch_document_msgpack: Vec::new(),
|
||||
metadata: std::collections::BTreeMap::new(),
|
||||
organ_launch_contract: epiphany_core::default_launch_organ_contract(
|
||||
"epiphany.role.modeling",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -3282,11 +3272,6 @@ mod tests {
|
|||
document_kind: "role".into(),
|
||||
launch_document_msgpack: rmp_serde::to_vec_named(&document)?,
|
||||
metadata: std::collections::BTreeMap::new(),
|
||||
organ_launch_contract: epiphany_core::default_launch_organ_contract(
|
||||
"epiphany.role.modeling",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: Some("proposal-request-1".into()),
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -3365,11 +3350,6 @@ mod tests {
|
|||
document_kind: "role".into(),
|
||||
launch_document_msgpack: Vec::new(),
|
||||
metadata: std::collections::BTreeMap::new(),
|
||||
organ_launch_contract: epiphany_core::default_launch_organ_contract(
|
||||
"epiphany.role.imagination",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: Some("planning-request-1".into()),
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -3535,11 +3515,6 @@ mod tests {
|
|||
document_kind: "role".into(),
|
||||
launch_document_msgpack: Vec::new(),
|
||||
metadata: std::collections::BTreeMap::new(),
|
||||
organ_launch_contract: epiphany_core::default_launch_organ_contract(
|
||||
"epiphany.imagination.consideration.proposal_only",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -3644,11 +3619,6 @@ mod tests {
|
|||
document_kind: "role".into(),
|
||||
launch_document_msgpack: rmp_serde::to_vec_named(&document)?,
|
||||
metadata: std::collections::BTreeMap::new(),
|
||||
organ_launch_contract: epiphany_core::default_launch_organ_contract(
|
||||
"epiphany.role.imagination",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: Some("planning-request-1".into()),
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -3695,11 +3665,6 @@ mod tests {
|
|||
document_kind: "role".into(),
|
||||
launch_document_msgpack: Vec::new(),
|
||||
metadata: std::collections::BTreeMap::new(),
|
||||
organ_launch_contract: epiphany_core::default_launch_organ_contract(
|
||||
"epiphany.procedure.mind_admission_review",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: Some("mind-request-1".into()),
|
||||
|
|
@ -4142,11 +4107,6 @@ mod tests {
|
|||
},
|
||||
),
|
||||
output_contract_id: epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID.to_string(),
|
||||
organ_launch_contract: epiphany_core::default_launch_organ_contract(
|
||||
"epiphany.role.modeling",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
@ -4459,11 +4419,6 @@ mod tests {
|
|||
},
|
||||
),
|
||||
output_contract_id: epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID.to_string(),
|
||||
organ_launch_contract: epiphany_core::default_launch_organ_contract(
|
||||
"epiphany.role.verification",
|
||||
"role",
|
||||
epiphany_core::ROLE_WORKER_OUTPUT_CONTRACT_ID,
|
||||
),
|
||||
proposal_modeling_request_id: None,
|
||||
frontier_planning_request_id: None,
|
||||
frontier_plan_mind_request_id: None,
|
||||
|
|
|
|||
Reference in a new issue