Expand description
Kaptein view-model: the renderer-agnostic domain layer (the product).
This crate owns all semantics — columns, sorting, filtering, status inference, permission decisions, and action graphs. The frontends (TUI, GUI, headless, serve) consume the render contract defined here and own only geometry.
See ADR-0005 (docs/adr/0005-render-intent-three-layers.md) for the three-layer
model this crate implements.
Re-exports§
pub use audit::Actor;pub use audit::ActorKind;pub use audit::AuditEvent;pub use audit::Operation;pub use audit::Outcome;pub use audit::ResourceRef;pub use audit::Source;pub use diff::DiffLine;pub use diff::UnifiedDiff;pub use diff::render_unified;pub use diff::unified_diff;pub use error::Error;pub use fuzzy::FuzzyMatch;pub use fuzzy::fuzzy_jump;pub use lens::ConditionRule;pub use lens::GroupVersionKind;pub use lens::LENS_SCHEMA_VERSION;pub use lens::LensAction;pub use lens::RuleOp;pub use lens::StatusRule;pub use lens::ViewDefinition;pub use lens::evaluate_status;pub use lens::render_row;pub use lens::validate_viewdef;pub use logparse::LogCell;pub use logparse::ParsedLogLine;pub use logparse::infer_columns;pub use logparse::parse_json_line;pub use logparse::parse_log_stream;pub use mem_plane::MemPlane;pub use mem_plane::Schema;pub use render::Cell;pub use render::DataPlane;pub use render::Filter;pub use render::Page;pub use render::Query;pub use render::Revision;pub use render::Row;pub use render::RowId;pub use render::RowPatch;pub use render::SortSpec;pub use render::StatusLevel;pub use semantic::Action;pub use semantic::ActionState;pub use semantic::Status;pub use sink::AuditConfig;pub use sink::AuditSink;pub use surface::Column;pub use surface::ColumnKind;pub use surface::EditorMode;pub use surface::Field;pub use surface::FieldKind;pub use surface::Projection;pub use surface::SupportLevel;pub use surface::Surface;pub use surface::SurfaceKind;pub use surface::support_level;pub use table::cell_text;pub use table::cmp_cells;pub use table::filter_rows;pub use table::sort_rows;pub use versioned::ApiVersion;pub use versioned::MCP_API_VERSION;pub use versioned::MCP_VERSION_META_KEY;pub use versioned::is_compatible;pub use versioned::parse_api_version;
Modules§
- audit
- The single write-audit record: one format, two consumers.
- diff
- Unified diff — “diff before apply” (M1.3).
- error
- The unified error enum for the view-model.
- fuzzy
- Fuzzy matching — the “fuzzy jump” semantic (M1.2).
- lens
- View-definition (lens) schema — the declarative, data-first extension tier (ADR-0004 tier 1, ADR-0012).
- logparse
- Log-line parsing — “JSON → columns” (M1.2).
- mem_
plane - An in-memory
DataPlane— the first concrete implementation of the render contract (ADR-0005), used by tests, fixtures, and the time-machine replay. It is wasm-pure (nokube/tokio), so the browser UI shares it with the native frontends. - render
- Layer 1 — the data plane.
- semantic
- Layer 2 — the semantic layer.
- sink
- The optional audit sink.
- surface
- Layer 3 — surface kinds.
- table
- Table-query semantics — the renderer-agnostic sort/filter that every
DataPlaneimplementation shares (ADR-0005). - versioned
- Contract-version enforcement (see
docs/versioning.md).