ClaudeAgentSDK.Streaming.Termination (claude_agent_sdk v0.11.0)

Copy Markdown View Source

Shared termination logic for streaming sessions.

Tracks stop_reason updates and determines when a message should complete.

Summary

Types

stop_reason()

@type stop_reason() :: String.t() | nil

Functions

reduce(events, current_reason)

@spec reduce([map()], stop_reason()) :: {stop_reason(), boolean()}

step(event, current_reason)

@spec step(map(), stop_reason()) :: {stop_reason(), boolean()}