Skip to main content

kindling_types/
lib.rs

1//! Canonical kindling domain types.
2//!
3//! This crate is the source of truth for the wire-format shapes shared between
4//! the Rust implementation and TypeScript consumers. Each public type
5//! round-trips through the JSON encoding produced by the existing TypeScript
6//! definitions in `packages/kindling-core/src/types/`.
7//!
8//! Enable the `ts-rs` feature to derive the TypeScript projection — running
9//! `cargo test -p kindling-types --features ts-rs` writes the corresponding
10//! `.ts` files into `crates/kindling-types/bindings/`.
11
12pub mod capability;
13pub mod capsule;
14pub mod common;
15pub mod observation;
16pub mod pin;
17pub mod retrieval;
18pub mod summary;
19
20pub use capability::{
21    build_capability, kind_registry, supported_kind_names, Capability, KindRegistryEntry,
22    OBSERVATION_REQUIRED_FIELDS,
23};
24pub use capsule::{Capsule, CapsuleInput, CapsuleStatus, CapsuleType};
25pub use common::{Id, ScopeIds, Timestamp, ValidationError};
26pub use observation::{Observation, ObservationInput, ObservationKind};
27pub use pin::{is_pin_active, Pin, PinInput, PinTargetType};
28pub use retrieval::{
29    CandidateResult, PinResult, ProviderSearchOptions, ProviderSearchResult, RetrieveOptions,
30    RetrieveProvenance, RetrieveResult, RetrievedEntity,
31};
32pub use summary::{is_valid_confidence, Summary, SummaryInput};