Huginn/crates/mind-body
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens 21fb9b2b04 mind-self-run: every exit closes her Run once with the result's excerpt; the child sees EUREKA_INSTANCE and HUGINN_ENDPOINT for the huginn CLI
Squash of eureka-body/self-run-closes-run 55dd620..93f93c1 (Soul go; orphan
sweep cut: the mind admits one Self run in force and launch's close_dead closes
a dead holder). Operator: 'Look into the stale runs issue' and 'why has this
xenos filth not been replaced with nice clean CLI yet'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 05:02:20 +01:00
..
src mind-self-run: every exit closes her Run once with the result's excerpt; the child sees EUREKA_INSTANCE and HUGINN_ENDPOINT for the huginn CLI 2026-10-31 05:02:20 +01:00
tests self-run: the config copy reproduces in-tree seed links, refusing any that resolve outside the seed; the start message names the eureka skill 2026-10-31 02:34:06 +01:00
Cargo.toml mind-heartbeat: one heartbeat routes every Persona turn on an initiative timeline; the classifier's urgency multiplies regain, an operator mention fills, a Self-run completion reaches the classifier and never fills; burn is real spend read as the heartbeat; each Persona on her own Huginn; DM rooms answered alone; the mind-wake path deleted (squash of eureka-body/mind-heartbeat d54ba01..3a4d28f; Soul s1-s4) 2026-10-30 02:49:35 +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 mind-heartbeat: one heartbeat routes every Persona turn on an initiative timeline; the classifier's urgency multiplies regain, an operator mention fills, a Self-run completion reaches the classifier and never fills; burn is real spend read as the heartbeat; each Persona on her own Huginn; DM rooms answered alone; the mind-wake path deleted (squash of eureka-body/mind-heartbeat d54ba01..3a4d28f; Soul s1-s4) 2026-10-30 02:49:35 +01:00

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: acting burns initiative by spend, the classifier's urgency multiplies how fast it regains, and the operator tagging or naming a Persona fills it. 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.