Add native character loop packets
This commit is contained in:
parent
8c1ab38724
commit
8c6f1c1269
9 changed files with 382 additions and 8 deletions
|
|
@ -292,6 +292,28 @@ pub fn validate_agent_memory_store(store_path: impl AsRef<Path>) -> Result<Vec<S
|
|||
Ok(errors)
|
||||
}
|
||||
|
||||
pub fn load_agent_memory_entry_for_role(
|
||||
store_path: impl AsRef<Path>,
|
||||
role_id: &str,
|
||||
) -> Result<Option<EpiphanyAgentMemoryEntry>> {
|
||||
let store_path = store_path.as_ref();
|
||||
let agent_id = agent_id_for_role(role_id).map_err(|message| anyhow!(message))?;
|
||||
let mut cache = agent_memory_cache(store_path)?;
|
||||
cache.pull_all_backing_stores()?;
|
||||
let entry = cache.get::<EpiphanyAgentMemoryEntry>(role_id)?;
|
||||
if let Some(entry) = &entry
|
||||
&& entry.agent.agent_id != agent_id
|
||||
{
|
||||
return Err(anyhow!(
|
||||
"{} agent_id {:?} does not match expected {:?}",
|
||||
role_id,
|
||||
entry.agent.agent_id,
|
||||
agent_id
|
||||
));
|
||||
}
|
||||
Ok(entry)
|
||||
}
|
||||
|
||||
pub fn review_agent_self_patch(
|
||||
role_id: &str,
|
||||
patch_value: &Value,
|
||||
|
|
|
|||
337
epiphany-core/src/bin/epiphany-character-loop.rs
Normal file
337
epiphany-core/src/bin/epiphany-character-loop.rs
Normal file
|
|
@ -0,0 +1,337 @@
|
|||
use anyhow::Context;
|
||||
use anyhow::Result;
|
||||
use anyhow::anyhow;
|
||||
use chrono::SecondsFormat;
|
||||
use epiphany_core::EpiphanyAgentMemoryEntry;
|
||||
use epiphany_core::GhostlightMemory;
|
||||
use epiphany_core::load_agent_memory_entry_for_role;
|
||||
use serde_json::Value;
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::io::Read;
|
||||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
use uuid::Uuid;
|
||||
|
||||
const CHARACTER_TURN_SCHEMA_VERSION: &str = "epiphany.character_turn_packet.v0";
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let mut args = env::args().skip(1);
|
||||
let Some(command) = args.next() else {
|
||||
return usage();
|
||||
};
|
||||
let mut role = "face".to_string();
|
||||
let mut agent_store = PathBuf::from("state/agents.msgpack");
|
||||
let mut artifact_dir = PathBuf::from(".epiphany-character-loop");
|
||||
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() {
|
||||
match arg.as_str() {
|
||||
"--role" => role = next_value(&mut args, "--role")?,
|
||||
"--agent-store" => agent_store = next_path(&mut args, "--agent-store")?,
|
||||
"--artifact-dir" => artifact_dir = next_path(&mut args, "--artifact-dir")?,
|
||||
"--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:?}")),
|
||||
}
|
||||
}
|
||||
|
||||
let result = match command.as_str() {
|
||||
"turn" => {
|
||||
let stimulus = read_required_text(stimulus, "stimulus")?;
|
||||
run_turn(
|
||||
&role,
|
||||
&agent_store,
|
||||
&artifact_dir,
|
||||
&stimulus,
|
||||
&source,
|
||||
&mode,
|
||||
&status,
|
||||
&mood,
|
||||
)?
|
||||
}
|
||||
"smoke" => run_smoke()?,
|
||||
_ => return usage(),
|
||||
};
|
||||
|
||||
let ok = result["ok"].as_bool().unwrap_or(false);
|
||||
println!("{}", serde_json::to_string_pretty(&result)?);
|
||||
if !ok {
|
||||
std::process::exit(1);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn run_turn(
|
||||
role: &str,
|
||||
agent_store: &Path,
|
||||
artifact_dir: &Path,
|
||||
stimulus: &str,
|
||||
source: &str,
|
||||
mode: &str,
|
||||
status: &str,
|
||||
mood: &str,
|
||||
) -> Result<Value> {
|
||||
if role.trim().is_empty() {
|
||||
return Err(anyhow!("--role must not be empty"));
|
||||
}
|
||||
ensure_content(stimulus, "stimulus")?;
|
||||
let entry = load_agent_memory_entry_for_role(agent_store, role)?.ok_or_else(|| {
|
||||
anyhow!(
|
||||
"{role} agent memory is missing from {}",
|
||||
agent_store.display()
|
||||
)
|
||||
})?;
|
||||
let packet = character_turn_packet(&entry, stimulus, source, mode, status, mood);
|
||||
let path = artifact_dir.join(format!(
|
||||
"character-turn-{}-{}-{}.json",
|
||||
sanitize_file_stem(role),
|
||||
now_stamp(),
|
||||
short_id()
|
||||
));
|
||||
write_json(&path, &packet)?;
|
||||
Ok(serde_json::json!({
|
||||
"ok": true,
|
||||
"schemaVersion": CHARACTER_TURN_SCHEMA_VERSION,
|
||||
"roleId": role,
|
||||
"agentId": entry.agent.agent_id,
|
||||
"turnPath": path,
|
||||
"turn": packet,
|
||||
}))
|
||||
}
|
||||
|
||||
fn character_turn_packet(
|
||||
entry: &EpiphanyAgentMemoryEntry,
|
||||
stimulus: &str,
|
||||
source: &str,
|
||||
mode: &str,
|
||||
status: &str,
|
||||
mood: &str,
|
||||
) -> Value {
|
||||
serde_json::json!({
|
||||
"schema_version": CHARACTER_TURN_SCHEMA_VERSION,
|
||||
"protocol": {
|
||||
"bundle": "epiphany.character_loop",
|
||||
"referenceLineage": "Ghostlight-style character-local cognition, rebuilt as Epiphany-native protocol.",
|
||||
"mode": mode,
|
||||
"roleId": entry.role_id,
|
||||
"agentId": entry.agent.agent_id,
|
||||
"turnKind": "stimulus_response",
|
||||
"responseContract": "Respond from projected local state and visible stimulus; do not leak hidden agent streams or invent omniscient truth.",
|
||||
},
|
||||
"source": source,
|
||||
"createdAt": now_iso(),
|
||||
"stimulus": {
|
||||
"kind": "operator_or_aquarium_input",
|
||||
"content": stimulus,
|
||||
"status": status,
|
||||
"mood": mood,
|
||||
},
|
||||
"projectedLocalContext": {
|
||||
"identity": {
|
||||
"name": entry.agent.identity.name,
|
||||
"roles": entry.agent.identity.roles,
|
||||
"origin": entry.agent.identity.origin,
|
||||
"publicDescription": entry.agent.identity.public_description,
|
||||
},
|
||||
"world": {
|
||||
"worldId": entry.world.world_id,
|
||||
"setting": entry.world.setting,
|
||||
"time": entry.world.time.label,
|
||||
"canonContext": entry.world.canon_context,
|
||||
},
|
||||
"activeGoals": entry.agent.goals.iter().map(|goal| serde_json::json!({
|
||||
"goalId": goal.goal_id,
|
||||
"description": goal.description,
|
||||
"scope": goal.scope,
|
||||
"priority": goal.priority,
|
||||
"emotionalStake": goal.emotional_stake,
|
||||
"status": goal.status,
|
||||
})).collect::<Vec<_>>(),
|
||||
"values": entry.agent.canonical_state.values.iter().map(|value| serde_json::json!({
|
||||
"valueId": value.value_id,
|
||||
"label": value.label,
|
||||
"priority": value.priority,
|
||||
"unforgivableIfBetrayed": value.unforgivable_if_betrayed,
|
||||
})).collect::<Vec<_>>(),
|
||||
"semanticMemories": entry.agent.memories.semantic.iter().map(memory_projection).collect::<Vec<_>>(),
|
||||
"episodicMemories": entry.agent.memories.episodic.iter().map(memory_projection).collect::<Vec<_>>(),
|
||||
"relationshipMemories": entry.agent.memories.relationship_summaries.iter().map(memory_projection).collect::<Vec<_>>(),
|
||||
"privateNoteCount": entry.agent.identity.private_notes.len(),
|
||||
},
|
||||
"allowedOutputs": [
|
||||
"bubble",
|
||||
"discordAquariumDraft",
|
||||
"roleFinding",
|
||||
"silence",
|
||||
"selfPatch"
|
||||
],
|
||||
"guardrails": [
|
||||
"Humans talk to Face; other organs expose internals through Aquarium and typed artifacts rather than becoming direct chats.",
|
||||
"Use character-local projection: the actor receives its own dossier and visible stimulus, not omniscient hidden state.",
|
||||
"If speech or action would be noise, return silence plus bounded rumination or selfPatch.",
|
||||
"Posting, state mutation, objective adoption, and semantic acceptance remain separate reviewed Epiphany surfaces."
|
||||
],
|
||||
"resultShape": {
|
||||
"observedStimulus": "string",
|
||||
"localInterpretation": "string",
|
||||
"candidateBubble": "string|null",
|
||||
"candidateDraft": "string|null",
|
||||
"decision": "bubble|draft|finding|silence|blocked",
|
||||
"selfPatch": "optional bounded role memory mutation"
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn memory_projection(memory: &GhostlightMemory) -> Value {
|
||||
serde_json::json!({
|
||||
"memoryId": memory.memory_id,
|
||||
"summary": memory.summary,
|
||||
"salience": memory.salience,
|
||||
"confidence": memory.confidence,
|
||||
})
|
||||
}
|
||||
|
||||
fn run_smoke() -> Result<Value> {
|
||||
let temp_dir = scoped_temp_dir("epiphany-character-loop-smoke")?;
|
||||
let artifact_dir = temp_dir.join("artifacts");
|
||||
let result = run_turn(
|
||||
"face",
|
||||
Path::new("state/agents.msgpack"),
|
||||
&artifact_dir,
|
||||
"Aquarium hover selected Face and asked what the swarm is feeling.",
|
||||
"smoke/character-loop",
|
||||
"public-surface",
|
||||
"ready",
|
||||
"attentive",
|
||||
)?;
|
||||
let path = PathBuf::from(
|
||||
result["turnPath"]
|
||||
.as_str()
|
||||
.ok_or_else(|| anyhow!("smoke result missing turnPath"))?,
|
||||
);
|
||||
let packet: Value = serde_json::from_str(
|
||||
&fs::read_to_string(&path)
|
||||
.with_context(|| format!("failed to read smoke artifact {}", path.display()))?,
|
||||
)?;
|
||||
let ok = packet["schema_version"] == CHARACTER_TURN_SCHEMA_VERSION
|
||||
&& packet["protocol"]["bundle"] == "epiphany.character_loop"
|
||||
&& packet["protocol"]["roleId"] == "face"
|
||||
&& packet["projectedLocalContext"]["identity"]["name"]
|
||||
.as_str()
|
||||
.is_some_and(|name| !name.trim().is_empty())
|
||||
&& packet["stimulus"]["content"]
|
||||
.as_str()
|
||||
.is_some_and(|text| text.contains("Aquarium"));
|
||||
Ok(serde_json::json!({
|
||||
"ok": ok,
|
||||
"turnPath": path,
|
||||
"packet": {
|
||||
"schemaVersion": packet["schema_version"],
|
||||
"bundle": packet["protocol"]["bundle"],
|
||||
"roleId": packet["protocol"]["roleId"],
|
||||
"agentId": packet["protocol"]["agentId"],
|
||||
"identityName": packet["projectedLocalContext"]["identity"]["name"],
|
||||
"allowedOutputs": packet["allowedOutputs"],
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
fn read_required_text(content: Option<String>, label: &str) -> Result<String> {
|
||||
let Some(content) = content else {
|
||||
let mut stdin = String::new();
|
||||
std::io::stdin()
|
||||
.read_to_string(&mut stdin)
|
||||
.context("failed to read stdin")?;
|
||||
ensure_content(&stdin, label)?;
|
||||
return Ok(stdin);
|
||||
};
|
||||
let path = PathBuf::from(&content);
|
||||
if path.exists() {
|
||||
let text = fs::read_to_string(&path)
|
||||
.with_context(|| format!("failed to read content file {}", path.display()))?;
|
||||
ensure_content(&text, label)?;
|
||||
return Ok(text);
|
||||
}
|
||||
ensure_content(&content, label)?;
|
||||
Ok(content)
|
||||
}
|
||||
|
||||
fn ensure_content(content: &str, label: &str) -> Result<()> {
|
||||
if content.trim().is_empty() {
|
||||
return Err(anyhow!("{label} is empty"));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn next_value(args: &mut impl Iterator<Item = String>, flag: &str) -> Result<String> {
|
||||
args.next()
|
||||
.ok_or_else(|| anyhow!("missing value after {flag}"))
|
||||
}
|
||||
|
||||
fn next_path(args: &mut impl Iterator<Item = String>, flag: &str) -> Result<PathBuf> {
|
||||
Ok(PathBuf::from(next_value(args, flag)?))
|
||||
}
|
||||
|
||||
fn write_json(path: &Path, payload: &Value) -> Result<()> {
|
||||
if let Some(parent) = path.parent() {
|
||||
fs::create_dir_all(parent)
|
||||
.with_context(|| format!("failed to create {}", parent.display()))?;
|
||||
}
|
||||
fs::write(
|
||||
path,
|
||||
format!("{}\n", serde_json::to_string_pretty(payload)?),
|
||||
)
|
||||
.with_context(|| format!("failed to write {}", path.display()))
|
||||
}
|
||||
|
||||
fn now_iso() -> String {
|
||||
chrono::Utc::now().to_rfc3339_opts(SecondsFormat::Secs, true)
|
||||
}
|
||||
|
||||
fn now_stamp() -> String {
|
||||
chrono::Utc::now().format("%Y%m%dT%H%M%SZ").to_string()
|
||||
}
|
||||
|
||||
fn short_id() -> String {
|
||||
Uuid::new_v4()
|
||||
.to_string()
|
||||
.split('-')
|
||||
.next()
|
||||
.unwrap_or("id")
|
||||
.to_string()
|
||||
}
|
||||
|
||||
fn sanitize_file_stem(value: &str) -> String {
|
||||
value
|
||||
.chars()
|
||||
.map(|ch| {
|
||||
if ch.is_ascii_alphanumeric() || ch == '-' || ch == '_' {
|
||||
ch
|
||||
} else {
|
||||
'-'
|
||||
}
|
||||
})
|
||||
.collect::<String>()
|
||||
.trim_matches('-')
|
||||
.to_string()
|
||||
}
|
||||
|
||||
fn scoped_temp_dir(prefix: &str) -> Result<PathBuf> {
|
||||
let dir = env::temp_dir().join(format!("{prefix}-{}", Uuid::new_v4()));
|
||||
fs::create_dir_all(&dir).with_context(|| format!("failed to create {}", dir.display()))?;
|
||||
Ok(dir)
|
||||
}
|
||||
|
||||
fn usage() -> Result<()> {
|
||||
Err(anyhow!(
|
||||
"usage: epiphany-character-loop <turn|smoke> [--role <role>] [--agent-store <path>] [--artifact-dir <path>] [--stimulus <text-or-path>] [--source <source>] [--mode <mode>]"
|
||||
))
|
||||
}
|
||||
|
|
@ -604,7 +604,7 @@ fn collect_coordinator_status(
|
|||
"status": "ready",
|
||||
"artifactDir": face_dir,
|
||||
"latestArtifacts": latest_face.get("latestArtifacts").cloned().unwrap_or_else(|| json!([])),
|
||||
"availableActions": ["faceBubble"],
|
||||
"availableActions": ["faceBubble", "characterTurn"],
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,9 +305,12 @@ fn validate_status(status: &Value, rendered: &str) -> Result<()> {
|
|||
.and_then(Value::as_array);
|
||||
require(
|
||||
face_actions.is_some_and(|items| {
|
||||
items.len() == 1 && items.first().and_then(Value::as_str) == Some("faceBubble")
|
||||
items.iter().any(|item| item.as_str() == Some("faceBubble"))
|
||||
&& items
|
||||
.iter()
|
||||
.any(|item| item.as_str() == Some("characterTurn"))
|
||||
}),
|
||||
"status view should expose Face bubble action for Aquarium",
|
||||
"status view should expose Face bubble and character-turn actions for Aquarium",
|
||||
)?;
|
||||
require(
|
||||
rendered.contains("Heartbeat") && rendered.contains("Face"),
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ fn run_status(args: &Args) -> Result<Value> {
|
|||
"status": "ready",
|
||||
"artifactDir": face_dir,
|
||||
"latestArtifacts": latest_face.get("latestArtifacts").cloned().unwrap_or_else(|| json!([])),
|
||||
"availableActions": ["faceBubble"],
|
||||
"availableActions": ["faceBubble", "characterTurn"],
|
||||
});
|
||||
let status = json!({
|
||||
"threadId": thread_id,
|
||||
|
|
|
|||
|
|
@ -12,8 +12,10 @@ mod state_ledger;
|
|||
pub use agent_memory::AgentMemoryReview;
|
||||
pub use agent_memory::AgentSelfPatch;
|
||||
pub use agent_memory::EpiphanyAgentMemoryEntry;
|
||||
pub use agent_memory::GhostlightMemory;
|
||||
pub use agent_memory::agent_memory_status;
|
||||
pub use agent_memory::apply_agent_self_patch;
|
||||
pub use agent_memory::load_agent_memory_entry_for_role;
|
||||
pub use agent_memory::migrate_agent_memory_json_dir_to_cultcache;
|
||||
pub use agent_memory::project_agent_memory_to_json_dir;
|
||||
pub use agent_memory::review_agent_self_patch;
|
||||
|
|
|
|||
|
|
@ -44,8 +44,9 @@ remembers doctrine; the branch remembers the blade.
|
|||
- The Ghostlight memory pass is landed. `epiphany_specialists.toml` now has a shared persistent-memory projection prepended by the harness to fixed role specialists, reorientation workers, coordinator notes, and CRRC checkpoint interventions. The rendered base doctrine also states the Perfect Machine rule directly: prompt is projection, durable typed state is the mind, every lane must improve its own memory/model/prompt/evidence habit or name the repair, and each lane phrases that duty in its own organ language so the salience sticks.
|
||||
- The role self-memory persistence pass is native now. Each lane has a Ghostlight-shaped typed dossier in `state/agents.msgpack`, and specialists may return optional `selfPatch` requests beside their normal role result. `roleResult`/`roleAccept` project coordinator review as `selfPersistence`: accepted requests are role-matched, bounded lane memory/goal/value/private-note mutations; refused requests explain wrong role, project-truth smuggling, authority grabs, bloat, missing reason, or malformed records. GUI/coordinator accept paths apply accepted `selfPatch` requests through the native `epiphany-agent-memory-store` binary; project truth still belongs only in `EpiphanyThreadState`.
|
||||
- The heartbeat initiative pass is landed as a bounded tool seam. `state/agent-heartbeats.msgpack` tracks Self, Face, Imagination, Eyes, Body, Hands, Soul, and Life as Ghostlight-style initiative participants with arena, participant kind, speed, next-ready time, reaction bias, interrupt threshold, load, status, constraints, history, and pending turns through `epiphany-core::EpiphanyHeartbeatStateEntry` and the native `epiphany-heartbeat-store` binary. Tick/status/complete and idle rumination selfPatch application now run through Rust/CultCache directly. JSON heartbeat state and Python wrapper state are gone; general CultCache schema sync, polyglot domain loading, and debug display tools belong in CultLib. This is a callable scheduler seam, not yet an always-on daemon; a heart valve, not a whole circulatory god.
|
||||
- The first outward Ghostlight absorption slice is landed in Epiphany. `epiphany-heartbeat-store init --profile ghostlight-scene --scene-id <id> --scene-participant <id|name|speed|reaction|threshold|constraints>` creates a typed CultCache MessagePack scene heartbeat store whose participants are `arena=scene`, `participantKind=character`; `tick` emits `ghostlight.initiative_schedule.v0` receipts with `scene_turn` actions and local-affordance basis. The generic Epiphany maintenance lanes are not auto-patched into Ghostlight scene stores.
|
||||
- The first Ghostlight-derived timing slice is landed in Epiphany, but Ghostlight is reference lineage rather than a sibling runtime to preserve. `epiphany-heartbeat-store init --profile ghostlight-scene --scene-id <id> --scene-participant <id|name|speed|reaction|threshold|constraints>` creates a typed CultCache MessagePack scene heartbeat store whose participants are `arena=scene`, `participantKind=character`; `tick` emits `ghostlight.initiative_schedule.v0` receipts with `scene_turn` actions and local-affordance basis. The generic Epiphany maintenance lanes are not auto-patched into scene stores.
|
||||
- The Face public-surface pass is landed as a bounded lane. Face's role dossier lives in `state/agents.msgpack`; `epiphany_specialists.toml` gives it a VoidBot-heartbeat-derived prompt stripped of moderation authority; `state/face-discord.toml` and the native `epiphany-face-discord` binary enforce that Face may interact only through #aquarium. Missing channel id or token writes candidate chat artifacts instead of posting elsewhere.
|
||||
- The first Epiphany-native character-loop pass is landed. `epiphany-character-loop turn --role face --stimulus <text>` loads Face's typed dossier from `state/agents.msgpack` and emits an auditable `epiphany.character_turn_packet.v0` packet with projected local context, visible stimulus, allowed outputs, and guardrails. The same packet builder works for other role ids, because every organ already has a Ghostlight-shaped dossier.
|
||||
- The heartbeat/Face operator API pass is landed. Native `epiphany-heartbeat-store status` returns machine-readable initiative state plus CultCache store presence, native `epiphany-face-discord bubble` writes Discord-independent `epiphany.face_bubble.v0` artifacts, and native `epiphany-mvp-status` includes `heartbeat` and `face` blocks. Aquarium should call native/backend surfaces rather than resurrecting deleted Python action shims.
|
||||
- The native runtime-spine pass is landed as a first vertebra, not a full daemon. `state/runtime-spine.msgpack` is the default store, `.epiphany-dogfood/runtime-spine-job/runtime.msgpack` and `hello.cultnet` are the latest job/result smoke artifacts, and specialist launch/result flows now route through typed heartbeat/runtime-spine documents.
|
||||
- The Aetheria dogfood run has a contamination scar. The supervising Codex session directly edited and committed target-repo work on `E:\Projects\Aetheria-Economy` instead of only driving Epiphany lanes. Treat those Aetheria commits as supervisor-seeded implementation, not clean evidence that Epiphany coordinated the work. Future dogfood must run through the GUI/coordinator/fixed role lanes with auditable artifacts unless the user explicitly authorizes an operator intervention. Remember the sunburn: do not stare into the worker's objective until you become it.
|
||||
|
|
@ -137,6 +138,7 @@ The current spine, blessed but not yet finished:
|
|||
- distilled shared and config-backed prompt doctrine through the base prompt, rendered Epiphany state prompt files, modeling/Body, implementation/Hands, verification/Soul, reorientation/Life, coordinator/Self, and CRRC intervention surfaces
|
||||
- shared Ghostlight-derived persistent memory projection across Imagination, Body, Soul, Life, Self, CRRC checkpoint steering, and the GUI-launched Hands implementation lane
|
||||
- Ghostlight-derived heartbeat initiative scheduling through the native `epiphany-heartbeat-store` binary, with Self and Face included as first-class Epiphany maintenance participants, Ghostlight scene characters supported through the same timing law, idle rumination routed through normal `selfPatch` review/application, and heartbeat state persisted through typed CultCache MessagePack stores
|
||||
- Epiphany-native character-loop packet projection through `epiphany-character-loop`, with Face as the first public-surface actor over its typed role dossier
|
||||
- Face as the public #aquarium-only surface for translating agent thought-weather into short chats or candidate drafts, without moderator authority
|
||||
- Ghostlight-shaped role dossiers in `state/agents.msgpack`, plus `selfPatch` review projection through `roleResult`/`roleAccept` and accepted memory application through the native `epiphany-agent-memory-store` binary
|
||||
- first Unity runtime bridge through native `epiphany-unity-bridge`, native `epiphany-unity-bridge-smoke`, GUI Inspect Unity, runtime artifact listing, and implementation prompt guardrails
|
||||
|
|
@ -269,6 +271,12 @@ For the first MVP operator status view, run:
|
|||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-mvp-status-smoke
|
||||
```
|
||||
|
||||
For Epiphany-native character-loop packet projection, run:
|
||||
|
||||
```powershell
|
||||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-character-loop -- smoke
|
||||
```
|
||||
|
||||
For GUI Objective Draft adoption behavior, run:
|
||||
|
||||
```powershell
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -65,6 +65,7 @@ active_subgoals:
|
|||
- Preserve read-only boundaries for retrieve, distill, propose, scene, jobs, roles, roleResult, freshness, context, graphQuery, planning, pressure, reorient, crrc, coordinator, and reorientResult.
|
||||
- Keep the landed Phase 6 coordinator, limited safe-boundary CRRC automation, and pre-compaction checkpoint intervention ready for the next bridge-equipped dogfood run.
|
||||
- Preserve the Ghostlight-derived heartbeat initiative seam: every lane, including coordinator/Self and Face, has a role dossier and competes for heartbeat slots through readiness/reaction timing; idle winners ruminate and distill self-memory instead of inventing project work.
|
||||
- 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.
|
||||
- Preserve review gates for semantic findings; automatic CRRC may compact or launch the fixed reorient-worker, but not accept or promote.
|
||||
- Keep persistent project state ruthlessly distilled so rehydration strengthens the next awakening instead of drowning it in vellum.
|
||||
- Quarantine the Aetheria dogfood contamination: future target-repo work must be driven through Epiphany's GUI/coordinator/fixed lanes with auditable artifacts, not direct supervisor implementation.
|
||||
|
|
@ -131,7 +132,7 @@ accepted_design:
|
|||
- Specialist prompts are role-distilled instead of generic and their live text is config-backed in app-server: modeling/checkpoint is the Body of code, dataflow, seams, and frontier; research/scout is the Eyes prompt surface for existing work, vendor guidance, libraries, papers, and anti-Greenspun source selection; implementation is the Hands, the main coding lane and actuator rather than a `roleLaunch` specialist; verification/review is the Soul of promise, invariants, evidence, and user truth; reorientation is Life across compaction and source drift; coordinator is the read-only Self that routes attention without implementing, verifying, promoting, or accepting; Face is the public Discord #aquarium surface that translates agent thought-weather without moderating or leaking sealed thought.
|
||||
- Epiphany prompt surfaces now carry a shared Ghostlight-derived persistent memory projection before lane-specific text: prompt is not memory, durable typed state is the mind, personality and protected values are first-class salience handles, and every lane is explicitly responsible for making its own memory/model/prompt/evidence habit sharper or naming the needed repair. Each lane states self-improvement in its own rite-language: Imagination selects futures, Body clarifies anatomy, Eyes sees earlier, Hands touches source more precisely, Soul becomes harder to fool, Life loses less continuity, Self routes repair, and Face becomes clearer at turning inner weather into useful social presence.
|
||||
- Specialist self-memory now has a bounded Ghostlight-shaped CultCache persistence surface in `state/agents.msgpack`: Imagination, Body, Eyes, Hands, Soul, Life, Self, and Face each have an individual typed role dossier for identity, personality, semantic/episodic/relationship memory, goals, and values. These entries are lane memory only; project truth remains in authoritative `EpiphanyThreadState`.
|
||||
- `state/agent-heartbeats.msgpack`, `epiphany-core::EpiphanyHeartbeatStateEntry`, and the native `epiphany-heartbeat-store` binary are the Ghostlight-derived heartbeat initiative seam. The harness sets a target heartbeat rate; participants carry arena, participant kind, initiative speed, next-ready time, reaction bias, interrupt threshold, current load, status, and constraints; pending coordinator work can pull its owning lane through a reaction window; otherwise the earliest ready active participant wins the slot. If the winner has no routeable maintenance work, it ruminates on role quality and can apply a bounded selfPatch directly through the normal coordinator-reviewed memory rules when `--agent-store` and `--apply-rumination` are provided. Face can win `surfaceAgentThoughts` or `discordAquariumChat` work slots. Ghostlight scene stores use the same typed CultCache MessagePack contract with `arena=scene` and `participantKind=character`, so scene characters take turns through the same timing law without inheriting Epiphany's maintenance organs.
|
||||
- `state/agent-heartbeats.msgpack`, `epiphany-core::EpiphanyHeartbeatStateEntry`, and the native `epiphany-heartbeat-store` binary are the Ghostlight-derived heartbeat initiative seam. The harness sets a target heartbeat rate; participants carry arena, participant kind, initiative speed, next-ready time, reaction bias, interrupt threshold, current load, status, and constraints; pending coordinator work can pull its owning lane through a reaction window; otherwise the earliest ready active participant wins the slot. If the winner has no routeable maintenance work, it ruminates on role quality and can apply a bounded selfPatch directly through the normal coordinator-reviewed memory rules when `--agent-store` and `--apply-rumination` are provided. Face can win `surfaceAgentThoughts` or `discordAquariumChat` work slots. Epiphany also owns native character-loop projection through `epiphany-character-loop`, so role dossiers can respond to visible stimuli without importing Ghostlight as runtime.
|
||||
- `state/ledgers.msgpack`, `epiphany-core::EpiphanyStateLedgerEntry`, the `epiphany-state-ledger-store` binary, and the native `epiphany-state` CLI now own durable branch and evidence ledgers. The old tracked JSON ledger files and the migration/projection CLI hatches are gone.
|
||||
- CultCache inspection, cross-language schema synchronization, and debug display tooling belong in CultLib, not in EpiphanyAgent. Epiphany should consume typed CultCache documents and expose product-specific status through its API, while general polyglot domain loading/inspection lives with the shared CultCache ecosystem.
|
||||
- VoidBot's current routine is the reference for the next Epiphany heartbeat/state substrate: work, rumination, and sleep turns; completion-gated cooldown; typed CultCache state; Qdrant-backed memory vectors; resonance/incubation/dream state; and Aquarium-visible internals. The first MessagePack canonical state slice is now the heartbeat store through CultCache-compatible typed Rust state. See `notes/voidbot-routine-adoption-plan.md`.
|
||||
|
|
@ -191,6 +192,7 @@ landed_baseline:
|
|||
- Phase 6 Aquarium graph and Rider bridge slice: the Tauri/React/WebGL Aquarium embeds the adjacent EpiphanyGraph viewer over typed graph state, native `epiphany-rider-bridge` writes Rider/source-context artifacts, Aquarium Inspect Rider surfaces those artifacts, and `integrations/rider` scaffolds the first frontend-only Rider tool-window/context-action plugin.
|
||||
- Phase 6 role self-memory slice: Ghostlight-shaped role dossiers live in typed CultCache `state/agents.msgpack`, specialists may request bounded `selfPatch` lane-memory mutations, coordinator review projects acceptance/refusal reasons through `selfPersistence`, and GUI/coordinator accept paths apply accepted requests with the native `epiphany-agent-memory-store` binary.
|
||||
- Phase 6 Face public-surface slice: Face's typed role dossier, Face prompt text, `state/face-discord.toml`, and the native `epiphany-face-discord` binary establish Face as the public #aquarium-only translator of Epiphany agent thought-weather, without VoidBot's moderation authority.
|
||||
- Phase 6 character-loop slice: native `epiphany-character-loop` loads any role's Ghostlight-shaped typed dossier from `state/agents.msgpack`, combines it with a visible stimulus, and emits an auditable `epiphany.character_turn_packet.v0` local projection for response, bubble, finding, silence, or bounded `selfPatch`. Face is the first intended public-surface consumer; Ghostlight is reference material, not a runtime dependency.
|
||||
- Phase 6 heartbeat initiative slice: `state/agent-heartbeats.msgpack`, `epiphany-core::EpiphanyHeartbeatStateEntry`, the native `epiphany-heartbeat-store` binary, and heartbeat smoke coverage borrow Ghostlight initiative scheduling so Self, Face, Imagination, Eyes, Body, Hands, Soul, and Life compete for heartbeat slots; idle slots become bounded memory rumination instead of fake project work, and the live state surface now ticks/completes/applies rumination through typed CultCache MessagePack instead of JSON or Python wrapper state. The same store can now initialize a `ghostlight-scene` profile for character scene turns.
|
||||
- Native runtime spine slice: `epiphany-core::EpiphanyRuntimeIdentity`, `EpiphanyRuntimeSession`, `EpiphanyRuntimeJob`, `EpiphanyRuntimeJobResult`, and `EpiphanyRuntimeEvent` plus the native `epiphany-runtime-spine` binary establish a CultCache-backed spine, native job/result lifecycle, status projection, and framed CultNet hello output so the old Codex app-server runtime can be starved down to a temporary evacuation bridge instead of remaining the throne.
|
||||
guardrails:
|
||||
|
|
@ -236,5 +238,5 @@ rejected_paths:
|
|||
reason: persistent state that accumulates every local truth becomes memory cruft and weakens rehydration
|
||||
|
||||
current_status:
|
||||
summary: Phase 1 durable state through Phase 6 coordinator/specialist/CRRC/backend organs are landed. The Aquarium operator shrine has been split into sibling repo `E:\Projects\EpiphanyAquarium` with its own distilled interface doctrine and persistent memory. EpiphanyAgent now also has a Ghostlight-derived heartbeat initiative seam, a Face lane for public agent thought-weather, and a Discord-independent Face bubble API for Aquarium. Runtime Unity execution remains blocked until the exact project-pinned editor exists.
|
||||
next_action: Continue Aquarium UI work in `E:\Projects\EpiphanyAquarium`; configure the #aquarium channel id before allowing Face to post; keep EpiphanyAgent changes to backend contracts, typed state, coordinator policy, bridge tools, heartbeat scheduling, and Face guardrails. Keep purging Python/JSON impurity only when the replacement is a typed Rust, CultCache, or CultNet surface with receipts.
|
||||
summary: Phase 1 durable state through Phase 6 coordinator/specialist/CRRC/backend organs are landed. The Aquarium operator shrine has been split into sibling repo `E:\Projects\EpiphanyAquarium` with its own distilled interface doctrine and persistent memory. EpiphanyAgent now also has a Ghostlight-derived heartbeat initiative seam, Epiphany-native character-loop packets over its own role dossiers, a Face lane for public agent thought-weather, and a Discord-independent Face bubble API for Aquarium. Runtime Unity execution remains blocked until the exact project-pinned editor exists.
|
||||
next_action: Continue Aquarium UI work in `E:\Projects\EpiphanyAquarium`; configure the #aquarium channel id before allowing Face to post; wire Aquarium Face interactions to `epiphany-character-loop` packets before choosing bubble/draft/silence; keep EpiphanyAgent changes to backend contracts, typed state, coordinator policy, bridge tools, heartbeat scheduling, and Face guardrails. Keep purging Python/JSON impurity only when the replacement is a typed Rust, CultCache, or CultNet surface with receipts.
|
||||
|
|
|
|||
Reference in a new issue