Skip to main content

Module stream_json

Module stream_json 

Source
Expand description

Stream-JSON driver — fast-path for Claude Code SDK and openclaude.

Wire format: line-delimited JSON over the agent process’s stdio. Each line is one JSON object; messages flow bidirectionally.

Spec mapping: see docs/cap-v1.md §6.2 + Appendix C.1.

Supported agent today:

  • Claude Code via claude -p --input-format=stream-json --output-format=stream-json

openclaude and other Anthropic-SDK-compatible CLIs should also work with [ClaudeCodeDriver::spawn_with] pointing at their binary.

Structs§

ClaudeCodeDriver
Driver that talks to the Claude Code CLI (or any stream-json compatible agent) via the SDK’s --input-format=stream-json --output-format=stream-json protocol.
ClaudeCodeDriverBuilder
Fluent configuration for ClaudeCodeDriver.