uAgents icon indicating copy to clipboard operation
uAgents copied to clipboard

feat(core): add message endpoint for inspector

Open Alejandro-Morales opened this issue 1 year ago • 1 comments
trafficstars

Received and sent local messages can now be retrieved through http://localhost:<PORT>/messages endpoint

Alejandro-Morales avatar Aug 07 '24 14:08 Alejandro-Morales

We can probably add a serialiser to the Envelope History List as well that automatically returns the sorted list when we call .model_dump_json()

class EnvelopeHistory(BaseModel):
    envelopes: List[EnvelopeHistoryEntry]

    @field_serializer("envelopes", when_used="json")
    def serialize_envelopes_in_order(
        self, envelopes: List[EnvelopeHistoryEntry], _info
    ):
        return sorted(envelopes, key=lambda e: e.timestamp)

Archento avatar Aug 16 '24 10:08 Archento

  • [x] please also return the agent address from the agent_info endpoint

dominic22 avatar Aug 22 '24 13:08 dominic22