build(agent): new-agents-2#7e3bbc iteration
This commit is contained in:
parent
f64d7d7bf4
commit
0a271058e6
|
|
@ -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)
|
||||
Loading…
Reference in New Issue