kintsugi_intercept/lib.rs
1//! Kintsugi interception adapters.
2//!
3//! Three sources, one normalized event. Each adapter turns an agent's proposed
4//! command into a [`kintsugi_core::ProposedCommand`], sends it to the daemon, and
5//! enforces the returned [`kintsugi_core::Verdict`].
6
7#![forbid(unsafe_code)]
8
9pub mod dialect;
10pub mod holdcard;
11pub mod hook;
12pub mod mcp;
13pub mod observe;
14pub mod shim;
15
16/// One trait, three impls (shim, hook, MCP). Each normalizes a source and runs.
17pub trait Adapter {
18 /// Stable name of the adapter, e.g. `"shim"`, `"claude-code"`, `"mcp"`.
19 fn name(&self) -> &'static str;
20 /// Run the adapter. Long-running for hook/MCP servers; one-shot for the shim.
21 fn run(&self) -> anyhow::Result<()>;
22}
23
24pub const VERSION: &str = env!("CARGO_PKG_VERSION");