Huginn/crates/mind-body
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens ea38f5f17d The Interpreter's speech (C3b): what she says is decided from her prose, not parsed from quotes; Soul's F2 to F9
Speech (Soul F1): `projection::interpret` is the Interpreter's speech step, one tool-less structured call through the
connector under Ghostlight's Interpreter membrane, over her prose, her lived stream, the stimulus, the rooms she may
speak in and the people she may address by Matrix id. It proposes lines, each with a room, structured mentions and a
reply target, and the verbatim span of her prose it rests on. Code keeps a line only when the span locates in her prose
(Ghostlight's SourceSpan::locate, map 4.3), the room is hers this turn, and its words are not what she heard; it drops
mentions or a reply target naming anyone not shown, and records every refusal and drop. An answer that is not the
contract is a failure, never a silence. `--through interpreter`; the batch and the simulation run through it, and in
the simulation the only explicit addressees are its structured fields. `would_say`, `inner` and the quote parsing are
gone; the Persona stage writes her thought with no speech convention. Tuning gains `[interpreter]`.

- F2: she is in a room's exchange when she spoke there within `exchange_minutes` (default 30).
- F3: the Projector guidance names no duty, not even to deny one; "X is waiting on her" only when true.
- F4: the narration metric is a lexical overlap, labeled so.
- F5: a scripted direct message in one of the plan's rooms is refused.
- F6: the Mind-run cap counts one run per Mind across her rooms; LineFacts::default() is at the cap (fail-safe).
- F7: an unbonded sender is labeled by display name and full id, or the id: never a bare handle.
- F8: a room is named by the key the tail carries (alias, or a direct message's id); a public room's id is reported,
  not mapped, since no table in her body maps it.
- F9: group-state parts are sentences, the person waiting on her first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:54:37 +01:00
..
fixtures/harness The Interpreter's speech (C3b): what she says is decided from her prose, not parsed from quotes; Soul's F2 to F9 2026-11-20 04:54:37 +01:00
src The Interpreter's speech (C3b): what she says is decided from her prose, not parsed from quotes; Soul's F2 to F9 2026-11-20 04:54:37 +01:00
tests The Interpreter's speech (C3b): what she says is decided from her prose, not parsed from quotes; Soul's F2 to F9 2026-11-20 04:54:37 +01:00
Cargo.toml Projector after Soul: no Mind recall; messages to her always whole; sampled inclusion; effective tuning hash and validation; schema-derived guard; budget edges; read-only organs; grapheme clips 2026-11-19 23:43:50 +01:00
clippy.toml mind-body: the process environment is unreadable by library code, by lint 2026-10-10 20:15:18 +02:00
README.md Body map after C2: the persona-only body, stale rows marked, READMEs corrected 2026-11-19 22:40:02 +01:00

mind-body

The Mind's body: the control store, the unit launcher, the mind-heartbeat, the inert mind-persona organ and the mind-self-run actuator.

mind-self-run --instance <slug> [--endpoint rudp://<ip>:<port>] runs inside mind-self@<instance>. It finds her one open Self run, starts claude over stream-json with a fixed argument list, asks for the flush once at the context ceiling and stops a child that outlives the flush (SIGINT, then SIGTERM and SIGKILL). It exits 0 when the child exited 0, 1 otherwise, 3 when she has no single open Self run and 2 when the arguments are wrong or the mind cannot be reached.

The heartbeat

mind-heartbeat is the one process that decides who wakes and when. It starts a Persona's unit and writes no Mind: the beat (HEARTBEAT_BEAT_S, default 1800 s) goes to the idle, released Mind that has waited longest, bent by a member addressing her, and the operator or another Mind naming a Persona wakes her at once, once per message. mind-heartbeat timeline prints its latest record.

mind-persona is inert: it reads the brakes and exits dead or no organ. It writes nothing. Nothing launches mind-self-run.

The actuator has its own ignored test, the_real_bin_finds_her_run_... in tests/self_run.rs: the real mind-self-run against the real daemon with a fake claude first on PATH. It needs the daemon built beside the binary and a POSIX shell, not root:

cargo build -p huginn-daemon -p mind-body --all-targets   && cargo test -p mind-body --test self_run -- --include-ignored

Mutation testing of the actuator, with the globs that reach the library and the binary: cargo mutants -p mind-body -f "**/src/self_run.rs" -f "**/src/bin/mind-self-run.rs". The binary's mutants are killed only by the lane above.