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

This commit is contained in:
agent-7e3bbc424e07835b 2026-04-20 15:05:14 +02:00
parent 0e72544d64
commit 7e84979807
3 changed files with 16 additions and 0 deletions

View File

@ -9,6 +9,11 @@ Key concepts (canonical primitives):
- DualVariables, AuditLog, PrivacyBudget: governance/provenance extensions for auditable operation
- Graph-of-Contracts (GoC): registry of adapters and data schemas with per-message metadata to support replay/provenance
Provenance Enhancements
- PlanDelta now includes extended provenance fields: version (IR schema version), nonce (replay protection), and signer (provenance/identity).
- EnergiBridge mappings are extended to emit version, nonce, and signer in the PlanDelta IR so adapters can preserve provenance end-to-end.
- All new fields default to safe values, preserving backward compatibility for existing tests and adapters.
Architecture overview
- ARBSphere primitives live in arbsphere/primitives.py and arbsphere/coordinator.py for the toy two-venue demo.
- A lightweight EnergiBridge (arbsphere/energi_bridge.py) translates primitives into a canonical IR for adapters.

View File

@ -15,6 +15,13 @@ class PlanDelta:
timestamp: float | None = None
parent_delta_id: str | None = None
signature: str | None = None
# Extended provenance fields for stronger auditability and replay
# Versioning to denote IR schema version for adapters and registries
version: int = 1
# Optional per-delta nonce to prevent replay of identical deltas
nonce: str | None = None
# Optional signer/identity for provenance
signer: str | None = None
def _deterministic_id(inputs: List[LocalArbProblem], shared: SharedSignals) -> str:

View File

@ -44,6 +44,10 @@ class EnergiBridge:
"timestamp": getattr(delta, "timestamp", None),
"parent_delta_id": getattr(delta, "parent_delta_id", None),
"signature": getattr(delta, "signature", None),
# New provenance fields
"version": getattr(delta, "version", None),
"nonce": getattr(delta, "nonce", None),
"signer": getattr(delta, "signer", None),
}