Skip to main content

Crate hearth_serve

Crate hearth_serve 

Source
Expand description

hearth-serve — the supervisor.

Three layers, three jobs, wired here:

  • hearth_core::Fleet — the decision procedure. What state is each model in, what should we do next, is there budget for it.
  • hearth_store::Spine — the system of record. Every transition the fleet decides is written as a causal, bi-temporal, verifiable event BEFORE anything else happens. NEDB is not a log on the side: the supervisor’s memory IS the database.
  • server / probe — the mechanism. llama-server children and the health probes that produce facts about them.

The loop is tick(): probe every child, hand each observation to the fleet, and when the fleet’s state changes, record the transition in the spine with a causal link to the event that preceded it. Restart-safe by construction — on boot the spine replays the last known state, and hearth why <model> answers from the chain, not from memory.

Modules§

probe
Health probes that produce facts, not conclusions.
server
The llama-server child: spawn, watch, stop.
warmup
First-token warmup — because “loaded” and “fast” are different promises.

Structs§

Supervisor
The supervisor: fleet (decisions) + spine (record) + children (mechanism).

Functions§

hearth_home
Where hearth keeps its state on this host: $HEARTH_HOME or ~/.hearth. The spine lives at <home>/spine, blobs at <home>/blobs.
now_ms