Delete unearned Persona identity executables

This commit is contained in:
Meta Vens 2026-08-23 18:53:48 +02:00
commit ad2292ee32
6 changed files with 0 additions and 177 deletions

View file

@ -118,18 +118,10 @@ name = "epiphany-persona-service"
path = "epiphany-openai-runtime/src/bin/epiphany-persona-service.rs"
required-features = ["openai-runtime"]
[[bin]]
name = "epiphany-persona-mouth-identity"
path = "epiphany-core/src/bin/epiphany-persona-mouth-identity.rs"
[[bin]]
name = "epiphany-persona-discord-permit"
path = "epiphany-core/src/bin/epiphany-persona-discord-permit.rs"
[[bin]]
name = "epiphany-persona-discord-permit-identity"
path = "epiphany-core/src/bin/epiphany-persona-discord-permit-identity.rs"
[[bin]]
name = "epiphany-mvp-coordinator"
path = "epiphany-core/src/bin/epiphany-mvp-coordinator.rs"

View file

@ -1,24 +0,0 @@
use anyhow::{Result, anyhow};
use std::{env, path::PathBuf};
fn main() -> Result<()> {
let mut identity = None;
let mut anchor = None;
let mut runtime = "epiphany-yggdrasil".to_string();
let mut args = env::args().skip(1);
while let Some(key) = args.next() {
let value = args
.next()
.ok_or_else(|| anyhow!("{key} requires a value"))?;
match key.as_str() {
"--permit-identity-store" => identity = Some(PathBuf::from(value)),
"--permit-anchor" => anchor = Some(PathBuf::from(value)),
"--runtime-id" => runtime = value,
_ => return Err(anyhow!("unknown argument {key}")),
}
}
epiphany_core::ensure_epiphany_permit_identity(
&identity.ok_or_else(|| anyhow!("--permit-identity-store is required"))?,
&anchor.ok_or_else(|| anyhow!("--permit-anchor is required"))?,
&runtime,
)
}

View file

@ -1,41 +0,0 @@
use std::{env, path::PathBuf};
use anyhow::{Result, anyhow};
use epiphany_core::{
enroll_persona_discord_request_identity, export_persona_discord_request_anchor_candidate,
};
fn main() -> Result<()> {
let mut mouth_identity_store = None;
let mut mouth_request_anchor = None;
let mut runtime_id = None;
let mut args = env::args().skip(1);
while let Some(arg) = args.next() {
let value = args
.next()
.ok_or_else(|| anyhow!("{arg} requires a value"))?;
match arg.as_str() {
"--mouth-identity-store" => mouth_identity_store = Some(PathBuf::from(value)),
"--mouth-request-anchor" => mouth_request_anchor = Some(PathBuf::from(value)),
"--runtime-id" => runtime_id = Some(value),
_ => return Err(anyhow!("unknown argument {arg}")),
}
}
let identity =
mouth_identity_store.ok_or_else(|| anyhow!("--mouth-identity-store is required"))?;
let anchor =
mouth_request_anchor.ok_or_else(|| anyhow!("--mouth-request-anchor is required"))?;
let runtime = runtime_id.ok_or_else(|| anyhow!("--runtime-id is required"))?;
enroll_persona_discord_request_identity(&identity)?;
export_persona_discord_request_anchor_candidate(&identity, &anchor, &runtime)?;
println!(
"{}",
serde_json::json!({
"schemaVersion": "epiphany.persona_mouth_identity_enrollment.v0",
"status": "ready",
"runtimeId": runtime,
"privateStateExposed": false
})
);
Ok(())
}

View file

