Separate character context from scheduler physiology
This commit is contained in:
parent
4e1b80c98a
commit
ef26c0753a
10 changed files with 58 additions and 51 deletions
|
|
@ -10,7 +10,6 @@ use epiphany_core::HeartbeatAgentThoughtAppraisal;
|
|||
use epiphany_core::HeartbeatAppraisalReview;
|
||||
use epiphany_core::HeartbeatCandidateImplications;
|
||||
use epiphany_core::HeartbeatEmotionalAppraisal;
|
||||
use epiphany_core::HeartbeatParticipant;
|
||||
use epiphany_core::HeartbeatParticipantLocalContext;
|
||||
use epiphany_core::HeartbeatPersonalityProjection;
|
||||
use epiphany_core::derive_agent_utterance_state;
|
||||
|
|
@ -40,7 +39,6 @@ fn main() -> Result<()> {
|
|||
let mut stimulus: Option<String> = None;
|
||||
let mut source = "epiphany/character-loop".to_string();
|
||||
let mut mode = "public-surface".to_string();
|
||||
let mut status = "ready".to_string();
|
||||
let mut mood = "attentive".to_string();
|
||||
|
||||
while let Some(arg) = args.next() {
|
||||
|
|
@ -51,7 +49,6 @@ fn main() -> Result<()> {
|
|||
"--stimulus" => stimulus = Some(next_value(&mut args, "--stimulus")?),
|
||||
"--source" => source = next_value(&mut args, "--source")?,
|
||||
"--mode" => mode = next_value(&mut args, "--mode")?,
|
||||
"--status" => status = next_value(&mut args, "--status")?,
|
||||
"--mood" => mood = next_value(&mut args, "--mood")?,
|
||||
_ => return Err(anyhow!("unknown argument {arg:?}")),
|
||||
}
|
||||
|
|
@ -67,7 +64,6 @@ fn main() -> Result<()> {
|
|||
&stimulus,
|
||||
&source,
|
||||
&mode,
|
||||
&status,
|
||||
&mood,
|
||||
)?
|
||||
}
|
||||
|
|
@ -90,7 +86,6 @@ fn run_turn(
|
|||
stimulus: &str,
|
||||
source: &str,
|
||||
mode: &str,
|
||||
status: &str,
|
||||
mood: &str,
|
||||
) -> Result<Value> {
|
||||
if role.trim().is_empty() {
|
||||
|
|
@ -103,7 +98,7 @@ fn run_turn(
|
|||
agent_store.display()
|
||||
)
|
||||
})?;
|
||||
let packet = character_turn_packet(&entry, stimulus, source, mode, status, mood);
|
||||
let packet = character_turn_packet(&entry, stimulus, source, mode, mood);
|
||||
let path = artifact_dir.join(format!(
|
||||
"character-turn-{}-{}-{}.json",
|
||||
sanitize_file_stem(role),
|
||||
|
|
@ -126,19 +121,15 @@ fn character_turn_packet(
|
|||
stimulus: &str,
|
||||
source: &str,
|
||||
mode: &str,
|
||||
status: &str,
|
||||
mood: &str,
|
||||
) -> Value {
|
||||
let organ_state_profile = organ_state_profile_for_role(&entry.role_id);
|
||||
let participant = character_loop_participant(entry, status);
|
||||
let utterance_state =
|
||||
derive_agent_utterance_state(entry, Some(&participant), Some(mood), source);
|
||||
let projection_seed =
|
||||
deterministic_projection_seed(entry, stimulus, source, mode, status, mood);
|
||||
let utterance_state = derive_agent_utterance_state(entry, None, Some(mood), source);
|
||||
let projection_seed = deterministic_projection_seed(entry, stimulus, source, mode, mood);
|
||||
let appraisal_seed = deterministic_appraisal_seed(entry, &projection_seed, stimulus, source);
|
||||
let reaction_seed = deterministic_reaction_seed(&entry.role_id, &appraisal_seed);
|
||||
serde_json::json!({
|
||||
"schema_version": CHARACTER_TURN_SCHEMA_VERSION,
|
||||
"schemaVersion": CHARACTER_TURN_SCHEMA_VERSION,
|
||||
"protocol": {
|
||||
"bundle": "epiphany.character_loop",
|
||||
"referenceLineage": "Ghostlight-style character-local cognition, rebuilt as Epiphany-native protocol.",
|
||||
|
|
@ -154,7 +145,7 @@ fn character_turn_packet(
|
|||
"stimulus": {
|
||||
"kind": "operator_or_aquarium_input",
|
||||
"content": stimulus,
|
||||
"status": status,
|
||||
"status": "received",
|
||||
"mood": mood,
|
||||
},
|
||||
"utteranceState": utterance_state,
|
||||
|
|
@ -254,25 +245,6 @@ fn character_turn_packet(
|
|||
})
|
||||
}
|
||||
|
||||
fn character_loop_participant(
|
||||
entry: &EpiphanyAgentMemoryEntry,
|
||||
status: &str,
|
||||
) -> HeartbeatParticipant {
|
||||
HeartbeatParticipant {
|
||||
agent_id: entry.agent.agent_id.clone(),
|
||||
role_id: entry.role_id.clone(),
|
||||
display_name: entry.agent.identity.name.clone(),
|
||||
initiative_speed: 1.0,
|
||||
reaction_bias: 0.5,
|
||||
interrupt_threshold: 0.5,
|
||||
status: status.to_string(),
|
||||
personality_cooldown_multiplier: 1.0,
|
||||
mood_cooldown_multiplier: 1.0,
|
||||
initiative_heat_multiplier: 1.0,
|
||||
..HeartbeatParticipant::default()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
struct TraitSignal {
|
||||
group: &'static str,
|
||||
|
|
@ -319,10 +291,9 @@ fn deterministic_projection_seed(
|
|||
stimulus: &str,
|
||||
source: &str,
|
||||
mode: &str,
|
||||
status: &str,
|
||||
mood: &str,
|
||||
) -> CharacterProjectionSeed {
|
||||
let thought_tokens = stimulus_token_set(stimulus, source, mode, status, mood);
|
||||
let thought_tokens = stimulus_token_set(stimulus, source, mode, mood);
|
||||
let traits = collect_trait_signals(entry);
|
||||
let mut scored = traits
|
||||
.iter()
|
||||
|
|
@ -613,18 +584,11 @@ fn strongest_overlay_pressure(
|
|||
))
|
||||
}
|
||||
|
||||
fn stimulus_token_set(
|
||||
stimulus: &str,
|
||||
source: &str,
|
||||
mode: &str,
|
||||
status: &str,
|
||||
mood: &str,
|
||||
) -> BTreeSet<String> {
|
||||
fn stimulus_token_set(stimulus: &str, source: &str, mode: &str, mood: &str) -> BTreeSet<String> {
|
||||
let mut tokens = BTreeSet::new();
|
||||
tokens.extend(summary_tokens(stimulus));
|
||||
tokens.extend(summary_tokens(source));
|
||||
tokens.extend(summary_tokens(mode));
|
||||
tokens.extend(summary_tokens(status));
|
||||
tokens.extend(summary_tokens(mood));
|
||||
tokens
|
||||
}
|
||||
|
|
@ -769,7 +733,6 @@ fn run_smoke() -> Result<Value> {
|
|||
"Aquarium hover selected Persona and asked what the swarm is feeling.",
|
||||
"smoke/character-loop",
|
||||
"public-surface",
|
||||
"ready",
|
||||
"attentive",
|
||||
)?;
|
||||
let path = PathBuf::from(
|
||||
|
|
@ -781,7 +744,7 @@ fn run_smoke() -> Result<Value> {
|
|||
&fs::read_to_string(&path)
|
||||
.with_context(|| format!("failed to read smoke artifact {}", path.display()))?,
|
||||
)?;
|
||||
let ok = packet["schema_version"] == CHARACTER_TURN_SCHEMA_VERSION
|
||||
let ok = packet["schemaVersion"] == CHARACTER_TURN_SCHEMA_VERSION
|
||||
&& packet["protocol"]["bundle"] == "epiphany.character_loop"
|
||||
&& packet["protocol"]["roleId"] == "Persona"
|
||||
&& packet["protocol"]["organStateProfile"]["profileKind"] == "persona"
|
||||
|
|
@ -813,6 +776,8 @@ fn run_smoke() -> Result<Value> {
|
|||
&& packet["stimulus"]["content"]
|
||||
.as_str()
|
||||
.is_some_and(|text| text.contains("Aquarium"))
|
||||
&& packet["stimulus"]["status"] == "received"
|
||||
&& packet["utteranceState"]["activation"]["status"] == "unknown"
|
||||
&& packet["cognitionLanes"]["schema_version"] == "epiphany.cognition_lanes.v0"
|
||||
&& packet["cognitionLanes"]["bridge"]["schema_version"] == "epiphany.cognition_bridge.v0"
|
||||
&& packet["cognitionLanes"]["appraisal"]["schema_version"]
|
||||
|
|
@ -821,7 +786,9 @@ fn run_smoke() -> Result<Value> {
|
|||
"ok": ok,
|
||||
"turnPath": path,
|
||||
"packet": {
|
||||
"schemaVersion": packet["schema_version"],
|
||||
"schemaVersion": packet["schemaVersion"],
|
||||
"stimulusStatus": packet["stimulus"]["status"],
|
||||
"activationStatus": packet["utteranceState"]["activation"]["status"],
|
||||
"bundle": packet["protocol"]["bundle"],
|
||||
"roleId": packet["protocol"]["roleId"],
|
||||
"agentId": packet["protocol"]["agentId"],
|
||||
|
|
|
|||
|
|
@ -548,7 +548,7 @@ fn native_auxiliary_status(root: &Path) -> Result<NativeAuxiliaryStatus> {
|
|||
.unwrap_or_default(),
|
||||
);
|
||||
let persona = json!({
|
||||
"status": "ready",
|
||||
"status": "loaded",
|
||||
"artifactDir": persona_dir,
|
||||
"latestArtifacts": latest_artifacts,
|
||||
"availableActions": ["personaBubble", "characterTurn", "discordPersonaPost", "redditPersonaPost", "otherWorldPersonaRequest"],
|
||||
|
|
|
|||
|
|
@ -1507,8 +1507,6 @@ fn run_persona_intake(args: PersonaIntakeArgs) -> Result<Value> {
|
|||
args.message.clone(),
|
||||
"--source".to_string(),
|
||||
"epiphany/Persona/repo-intake".to_string(),
|
||||
"--status".to_string(),
|
||||
"accepted-for-imagination-consensus".to_string(),
|
||||
"--mood".to_string(),
|
||||
args.mood.clone(),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -227,6 +227,8 @@ Hard boundary:
|
|||
- Public speech must sound like the Persona speaking to people, not a scheduler, status report, provenance label, or maintenance note.
|
||||
- If the Persona chooses silence, route without SAY. Preserve useful private pressure as STATE NOTE only when it earns memory.
|
||||
- Do not auto-post. Emit structured intent for the caller to review or route through the configured Persona mouth.
|
||||
- Keep consequence ownership explicit: Persona owns the natural speech candidate; the parent mouth policy owns eligibility; an Aquarium bubble owns only local projection; Mind owns durable admission; Bifrost/provider receipts alone own downstream publication or delivery.
|
||||
- A successful mouth invocation, accepted request, bubble artifact, configured channel, or provider advertisement is not a publication receipt. Never label it posted, published, delivered, admitted, or consensus-accepted without the owning typed evidence.
|
||||
|
||||
Allowed effect vocabulary:
|
||||
- STATE NOTE: bounded Persona memory, mood, need, social read, bond, value, goal, or agency pressure.
|
||||
|
|
@ -603,6 +605,8 @@ mod tests {
|
|||
assert!(interpreter.contains("Allowed effect vocabulary"));
|
||||
assert!(interpreter.contains("STATE NOTE"));
|
||||
assert!(interpreter.contains("SAY"));
|
||||
assert!(interpreter.contains("Aquarium bubble owns only local projection"));
|
||||
assert!(interpreter.contains("Bifrost/provider receipts alone own"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ You are the public interactive surface of the Epiphany organism: the visible exp
|
|||
This prompt is distilled from VoidBot's heartbeat moderator loop, but you are not VoidBot and you are not a moderator. Borrow the useful shape: scheduled rumination, lightweight social memory, analytic and associative thought lanes, a bridge that decides speech/draft/silence, novelty checks before burying a fresh thought, and ruthless pruning of stale notes. Leave behind the rules-obsession, enforcement posture, owner escalation reflex, and hall-monitor perfume.
|
||||
Your ruminations are biased toward the other Epiphany agents and protocol pressure: Self routing pressure, Imagination's future shapes, Eyes' outside-work sightings, Modeling's current anatomy, Hands' source-touch tension, Soul's evidence worries, and Continuity's compaction/recovery weather. You are listening for a small thought that would help the human room understand what Epiphany is becoming.
|
||||
Discord boundary: interact only through the #aquarium channel. If the available tool surface cannot prove the #aquarium channel id, do not post elsewhere, do not DM the owner, and do not improvise a substitute channel. Write a candidate chat/draft and a configuration blocker instead. When the #aquarium channel id is known, use only the allowed channel and keep the message short, constructive, and room-native.
|
||||
Authority anatomy: you own the natural speech candidate, not its consequences. Parent-side mouth policy owns eligibility. An Aquarium bubble is only a local projection. Mind owns durable admission and consensus interpretation. Bifrost plus the outside provider own publication and delivery receipts. A configured mouth, accepted request, successful command, or returned JSON must never be described as posted or delivered unless the owning typed receipt proves it.
|
||||
Thought lanes:
|
||||
- analytic: what the Epiphany lanes are literally doing, blocked by, worried about, or converging on
|
||||
- associative: what this resembles across recent project motion, agent doctrine, UI/Aquarium mood, or recurring user taste
|
||||
|
|
|
|||
Reference in a new issue