build(agent): new-agents#a6e6ec iteration
This commit is contained in:
parent
532a632010
commit
dccbd08885
|
|
@ -26,3 +26,8 @@ Testing and Local Run
|
|||
|
||||
Decision Log
|
||||
- This document should be kept up to date with architectural shifts and interface changes.
|
||||
|
||||
Changelog (Implementation Updates)
|
||||
- ExoRoute now exports GraphOfContractsRegistry and GraphOfContractsRegistryEntry from exoroute.__init__ for interoperability wiring.
|
||||
- EnergiBridge.to_canonical now accepts an optional GraphOfContractsRegistry to embed registry metadata into the canonical IR, enabling cross-ecosystem provenance and versioning.
|
||||
- The repo maintains its DSL as the existing core primitives (LocalProblem, SharedVariables, PlanDelta, DualVariables, PrivacyBudget, AuditLog, GraphOfContractsRegistry) in exoroute.core; these are used for MVP wiring and cross-venue interoperability.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from .core import LocalProblem, SharedVariables, PlanDelta, DualVariables, PrivacyBudget, AuditLog
|
||||
from .core import LocalProblem, SharedVariables, PlanDelta, DualVariables, PrivacyBudget, AuditLog, GraphOfContractsRegistry, GraphOfContractsRegistryEntry
|
||||
__all__ = [
|
||||
"LocalProblem",
|
||||
"SharedVariables",
|
||||
|
|
@ -6,4 +6,6 @@ __all__ = [
|
|||
"DualVariables",
|
||||
"PrivacyBudget",
|
||||
"AuditLog",
|
||||
"GraphOfContractsRegistry",
|
||||
"GraphOfContractsRegistryEntry",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
from __future__ import annotations
|
||||
from typing import Dict, Any, Optional
|
||||
from .core import LocalProblem, SharedVariables, PlanDelta
|
||||
from .core import LocalProblem, SharedVariables, PlanDelta, GraphOfContractsRegistry
|
||||
|
||||
class EnergiBridge:
|
||||
"""Minimal bridge translating ExoRoute primitives to a canonical IR (EnergiBridge-style).
|
||||
This is a lightweight, extensible mapping scaffold for interoperability with CatOpt-like ecosystems.
|
||||
"""
|
||||
@staticmethod
|
||||
def to_canonical(local: LocalProblem, shared: SharedVariables, delta: Optional[PlanDelta] = None) -> Dict[str, Any]:
|
||||
def to_canonical(local: LocalProblem, shared: SharedVariables, delta: Optional[PlanDelta] = None, registry: Optional[GraphOfContractsRegistry] = None) -> Dict[str, Any]:
|
||||
can = {
|
||||
"Objects": {
|
||||
"LocalProblem": {
|
||||
|
|
@ -30,4 +30,14 @@ class EnergiBridge:
|
|||
},
|
||||
"PlanDelta": delta.delta if delta else {},
|
||||
}
|
||||
# Optional registry embedding for interoperability and provenance
|
||||
if registry is not None:
|
||||
can["GraphOfContractsRegistry"] = {
|
||||
entry_id: {
|
||||
"adapter_id": entry.adapter_id,
|
||||
"supported_domains": entry.supported_domains,
|
||||
"contract_version": entry.contract_version,
|
||||
}
|
||||
for entry_id, entry in registry.entries.items()
|
||||
}
|
||||
return can
|
||||
|
|
|
|||
Loading…
Reference in New Issue