Skip to content

A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

Shell

Snapshot evidence payloads before hashing and appending

Rudy Celekli1f53bd8a6bfe
diff --git a/specialized/agentic-identity-trust.md b/specialized/agentic-identity-trust.md
index a63defa6..59cdcfcc 100644
--- a/specialized/agentic-identity-trust.md
+++ b/specialized/agentic-identity-trust.md
@@ -165,6 +165,11 @@ class DelegationVerifier:
### Evidence Record Structure
```python
+from copy import deepcopy
+from datetime import datetime
+import hashlib
+import json
+
class EvidenceRecord:
"""
Append-only, tamper-evident record of an agent action.
@@ -185,9 +190,9 @@ class EvidenceRecord:
record = {
"agent_id": agent_id,
"action_type": action_type,
- "intent": intent,
+ "intent": deepcopy(intent),
"decision": decision,
- "outcome": outcome,
+ "outcome": deepcopy(outcome),
"timestamp_utc": datetime.utcnow().isoformat(),
"prev_record_hash": prev_hash,
}
@@ -199,7 +204,9 @@ class EvidenceRecord:
# Sign with agent's key
record["signature"] = self.sign(canonical.encode())
- self.append(record)
+ # Keep caller-owned inputs and the returned record independent of the
+ # stored snapshot; later mutations must not invalidate its signed hash.
+ self.append(deepcopy(record))
return record
```