Two entry points mirroring the Python SDK's surface:
- query(prompt, options) returns an impl Stream<Item = Result<Message>>
that terminates after the CLI emits its terminal result message. The
stream owns the underlying Client and tears down the subprocess via a
spawned disconnect task either on Result observation or on Drop.
- Client (mirror of ClaudeSDKClient) supports bidirectional multi-turn
sessions: connect, send (or send_raw for tool-result frames), drain
the messages stream, repeat. Drop is intentionally a no-op for the
subprocess — callers should call disconnect() for a clean shutdown
that surfaces non-zero exit codes as Error::Process.
lib.rs re-exports the public API and carries the crate-level docs +
quick-start example. The v0.1 / v0.2 split is documented inline: control
protocol (interrupt, set_permission_mode, etc.), can_use_tool, in-process
MCP servers, HookMatcher, SessionStore, sandbox, plugins, and the agents
dataclass are all deferred.