Skip to main content

Crate klasp_core

Crate klasp_core 

Source
Expand description

klasp-core — public traits, types, and protocol for klasp.

This crate is the v0.3 plugin-API contract surface. The trait shapes, type signatures, and constants exposed here are committed at v0.1; v0.2 and v0.3 add capabilities by introducing new impls, not by mutating these definitions.

See docs/design.md §3 for the rationale behind each abstraction.

Re-exports§

pub use config::CheckConfig;
pub use config::CheckSourceConfig;
pub use config::ConfigV1;
pub use config::GateConfig;
pub use config::TriggerConfig;
pub use config::CONFIG_VERSION;
pub use error::KlaspError;
pub use error::Result;
pub use protocol::GateError;
pub use protocol::GateInput;
pub use protocol::GateProtocol;
pub use protocol::ToolInput;
pub use protocol::GATE_SCHEMA_VERSION;
pub use source::CheckResult;
pub use source::CheckSource;
pub use source::CheckSourceError;
pub use source::RepoState;
pub use surface::AgentSurface;
pub use surface::InstallContext;
pub use surface::InstallError;
pub use surface::InstallReport;
pub use trigger::GitEvent;
pub use trigger::Trigger;
pub use verdict::Finding;
pub use verdict::Severity;
pub use verdict::Verdict;
pub use verdict::VerdictPolicy;

Modules§

config
klasp.toml config — version = 1 schema.
error
KlaspError — typed error hierarchy for the core crate.
protocol
Gate wire protocol — versioned, env-var-keyed.
source
CheckSource — abstraction over a runnable check.
surface
AgentSurface — abstraction over an AI-agent integration surface.
trigger
Trigger pattern matching for git commit/push.
verdict
Verdict — three-tier outcome of a check run, plus aggregation policies.