Metadata-Version: 2.4
Name: algovoi-cloudevents
Version: 0.1.0
Summary: Emit an AlgoVoi keystone decision as a CloudEvents 1.0 event, with execution_ref as the recomputable content-addressed event identity (Apache-2.0)
Author-email: AlgoVoi <chopmob@gmail.com>
License: Apache-2.0
Keywords: cloudevents,cncf,agent,agentic-payments,execution_ref,jcs,rfc8785,algovoi
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: algovoi-substrate>=0.4.0
Requires-Dist: rfc8785>=0.1.2
Dynamic: license-file

# algovoi-cloudevents

Emit an AlgoVoi keystone decision as a [CloudEvents](https://cloudevents.io) 1.0 event. The
content-addressed `execution_ref` is the event `id`; the keystone references live in `data` and the
standard `id` / `subject` attributes (no invented context extension attributes, so the event stays
spec-conformant). A consumer recomputes `execution_ref` from `data` with only JCS (RFC 8785) +
SHA-256 and confirms it equals the event `id`.

```python
from algovoi_cloudevents import to_cloudevent, verify_cloudevent_execution_ref
ev = to_cloudevent(decision_ref=dr, action_type="payment", scope="payments/transfer",
                   outcome="COMMITTED", executed_at_ms=1716460800000,
                   source="did:web:api.algovoi.co.uk", stage="execution")
assert verify_cloudevent_execution_ref(ev)   # recompute from data, offline
```

Apache-2.0.
