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 render;
15pub mod semantic;
16pub mod sink;
17pub mod surface;
18
19pub use audit::{Actor, ActorKind, AuditEvent, Operation, Outcome, ResourceRef, Source};
20pub use error::Error;
21pub use render::{
22    Cell, DataPlane, Filter, Page, Query, Revision, Row, RowId, RowPatch, SortSpec, StatusLevel,
23};
24pub use semantic::{Action, ActionState, Status};
25pub use sink::{AuditConfig, AuditSink};
26pub use surface::{
27    Column, ColumnKind, EditorMode, Field, FieldKind, Projection, SupportLevel, Surface,
28    SurfaceKind, support_level,
29};
30
31#[cfg(test)]
32mod contract_tests;