Skip to main content

gwk_tui/
lib.rs

1//! The GridWork terminal console — the thin client half.
2//!
3//! **Five lenses exist.** The [`queue`] — the workday screen — the [`board`]
4//! — the task/attempt DAG and the A2A message flow — [`hall`] — the estate
5//! frame, a deterministic spatial layout over caller-normalized facts (the
6//! live projection/event join lives in [`estate`], the terminal loop in
7//! [`runtime`]) — and [`config`] — the four-file git-backed reconciler — sit
8//! beside [`drilldown`], the hosted session's styled-cell view.
9//! Beneath the lenses sits the substrate they consume: [`theme`], the
10//! one function that turns a resolved token into a renderer colour;
11//! [`probe`], which measures what the drawing terminal does with the glyph
12//! inventory; and [`input`], the session bracket, click hit-testing, and the
13//! OSC 52 copy path. Beside them sits [`seven_act`]: the phase lifecycle as
14//! client-side template data over the kernel's generic tasks and gates —
15//! a convention the demonstration walks, not a domain object.
16//!
17//! # What the crate is
18//!
19//! A client. It talks to the kernel over the UDS and consumes engine frames as
20//! **wire data**: the PTY sessions and the engine adapters live server-side in
21//! a separate host crate, and this one never links `gwk-pty`. That is what
22//! makes attach-from-anywhere fall out rather than needing to be built — a
23//! console that owned its own PTY could only ever show the sessions on the box
24//! it happens to be running on.
25//!
26//! The invariant is asserted in CI (`cargo tree -p gwk-tui` carries no
27//! `gwk-pty` or `libghostty`) with a positive control, because an invariant
28//! nothing checks is a sentence in a doc comment.
29//!
30//! # `src/workspace/`
31//!
32//! The multiplexer work — panes, layout, detach/reattach routing — lands under
33//! `src/workspace`, which is under the clean-room gate (`CLEANROOM.md` rule 2,
34//! `.github/cleanroom-paths.txt`). Its structural floor is in place: the
35//! workspace/tab/split-pane model with create/navigate/resize/close, its
36//! geometry solver, and the furniture painting that consumes [`chrome`]. The
37//! wire half holds session content in durable panes, multiplexes the active
38//! tab's attaches on one bounded socket, and routes pane input. The rest of
39//! this crate is lens code and is deliberately outside
40//! the gate: the gate follows the risk, not the directory tree.
41//!
42//! [`chrome`] is the demonstration of that sentence. It themes the workspace's
43//! own furniture and is named for it, and it still sits **outside** the gated
44//! prefix — because rule 2 is a category test, not a directory test, and a
45//! table mapping a chrome role to a ratified colour token supervises no
46//! process and emits no terminal byte. Filing it under `src/workspace/`
47//! would have gated it by path regardless of its category, which is exactly
48//! the directory-tree reading rule 2 rejects.
49
50pub mod board;
51pub mod chrome;
52pub mod config;
53pub mod console;
54pub mod drilldown;
55pub mod estate;
56pub mod hall;
57pub mod input;
58pub mod probe;
59pub mod queue;
60pub mod replay;
61pub mod row;
62pub mod runtime;
63pub mod seven_act;
64pub mod shell;
65pub mod tables;
66pub mod theme;
67pub mod workspace;