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
//! Terminal Block Protocol (TBP) v1: wire types and codec.
//!
//! TBP is an OSC escape sequence carrying a MIME bundle, directly inspired by
//! Jupyter's `display_data` message. A tool emits a block as one escape; the
//! terminal selects the richest MIME representation it can render and falls back
//! toward `text/plain`. Terminals that do not understand TBP ignore the escape.
//!
//! The wire form is documented normatively in
//! `docs/terminal-block-protocol-spec.md`; this crate is its reference codec.
//! See [`encode`] and [`decode`] for the byte-stream entry points.
pub use ;
pub use Caps;
pub use ;
pub use TrustTier;
pub use ;
// ============================================================================
// Constants
// ============================================================================
/// Protocol version this crate emits and is the highest it accepts.
pub const PROTOCOL_VERSION: Version = Version;
/// Private-use OSC number that frames every TBP message. Provisional; the final
/// number is coordinated with other terminals before 1.0.
pub const OSC_NUMBER: u32 = 9001;
// ============================================================================
// Data Structures
// ============================================================================
/// TBP protocol version. Wire form is a bare integer.
;
/// Identifier correlating live-block updates (`open`/`patch`/`close`) and
/// distinguishing concurrent blocks within one session.
;
// ============================================================================
// Version
// ============================================================================
// ============================================================================
// Tests
// ============================================================================