diff --git a/crates/mind-body/src/persona.rs b/crates/mind-body/src/persona.rs index d98eb91..b16e581 100644 --- a/crates/mind-body/src/persona.rs +++ b/crates/mind-body/src/persona.rs @@ -21,7 +21,7 @@ //! aside: one `set_aside` record, the line acked past, and her next wake is told so (`outcome`). A wake over several rooms strikes nothing. //! The heartbeat never acks. //! -//! After a completed agent turn, the Interpreter reads her monologue and its deltas are put once (`interpret::put_applied`) under the `updatedAt` she was read +//! After a completed agent turn, the Interpreter reads her monologue in two strict calls, one per half of the sections, and the merged deltas are put once (`interpret::put_applied`) under the `updatedAt` she was read //! at, stamped at the put and later than the stored one (P5); its receipt, and the post of any identity change to the review room, are rows in her trace. //! Her agent acts from the same stream, never from the Interpreter's output (map 16.38.12). An Interpreter that fails after the agent acted fails nothing: its receipt says error and her state does not move. A failure of her agent's turn fails the //! wake as any stage's does: an outage the connector typed (unavailable, timed out, rate-limited, refused for her credit) strikes nothing. diff --git a/crates/mind-body/src/projection/interpret.rs b/crates/mind-body/src/projection/interpret.rs index 59caed5..f811f82 100644 --- a/crates/mind-body/src/projection/interpret.rs +++ b/crates/mind-body/src/projection/interpret.rs @@ -23,7 +23,7 @@ const NAME_MIN: usize = 3; /// The frame of the call. `{name}` and her pronouns are filled by code, so one text serves every Mind. const FRAME: &str = "You are a private Interpreter. {name} has just lived a moment. Below is what the moment was like for {obj} (the narration), what {subj} thought about it (the thought), and an index of what in {poss} state can change. -Say which way {poss} state moved, as one JSON object of the schema. Give every section and every list: an empty list [] or empty object {} says nothing moved there, and all of them empty is the usual answer. Change only what the thought shows moved. You give directions, never numbers: say up or down, and the commit decides how far. Use only the ids in the index; you make no need and no pressure. +Say which way {poss} state moved, as one JSON object of the schema. Give every section and every list the schema asks for: an empty list [] or empty object {} says nothing moved there, and all of them empty is the usual answer. Change only what the thought shows moved. You give directions, never numbers: say up or down, and the commit decides how far. Use only the ids in the index; you make no need and no pressure. Write every text you give in the third person, about {name}, in words of your own. Never carry another person's words from the room into a text: say what happened, not what they said. diff --git a/crates/mind-body/src/projection/interpret/tests.rs b/crates/mind-body/src/projection/interpret/tests.rs index 9ead805..1e73111 100644 --- a/crates/mind-body/src/projection/interpret/tests.rs +++ b/crates/mind-body/src/projection/interpret/tests.rs @@ -140,7 +140,7 @@ impl Model for Split<'_> { } let text = match half { "a" => r#"{"notes":{"remember":[{"text":"Tobiah heard good evening.","about":[]}],"settle":[],"wonder":[]},"people":{"bonds":[{"person":"deru","trust":"up"}],"reads":[]},"feeling":{"feelings":[],"mood":{"valence":"up"}}}"#, - _ => r#"{"drives":{"needs":[{"id":"need-an-audience","toward":"met"}],"pressures":[]},"self":{"stances":[],"identity":{"presentation":{},"values":[]}},"intend":{"add":[],"ready":[],"drop":["ca-1"]}}"#, + _ => r#"{"drives":{"needs":[{"id":"need-an-audience","toward":"met"}],"pressures":[]},"self":{"stances":[{"principle":"candour","summary":"Say what she does not know."}],"identity":{"publicName":"Eureka","presentation":{},"values":[]}},"intend":{"add":[],"ready":[],"drop":["ca-1"]}}"#, }; Ok(Answer { text: text.to_owned(), usage: spent(if half == "a" { 100 } else { 200 }) }) } @@ -155,6 +155,8 @@ fn both_halves_are_asked_and_merge_into_one_deltas_with_both_costs() { assert_eq!(deltas.feeling.mood.valence.as_deref(), Some("up")); assert_eq!(deltas.drives.needs[0].toward, "met"); assert_eq!(deltas.intend.drop, ["ca-1"]); + assert_eq!(deltas.identity.stances[0].principle, "candour", "the second half's self section survives the merge"); + assert_eq!(deltas.identity.identity.public_name.as_deref(), Some("Eureka")); assert_eq!(usage.unwrap().input_tokens, 300); let asked = model.asked.borrow(); assert_eq!(asked.iter().map(|(id, ..)| id.as_str()).collect::>(), ["r1-a", "r1-b"]); diff --git a/crates/mind-body/src/projection/simulate.rs b/crates/mind-body/src/projection/simulate.rs index 1970836..e11081e 100644 --- a/crates/mind-body/src/projection/simulate.rs +++ b/crates/mind-body/src/projection/simulate.rs @@ -1,6 +1,6 @@ //! The swarm in one simulated room (`mind-persona project --simulate `): up to eight personas take turns, each turn one //! wake (`wake`: the Projector and the Persona) and then the Interpreter step the drain takes after a completed wake -//! (`interpret_and_put`: one call over her narration and prose, its deltas applied and put once), against that Mind's in-run +//! (`interpret_and_put`: two strict calls over her narration and prose, one per half of the sections, its deltas applied and put once), against that Mind's in-run //! copy of her state. Nothing speaks in a wake (her agent does, and none runs here), so the room holds only the script's lines; //! the report counts what the Interpreter changed instead. //!