From 5cc56b2ce8e97e57ebf7a99215a7058307c47c90 Mon Sep 17 00:00:00 2001 From: Carl Niklas Rydberg Date: Sun, 18 Jan 2026 11:54:36 +0100 Subject: [PATCH] Add federation integration example --- docs/federation-implementation-notes.md | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/federation-implementation-notes.md b/docs/federation-implementation-notes.md index 0bc8644..bbf4444 100644 --- a/docs/federation-implementation-notes.md +++ b/docs/federation-implementation-notes.md @@ -208,6 +208,36 @@ Core federation primitives are exposed via: - include/amduat/fed/replay.h - include/amduat/fed/view.h +## Integration example (core flow) + +```c +amduat_fed_registry_store_t reg_store; +amduat_fed_registry_value_t reg_value; +amduat_fed_domain_state_t reg_states[8]; + +amduat_fed_registry_value_init(®_value, reg_states, 8); +amduat_fed_registry_store_init(®_store, local_store); +amduat_fed_registry_store_put(®_store, ®_value, ®_ref, NULL); + +if (amduat_fed_ingest_validate(records, record_count, NULL, NULL) != + AMDUAT_FED_INGEST_OK) { + return false; +} + +if (!amduat_fed_view_build(records, + record_count, + local_domain_id, + bounds, + bounds_len, + denies, + denies_len, + &view)) { + return false; +} + +resolve_err = amduat_fed_resolve(&view, local_store, ref, &artifact); +``` + ## Policy gating - Admission gating is per-domain.