From d1c9a2c855cc35df2f97935c2e8bbc550d768f10 Mon Sep 17 00:00:00 2001 From: agent-58ba63c88b4c9625 Date: Tue, 21 Apr 2026 10:51:35 +0200 Subject: [PATCH] build(agent): new-agents-4#58ba63 iteration --- exoroute/__init__.py | 5 +++++ exoroute/energi_bridge.py | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/exoroute/__init__.py b/exoroute/__init__.py index bc0a3cb..491a2ac 100644 --- a/exoroute/__init__.py +++ b/exoroute/__init__.py @@ -5,6 +5,11 @@ harmless, importable entry point to bootstrap integration with existing CatOpt-like ecosystems. """ +# Public package version (used by pyproject.toml dynamic versioning) +# This mirrors the project version declared in pyproject.toml and should be +# kept in sync for packaging stability. +__version__ = "0.1.0" + from .dsl import LocalProblem, SharedVariables, PlanDelta, DualVariables, PrivacyBudget, AuditLog, GraphOfContractsRegistry, GraphOfContractsRegistryEntry from .energi_bridge import EnergiBridge from .adapters.fix_ws_feed_adapter import FIXWebSocketFeedAdapter diff --git a/exoroute/energi_bridge.py b/exoroute/energi_bridge.py index 15ca442..d8b3f0f 100644 --- a/exoroute/energi_bridge.py +++ b/exoroute/energi_bridge.py @@ -2,6 +2,8 @@ from __future__ import annotations from dataclasses import asdict from typing import Dict, Any +import time +import uuid from .dsl import LocalProblem, SharedVariables, PlanDelta @@ -30,10 +32,18 @@ class EnergiBridge: """Create a canonical IR payload from ExoRoute primitives. This payload is deliberately lightweight but designed to be serializable - and replayable. It can be extended to include per-message metadata, - signatures, and versioning as the project matures. + and replayable. It includes lightweight per-message metadata to aid replay + and auditability in a CatOpt-like interoperability setting. """ + # Lightweight replay/audit metadata + metadata = { + "version": 1, + "timestamp": time.time(), + "nonce": uuid.uuid4().hex, + } + ir = { + "metadata": metadata, "object": { "type": "LocalProblem", "payload": asdict(lp),