Entry point for querying the Claude Code CLI with ZIO.
query streams messages as the CLI produces them; querySync and queryResult are convenience collectors. session opens a scoped multi-turn conversation. All operations fail with a typed CLIError.
Open a scoped session backed by a long-lived CLI process.
Open a scoped session backed by a long-lived CLI process.
When archive is set, the session mirrors the vendor transcript tree after each real result and on close — best-effort, so a mirror failure is logged and never breaks the session. Closing the session waits for the final mirror, bounded by works.iterative.claude.zio.internal.cli.SessionArchiveHook.CloseMirrorTimeout (after which it logs a warning and moves on). eventsBufferSize sizes the lossy events Hub (see Session.events); the default is conservative.