Skip to main content

klasp_core/
lib.rs

1//! `klasp-core` — public traits, types, and protocol for klasp.
2//!
3//! This crate is the v0.3 plugin-API contract surface. The trait shapes,
4//! type signatures, and constants exposed here are committed at v0.1; v0.2
5//! and v0.3 add capabilities by introducing new impls, not by mutating
6//! these definitions.
7//!
8//! See [`docs/design.md`](https://github.com/klasp-dev/klasp/blob/main/docs/design.md)
9//! §3 for the rationale behind each abstraction.
10
11pub mod config;
12pub mod error;
13pub mod protocol;
14pub mod source;
15pub mod surface;
16pub mod trigger;
17pub mod verdict;
18
19pub use config::{
20    discover_config_for_path, load_config_for_path, CheckConfig, CheckSourceConfig, ConfigV1,
21    GateConfig, TriggerConfig, CLAUDE_PROJECT_DIR_ENV, CONFIG_VERSION,
22};
23pub use error::{KlaspError, Result};
24pub use protocol::{GateError, GateInput, GateProtocol, ToolInput, GATE_SCHEMA_VERSION};
25pub use source::{CheckResult, CheckSource, CheckSourceError, RepoState};
26pub use surface::{AgentSurface, InstallContext, InstallError, InstallReport};
27pub use trigger::{GitEvent, Trigger};
28pub use verdict::{Finding, Severity, Verdict, VerdictPolicy};