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
//! Planner schema: calendar events (RFC 5545 VEVENT-shaped) plus
//! the notes a user attaches to them.
//!
//! Used by `planner.rs` (the faculty CLI). Decomposes RFC 5545
//! VEVENT properties into individual triblespace attributes so
//! queries are native pile patterns; round-trips back to `.ics`
//! by re-serializing the attributes.
//!
//! All-day events are stored as a 24-hour `NsTAIInterval` window
//! at UTC midnight (multi-day all-day events span the whole
//! contiguous range). Re-exporting to `.ics` would emit
//! `DTSTART;VALUE=DATE-TIME` rather than `DTSTART;VALUE=DATE`;
//! that's a v1 acceptable lossiness — the `all_day` boolean
//! re-export hint can be added later if it becomes a problem.
use id_hex;
use *;
pub const DEFAULT_BRANCH: &str = "planner";
/// Marks an entity as an event (VEVENT-shaped record).
pub const KIND_EVENT_ID: Id = id_hex!;
/// Marks an entity as a planner note (free-text context attached
/// to an event — minutes, prep, post-meeting takeaways).
pub const KIND_NOTE_ID: Id = id_hex!;
/// Event attributes — one per RFC 5545 VEVENT property we care
/// about. Time-of-day data lives in a single `time: NsTAIInterval`
/// attribute that holds both DTSTART and DTEND as the inclusive
/// interval bounds; instantaneous events use a zero-length
/// interval (start == end).
/// Note attributes — `note_about` points at the event a note
/// belongs to; `note_text` is the body. The commit's transaction
/// time orders notes chronologically (no separate timestamp
/// attribute needed).