add documentation

This commit is contained in:
Osman Mehmood
2026-03-31 15:38:58 +05:00
parent b7a82da0be
commit 9024f81eb7
32 changed files with 941 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
# Print mode, stream-json, and SDK control
**Primary paths:** `src/cli/print.ts`, `src/cli/structuredIO.ts`, `src/cli/transports/*`, `src/QueryEngine.ts`
`print.ts` implements non-interactive execution: structured stdin lines, streaming stdout (including partial messages), tool permission prompts bridged over the protocol, and verbose/debug modes.
`structuredIO.ts` parses and validates incoming events; transports (`WebSocketTransport`, `SSETransport`, `HybridTransport`, etc.) support remote SDK and CCR-style integrations.
This corresponds to [Headless](https://code.claude.com/docs/en/headless) and Agent SDK usage documented on the Anthropic platform.
**See also:** [Workflows](../workflows.md), [Query loop](query-engine.md).