Persona turn: the committed public surface and the docs follow the trace record
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
999bca7f95
commit
83778697e3
4 changed files with 14 additions and 18 deletions
|
|
@ -215,22 +215,19 @@ pub struct Request {
|
|||
pub through: Through,
|
||||
/// When she last heard from people (Matrix id, unix ms) beyond the room's tail: a fixture's table. Empty live.
|
||||
pub last_heard: Vec<(String, u64)>,
|
||||
/// The ids each earlier projection selected, oldest first, for freshness: a simulation's earlier turns of hers.
|
||||
/// Empty live until trace v2 (C3c) carries them.
|
||||
/// The ids each earlier projection selected, oldest first, for freshness: read from her records (`turn::history`).
|
||||
pub recent: Vec<Vec<String>>,
|
||||
/// The rooms that are hers, by the key the lines carry: a simulation's plan. The live body records none yet.
|
||||
pub own_rooms: Vec<String>,
|
||||
/// The record of her last turn, which her packet opens with what came of (`outcome::outcome_of`): the Interpreter's
|
||||
/// decision under `interpreter` and the receipts of the lines that went out under `posted`, or `failed`. A
|
||||
/// simulation carries each turn's to her next; a harness run takes a fixture's (`--last-outcome`). None live until
|
||||
/// the commit's trace (C3c) carries it.
|
||||
/// decision under `interpreter` and the receipts of the lines that went out under `posted`, or `failed`. Read from her
|
||||
/// records (`turn::history`); a harness run takes a fixture's (`--last-outcome`).
|
||||
pub last_outcome: Option<Value>,
|
||||
/// When she last woke: her domain's window opens there, held to at least a day and at most a week (map 16.22.2). A
|
||||
/// simulation carries each Mind's; none, as live until the commit's trace (C3c) carries it, is a week.
|
||||
/// When she last woke: her domain's window opens there, held to at least a day and at most a week (map 16.22.2). Read
|
||||
/// from her records (`turn::history`); none is a week.
|
||||
pub last_wake: Option<DateTime<Utc>>,
|
||||
/// Her earlier turn records, oldest first (the commit's trace live, once C3c writes it; a simulation's own): what she
|
||||
/// has said and read in this conversation is read from them (`exchange::exchange_of`, map 16.24.1). Empty live until
|
||||
/// the trace exists.
|
||||
/// Her earlier turn records, oldest first: her trace live, the run's list simulated, both read by `turn::history`. What
|
||||
/// she has said and read in this conversation is read from them (`exchange::exchange_of`, map 16.24.1).
|
||||
pub records: Vec<Value>,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@
|
|||
//! her again next round: no line is seen without a turn that read it. The turns of a round go in an order drawn from
|
||||
//! the seed, each against the room as it stands at that turn.
|
||||
//!
|
||||
//! What came of each of her turns opens her next packet (map 16.16): the simulator keeps each turn's record as the commit's
|
||||
//! trace will (the Interpreter's decision and the lines the room appended for her), and passes it as her next turn's
|
||||
//! `last_outcome`; a failed turn's record is a failure. When she adds to a line of hers (map 16.17), the room is the
|
||||
//! What came of each of her turns opens her next packet (map 16.16): the run keeps each turn's record, as her trace live
|
||||
//! (`turn::take`: the Interpreter's decision and the lines the room appended for her), and her next turn reads her
|
||||
//! `last_outcome` from them (`turn::history`); a failed turn's record is a failure. When she adds to a line of hers (map 16.17), the room is the
|
||||
//! actuator, as the mouth will be live (B1): it appends `EDIT_MARK` and her draft to that line itself, wakes no one, and
|
||||
//! records a receipt in her turn's record. When a line of hers replies to another (map 16.20.8 (D), K20), the room records
|
||||
//! the relation by the replied line's event, as the mouth will live (Bifrost B3), and refuses one not in the line's room;
|
||||
|
|
|
|||
|
|
@ -230,11 +230,10 @@ mind_body::persona: impl FileTrace: fn new (path : impl Into < PathBuf >) -> Sel
|
|||
mind_body::persona: impl Sender
|
||||
mind_body::persona: impl Trace for FileTrace
|
||||
mind_body::persona: impl fmt :: Display for Outcome
|
||||
mind_body::persona: pub trait Trace { fn record (& self , trace : & TurnTrace) -> Result < () > ; }
|
||||
mind_body::persona: pub trait Trace { fn record (& self , key : & str , record : & Value) -> Result < () > ; fn records (& self) -> Result < Vec < Value > > ; }
|
||||
mind_body::persona: struct Config # [derive (Clone , Debug , PartialEq , Eq)] pub-fields[rooms: Vec < String >, operators: Vec < String >, minds: Vec < String >, own_sender: String, model: String]
|
||||
mind_body::persona: struct FileTrace pub-fields[]
|
||||
mind_body::persona: struct TraceItem # [derive (Clone , Debug , PartialEq , Eq , Serialize , Deserialize)] pub-fields[provenance: String, room: String, text: String]
|
||||
mind_body::persona: struct TurnTrace # [derive (Clone , Debug , PartialEq , Eq , DatabaseEntry)] pub-fields[run: String, turn: u32, at: DateTime < Utc >, inputs: Vec < TraceItem >, outputs: Vec < TraceItem >, outcome: String]
|
||||
mind_body::persona: struct TurnRecord # [derive (Clone , Debug , PartialEq , DatabaseEntry)] pub-fields[value: Value]
|
||||
mind_body::projection: # [derive (Clone , Copy , Debug , Default , PartialEq , Eq , serde :: Deserialize)] # [serde (rename_all = "snake_case")] pub enum Through { # [default] Projector , Persona , Interpreter , }
|
||||
mind_body::projection: fn project (organs : & Organs , request : & Request , now : DateTime < Utc >) -> Result < Value >
|
||||
mind_body::projection: impl Affordance
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ Nothing that acts for a Persona writes her Mind. Since C1 the host enforces that
|
|||
| Heartbeat (`mind-heartbeat.service`; `heartbeat.rs`, `tempo.rs`, `bin/mind-heartbeat.rs`) | Huginn `mind-body`. The one process deciding which Persona wakes and when. Sole writer of `heartbeat.cc`. | Swarm envelope and each Persona's brake (`read_effective`); each Persona's pending chat from Bifrost's mouth (`chat.pending`, read only, never acked, at most 16 pages); the unit table through `Launcher::alive`; `stewardships_of` on her Mind; `HEARTBEAT_PERSONAS`, `MIND_PERSONA_OPERATOR`, `HEARTBEAT_POLL_S` (20), `HEARTBEAT_BEAT_S` (1800), `BIFROST_CHAT_ENDPOINT`, `BIFROST_CHAT_KEY_FILE`, `STATE_DIRECTORY`. It holds no connector key. | `systemctl start mind-persona@<i>` through `SystemdLauncher`; `heartbeat.cc` (state, addressing table, poll traces). No run, no brief, no Self-run launch. | Off the beat: the operator, or another Mind of the roster, naming her wakes her once per message (`handled_mentions`, 64 kept). On the beat: when `beat_s` has passed since `last_beat_at`, `tempo::pick` over idle, released Minds by wait since the heartbeat last woke each, bent by a member addressing her. Busy is systemd's: an active unit is busy and a start is a no-op. | Her Mind (a Persona wake is a unit start); `heartbeat.cc` by anything but the heartbeat; the brakes. | `heartbeat.cc` under the unit's `STATE_DIRECTORY`, world-readable: Personas read the addressing table through `HeartbeatView`. `mind-heartbeat timeline` prints the latest poll. | C2 deleted the claimable-brief and Self-run branch, tempo votes and the PID fallback (`tally`, `fallback_beat`), the urgency pulse, `sleep.rs` (no night wake until C4) and `attachment.rs`. It kept `tempo::pick` and `score`. `vote_beat_s` in `InstanceTrace` is retired and always none, kept so old trace records decode. A `heartbeat.cc` holding an older document is refused by name and never migrated. | `heartbeat/tests.rs`: `a_mind_whose_self_holds_briefs_gets_a_persona_wake_and_no_self_run`, `no_poll_admits_anything_to_any_mind_whatever_it_wakes`, the mention and beat tests. |
|
||||
| Self-run actuator (`mind-self@<i>`; `self_run.rs`, `bin/mind-self-run.rs`) | Huginn `mind-body`. Carries the one in-force Self run of its instance. | The run document (the grant), the lease socket, the Mind, the clock. | One `claude` child, its flush, its stop. | Request prefix, session id (UUIDv5 of the run id), kept transcript. | Nothing launches it. `launch::open_and_launch`, the work queue and the repetition breaker are gone (tag `parked/self-run-launch`). No organ opens a Self run, so `mind-self-run` with no open run exits 3. | The run slot in the Mind; `/var/lib/gamecult/minds/<i>/` state. | Left in place on purpose (C2 keep list): C3b's Interpreter reuses its spawn and sandbox and `lease_client`. `inbox` still reads briefs admitted by agent `mind-persona`; nothing admits them now. | `tests/self_run.rs` (ignored lane: the real binary against the real daemon with a fake `claude`); `self_run/tests.rs`. |
|
||||
| Persona state (`gamecult.persona_state.v0`, one per mind, `personaId` = instance) | The Persona. No organ of Huginn writes it today. Target writers (ruling `persona-only-state-writers-self-and-life`): her commit step (C3c), and Self and Life on Starfire through `mind-persona edit`. | `PersonaGet`, `PersonaPut` on the daemon. | A receipt per put. | None stored. | The Projector, the Persona stage and the Interpreter never put. A raw `huginn persona put` is detected and recorded `unexplained`, not sanctioned. | The Mind store; reached by `PersonaGet` and `PersonaPut` at the persona door (C1, live), the only listener a Persona uid can reach. | `huginn-mind/src/persona.rs` keeps the document and its CAS. C2 removed the organ that was its only writer. | `huginn-mind` persona tests; `serve.rs` tests that the persona door answers her persona and refuses `Admit`. |
|
||||
| Persona turn trace (`eureka.persona.turn_trace.v1`, `FileTrace`) | The Persona organ, when C3 lands. | Nothing writes it today. | None. | None. | Any Mind writer; any model. | The unit's state directory. | Kept for C3c (trace v2 with `outside_put` and `tuning_changed`). Deltas are read from it over ssh (`persona-only-deltas-from-trace`). | `persona/tests.rs` `the_trace_store_keeps_each_turn_under_its_run_and_turn`. |
|
||||
| Persona turn trace (`eureka.persona.turn_record.v1`, `FileTrace`: the turn record itself, the shape `outcome_of` reads) | The Persona organ, when C3 lands. | Nothing writes it today. | None. | None. | Any Mind writer; any model. | The unit's state directory. | Kept for C3c (the record gains `outside_put` and `tuning_changed`). Deltas are read from it over ssh (`persona-only-deltas-from-trace`). | `persona/tests.rs` `the_trace_store_keeps_each_record_under_its_key_and_lists_them_oldest_first`. |
|
||||
| Brake and the stop on hold | Operator. `mind-control brake hold` writes the brake, then stops the instance's units. | The operator's word. | `control.cc`; a blocking `systemctl stop`. | `read_effective` is the one reader. | Every organ of hers. | `/etc/gamecult/minds/<i>/`, `swarm.cc`. | `StopScope` still names three templates: `mind-self@`, `mind-persona@` and `mind-stream@`. The stream organ is parked; its unit name stays on the stop list so a host that still has it installed is stopped. | `tests/cli.rs` and the `launch.rs` stop tests (they spell `mind-stream@`). |
|
||||
| Parked and deleted organs | Tags on the forge, not main. | n/a | n/a | n/a | Main must not regrow them without a ruling. | n/a | `parked/divergence-stream` holds `stream.rs` and `bin/mind-stream` (ruling `persona-only-divergence-parked`; return condition: measured narrations converge, judged by the eval of the design map's section 3.4; its Projector code is reused by C3a). `parked/self-run-launch` holds `open_and_launch`, the work queue and its breaker (a future spend owner may restore Self runs on address). `sleep.rs` and `attachment.rs` are deleted, not parked: consolidation returns in C4 as a retarget onto `thoughtMemory`. | The C2 negative greps: `start_self_run`, `WORK_QUESTION`, `WAKE_ASK`, `TURN_INSTRUCTION`, `Pulse`, `tempo_vote` absent from `crates/mind-body/src`. |
|
||||
|
||||
|
|
@ -607,7 +607,7 @@ pipeline kinds are in Huginn `docs/eureka-substrate-map.md`.
|
|||
| Connector request and transcript items | Request: `(caller_runtime_id, request_id)`, the replay key the daemon already keeps (`replay.cc`). Items: UserText, AssistantText, ToolCall, ToolResult, plus `ReasoningState { provider, model, opaque }` (ruling `connector-opaque-state-item`). Contract ids become provider-neutral `gamecult.model.*.v3` (follow-up `connector-contract-untyped`); the connector serves Ghostlight too, so not `eureka.*`. | Invocation expires at `expires_at_unix_ms`; replay record per key; restart-era `Indeterminate`. The caller stores the transcript and replays it verbatim; foreign-tagged reasoning state inside an in-flight tool exchange is refused typed; completed-turn foreign state is settled per provider in the connector cut (follow-up `connector-reasoning-state-cheap-providers`). | The connector produces, reads or refuses reasoning bytes; callers never branch on provider. |
|
||||
| Connector spend ledger | The reservation lives in the replay record itself (cut connector-spend, F33): integer micro-USD, windowed per caller (ruling `connector-spend-caller-window-ceiling`). | Reserve before the provider runs, settle to actual; refusals `CostBound` (the invocation's own `max_cost_micro_usd`) and `SpendCeiling` (the caller's window); a ledger that cannot be written refuses the request. | The kit's `ProviderCall::charge` is the one billing owner; a backend reports usage or `None` (bills the reservation). The root caller config sets the ceiling. |
|
||||
| Claude connector backend (B4a, landed `200933f`; the Persona does not use this backend, it borrows a lease like the Self) | `ClaudeCodeBackend` in `crates/claude-connector`, provider tag `claude-code`: one `claude -p` child per call in its own process group, tool-less, system prompt in a private temp file; reasoning state is a named-MessagePack `ClaudeCodeHandle { session_id, instance, prefix_sha256 }`; usage is `model_usage_since_last_result` summed over models, in list-price units from B4b's price table (ruling `claude-code-plan-quota-fuse-2`). | A handle resumes (always `--fork-session`) only when it decodes, names this instance, its session file exists and its digest matches the request's instructions, model and earlier items; anything else re-seeds from the caller's transcript (ruling `claude-code-handle-reseeds`). The CLI's session store under `config_dir` is a cache; the caller's transcript is the truth. A refusal at the door with explicitly empty usage bills zero; unknown usage, a crash or a deadline bills the reservation. | The backend owns the argv, env, process and stream mapping. It never reads `total_cost_usd`, never forwards `ANTHROPIC_API_KEY`, never retries, never spawns twice per execute. Forbidden: `--bare`, `--fallback-model`, `--mcp-config` and `--dangerously-skip-permissions` (B4d changes the MCP line, by spec). Her organs hold none of it: the subscription token lives in the connector's own environment. |
|
||||
| Persona turn traces | **Superseded by C2 (Huginn `66b85c8`; see "The persona-only body").** `FileTrace` exists; nothing writes it until C3c. **Empty: question `persona-trace-retention`.** Candidate: per turn, the request digest, the transcript items and the typed output, keyed by the turn's run. | Empty: how long they are kept, whether Discord-sourced content may enter a training export (F14). | Empty: who may export them. Unconfirmed 2026-11-02: `FileTrace`/`TurnTrace` exist in `persona.rs`; whether they are the retention answer is not checked against the question's state. |
|
||||
| Persona turn traces | **Superseded by C2 (Huginn `66b85c8`; see "The persona-only body").** `FileTrace` exists; nothing writes it until C3c. **Empty: question `persona-trace-retention`.** Candidate: per turn, the request digest, the transcript items and the typed output, keyed by the turn's run. | Empty: how long they are kept, whether Discord-sourced content may enter a training export (F14). | Empty: who may export them. Unconfirmed 2026-11-02: `FileTrace` exists in `persona.rs`; whether they are the retention answer is not checked against the question's state. |
|
||||
| Persona state | **Superseded by C2 (Huginn `66b85c8`; see "The persona-only body").** No organ writes it; target writers are her commit step, Self and Life (`persona-only-state-writers-self-and-life`). `gamecult.persona_state.v0`, one per mind, `personaId` = instance (cut-huginn-persona-state r2, eureka-substrate). | Replaced whole under CAS with a receipt; she may rewrite any field (`identity-write-all-visible`). | The Persona organ is the only writer. |
|
||||
| Persona session | **Superseded by C2 (Huginn `66b85c8`; see "The persona-only body").** No `claude` session runs in `mind-persona@<i>`; the organ is inert. The three-stage turn replaces it (C3). Process `claude` under bwrap in `mind-persona@<i>`; id uuid5(run, `p<n>`); one conversation per process | Ends at cache TTL, near the 4 h cap minus `ROTATE_MARGIN_S`, at the context ceiling's flush, or when another conversation's delivery is the oldest unanswered; next process rehydrates from the mind | The Persona organ (lifetime, input, acks); the mind is truth; heartbeat only starts units |
|
||||
| Persona sandbox | **Superseded by C2 (Huginn `66b85c8`; see "The persona-only body").** Nothing writes it now; C3b decides the Interpreter's sandbox. `/var/lib/mind-<i>/sandbox` | Kept between processes; the only place her tools write (besides the fresh config dir) | Her; nobody else reads it. Not a source of truth for anything. |
|
||||
|
|
|
|||
Loading…
Reference in a new issue