pub struct RemoteWorkspaceService { /* private fields */ }Expand description
Agent service implementation that executes tools locally
This service receives tool execution requests via gRPC and executes them using the standard tool executor. It’s designed to run on remote machines, VMs, or containers to provide remote tool execution capabilities.
Implementations§
Source§impl RemoteWorkspaceService
impl RemoteWorkspaceService
Sourcepub fn new(working_dir: PathBuf) -> Result<Self, ToolError>
pub fn new(working_dir: PathBuf) -> Result<Self, ToolError>
Create a new RemoteWorkspaceService with the standard tool set
Sourcepub fn with_tools(
tools_list: Vec<Box<dyn ExecutableTool>>,
working_dir: PathBuf,
) -> Result<Self, ToolError>
pub fn with_tools( tools_list: Vec<Box<dyn ExecutableTool>>, working_dir: PathBuf, ) -> Result<Self, ToolError>
Create a new RemoteWorkspaceService with a custom set of tools
Sourcepub fn get_supported_tools(&self) -> Vec<String>
pub fn get_supported_tools(&self) -> Vec<String>
Get the supported tools from the tool executor
Trait Implementations§
Source§impl RemoteWorkspaceService for RemoteWorkspaceService
impl RemoteWorkspaceService for RemoteWorkspaceService
Source§fn get_tool_schemas<'life0, 'async_trait>(
&'life0 self,
_request: Request<GetToolSchemasRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetToolSchemasResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_tool_schemas<'life0, 'async_trait>(
&'life0 self,
_request: Request<GetToolSchemasRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetToolSchemasResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get tool schemas
Source§fn execute_tool<'life0, 'async_trait>(
&'life0 self,
request: Request<ExecuteToolRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ExecuteToolResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_tool<'life0, 'async_trait>(
&'life0 self,
request: Request<ExecuteToolRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ExecuteToolResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a tool call on the agent
Source§fn get_agent_info<'life0, 'async_trait>(
&'life0 self,
_request: Request<GetAgentInfoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetAgentInfoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_agent_info<'life0, 'async_trait>(
&'life0 self,
_request: Request<GetAgentInfoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetAgentInfoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get information about the agent and available tools
Source§fn health<'life0, 'async_trait>(
&'life0 self,
_request: Request<HealthRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HealthResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health<'life0, 'async_trait>(
&'life0 self,
_request: Request<HealthRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HealthResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check
Source§fn get_tool_approval_requirements<'life0, 'async_trait>(
&'life0 self,
request: Request<GetToolApprovalRequirementsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetToolApprovalRequirementsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_tool_approval_requirements<'life0, 'async_trait>(
&'life0 self,
request: Request<GetToolApprovalRequirementsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetToolApprovalRequirementsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get tool approval requirements
Source§fn get_environment_info<'life0, 'async_trait>(
&'life0 self,
request: Request<GetEnvironmentInfoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetEnvironmentInfoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_environment_info<'life0, 'async_trait>(
&'life0 self,
request: Request<GetEnvironmentInfoRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetEnvironmentInfoResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get environment information for the remote workspace
Source§fn list_files<'life0, 'async_trait>(
&'life0 self,
request: Request<ListFilesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListFilesStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_files<'life0, 'async_trait>(
&'life0 self,
request: Request<ListFilesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListFilesStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List files in the workspace for fuzzy finding
Source§type ListFilesStream = ReceiverStream<Result<ListFilesResponse, Status>>
type ListFilesStream = ReceiverStream<Result<ListFilesResponse, Status>>
Server streaming response type for the ListFiles method.
Auto Trait Implementations§
impl Freeze for RemoteWorkspaceService
impl !RefUnwindSafe for RemoteWorkspaceService
impl Send for RemoteWorkspaceService
impl Sync for RemoteWorkspaceService
impl Unpin for RemoteWorkspaceService
impl !UnwindSafe for RemoteWorkspaceService
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request