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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//! The §11 role stripe — who a message-bearing row speaks for, said once, at
//! the row's left edge, in one hue per role.
//!
//! The operator's ask (bl-3acb, verbatim): *"It needs to be easier to visually
//! discern user input and llm response, and other forms of inbox item."* The
//! answer is ONE mechanism applied uniformly — a thin vertical stripe on the
//! row's left edge — never a different trick per kind, and one mapping worn by
//! both seats that show a message: the transcript's rows and the
//! inbox-composer's pending queue. A message from a given author looks the
//! same pending as it does delivered, because both seats read this file and
//! neither restates a hue or a derivation.
//!
//! **The role is what the committed bytes say, never what the content reads
//! like.** In `.md` sender space the token `user` is reserved for the operator
//! (ARCH §2.11), an `epitaph:` marks a result deposit (§2.6), and any other
//! sender is a peer; model output is the `.json` model-id origin and the live
//! tail. [`message_role`] is the one spelling of that derivation, over each
//! seat's own sender authority (the filename token in the transcript, the
//! frontmatter `from:` in the queue — one deposit format, so they agree).
//!
//! **No hue is minted** (§11 single colour authority): gate violet is yog's
//! own — the operator's hand at the gate; spectral blue already means "a model
//! call producing text" (the live tail, the `InFlight` badge); brazen bronze is
//! the hue yog wears for *another agent's* doing (pending mail, the subagent
//! badge); and its tarnish is already "finished for now" (`Quiescent`) — a
//! child whose result deposit is its ending. The stripe paints no glyph, so
//! per the §11 glyph doctrine the words ride the mapping ([`role_badge`], the
//! `doing_badge` pair shape) and every stripe hovers them.
use ;
/// The reserved `.md` sender token naming the operator (ARCH §2.11: "In `.md`
/// sender space `user` stays reserved").
const USER_SENDER: &str = "user";
/// The stripe's width in points — enough hue to read at a glance, thin enough
/// to stay an edge and not a column.
const STRIPE_WIDTH: f32 = 3.0;
/// Who a message-bearing row speaks for — the closed §11 role vocabulary,
/// derived from committed bytes only (the sender token, the epitaph field, the
/// `.json` origin class). Machinery rows (thinking, tool calls, tool results,
/// raw bytes, turn rollups) have no role: nobody is speaking.
/// The role of a delivered/pending message, from the two facts its bytes
/// assert: who sent it and whether it carries an `epitaph:`. The epitaph wins
/// — a result deposit is a kind before it is a sender — then the reserved
/// `user` token, then the peer catch-all (the general path, so an absent or
/// unknown sender reads as third-party mail, never as the operator).
/// Hue + **the role said in words** — the badge-seat pair ([`super::badges`]'s
/// `doing_badge` shape: the stripe paints no glyph, so the words back the hue
/// on hover). Total over the enum, so a new role cannot ship wordless.
/// Paint the role stripe seat at the row's left edge: the role's hue with its
/// words on hover, or a blank spacer of the same width when nobody is speaking
/// — every row allocates the seat, so the toggles beside it stay aligned.