Skip to main content

DocApiPreset

Struct DocApiPreset 

Source
pub struct DocApiPreset<'a, I: Invoker> { /* private fields */ }

Implementations§

Source§

impl<'a, I: Invoker> DocApiPreset<'a, I>

Source

pub fn new(invoker: &'a I) -> Self

Source

pub fn dispatch<'call>( &'call self, params: &'call DocPresetDispatchBoundParams, ) -> impl Future<Output = Result<DocPresetDispatchResult>> + Send + 'call

Dispatch an LLM tool call through the named preset’s dispatcher against the active session’s live document. Used by cross-language SDKs (e.g. Python) to proxy preset behavior over the CLI.

Source

pub async fn dispatch_with_options( &self, params: &DocPresetDispatchBoundParams, options: InvokeOptions, ) -> Result<DocPresetDispatchResult>

Dispatch an LLM tool call through the named preset’s dispatcher against the active session’s live document. Used by cross-language SDKs (e.g. Python) to proxy preset behavior over the CLI.

Source

pub fn get_catalog<'call>( &'call self, params: &'call DocPresetGetCatalogBoundParams, ) -> impl Future<Output = Result<DocPresetGetCatalogResult>> + Send + 'call

Return the full tool catalog for an LLM-tools preset (defaults to the registered default preset).

Source

pub async fn get_catalog_with_options( &self, params: &DocPresetGetCatalogBoundParams, options: InvokeOptions, ) -> Result<DocPresetGetCatalogResult>

Return the full tool catalog for an LLM-tools preset (defaults to the registered default preset).

Source

pub fn get_mcp_prompt<'call>( &'call self, params: &'call DocPresetGetMcpPromptBoundParams, ) -> impl Future<Output = Result<DocPresetGetMcpPromptResult>> + Send + 'call

Return the MCP-flavored system prompt for an LLM-tools preset.

Source

pub async fn get_mcp_prompt_with_options( &self, params: &DocPresetGetMcpPromptBoundParams, options: InvokeOptions, ) -> Result<DocPresetGetMcpPromptResult>

Return the MCP-flavored system prompt for an LLM-tools preset.

Source

pub fn get_system_prompt<'call>( &'call self, params: &'call DocPresetGetSystemPromptBoundParams, ) -> impl Future<Output = Result<DocPresetGetSystemPromptResult>> + Send + 'call

Return the SDK-style system prompt for an LLM-tools preset.

Source

pub async fn get_system_prompt_with_options( &self, params: &DocPresetGetSystemPromptBoundParams, options: InvokeOptions, ) -> Result<DocPresetGetSystemPromptResult>

Return the SDK-style system prompt for an LLM-tools preset.

Source

pub fn get_tools<'call>( &'call self, params: &'call DocPresetGetToolsBoundParams, ) -> impl Future<Output = Result<DocPresetGetToolsResult>> + Send + 'call

Return the provider-shaped tool array (openai|anthropic|vercel|generic) for an LLM-tools preset, plus the active cache strategy.

Source

pub async fn get_tools_with_options( &self, params: &DocPresetGetToolsBoundParams, options: InvokeOptions, ) -> Result<DocPresetGetToolsResult>

Return the provider-shaped tool array (openai|anthropic|vercel|generic) for an LLM-tools preset, plus the active cache strategy.

Source

pub fn list<'call>( &'call self, params: &'call DocPresetListBoundParams, ) -> impl Future<Output = Result<DocPresetListResult>> + Send + 'call

List the LLM-tools preset ids registered in the Node SDK preset registry, plus the default preset id.

Source

pub async fn list_with_options( &self, params: &DocPresetListBoundParams, options: InvokeOptions, ) -> Result<DocPresetListResult>

List the LLM-tools preset ids registered in the Node SDK preset registry, plus the default preset id.

Auto Trait Implementations§

§

impl<'a, I> Freeze for DocApiPreset<'a, I>
where &'a I: Freeze,

§

impl<'a, I> RefUnwindSafe for DocApiPreset<'a, I>

§

impl<'a, I> Send for DocApiPreset<'a, I>
where &'a I: Send,

§

impl<'a, I> Sync for DocApiPreset<'a, I>
where &'a I: Sync,

§

impl<'a, I> Unpin for DocApiPreset<'a, I>
where &'a I: Unpin,

§

impl<'a, I> UnsafeUnpin for DocApiPreset<'a, I>

§

impl<'a, I> UnwindSafe for DocApiPreset<'a, I>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.