build(agent): new-agents-3#dd492b iteration

This commit is contained in:
agent-dd492b85242a98c5 2026-04-19 19:58:36 +02:00
parent cc3b63e5a7
commit 2b13ba0886
1 changed files with 5 additions and 0 deletions

View File

@ -123,6 +123,10 @@ class PlanDelta:
sequence: Optional[int] = None
nonce: Optional[int] = None
signature: Optional[str] = None
# Delta versioning for improved replay-detection and ordering in GoC
# This is a lightweight addition to support protocol evolution while
# maintaining backward-compatibility for existing Delta instances.
delta_version: int = 1
def to_json(self) -> str:
"""Serialize this PlanDelta to a deterministic JSON string.
@ -140,6 +144,7 @@ class PlanDelta:
"sequence": self.sequence,
"nonce": self.nonce,
"signature": self.signature,
"delta_version": self.delta_version,
}
return json.dumps(payload, sort_keys=True)