pub enum Dialect {
Claude,
Qwen,
Gemini,
Copilot,
Cursor,
OpenCode,
Codex,
}Expand description
Which agent CLI’s hook protocol to speak.
Variants§
Implementations§
Source§impl Dialect
impl Dialect
Sourcepub fn from_agent(s: &str) -> Option<Self>
pub fn from_agent(s: &str) -> Option<Self>
Map an --agent value to a dialect. Accepts the CLI’s stable id.
Sourcepub fn agent_id(self) -> &'static str
pub fn agent_id(self) -> &'static str
The agent tag stamped onto the kintsugi_core::ProposedCommand so the
log and TUI attribute the command to the right CLI.
Sourcepub fn parse(self, input: &str) -> Parsed
pub fn parse(self, input: &str) -> Parsed
Parse one CLI’s hook payload into a normalized command.
Sourcepub fn format(self, resolved: &Resolved) -> HookOutcome
pub fn format(self, resolved: &Resolved) -> HookOutcome
Serialize a resolved decision into this CLI’s stdout protocol.
Sourcepub fn pass(self) -> HookOutcome
pub fn pass(self) -> HookOutcome
The “allow / no opinion” output used on the fail-open path and for SAFE commands. Most CLIs treat empty output as “proceed normally”; Cursor’s beforeShellExecution gate is answered with an explicit allow.
Trait Implementations§
impl Copy for Dialect
impl Eq for Dialect
impl StructuralPartialEq for Dialect
Auto Trait Implementations§
impl Freeze for Dialect
impl RefUnwindSafe for Dialect
impl Send for Dialect
impl Sync for Dialect
impl Unpin for Dialect
impl UnsafeUnpin for Dialect
impl UnwindSafe for Dialect
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.