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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
//! Collection-native Mail ontology.
//!
//! Mail is an immutable evidence/intent ledger. Accounts are stable authored
//! anchors with intrinsic full-state configuration snapshots. Wire messages,
//! source observations, parser projections, drafts, send attempts, SMTP
//! acceptances, and read observations are all intrinsic values. Nothing in
//! this schema is a mutable mailbox row or a latest-write-wins pointer.
use ;
use *;
/// Stable extrinsic scope of the authored Mail collection.
///
/// Minted with `trible genid` on 2026-08-08.
pub const DEFAULT_SCOPE_ID: Id = id_hex!;
// Every native id below was minted with `trible genid` for the recovered Mail
// collection lineage on 2026-08-08; the invocation transcript is retained in
// commit history. Its attribute literals predate encoding-derived anchor
// semantics and are therefore deliberately pinned with `unsafe as`: they are
// established byte identities being preserved, not new anchors minted by this
// cutover.
pub const KIND_MAIL_ACCOUNT: Id = id_hex!;
pub const KIND_ACCOUNT_CONFIG: Id = id_hex!;
pub const KIND_WIRE_MESSAGE: Id = id_hex!;
pub const KIND_POP_OBSERVATION: Id = id_hex!;
pub const KIND_OUTGOING_OBSERVATION: Id = id_hex!;
pub const KIND_PARSED_PROJECTION: Id = id_hex!;
pub const KIND_ATTACHMENT_OCCURRENCE: Id = id_hex!;
pub const KIND_DRAFT_INTENT: Id = id_hex!;
pub const KIND_SEND_ATTEMPT: Id = id_hex!;
pub const KIND_SMTP_ACCEPTANCE: Id = id_hex!;
/// A persona opened one resident wire value. This evidence is independent of
/// direction; inbox unread state is the inbound-only projection over it.
pub const KIND_READ_OBSERVATION: Id = id_hex!;
/// Immutable observation recovered from the stopped-world legacy Mail DAG.
///
/// Unlike POP and outgoing observations, an imported observation claims no
/// transport coordinates which the old ledger did not record. Its exact old
/// semantic record is carried as a canonical `SimpleArchive`, with direction
/// made explicit at the import boundary.
///
/// Minted with `trible genid` on 2026-08-09.
pub const KIND_IMPORTED_OBSERVATION: Id = id_hex!;
/// Canonical parser recipe used by this implementation. A recipe change is
/// a new derivation, never an in-place reinterpretation of old evidence.
pub const RECIPE_RFC5322_V1: Id = id_hex!;
// Historical Mail vocabulary retained inside `imported::payload`, in the
// additive top-level source evidence, and as explicit direction values. These
// ids were minted by the original schema; native Mail never emits them.
pub const LEGACY_KIND_MESSAGE: Id = id_hex!;
pub const LEGACY_KIND_SPAM: Id = id_hex!;
pub const IMPORT_DRAFT: Id = id_hex!;
pub const IMPORT_RECEIVED: Id = id_hex!;
pub const IMPORT_SENT: Id = id_hex!;
// Legacy consumers which have not yet moved to Mail projections still use
// these published names. They are source-vocabulary aliases, not native Mail
// kinds, and can disappear with those consumers.
pub const KIND_MESSAGE: Id = LEGACY_KIND_MESSAGE;
pub const KIND_SPAM: Id = LEGACY_KIND_SPAM;
pub const KIND_DRAFT: Id = IMPORT_DRAFT;
/// Attribute vocabulary of the exact payload embedded by the legacy cutover.
/// It is deliberately not used for new top-level Mail facts.
/// Published legacy Mail vocabulary, retained for exact source readers and
/// attribute-identity regression tests. Native Mail does not emit these facts.
pub use imported_legacy as mail;