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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
//! Shared trusty splash art + per-glyph shading (issue #3326).
//!
//! Why: the compact block-robot "TRUSTY" wordmark art was previously owned
//! solely by the `tm` binary (`trusty-mpm/src/bin/tm/formatters/banner/`),
//! so `trusty-agents`' REPL startup splash drifted onto its own unrelated
//! glyphs over time. Centralising the art text and its per-character color
//! mapping here gives every trusty-* binary one source of truth: `tm`'s
//! raw-ANSI launch banner and `trusty-agents`' ratatui REPL splash both read
//! from this module, so a future art update lands in both places at once
//! instead of being copy-pasted (and inevitably drifting again).
//! What: [`TRUSTY_SPLASH_ART`] (the embedded ASCII/block-art text) and
//! [`shade_bucket`] (glyph → amber/rust RGB triple). Deliberately
//! dependency-free — a `&str` constant plus a pure `match` — so depending on
//! it never pulls an extra crate into either binary's build. Each consumer
//! owns its own *rendering* (raw ANSI escapes for `tm`'s terminal output,
//! `ratatui::style::Color::Rgb` spans for `trusty-agents`' TUI) — only the
//! art data and the color-bucket rule are shared.
//! Test: `splash_art_is_nonempty`, `splash_art_contains_wordmark_glyphs`,
//! `shade_bucket_buckets_block_glyphs_amber`,
//! `shade_bucket_default_bucket_for_unclassified_glyph` below.
/// Embedded trusty splash art: three compact block-robot faces plus the
/// dot-matrix "TRUSTY" wordmark.
///
/// Why: single source of truth for the trusty brand splash, shared by `tm`'s
/// launch/connect banner and `trusty-agents`' REPL startup splash (#3326) so
/// the two binaries can never silently diverge again.
/// What: the raw ASCII/block-drawing text, byte-identical to what `tm`
/// previously shipped as its own embedded `image.txt` default.
/// Test: `splash_art_is_nonempty`, `splash_art_contains_wordmark_glyphs`.
pub const TRUSTY_SPLASH_ART: &str = include_str!;
/// Map a glyph to its rust-palette RGB triple.
///
/// Why: bot outline chars should appear bright amber so the compact robot
/// faces read clearly against a dark terminal background; accent glyphs use
/// mid-rust to add depth without competing with the main structure. The
/// splash renders everything — robot faces and the block-letter `TRUSTY`
/// wordmark — in a single amber/orange tone against black, so the wordmark
/// strokes join the same bright-amber bucket as the robot glyphs rather than
/// falling through to the darker "unclassified" default.
/// What: five buckets —
/// • amber `(224,140,60)`: block, half-block, and face glyphs used in the
/// current compact-splash art (`▄ ▀ █ ▓ ▌ ▐ ▟ ▙`), face glyphs
/// (`◉ ◔ ◕ • ◡ ▿ ⌣ ● ◻ ^ ⢀ ✲ ⡀`) from current and legacy `tm` art, plus
/// the dot-matrix wordmark pixel (`▪`), box-drawing head-outline chars
/// (`┌ ─ ┐ │ └ ┘ ┬ ┴ ├ ┤ ╷ ╵ ╶ ╴`), and `«…»` guillemets retained from a
/// superseded `tm` giant-robot generation so a not-yet-refreshed stale
/// seed still renders correctly;
/// • mid-rust `(205,100,30)`: medium-ink marks;
/// • dark rust `(120,50,10)`: fine punctuation marks;
/// • base rust `(183,65,14)`: everything else.
/// Test: `shade_bucket_buckets_block_glyphs_amber`,
/// `shade_bucket_default_bucket_for_unclassified_glyph`.