Anthropic.Event (SkillKit v0.1.0)

Copy Markdown View Source

Parses raw Anthropic SSE event maps into typed event structs.

Each event arriving over the stream is a JSON-decoded map with a "type" key. parse/1 dispatches on that key and returns the corresponding struct from the Anthropic.Event.* namespace, or :skip for events that carry no useful data (e.g. ping).

Summary

Functions

Parses a raw SSE event map into a typed struct.

Types

Functions

parse(event)

@spec parse(map()) :: parsed_event() | :skip

Parses a raw SSE event map into a typed struct.

Returns :skip for ping events and any unrecognised event types.