pub struct TraeAgent { /* private fields */ }Expand description
Trae agent installer.
Implementations§
Trait Implementations§
Source§impl InstructionSurface for TraeAgent
impl InstructionSurface for TraeAgent
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Stable, kebab-case identifier matching
Integration::id for the
same agent.Source§fn supported_instruction_scopes(&self) -> &'static [ScopeKind]
fn supported_instruction_scopes(&self) -> &'static [ScopeKind]
Which scopes this instruction installer accepts.
Source§fn instruction_status(
&self,
scope: &Scope,
name: &str,
expected_owner: &str,
) -> Result<StatusReport, AgentConfigError>
fn instruction_status( &self, scope: &Scope, name: &str, expected_owner: &str, ) -> Result<StatusReport, AgentConfigError>
Detailed installation state for the instruction identified by
name,
scored against expected_owner. Read moreSource§fn plan_install_instruction(
&self,
scope: &Scope,
spec: &InstructionSpec,
) -> Result<InstallPlan, AgentConfigError>
fn plan_install_instruction( &self, scope: &Scope, spec: &InstructionSpec, ) -> Result<InstallPlan, AgentConfigError>
Plan an instruction install without mutating user files. Read more
Source§fn plan_uninstall_instruction(
&self,
scope: &Scope,
name: &str,
owner_tag: &str,
) -> Result<UninstallPlan, AgentConfigError>
fn plan_uninstall_instruction( &self, scope: &Scope, name: &str, owner_tag: &str, ) -> Result<UninstallPlan, AgentConfigError>
Plan an instruction uninstall without mutating user files. Read more
Source§fn install_instruction(
&self,
scope: &Scope,
spec: &InstructionSpec,
) -> Result<InstallReport, AgentConfigError>
fn install_instruction( &self, scope: &Scope, spec: &InstructionSpec, ) -> Result<InstallReport, AgentConfigError>
Install (or update) the instruction. Repeated calls with the same
name and identical content are a no-op after the first. Read more
Source§fn uninstall_instruction(
&self,
scope: &Scope,
name: &str,
owner_tag: &str,
) -> Result<UninstallReport, AgentConfigError>
fn uninstall_instruction( &self, scope: &Scope, name: &str, owner_tag: &str, ) -> Result<UninstallReport, AgentConfigError>
Uninstall the instruction identified by
name, owned by owner_tag.
Returns AgentConfigError::NotOwnedByCaller on owner mismatch. Read moreSource§fn is_instruction_installed(
&self,
scope: &Scope,
name: &str,
) -> Result<bool, AgentConfigError>
fn is_instruction_installed( &self, scope: &Scope, name: &str, ) -> Result<bool, AgentConfigError>
Returns true if an instruction named
name is currently recorded
under any owner in this scope’s ownership ledger. Read moreSource§fn validate_instruction(
&self,
scope: &Scope,
name: &str,
) -> Result<ValidationReport, AgentConfigError>
fn validate_instruction( &self, scope: &Scope, name: &str, ) -> Result<ValidationReport, AgentConfigError>
Validate instruction state without mutating user files. Read more
Source§fn validate_instruction_for_owner(
&self,
scope: &Scope,
name: &str,
expected_owner: Option<&str>,
) -> Result<ValidationReport, AgentConfigError>
fn validate_instruction_for_owner( &self, scope: &Scope, name: &str, expected_owner: Option<&str>, ) -> Result<ValidationReport, AgentConfigError>
Validate instruction state against a caller-supplied expected owner. Read more
Source§impl Integration for TraeAgent
impl Integration for TraeAgent
Source§fn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Human-readable name (e.g.,
"Claude Code").Source§fn supported_scopes(&self) -> &'static [ScopeKind]
fn supported_scopes(&self) -> &'static [ScopeKind]
Which scopes this integration accepts.
Source§fn status(
&self,
scope: &Scope,
tag: &str,
) -> Result<StatusReport, AgentConfigError>
fn status( &self, scope: &Scope, tag: &str, ) -> Result<StatusReport, AgentConfigError>
Detailed installation state for the hook identified by
tag. Read moreSource§fn plan_install(
&self,
scope: &Scope,
spec: &HookSpec,
) -> Result<InstallPlan, AgentConfigError>
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>
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>
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 moreSource§fn uninstall(
&self,
scope: &Scope,
tag: &str,
) -> Result<UninstallReport, AgentConfigError>
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 moreSource§fn is_installed(
&self,
scope: &Scope,
tag: &str,
) -> Result<bool, AgentConfigError>
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 moreSource§fn validate(
&self,
scope: &Scope,
tag: &str,
) -> Result<ValidationReport, AgentConfigError>
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>
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 SkillSurface for TraeAgent
impl SkillSurface for TraeAgent
Source§fn id(&self) -> &'static str
fn id(&self) -> &'static str
Stable, kebab-case identifier matching
Integration::id for the
same agent.Source§fn supported_skill_scopes(&self) -> &'static [ScopeKind]
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>
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 moreSource§fn plan_install_skill(
&self,
scope: &Scope,
spec: &SkillSpec,
) -> Result<InstallPlan, AgentConfigError>
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>
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>
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>
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 moreSource§fn is_skill_installed(
&self,
scope: &Scope,
name: &str,
) -> Result<bool, AgentConfigError>
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 moreSource§fn validate_skill(
&self,
scope: &Scope,
name: &str,
) -> Result<ValidationReport, AgentConfigError>
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>
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
impl Copy for TraeAgent
Auto Trait Implementations§
impl Freeze for TraeAgent
impl RefUnwindSafe for TraeAgent
impl Send for TraeAgent
impl Sync for TraeAgent
impl Unpin for TraeAgent
impl UnsafeUnpin for TraeAgent
impl UnwindSafe for TraeAgent
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