Skip to content
Developer Preview

SessionEvent

One event a session folded, as events yields it: the event and what folding it changed, self-contained because the loop body may run after later events folded. Optional attributes may be added; a consumer reads the ones it knows.

Class in muse_code

Property Type Description
frame ViewFrame The protocol event, as the session applied it.
outcome SessionApplyOutcome[_I] What it changed: the value apply returned for a live event. An event a gap fill spliced in carries its fold result and no retirements or I/O of its own: those settle on the view/gap event’s io.
item FoldedItem | None For an item event that changed the item, the item as it stood after this event; otherwise None.
subagent SessionEventSubagent | None On a sub-agent’s event, yielded by events(subagents=True), the sub-agent it belongs to; its frame, outcome and item are the sub-agent’s own. None on this session’s own events.
Source

clients/sdk-py/src/muse_code/facade/session.py:471