pub struct ClaudeCodeRuntimeBackend { /* private fields */ }Expand description
Claude Code live-runtime backend using bidirectional stream-json print mode with supercode registered as the CLI’s permission handler.
It can create/resume sessions, cancel the running turn through the stream-json control channel, and answer the permission requests the CLI raises while a tool call is blocked.
Implementations§
Source§impl ClaudeCodeRuntimeBackend
impl ClaudeCodeRuntimeBackend
Sourcepub fn new() -> Self
pub fn new() -> Self
Use claude from PATH in bidirectional stream-json mode, with
supercode registered as the permission handler.
Sourcepub fn launch(&self) -> &RuntimeLaunch
pub fn launch(&self) -> &RuntimeLaunch
The command prefix this backend launches: what the registry publishes
as default_launch, so a caller that hands the published launch back
(the orchestrator does) gets stream-json mode and not the interactive
TUI blocked on a pipe.
Sourcepub fn with_launch(launch: RuntimeLaunch) -> Self
pub fn with_launch(launch: RuntimeLaunch) -> Self
Use an explicit Claude Code stream-json command prefix.
Sourcepub fn with_permission_timeout(self, timeout: Duration) -> Self
pub fn with_permission_timeout(self, timeout: Duration) -> Self
Override how long an unanswered permission request is held before this adapter denies it on the caller’s behalf.
See [CLAUDE_PERMISSION_RESPONSE_TIMEOUT] for the default and what it
was measured against.
Trait Implementations§
Source§impl Clone for ClaudeCodeRuntimeBackend
impl Clone for ClaudeCodeRuntimeBackend
Source§fn clone(&self) -> ClaudeCodeRuntimeBackend
fn clone(&self) -> ClaudeCodeRuntimeBackend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more