pub struct ToolSpec {
pub bin_name: &'static str,
pub display_name: &'static str,
pub version: &'static str,
pub license: LicenseType,
pub repo: RepoInfo,
pub supports_json: bool,
pub supports_doctor: bool,
pub supports_update: bool,
pub agent_surface: Option<&'static AgentSurfaceSpec>,
}Expand description
Shared metadata for a CLI binary.
Fields§
§bin_name: &'static strBinary name shown in version output and help text.
display_name: &'static strHuman-readable tool name.
version: &'static strBinary version.
license: LicenseTypeLicense rendered by the shared license command.
repo: RepoInfoRepository metadata used by update helpers.
supports_json: boolWhether the tool supports JSON output in base commands.
supports_doctor: boolWhether the tool exposes doctor checks.
supports_update: boolWhether the tool exposes update support.
agent_surface: Option<&'static AgentSurfaceSpec>Declarative agent-mode surface for the tool.
Implementations§
Source§impl ToolSpec
impl ToolSpec
Sourcepub const fn new(
bin_name: &'static str,
display_name: &'static str,
version: &'static str,
license: LicenseType,
repo: RepoInfo,
supports_json: bool,
supports_doctor: bool,
supports_update: bool,
) -> Self
pub const fn new( bin_name: &'static str, display_name: &'static str, version: &'static str, license: LicenseType, repo: RepoInfo, supports_json: bool, supports_doctor: bool, supports_update: bool, ) -> Self
Create a new ToolSpec.
Sourcepub const fn workspace(
bin_name: &'static str,
display_name: &'static str,
version: &'static str,
license: LicenseType,
supports_json: bool,
supports_doctor: bool,
supports_update: bool,
) -> Self
pub const fn workspace( bin_name: &'static str, display_name: &'static str, version: &'static str, license: LicenseType, supports_json: bool, supports_doctor: bool, supports_update: bool, ) -> Self
Create a new ToolSpec using WORKSPACE_REPO.
Sourcepub const fn with_agent_surface(
self,
agent_surface: &'static AgentSurfaceSpec,
) -> Self
pub const fn with_agent_surface( self, agent_surface: &'static AgentSurfaceSpec, ) -> Self
Attach an agent surface to the tool specification.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolSpec
impl RefUnwindSafe for ToolSpec
impl Send for ToolSpec
impl Sync for ToolSpec
impl Unpin for ToolSpec
impl UnsafeUnpin for ToolSpec
impl UnwindSafe for ToolSpec
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