module RubyLLM::AgUI::Protocol

The few AG-UI 1.0 wire shapes the community Ruby SDK does not yet model.

The protocol SDK owns event models and wire encoding, and this gem reuses them for everything else. Two 1.0 shapes are missing from ag-ui-protocol 0.2.0:

  1. RunFinishedCancelledOutcome — 0.2.0 has success and interrupt outcomes only. A cancellation reported as success is exactly the bug this gem exists to prevent, so the gem emits a schema-valid cancelled outcome and offers the model upstream.

  2. RUN_STARTED.protocolVersion — 1.0 lets a producer declare the version it speaks so a consumer can see a downgrade. 0.2.0’s RunStartedEvent has no such field.

Both classes subclass the SDK’s own models, so the SDK encoder serializes them unchanged. They define no top-level AgUi constant.