pub struct OrchaContext { /* private fields */ }Expand description
Orcha context for tracking orchestration events in arbor
Implementations§
Source§impl OrchaContext
impl OrchaContext
Sourcepub async fn new(
arbor: Arc<ArborStorage>,
session_id: String,
task: String,
model: String,
) -> Result<Self, String>
pub async fn new( arbor: Arc<ArborStorage>, session_id: String, task: String, model: String, ) -> Result<Self, String>
Create a new Orcha context with an arbor tree
Sourcepub async fn claude_session_created(
&self,
claude_session_id: String,
session_name: String,
)
pub async fn claude_session_created( &self, claude_session_id: String, session_name: String, )
Record that a Claude Code session was created
Sourcepub async fn prompt_created(&self, prompt: String, retry_count: u32)
pub async fn prompt_created(&self, prompt: String, retry_count: u32)
Record that a prompt was sent to Claude
Sourcepub async fn claude_session_complete(&self, claude_session_id: String)
pub async fn claude_session_complete(&self, claude_session_id: String)
Record that Claude session completed
Sourcepub async fn validation_started(&self, test_command: String, cwd: String)
pub async fn validation_started(&self, test_command: String, cwd: String)
Record that validation started
Sourcepub async fn validation_result(&self, success: bool, output: String)
pub async fn validation_result(&self, success: bool, output: String)
Record validation result
Sourcepub async fn session_complete(&self, status: &str)
pub async fn session_complete(&self, status: &str)
Record session completion
Sourcepub async fn tool_use(
&self,
tool_name: String,
tool_use_id: String,
input: String,
)
pub async fn tool_use( &self, tool_name: String, tool_use_id: String, input: String, )
Record a tool use event
Sourcepub async fn tool_result(
&self,
tool_use_id: String,
output: String,
is_error: bool,
)
pub async fn tool_result( &self, tool_use_id: String, output: String, is_error: bool, )
Record a tool result
Sourcepub async fn claude_output(&self, text: String)
pub async fn claude_output(&self, text: String)
Record Claude’s text output
Auto Trait Implementations§
impl !Freeze for OrchaContext
impl !RefUnwindSafe for OrchaContext
impl Send for OrchaContext
impl Sync for OrchaContext
impl Unpin for OrchaContext
impl UnsafeUnpin for OrchaContext
impl !UnwindSafe for OrchaContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more