Skip to main content

kaptein_viewmodel/
lib.rs

1//! Kaptein view-model: the renderer-agnostic domain layer (the product).
2//!
3//! This crate owns all *semantics* — columns, sorting, filtering, status inference,
4//! permission decisions, and action graphs. The frontends (TUI, GUI, headless, serve)
5//! consume the render contract defined here and own only *geometry*.
6//!
7//! See ADR-0005 (`docs/adr/0005-render-intent-three-layers.md`) for the three-layer
8//! model this crate implements.
9
10#![forbid(unsafe_code)]
11
12pub mod audit;
13pub mod error;
14pub mod fuzzy;
15pub mod render;
16pub mod semantic;
17pub mod sink;
18pub mod surface;
19
20pub use audit::{Actor, ActorKind, AuditEvent, Operation, Outcome, ResourceRef, Source};
21pub use error::Error;
22pub use fuzzy::{FuzzyMatch, fuzzy_jump};
23pub use render::{
24    Cell, DataPlane, Filter, Page, Query, Revision, Row, RowId, RowPatch, SortSpec, StatusLevel,
25};
26pub use semantic::{Action, ActionState, Status};
27pub use sink::{AuditConfig, AuditSink};
28pub use surface::{
29    Column, ColumnKind, EditorMode, Field, FieldKind, Projection, SupportLevel, Surface,
30    SurfaceKind, support_level,
31};
32
33#[cfg(test)]
34mod contract_tests;