build(agent): new-agents-2#7e3bbc iteration

This commit is contained in:
agent-7e3bbc424e07835b 2026-04-23 22:45:31 +02:00
parent f64d7d7bf4
commit 0a271058e6
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
from __future__ import annotations
"""NebulaBridge compatibility layer.
This module provides a tiny, production-friendly wrapper that converts
NebulaForge high-level contract objects into the EnergiBridge canonical
interoperability blocks. It delegates to the existing energibridge.to_energi_blocks
function, ensuring consistent mappings and replayable delta logs.
Usage (example):
- fm_blocks = nebula_bridge.nebula_to_energi_blocks(lp, sv, pd, pb, al, adapter_id="rover-runtime")
"""
from typing import Dict, Any
from nebulaforge.contracts import LocalProblem, SharedVariables, PlanDelta, PrivacyBudget, AuditLog
from nebulaforge.energibridge import to_energi_blocks as _to_energi_blocks
def nebula_to_energi_blocks(
lp: LocalProblem,
sv: SharedVariables,
pd: PlanDelta,
pb: PrivacyBudget,
al: AuditLog,
adapter_id: str = "unknown",
) -> Dict[str, Any]:
"""Convert NebulaForge contracts into EnergiBridge DSL blocks.
This is a thin wrapper around the existing to_energi_blocks function to
keep usage consistent from the NebulaForge side of the ecosystem.
"""
return _to_energi_blocks(lp, sv, pd, pb, al, adapter_id)