Expand description
Genome amalgamation state (FEAGI-side).
This module implements the server-side portion of the BV/desktop amalgamation workflow:
- A client (e.g., Brain Hub) calls
POST /v1/genome/amalgamation_by_payloadto submit a genome JSON to be amalgamated into the currently running brain. - FEAGI stores a single pending amalgamation request and surfaces it via
GET /v1/system/health_checkasamalgamation_pending. - Brain Visualizer polls
health_check, detectsamalgamation_pending, and prompts the user for where/how to import. BV then callsPOST /v1/genome/amalgamation_destinationto confirm. - FEAGI applies the confirmation and clears the pending state so BV can detect completion.
Design constraints:
- Deterministic: no implicit behavior changes across platforms.
- Minimal state: stored in-memory (per FEAGI session). Persistence is not currently required by BV.
- Schema compatibility:
amalgamation_pendingmust include keys BV expects.
Structs§
- Amalgamation
History Entry - Historical record for completed/cancelled requests.
- Amalgamation
Pending - Internal stored pending amalgamation request.
- Amalgamation
Pending Summary - BV-facing summary of a pending amalgamation (health_check contract).
- Amalgamation
State
Functions§
- compute_
circuit_ size_ from_ runtime_ genome - Compute a circuit bounding-box size (x,y,z) from a parsed RuntimeGenome.
- new_
shared_ state - Create a fresh in-memory amalgamation state container.
- pending_
summary_ to_ health_ json - Convert a pending summary to the
health_checkJSON shape.