@ -193,54 +193,6 @@ pub fn open_persona_discord_request_identity(
cultnet_rs::open_service_identity_at::<EpiphanyPersonaDeliveryRequestIdentity>(path)
}
pub fn enroll_persona_discord_request_identity(path: &Path) -> Result<()> {
if path.exists() {
open_persona_discord_request_identity(path)?;
return Ok(());
}
cultnet_rs::enroll_service_identity_at::<EpiphanyPersonaDeliveryRequestIdentity>(path)?;
Ok(())
}
pub fn export_persona_discord_request_anchor_candidate(
identity_store: &Path,
output: &Path,
runtime_id: &str,
) -> Result<()> {
let signer = open_persona_discord_request_identity(identity_store)?;
if output.exists() {
let existing = load_persona_discord_service_anchor(output)?;
validate_persona_discord_request_anchor(&existing, runtime_id)?;
if existing.signer_identity_id != signer.entry().identity_id
|| existing.signer_public_key != signer.entry().public_key
{
bail!("existing request anchor candidate belongs to a different identity");
}
return Ok(());
}
let record = GameCultServiceTrustAnchorRecord {
schema_version: GAMECULT_SERVICE_TRUST_ANCHOR_SCHEMA.into(),
trust_anchor_id: format!("epiphany-persona-mouth:{runtime_id}:delivery-request:v0"),
service_id: EPIPHANY_PERSONA_MOUTH_SERVICE_ID.into(),
runtime_id: runtime_id.into(),
signer_identity_id: signer.entry().identity_id.clone(),
signer_public_key: signer.entry().public_key.clone(),
signature_algorithm: "ed25519".into(),
signing_purpose: PERSONA_DISCORD_DELIVERY_REQUEST_SIGNING_PURPOSE.into(),
signed_schema: PERSONA_DISCORD_DELIVERY_REQUEST_SCHEMA_VERSION.into(),
binding_authority: "root".into(),
bound_at_unix_millis: chrono::Utc::now().timestamp_millis().max(1) as u64,
expires_at_unix_millis: None,
private_state_exposed: false,
};
record.validate()?;
if let Some(parent) = output.parent() {
std::fs::create_dir_all(parent)?;
}
std::fs::write(output, rmp_serde::to_vec(&record)?)?;
Ok(())
}
pub fn request_signing_payload(request: &PersonaDiscordDeliveryRequest) -> Result<Vec<u8>> {
Ok(rmp_serde::to_vec(&request_signing_tuple(request))?)
}

View file

@ -135,54 +135,6 @@ pub struct PersonaPermitIssuerConfig {
pub provider_anchor: GameCultServiceTrustAnchorRecord,
}
pub fn ensure_epiphany_permit_identity(
identity_store: &Path,
anchor_output: &Path,
runtime_id: &str,
) -> Result<()> {
let signer = if identity_store.exists() {
cultnet_rs::open_service_identity_at::<EpiphanyPermitIdentity>(identity_store)?
} else {
cultnet_rs::enroll_service_identity_at::<EpiphanyPermitIdentity>(identity_store)?
};
if anchor_output.exists() {
let anchor: GameCultServiceTrustAnchorRecord =
rmp_serde::from_slice(&std::fs::read(anchor_output)?)?;
anchor.validate()?;
if anchor.service_id != "epiphany-persona-discord-permit"
|| anchor.runtime_id != runtime_id
|| anchor.signer_identity_id != signer.entry().identity_id
|| anchor.signer_public_key != signer.entry().public_key
|| anchor.signing_purpose != PERMIT_PURPOSE
|| anchor.signed_schema != PERMIT_SCHEMA
{
bail!("existing permit anchor candidate differs from enrolled identity/profile");
}
return Ok(());
}
let anchor = GameCultServiceTrustAnchorRecord {
schema_version: cultnet_rs::GAMECULT_SERVICE_TRUST_ANCHOR_SCHEMA.into(),
trust_anchor_id: format!("epiphany-persona-discord-permit:{runtime_id}:v0"),
service_id: "epiphany-persona-discord-permit".into(),
runtime_id: runtime_id.into(),
signer_identity_id: signer.entry().identity_id.clone(),
signer_public_key: signer.entry().public_key.clone(),
signature_algorithm: "ed25519".into(),
signing_purpose: PERMIT_PURPOSE.into(),
signed_schema: PERMIT_SCHEMA.into(),
binding_authority: "root".into(),
bound_at_unix_millis: chrono::Utc::now().timestamp_millis().max(1) as u64,
expires_at_unix_millis: None,
private_state_exposed: false,
};
anchor.validate()?;
if let Some(parent) = anchor_output.parent() {
std::fs::create_dir_all(parent)?;
}
std::fs::write(anchor_output, rmp_serde::to_vec(&anchor)?)?;
Ok(())
}
pub fn issue_persona_discord_permit(
config: &PersonaPermitIssuerConfig,
signer: &ServiceIdentitySigner<EpiphanyPermitIdentity>,

View file

@ -101,18 +101,10 @@ pub fn required_packaged_release_binaries(target_triple: &str) -> Vec<(&'static
file_name("epiphany-persona-feedback-ingress"),
),
("persona-service", file_name("epiphany-persona-service")),
(
"persona-mouth-identity",
file_name("epiphany-persona-mouth-identity"),
),
(
"persona-discord-permit",
file_name("epiphany-persona-discord-permit"),
),
(
"persona-discord-permit-identity",
file_name("epiphany-persona-discord-permit-identity"),
),
("coordinator", file_name("epiphany-mvp-coordinator")),
("frontier-proposal", file_name("epiphany-frontier-proposal")),
("hands-action", file_name("epiphany-hands-action")),