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 list;
16pub mod observation;
17pub mod pin;
18pub mod retrieval;
19pub mod summary;
20
21pub use capability::{
22    build_capability, kind_registry, supported_kind_names, Capability, KindRegistryEntry,
23    OBSERVATION_REQUIRED_FIELDS,
24};
25pub use capsule::{Capsule, CapsuleInput, CapsuleStatus, CapsuleType};
26pub use common::{Id, ScopeIds, Timestamp, ValidationError};
27pub use list::{ListObservationsRequest, ListObservationsResult};
28pub use observation::{Observation, ObservationInput, ObservationKind};
29pub use pin::{is_pin_active, Pin, PinInput, PinTargetType};
30pub use retrieval::{
31    CandidateResult, PinResult, ProviderSearchOptions, ProviderSearchResult, RetrieveOptions,
32    RetrieveProvenance, RetrieveResult, RetrievedEntity,
33};
34pub use summary::{is_valid_confidence, Summary, SummaryInput};