Skip to main content

CursorAgent

Struct CursorAgent 

Source
pub struct CursorAgent { /* private fields */ }
Expand description

Cursor (the AI editor and CLI).

Implementations§

Source§

impl CursorAgent

Source

pub const fn new() -> Self

Construct an instance. The struct is stateless.

Trait Implementations§

Source§

impl Clone for CursorAgent

Source§

fn clone(&self) -> CursorAgent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for CursorAgent

Source§

impl Debug for CursorAgent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CursorAgent

Source§

fn default() -> CursorAgent

Returns the “default value” for a type. Read more
Source§

impl Integration for CursorAgent

Source§

fn id(&self) -> &'static str

Stable, kebab-case identifier (e.g., "claude", "cursor").
Source§

fn display_name(&self) -> &'static str

Human-readable name (e.g., "Claude Code").
Source§

fn supported_scopes(&self) -> &'static [ScopeKind]

Which scopes this integration accepts.
Source§

fn status( &self, scope: &Scope, tag: &str, ) -> Result<StatusReport, AgentConfigError>

Detailed installation state for the hook identified by tag. Read more
Source§

fn plan_install( &self, scope: &Scope, spec: &HookSpec, ) -> Result<InstallPlan, AgentConfigError>

Plan a hook install without mutating user files. Read more
Source§

fn plan_uninstall( &self, scope: &Scope, tag: &str, ) -> Result<UninstallPlan, AgentConfigError>

Plan a hook uninstall without mutating user files. Read more
Source§

fn install( &self, scope: &Scope, spec: &HookSpec, ) -> Result<InstallReport, AgentConfigError>

Install the hook. Repeated calls with the same spec.tag are a no-op after the first (the on-disk state is reached, then preserved). Read more
Source§

fn uninstall( &self, scope: &Scope, tag: &str, ) -> Result<UninstallReport, AgentConfigError>

Uninstall the hook identified by tag. Restores .bak files when removing our content leaves the target file empty or pristine. Read more
Source§

fn is_installed( &self, scope: &Scope, tag: &str, ) -> Result<bool, AgentConfigError>

Returns true if a hook with this tag is currently installed in this scope. Used by CLI consumers to render install/uninstall state. Read more
Source§

fn validate( &self, scope: &Scope, tag: &str, ) -> Result<ValidationReport, AgentConfigError>

Validate hook state without mutating user files. Read more
Source§

fn migrate( &self, _scope: &Scope, _tag: &str, ) -> Result<MigrationReport, AgentConfigError>

Migrate any prior layout produced by an earlier version of the consumer (e.g., remove a legacy shell-script wrapper that has since been superseded by a native binary). Default impl is a no-op. Read more
Source§

impl McpSurface for CursorAgent

Source§

fn id(&self) -> &'static str

Stable, kebab-case identifier matching Integration::id for the same agent (e.g., "claude").
Source§

fn supported_mcp_scopes(&self) -> &'static [ScopeKind]

Which scopes this MCP installer accepts.
Source§

fn mcp_status( &self, scope: &Scope, name: &str, expected_owner: &str, ) -> Result<StatusReport, AgentConfigError>

Detailed installation state for the MCP server identified by name, scored against expected_owner. Read more
Source§

fn plan_install_mcp( &self, scope: &Scope, spec: &McpSpec, ) -> Result<InstallPlan, AgentConfigError>

Plan an MCP server install without mutating user files. Read more
Source§

fn plan_uninstall_mcp( &self, scope: &Scope, name: &str, owner_tag: &str, ) -> Result<UninstallPlan, AgentConfigError>

Plan an MCP server uninstall without mutating user files. Read more
Source§

fn install_mcp( &self, scope: &Scope, spec: &McpSpec, ) -> Result<InstallReport, AgentConfigError>

Install (or update) the MCP server. Repeated calls with the same spec.name and same content are a no-op after the first. Read more
Source§

fn uninstall_mcp( &self, scope: &Scope, name: &str, owner_tag: &str, ) -> Result<UninstallReport, AgentConfigError>

Uninstall the MCP server identified by name, owned by owner_tag. Read more
Source§

fn is_mcp_installed( &self, scope: &Scope, name: &str, ) -> Result<bool, AgentConfigError>

Returns true if a server with name is currently recorded under any owner in this scope’s ownership ledger. Read more
Source§

fn validate_mcp( &self, scope: &Scope, name: &str, ) -> Result<ValidationReport, AgentConfigError>

Validate MCP state without mutating user files. Read more
Source§

fn validate_mcp_for_owner( &self, scope: &Scope, name: &str, expected_owner: Option<&str>, ) -> Result<ValidationReport, AgentConfigError>

Validate MCP state against a caller-supplied expected owner. Read more
Source§

impl SkillSurface for CursorAgent

Source§

fn id(&self) -> &'static str

Stable, kebab-case identifier matching Integration::id for the same agent.
Source§

fn supported_skill_scopes(&self) -> &'static [ScopeKind]

Which scopes this skill installer accepts.
Source§

fn skill_status( &self, scope: &Scope, name: &str, expected_owner: &str, ) -> Result<StatusReport, AgentConfigError>

Detailed installation state for the skill identified by name, scored against expected_owner. See McpSurface::mcp_status for the owner-comparison semantics. Read more
Source§

fn plan_install_skill( &self, scope: &Scope, spec: &SkillSpec, ) -> Result<InstallPlan, AgentConfigError>

Plan a skill install without mutating user files. Read more
Source§

fn plan_uninstall_skill( &self, scope: &Scope, name: &str, owner_tag: &str, ) -> Result<UninstallPlan, AgentConfigError>

Plan a skill uninstall without mutating user files. Read more
Source§

fn install_skill( &self, scope: &Scope, spec: &SkillSpec, ) -> Result<InstallReport, AgentConfigError>

Install (or update) the skill directory and record ownership. Repeated calls with byte-identical contents are a no-op after the first. Read more
Source§

fn uninstall_skill( &self, scope: &Scope, name: &str, owner_tag: &str, ) -> Result<UninstallReport, AgentConfigError>

Uninstall the skill identified by name, owned by owner_tag. Returns AgentConfigError::NotOwnedByCaller on owner mismatch or when the skill exists on disk but is missing from the ledger. Read more
Source§

fn is_skill_installed( &self, scope: &Scope, name: &str, ) -> Result<bool, AgentConfigError>

Returns true if a skill named name is currently recorded in the ownership ledger for this scope. Read more
Source§

fn validate_skill( &self, scope: &Scope, name: &str, ) -> Result<ValidationReport, AgentConfigError>

Validate skill state without mutating user files. Read more
Source§

fn validate_skill_for_owner( &self, scope: &Scope, name: &str, expected_owner: Option<&str>, ) -> Result<ValidationReport, AgentConfigError>

Validate skill state against a caller-supplied expected owner. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.