1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Chio model-card surface.
//!
//! Signed model cards bind a provider's
//! `(weights_hash, allowed_capability_set, banned_tools, training_data_class)`
//! to a cosign-signed envelope. The kernel refuses to bind a provider whose
//! loaded weights or requested scopes do not match the card.
//!
//! # Trust boundary
//!
//! Every public method that produces an `Ok(_)` result MUST mean the call
//! satisfied the named precondition fully. There is no path through this
//! crate that returns `Ok(_)` on a partial verification: bad inputs return
//! typed error variants that carry stable `urn:chio:error:weights:*` codes
//! from the workspace error-code registry.
//!
//! # Crate surface
//!
//! - `card` -- model card schema and the `ModelCard` type with RFC 8785
//! canonical-JSON encoding.
//! - `bundle` -- cosign bundle helper that consumes
//! [`chio_attest_verify::SigstoreVerifier::verify_bundle`].
//! - `lineage` -- lineage-anchor proof helpers for published model cards.
//!
//! The kernel binding refusal and `chio bind --card` CLI consume this
//! surface from `chio-kernel` and `chio-cli` respectively.
//!
//! # Forbidden constructs
//!
//! No verifier or trust-boundary stubs: this crate forbids `unsafe`,
//! `unwrap`, and `expect` at the lint level.
pub use ;
pub use ;
pub use WeightsError;
pub use ;