agora.matrix.events
Custom Matrix event types for Agora (m.agora.* namespace).
Each event type has a pair of helpers:
- <model>_to_content(obj) -> dict — produce the Matrix event content payload
- <model>_from_content(content) -> obj — parse an event content dict back to a model
Validation raises AgoraError on malformed content.
All timestamps use ISO-8601 strings.
Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parse a task event into a dict (orchestrator hydrates into Task). |
|
|
|
|
|
- agora.matrix.events.task_to_content(*, task_id, description, agent_id, status, fingerprint, depends_on=())[source]
- agora.matrix.events.task_from_content(content)[source]
Parse a task event into a dict (orchestrator hydrates into Task).
We return a dict, not a Task, because Task requires a
Specificationwhose predicate callables do not survive serialization. The orchestrator reconstructs the Specification from its contract event (stored separately).
- agora.matrix.events.task_result_to_content(*, task_id, success, output, artifacts, postcondition_results)[source]