Skip to main content

Module message_parser

Module message_parser 

Source
Expand description

JSON message parser for the Claude Code CLI protocol.

This module converts raw JSON values from the CLI output stream into typed Message variants. It handles all message types: user, assistant, system, result, and stream_event.

The primary entry point is parse_message().

Functionsยง

parse_message
Parses a raw JSON value from the CLI into a typed Message.