| Filename | Latest commit message | Latest commit date |
|---|---|---|
Map: docs/persona-only-heartbeat-map.md (imagination/persona-only-heartbeat, d861574), cut C2. Rulings: eureka-body:ruling:persona-only-heartbeat (she reads the Mind and never writes it; no Self runs from the Persona). Persona organ (persona.rs 3983 -> ~420 lines): deleted the live session organ whole: TURN_INSTRUCTION, TURN_REMINDER, MESSAGES_HEADER, WORK_QUESTION, ANSWER_MESSAGES, WAKE_ASK, WORK_TAIL; PersonaReply with intent, remember, rule, settle, start_self_run, tempo vote and urgency, and reply_schema; the doctrine and persona-JSON system prompt (read_doctrine, render_instructions, campaigns); start_session, persona_args, PersonaInbox; act, decode_reply and every admission (memories, rulings, settles, pulses, follow-ups, run closure); start_self_run; the responsibilities, recent-runs and wear renderers; render_input and render_tempo. carry reads the brakes and answers Dead or NoOrgan; a start writes nothing and records no run. Kept per the map's keep list for C3: Config (doctrine, image store and fetch fields cut with their consumers), the brake read, the chat-addressing helpers, the tail renderer and FileTrace; uncalled ones carry allow(dead_code) naming C3. Night: sleep.rs is deleted. It was a Mind-writing session built on the deleted prelude; C4 retargets its contract from history. attachment.rs is deleted with the reply's save_attachment, its one caller. chat_image's loader and recall.rs stay for C3 under allow(dead_code). Heartbeat: no Mind writes. A wake is a plain unit start through the Launcher (brake, then alive, then start); busy is the unit's own state. Deleted the Self-run branch (claimable briefs), the self-ended wake, tempo votes and declared urgency (standing_vote, pending_urgency, last_self_end) and the run-based last_turn and last_sleep reads; HeartbeatState gains last_turn_at and last_night_at (default slots, so a state written before this cut still decodes). The beat is HEARTBEAT_BEAT_S, default 1800 s. InstanceTrace.vote_beat_s stays as an always-none slot so heartbeat.cc's older trace records still decode. HeartbeatView loses latest; the timeline reads FileStore::latest. tempo.rs: tally, fallback_beat and the PID controller and its sim are deleted; pick and score stay, without self_permille. Tests that pinned deleted behaviour are deleted with it; surviving ones are kept, and two heartbeat tests pin the cut: a Mind with claimable briefs gets a Persona wake and no Self run, and no poll admits anything to any mind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
| .. | ||
| src | ||
| tests | ||
| Cargo.toml | ||
| clippy.toml | ||
| README.md | ||
mind-body
The Mind's body: the control store, the launch primitive, the mind-heartbeat
timeline 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: each beat falls when the Minds' voted tempo has passed and goes to the Mind that has waited longest, bent by the urgency she declares and a member addressing her; the operator tagging or naming a Persona launches her at once. mind-heartbeat timeline prints its latest record.
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.