pub struct OrchestratorRunTool { /* private fields */ }Expand description
Tool for starting or resuming OpenCode sessions.
Handles session creation, prompt/command execution, SSE event monitoring, and permission request detection. Returns when the session completes or when a permission is requested.
Implementations§
Source§impl OrchestratorRunTool
impl OrchestratorRunTool
Sourcepub fn new(server: Arc<OnceCell<OrchestratorServer>>) -> Self
pub fn new(server: Arc<OnceCell<OrchestratorServer>>) -> Self
Create a new OrchestratorRunTool with the given server cell.
Trait Implementations§
Source§impl Clone for OrchestratorRunTool
impl Clone for OrchestratorRunTool
Source§fn clone(&self) -> OrchestratorRunTool
fn clone(&self) -> OrchestratorRunTool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Tool for OrchestratorRunTool
impl Tool for OrchestratorRunTool
Source§const DESCRIPTION: &'static str = r#"Start or resume an OpenCode session. Optionally run a named command or send a raw prompt.
Returns when:
- status=completed: Session finished executing. Response contains final assistant output.
- status=permission_required: Session needs permission approval. Call respond_permission to continue.
- status=question_required: Session needs question answers. Call respond_question to continue.
Parameters:
- session_id: Existing session to resume (omit to create new)
- command: OpenCode command name (e.g., "research", "implement_plan")
- message: Prompt text or $ARGUMENTS for command template
Examples:
- New session with prompt: run(message="explain this code")
- New session with command: run(command="research", message="caching strategies")
- Resume session: run(session_id="...", message="continue")
- Check status: run(session_id="...")"#
const DESCRIPTION: &'static str = r#"Start or resume an OpenCode session. Optionally run a named command or send a raw prompt. Returns when: - status=completed: Session finished executing. Response contains final assistant output. - status=permission_required: Session needs permission approval. Call respond_permission to continue. - status=question_required: Session needs question answers. Call respond_question to continue. Parameters: - session_id: Existing session to resume (omit to create new) - command: OpenCode command name (e.g., "research", "implement_plan") - message: Prompt text or $ARGUMENTS for command template Examples: - New session with prompt: run(message="explain this code") - New session with command: run(command="research", message="caching strategies") - Resume session: run(session_id="...", message="continue") - Check status: run(session_id="...")"#
Human-readable description of what the tool does.
Source§type Input = OrchestratorRunInput
type Input = OrchestratorRunInput
Input type for the tool (no serde bounds required).
Source§type Output = OrchestratorRunOutput
type Output = OrchestratorRunOutput
Output type for the tool (no serde bounds required).
Auto Trait Implementations§
impl Freeze for OrchestratorRunTool
impl !RefUnwindSafe for OrchestratorRunTool
impl Send for OrchestratorRunTool
impl Sync for OrchestratorRunTool
impl Unpin for OrchestratorRunTool
impl UnsafeUnpin for OrchestratorRunTool
impl !UnwindSafe for OrchestratorRunTool
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