Skip to main content

Module amalgamation

Module amalgamation 

Source
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_payload to 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_check as amalgamation_pending.
  • Brain Visualizer polls health_check, detects amalgamation_pending, and prompts the user for where/how to import. BV then calls POST /v1/genome/amalgamation_destination to 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_pending must include keys BV expects.

Structs§

AmalgamationHistoryEntry
Historical record for completed/cancelled requests.
AmalgamationPending
Internal stored pending amalgamation request.
AmalgamationPendingSummary
BV-facing summary of a pending amalgamation (health_check contract).
AmalgamationState

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_check JSON shape.

Type Aliases§

SharedAmalgamationState