pub struct ScriptTool { /* private fields */ }Expand description
script: list the scripts, or run one.
Implementations§
Source§impl ScriptTool
impl ScriptTool
Trait Implementations§
Source§impl Tool for ScriptTool
impl Tool for ScriptTool
Source§fn needs_approval(&self, args: &Value) -> bool
fn needs_approval(&self, args: &Value) -> bool
Listing is a read of a directory the user owns, so it is answered without asking even
under ask. This is the only place that says so; [parse] is what decides whether a
call is a listing, so a malformed call that merely mentions list is not one.
Source§fn call_scoped<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
scope: &'life1 CallScope<'life2>,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn call_scoped<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: Value,
scope: &'life1 CallScope<'life2>,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
A run inside a run’s scope gets a tool bridge: the script can call tools with
eclipse tool <name> '{json}', through the same policy and approvals as a direct call.
Same process, same limits — only what it can reach is different.
fn name(&self) -> &str
fn description(&self) -> &str
Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema for the arguments object.
Source§fn describe_call(&self, args: &Value) -> String
fn describe_call(&self, args: &Value) -> String
Human-readable one-liner shown when asking for approval.
fn call<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Forget for ScriptTool
impl Freeze for ScriptTool
impl Move for ScriptTool
impl RefUnwindSafe for ScriptTool
impl Send for ScriptToolwhere
RawVecInner: Send,
impl Sync for ScriptToolwhere
RawVecInner: Sync,
impl Unpin for ScriptTool
impl UnsafeUnpin for ScriptToolwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
impl UnwindSafe for ScriptToolwhere
RawVecInner: UnwindSafe,
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